aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-04-13Merge #18493: rpc: Remove deprecated "size" from mempool txsMarcoFalke
0753efd9dc8f2e756955a726afbb602d904e1e92 rpc: Remove deprecated "size" from mempool txs (Vasil Dimov) Pull request description: Remove the "size" property of a mempool transaction from RPC replies. Deprecated in e16b6a718 in 0.19, about 1 year ago. ACKs for top commit: kristapsk: ACK 0753efd9dc8f2e756955a726afbb602d904e1e92 Tree-SHA512: 392ced6764dd6a1d47c6d1dc9de78990cf3384910d801253f8f620bd1751b2676a6b52bee8a30835d28e845d84bfb37431c1d2370f48c9d4dc8e6a48a5ae8b9e
2020-04-13Merge #18502: doc: Update docs for getbalance (default minconf should be 0)MarcoFalke
c0af173da20cc4560523205bc268677a808a43df doc: default minconf for getbalance should be 0 (U-Zyn Chua) Pull request description: - Default `minconf` for `getbalance` is `0` but example in doc was showing as `1`. - `at least 6 blocks confirmed` now updated to be `at least 6 confirmations` to be more consistent with the terminology used elsewhere in the codebase and documentations. ACKs for top commit: theStack: re-ACK https://github.com/bitcoin/bitcoin/pull/18502/commits/c0af173da20cc4560523205bc268677a808a43df Tree-SHA512: 8f67af78a222a4bd2957658b37fae2224783274f355af84f39a5ce0da90b21f03dc798a6408d44a724c353ff5ed7dfec943fb28726ec423028b64fc579f937ad
2020-04-13doc: default minconf for getbalance should be 0U-Zyn Chua
2020-04-12Merge #18495: rpc: Remove deprecated migration codeMarcoFalke
2599d13c9417dc8c5107535521173687ec5e6c2f rpc: Remove deprecated migration code (Vasil Dimov) Pull request description: Don't accept a second argument to `sendrawtransaction` and `testmempoolaccept` of type `bool`. Actually even the code before this change would not accept `bool`, but it would print a long explanatory message when rejecting it: "Second argument must be numeric (maxfeerate) and no longer supports a boolean. To allow a transaction with high fees, set maxfeerate to 0." This was scheduled for removal in 6c0a6f73e. ACKs for top commit: MarcoFalke: ACK 2599d13c9417dc8c5107535521173687ec5e6c2f 📅 Tree-SHA512: e2c74c0bde88e20149d0deab0845851bb3979143530a6bae4f46769d61b607ad2e2347f8969093c2461a80c47661732dc0b3def140f8ce84081719adda3b3811
2020-04-11Merge #18588: Revert "Merge #16367: Multiprocess build support"MarcoFalke
f29bd546ec169dd9af2ca6265c76353e68db92be Revert "Merge #16367: Multiprocess build support" (MarcoFalke) Pull request description: Reverting the changes temporarily is going to help with the following: * Discussion about the next steps for the multiprocess concept and the experimental libmultiprocess library without having code already commited in the master branch, potentially influencing the discussion * Allowing for more conceptual as well as code review ACKs to accumulate, since the pull only had one ACK (two if I count mine, which didn't make it to GitHub) Can be reviewed with `git diff HEAD HEAD~2 | wc` or `git diff 1b307613604883daea4913a65da30ae073c9dc4d~ | wc` (should be all zeros) Context here: https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-612260496 ACKs for top commit: ryanofsky: Code review ACK f29bd546ec169dd9af2ca6265c76353e68db92be. Confirmed revert with fanquake: ACK f29bd546ec169dd9af2ca6265c76353e68db92be Tree-SHA512: 3ce06c30de23c81c2d69cfb3ada20b3458c48efda1a5ba96aee678e946c499f701bc83e9eae91580f0156c0f30a90e5d015ef8b1806ad611d433c482fa55723e
2020-04-10Revert "Merge #16367: Multiprocess build support"MarcoFalke
This reverts the changes made in merge commit 1b307613604883daea4913a65da30ae073c9dc4d: This reverts commit b919efadff3d0393f4a8c3c1dc735f7ac5c665bb. This reverts commit d54f64c6c700be0604190f52c84fc5f1cdd9f02f. This reverts commit 787f40668dc15980c3d6de028d7950c08175d84a. This reverts commit d6306466626635e6fee44385e6a688c8dc118eb5. This reverts commit e6e44eedd56ecaf59f3fabf8e07ab7dee0ddb1b6.
2020-04-10Merge #17905: gui: Avoid redundant tx status updatesMarcoFalke
96cb597325f64cadb3cf43e2cdb3d7c1e2e49891 gui: Avoid redundant tx status updates (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). In `TransactionTablePriv::index`, avoid calling `interfaces::Wallet::tryGetTxStatus` if the status is up to date as of the most recent `NotifyBlockTip` notification. Store height from the most recent notification in a new `ClientModel::cachedNumBlocks` variable in order to check this. This avoids floods of IPC traffic from `tryGetTxStatus` with #10102 when there are a lot of transactions. It might also make the GUI a little more efficient even when there is no IPC. ACKs for top commit: promag: Code review ACK 96cb597325f64cadb3cf43e2cdb3d7c1e2e49891. hebasto: ACK 96cb597325f64cadb3cf43e2cdb3d7c1e2e49891 Tree-SHA512: fce597bf52a813ad4923110d0a39229ea09e1631e0d580ea18cffb09e58cdbb4b111a40a9a9270ff16d8163cd47b0bd9f1fe7e3a6c7ebb19198f049f8dd1aa46
2020-04-10rpc: Remove deprecated migration codeVasil Dimov
Don't accept a second argument to `sendrawtransaction` and `testmempoolaccept` of type `bool`. Actually even the code before this change would not accept `bool`, but it would print a long explanatory message when rejecting it: "Second argument must be numeric (maxfeerate) and no longer supports a boolean. To allow a transaction with high fees, set maxfeerate to 0." This was scheduled for removal in 6c0a6f73e.
2020-04-10Merge #17693: rpc: Add generateblock to mine a custom set of transactionsMarcoFalke
7524b6479cb20471d827aec5500925c86c62ce1c Add tests for generateblock (Andrew Toth) dcc8332543f8fb6d1bb47cb270fcbb6a814a7d6e Add generateblock rpc (Andrew Toth) Pull request description: The existing block generation rpcs for regtest, `generatetoaddress` and `generatetodescriptor`, mine everything in the mempool up to the block weight limit. This makes it difficult to test a system for several scenarios where a different set of transactions are mined. For example: - Testing the common scenario where a transaction is replaced in the mempool but the replaced transaction is mined instead. - Testing for a double-spent transaction where a transaction that conflicts with the mempool is mined. - Testing for non-standard transactions that are mined. - Testing the scenario where several blocks are mined without a specific transaction in the mempool being included in a block. This PR introduces a new rpc, `generateblock`, that takes an array of raw transactions and txids and mines only those and the coinbase. Any txids must be in the mempool, but the raw txs can be anything conforming to consensus rules. The coinbase can be specified as either an address or descriptor. This reopens #17653 since it was closed by mistake. Thanks to instagibbs for code suggestions that I used here. ACKs for top commit: MarcoFalke: re-ACK 7524b6479cb20471d827aec5500925c86c62ce1c 📁 Tree-SHA512: 857106007465b5b9b8a84b6d07c17cbf8378a33a72d32ff79abea1d5ab4babb4d53a11ddbb14595aa1fac9dfa1391e3a11403d742f69951beea2f683e8a01cd4
2020-04-10Merge #17737: Add ChainstateManager, remove BlockManager globalMarcoFalke
c9017ce3bc27665594c9d80f395780d40755bb22 protect g_chainman with cs_main (James O'Beirne) 2b081c4568e8019886fdb0f2a57babc73d7487f7 test: add basic tests for ChainstateManager (James O'Beirne) 4ae29f5f0c5117032debb722d7049664fdceeae8 use ChainstateManager to initialize chainstate (James O'Beirne) 5b690f0aae21e7d46cbefe3f5be645842ac4ae3b refactor: move RewindBlockIndex to CChainState (James O'Beirne) 89cdf4d5692d396b8c7177b3918aa9dab07f9624 validation: introduce unused ChainstateManager (James O'Beirne) 8e2ecfe2496d8a015f3ee8723025a438feffbd28 validation: add CChainState.m_from_snapshot_blockhash (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal --- This changeset introduces `ChainstateManager`, which is responsible for creating and managing access to multiple chainstates. Until we allow chainstate creation from UTXO snapshots (next assumeutxo PR?) it's basically unnecessary, but it is a prerequisite for background IBD support. Changes are also made to the initialization process to make use of `g_chainman` and thus clear the way for multiple chainstates being loaded on startup. One immediate benefit of this change is that we no longer have the `g_blockman` global, but instead have the ChainstateManager inject a reference of its shared BlockManager into any chainstate it creates. Another immediate benefit is that uses of `ChainActive()` and `ChainstateActive()` are now covered by lock annotations. Because use of `g_chainman` is annotated to require cs_main, these two functions subsequently follow. Because of whitespace changes, this diff looks bigger than it is. E.g., 4813167d98 is most easily reviewed with ```sh git show --color-moved=dimmed_zebra -w 4813167d98 ``` ACKs for top commit: MarcoFalke: re-ACK c9017ce3bc27665594c9d80f395780d40755bb22 📙 fjahr: Code Review Re-ACK c9017ce3bc27665594c9d80f395780d40755bb22 ariard: Code Review ACK c9017ce ryanofsky: Code review ACK c9017ce3bc27665594c9d80f395780d40755bb22. No changes since last review other than a straight rebase Tree-SHA512: 3f250d0dc95d4bfd70852ef1e39e081a4a9b71a4453f276e6d474c2ae06ad6ae6a32b4173084fe499e1e9af72dd9007f4a8a375c63ce9ac472ffeaada41ab508
2020-04-10Merge #18422: [consensus] MOVEONLY: Move single-sig checking EvalScript code ↵MarcoFalke
to EvalChecksig 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee [consensus] MOVEONLY: Move single-sig checking EvalScript code to EvalChecksig (Pieter Wuille) Pull request description: This is another small refactor pulled out of the Schnorr/Taproot PR #17977. This is in preparation for adding different signature verification rules, specifically tapscript (BIP 342), which interprets opcode 0xac and 0xad as Schnorr signature verifications. ACKs for top commit: sipa: ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, verified move-only. MarcoFalke: ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, reviewed with "git show 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space -W" 👆 fjahr: Code-review ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, verified that it's move-only. instagibbs: code review ACK https://github.com/bitcoin/bitcoin/pull/18422/commits/14e8cf974a7a317796ef8e97e5cf9c355ceff0ee, verified move-only theStack: Code-Review ACK https://github.com/bitcoin/bitcoin/commit/14e8cf974a7a317796ef8e97e5cf9c355ceff0ee jonatack: ACK 14e8cf974a7a317796ef8e97e5cf9c355ceff0ee Tree-SHA512: af2efce9ae39d5ec01db5b9ef0ff383fe252ef5f33b3483927308ae17d91a619266cb45951f32ea1ce54807a4c0f052bcdefb47e244465d3a726393221c227b1
2020-04-10Merge #17999: refactor: Add ChainClient setMockTime, getWallets methodsMarcoFalke
3ce16ad2f91d1e2edc7e7bdc5a19f72aa8c3e739 refactor: Use psbt forward declaration (Russell Yanofsky) 1dde238f2c21a0cc9bada10a2449cf9c6b2178ad Add ChainClient setMockTime, getWallets methods (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). These changes are needed to set mock times, and get wallet interface pointers correctly when wallet code is running in a different process from node code in #10102 ACKs for top commit: MarcoFalke: re-ACK 3ce16ad2f91d1e2edc7e7bdc5a19f72aa8c3e739 🔙 promag: Code review ACK 3ce16ad2f91d1e2edc7e7bdc5a19f72aa8c3e739. Tree-SHA512: 6c093bfcd68adf5858a1aade4361cdb7fb015496673504ac7a93d0bd2595215047184551d6fd526baa27782331cd2819ce45c4cf923b205ce93ac29e485b5dd8
2020-04-10Merge #16367: Multiprocess build supportMarcoFalke
b919efadff3d0393f4a8c3c1dc735f7ac5c665bb depends: Use default macos clang compiler (Russell Yanofsky) d54f64c6c700be0604190f52c84fc5f1cdd9f02f Add multiprocess travis configuration (Russell Yanofsky) 787f40668dc15980c3d6de028d7950c08175d84a Set LD_LIBRARY_PATH consistently in travis tests (Russell Yanofsky) d6306466626635e6fee44385e6a688c8dc118eb5 libmultiprocess depends build (Russell Yanofsky) e6e44eedd56ecaf59f3fabf8e07ab7dee0ddb1b6 Multiprocess build changes (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). This splits autotools, depends build, and travis changes out of #10102, so code changes and build system changes can be reviewed separately. ACKs for top commit: hebasto: re-ACK b919efadff3d0393f4a8c3c1dc735f7ac5c665bb, rebased only since my [previous](https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-605514556) review. Tree-SHA512: ebc5e403cc99a0d9629ed7fe1595e01d57e6d1255cbf03968a3196ff6f528f734c78060fdc065724ee1f923bcc5aa2b29470fcb36a7f15957eb57c76d58178a4
2020-04-10Merge #18504: build: Drop bitcoin-tx and bitcoin-wallet dependencies on libeventMarcoFalke
01a3392b1b778fa4fcf568013326d6ea1de4fb3b Drop bitcoin-wallet dependency on libevent (Russell Yanofsky) 0660119ac372c2863d14060ac1bc9bc243771f94 Drop unintended bitcoin-tx dependency on libevent (Russell Yanofsky) Pull request description: This fixes compile errors trying to build bitcoin-tx and bitcoin-wallet without libevent, which were reported by Luke Dashjr in https://github.com/bitcoin/bitcoin/issues/18465 The fix avoiding `bitcoin-tx` dependency on libevent just adds a conditional build rule. This is implemented in the first commit (more details in commit description). The fix avoiding `bitcoin-wallet` dependency on libevent requires minor code changes, because `bitcoin-wallet` (unlike `bitcoin-tx`) links against code that calls `urlDecode` / `evhttp_uridecode`. This fix is implemented in the second commit (again details in the commit description). ACKs for top commit: jonasschnelli: utACK 01a3392b1b778fa4fcf568013326d6ea1de4fb3b. Tree-SHA512: d2245e912ab494cccceeb427a1eca8e55b01a0006ff93eebcfb5461ae7cecd1083ac2de443d9db036b18bdc6f0fb615546caaa20c585046f66d234937f74870a
2020-04-10Merge #18574: cli: call getbalances.ismine.trusted instead of ↵MarcoFalke
getwalletinfo.balance 5df0877f91f4ed59031b0d7dcd66780df87ac1af test: update and harden interface_bitcoin_cli tests (Jon Atack) 75019774c96795ef1a57af2a92dd9491f5065cc5 cli -getinfo: use getbalances instead of deprecated getwalletinfo balance (Jon Atack) Pull request description: Extracted from #18453 to preserve that PR as a discussion on multiwallet RPC/CLI. This PR updates `bitcoin-cli -getinfo` to fetch the wallet balance from `getbalances` in order to no longer depend on `getwalletinfo.balance` which was deprecated a year ago in facfb41. I found this when removing the getwalletinfo() `balance`, `unconfirmed_balance`, and `immature_balance` fields to see what broke from depending on them. I didn't see any perceivable change in `-getinfo` run time from the change. Test coverage for this change is provided by `test/functional/interface_bitcoin_cli.py`, which the second commit updates to (a) no longer depend on getwalletinfo.balances and (b) test the -getinfo blockcount and balance fields against non-default, non-zero values. ACKs for top commit: robot-visions: ACK 5df0877 MarcoFalke: ACK 5df0877 vasild: re-ACK 5df0877f9 promag: Code review ACK 5df0877f91f4ed59031b0d7dcd66780df87ac1af. theStack: ACK https://github.com/bitcoin/bitcoin/commit/5df0877f91f4ed59031b0d7dcd66780df87ac1af Tree-SHA512: 0dd8c62f915b1c0112e42b132dcf74a141bdd1f51e7c17d4a698b374ec296f4f9836f7058dbe237cf24f9bfb32ea5000e14f7089e2e86472d9c6a175be26e910
2020-04-10Merge #18541: rpc: Make verifychain default values static, not depend on ↵MarcoFalke
global args fad691cafe083743a26f434488990f060ae4ac45 rpc: Make verifychain default values static, not depend on global args (MarcoFalke) Pull request description: This fixes several issues: * The documentation is not compile-time static and depends on run-time arguments, making it impossible to host it on a static resource like a website or pdf. See also a similar change in the wallet rpc code: #18499 * The same call (relying on default values) will run different code on different machines, depending on the command line args that were used to start the server. This might lead to hard-to-debug-remote issues. This is a small behaviour change, and I will add release notes. ACKs for top commit: theStack: ACK https://github.com/bitcoin/bitcoin/pull/18541/commits/fad691cafe083743a26f434488990f060ae4ac45 promag: Code review ACK fad691cafe083743a26f434488990f060ae4ac45. Tree-SHA512: 1c7a253ff0ec13a973b10d3777b71c70954ded5805b65a3ab06317327014de4cd0601d71d30c6ce89a581722c150cb5567acc1bd3e0c789cb51bab6ef0dcfc4a
2020-04-10Merge #18526: Remove PID file at the very endMarcoFalke
7fcdec0f326f7fb547ec9c651871842cf518ea38 Remove PID file at the very end (Hennadii Stepanov) Pull request description: While reproducing the bug from #18517, I've noticed that the `bitcoind.pid` file has already been removed when the `bitcoind` hangs. This PR makes `Shutdown()` keep the `bitcoind.pid` file available until the end. ACKs for top commit: MarcoFalke: ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38 emilengler: utACK 7fcdec0f326f7fb547ec9c651871842cf518ea38 promag: Code review ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38. theStack: Code review ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38 Tree-SHA512: 9732ef34e137dbee70a06d922b316b8ea7b9a1c959cf8861b6940cd789336dc19ee468a4c3a28d95d1458076a48270c676b0ff27fec30cf57eced6ddab0a2a9b
2020-04-10Merge #18454: net: Make addr relay mockable, add testMarcoFalke
fa1da3d4bfc0511a89f5b19d5a4d89e55ff7ccde test: Add basic addr relay test (MarcoFalke) fa1793c1c44a3f75a09f9c636467b8274c541bdd net: Pass connman const when relaying address (MarcoFalke) fa47a0b003f53708b6d5df1ed4e7f8a7c68aa3ac net: Make addr relay mockable (MarcoFalke) Pull request description: As usual: * Switch to std::chrono time to be type-safe and mockable * Add basic test that relies on mocktime to add code coverage ACKs for top commit: naumenkogs: utACK fa1da3d promag: ACK fa1da3d4bfc0511a89f5b19d5a4d89e55ff7ccde (fabe56e44b6f683e24e37246a7a8851190947cb3 before https://github.com/bitcoin/bitcoin/pull/18454#issuecomment-607866453), fa5bf23d527a450e72c2bf13d013e5393b664ca3 was dropped since last review. Tree-SHA512: 0552bf8fcbe375baa3cab62acd8c23b2994efa47daff818ad1116d0ffaa0b9e520dc1bca2bbc68369b25584e85e54861fe6fd0968de4f503b95439c099df9bd7
2020-04-09Merge #18529: Add fuzzer version of randomized prevector testMarcoFalke
b1d24d1d031a2b2ce67bf846bafa1c3a499b7553 Reorder the test instructions by number (Pieter Wuille) c2ccadc26a04358b11539097c1aadb8d11b85c21 Merge and generalize case 3 and case 6 (Pieter Wuille) 402ad5aaca9509d45d861d77eb6431d6e1944f91 Only run sanity check once at the end (Pieter Wuille) eda8309bfc6a8c94f0b7c076d1cccc86c1011cbc Assert immediately rather than caching failure (Pieter Wuille) 55608455cbed4234f26f62ed9ff500fe5dbc21c4 Make a fuzzer-based copy of the prevector randomized test (Pieter Wuille) Pull request description: The current prevector test effectively randomly generates a number of operations to perform on a prevector and a normal vector, and checks consistency between the two. By converting this into a fuzzer the operations can be targetted rather than random. ACKs for top commit: MarcoFalke: ACK b1d24d1d031a2b2ce67bf846bafa1c3a499b7553 🍬 Tree-SHA512: 2b5c62abcd5fee94f42db03400531484d98c59e7f4308e0e683c61aabcd9ce42f85c5d058d2d5e7f8221124f71d2112b6a5f3c80e5d0fdae265a70647747e92f
2020-04-09cli -getinfo: use getbalances instead of deprecated getwalletinfo balanceJon Atack
2020-04-09Merge #18363: tests: Add fuzzing harness for HTTPRequest, libevent's evhttp ↵MarcoFalke
and related functions cdfb8e7afa7648405dd6b957f47b1c7ab566a076 tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions (practicalswift) Pull request description: Add fuzzing harness for `HTTPRequest`, `libevent`'s `evhttp` and related functions. ACKs for top commit: laanwj: ACK cdfb8e7afa7648405dd6b957f47b1c7ab566a076 Tree-SHA512: da481afed5eb3232d3f3d0583094e56050e6234223dfcb356d8567fe0616336eb1b78c5e6821325fc9767e385e5dfaf3c96f0d35ffdb67f18d74f9a9a9464e24
2020-04-09Merge #18521: fuzz: Add process_messages harnessMarcoFalke
fa6a00843447d53a5708ea3a629b9150cfe58be2 fuzz: Add process_messages harness (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: Tested ACK fa6a00843447d53a5708ea3a629b9150cfe58be2 Tree-SHA512: 2d8788308c7f45c97ca003378f58a9d51f51265958557a65e5e505b1666b4cb928f0d010622870175090a0ad25e2d10b41f26f4eef14b6ff334a024baa250f8c
2020-04-09Merge #18533: scripted-diff: Replace strCommand with msg_typeMarcoFalke
7777e3624fabe4718675b2be8b088697b7ad4d0d scripted-diff: Replace strCommand with msg_type (MarcoFalke) Pull request description: Receiving a message is not a command, but simply a message of some type ACKs for top commit: promag: ACK 7777e3624fabe4718675b2be8b088697b7ad4d0d. naumenkogs: ACK 7777e36 practicalswift: ACK 7777e3624fabe4718675b2be8b088697b7ad4d0d -- I've always thought the `strCommand` name is confusing :) theStack: ACK 7777e36 Tree-SHA512: 662bac579064c621191916274314b85111cfb4df488f00893ceb16def1c47af4b2a0f34cd7349722099b5a9d23160edb8eb999841f1d64af3e0da02e4870b4bf
2020-04-08Merge #18565: tests: Add fuzzing harnesses for classes/functions in ↵MarcoFalke
policy/fees.h, checkqueue.h and cuckoocache.h. Add fuzzing coverage. 283bd72156959f420f13acc7a34e513ca3446025 tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) to existing fuzzer (practicalswift) bf76000493082da05bf7258a5038e16fa76cd143 tests: Add fuzzing harness for classes/functions in cuckoocache.h (practicalswift) 57890b2555ca347373109052f6789c23f46bc594 tests: Add fuzzing harness for classes/functions in checkqueue.h (practicalswift) 2df5701e902effa93834d9520690cbaca7e504f3 tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzer (practicalswift) 7b9a2dc86426926038b2f49d3d4ce4cb64dcd14b tests: Add fuzzing harness for AdditionOverflow(...) (practicalswift) 44fb2a596b4a1aa70253c4145c35be6de68da22a tests: Add fuzzing harness for FeeFilterRounder (practicalswift) Pull request description: Includes: ``` tests: Add fuzzing harness for FeeFilterRounder tests: Add fuzzing harness for classes/functions in checkqueue.h tests: Add fuzzing harness for classes/functions in cuckoocache.h tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) to existing fuzzer tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzer tests: Add fuzzing harness for AdditionOverflow(...) ``` See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. ACKs for top commit: MarcoFalke: ACK 283bd72156959f420f13acc7a34e513ca3446025 Tree-SHA512: 2361edfb5c47741b22d9fb996836c5250c5a26bc5e956039ea6a0c55ba2d36c78f241d66f85bc02f5b85b9b83d5fde56a5c4702b9d1b7ac4a9a3ae391ca79eaa
2020-04-08tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) ↵practicalswift
to existing fuzzer
2020-04-08tests: Add fuzzing harness for classes/functions in cuckoocache.hpracticalswift
2020-04-08tests: Add fuzzing harness for classes/functions in checkqueue.hpracticalswift
2020-04-08tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzerpracticalswift
2020-04-08tests: Add fuzzing harness for AdditionOverflow(...)practicalswift
2020-04-08tests: Add fuzzing harness for FeeFilterRounderpracticalswift
2020-04-08Fix unregister_all_during_call cleanupRussell Yanofsky
Use TestingSetup fixture to fix unregister_all_during_call test not calling UnregisterBackgroundSignalScheduler, which could trigger an assert in RegisterBackgroundSignalScheduler when called in later tests Failure reported by fanquake <fanquake@gmail.com> https://github.com/bitcoin/bitcoin/pull/18551#issuecomment-610974251
2020-04-07Add test for UnregisterAllValidationInterfaces bugRussell Yanofsky
Bug in MainSignalsInstance::Clear could cause validation interface callbacks to be deleted during execution if UnregisterAllValidationInterfaces was called more than once. Bug was introduced in https://github.com/bitcoin/bitcoin/pull/18524 and is fixed by https://github.com/bitcoin/bitcoin/pull/18551
2020-04-07Do not clear validationinterface entries being executedPieter Wuille
The previous code for MainSignalsInstance::Clear would decrement the reference count of every interface, including ones that were already Unregister()ed but still being executed.
2020-04-07Merge #18532: rpc: Avoid initialization-order-fiasco on static CRPCCommand ↵MarcoFalke
tables fa1a92224dd78de817d15bcda35a8310254e1a54 rpc: Avoid initialization-order-fiasco on static CRPCCommand tables (MarcoFalke) Pull request description: Currently the fiasco is only theoretical because all content of the table are compile-time constants. However, the fiasco materializes should they ever become run-time constants (e.g. #18531). ACKs for top commit: promag: ACK fa1a92224dd78de817d15bcda35a8310254e1a54. practicalswift: ACK fa1a92224dd78de817d15bcda35a8310254e1a54 -- fiasco bad :) Tree-SHA512: cccadb0ad56194599b74f04264d74c34fa865958580a850efc6474bbdc56f30cadce6b2e9a6ad5472ff46c3f4c793366acd8090fad409a45b25d961f2d89da19
2020-04-07Merge #18546: Bugfix: Wallet: Safely deal with change in the address book ↵MarcoFalke
[part 2] 7a2ecf16df938dd95d3130a46082def7a02338eb Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failure (Luke Dashjr) 2952c46b923042f2de801f319e03ed5c4c4eb735 Wallet: Replace CAddressBookData.name with GetLabel() method (Luke Dashjr) d7092c392e10889cd7a080b3d22ed6446a59b87a QA: Test that change doesn't turn into non-change when spent in an avoid-reuse wallet (Luke Dashjr) Pull request description: Follow-up to #18192, not strictly necessary for 0.20 ACKs for top commit: MarcoFalke: re-ACK 7a2ecf16df, only change is adding an assert_equal in the test 🔰 jnewbery: utACK 7a2ecf16df938dd95d3130a46082def7a02338eb Tree-SHA512: e0933ee40f705b751697dc27249e1868ed4874254b174ebdd0a7150125d8c818402e66df2371718c7eeb90e67ee2317215fb260aa9b9d7b9b45ee436de2988ff
2020-04-06Reorder the test instructions by numberPieter Wuille
2020-04-06Merge and generalize case 3 and case 6Pieter Wuille
2020-04-06Only run sanity check once at the endPieter Wuille
2020-04-06Assert immediately rather than caching failurePieter Wuille
2020-04-06Make a fuzzer-based copy of the prevector randomized testPieter Wuille
2020-04-07qt: Fix Window -> Minimize menu itemHennadii Stepanov
2020-04-06Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failureLuke Dashjr
2020-04-06Wallet: Replace CAddressBookData.name with GetLabel() methodLuke Dashjr
2020-04-07Merge #18192: Bugfix: Wallet: Safely deal with change in the address bookMarcoFalke
b5795a788639305bab86a8b3f6b75d6ce81be083 Wallet: Add warning comments and assert to CWallet::DelAddressBook (Luke Dashjr) 6d2905f57aaeb3ec3b63d31043f7673ca10003f2 Wallet: Avoid unnecessary/redundant m_address_book lookups (Luke Dashjr) c751d886f499257627b308b11ffaa51c22db6cc0 Wallet: Avoid treating change-in-the-addressbook as non-change everywhere (Luke Dashjr) 8e64b8c84bcbd63caea06f3af087af1f0609eaf5 Wallet: New FindAddressBookEntry method to filter out change entries (and skip ->second everywhere) (Luke Dashjr) 65b6bdc2b164343ec3cc3d32a0297daff9e24fec Wallet: Add CAddressBookData::IsChange which returns true iff label has never been set (Luke Dashjr) 144b2f85da4d51bf7d72b987888ddcaf5b429eed Wallet: Require usage of new CAddressBookData::setLabel to change label (Luke Dashjr) b86cd155f6f661052042048aa7cfc2a397afe4f7 scripted-diff: Wallet: Rename mapAddressBook to m_address_book (Luke Dashjr) Pull request description: In many places, our code assumes that presence in the address book indicates a non-change key, and absence of an entry in mapAddressBook indicates change. This no longer holds true after #13756 (first released in 0.19) since it added a "used" DestData populated even for change addresses. Only avoid-reuse wallets should be affected by this issue. Thankfully, populating DestData does not write a label to the database, so we can retroactively fix this (so long as the user didn't see the change address and manually assign it a real label). Fixing it is accomplished by: * Adding a new bool to CAddressBookData to track if the label has ever been assigned, either by loading one from the database, or by assigning one at runtime. * `CAddressBookData::IsChange` and `CWallet::FindAddressBookEntry` are new methods to assist in excluding change from code that doesn't expect to see them. * For safety in merging, `CAddressBookData::name` has been made read-only (the actual data is stored in `m_label`, a new private member, and can be changed only with `setLabel` which updates the `m_change` flag), and `mapAddressBook` has been renamed to `m_address_book` (to force old code to be rebased to compile). A final commit also does some minor optimisation, avoiding redundant lookups in `m_address_book` when we already have a pointer to the `CAddressBookData`. ACKs for top commit: ryanofsky: Code review ACK b5795a788639305bab86a8b3f6b75d6ce81be083. Pretty clever and nicely implemented fix! jonatack: ACK b5795a788639305bab86a8b3f6b75d6ce81be083 nice improvements -- code review, built/ran tests rebased on current master ff53433fe4ed06893d7c4 and tested manually with rpc/cli jnewbery: Good fix. utACK b5795a788. Tree-SHA512: 40525185a0bcc1723f602243c269499ec86ecb298fecb5ef24d626bbdd5e3efece86cdb1084ad7eebf7eeaf251db4a6e056bcd25bc8457b417fcbb53d032ebf0
2020-04-06Merge #18458: net: Add missing cs_vNodes lockWladimir J. van der Laan
fa369651c5523f393e0bfcfa328b8e27006711aa net: Add missing cs_vNodes lock (MarcoFalke) Pull request description: Fixes #18457 ACKs for top commit: promag: Code review ACK fa369651c5523f393e0bfcfa328b8e27006711aa. laanwj: ACK fa369651c5523f393e0bfcfa328b8e27006711aa Tree-SHA512: 60d7000f2f3d480bb0953ce27a0020763e7102da16a0006b619e0a236cfc33cbd4f83d870e9f0546639711cd877c1f9808d419184bbc153bb328885417e0066c
2020-04-06Merge #18487: rpc: Fix rpcRunLater race in walletpassphraseWladimir J. van der Laan
7b8e15728d1ad058a4b7d7569fd5d5ba6806ca28 rpc: Fix rpcRunLater race in walletpassphrase (João Barbosa) Pull request description: Release locks before calling `rpcRunLater`. Quick explanation: `rpcRunLater` leads to `event_free` which calls `event_del` which can wait for the event callback to finish if it's already running and that callback will try to lock wallet mutex - which is already locked in http thread. Fixes #14995 , fixes #18482. Best reviewed with whitespace changes hidden. ACKs for top commit: MarcoFalke: ACK 7b8e15728d, only tested that this avoids the node freezing. Did not look at how libevent works or how the deadlock happens or if this breaks other stuff. 📞 ryanofsky: Code review ACK 7b8e15728d1ad058a4b7d7569fd5d5ba6806ca28. Just updated comment since last review Tree-SHA512: 17874a2fa7b0e164fb0d7ee4cb7d59650275b8c03476fb291d60af8b758495457660d3912623fb26259fefe84aeba21c0a9e0c6467982ba511f19344ed5413ab
2020-04-07Merge #18484: rpc: Correctly compute redeemScript from witnessScript for ↵MarcoFalke
signrawtransaction cd3b1569d9ad8e24d3a222aff74e0c254baadf79 Correctly compute redeemScript from witnessScript for signrawtransaction (Andrew Chow) Pull request description: `ParsePrevouts` uses `GetScriptForWitness` on the given witnessScript to find the corresponding redeemScript. This is incorrect when the witnessScript is either a P2PK or P2PKH script as it returns the corresponding P2WPK script instead of turning the witnessScript into a P2WSH script. Instead this should make the script a `WitnessV0ScriptHash` destination and get the script for that. Test cases are also added. These will fail on master with a `redeemScript does not correspond to witnessScript` Reported on [Bitcointalk](https://bitcointalk.org/index.php?topic=5236818.0) ACKs for top commit: MarcoFalke: weak ACK cd3b1569d9, only checked that the test fails without the code change 🚰 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/18484/commits/cd3b1569d9ad8e24d3a222aff74e0c254baadf79 Tree-SHA512: afac671dbb52ce88bfb4a9ca3dd6065427ad52c9778d0549ad40e9286778f308adad24fb3b3c3089545d7f88c57c53d41224fd7a4bb207550eff2fe06600118f
2020-04-07rpc: Make verifychain default values static, not depend on global argsMarcoFalke
2020-04-06Merge #18524: refactor: drop boost::signals2 in validationinterfaceWladimir J. van der Laan
d6815a2313158862d448733954a73520f223deb6 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky) Pull request description: Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions. Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: https://github.com/bitcoin/bitcoin/issues/18517, https://github.com/bitcoin/bitcoin/pull/18471 ACKs for top commit: MarcoFalke: ACK d6815a2313158862d448733954a73520f223deb6 laanwj: ACK d6815a2313158862d448733954a73520f223deb6 hebasto: re-ACK d6815a2313158862d448733954a73520f223deb6 promag: ACK d6815a2313158862d448733954a73520f223deb6. Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
2020-04-06Remove PID file at the very endHennadii Stepanov