aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-11-12Merge #20375: fuzz: Improve coverage for CPartialMerkleTree fuzzing harnessMarcoFalke
3c77b8009de9457c356c0bf4362d11bb99a17bb7 fuzz: Improve coverage for CPartialMerkleTree fuzzing harness (practicalswift) Pull request description: Improve coverage for `CPartialMerkleTree` fuzzing harness. 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: ACK 3c77b8009de9457c356c0bf4362d11bb99a17bb7 Tree-SHA512: a1fa0f7650a5ee5ff83f35e41b9faf6c34671fc304b9af00e5b83073f21d50bcbe91c2428fa64d05dc42a7c521bfd24031e307c7f4abf9ded469d69a55c5d64a
2020-11-12Merge #20372: Avoid signed integer overflow when loading a mempool.dat file ↵MarcoFalke
with a malformed time field ee11a412a537f62aa46e8862678ce2069a2df5b7 Avoid signed integer overflow when loading a mempool.dat file with a malformed time field (practicalswift) Pull request description: Avoid signed integer overflow when loading a `mempool.dat` file with a malformed time field. Avoid the following signed integer overflow: ``` $ xxd -p -r > mempool.dat-crash-1 <<EOF 0100000000000000000000000004000000000000000000000000ffffffff ffffff7f00000000000000000000000000 EOF $ cp mempool.dat-crash-1 ~/.bitcoin/regtest/mempool.dat $ UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1:report_error_type=1" src/bitcoind -regtest validation.cpp:5079:23: runtime error: signed integer overflow: 9223372036854775807 + 1209600 cannot be represented in type 'long' #0 0x5618d335197f in LoadMempool(CTxMemPool&) src/validation.cpp:5079:23 #1 0x5618d3350df3 in CChainState::LoadMempool(ArgsManager const&) src/validation.cpp:4217:9 #2 0x5618d2b9345f in ThreadImport(ChainstateManager&, std::vector<boost::filesystem::path, std::allocator<boost::filesystem::path> >, ArgsManager const&) src/init.cpp:762:33 #3 0x5618d2b92162 in AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*)::$_14::operator()() const src/init.cpp:1881:9 ``` This PR was broken out from PR #20089. Hopefully this PR is trivial to review. Fixes a subset of #19278. ACKs for top commit: MarcoFalke: review ACK ee11a412a537f62aa46e8862678ce2069a2df5b7 Crypt-iQ: crACK ee11a412a537f62aa46e8862678ce2069a2df5b7 Tree-SHA512: 227ab95cd7d22f62f3191693b455eacfa8e36534961bee12c622fc9090957cfb29992eabafa74d806a336e03385aa8f98b7ce734f04b0b400e33aa187d353337
2020-11-12Remove references to CreateWalletFromFilefanquake
CWallet::CreateWalletFromFile() was removed in 8b5e7297c02f3100a9cb27bfe206e3fc617ec173 but these references remain.
2020-11-12Merge #19502: Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file ↵Samuel Dobson
checks 24d2d3341d07509ad3f37bb6f130446ad20ac807 QA: wallet_multiwallet: Check that recursive symlink directory and wallet.dat loops are ignored (Luke Dashjr) 69f59af54d15ee9800d5df86bcdb0e962c71e7c3 Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks (Luke Dashjr) Pull request description: Previously, an exception would be thrown, which could kill the node in some circumstances. Includes test changes to cause failure. Review with `?w=1` ACKs for top commit: hebasto: re-ACK 24d2d3341d07509ad3f37bb6f130446ad20ac807, rebased only since my [previous](https://github.com/bitcoin/bitcoin/pull/19502#pullrequestreview-520552944) review. promag: Tested ACK 24d2d3341d07509ad3f37bb6f130446ad20ac807, test change fails on master. meshcollider: utACK 24d2d3341d07509ad3f37bb6f130446ad20ac807 Tree-SHA512: f701f81b3aa3d3e15cee52ac9e7c31a73c0d8166e56bf077235294507cbcee099829fedc432a1c4b6d8780885f4e37897b44b980b08125771de3c849c000499e
2020-11-11fuzz: Improve coverage for CPartialMerkleTree fuzzing harnesspracticalswift
2020-11-11Merge #20344: wallet: fix scanning progress calculation for single block rangeMarcoFalke
5e146022daa4336de94447e5b8e5418296286927 wallet: fix scanning progress calculation for single block range (Sebastian Falbesoner) Pull request description: If the blockchain is rescanned for a single block (i.e. start and stop hashes are equal, and with that also the estimated start/stop verification progress values) the progress calculation could lead to a NaN value caused by a division by zero (0.0/0.0), resulting in an invalid JSON result for the `getwalletinfo` RPC. This PR fixes this behaviour by setting the progress to zero in that special case. Fixes #20297. The behaviour can easily be reproduced by continuously running single block rescans in an endless loop, e.g. via ```bash #!/bin/bash while true do bitcoin-cli rescanblockchain $(bitcoin-cli getblockcount) done ``` and at the same time perform some `getwalletinfo` RPCs. On the master branch, this leads to frequent invalid responses (tested on mainchain): ``` $ bitcoin-cli getwalletinfo error: couldn't parse reply from server $ curl --user `cat ~/.bitcoin/.cookie` --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ {"result":{"walletname":"","walletversion":169900,"format":"bdb","balance":0.00000000,"unconfirmed_balance":0.00000000,"immature_balance":0.00000000,"txcount":0,"keypoololdest":1603677276,"keypoolsize":1000,"hdseedid":"3196e33ecb47c7130e6ca60f2f895f9259860dca","keypoolsize_hd_internal":1000,"paytxfee":0.00000000,"private_keys_enabled":true,"avoid_reuse":false,"scanning":{"duration":0,"progress":},"descriptors":false},"error":null,"id":"curltest"} ``` (note that missing value for "progress" in the JSON result). On the PR branch, the behaviour doesn't occur anymore. ACKs for top commit: MarcoFalke: review ACK 5e146022daa4336de94447e5b8e5418296286927 promag: Core review ACK 5e146022daa4336de94447e5b8e5418296286927. Tree-SHA512: f0e6aad5a6cd08b36c5fe820fff0ef26663229b39169a4dbe757f3c795a41cf5c69c9dc90efe7515675ae1059307f8971123781a0514d10704123a6f28b125ab
2020-11-11Avoid signed integer overflow when loading a mempool.dat file with a ↵practicalswift
malformed time field
2020-11-11wallet: fix scanning progress calculation for single block rangeSebastian Falbesoner
If the blockchain is rescanned for a single block (i.e. start and stop hashes are equal, and with that also the estimated verification progress) the progress calculation could lead to a NaN value caused by a division by zero, resulting in an invalid JSON result for the getwalletinfo RPC. Fixed by setting the progress to zero in that special case. Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2020-11-10Merge #20332: test: Mock IBD in net_processing fuzzersMarcoFalke
fa4234d877ea3193bfd0e18ff68dcb8fb84b47b5 test: Mock IBD in net_processing fuzzers (MarcoFalke) Pull request description: Without this the fuzzers fail to detect trivial crasher bugs, such as https://github.com/bitcoin/bitcoin/pull/20317#issuecomment-723047111 ACKs for top commit: practicalswift: Tested ACK fa4234d877ea3193bfd0e18ff68dcb8fb84b47b5 Tree-SHA512: ce5da5c0a604b7559805a98ffdde882b44ca4f91b003b493d6e1be230714ce4cccb11dbfc1fc175f9d8fc779551c0a4103ceb4b473552928207d7d78ae329e10
2020-11-10Merge #20355: fuzz: Check for addrv1 compatibility before using addrv1 ↵MarcoFalke
serializer/deserializer on CSubNet 79b8f8d5749fc676d9eeca0296172b7cdbbf2238 fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CService (practicalswift) 0e3a78a8ab7ab5da71bd5e2f428ec3a2c9ad0901 fuzz: Check for addrv1 compatibility before using addrv1 serializer/deserializer on CSubNet (practicalswift) Pull request description: Check for `addrv1` compatibility before using `addrv1` serializer/deserializer on `CSubNet`. As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/20289#issuecomment-724012969. Assert roundtrip equality for both `addrv1` and `addrv2` versions of `CService`. ACKs for top commit: MarcoFalke: review ACK 79b8f8d5749fc676d9eeca0296172b7cdbbf2238 Tree-SHA512: 3f758aa89ab0c253b593fbe8fe9adc5c6db9afec8856facfe635053a32b4feb438c951323ae0c9e27f1d7e89d12a9b62d81f094dc96159233c12f64d4b95c290
2020-11-09Merge #20153: wallet: do not import a descriptor with hardened derivations ↵Wladimir J. van der Laan
into a watch-only wallet 538be4219ae7e65862e4aff540af88c9421e6061 wallet: fix importdescriptor silent fail (Ivan Metlushko) Pull request description: Currently `importdescriptor` command will successfully import a descriptor with hardened derivations into a watch-only wallet while silently failing to expand the descriptor to fill the cache. This leads to a broken wallet state and failure to load such wallet due to missing cache on subsequent restart. ACKs for top commit: laanwj: Code review ACK 538be4219ae7e65862e4aff540af88c9421e6061 achow101: ACK 538be4219ae7e65862e4aff540af88c9421e6061 meshcollider: utACK 538be4219ae7e65862e4aff540af88c9421e6061 Tree-SHA512: 4bdd0ab4437d55b3f1a79c3a300a0b186089155c020fe220a73d0cce274de47d90371d88918d39fd795f9fccf8db328f1e322d29a6062f9ce94a1c254398f004
2020-11-09Merge #20120: net, rpc, test, bugfix: update GetNetworkName, ↵Wladimir J. van der Laan
GetNetworksInfo, regression tests 7b5bd3102e06f7ff34b5d0f1d45a005560f265a5 test: add getnetworkinfo network name regression tests (Jon Atack) 9a75e1e5697476058b56cd8014a36de31bfecd4c rpc: update GetNetworksInfo() to not return unsupported networks (Jon Atack) ba8997fb2eda73603ce457bfec668cb7e0acbc89 net: update GetNetworkName() with all enum Network cases (Jon Atack) Pull request description: Following up on the BIP155 addrv2 changes, and starting with 7be6ff6 in #19845, RPC getnetworkinfo began returning networks with empty names. <details><summary><code>getnetworkinfo</code> on current master</summary><p> ``` "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": false, "reachable": true, "proxy": "127.0.0.1:9050", "proxy_randomize_credentials": true }, { "name": "", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false } ], ``` </p></details> <details><summary><code>getnetworkinfo</code> on this branch</summary><p> ``` "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": false, "reachable": true, "proxy": "127.0.0.1:9050", "proxy_randomize_credentials": true } ], ``` </p></details> This patch: - updates `GetNetworkName()` to the current Network enum - updates `getNetworksInfo()` to ignore as-yet unsupported networks - adds regression tests ACKs for top commit: hebasto: re-ACK 7b5bd3102e06f7ff34b5d0f1d45a005560f265a5 vasild: ACK 7b5bd3102 Tree-SHA512: 8f12363eb430e6f45e59e3b1d69c2f2eb5ead254ce7a67547d116c3b70138d763157335a3c85b51f684a3b3b502c6aace4f6fa60ac3b988cf7a9475a7423c4d7
2020-11-09fuzz: Assert roundtrip equality for both addrv1 and addrv2 versions of CServicepracticalswift
2020-11-09fuzz: Check for addrv1 compatibility before using addrv1 ↵practicalswift
serializer/deserializer on CSubNet
2020-11-09Merge #20266: wallet: fix change detection of imported internal descriptorsWladimir J. van der Laan
bd93fc9945bfd4be117990c5d861f61ddd451f96 Fix change detection of imported internal descriptors (Andrew Chow) Pull request description: Import internal descriptors were having address book entries added which meant they would be detected as non-change. Fix this and add a test for it. ACKs for top commit: laanwj: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96 meshcollider: utACK bd93fc9945bfd4be117990c5d861f61ddd451f96 promag: Code review ACK bd93fc9945bfd4be117990c5d861f61ddd451f96. Tree-SHA512: 8fa9e364be317627ec171eedffdb505976c0e7f1e55bc7e8cfdffa3aeea5db24d231f55166602cd0e97a5ba621acc871de0a765c75d0c65678f83e93c3b657c5
2020-11-07test: Mock IBD in net_processing fuzzersMarcoFalke
2020-11-06Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checksLuke Dashjr
2020-11-05wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabaseMarcoFalke
2020-11-05Merge #20308: wallet: Set bilingual error completelyMarcoFalke
090b8385af818e1df122aacdd6d71bd37c8fffa7 Set bilingual error completely (Hennadii Stepanov) Pull request description: Fix https://github.com/bitcoin-core/gui/issues/128 ACKs for top commit: MarcoFalke: review ACK 090b8385af818e1df122aacdd6d71bd37c8fffa7 practicalswift: ACK 090b8385af818e1df122aacdd6d71bd37c8fffa7: patch looks correct! Tree-SHA512: ef400291a866c3116377a4439a23de89a1c5e3ef4597d682138f88d90612846aabb31228b98a8722e7f58b4b499a58adc732bc40ac28fae6d18fce1d4953c96a
2020-11-05Merge #20302: net: Make it easier to reason about node eviction by removing ↵MarcoFalke
unused NodeEvictionCandidate::addr (CAddress) f1f433e8ca014f69925e8d5487877e06ca784ec8 Make it easier to reason about node eviction by removing unused NodeEvictionCandidate::addr (CAddress) (practicalswift) Pull request description: Make it easier to reason about node eviction by removing unused `NodeEvictionCandidate::addr` (`CAddress`). ACKs for top commit: jnewbery: utACK f1f433e8ca014f69925e8d5487877e06ca784ec8 Tree-SHA512: fef91d7b412b8a4f172370cff6c37eb8c3db0ba618f5daf2dcc8737c8fcef7b9b820d7ee99cd0a9eae7dd653a096cf83d5113776b0d1d9a324147581674e9ede
2020-11-05Set bilingual error completelyHennadii Stepanov
2020-11-05Merge #20303: fuzz: Assert expected DecodeHexTx behaviour when using legacy ↵MarcoFalke
decoding d7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 fuzz: Assert expected DecodeHexTx behaviour when using legacy decoding (practicalswift) Pull request description: Assert expected `DecodeHexTx` behaviour when using legacy decoding. As suggested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/20290#issuecomment-720989597. ACKs for top commit: MarcoFalke: review ACK d7901ab8d2fdd2f6e68c4fa48078111bf5f0fa73 Tree-SHA512: 3285680059e6fa73b0fb2c52b775f6319de1ac616f731206662b742764dc888cdfd1ac1f1fcfdfd5418d2006475a852d1c1a56a7035f772f0a6b2a84f5de93bc
2020-11-05Merge #20199: wallet: ignore (but warn) on duplicate -wallet parametersMarcoFalke
58cfbc38e040925b51cb8d35d23b50e9cf06fb2a Ignoring (but warn) on duplicate -wallet parameters (Jonas Schnelli) Pull request description: I expect that there are many users with load on startup wallet definitions in `bitcoin.conf` or via startup CLI argument. With the new `settings.json` r/w configuration file, users unloading and loading a wallet through the GUI or via the RPC calls might end up with a duplicate `-wallet` entry (one that still remains in bitcoin.conf or CLI) plus the new duplication in `settings.json` due to the unload/load. Steps to reproduce * create wallet (if via RPC set `load_on_startup` or unloadwallet/loadwallet then set `load_on_startup`). * stop bitcoin * start bitcoind again with same `--wallet=mywallet` I guess it is acceptable to skip duplicates. ACKs for top commit: achow101: Tested ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a meshcollider: Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a ryanofsky: Code review ACK 58cfbc38e040925b51cb8d35d23b50e9cf06fb2a. Changes since previous review: rebased, tweaked warning message, squashed/fixed test Tree-SHA512: f94e5a999bdd7dc291f0bc142911b0a8033929350d6f6a35b58c4a06a3c8f83147be0f0c402d4e946dedbbcc85b7e023b672c731b6d7a8984d4780017c961cfb
2020-11-04fuzz: Assert expected DecodeHexTx behaviour when using legacy decodingpracticalswift
2020-11-04Merge #20300: fuzz: Add missing ECC_Start to descriptor_parse testMarcoFalke
5cafe2b25c1d2f6825b3c8103c280020929dd645 fuzz: Add missing ECC_Start to descriptor_parse test (Ivan Metlushko) Pull request description: Fixes fuzzing harness. I also observed that the corpus for this test consists only of `xprv...` keys while we are using regtest parameters. So for proper fuzzing we need either A) to update the corpus and replace `xprv...` with `tprv...` B) switch to main net in the test ACKs for top commit: MarcoFalke: review ACK 5cafe2b25c1d2f6825b3c8103c280020929dd645 practicalswift: Tested ACK 5cafe2b25c1d2f6825b3c8103c280020929dd645 Tree-SHA512: 7415a98a445ce0f96219637d2362fecfc1191ad104f55d79ca92b0c92cde165e00646be5bf3fda956385e3cb22540eca457e575048493367cdf0e00a27d7cdb8
2020-11-04fuzz: Add missing ECC_Start to descriptor_parse testIvan Metlushko
2020-11-04Merge #20212: net: fix output of peer address in version messageMarcoFalke
af3b0dfc5463c42fb9bff39f020fc1728ed44bc7 net: fix output of peer address in version message (Vasil Dimov) Pull request description: If `-logips -debug=net` is specified then we print the contents of the version message we send to the peer, including his address. Because the addresses in the version message use pre-BIP155 encoding they cannot represent a Tor v3 address and we would actually send 16 `0`s instead (a dummy IPv6 address). However we would print the full address in the log message. Before this fix: ``` 2020-10-21T12:24:17Z send version message: version 70016, blocks=653500, us=[::]:0, them=xwjtp3mj427zdp4tljiiivg2l5ijfvmt5lcsfaygtpp6cw254kykvpyd.onion:8333, peer=0 ``` This is confusing because we pretend to send one thing while we actually send another. Adjust the printout to reflect what we are sending. After this fix: ``` 2020-10-21T12:26:54Z send version message: version 70016, blocks=653500, us=[::]:0, them=[::]:0, peer=0 ``` ACKs for top commit: MarcoFalke: review ACK af3b0dfc5463c42fb9bff39f020fc1728ed44bc7 jnewbery: utACK af3b0dfc5463c42fb9bff39f020fc1728ed44bc7 Tree-SHA512: f169d7b4f07c219e541f7c37ea23b82c77e50085fc72ec62f1dd46970389916e177268d07d45c7be94dd209d1903f8f23eaff62b7fa782f6057dd36bb96bba82
2020-11-04Make it easier to reason about node eviction by removing unused ↵practicalswift
NodeEvictionCandidate::addr (CAddress)
2020-11-04Merge #20245: test: Run script_assets_test even if built --with-libs=noMarcoFalke
fa3967efdb07f1d22372f4ee2e602ea1fad04a57 test: Replace ARRAYLEN with C++11 ranged for loop (MarcoFalke) fafc5290538fde76c3780976f4b2c11dc9f24d19 test: Run AssetTest even if built --with-libs=no (MarcoFalke) faf58ab139949ca35b33217d010b350c9a59c61d ci: Add --with-libs=no to one ci config (MarcoFalke) Pull request description: `script_assets_test` doesn't call libbitcoinconsensus, so it seems confusing to require it ACKs for top commit: fanquake: ACK fa3967efdb07f1d22372f4ee2e602ea1fad04a57 - looks ok to me. Tree-SHA512: 8744fef64c5d7dc19a0ef4ae9b3df5b3f356253bf000f12723064794c5e50df071824d436059985f1112d94c1b530b65cbeb6b8435114a91b195480620eafc59
2020-11-04Merge #20220: wallet, rpc: explicit fee rate follow-ups/fixes for 0.21Samuel Dobson
0be29000c011dec0722481dbebb159873da6fa54 rpc: update conf_target helps for correctness/consistency (Jon Atack) 778b9be40667876c705e586849ea9c9e44cf451c wallet, rpc: fix send subtract_fee_from_outputs help (Jon Atack) 603c0050837ec65765208dd54dde354145fbe098 wallet: add rpc send explicit fee rate coverage (Jon Atack) dd341e602d5160fc621c0299179b91403756b61d wallet: add sendtoaddress/sendmany explicit fee rate coverage (Jon Atack) 44e7bfa60313e4ae67da49e5ba4535038b71b453 wallet: add walletcreatefundedpsbt explicit fee rate coverage (Jon Atack) 6e1ea4273e52fdcd86c87628aa595c03a071ca8c test: refactor for walletcreatefundedpsbt fee rate coverage (Jon Atack) 3ac7b0c6f1c68e74a84d868a454f508bada6b09d wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget() (Jon Atack) 2d8eba8f8425a2515022d51f1f5b4911329fbf55 wallet: combine redundant bumpfee invalid params and args tests (Jon Atack) 1697a40b6f841a54ee0d9744ed7fd09034b0ddad wallet: improve bumpfee error/help, add explicit fee rate coverage (Jon Atack) fc5721723d34f76f9e1ffd2e31f274ea6b22f894 wallet: fix SetFeeEstimateMode() error message (Jon Atack) 052427eef1c9da84c474c5161b1910d3328ef0da wallet, bugfix: fix bumpfee with explicit fee rate modes (Jon Atack) Pull request description: Follow-up to #11413 providing a base to build on for #19543: - bugfix for `bumpfee` raising a JSON error with explicit feerates, fixes issue #20219 - adds explicit feerate test coverage for `bumpfee`, `fundrawtransaction`, `walletcreatefundedpsbt`, `send`, `sendtoaddress`, and `sendmany` - improves a few related RPC error messages and `ParseConfirmTarget()` / error message - fixes/improves the explicit fee rate information in the 6 RPC helps, of which 2 were also missing `conf_target` sat/B units This provides a spec and regression coverage for the potential next step of a universal `sat/vB` feerate argument (see #19543), as well as immediate coverage and minimum fixes for 0.21. ACKs for top commit: kallewoof: Concept/Tested ACK 0be29000c011dec0722481dbebb159873da6fa54 meshcollider: Code review + functional test run ACK 0be29000c011dec0722481dbebb159873da6fa54 Tree-SHA512: efd965003e991cba51d4504e2940f06ab3d742e34022e96a673606b44fad85596aa03a8c1809f06df7ebcf21a38e18a891e54392fe3d6fb4d120bbe4ea0cf5e0
2020-11-04Merge #20282: wallet: change upgradewallet return type to be an objectSamuel Dobson
2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 [wallet] Return object from upgradewallet RPC (Sishir Giri) Pull request description: Change the return type of upgradewallet to be an object for future extensibility. Also return any error string returned from the `UpgradeWallet()` function. ACKs for top commit: MarcoFalke: ACK 2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 meshcollider: Tested ACK 2ead31fb1b17c9b183a4b81f0ae4f48e5cf67d64 Tree-SHA512: bcc7432d2f35093ec2463ea19e894fa885b698c0e8d8e4bd2f979bd4d722cbfed53ec589d6280968917893c64649dc9e40800b8d854273b0f9a1380f51afbdb1
2020-11-03Merge #20237: net: Hardcoded seeds update for 0.21Wladimir J. van der Laan
6866259fabd8580c92693703d80773428aca8175 net: Hardcoded seeds update for 0.21 (Wladimir J. van der Laan) 36e875b4c5f0812868e34beba7be4aa1f7a00773 contrib: Add new versions to makeseeds.py and update gitignore (RandyMcMillan) Pull request description: Stats: ``` IPv4 IPv6 Onion Pass 426728 59523 7900 Initial 426728 59523 7900 Skip entries with invalid address 426728 59523 7900 After removing duplicates 426727 59523 7900 Skip entries from suspicious hosts 123226 51785 7787 Enforce minimal number of blocks 121710 51322 7586 Require service bit 1 4706 1427 3749 Require minimum uptime 4124 1098 3681 Require a known and recent user agent 4033 1075 3681 Filter out hosts with multiple bitcoin ports 512 140 512 Look up ASNs and limit results per ASN and per net ``` I've credited RandyMcMillan for the first commit because of #20190. There are at least enough onions this time! Number of IPv6 nodes that pass all the requirements seems similar to last time in #18506. For the next major release we'll want TORv3 hardcoded peers as well. This makes no sense now as there are hardly any. But it'd make sense to think about how to collect them because they cannot come from the DNS seeds. ### Reviewing ``` 2020-10-28 12:04:45 jnewbery wumpus: Do you have any suggestions for how to review #20237 ? 2020-10-28 12:28:37 wumpus jnewbery: previous PRs like it might be a guide there (#18506, #16999), e.g. people could try to repeat the last step in https://github.com/bitcoin/bitcoin/tree/master/contrib/seeds#seeds and see if it ends up with the same .h file, you could also repeat the entire process but as the list of peers from the seeder will be different every time that will give a (slightly, hopefully) 2020-10-28 12:28:37 wumpus different output 2020-10-28 12:49:40 wumpus testing what part of the peers are connectable is also useful 2020-10-28 12:51:05 wumpus or to go deeper, whether most part of the nodes are 'good nodes' and not say spy nodes, but i don't know what means of testing ``` ACKs for top commit: jonatack: ACK 6866259fabd8580c92693703d80773428aca8175 Tree-SHA512: 6b913ec92932de03304301a0cbf7b4a912ed09d890b019deeb449b8fa787c4994222368c6bf08b3c6e2bfa474442612e1c9de9327ec46ba59c37a5f38af50c75
2020-11-03Ignoring (but warn) on duplicate -wallet parametersJonas Schnelli
2020-11-03Merge #20290: fuzz: Fix DecodeHexTx fuzzing harness issueMarcoFalke
28f8cb13d4d5a3d6aefa6e192e55f9aa87579e52 fuzz: Fix DecodeHexTx fuzzing harness issue (practicalswift) Pull request description: Fix `DecodeHexTx` fuzzing harness issue. Before this patch: ``` $ src/test/fuzz/decode_tx decode_tx: test/fuzz/decode_tx.cpp:29: void test_one_input(const std::vector<uint8_t> &): Assertion `result_try_witness_and_maybe_no_witness' failed. … ``` After this patch: ``` $ src/test/fuzz/decode_tx … ``` ACKs for top commit: MarcoFalke: review ACK 28f8cb13d4d5a3d6aefa6e192e55f9aa87579e52 Tree-SHA512: 2ed11b2f00a4c6fa3e8eea76a2a37d89a4b8d52815264676fe3de0a26ad7906cfafda9b843ceede2fd428815472e01fd1f87afb851282a8c7839bd4c87dc382b
2020-11-03Merge #20289: fuzz: Check for addrv1 compatibility before using addrv1 ↵MarcoFalke
serializer/deserializer on CService c2cf8a18c25bf19ade51fedfa5c352bd7145edb0 fuzz: Check for addrv1 compatibility before using addrv1 serializer on CService (practicalswift) Pull request description: Check for addrv1 compatibility before using addrv1 serializer/deserializer on `CService`: Before this patch: ``` $ src/test/fuzz/service_deserialize service_deserialize: test/fuzz/deserialize.cpp:85: void (anonymous namespace)::AssertEqualAfterSerializeDeserialize(const T &, const int) [T = CService]: Assertion `Deserialize<T>(Serialize(obj, version)) == obj' failed. ``` After this patch: ``` $ src/test/fuzz/service_deserialize … ``` Related change: #20247 ACKs for top commit: MarcoFalke: review ACK c2cf8a18c25bf19ade51fedfa5c352bd7145edb0 Tree-SHA512: dba6ddc60e8ef621011d844281461f1741de08c4af1a2b7156c810af44306cef7ec582de5974752db02ca085cfd23da0296d70b694e59ee262589d829fa0626e
2020-11-03Merge #20187: Addrman: test-before-evict bugfix and improvements for ↵fanquake
block-relay-only peers 16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751 Avoid test-before-evict evictions of current peers (Suhas Daftuar) e8b215a086d91a8774210bb6ce8d1560aaaf0789 Refactor test for existing peer connection into own function (Suhas Daftuar) 4fe338ab3ed73b3ffb20eedf95500c56ec2920e1 Call CAddrMan::Good() on block-relay-only peer addresses (Suhas Daftuar) daf55531260833d597ee599e2d289ea1be0b1d9c Avoid calling CAddrMan::Connected() on block-relay-only peer addresses (Suhas Daftuar) Pull request description: This PR does two things: * Block-relay-only interaction with addrman. * Calling `CAddrMan::Connected()` on an address that was a block-relay-only peer causes the time we report in `addr` messages containing that peer to be updated; particularly now that we use anchor connections with a our block-relay-only peers, this risks leaking information about those peers. So, stop this. * Avoiding calling `CAddrMan::Good()` on block-relay-only peer addresses causes the addrman logic around maintaining the new and tried table to be less good, and in particular makes it so that block-relay-only peer addresses are more likely to be evicted from the addrman (for no good reason I can think of). So, mark those addresses as good when we connect. * Fix test-before-evict bug. There's a bug where if we get a collision in the tried table with an existing address that is one of our current peers, and the connection is long-lived enough, then `SelectTriedCollisions()` might return that existing peer address to us as a test-before-evict connection candidate. However, our logic for new outbound connections would later prevent us from actually making a connection; the result would be that when we get a collision with a long-lived current peer, that peer's address is likely to get evicted from the tried table. Fix this by checking to see if a test-before-evict candidate is a peer we're currently connected to, and if so, mark it as `Good()`. ACKs for top commit: sipa: utACK 16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751 amitiuttarwar: code review ACK 16d9bfc417 mzumsande: Code-Review ACK 16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751. jnewbery: utACK 16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751 ariard: Code Review ACK 16d9bfc. jonatack: Tested ACK 16d9bfc4172b4f6ce24a3cd1a1cfa3933cd26751 Tree-SHA512: 188ccb814e436937cbb91d29d73c316ce83f4b9c22f1cda56747f0949a093e10161ae724e87e4a2d85ac40f85f5f6b4e87e97d350a1ac44f80c57783f4423324
2020-11-02fuzz: Fix DecodeHexTx fuzzing harness issuepracticalswift
2020-11-02fuzz: Check for addrv1 compatibility before using addrv1 serializer on CServicepracticalswift
2020-11-02Merge #20263: Update assumed chain paramsWladimir J. van der Laan
fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 Update assumed chain params (MarcoFalke) Pull request description: > Oh, by the way, the same procedure as last year, Miss Sophie? > Same procedure as every year, James. See https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-branch-off ACKs for top commit: jonatack: ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 per `git diff fa0c1b5 fa90ba3` and re-running getblockheader/getblockhash/getchaintxstats on the signet chain dergoegge: ACK https://github.com/bitcoin/bitcoin/commit/fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 - mainnet and testnet data matches my node. theStack: re-ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 ✔️ darosior: re-ACK fa90ba36d3f640ef2d559b69ae1ea99a73da6ac8 for mainnet and testnet. Tree-SHA512: 83044cc59d9fc873cb29f13008d00b54cb4bb4646c1ca53ab4f429e7333a32402becb888d3be117d390c1297c2f7d083f77ae12ac8633265edceb3cfefac087f
2020-11-02Merge #20165: Only relay Taproot spends if next block has it activeMarcoFalke
3d0556d41087f945ed0a47a5d770076ad42ce432 Increase feature_taproot inactive test coverage (Pieter Wuille) 525cbd425e2f6a1dbd0febc53d7ada22cec4661f Only relay Taproot spends if next block has it active (Pieter Wuille) Pull request description: There should be no change to mempool transaction behavior for witness v1 transactions as long as no activation is defined. Until that point, we should treat the consensus rules as under debate, and for soft-fork safety, that means spends should be treated as non-standard. It's possible to go further: don't relay them unless the consensus rules are actually active for the next block. This extends non-relay to the period where a deployment is defined, started, locked in, or failed. I see no downsides to this, and the code change is very simple. ACKs for top commit: Sjors: utACK 3d0556d41087f945ed0a47a5d770076ad42ce432 MarcoFalke: review ACK 3d0556d41087f945ed0a47a5d770076ad42ce432 🏓 jnewbery: utACK 3d0556d41087f945ed0a47a5d770076ad42ce432 Tree-SHA512: ca625a2981716b4b44e8f3722718fd25fd04e25bf3ca1684924b8974fca49f7c1d438fdd9dcdfbc091a442002e20d441d42c41a0e2096e74a61068da6c60267a
2020-11-02[wallet] Return object from upgradewallet RPCSishir Giri
2020-11-02Update assumed chain paramsMarcoFalke
2020-11-02Merge #20281: docs: Correct getblockstats documentation for (sw)total_weightMarcoFalke
5d9917464a7987ebe82e1355015d1c6f4cb91657 docs: Correct getblockstats documentation for (sw)total_weight (Nadav Ivgi) Pull request description: ACKs for top commit: MarcoFalke: ACK 5d9917464a7987ebe82e1355015d1c6f4cb91657 Tree-SHA512: eb9e8f05c61d5363cf698f0b9b51ff42557e783be64c6a814cd8f4073499ff0cbfe00528b12cc0f5e4de245458a62cbd30eb817a7d1e020ee3cbfa83a95eb550
2020-11-02Merge #20230: wallet: Fix bug when just created encrypted wallet cannot get ↵Samuel Dobson
address bf6855a9096b25aa75bba61b57ee1b2433d49707 wallet: Fix bug when just created encrypted wallet cannot get address (Hennadii Stepanov) Pull request description: Fix https://github.com/bitcoin-core/gui/issues/105 ACKs for top commit: achow101: Tested ACK bf6855a9096b25aa75bba61b57ee1b2433d49707 kristapsk: ACK bf6855a9096b25aa75bba61b57ee1b2433d49707 meshcollider: Tested ACK bf6855a9096b25aa75bba61b57ee1b2433d49707 Tree-SHA512: eca0ab306d7206f2e5db568e83217bd854caac104379f4d8fb261db832d4d6310cbb1eab44ce9b05a5ac2eb5879a623b729752a88810f8370c24518a8d81292d
2020-11-02Merge #20271: doc: Document that wallet salvage is experimentalSamuel Dobson
fab94534b64593be1620c989bf69eb02e1be9b1b doc: Document that wallet salvage is experimental (MarcoFalke) Pull request description: See #20151 ACKs for top commit: practicalswift: ACK fab94534b64593be1620c989bf69eb02e1be9b1b: user safety first hebasto: ACK fab94534b64593be1620c989bf69eb02e1be9b1b, maybe capitalize into "WARNING"? meshcollider: Trivial ACK fab94534b64593be1620c989bf69eb02e1be9b1b Tree-SHA512: 94912c491facc485293e4333066057933d706d84c7172f615296e7ba998c583c8bd07e751e6f00cd6576e7791007ace321f959181f7bf6a4e15e10d7ec8a1b7e
2020-11-02Merge #20080: Strip any trailing `/` in -datadir and -blocksdir pathsSamuel Dobson
ad5cef5dfdd5802fc187a52e74d940a52f420a51 doc: Update data directory path comments (Hennadii Stepanov) b19e88230f0e93e95e883e65376963cb9c36f606 util: Add StripRedundantLastElementsOfPath function (Hennadii Stepanov) Pull request description: Wallet names in `listwalletdir` RPC are correct now, even if the `-datadir` path has any number of trailing `/`. This PR is an alternative to #19933. Fixes #19928. ACKs for top commit: MarcoFalke: review ACK ad5cef5dfd 🔙 promag: Code review ACK ad5cef5dfdd5802fc187a52e74d940a52f420a51. meshcollider: Code review + test run ACK ad5cef5dfdd5802fc187a52e74d940a52f420a51 Tree-SHA512: bccabbd6c18243d48d15b2b27201cc0f5984623dcbc635c8740cf74523f359844c36eadd40391142874fcf452a43880bb6afbf89815ae736e499f9a98143a661
2020-11-01docs: Correct getblockstats documentation for (sw)total_weightNadav Ivgi
2020-10-30Only relay Taproot spends if next block has it activePieter Wuille
2020-10-30doc: Document that wallet salvage is experimentalMarcoFalke
2020-10-29Fix change detection of imported internal descriptorsAndrew Chow