aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-01-24Trivial: fixup a few doxygen commentsBen Woosley
These were not declared properly, so their results are not properly processed. E.g.: https://dev.visucore.com/bitcoin/doxygen/rpcdump_8cpp.html#a994c8748aaa60fbb78009ff8a0638dea https://dev.visucore.com/bitcoin/doxygen/coins_8cpp.html#aa03af24ef3570144b045f4fca7a0d603 https://dev.visucore.com/bitcoin/doxygen/wallet_2wallet_8cpp.html#a5c2a7725ff8796f03471f844ecded3d9
2019-01-24Merge #15193: Default -whitelistforcerelay to offWladimir J. van der Laan
a36d97d866e8a11f205d07c624ace7c3d1a2ded8 Default -whitelistforcerelay to off (Suhas Daftuar) Pull request description: No one seems to use this "feature", and at any rate the behavior of relaying transactions when they violate local policy is error-prone, if we ever consider changing the ban behavior of our software from one version to the next. Defaulting this to off means that users who use -whitelist won't be unexpectedly surprised by this interaction. If anyone is still relying on this feature, it can still be explicitly turned on. Tree-SHA512: 52650ad464a728d1648f496751e3f713077ea3a1de7278ed03531b2e8723e63cf2f6f41b56c98c0f73ffa22c36e01d9170b409ab452c737aca35b7ecd7a6b448
2019-01-22Merge #14353: REST: add blockhash call, fetch blockhash by heightJonas Schnelli
42ff30ec6 [Docs] add short documentation for /rest/blockhashbyheight (Jonas Schnelli) 579d418f7 [QA] add rest tests for /rest/blockhashbyheight/<HEIGHT>.<FORMAT> (Jonas Schnelli) eb9ef04c4 REST: add "blockhashbyheight" call, fetch blockhash by height (Jonas Schnelli) Pull request description: Completes the REST interface for trivial block exploring by adding a call that allows to fetch the blockhash in the main chain by a given height. Tree-SHA512: 94be9e56718f857279b11cc16dfa8d04f3b5a762e87ae54281b4d87247c71c844895f4944d5a47f09056bf851f4c4761ac4fbdbaaee957265d14de5c1c73e8d2
2019-01-22Merge #15208: Qt: remove macOS launch-at-startup when compiled with > macOS ↵Wladimir J. van der Laan
10.11, fix memory missmanagement da6011826a730837b59aef5664f3feab4787c9bc Fix macOS launch-at-startup memory issue (Jonas Schnelli) 516437a1b70b6df87faadfd38c3d84e6dfb5eae8 Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11 (Jonas Schnelli) Pull request description: The launch-at-startup API Bitcoin Core uses on macOS where removed in macOS 10.11 leading to a segmentation-fault due to the weak-linking when not actively compiled against SDK 10.11 (`-mmacosx-version-min=10.11`) This PR removes the launch-at-startup feature on macOS when compiled with macOS min version > 10.11 (the default is always the macOS version you compile on). **The depends built binaries (Gitian) are not affected since we are building with min macOS 10.10.** Users self compiling on macOS > 10.11 can re-enable the feature by compiling with min version <= 10.11 (`CXXFLAGS="-mmacosx-version-min=10.11" CFLAGS="-mmacosx-version-min=10.11" ./configure`) **Isn't there a new API from Apple?** Yes, [there is](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html). It will require to create a helper application which needs to be embedded in the .app folder (needs code signing as well). Developers willing to go down that rabbit hole are welcome. Fixes #15142 Tree-SHA512: fa9cc4e39d5a2d2559919b7e22b7766f5e0269a361719294d4a4a2df2fd9d955e5b23b5907e68023fdeee297f652f844f3c447904bf18f9c1145348ad101c432
2019-01-22Default -whitelistforcerelay to offSuhas Daftuar
2019-01-21Fix macOS launch-at-startup memory issueJonas Schnelli
2019-01-21Qt: remove macOS launch-at-startup option when compiled with > macOS 10.11Jonas Schnelli
2019-01-21REST: add "blockhashbyheight" call, fetch blockhash by heightJonas Schnelli
2019-01-21Merge #14906: refactor: Make explicit CMutableTransaction -> CTransaction ↵Wladimir J. van der Laan
conversion. b301950df32443e358bc22ca22c6f9ac09d18219 Made expicit constructor CTransaction(const CMutableTransaction &tx). (lucash-dev) faf29dd019efef4b05e8e78885926764134d9c04 Minimal changes to comply with explicit CMutableTransaction -> CTranaction conversion. (lucash-dev) Pull request description: This PR is re-submission of #14156, which was automatically closed by github (glitch?) Original description: This PR makes explicit the now implicit conversion constructor `CTransaction(const CMutableTransaction&)` in `transaction.h`. Minimal changes were made elsewhere to make the code compilable. I'll follow up with other PRs to address individually refactoring functions that should have a `CMutableTransaction` version, or where a `CTransaction` should be reused. The rationale for this change is: - Conversion constructors should not be explicit unless there's a strong reason for it (in the opinion of, for example, https://google.github.io/styleguide/cppguide.html, and https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ro-conversion. Let me know your take on this). - This particular conversion is very costly -- it implies a serialization plus hash of the transaction. - Even though `CTransaction` and `CMutableTransaction` represent the same data, they have very different use cases and performance properties. - Making it explicit allows for easier reasoning of performance trade-offs. - There has been previous performance issues caused by unneeded use of this implicit conversion. - This PR creates a map for places to look for possible refactoring and performance gains (this benefit still holds if the PR is not merged). Tree-SHA512: 2427462e7211b5ffc7299dae17339d27f8c43266e0895690fda49a83c72751bd2489d4471b3993075a18f3fef25d741243e5010b2f49aeef4a9688b30b6d0631
2019-01-21Merge #14955: Switch all RNG code to the built-in PRNGWladimir J. van der Laan
223de8d94d6522f795ec3c2e7db27469f24aa68c Document RNG design in random.h (Pieter Wuille) f2e60ca98530e0a865ff6c6fd3c5633aec11a515 Use secure allocator for RNG state (Pieter Wuille) cddb31bb0a132afa50b5350196cf26f0064fe3e2 Encapsulate RNGState better (Pieter Wuille) 152146e782d401aa1ce7d989d62306aabc85f22e DRY: Implement GetRand using FastRandomContext::randrange (Pieter Wuille) a1f252eda87356fa329c838a7bf569808489648f Sprinkle some sweet noexcepts over the RNG code (Pieter Wuille) 4ea8e50837a0932b31a241988fd68d6730a2048a Remove hwrand_initialized. (Pieter Wuille) 9d7032e4f066777c97c58b1394884716e213790a Switch all RNG code to the built-in PRNG. (Pieter Wuille) 16e40a8b562ad849a5f5e8b21ceb375e46038243 Integrate util/system's CInit into RNGState (Pieter Wuille) 2ccc3d3aa346e96206281a391bc29874cf5ee7f4 Abstract out seeding/extracting entropy into RNGState::MixExtract (Pieter Wuille) aae8b9bf0f4fd2b801ee72cf191588c8b3a67c3c Add thread safety annotations to RNG state (Pieter Wuille) d3f54d1c82b131d817b20cd9daa75f9d3c9475e1 Rename some hardware RNG related functions (Pieter Wuille) 05fde14e3afe6f7156ebb6df6cd0e3ae12635b89 Automatically initialize RNG on first use. (Pieter Wuille) 2d1cc5093949f8ea9487a68724162c8b39035ad8 Don't log RandAddSeedPerfmon details (Pieter Wuille) 6a57ca91da23c6a5d91399ffc7fc09a99b6d4c76 Use FRC::randbytes instead of reading >32 bytes from RNG (Pieter Wuille) Pull request description: This does not remove OpenSSL, but makes our own PRNG the 'main' one; for GetStrongRandBytes, the OpenSSL RNG is still used (indirectly, by feeding its output into our PRNG state). It includes a few policy changes (regarding what entropy is seeded when). Before this PR: * GetRand*: * OpenSSL * GetStrongRand*: * CPU cycle counter * Perfmon data (on Windows, once 10 min) * /dev/urandom (or equivalent) * rdrand (if available) * From scheduler when idle: * CPU cycle counter before and after 1ms sleep * At startup: * CPU cycle counter before and after 1ms sleep After this PR: * GetRand*: * Stack pointer (which indirectly identifies thread and some call stack information) * rdrand (if available) * CPU cycle counter * GetStrongRand*: * Stack pointer (which indirectly identifies thread and some call stack information) * rdrand (if available) * CPU cycle counter * /dev/urandom (or equivalent) * OpenSSL * CPU cycle counter again * From scheduler when idle: * Stack pointer (which indirectly identifies thread and some call stack information) * rdrand (if available) * CPU cycle counter before and after 1ms sleep * Perfmon data (on Windows, once every 10 min) * At startup: * Stack pointer (which indirectly identifies thread and some call stack information) * rdrand (if available) * CPU cycle counter * /dev/urandom (or equivalent) * OpenSSL * CPU cycle counter again * Perfmon data (on Windows, once every 10 min) The interface of random.h is also simplified, and documentation is added. This implements most of #14623. Tree-SHA512: 0120e19bd4ce80a509b5c180a4f29497d299ce8242e25755880851344b825bc2d64a222bc245e659562fb5463fb7c70fbfcf003616be4dc59d0ed6534f93dd20
2019-01-21Merge #14970: [net] add dnsseed.emzy.de to DNS seedsWladimir J. van der Laan
de7266fc3c9962cc3571c6ff72d616d2e8327fbb [net] add dnsseed.emzy.de to DNS seeds (Stephan Oeste) Pull request description: ACK https://github.com/bitcoin/bitcoin/blob/master/doc/dnsseed-policy.md I'm willing to keep it up and running, unless something bad happens. I have 15+ years experience running dns servers. About my setup: - the server may change over time, but the service will be up all the time - running [sipa/bitcoin-seeder](https://github.com/sipa/bitcoin-seeder) with default settings (and the non-root port redirect) Tree-SHA512: 7abc975c148cc738d045c79d5bdb8d9926da41bb8dde66c21e954652b3c72a7aa2526af0c3c4fb8c234d3deaed5563542defe8a5137188d65ad7201b6b1d80eb
2019-01-21Merge #14605: Return of the BanmanWladimir J. van der Laan
18185b57c32d0a43afeca4c125b9352c692923e9 scripted-diff: batch-recase BanMan variables (Carl Dong) c2e04d37f3841d109c1fe60693f9622e2836cc29 banman: Add, use CBanEntry ctor that takes ban reason (Carl Dong) 1ffa4ce27d4ea6c1067d8984455df97994c7713e banman: reformulate nBanUtil calculation (Carl Dong) daae598feb034f2f56e0b00ecfb4854d693d3641 banman: add thread annotations and mark members const where possible (Cory Fields) 84fc3fbd0304a7d6e660bf783c84bed2dd415141 scripted-diff: batch-rename BanMan members (Cory Fields) af3503d903b1a608cd212e2d74b274103199078c net: move BanMan to its own files (Cory Fields) d0469b2e9386a7a4b268cb9725347e7517acace6 banman: pass in default ban time as a parameter (Cory Fields) 2e56702ecedd83c4b7cb8de9de5c437c8c08e645 banman: pass the banfile path in (Cory Fields) 4c0d961eb0d7825a1e6f8389d7f5545114ee18c6 banman: create and split out banman (Cory Fields) 83c1ea2e5e66b8a83072e3d5ad6a4ced406eb1ba net: split up addresses/ban dumps in preparation for moving them (Cory Fields) 136bd7926c72659dd277a7b795ea17f72e523338 tests: remove member connman/peerLogic in TestingSetup (Cory Fields) 7cc2b9f6786f9bc33853220551eed33ca6b7b7b2 net: Break disconnecting out of Ban() (Cory Fields) Pull request description: **Old English à la Beowulf** ``` Banman wæs bréme --blaéd wíde sprang-- Connmanes eafera Coreum in. aéglaéca léodum forstandan Swá bealdode bearn Connmanes guma gúðum cúð gódum daédum· dréah æfter dóme· nealles druncne slóg ``` **Modern English Translation** ``` Banman was famed --his renown spread wide-- Conman's hier, in Core-land. against the evil creature defend the people Thus he was bold, the son of Connman man famed in war, for good deeds; he led his life for glory, never, having drunk, slew ``` -- With @theuni's blessing, here is Banman, rebased. Original PR: https://github.com/bitcoin/bitcoin/pull/11457 -- Followup PRs: 1. Give `CNode` a `Disconnect` method ([source](https://github.com/bitcoin/bitcoin/pull/14605#discussion_r248065847)) 2. Add a comment to `std::atomic_bool fDisconnect` in `net.h` that setting this to true will cause the node to be disconnected the next time `DisconnectNodes()` runs ([source](https://github.com/bitcoin/bitcoin/pull/14605#discussion_r248384309)) Tree-SHA512: 9c207edbf577415c22c9811113e393322d936a843d4ff265186728152a67c057779ac4d4f27b895de9729f7a53e870f828b9ebc8bcdab757520c2aebe1e9be35
2019-01-21Merge #15167: qt: Fix wallet selector size adjustmentWladimir J. van der Laan
ca91661adf9fa22bf1c919d118de27bfac04e94c Fix wallet selector size adjustment (Hennadii Stepanov) Pull request description: This PR sets `QComboBox::AdjustToContents` instead of default `QComboBox::AdjustToContentsOnFirstShow` for wallet selectors. Before (in master): ![screenshot from 2019-01-14 20-47-22](https://user-images.githubusercontent.com/32963518/51133771-83d00d80-183e-11e9-812c-3a1119fa766e.png) After (with this PR): ![screenshot from 2019-01-14 20-48-43](https://user-images.githubusercontent.com/32963518/51133788-90546600-183e-11e9-8394-eb62a998b90f.png) Tree-SHA512: c23ac91905bb31aaa32f2fccc02b01f5707d8b094020fe6a75a9e099e78f9191670474920234a01c46480f67d3d311f44ff46f1f4202cd50a4a6d4d09a8342ce
2019-01-21Merge #15213: doc: Remove errant paste from walletcreatefundedpsbt for ↵Wladimir J. van der Laan
nLocktime replaceable 85f0ca95f3b57d9714a753882ea22fcd6a4139fb Remove errant past from walletcreatefundedpsbt for nLocktime replaceability (Gregory Sanders) Pull request description: nLockTime has no bearing on bip125 Tree-SHA512: cb123242ee7e1eeff10dbfcab8e57f9aa88590e2da6794343a90a18472a97f23ce7c6bbc55b88163e007fe38c5d8ee5b749cc4ce2bf145f560e084d61b568159
2019-01-21Merge #15209: zmq: log outbound message high water mark when reusing socketWladimir J. van der Laan
f1dc6932e95fd29cbedfa5f013eca37ed91e12ed zmq: log outbound message high water mark when reusing socket (fanquake) Pull request description: Running master with `src/bitcoind -zmqpubhashblockhwm=12345 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubhashtxhwm=5000 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -debug=zmq`: ``` 2019-01-19T14:11:01Z zmq: version 4.3.1 2019-01-19T14:11:01Z zmq: Initialize notification interface 2019-01-19T14:11:01Z zmq: Outbound message high water mark for pubhashblock at tcp://127.0.0.1:28332 is 12345 2019-01-19T14:11:01Z zmq: Notifier pubhashblock ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:11:01Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:11:01Z zmq: Notifier pubhashtx ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:11:01Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:11:01Z zmq: Notifier pubrawblock ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:11:01Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:11:01Z zmq: Notifier pubrawtx ready (address = tcp://127.0.0.1:28332) ``` This PR: ``` 2019-01-19T14:06:57Z zmq: version 4.3.1 2019-01-19T14:06:57Z zmq: Initialize notification interface 2019-01-19T14:06:57Z zmq: Outbound message high water mark for pubhashblock at tcp://127.0.0.1:28332 is 12345 2019-01-19T14:06:57Z zmq: Notifier pubhashblock ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:06:57Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:06:57Z zmq: Outbound message high water mark for pubhashtx at tcp://127.0.0.1:28332 is 5000 2019-01-19T14:06:57Z zmq: Notifier pubhashtx ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:06:57Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:06:57Z zmq: Outbound message high water mark for pubrawblock at tcp://127.0.0.1:28332 is 1000 2019-01-19T14:06:57Z zmq: Notifier pubrawblock ready (address = tcp://127.0.0.1:28332) 2019-01-19T14:06:57Z zmq: Reusing socket for address tcp://127.0.0.1:28332 2019-01-19T14:06:57Z zmq: Outbound message high water mark for pubrawtx at tcp://127.0.0.1:28332 is 1000 2019-01-19T14:06:57Z zmq: Notifier pubrawtx ready (address = tcp://127.0.0.1:28332) ``` Tree-SHA512: 6915184d8a0f4764f1cc76dce0099eed411a123d7a4bc8cee1664bb5a233a8119ddd2c78ad980c6e1d9f6dadaba48800ee6bc57de906d4e1b4108df745f1458e
2019-01-21Merge #15210: gui: Fix window title updateWladimir J. van der Laan
1ed425ea17639c20ad3b3e3ef4b34d669b2fd2a4 gui: Fix window title update (João Barbosa) Pull request description: Removes trailing `-` from window title when running on mainnet. Reported by @Sjors in https://github.com/bitcoin/bitcoin/pull/15149#issuecomment-455787938. Tree-SHA512: 22f13c361496720f30a4926d928851ed74456c0d70bd313b0ebaca91a9ebfde96991091ac3d1b094f33d3ce9afafd709eb1917f00d96fa3ca69751b6b14e1d2b
2019-01-20Merge #15194: Add comment describing fDisconnect behaviorWladimir J. van der Laan
5b4283cb81b5d3023b9868d121b22b1f387a50ca Add comment describing fDisconnect behavior (Carl Dong) Pull request description: Motivated by @Sjors here: https://github.com/bitcoin/bitcoin/pull/14605#discussion_r248384309 Tree-SHA512: 8fc52eb4d3b5651c19c49b47fad75e8fb939cf524ada647e88d8d5aad7726052d94e500c1ebdb2a41b67bc4669ee61ff151a5cff81a52c68c900da562ef21751
2019-01-19Remove errant past from walletcreatefundedpsbt for nLocktime replaceabilityGregory Sanders
2019-01-19gui: Fix window title updateJoão Barbosa
2019-01-19zmq: log outbound message high water mark when reusing socketfanquake
2019-01-19Merge #15186: rpc: remove duplicate solvable field from getaddressinfoWladimir J. van der Laan
a2a6c8f4535c0c3c5f05714d64b238fc5a839233 rpc: remove duplicate solvable field from getaddressinfo (fanquake) Pull request description: Also added optional to `iscompressed`. Tree-SHA512: 28442a9dbfb2a9992b9b57142fa13d374d39444f04ae63460cb6330d896160cfd4b9651a3e231893eac3142ce55eff597a54cbafd3b57ffa46d3711c64044acb
2019-01-19Merge #15178: qt: Improve "help-console" messageWladimir J. van der Laan
979bc0c206c581c59460ed167bdc293b2a834cb5 Improve "help-console" message (Hennadii Stepanov) Pull request description: Added a note that results can be queried in the parenthesized syntax as it does not work in the standard syntax. Deprecated (since #8704) boolean `verbose` replaced with numerical `verbosity` in `getblock` examples. Current master (acec9e45c6fb6d5e72908c1a87b2b14f1ca5e3a0): ![screenshot from 2019-01-16 13-40-10](https://user-images.githubusercontent.com/32963518/51248127-d96bfd80-1997-11e9-83d3-47cf157e2f8d.png) Master + this PR: ![screenshot from 2019-01-16 14-00-39](https://user-images.githubusercontent.com/32963518/51248137-e852b000-1997-11e9-94dc-e9c949690beb.png) Tree-SHA512: 663e359ed117306f789fdefcae298194fdd6f5477c87912740e1683323974a333dcca13f17bb2c0aa66639ab7658bd53e535ae8fe671ea5fc557a3db4b192908
2019-01-18Merge #15101: gui: Add WalletControllerJonas Schnelli
0dd9bdefa gui: Refactor to use WalletController (João Barbosa) 8fa271f08 gui: Add WalletController (João Barbosa) cefb399e2 gui: Use AutoConnection for WalletModel::unload signal (João Barbosa) Pull request description: This PR is a subset of the work done in the context of #13100. This change consists in extracting from the application class the code that manages the wallet models. The role of the `WalletController` instance is to coordinate wallet operations and the window. Tree-SHA512: 6a824054376730eb7d16c643dd2003f5f60778e8ad3af707b82bc12c48438db179ca4446316b28fb17b206f4b9aba8998419aab8c5dd1f7c32467015732b5094
2019-01-18rpc: remove duplicate solvable field from getaddressinfofanquake
2019-01-18gui: Refactor to use WalletControllerJoão Barbosa
2019-01-18gui: Add WalletControllerJoão Barbosa
2019-01-18gui: Use AutoConnection for WalletModel::unload signalJoão Barbosa
2019-01-17Add comment describing fDisconnect behaviorCarl Dong
2019-01-17Merge #15040: qt: Add workaround for QProgressDialog bug on macOSJonas Schnelli
7c572c488 Add workaround for QProgressDialog bug on macOS (Hennadii Stepanov) Pull request description: Fix #15016. Refs: - [QTBUG-65750: QProgressDialog too small width at larger font size on Mac](https://bugreports.qt.io/browse/QTBUG-65750) - [QTBUG-70357: QProgressDialog is too narrow to fit the text of its label](https://bugreports.qt.io/browse/QTBUG-70357) With this PR: ![screenshot from 2018-12-26 22-01-30](https://user-images.githubusercontent.com/32963518/50456571-1aa35b80-095e-11e9-8442-c285555f2bee.png) Tree-SHA512: dde668dfa7d2144973c0e868aea7fdb7d90f78584836d024ffefb8df4a709d6842fa3601954759b4462856a80e81df15b861ea39506599230a16928b621d9f8f
2019-01-17Merge #14250: qt: Remove redundant stopThread() and stopExecutor() signalsWladimir J. van der Laan
24313fbf7e3d69145bc18c089601ba7aea35d61c Remove redundant stopExecutor() signal (Hennadii Stepanov) 1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5 Remove redundant stopThread() signal (Hennadii Stepanov) Pull request description: The `QThread::finished` signal do this work. Tree-SHA512: 1afce23d30232276d50c3af5af79d83b88e390a2b71f7df585cc1079585d330447d179bbc34c0a89599beb2da035dfd5b9ce23238171490825cabc3a19ae6e67
2019-01-16Document RNG design in random.hPieter Wuille
2019-01-16Use secure allocator for RNG statePieter Wuille
2019-01-16Encapsulate RNGState betterPieter Wuille
2019-01-16DRY: Implement GetRand using FastRandomContext::randrangePieter Wuille
2019-01-16Sprinkle some sweet noexcepts over the RNG codePieter Wuille
2019-01-16Remove hwrand_initialized.Pieter Wuille
All access to hwrand is now gated by GetRNGState, which initializes the hwrand code.
2019-01-16Switch all RNG code to the built-in PRNG.Pieter Wuille
It includes the following policy changes: * All GetRand* functions seed the stack pointer and rdrand result (in addition to the performance counter) * The periodic entropy added by the idle scheduler now seeds stack pointer, rdrand and perfmon data (once every 10 minutes) in addition to just a sleep timing. * The entropy added when calling GetStrongRandBytes no longer includes the once-per-10-minutes perfmon data on windows (it is moved to the idle scheduler instead, where latency matters less). Other changes: * OpenSSL is no longer seeded directly anywhere. Instead, any generated randomness through our own RNG is fed back to OpenSSL (after an additional hashing step to prevent leaking our RNG state). * Seeding that was previously done directly in RandAddSeedSleep is now moved to SeedSleep(), which is indirectly invoked through ProcRand from RandAddSeedSleep. * Seeding that was previously done directly in GetStrongRandBytes() is now moved to SeedSlow(), which is indirectly invoked through ProcRand from GetStrongRandBytes().
2019-01-16Integrate util/system's CInit into RNGStatePieter Wuille
This guarantees that OpenSSL is initialized properly whenever randomness is used, even when that randomness is invoked from global constructors. Note that this patch uses Mutex directly, rather than CCriticalSection. This is because the lock-detection code is not necessarily initialized during global constructors.
2019-01-16Abstract out seeding/extracting entropy into RNGState::MixExtractPieter Wuille
2019-01-16Add thread safety annotations to RNG statePieter Wuille
2019-01-16Rename some hardware RNG related functionsPieter Wuille
2019-01-16Automatically initialize RNG on first use.Pieter Wuille
2019-01-16Don't log RandAddSeedPerfmon detailsPieter Wuille
These are hard to deal with, as in a follow-up this function can get called before the logging infrastructure is initialized.
2019-01-16scripted-diff: batch-recase BanMan variablesCarl Dong
-BEGIN VERIFY SCRIPT- sed -i "s/banMap/banmap/g" src/banman.h src/banman.cpp sed -i "s/netAddr/net_addr/g" src/banman.h src/banman.cpp sed -i "s/sinceUnixEpoch/since_unix_epoch/g" src/banman.h src/banman.cpp sed -i "s/bantimeoffset/ban_time_offset/g" src/banman.h src/banman.cpp sed -i "s/subNet/sub_net/g" src/banman.h src/banman.cpp sed -i "s/banReason/ban_reason/g" src/banman.h src/banman.cpp sed -i "s/notifyUI/notify_ui/g" src/banman.h src/banman.cpp sed -i "s/banEntry/ban_entry/g" src/banman.h src/banman.cpp sed -i "s/nStart/n_start/g" src/banman.h src/banman.cpp -END VERIFY SCRIPT-
2019-01-16banman: Add, use CBanEntry ctor that takes ban reasonCarl Dong
2019-01-16banman: reformulate nBanUtil calculationCarl Dong
Avoid reassigning parameters.
2019-01-16banman: add thread annotations and mark members const where possibleCory Fields
Also remove misleading comment. ClearBanned is used by rpc as well.
2019-01-16scripted-diff: batch-rename BanMan membersCory Fields
-BEGIN VERIFY SCRIPT- sed -i "s/clientInterface/m_client_interface/g" src/banman.h src/banman.cpp sed -i "s/setBannedIsDirty/m_is_dirty/g" src/banman.h src/banman.cpp sed -i "s/cs_setBanned/m_cs_banned/g" src/banman.h src/banman.cpp sed -i "s/setBanned/m_banned/g" src/banman.h src/banman.cpp -END VERIFY SCRIPT-
2019-01-16net: move BanMan to its own filesCory Fields
2019-01-16banman: pass in default ban time as a parameterCory Fields
Removes the dependency on arg parsing.