aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-28Merge #18805: tests: Add missing sync_all to wallet_importdescriptors.pyMarcoFalke
7b2b06dfe3061b5ab4a283245930e2f7773eb3ef tests: Add missing sync_all to wallet_importdescriptors.py (Andrew Chow) Pull request description: node1 will sometimes do sendtoaddress before it has received a funding transaction which will cause the test to fail. sync_all to ensure it gets the transaction first. Fixes #18800 ACKs for top commit: instagibbs: ACK 7b2b06d The wallet endpoint right after is indeed node 1. Tree-SHA512: b610a771d062b5f955cd70b34337577a1ab8dacbf4be20aa74e1e8234495b0be9faff138eb1713f29decb5574446e0583e221bc2c9a6eea13611b422ea3a296a
2020-04-28Merge #18765: test: Fix wallet_bumpfee intermittent errorMarcoFalke
fa301fec966b77c54d02ac54ae7d726629adbfd5 test: Fix wallet_bumpfee intermittent error (MarcoFalke) Pull request description: Remove incorrect and undocumented `connect_nodes(self.nodes[0], 1)`. Issue is that transactions are re-relayed (going full circle) between the two nodes, that have two connections between each other. https://travis-ci.org/github/bitcoin/bitcoin/jobs/679201559#L6992 Also fix some pep8 while touching the file This bug has been introduced by accident in c1dde3a949b36ce9c2155777b3fa1372e7ed97d8 ACKs for top commit: achow101: ACK fa301fec966b77c54d02ac54ae7d726629adbfd5 Tree-SHA512: a6565ca30dbe44b02e3f58f159d2515c2ea4a74030118fafc1a3391ce980a4b6d4505dcf51315fda24843f72550a7dea7407b877b3b796883dd73d3b6f009e6f
2020-04-28tests: Add missing sync_all to wallet_importdescriptors.pyAndrew Chow
node1 will sometimes do sendtoaddress before it has received a funding transaction which will cause the test to fail. sync_all to ensure it gets the transaction first.
2020-04-28test: Fix wallet_bumpfee intermittent errorMarcoFalke
2020-04-28Merge #18735: ci: Add and document BASE_BUILD_DIRMarcoFalke
fae49f6e424f31e93c5620d5ff893fb517ef4a8b ci: Add and document BASE_BUILD_DIR (MarcoFalke) Pull request description: Also fixes #18768 ACKs for top commit: hebasto: re-ACK fae49f6e424f31e93c5620d5ff893fb517ef4a8b, which is essentially the same as the previously [reviewed changes](https://github.com/bitcoin/bitcoin/pull/18735#pullrequestreview-400581536). Tree-SHA512: 216565a05ccd513dd9f114b2333d3c283fd71914d32f9b05f145cb7c70633b083ff8ef60798d6f22f4be6a4d652b03806551fd74b5b596c92968501a4d9726d2
2020-04-28Merge #18663: doc: mention build docs in README.mdMarcoFalke
bda62e87e681696828d14b5581b6c19b6e81f378 Adding build instructions to Bitcoin Core, fixes #18658 (Saahil Shangle) Pull request description: Making the instructions for building Bitcoin Core more clear in the main `README.md` will reduce confusion between the `build_msvc` and `doc` folders. ACKs for top commit: laanwj: ACK bda62e87e681696828d14b5581b6c19b6e81f378 Tree-SHA512: ee4c394661eba48d4229e3d1e9ddb67ccb79589429bfa9986cb0242cd615d1f3cc5332063562c1e89c0cdd9ae2e609f61e8bfb209926d8363d35d3da6d94ae9c
2020-04-28Merge #18799: ci: Document why tests can not be run on macMarcoFalke
fa72a751026d43e1d01ae30e26bcfd9b4cc0cf45 ci: Document why tests can not be run on mac (MarcoFalke) Pull request description: Fixes #18794 Top commit has no ACKs. Tree-SHA512: 297652eda412aa8cf7255e20a6f294d22773dad8637a3d7b5204f3b638e911ce5b2e40e85f81395a34c1b5a5b497665944c2d6ea17c70c30c0c9e0ab553f956e
2020-04-28ci: Document why tests can not be run on macMarcoFalke
2020-04-28Merge #18779: doc: Better explain GNU ld's dislike of ld64's optionsfanquake
cd24f37ea9168bd56b8c518ea6125e242cc4213d doc: Better explain GNU ld's dislike of ld64's options (fanquake) Pull request description: There's also now more than a single option being special cased for darwin. If we didn't special case these options they would still end up on the link line and the binaries produced would just segfault. I'm going to plug #17874 here as well, because adding `-fatal-warnings` to our `AX_CHECK_LINK_FLAG` calls would mostly prevent this sort of option mangling from happening. An example of the warning behaviour: ```bash echo "int main() {}" | g++ -x c++ -std=c++11 -Wl,-dead_strip - /usr/bin/ld: warning: cannot find entry symbol ad_strip; defaulting to 0000000000001040 nm -C a.out 0000000000001000 t _init 0000000000001040 T _start U ad_strip ``` ACKs for top commit: dongcarl: ACK cd24f37ea9168bd56b8c518ea6125e242cc4213d Tree-SHA512: 8c5ff11b647e7d44dbb3f509a07caf8606a6b481c114403f0de72b3ad65395dbe9a3436e731ae1b46a823431ed23c3c6aacab8942d78629d59cd8c258c5dbf02
2020-04-28Merge #18769: qt: remove bug fix for Qt < 5.5fanquake
e3ec4924a72c33f202b10a82e8498875d8f1b775 qt: remove todo bug fix for old versions of Qt (10xcryptodev) Pull request description: Remove the code used to fix a Qt bug in versions before Qt 5.5.0 as described in this link https://bugreports.qt.io/browse/QTBUG-43473 Now the minimum requirement is Qt 5.5.1 as described in https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md This code is not necessary anymore ACKs for top commit: hebasto: re-ACK e3ec4924a72c33f202b10a82e8498875d8f1b775, since the [previous review](https://github.com/bitcoin/bitcoin/pull/18769#pullrequestreview-400517155) only the prefix of the commit message has been changed. Tree-SHA512: 57802974fccae863dde0e186847db09832b2433b11e8410a0137b27f1ae8a95bdcd9206a5ea0d79f7a2b56adc6b4bac8bb0c4db583158db36a349a6b28b81aac
2020-04-28Merge #18556: build: Drop make dist in gitian buildsfanquake
2aa48edec0101f8a77a2189244fc62722ff7a123 refactor: Drop unused ${WRAP_DIR}/${HOST} directory (Hennadii Stepanov) 1362be044724bb49d785ca2e296a3b43343c1690 build: Drop make dist in gitian builds (Hennadii Stepanov) Pull request description: After the merge of #18331, the packaged source tarball is created by `git archive`, but the binaries are built from another one which is made by `make dist`. With this PR the only source tarball, created by `git archive`, is used both for binaries building and for packaging to users. Close #16588. Close #18547. As a good side-effect, #18349 becomes redundant. **Change in behavior** The following variables https://github.com/bitcoin/bitcoin/blob/1b151e3ffce7c1a2ee46bf280cc1d96775d1f91e/configure.ac#L2-L6 are no longer used for naming of directories and tarballs. Instead of them the gitian descriptors use a git tag (if available) or a commit hash. --- Also a small refactor commit picked from #18404. ACKs for top commit: dongcarl: ACK 2aa48edec0101f8a77a2189244fc62722ff7a123 MarcoFalke: ACK 2aa48edec0101f8a77a2189244fc62722ff7a123 fanquake: ACK 2aa48edec0101f8a77a2189244fc62722ff7a123 - I've had a quick look over this, and don't want to block merging if this actually gets as closer to finally having this all sorted out. Obviously we've still got #18741, and after speaking to Carl this morning, there will likely be even more changes after that (not Guix specific). Tree-SHA512: d3b16f87e48d1790a3264940c28acd5d881bfd10f3ce94fb0c8a6af76d8039289d01e0cd4972adac49ae24362857251f6c1e5e09e3e9fbf636c10708b4015a7c
2020-04-28Merge #18629: scripts: add PE .reloc section check to security-check.pyfanquake
3e38023af724a76972d39cbccfb0bba4c54a0323 scripts: add PE .reloc section check to security-check.py (fanquake) Pull request description: The `ld` in binutils has historically had a few issues with PE binaries, there's a good summary in this [thread](https://sourceware.org/bugzilla/show_bug.cgi?id=19011). One issue in particular was `ld` stripping the `.reloc` section out of PE binaries, even though it's required for functioning ASLR. This was [reported by a Tor developer in 2014](https://sourceware.org/bugzilla/show_bug.cgi?id=17321) and they have been patching their [own binutils](https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/binutils) ever since. However their patch only made it into binutils at the [start of this year](https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=dc9bd8c92af67947db44b3cb428c050259b15cd0). It adds an `--enable-reloc-section` flag, which is turned on by default if you are using `--dynamic-base`. In the mean time this issue has also been worked around by other projects, such as FFmpeg, see [this commit](https://github.com/TheRyuu/FFmpeg/commit/91b668acd6decec0a6f8d20bf56e2644f96adcb9). I have checked our recent supported Windows release binaries, and they do contain a `.reloc` section. From what I understand, we are using all the right compile/linker flags, including `-pie` & `-fPIE`, and have never run into the crashing/entrypoint issues that other projects might have seen. One other thing worth noting here, it how Debian/Ubuntu patch the binutils that they distribute, because that's what we end up using in our gitian builds. In the binutils-mingw-w64 in Bionic (18.04), which we currently use in gitian, PE hardening options/security flags are enabled by default. See the [changelog](https://changelogs.ubuntu.com/changelogs/pool/universe/b/binutils-mingw-w64/binutils-mingw-w64_8ubuntu1/changelog) and the [relevant commit](https://salsa.debian.org/mingw-w64-team/binutils-mingw-w64/-/commit/452b3013b8280cbe35eaeb166a43621b88d5f8b7). However in Focal (20.04), this has now been reversed. PE hardening options are no-longer the default. See the [changelog](https://changelogs.ubuntu.com/changelogs/pool/universe/b/binutils-mingw-w64/binutils-mingw-w64_8.8/changelog) and [relevant commit](https://salsa.debian.org/mingw-w64-team/binutils-mingw-w64/-/commit/7bd8b2fbc242a8c2fc2217f29fd61f94d3babf6f), which cites same .reloc issue mentioned here. Given that we explicitly specify/opt-in to everything that we want to use, the defaults aren't necessarily an issue for us. However I think it highlights the importance of continuing to be explicit about what we want, and not falling-back or relying on upstream. This was also prompted by the possibility of us doing link time garbage collection, see #18579 & #18605. It seemed some sanity checks would be worthwhile in-case the linker goes haywire while garbage collecting. I think Guix is going to bring great benefits when dealing with these kinds of issues. Carl you might have something to say in that regard. ACKs for top commit: dongcarl: ACK 3e38023af724a76972d39cbccfb0bba4c54a0323 Tree-SHA512: af14d63bdb334bde548dd7de3e0946556b7e2598d817b56eb4e75b3f56c705c26aa85dd9783134c4b6a7aeb7cb4de567eed996e94d533d31511f57ed332287da
2020-04-27Merge #18778: ci: Run functional tests on mac againMarcoFalke
fac24dea00c54fe1e2dcc7625bb65ada8b97ac0c ci: Run functional tests on mac again (MarcoFalke) Pull request description: ACKs for top commit: hebasto: ACK fac24dea00c54fe1e2dcc7625bb65ada8b97ac0c, verified travis build log. Tree-SHA512: 406282a7ac03e5c193830b727366c7b1350639f1850aff951bf7ddd4b0c3e3ffb396b950ccb3a64ddc59500fa2739766f3c34806b4d144bc4535bb2bd765b959
2020-04-27Merge #18777: wallet: Recommend absolute path for dumpwalletMarcoFalke
fa501700e91b8667d4d2f116c3705e3ab9a1c8c3 wallet: Recommned absolute path for dumpwallet (MarcoFalke) Pull request description: Avoids misunderstandings such as #9564 ACKs for top commit: kristapsk: utACK fa501700e91b8667d4d2f116c3705e3ab9a1c8c3 Tree-SHA512: f675ef607992857ffeb556a2945b5436a70b39c5d83f05a8be15a6fccc84cbe9d03e52f8239e28d159e41ed7c6f119b7a38e8ab327029f04609f63c559c12c49
2020-04-27ci: Add and document BASE_BUILD_DIRMarcoFalke
Co-Authored-By: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2020-04-27doc: Better explain GNU ld's dislike of ld64's optionsfanquake
There's also now more than a single option being special cased for darwin.
2020-04-26ci: Run functional tests on mac againMarcoFalke
2020-04-27Merge #16528: Native Descriptor Wallets using DescriptorScriptPubKeyManSamuel Dobson
223588b1bbc63dc57098bbd0baa48635e0cc0b82 Add a --descriptors option to various tests (Andrew Chow) 869f7ab30aeb4d7fbd563c535b55467a8a0430cf tests: Add RPCOverloadWrapper which overloads some disabled RPCs (Andrew Chow) cf060628590fab87d73f278e744d70ef2d5d81db Correctly check for default wallet (Andrew Chow) 886e0d75f5fea2421190aa4812777d89f68962cc Implement CWallet::IsSpentKey for non-LegacySPKMans (Andrew Chow) 3c19fdd2a2fd5394fcfa75b2ba84ab2277cbdabf Return error when no ScriptPubKeyMan is available for specified type (Andrew Chow) 388ba94231f2f10a0be751c562cdd4650510a90a Change wallet_encryption.py to use signmessage instead of dumpprivkey (Andrew Chow) 1346e14831489f9c8f53a08f9dfed61d55d53c6f Functional tests for descriptor wallets (Andrew Chow) f193ea889ddb53d9a5c47647966681d525e38368 add importdescriptors RPC and tests for native descriptor wallets (Hugo Nguyen) ce24a944940019185efebcc5d85eac458ed26016 Add IsLegacy to CWallet so that the GUI knows whether to show watchonly (Andrew Chow) 1cb42b22b11c27e64462afc25a94b2fc50bfa113 Generate new descriptors when encrypting (Andrew Chow) 82ae02b1656819f4bd5023b8955447e1d4ea8692 Be able to create new wallets with DescriptorScriptPubKeyMans as backing (Andrew Chow) b713baa75a62335ab9c0eed9ef76a95bfec30668 Implement GetMetadata in DescriptorScriptPubKeyMan (Andrew Chow) 8b9603bd0b443e2f7984eb72bf2e21cf02af0bcb Change GetMetadata to use unique_ptr<CKeyMetadata> (Andrew Chow) 72a9540df96ffdb94f039b9c14eaacdc7d961196 Implement FillPSBT in DescriptorScriptPubKeyMan (Andrew Chow) 84b4978c02102171775c77a45f6ec198930f0a88 Implement SignMessage for descriptor wallets (Andrew Chow) bde7c9fa38775a81d53ac0484fa9c98076a0c7d1 Implement SignTransaction in DescriptorScriptPubKeyMan (Andrew Chow) d50c8ddd4190f20bf0debd410348b73408ec3143 Implement GetSolvingProvider for DescriptorScriptPubKeyMan (Andrew Chow) f1ca5feb4ad668a3e1ae543d0addd5f483f1a88f Implement GetKeypoolOldestTime and only display it if greater than 0 (Andrew Chow) 586b57a9a6b4b12a78f792785b63a5a1743bce0c Implement ReturnDestination in DescriptorScriptPubKeyMan (Andrew Chow) f866957979c23cefd41efa9dae9e53b9177818dc Implement GetReservedDestination in DescriptorScriptPubKeyMan (Andrew Chow) a775f7c7fd0b9094fcbeee6ba92206d5bbb19164 Implement Unlock and Encrypt in DescriptorScriptPubKeyMan (Andrew Chow) bfdd0734869a22217c15858d7a76d0dacc2ebc86 Implement GetNewDestination for DescriptorScriptPubKeyMan (Andrew Chow) 58c7651821b0eeff0a99dc61d78d2e9e07986580 Implement TopUp in DescriptorScriptPubKeyMan (Andrew Chow) e014886a342508f7c8d80323eee9a5f314eaf94c Implement SetupGeneration for DescriptorScriptPubKeyMan (Andrew Chow) 46dfb99768e7d03a3cf552812d5b41ceaebc06be Implement writing descriptorkeys, descriptorckeys, and descriptors to wallet file (Andrew Chow) 4cb9b69be031e1dc65d8964794781b347fd948f5 Implement several simple functions in DescriptorScriptPubKeyMan (Andrew Chow) d1ec3e4f19487b4b100f80ad02eac063c571777d Add IsSingleType to Descriptors (Andrew Chow) 953feb3d2724f5398dd48990c4957a19313d2c8c Implement loading of keys for DescriptorScriptPubKeyMan (Andrew Chow) 2363e9fcaa41b68bf11153f591b95f2d41ff9a1a Load the descriptor cache from the wallet file (Andrew Chow) 46c46aebb7943e1e2e96755e94dc6c197920bf75 Implement GetID for DescriptorScriptPubKeyMan (Andrew Chow) ec2f9e1178c8e38c0a5ca063fe81adac8f916348 Implement IsHDEnabled in DescriptorScriptPubKeyMan (Andrew Chow) 741122d4c1a62ced3e96d16d67f4eeb3a6522d99 Implement MarkUnusedAddresses in DescriptorScriptPubKeyMan (Andrew Chow) 2db7ca765c8fb2c71dd6f7c4f29ad70e68ff1720 Implement IsMine for DescriptorScriptPubKeyMan (Andrew Chow) db7177af8c159abbcc209f2caafcd45d54c181c5 Add LoadDescriptorScriptPubKeyMan and SetActiveScriptPubKeyMan to CWallet (Andrew Chow) 78f8a92910d34247fa5d04368338c598d9908267 Implement SetType in DescriptorScriptPubKeyMan (Andrew Chow) 834de0300cde57ca3f662fb7aa5b1bdaed68bc8f Store WalletDescriptor in DescriptorScriptPubKeyMan (Andrew Chow) d8132669e10c1db9ae0c2ea0d3f822d7d2f01345 Add a lock cs_desc_man for DescriptorScriptPubKeyMan (Andrew Chow) 3194a7f88ac1a32997b390b4f188c4b6a4af04a5 Introduce WalletDescriptor class (Andrew Chow) 6b13cd3fa854dfaeb9e269bff3d67cacc0e5b5dc Create LegacyScriptPubKeyMan when not a descriptor wallet (Andrew Chow) aeac157c9dc141546b45e06ba9c2e641ad86083f Return nullptr from GetLegacyScriptPubKeyMan if descriptor wallet (Andrew Chow) 96accc73f067c7c95946e9932645dd821ef67f63 Add WALLET_FLAG_DESCRIPTORS (Andrew Chow) 6b8119af53ee2fdb4c4b5b24b4e650c0dc3bd27c Introduce DescriptorScriptPubKeyMan as a dummy class (Andrew Chow) 06620302c713cae65ee8e4ff9302e4c88e2a1285 Introduce SetType function to tell ScriptPubKeyMans the type and internal-ness of it (Andrew Chow) Pull request description: Introducing the wallet of the glorious future (again): native descriptor wallets. With native descriptor wallets, addresses are generated from descriptors. Instead of generating keys and deriving addresses from keys, addresses come from the scriptPubKeys produced by a descriptor. Native descriptor wallets will be optional for now and can only be created by using `createwallet`. Descriptor wallets will store descriptors, master keys from the descriptor, and descriptor cache entries. Keys are derived from descriptors on the fly. In order to allow choosing different address types, 6 descriptors are needed for normal use. There is a pair of primary and change descriptors for each of the 3 address types. With the default keypool size of 1000, each descriptor has 1000 scriptPubKeys and descriptor cache entries pregenerated. This has a side effect of making wallets large since 6000 pubkeys are written to the wallet by default, instead of the current 2000. scriptPubKeys are kept only in memory and are generated every time a descriptor is loaded. By default, we use the standard BIP 44, 49, 84 derivation paths with an external and internal derivation chain for each. Descriptors can also be imported with a new `importdescriptors` RPC. Native descriptor wallets use the `ScriptPubKeyMan` interface introduced in #16341 to add a `DescriptorScriptPubKeyMan`. This defines a different IsMine which uses the simpler model of "does this scriptPubKey exist in this wallet". Furthermore, `DescriptorScriptPubKeyMan` does not have watchonly, so with native descriptor wallets, it is not possible to have a wallet with both watchonly and non-watchonly things. Rather a wallet with `disable_private_keys` needs to be used for watchonly things. A `--descriptor` option was added to some tests (`wallet_basic.py`, `wallet_encryption.py`, `wallet_keypool.py`, `wallet_keypool_topup.py`, and `wallet_labels.py`) to allow for these tests to use descriptor wallets. Additionally, several RPCs are disabled for descriptor wallets (`importprivkey`, `importpubkey`, `importaddress`, `importmulti`, `addmultisigaddress`, `dumpprivkey`, `dumpwallet`, `importwallet`, and `sethdseed`). ACKs for top commit: Sjors: utACK 223588b1bbc63dc57098bbd0baa48635e0cc0b82 (rebased, nits addressed) jonatack: Code review re-ACK 223588b1bbc63dc57098bbd0baa48635e0cc0b82. fjahr: re-ACK 223588b1bbc63dc57098bbd0baa48635e0cc0b82 instagibbs: light re-ACK 223588b meshcollider: Code review ACK 223588b1bbc63dc57098bbd0baa48635e0cc0b82 Tree-SHA512: 59bc52aeddbb769ed5f420d5d240d8137847ac821b588eb616b34461253510c1717d6a70bab8765631738747336ae06f45ba39603ccd17f483843e5ed9a90986
2020-04-26wallet: Recommned absolute path for dumpwalletMarcoFalke
2020-04-26Merge #18669: log: Use Join() helper when listing log categoriesMarcoFalke
faec0638872798b58b9882ee079014555bc8393e log: Use Join() helper when listing log categories (MarcoFalke) Pull request description: This removes the global `ListLogCategories` and replaces it with a one-line member function `LogCategoriesString`, which just calls `Join`. Should be a straightforward refactor to get rid of a few LOC. ACKs for top commit: laanwj: ACK faec0638872798b58b9882ee079014555bc8393e promag: ACK faec0638872798b58b9882ee079014555bc8393e, I also think it's fine as it is (re https://github.com/bitcoin/bitcoin/pull/18669#discussion_r412944724). Tree-SHA512: 2f51f9ce1246eda5630015f3a869e36953c7eb34f311baad576b92d7829e4e88051c6189436271cd0a13732a49698506345b446b98fd28e58edfb5b62169f1c9
2020-04-26qt: remove todo bug fix for old versions of Qt10xcryptodev
2020-04-26Merge #18753: test: Fix intermittent failure in wallet_importmultiMarcoFalke
fa8b9b5d1f48ad95eecf47ebbd7bf374777fc621 test: Fix intermittent failure in wallet_importmulti (MarcoFalke) Pull request description: The wallet is async, so after generating a block, we must call `syncwithvalidationinterfacequeue`. Otherwise the timestamp will be of the previous block. https://travis-ci.org/github/bitcoin/bitcoin/jobs/677685073#L2648 ACKs for top commit: promag: ACK fa8b9b5d1f48ad95eecf47ebbd7bf374777fc621. Tree-SHA512: c21f9912aabbe22019d4ac9d0da06d6e46ef7f2a84d2781110e04c9836eb0ecf90a22cf2bae7f608be611670d17b20600135d1c5e5404aa1e762839816285fb4
2020-04-26Merge #18770: test: Remove raw-tx byte juggling in mempool_reorgMarcoFalke
fa489011d9202d61463dbc426041c867f2670438 test: Remove raw-tx byte juggling in mempool_reorg (MarcoFalke) Pull request description: ACKs for top commit: robot-visions: ACK fa489011d9202d61463dbc426041c867f2670438 Tree-SHA512: 2ae537a5b34e48d2954ba02d9e050ae1a99043080266d5decca3f983b13bc3ddcbee1f3f3c7457e16ee76ea17b9ce08cac2e3205cf46b5e3c3e4ca5f758f00de
2020-04-25test: Remove raw-tx byte juggling in mempool_reorgMarcoFalke
2020-04-25Merge #18744: test: Add fuzzing harnesses for various classes/functions in ↵MarcoFalke
primitives/ fd8e99da57b53da29fbaec6435931c396e3b612b tests: Add fuzzing harness for functions in primitives/transaction.h (practicalswift) d5a31b7cb4226a62931fd72672422a3d2e789e7a tests: Add fuzzing harness for functions in primitives/block.h (practicalswift) Pull request description: Add fuzzing harnesses for various classes/functions in `primitives/`. 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 :) Top commit has no ACKs. Tree-SHA512: ed54bd5b37ff5e40cfa8d3cd8c65d91a2f64fca87b6a5c3b8ddd6becd876ed172735fb53da4d00a86f318fb94517afd179e07cb28a43edf301ffe4dad703cca4
2020-04-25Merge #18688: fuzz: Run in parallelMarcoFalke
fa66280396890bf616cc75432603111e1046d496 fuzz: Run in parallel (MarcoFalke) Pull request description: Can be reviewed with `--ignore-all-space` ACKs for top commit: practicalswift: ACK fa66280396890bf616cc75432603111e1046d496 -- patch looks correct and the live demo in https://github.com/bitcoin-core/qa-assets/pull/11#issuecomment-615439226 convinced me: this is good! fanquake: ACK fa66280396890bf616cc75432603111e1046d496 - this seems sane, and clearly provides some speedup. I'd post benchmarks but can't seem to get through a full run of `./test/fuzz/test_runner.py` without hitting at least a few crashes; see #18763, 18762. Tree-SHA512: d3b545ca90c75bed27f08fe712399d0ed1ac36b13fb289c83e5606eee8dec4c19f5f5cf91758f0a6b1606d8d6b455fbe46df2588faffe7462b185bd34dc2baaf
2020-04-25Merge #18739: doc: Document how to fuzz Bitcoin Core using HonggfuzzMarcoFalke
bb1ec36fb171816309ae5af53d549ff3e4633f67 doc: Document how to fuzz Bitcoin Core using honggfuzz (practicalswift) Pull request description: Document how to fuzz Bitcoin Core using Honggfuzz. ACKs for top commit: fanquake: ACK bb1ec36fb171816309ae5af53d549ff3e4633f67 - did a couple quick runs on a severely under powered VM. Tree-SHA512: 117944c52763a5672f988c62fecb01b85f19f3827fad5582a51464aefdaac4d9a9cd81e2118199f6ea1bb3ab0893c8459ca3d1df7f67bfcf215d5e305225f210
2020-04-25Merge #18585: test: use zero-argument super() shortcut (Python 3.0+)MarcoFalke
0956e46bff7f0b6da65a4de6d4f8261fe9d7055c test: use zero-argument super() shortcut (Python 3.0+) (Sebastian Falbesoner) Pull request description: This mini-PR replaces all calls to `super(...)` with arguments with the zero-argument shortcut `super()` where applicable. See [PEP 3135](https://www.python.org/dev/peps/pep-3135/#specification): > The new syntax: > > super() > > is equivalent to: > > super(__class__, <firstarg>) > > where __class__ is the class that the method was defined in, and <firstarg> is > the first parameter of the method (normally self for instance methods, and cls > for class methods). ACKs for top commit: fanquake: ACK 0956e46bff7f0b6da65a4de6d4f8261fe9d7055c Tree-SHA512: 4ac66fe7ab2be2e8a514e5fcfc41dbb298f21b23ebb7b7b0310d704b0b3cef8adf287a8d80346d1ea9418998c597b4f0ff1f66148d0d806bb43db6607e0fe1cf
2020-04-25Merge #18754: bench: add CAddrMan benchmarksMarcoFalke
a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks (Vasil Dimov) Pull request description: The added benchmarks exercise the public methods Add(), GetAddr(), Select() and Good(). ACKs for top commit: naumenkogs: utACK a9b9577 MarcoFalke: ACK a9b957740e3490d87e5ce0b7f1b93ba43bb19764 Tree-SHA512: af54b2fbd97db34faf4cc6c9bacb20d2c97d0aaddb9cf91b220bc2e09227b55345402ed17e34450745493e3a2b286c176c031cdeb477415570a757cee16b06a8
2020-04-25Merge #17383: Refactor: Move consts to their correct translation unitsMarcoFalke
e9ea95a30d3c0f62b0df0b29744fb5d68687f97f [net processing] Move all const declarations to top of net_processing.cpp (John Newbery) 507b36dd1bf867cd20e4312b95c68b494c9bb7b8 [validation] Move all const declarations to top of validation.h (John Newbery) 0109622b08887ed01a30911477ce4b8f266d4b4a [validation] Move validation-only consts to validation.cpp (John Newbery) b8580cacc70764ba5a48e3defb864d75e6c28626 [net processing] Move net processing consts to net_processing.cpp (John Newbery) Pull request description: Following the main.cpp split, there are still some constants in the wrong places, eg net_processing constants in validation.h. Move them all to their rightful homes. At the same time, make them constexpr. Also move all const declarations to the top of their files, and ensure that they all have doxygen comments. ACKs for top commit: practicalswift: ACK e9ea95a30d3c0f62b0df0b29744fb5d68687f97f -- patch looks correct MarcoFalke: ACK e9ea95a30d3c0f62b0df0b29744fb5d68687f97f 🚉 Tree-SHA512: 44d81da73c7be01e1d36b939789d793f297d3b94f84ea4e7ac853c621cc7054b5a05c7c9e7b83db506db44c16f344541be8f240d955694211e53a84c32b0d2c5
2020-04-25test: use zero-argument super() shortcut (Python 3.0+)Sebastian Falbesoner
as defined in PEP 3135: "The new syntax: super() is equivalent to: super(__class__, <firstarg>) where __class__ is the class that the method was defined in, and <firstarg> is the first parameter of the method (normally self for instance methods, and cls for class methods)."
2020-04-24Merge #18724: test: add coverage for -rpcwallet cli optionMarcoFalke
2495110012fc0cb7142a4536791dd79da5cc3e44 test: add coverage for -rpcwallet cli option (Jon Atack) Pull request description: The bitcoin-cli `-rpcwallet=` option is an essential RPC/CLI option when more than one wallet is loaded (see `bitcoin-cli -help | grep -A5 rpcwallet` or `src/bitcoin-cli.cpp::L61`) and it currently has no test coverage. It is not only used by users, but also by the test framework and ~10 test files via `get_wallet_rpc()`. This PR adds coverage, while simultaneously improving the `-getinfo` coverage when multiple wallets are loaded. This is similar to the test coverage that would be added in #18594. ACKs for top commit: robot-visions: ACK 2495110012fc0cb7142a4536791dd79da5cc3e44 Tree-SHA512: caaa8b99fb8fa481ab2c6b2a287ed29720bb4553c3f66657462c44fa2990acaaf36cabeaaf81408678e5fdce4e105d729dd94b5ed8588dd1a6f2cb03fc25acf3
2020-04-24Merge #18756: refactor: test: use wait_for_getdata() in p2p_compactblocks.pyMarcoFalke
c4027e735072c3de4b4ffb20eecd7187ff36bad7 refactor: test: use wait_for_getdata() in p2p_compactblocks.py (Sebastian Falbesoner) Pull request description: The method `wait_for_getdata()` was recently changed to be more precise by waiting for a specified list of hashes, instead of only matching _any_ `getdata` message (see Issue #18614 and PR #18690). This PR replaces the remaining occurences of manual inspection of `last_messages` with this call. ACKs for top commit: robot-visions: ACK c4027e735072c3de4b4ffb20eecd7187ff36bad7 Tree-SHA512: e10b346742f235b6ee2ef1f32f7fd74406c1a277389f020fb9913a93e94cc9530e1e9414872b83c9d2ae652ebce2b09b2c8c8372260c1afb4e0e54fbf7a935b0
2020-04-24Merge #18745: test: Check submitblock return valuesMarcoFalke
fa262712ca0981cb0ee68cd3dd99a214a20dcbf1 test: Check submitblock return values (MarcoFalke) Pull request description: Add `assert_equal` in some tests to check the `submitblock` return value ACKs for top commit: robot-visions: ACK fa262712ca0981cb0ee68cd3dd99a214a20dcbf1 Tree-SHA512: 25d9effe82a4f6852184b9ac848f96336cc2cafb0bb07edb2792f00cd363f0759575bc9c164dd62f64425d3754028b4acd0675600c07d51277aa80bf66c6f960
2020-04-24test: add coverage for -rpcwallet cli optionJon Atack
and add -getinfo coverage with multiple wallets loaded.
2020-04-24Merge #18757: test: Remove enumeration of expected deserialization ↵MarcoFalke
exceptions in ProcessMessage(...) fuzzer fdceb6328382ac0f9d643f9d42ba0509062d7d48 fuzz: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer (practicalswift) Pull request description: Remove enumeration of expected deserialization exceptions in `ProcessMessage(...)` fuzzer. Closes #18749. Top commit has no ACKs. Tree-SHA512: fe0411dd1e574fe635019d9e3329202798295c8be1b0c5cb9c092ecc27ab7d4d2883104d7bd781ff5d422d13480d858fc8a7f5578d09268d142ae966afb79002
2020-04-24Merge #18157: doc: fixing init.md documentation to not require rpcpasswordMarcoFalke
a2a03c3ca94b1cdd279ac09f2a81e04d262586fd fixing documentation to not require rpcpassword (“jkcd”) Pull request description: Configuration section in [doc/init.md](https://github.com/bitcoin/bitcoin/blob/master/doc/init.md) says user must set rpcpassword in order to run bitcoind. Since [71cbea](https://github.com/bitcoin/bitcoin/commit/71cbeaad9a929ba6a7b62d9b37a09b214ae00c1a) fixed the code to use a cookie for authentication, it is not mandatory to set rpcpassword in the configuration. Fixes #16346 ACKs for top commit: hebasto: ACK a2a03c3ca94b1cdd279ac09f2a81e04d262586fd, modulo nit Tree-SHA512: a62816fef78bed32200bb278cfc7aacf6ea154a60fdf5181927e48b806a1bd694bdf3ccec8362f5e58aad694d636c63f540323d54d85b61deaa417b95b8b56eb
2020-04-24fuzz: Remove enumeration of expected deserialization exceptions in ↵practicalswift
ProcessMessage(...) fuzzer
2020-04-24Merge #18712: test: display command line options passed to send_cli() in ↵MarcoFalke
debug log 8f5dc8800aeb524eee2fa2451cd22883b7b2bfec test: display command line options passed to send_cli() in debug log (Jon Atack) Pull request description: as per https://github.com/bitcoin/bitcoin/pull/18691#discussion_r411382589, and revert two cli calls changed in #18691 from rpc commands back to command line options (these were the only occurrences). ACKs for top commit: MarcoFalke: ACK 8f5dc8800aeb524eee2fa2451cd22883b7b2bfec Tree-SHA512: fcb3eca00aa4099066028c90d5e50a02e074366e09a17f5f5b937d9f7562dd054ff65681aa0ad4c94f6de1e98b1e2b9ac4cd084ddc297010253989a80483b1b9
2020-04-24tests: Add fuzzing harness for functions in primitives/transaction.hpracticalswift
2020-04-24Merge #18752: test: Fix intermittent error in mempool_reorgMarcoFalke
fae98668d150bae7a68167749ae134894cb1140e test: Fix intermittent error in mempool_reorg (MarcoFalke) Pull request description: Example: https://travis-ci.org/github/bitcoin/bitcoin/jobs/677689899#L4717 Also speed up tx relay and fix two pep8 errors while touching the file anyway. ACKs for top commit: vasild: utACK fae9866 Tree-SHA512: 23a7894e71ad0e1a59c74c73643708fca21b505fa4e980038d554294063fd63c396669eefb233ffdffb0083968e51b702c643cb449df8f656dd8345a20f33907
2020-04-24refactor: test: use wait_for_getdata() in p2p_compactblocks.pySebastian Falbesoner
2020-04-24Merge #18589: Fix naming of macOS SDK and clarify versionfanquake
eb37275a6f972c81caef010b4ee9c5dc88edc759 Fix naming of macOS SDK and clarify version (Andrew Chow) Pull request description: Fixes the `MacOSX10.14.sdk.tar.gz` creation command to have `MacOSX.sdk` be correctly named as `MacOSX10.14.sdk` and for the resulting file to be placed in the current directory. Gitian requires that `tar.gz` contains a folder named `MacOSX10.14.sdk` and the command did not do this originally. Having the file be placed in the current directory is a convenience so builders don't have to go find it. Also clarifies which version of Xcode to download and where it can be downloaded. ACKs for top commit: fanquake: ACK eb37275a6f972c81caef010b4ee9c5dc88edc759 - tested the macOS and Linux SDK extraction. Also noticed something seemingly broken with Apple `tar`, but will open an issue to follow up. Sjors: ACK eb37275 for the macOS instruction Tree-SHA512: d691e14711cf195999291dd6fb7ffe552c86f8b30d2b1a77e88b4db6050dd817ba128b047cf36d29b0bb0d4183e709b7c03aa27f31b64e562ea8cd948434ca55
2020-04-23test: Fix intermittent failure in wallet_importmultiMarcoFalke
2020-04-23test: Fix intermittent error in mempool_reorgMarcoFalke
2020-04-23Add a --descriptors option to various testsAndrew Chow
Adds a --descriptors option globally to the test framework. This will make the test create and use descriptor wallets. However some tests may not work with this. Some tests are modified to work with --descriptors and run with that option in test_runer: * wallet_basic.py * wallet_encryption.py * wallet_keypool.py * wallet_keypool_topup.py * wallet_labels.py * wallet_avoidreuse.py
2020-04-23tests: Add RPCOverloadWrapper which overloads some disabled RPCsAndrew Chow
RPCOverloadWrapper overloads some deprecated or disabled RPCs with an implementation using other RPCs to avoid having a ton of code churn around replacing those RPCs.
2020-04-23Correctly check for default walletAndrew Chow
2020-04-23Implement CWallet::IsSpentKey for non-LegacySPKMansAndrew Chow
2020-04-23Return error when no ScriptPubKeyMan is available for specified typeAndrew Chow
When a CWallet doesn't have a ScriptPubKeyMan for the requested type in GetNewDestination, give a meaningful error. Also handle this in Qt which did not do anything with errors.