aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-12-28Merge #20771: refactor: Enable -Wswitch for FeeEstimateHorizonfanquake
faccf8b1e1af293dfe9158d732718e7798a2fd89 refactor: Enable -Wswitch for FeeEstimateHorizon (MarcoFalke) Pull request description: This enables the `-Wswitch` compiler warning for `FeeEstimateHorizon` by removing the `default` case in `switch` statements. ACKs for top commit: practicalswift: cr ACK faccf8b1e1af293dfe9158d732718e7798a2fd89 jonatack: ACK faccf8b1e1af293dfe9158d732718e7798a2fd89 hebasto: ACK faccf8b1e1af293dfe9158d732718e7798a2fd89, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 63a8dff6e8dead149ec2fa8319e7ff41022c9534d423d3086fd8f22be073dc4915f74c7fe9139ee681a8204730cf58c80ef40c93fb33032d586e68b4f78f557d
2020-12-27Merge #20674: fuzz: Call SendMessages after ProcessMessage to increase coveragefanquake
fa09f97beabafaaeb59fca710760578ff1f2e8d7 fuzz: Call SendMessages after ProcessMessage to increase coverage (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: Tested ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 dhruv: tACK fa09f97 Crypt-iQ: cr ACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 sipa: utACK fa09f97beabafaaeb59fca710760578ff1f2e8d7 Tree-SHA512: 87c52aa38f902c4f6c9c2380f486a3ab21edc0e21e48bb619cdb67cfd698154cc57b170eef31fc940c0bb2c878e155847de03fc6e4cd85bed25f10c4f80c747b
2020-12-26Merge #20756: [doc] Add missing field (permissions) to the getpeerinfo helpMarcoFalke
667d203687708390bc0f43f2dd3f4ab427b88338 [doc] Add permissions to the getpeerinfo help. (Amiti Uttarwar) Pull request description: This field was previously being returned, but missing from the RPCHelpMan. This PR uses the existing `NET_PERMISSIONS_DOC` to inform RPC users about this field. ``` "permissions" : [ (json array) Any special permissions that have been granted to this peer "str", (string) bloomfilter (allow requesting BIP37 filtered blocks and transactions), noban (do not ban for misbehavior; implies download), forcerelay (relay transactions that are already in the mempool; implies relay), relay (relay even in -blocksonly mode, and unlimited transaction announcements), mempool (allow requesting BIP35 mempool contents), download (allow getheaders during IBD, no disconnect after maxuploadtarget limit), addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info). ... ], ``` ACKs for top commit: Sjors: tACK 667d203687708390bc0f43f2dd3f4ab427b88338 Tree-SHA512: 973631b41d35d6333e3cb06b35277de869110f6ad6498c7e74f00c75202e8de1788a48755c21ac964903e5e6050a5e769a63866211aec9004cd665a727a54a3c
2020-12-26refactor: Enable -Wswitch for FeeEstimateHorizonMarcoFalke
2020-12-25Merge #19972: fuzz: Add fuzzing harness for node eviction logicMarcoFalke
5a9ee0869b0b722ebfcdaabaefba6376522b2eeb tests: Add fuzzing harness for node eviction logic (practicalswift) Pull request description: Add fuzzing harness for node eviction logic. See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets). Happy fuzzing :) ACKs for top commit: MarcoFalke: cr ACK 5a9ee0869b0b722ebfcdaabaefba6376522b2eeb Tree-SHA512: c2401d22134867e23dab1ba94ae7ef36fdf52aa0588fdc4705d9cb765ddf979fd775fdf153ce2359f1bc1787cf60bf0ebcd47c7aa29c672e6a253fa58cac292d
2020-12-25Merge #15451: [doc] clarify getdata limit after #14897MarcoFalke
c119ba3c9b321a7f4418860741b3f69173e9c891 [doc] clarify getdata limit after #14897 (Michael Polzer) Pull request description: GETDATA is limited to blocks and transactions now and can't be used for other non-block data ACKs for top commit: laanwj: ACK c119ba3c9b321a7f4418860741b3f69173e9c891 theStack: ACK https://github.com/bitcoin/bitcoin/pull/15451/commits/c119ba3c9b321a7f4418860741b3f69173e9c891 benthecarman: ACK c119ba3c9b321a7f4418860741b3f69173e9c891 Tree-SHA512: d6e9c109bcce4ef004ec83a9ec591163279476524dec97ed5f5c34e322dca35af66a168f0878ff972bbcec79d81623903f3619fedf8f88cdced3f3f66a779173
2020-12-25Merge #20761: fuzz: Check that NULL_DATA is unspendableMarcoFalke
fa2630328687645fbc7dd1ea46aac32514025715 fuzz: Check that NULL_DATA is unspendable (MarcoFalke) Pull request description: * Every script of type NULL_DATA must be unspendable * The only know types of unspendable scripts are NULL_DATA and certain NONSTANDARD scripts ACKs for top commit: sipa: utACK fa2630328687645fbc7dd1ea46aac32514025715 Tree-SHA512: 8297fbacf32b4868b12accc1c052d352d02d96540a1fc883de9d04a3df8734116deecc33046495c9a3af6d79fec7f8d63afbfa5e401a2ca8d7c70f0f13735c0d
2020-12-24Merge #18772: rpc: calculate fees in getblock using BlockUndo dataMarcoFalke
66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e test: RPC: getblock fee calculations (Elliott Jin) bf7d6e31b1062ab5f90e14e83c56309f499fa2e9 RPC: getblock: tx fee calculation for verbosity 2 via Undo data (Elliott Jin) Pull request description: This change is progress towards #18771 . It adapts the fee calculation part of #16083 and addresses some feedback. The additional "verbosity level 3" features are planned for a future PR. **Original PR description:** > Using block undo data (like in #14802) we can now show fee information for each transaction in a block without the need for additional -txindex and/or a ton of costly lookups. For a start we'll add transaction fee information to getblock verbosity level 2. This comes at a negligible speed penalty (<1%). ACKs for top commit: luke-jr: tACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e fjahr: tACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e MarcoFalke: review ACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e 🗜 Tree-SHA512: be1fe4b866946a8dc36427f7dc72a20e10860e320a28fa49bc85bd2a93a0d699768179be29fa52e18b2ed8505d3ec272e586753ef2239b4230e0aefd233acaa2
2020-12-24fuzz: Check that NULL_DATA is unspendableMarcoFalke
2020-12-23[doc] Add permissions to the getpeerinfo help.Amiti Uttarwar
This field was already being returned, but the RPCHelpMan did not indicate this. So, this PR updates the help text to match.
2020-12-22[net processing] Remove dropmessagestestJohn Newbery
-dropmessagestest is a command line option that causes 1 in n received messages to be dropped. The Bitcoin P2P protocol is stateful and in general cannot handle messages being dropped. Dropped version/verack/ping/pong messages will cause the connection to time out and be torn down. Other dropped messages may also cause the peer to believe that the peer has stalled and tear down the connection. It seems difficult to uncover any actual issues with -dropmessagestest, and any coverage that could be generated would probably be easier to trigger with fuzz testing.
2020-12-22Merge #19829: net processing: Move block inventory state to net_processingMarcoFalke
3002b4af2b4fde63026f8f7c575452a5c989c662 [net processing] Guard m_continuation_block with m_block_inv_mutex (John Newbery) 184557e8e03f76ff18dacdb32c12692d8578691f [net processing] Move hashContinue to net processing (John Newbery) c853ef002ee7074b6e20eb8f58138c8293846424 scripted-diff: rename vBlockHashesToAnnounce and vInventoryBlockToSend (John Newbery) 53b7ac1b7d3394aeaad1e4a6e3b323d17cdf5994 [net processing] Move block inventory data to Peer (John Newbery) 78040f91687e7f1986e466d448c9b9530830e9b8 [net processing] Rename nStartingHeight to m_starting_height (John Newbery) 77a2c2f8f91a5c5a140fd970f9a3a142b43902bf [net processing] Move nStartingHeight to Peer (John Newbery) 717a374e74b64b7b90bc1b2995e8900212bd0bfe [net processing] Improve documentation for Peer destruction/locking (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all block inventory state into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: jonatack: re-ACK 3002b4af2b4fde63026f8f7c575452a5c989c662 per `git diff 9aad3e4 3002b4a` Sjors: Code review re-ACK 3002b4af2b4fde63026f8f7c575452a5c989c662 MarcoFalke: re-ACK 3002b4af2b4fde63026f8f7c575452a5c989c662 🌓 Tree-SHA512: eb2b474b73b025791ee3e6e41809926b332b48468763219f31638ca390f427632f05902dfc6a2c6bdc1ce47b215782f67874ddbf05b97d77d5897b7e2abfe4d9
2020-12-21fuzz: Update FuzzedDataProvider.h from upstream (LLVM)practicalswift
Upstream revision: https://github.com/llvm/llvm-project/blob/6d0488f75bb2f37bcfe93fc8f59f6e78c9a0c939/compiler-rt/include/fuzzer/FuzzedDataProvider.h Changes: * [compiler-rt] FuzzedDataProvider: add ConsumeData and method. * [compiler-rt] Fix a typo in a comment in FuzzedDataProvider.h. * [compiler-rt] Add ConsumeRandomLengthString() version without arguments. * [compiler-rt] Refactor FuzzedDataProvider for better readability. * [compiler-rt] FuzzedDataProvider: make linter happy. * [compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.
2020-12-21Merge #20731: rpc: Add missing description of vout in getrawtransaction help ↵MarcoFalke
text b23349b8804fb60c6b3d7d0e2a95927a0d1b49b9 rpc: Add missing description of vout in getrawtransaction help text (Ben Carman) Pull request description: In `getrawtransaction` the vout did not have a description. I gave it the same description as the one used in `decoderawtransaction`. ACKs for top commit: MarcoFalke: ACK b23349b8804fb60c6b3d7d0e2a95927a0d1b49b9 🏯 Tree-SHA512: 3833b97c82a46dfeb7ac825d4b2514b4b05ce54ac41f2144a8e2f2093b3411fe1d090c1e5b0c3d09200a2ea164c8d17ece12cdb43bbaeaeccc51a9da6dd7b7a3
2020-12-21rpc: Add missing description of vout in getrawtransaction help textBen Carman
2020-12-21Merge #20671: Replace boost::optional with std::optionalWladimir J. van der Laan
fa4435e22f78f632a455016ce00a357009aac059 Replace boost::optional with std::optional (MarcoFalke) fa7e803f3e4df33117927aef6fef9bfaee4f410d Remove unused MakeOptional (MarcoFalke) fadd4029dced574778ade228931a7706f92bc676 psbt: Assert that tx has a value in UpdatePSBTOutput (MarcoFalke) Pull request description: Now that we can use std::optional from the vanilla standard library, drop the third-party boost dependency ACKs for top commit: practicalswift: cr ACK fa4435e22f78f632a455016ce00a357009aac059: patch looks correct! laanwj: code review ACK fa4435e22f78f632a455016ce00a357009aac059 hebasto: ACK fa4435e22f78f632a455016ce00a357009aac059, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 50c5a1a130cac65e043e0177ba5b009fc2ba09343af4e23322ff2eb32184a55f8f2dea66e7a1b9d9acf56bc164eef4e47448750549a07f3b661199ac9bf9afef
2020-12-20inline non-member functions with body in fuzzing headersPatrick Strateman
2020-12-20[net processing] Guard m_continuation_block with m_block_inv_mutexJohn Newbery
2020-12-20[net processing] Move hashContinue to net processingJohn Newbery
Also rename to m_continuation_block to better communicate meaning.
2020-12-20scripted-diff: rename vBlockHashesToAnnounce and vInventoryBlockToSendJohn Newbery
-BEGIN VERIFY SCRIPT- sed -i 's/vBlockHashesToAnnounce/m_blocks_for_headers_relay/g' src/net_processing.* sed -i 's/vInventoryBlockToSend/m_blocks_for_inv_relay/g' src/net_processing.* -END VERIFY SCRIPT-
2020-12-20[net processing] Move block inventory data to PeerJohn Newbery
2020-12-20[net processing] Rename nStartingHeight to m_starting_heightJohn Newbery
Not done as a scripted diff to avoid misnaming the local variable in ProcessMessage().
2020-12-20[net processing] Move nStartingHeight to PeerJohn Newbery
2020-12-19[net processing] Improve documentation for Peer destruction/lockingJohn Newbery
Suggested here: - https://github.com/bitcoin/bitcoin/pull/19607#discussion_r467071878 - https://github.com/bitcoin/bitcoin/pull/19829#discussion_r546116786
2020-12-19Replace boost::optional with std::optionalMarcoFalke
2020-12-19Remove unused MakeOptionalMarcoFalke
The only use was to work around a compiler warning in an ancient compiler, which we no longer support.
2020-12-19psbt: Assert that tx has a value in UpdatePSBTOutputMarcoFalke
This was previously done implicitly in boost::optional by BOOST_ASSERT. Also, it was checked at runtime by valgrind if for some reason the assert was disabled. std::optional dereference won't assert, so add the Assert here explicitly. The explicit Assert also helps to document the code better.
2020-12-18Merge #20434: contrib: Parse ELF directly for symbol and security checksWladimir J. van der Laan
a0a771843fc39c3cc2574a51f009c3391e1808e9 contrib: Changes to checks for PowerPC64 (Luke Dashjr) 634f6ec4eb9997d7bd0f8209fad49a4171d42384 contrib: Parse ELF directly for symbol and security checks (Wladimir J. van der Laan) Pull request description: Instead of the ever-messier text parsing of the output of the readelf tool (which is clearly meant for human consumption not to be machine parseable), parse the ELF binaries directly. Add a small dependency-less ELF parser specific to the checks. This is slightly more secure, too, because it removes potential ambiguity due to misparsing and changes in the output format of `elfread`. It also allows for stricter and more specific ELF format checks in the future. This removes the build-time dependency for `readelf`. It passes the test-security-check for me locally, ~~though I haven't checked on all platforms~~. I've checked that this works on the cross-compile output for all ELF platforms supported by Bitcoin Core at the moment, as well as PPC64 LE and BE. Top commit has no ACKs. Tree-SHA512: 7f9241fec83ee512642fecf5afd90546964561efd8c8c0f99826dcf6660604a4db2b7255e1afb1e9bb0211fd06f5dbad18a6175dfc03e39761a40025118e7bfc
2020-12-18Merge #20690: Clean up logging of outbound connection typeMarcoFalke
6d1e85f475a8af3ca0e094ed101dc19704e5ab74 Clean up logging of outbound connection type (Suhas Daftuar) Pull request description: We have a function that converts `ConnectionType` enums to strings, so use it. Suggested by ajtowns in https://github.com/bitcoin/bitcoin/pull/19858#discussion_r540791588 ACKs for top commit: amitiuttarwar: ACK 6d1e85f475a8af3ca0e094ed101dc19704e5ab74 naumenkogs: ACK 6d1e85f Tree-SHA512: f5084d8b5257380696d9fde86a8873e190cd4553feb07fa49df39bbd9510bf5832d190a3bca1571c48370d16a17c7a34900857b21b27bec0777bfa710211d7bb
2020-12-18Merge bitcoin-core/gui#155: Fix checkbox layout in Create Wallet dialogMarcoFalke
e71b656f317f38ef0ba0874736f116dae39efc67 qt: Align layout of checkboxes (Hennadii Stepanov) Pull request description: From https://github.com/bitcoin/bitcoin/issues/20555#issuecomment-747742627: > 0.21.0rc3 compiled from source, Ubuntu 20.04 + i3: tested mainnet, testnet, and signet. created a descriptor wallet in qt, tested torv3 with addnode, and checked if anchors.dat is created on shutdown and removed on startup. > > I've noticed the "Advanced options" label being cut-off in the wallet creation dialog. This PR should fix this issue. ACKs for top commit: MarcoFalke: review ACK e71b656f317f38ef0ba0874736f116dae39efc67 Tree-SHA512: dcc997a440a96fc936296323afaf9f4040ac06cf5ad32724a88c2e2e16c726c35b1b2bacbb3e081839d8a69b5a6086b2570d6b2e98976f29b5427db2d434eee9
2020-12-18Merge #20687: wallet: Add missing check for -descriptors wallet tool optionMarcoFalke
fae32f295cc5b57c1cb95090bb60cddb42f9778a wallet: Add missing check for -descriptors wallet tool option (MarcoFalke) faf8f61368696b9cbbea55ead30d6a48203235ff test: Add missing check for is_sqlite_compiled (MarcoFalke) fa7dde1c418e2e700853bd30cc9e012c4e4c5ef2 wallet: Pass ArgsManager into ExecuteWalletToolFunc instead of using global (MarcoFalke) Pull request description: Also, fix a test failure when compiled without sqlite ACKs for top commit: ryanofsky: Code review ACK fae32f295cc5b57c1cb95090bb60cddb42f9778a. Thanks for implementing the -descriptors check and dealing with the test failure! jonatack: Code review utACK fae32f295cc5b57c1cb95090bb60cddb42f9778a Tree-SHA512: 3d7710694085822739a8316e4abc6db270799ca6ff6b0f9e5563ae240da65ae6a9cab7ba2647feae6ba540dac40b55b38ed41c8f6ed0bf02a3d1536284448927
2020-12-18qt: Align layout of checkboxesHennadii Stepanov
2020-12-17wallet: Add missing check for -descriptors wallet tool optionMarcoFalke
2020-12-17Clean up logging of outbound connection typeSuhas Daftuar
2020-12-17wallet: Pass ArgsManager into ExecuteWalletToolFunc instead of using globalMarcoFalke
2020-12-17fuzz: replace CNode code with fuzz/util.h::ConsumeNode()Jon Atack
2020-12-17Merge #19137: wallettool: Add dump and createfromdump commandsMarcoFalke
23cac24dd3f2aaf88aab978e7ef4905772815cd2 tests: Test bitcoin-wallet dump and createfromdump (Andrew Chow) a88c320041bd1cd1786b2dfd9ab698a67c2a57c6 wallettool: Add createfromdump command (Andrew Chow) e1e7a90d5f0616a46ffadd62a9f1c65406cca6b4 wallettool: Add dump command (Andrew Chow) Pull request description: Adds two commands to the `bitcoin-wallet` tool: `dump` and `createfromdump`. These commands will be useful for a wallet storage migration in the future. It is also generally useful to have a storage agnostic dump like this. These commands are similar to BDB's `db_dump` and `db_load` tools. This can also be useful for manual construction of a wallet file for tests. `dump` outputs every key-value pair from the wallet as comma separated hex. Each key-value pair is on its own line with the key and value in hex separated by a comma. This is output to the file specified by the new `-dumpfile` option. `createfromdump` takes a file produced by `dump` and creates a new wallet file with exactly the records specified in that file. A new option `-dumpfile` is added to the wallet tool. When used with `dump`, the records will be written to the specified file. When used with `createfromdump`, the file is read and the key-value pairs constructed from it. `createfromdump` requires `-dumpfile`. A simple round-trip test is added to the `tool_wallet.py`. This PR is based on #19334, ACKs for top commit: Sjors: re-utACK 23cac24 MarcoFalke: re review ACK 23cac24dd3f2aaf88aab978e7ef4905772815cd2 only change is rebase and removing useless shared_ptr wrapper 🎼 ryanofsky: Code review ACK 23cac24dd3f2aaf88aab978e7ef4905772815cd2. Only changes since last review rebase and changing a pointer to a reference Tree-SHA512: 2d63cf62baca3d16495aa698dc02f7d889c81b41015e9c92c23c275bb4a690fc176d351c3fd7f310bd6b17f5a936cc9be694cbecd702af741b96c0f530e72fa2
2020-12-17Merge #20635: fix misleading comment about call to non-existing functionWladimir J. van der Laan
cc3044ccdbefa9fae58d1762477e377883b39c5e fix misleading comment about call to non-existing function (pox) Pull request description: The comment seems to be describing the subsequent call to `SyncTransaction` but refers to it as `SyncNotifications`, which is not any function currently in the codebase. It's best to just remove the "what" aspect of the comment and focus on the "why", which also reduces the risk of similar documentation errors in the future, in case the function ever gets renamed, for example. ACKs for top commit: laanwj: ACK cc3044ccdbefa9fae58d1762477e377883b39c5e Tree-SHA512: 882ff17836ef585a603dc504f3dd21f56f682e49b28a0998f23fd16025826fbb083b7978db3ee70d0e0ff2c86fd6c3fd99a2361e5d45c765fdc5822c5f14c0a7
2020-12-17Merge #20668: doc: warn that incoming conns are unlikely when not using ↵Wladimir J. van der Laan
default ports 010eed3ce03cf4fc622a48f40fc4d589383f7a44 doc: warn that incoming conns are unlikely when not using default ports (Adam Jonas) Pull request description: Closes #5150. This was mostly copied from #5285 by sulks, who has since quit GitHub. The issue has remained open for 6 years, but the extra explanation still seems useful. ACKs for top commit: laanwj: re-ACK 010eed3ce03cf4fc622a48f40fc4d589383f7a44 Tree-SHA512: d240fb06bba41ad8898ced59356c10adefc09f3abb33e277f8e2c5980b40678f2d237f286b476451bb29d2b94032a7dee2ada3b2efe004ed1c2509e70b48e40f
2020-12-17Merge #20677: doc: Remove shouty enums in net_processing commentsWladimir J. van der Laan
0c41c1083089efb158de828f97eb00e206f2869a doc: Remove shouty enums in net_processing comments (Suhas Daftuar) Pull request description: This uses the `CNode::ConnectionTypeAsString()` strings in place of the all-caps enums in a couple of comments in `net_processing`, as suggested by ajtowns in https://github.com/bitcoin/bitcoin/pull/19858#discussion_r540821050. ACKs for top commit: practicalswift: ACK 0c41c1083089efb158de828f97eb00e206f2869a jnewbery: ACK 0c41c1083089efb158de828f97eb00e206f2869a laanwj: ACK 0c41c1083089efb158de828f97eb00e206f2869a Tree-SHA512: c8ab905e151ebb144c3f878277dc59d77591e4b39632658407b69b80b80d65825d5a391b01e2aea6af2fdf174c143dfe7d2f3eba84a020a58d7926458fdcd0a5
2020-12-17Merge bitcoin-core/gui#153: Define MAX_DIGITS_BTC for magic number in ↵MarcoFalke
BitcoinUnits::format 198fff88f385e090b57a0ee902719bcc22a6b86b GUI: Define MAX_DIGITS_BTC for magic number in BitcoinUnits::format (Luke Dashjr) Pull request description: A magic number snuck in with https://github.com/bitcoin/bitcoin/pull/16432 ACKs for top commit: hebasto: ACK 198fff88f385e090b57a0ee902719bcc22a6b86b, I have reviewed the code and it looks OK, I agree it can be merged. kristapsk: utACK 198fff88f385e090b57a0ee902719bcc22a6b86b Tree-SHA512: 78dc23c2ae61bac41e5e34eebf57274599cb2ebb0b18d46e8a3228d42b256a1bc9bb17091c748f0f692ef1c4c241cfbd3e30a12bcd12222a234c1a9547ebe786
2020-12-16Merge #20575: Do not run functions with necessary side-effects in assert()Wladimir J. van der Laan
5021810650afc3073c2af6953ff046ad4d27a1fc Make CanFlushToDisk a const member function (practicalswift) 281cf995547f7683a9e9186bc6384a9fb6035d10 Do not run functions with necessary side-effects in assert() (practicalswift) Pull request description: Do not run functions with necessary side-effects in `assert()`. ACKs for top commit: laanwj: Code review ACK 5021810650afc3073c2af6953ff046ad4d27a1fc sipa: utACK 5021810650afc3073c2af6953ff046ad4d27a1fc theStack: Code Review ACK 5021810650afc3073c2af6953ff046ad4d27a1fc 🟢 Tree-SHA512: 38b7faccc2f16a499f9b7b1b962b49eb58580b2a2bbf63ea49dcc418a5ecc8f21a0972fa953f66db9509c7239af67cfa2f9266423fd220963d091034d7332b96
2020-12-16doc: Remove shouty enums in net_processing commentsSuhas Daftuar
2020-12-16Merge #20651: net: Make p2p recv buffer timeout 20 minutes for all peersMarcoFalke
ea36a453e3d06657679459e1168347648fa7c5c0 [net] Make p2p recv buffer timeout 20 minutes for all peers (John Newbery) Pull request description: The timeout interval for the send and recv buffers was changed from 90 minutes to 20 minutes in commit f1920e86 in 2013, except for peers that did not support the pong message (where the recv buffer timeout remained at 90 minutes). A few observations: - for peers that support BIP 31 (pong messages), this recv buffer timeout is almost redundant with the ping timeout. We send a ping message every two minutes, and set a timeout of twenty minutes to receive the pong response. If the recv buffer was really timing out, then the pong response would also time out. - BIP 31 is supported by all nodes of p2p version 60000 and higher, and has been in widespread use since 2013. I'd be very surprised if there are many nodes on the network that don't support pong messages. - The recv buffer timeout is not specified in any p2p BIP. We're free to set it at any value we want. - A peer that doesn't support BIP 31 and hasn't sent any message to us at all in 90 minutes is unlikely to be useful for us, and is more likely to be evicted AttemptToEvictConnection() since it'll have the worst possible ping time and isn't providing blocks/transactions. Therefore, we remove this check, and set the recv buffer timeout to 20 minutes for all peers. This removes the final p2p version dependent logic from the net layer, so all p2p version data can move into the net_processing layer. Alternative approaches: - Set the recv buffer timeout to 90 minutes for all peers. This almost wouldn't be a behaviour change at all (pre-BIP 31 peers would still have the same recv buffer timeout, and we can't ever reach a recv buffer timeout higher than 21 minutes for post-BIP31 peers, because the pong timeout would be hit first). - Stop supporting peers that don't support BIP 31. BIP 31 has been in use since 2012, and implementing it is trivial. ACKs for top commit: MarcoFalke: review ACK ea36a453e3d06657679459e1168347648fa7c5c0 promag: Code review ACK ea36a453e3d06657679459e1168347648fa7c5c0. practicalswift: cr ACK ea36a453e3d06657679459e1168347648fa7c5c0: patch looks correct ajtowns: ACK ea36a453e3d06657679459e1168347648fa7c5c0 sipa: utACK ea36a453e3d06657679459e1168347648fa7c5c0 jonatack: Code review ACK ea36a453e3d06657679459e1168347648fa7c5c0 Tree-SHA512: df290bb32d2b5d9e59a0125bb215baa92787f9d01542a7437245f1c478c7f9b9831e5f170d3cd0db2811e1b11b857b3e8b2e03376476b8302148e480d81aab19
2020-12-16Merge #20248: test: fix length of R check in key_signature_testsWladimir J. van der Laan
89895773b72275a620951730aef0b52e9437bc13 Fix length of R check in test/key_tests.cpp:key_signature_tests (Dmitry Petukhov) Pull request description: The code before the fix only checked the length of R value of the last signature in the loop, and only for equality (but the length can be less than 32) The fixed code checks that length of the R value is less than or equal to 32 on each iteration of the loop ACKs for top commit: laanwj: ACK 89895773b72275a620951730aef0b52e9437bc13 Tree-SHA512: 73eb2bb4a6c1c5fc11dd16851b28b43037ac06ef8cfc3b1f957429a1fca295c9422d67ec6c73c0e4bb4919f92e22dc5d733e84840b0d01ad1a529aa20d906ebf
2020-12-16wallettool: Add createfromdump commandAndrew Chow
Creates a new wallet file using the dump file produced by the dump command
2020-12-16wallettool: Add dump commandAndrew Chow
Adds a new dump command to bitcoin-wallet which prints out all of the wallet's records in hex.
2020-12-16Merge #20661: Only select from addrv2-capable peers for torv3 address relayWladimir J. van der Laan
37fe80e6267094f6051ccf9bec0c7f1a6b9e15da Only consider addrv2 peers for relay of non-addrv1 addresses (Pieter Wuille) 83f8821a6f41854edd5c0b11deabba658890cde1 refactor: add IsAddrCompatible() to CNode (Pieter Wuille) Pull request description: When selecting peers to relay an address to, only pick addrv2-capable ones if the address cannot be represented in addr(v1). Without this I expect that propagation of torv3 addresses over the cleartext network will be very hard for a while. ACKs for top commit: jonatack: ACK 37fe80e6267094f6051ccf9bec0c7f1a6b9e15da vasild: ACK 37fe80e6267094f6051ccf9bec0c7f1a6b9e15da Tree-SHA512: 18a854ea43ad473cf89b9c5193b524109d7af75c26f7aa7e26cd72ad0db52f19c8001d566c607a7e6772bc314f770f09b6c3e07282d110c5daea193edc592cd2
2020-12-16Merge #20365: wallettool: add parameter to create descriptors walletMarcoFalke
173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12 test: walettool create descriptors (Ivan Metlushko) 345e88eecf1b28607d5da3af38e19794a8a115ce wallettool: add param to create descriptors wallet (Ivan Metlushko) 6d3af3ab627096a824cb6a7ca1ebeddc7530361c wallettool: pass in DatabaseOptions into MakeWallet (Ivan Metlushko) Pull request description: Rationale: expose and promote descriptor wallets in more places; make cli tool more consistent with `createwallet` rpc. Add `-descriptors` parameter which is off by default. When specified it will create a new descriptors wallet with sqlite backend, which is consistent with `createwallet` rpc. This PR is based on a suggestion from **ryanofsky** https://github.com/bitcoin/bitcoin/pull/19137#discussion_r516779603 Example: ``` $ ./src/bitcoin-wallet -wallet=fewty -descriptors create Topping up keypool... Wallet info =========== Name: fewty Format: sqlite Descriptors: yes Encrypted: no HD (hd seed available): yes Keypool Size: 6000 Transactions: 0 Address Book: 0 ``` ``` $ ./src/bitcoin-wallet -wallet=fewty create Topping up keypool... Wallet info =========== Name: fewty Format: bdb Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2000 Transactions: 0 Address Book: 0 ``` ACKs for top commit: achow101: ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12 ryanofsky: Code review ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12. This seems pretty nicely implemented now, with opportunities to clean up more and dedup later MarcoFalke: Concept ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12 🌠 Tree-SHA512: cc32ba336ff709de2707ee15f495b4617908e8700ede8401a58e894f44cda485c544d644023c9a6604d88a62db9d92152383ee2e8abf691688c25cf6e222c622
2020-12-16Merge #20605: init: Signal-safe instant shutdownWladimir J. van der Laan
cd03513dc2fcccaa142e9632a28b38efd0056436 init: Signal-safe instant shutdown (Wladimir J. van der Laan) Pull request description: Replace the 200ms polling loop with a faster and more efficient waiting operation. This should speed up short RPC tests. This change has been tried a few times before, but abandoned every time because solutions used a condition variable which is not safe for use in signals, as they need to be reentrant. On UNIX-ish OSes, use a safe way: a pipe. When shutdown is requested write a dummy byte to the pipe. Waiting for shutdown is a matter of a blocking read from the pipe. On Windows, there are no signals so using a condition variable is safe. This only affects bitcoind. The GUI is unaffected by this change, and keeps polling as before in `BitcoinGUI::detectShutdown()`. It might be possible to listen to a pipe there, too, but I'm not sure, and it's complicated by the GUI-node abstraction. ACKs for top commit: jonatack: ACK cd03513dc2fcccaa142e9632a28b38efd0056436 tested on Debian 5.9.11-1 (2020-11-27) x86_64 GNU/Linux Tree-SHA512: ed2f532f69fec4855c17bf7b8f3d0eb96e78ee2a3c13d374dd2c6add06e3ad6a190da8ed8f9d7a76532cf998222d67f57e35b206aec29675e96437448ae7e13c