aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-03-31Merge bitcoin/bitcoin#24698: test: -peerblockfilters without ↵MarcoFalke
-blockfilterindex raises an error d6bc2322ed2e0674e027d39825fdadbb0db2c24a test: -peerblockfilters without -blockfilterindex raises an error (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/2a3e8fb3592e42300ec96c9f6724e15346e30ea7/src/init.cpp#L850 Setting -peerblockfilters without -blockfilterindex should raise an error when initializing. ACKs for top commit: ccdle12: Tested ACK https://github.com/bitcoin/bitcoin/pull/24698/commits/d6bc2322ed2e0674e027d39825fdadbb0db2c24a Tree-SHA512: e740c2ccde6bb1bb8381bb676a6d01bd5746cf9ce0c8dadd62067a6b9b380027bfe8b8cdeae9846a0ab18385f3dc5dff607fe5274cb55107d47470db00015fb2
2022-03-31Merge bitcoin/bitcoin#24707: doc: Speed up functional test runs using ramdiskMarcoFalke
17648493df478fa9316cc9ed66fe6bc1c2c820a4 doc: Speed up functional test runs using ramdisk (willcl-ark) Pull request description: Using a ramdisk for the functional tests can give noticable speedups for developers and reviewers. Local testing with an 8GB ramdisk saw a full test run using `test/functional/test_runner.py --jobs=100 --cachedir=/mnt/tmp/cache --tmpdir=/mnt/tmp` reduced from ~280 seconds to ~99 seconds. Possible bikeshedding opportunity to be had over whether this might best fit into `doc/productivity.md`, but IMO more people will likely see it (and it will therefore be more useful) if it is here. It seems best to select `tmpfs` over `ramfs` as `ramfs` can grow dynamically (good) but cannot be limited in size and might cause the system to hang if you run out of ram (bad), whereas `tmpfs` is size-limited and will overflow into swap. ACKs for top commit: josibake: ACK https://github.com/bitcoin/bitcoin/pull/24707/commits/17648493df478fa9316cc9ed66fe6bc1c2c820a4 jamesob: ACK https://github.com/bitcoin/bitcoin/pull/24707/commits/17648493df478fa9316cc9ed66fe6bc1c2c820a4 Tree-SHA512: b8e0846d4558a7a33fbb7cd190e30c36182db36095e1c1feae8c10a12042cff9d97739964bd9211d8564231dc99b4be5eed806d12a1d11dfa908157d7f26cc67
2022-03-30Merge bitcoin/bitcoin#24118: Add 'sendall' RPC née sweepMarcoFalke
bb84b7145b31dbfdcb4cf0b9b6e612a57e573993 add tests for no recipient and using send_max while inputs are specified (ishaanam) 49090ec4025152c847be8a5ab6aa6f379e345260 Add sendall RPC née sweep (Murch) 902793c7772e5bdd5aae5b0d20a32c02a1a6dc7c Extract FinishTransaction from send() (Murch) 6d2208a3f6849a3732af6ff010eeea629b9b10d0 Extract interpretation of fee estimation arguments (Murch) a31d75e5fb5c1304445d698595079e29f3cd3a3a Elaborate error messages for outdated options (Murch) 35ed094e4b0e0554e609709f6ca1f7d17096882c Extract prevention of outdated option names (Murch) Pull request description: Add sendall RPC née sweep _Motivation_ Currently, the wallet uses a fSubtractFeeAmount (SFFO) flag on the recipients objects for all forms of sending calls. According to the commit discussion, this flag was chiefly introduced to permit sweeping without manually calculating the fees of transactions. However, the flag leads to unintuitive behavior and makes it more complicated to test many wallet RPCs exhaustively. We proposed to introduce a dedicated `sendall` RPC with the intention to cover this functionality. Since the proposal, it was discovered in further discussion that our proposed `sendall` rpc and SFFO have subtly different scopes of operation. • sendall: Use _given UTXOs_ to pay a destination the remainder after fees. • SFFO: Use a _given budget_ to pay an address the remainder after fees. While `sendall` will simplify cases of spending a given set of UTXOs such as paying the value from one or more specific UTXOs, emptying a wallet, or burning dust, we realized that there are some cases in which SFFO is used to pay other parties from a limited budget, which can often lead to the creation of change outputs. This cannot be easily replicated using `sendall` as it would require manual computation of the appropriate change amount. As such, sendall cannot replace all uses of SFFO, but it still has a different use case and will aid in simplifying some wallet calls and numerous wallet tests. _Sendall call details_ The proposed sendall call builds a transaction from a specific subset of the wallet's UTXO pool (by default all of them) and assigns the funds to one or more receivers. Receivers can either be specified with a given amount or receive an equal share of the remaining unassigned funds. At least one recipient must be provided without assigned amount to collect the remainder. The `sendall` call will never create change. The call has a `send_max` option that changes the default behavior of spending all UTXOs ("no UTXO left behind"), to maximizing the output amount of the transaction by skipping uneconomic UTXOs. The `send_max` option is incompatible with providing a specific set of inputs. --- Edit: Replaced OP with latest commit message to reflect my updated motivation of the proposal. ACKs for top commit: achow101: re-ACK bb84b7145b31dbfdcb4cf0b9b6e612a57e573993 Tree-SHA512: 20aaf75d268cb4b144f5d6437d33ec7b5f989256b3daeeb768ae1e7f39dc6b962af8223c5cb42ecc72dc38cecd921c53c077bc0ec300b994e902412213dd2cc3
2022-03-29doc: Speed up functional test runs using ramdiskwillcl-ark
Using a ramdisk for the functional tests can give worthwhile speed-ups for developers and reviewers. Add notes to test/README.md on how to setup, use and erase a ramdisk on Linux.
2022-03-29add tests for no recipient and using send_max while inputs are specifiedishaanam
2022-03-29Add sendall RPC née sweepMurch
_Motivation_ Currently, the wallet uses a fSubtractFeeAmount (SFFO) flag on the recipients objects for all forms of sending calls. According to the commit discussion, this flag was chiefly introduced to permit sweeping without manually calculating the fees of transactions. However, the flag leads to unintuitive behavior and makes it more complicated to test many wallet RPCs exhaustively. We proposed to introduce a dedicated `sendall` RPC with the intention to cover this functionality. Since the proposal, it was discovered in further discussion that our proposed `sendall` rpc and SFFO have subtly different scopes of operation. • sendall: Use _specific UTXOs_ to pay a destination the remainder after fees. • SFFO: Use a _specific budget_ to pay an address the remainder after fees. While `sendall` will simplify cases of spending from specific UTXOs, emptying a wallet, or burning dust, we realized that there are some cases in which SFFO is used to pay other parties from a limited budget, which can often lead to the creation of change outputs. This cannot be easily replicated using `sendall` as it would require manual computation of the appropriate change amount. As such, sendall cannot replace all uses of SFFO, but it still has a different use case and will aid in simplifying some wallet calls and numerous wallet tests. _Sendall call details_ The proposed sendall call builds a transaction from a specific subset of the wallet's UTXO pool (by default all of them) and assigns the funds to one or more receivers. Receivers can either be specified with a specific amount or receive an equal share of the remaining unassigned funds. At least one recipient must be provided without assigned amount to collect the remainder. The `sendall` call will never create change. The call has a `send_max` option that changes the default behavior of spending all UTXOs ("no UTXO left behind"), to maximizing the output amount of the transaction by skipping uneconomic UTXOs. The `send_max` option is incompatible with providing a specific set of inputs.
2022-03-28test: -peerblockfilters without -blockfilterindex raises an errorbrunoerg
2022-03-28Merge bitcoin/bitcoin#24623: test: Add diamond-shape prioritisetransaction testMarcoFalke
fa0758e1457552e9243bc9663408e88a8cccc8f6 test: Add diamond-shape prioritisetransaction test (MarcoFalke) fa450c18db7326b2924db435a753620895b41c53 test: Rework create_self_transfer_multi (MarcoFalke) Pull request description: Looks like there is no test for diamonds, only for chains (in `mempool_packages.py`) ACKs for top commit: jamesob: ACK https://github.com/bitcoin/bitcoin/pull/24623/commits/fa0758e1457552e9243bc9663408e88a8cccc8f6 Tree-SHA512: d261184a81df77d24fc256f58ad5ed4a13b7cd4e33f74c8b79495c761ff417817602d8e5d4f63f4bb1000ac63f89bbfa54d8d8994a7b2bb2e8a484c467330984
2022-03-28Merge bitcoin/bitcoin#24687: test: Check an invalid -i2psam will raise an ↵MarcoFalke
init error 45e67b2695852c94d5da3f9b82f2b567cbbd2cc3 test: invalid -i2psam will raise an init error (brunoerg) Pull request description: This PR adds test coverage (at `feature_proxy.py`) for the following init error: https://github.com/bitcoin/bitcoin/blob/2f0f056e08cd5a1435120592a9ecd212fcdb915b/src/init.cpp#L1791 It starts the node with an invalid -i2psam (`-i2psam=invalidhere`) and test if it raises an error when initializing. ACKs for top commit: dunxen: Code review ACK 45e67b2 Tree-SHA512: b24e3f6e7a9316b9ebc0b6c8bcf1315faff60a9e258d7bb3dbeb9f6695a728bb3083aea2f81114072fe13822bfca34d4a0f44f229825f7c97a81619d810010c0
2022-03-28Merge bitcoin/bitcoin#24258: test: check localaddresses in getnetworkinfo ↵MarcoFalke
for nodes with proxy 89bb25d22a0e1c700dba4e3b754984c9b2b14836 test: check localaddresses in getnetworkinfo for nodes with proxy (brunoerg) Pull request description: This PR adds test coverage for the field `localaddresses` for `getnetworkinfo`. In this case, it verifies if this field is empty for all nodes since they are using proxy. Reference: https://github.com/bitcoin/bitcoin/blob/515200298b555845696a07ae2bc0a84a5dd02ae4/src/init.cpp#L449 ACKs for top commit: jonatack: ACK 89bb25d22a0e1c700dba4e3b754984c9b2b14836 Tree-SHA512: 3c765c7060b6972c1ae5a1104734cd7669b650b5f6aa4f623f4299567732260da5083fef306a7c1e71c931f5d1396f24abad251d95c3d82b1f3ee0efee7fcd1f
2022-03-26test: invalid -i2psam will raise an init errorbrunoerg
2022-03-25Merge bitcoin/bitcoin#24494: wallet: generate random change target for each ↵fanquake
tx for better privacy 9053f64fcbd26d87c26ae6b982d17756a6ea0896 [doc] release notes for random change target (glozow) 46f2fed6c5e0fa623bfeabf61ba4811d5cf8f47c [wallet] remove MIN_CHANGE (glozow) a44236addd01cff4e4d751e0f379d399fbfc8eae [wallet] randomly generate change targets (glozow) 1e52e6bd0a8888efb4ed247d74ec7ca9dfc2e002 refactor coin selection for parameterizable change target (glozow) Pull request description: Closes #24458 - the wallet always chooses 1 million sats as its change target, making it easier to fingerprint transactions created by the Core wallet. Instead of using a fixed value, choose one randomly each time (within a range). Using 50ksat (around $20) as the lower bound and `min(1 million sat, 2 * average payment value)` as the upper bound. RFC: If the payment is <25ksat, this doesn't work, so we're using the range (payment amount, 50ksat) instead. ACKs for top commit: achow101: ACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Xekyo: reACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Tree-SHA512: 45ce5d064697065549473347648e29935733f3deffc71a6ab995449431f60302d1f9911a0994dfdb960b48c48b5d8859f168b396ff2a62db67d535a7db041d35
2022-03-25Merge bitcoin/bitcoin#24502: wallet: don't create long chains by defaultMarcoFalke
da2bc865d644f6be748c305556bdd02f02d1b161 [wallet] don't create long chains by default (glozow) Pull request description: Default mempool policy doesn't let you have chains longer than 25 transactions. This is locally configurable of course, but it's not really safe to assume that a chain longer than 25 transactions will propagate. Thus, the wallet should probably avoid creating such transactions by default; set `DEFAULT_WALLET_REJECT_LONG_CHAINS` to true. Closes #9752 Closes #10004 ACKs for top commit: MarcoFalke: re-ACK da2bc865d644f6be748c305556bdd02f02d1b161 only change is fixing typos in tests 🎏 Tree-SHA512: 65d8e4ec437fe928adf554aa7e819a52e0599b403d5310895f4e371e99bbc838219b3097c4d2f775bc870ac617ef6b4227b94291f2b376f824f14e8f2b152f31
2022-03-25[wallet] don't create long chains by defaultglozow
2022-03-25Merge bitcoin/bitcoin#24670: test: move-only: Move all generate* tests to a ↵MarcoFalke
single file 0000ff0d6b2442706a588fd906ebf1adf8ff8226 test: move-only: Move all generate* tests to a single file (MarcoFalke) Pull request description: Seems a bit overkill to spread tests for the `generate*` methods over several files. Combining them into a single file has also a nice side-effect of requiring less node (re)starts, which are expensive in valgrind. ACKs for top commit: glozow: utACK 0000ff0d6b2442706a588fd906ebf1adf8ff8226 Tree-SHA512: 8269eb05649a871011bbfbd1838d0f7d1dac4a35b3b198fc43fe85131fda8a53803b75da78cbf422eabf086006dee4421e622fbe706f6781a3848b989024001b
2022-03-25Merge bitcoin/bitcoin#21160: net/net processing: Move tx inventory into ↵fanquake
net_processing 1066d10f71e6800c78012d789ff6ae19df0243fe scripted-diff: rename TxRelay members (John Newbery) 575bbd0dea6d12510fdf3220d0f0e47d969da6e9 [net processing] Move tx relay data to Peer (John Newbery) 785f55f7eeab0dedbeb8e0d0b459f3bdc538b621 [net processing] Move m_wtxid_relay to Peer (John Newbery) 36346703f8558d6781c079c29ddece5a97477beb [net] Add CNode.m_relays_txs and CNode.m_bloom_filter_loaded (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all tx data into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: dergoegge: ACK 1066d10f71e6800c78012d789ff6ae19df0243fe - This is a good layer separation improvement with no behavior changes. glozow: utACK 1066d10f71e6800c78012d789ff6ae19df0243fe Tree-SHA512: 0c9d6b8a0a05e2d816b6d6588b7df133842ec960ae67667813422aa7bd8eb5308599c714f3822a98ddbdf364ffab9050b055079277ba4aff24092557ff99ebcc
2022-03-25Merge bitcoin/bitcoin#23536: Enforce Taproot script flags whenever WITNESS ↵laanwj
is set cccc1e70b8a14430cc94143da97936a60d6c83d3 Enforce Taproot script flags whenever WITNESS is set (MarcoFalke) fa422994116a7a053789304d56159760081479eb Remove nullptr check in GetBlockScriptFlags (MarcoFalke) faadc606c7644f2934de390e261d9d65a81a7592 refactor: Pass const reference instead of pointer to GetBlockScriptFlags (MarcoFalke) Pull request description: Now that Taproot is active, it makes sense to enforce its rules on all blocks, even historic ones, regardless of the deployment status. ### Benefits: (With "script flags" I mean "taproot script verification flags".) * Script flags are known ahead for all blocks (even blocks not yet created) and do not change. This may benefit static analysis, code review, and development of new script features that build on Taproot. * Any future bugs introduced in the deployment code won't have any effect on the script flags, as they are independent of deployment. * Enforcing the taproot rules regardless of the deployment status makes testing easier because invalid blocks after activation are also invalid before activation. So there is no need to differentiate the two cases. * It gives belt-and-suspenders protection against a practically expensive and theoretically impossible IBD reorg attack where the node is eclipsed. While `nMinimumChainWork` already protects against this, the cost for a few months worth of POW might be lowered until a major version release of Bitcoin Core reaches EOL. The needed work for the attack is the difference between `nMinimumChainWork` and the work at block 709632. For reference, previously the same was done for P2SH and WITNESS in commit 0a8b7b4b33c9d78574627fc606267e2d8955cd1c. ### Implementation: I found one block which fails verification with the flags applied, so I added a `TaprootException`, similar to the `BIP16Exception`. For reference, the debug log: ``` ERROR: ConnectBlock(): CheckInputScripts on b10c007c60e14f9d087e0291d4d0c7869697c6681d979c6639dbd960792b4d41 failed with non-mandatory-script-verify-flag (Witness program was passed an empty witness) BlockChecked: block hash=0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad state=non-mandatory-script-verify-flag (Witness program was passed an empty witness) InvalidChainFound: invalid block=0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad height=692261 log2_work=92.988459 date=2021-07-23T08:24:20Z InvalidChainFound: current best=0000000000000000000067b17a4c0ffd77c29941b15ad356ca8f980af137a25d height=692260 log2_work=92.988450 date=2021-07-23T07:47:31Z ERROR: ConnectTip: ConnectBlock 0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad failed, non-mandatory-script-verify-flag (Witness program was passed an empty witness) ``` Hint for testing, make sure to set `-noassumevalid`. ### Considerations Obviously this change can lead to consensus splits on the network in light of massive reorgs. Currently the last block before Taproot activation, that is the last block without the Taproot script flags set, is only buried by a few days of POW. However, when and if this patch is included in the next major release, it will be buried by a few months of POW. BIP90 considerations apply when looking at reorgs this large. ACKs for top commit: Sjors: tACK cccc1e70b8a14430cc94143da97936a60d6c83d3 achow101: ACK cccc1e70b8a14430cc94143da97936a60d6c83d3 laanwj: Code review ACK cccc1e70b8a14430cc94143da97936a60d6c83d3 ajtowns: ACK cccc1e70b8a14430cc94143da97936a60d6c83d3 ; code review; wrote a "getblockscriptflags" rpc to quickly check that blocks just had bit 17 (taproot) added; review of earlier revisions had established non-exception blocks do validate with taproot rules enabled. jamesob: ACK cccc1e70b8a14430cc94143da97936a60d6c83d3 ([`jamesob/ackr/23536.1.MarcoFalke.enforce_taproot_script_f`](https://github.com/jamesob/bitcoin/tree/ackr/23536.1.MarcoFalke.enforce_taproot_script_f)) Tree-SHA512: 00044de68939caef6420ffd588c1291c041a8b397c80a3df1e3e3487fbeae1821d23975c51c95e44e774558db76f943b00b4e27cbd0213f64a9253116dc6edde
2022-03-25[wallet] randomly generate change targetsglozow
If the wallet always chooses 1 million sats as its change target, it is easier to fingerprint transactions created by the Core wallet.
2022-03-25test: move-only: Move all generate* tests to a single fileMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra
2022-03-24Merge bitcoin/bitcoin#24205: init, test: improve network reachability test ↵MarcoFalke
coverage and safety 58a14795b89a6bd812e0b71cb8b3088b8ab55c11 test: passing -onlynet=onion with -onion=0/-noonion raises expected init error (Jon Atack) 7000f66d367123d1de303fc15ce2ce60df379c11 test: passing -onlynet=onion without -proxy/-onion raises expected init error (Jon Atack) 8332e6e4cf45455fea0bf1f7527256cdb7bb1e6d test: passing invalid -onion raises expected init error (Jon Atack) d5edb087082a50e6f7d413c3b43fdf1e6a20d29b test: passing invalid -proxy raises expected init error (Jon Atack) bd57dcbaf2b5e5f50833912c894a1f1239ceb25b test: hoist proxy out of 2 network loops in feature_proxy.py (Jon Atack) afdf2de28296660fd0284453a241aece8494eea8 test: add CJDNS to LimitedAndReachable_Network unit tests (Jon Atack) 2b7a8180a94738c2fcb21232a2eca07a7b27656d net, init: assert each network reachability is true by default (Jon Atack) Pull request description: Adds missing network reachability test coverage and an assertion during init, noticed while reviewing #22834: - assert during init that each network reachability is true by default - add CJDNS to the `LimitedAndReachable_Network` unit tests - hoist proxy out of two network loops in feature_proxy.py - test that passing invalid `-proxy` raises expected init error - test that passing invalid `-onion` raises expected init error - test that passing `-onlynet=onion` without `-proxy` and `-onion` raises expected init error - test that passing `-onlynet=onion` with `-onion=0` and with `-noonion` raises expected init error ACKs for top commit: vasild: ACK 58a14795b89a6bd812e0b71cb8b3088b8ab55c11 brunoerg: ACK 58a14795b89a6bd812e0b71cb8b3088b8ab55c11 dongcarl: Code Review ACK 58a14795b89a6bd812e0b71cb8b3088b8ab55c11 Tree-SHA512: bdee6dd0c12bb63591ce7c9321fe77b509ab1265123054e774adc38a187746dddafe1627cbe89e990bcc78b45e194bfef8dc782710d5b217e2e2106ab0158827
2022-03-24Merge bitcoin/bitcoin#24653: test: use `MiniWallet` in ↵MarcoFalke
`test/functional/interface_zmq` bc90b8d86916d43867762a391633664676550bd8 [move only] remove `is_wallet_compiled` checks (josibake) 0bfbf7fb2488753d795ffc1c63a8977e4fe4a3bc test: use MiniWallet in `interfaces_zmq` (josibake) Pull request description: While working on #24584 , `interface_zmq` started failing due to coin selection not running deterministically. The test doesn't actually need the wallet, so this PR migrates it to use MiniWallet _Note for reviewers:_ the second commit moves large chunks of code out of an if block, so it may be helpful to review with something that ignores whitespace, e.g `git diff -w master` ACKs for top commit: vincenzopalazzo: ACK https://github.com/bitcoin/bitcoin/pull/24653/commits/bc90b8d86916d43867762a391633664676550bd8 Tree-SHA512: c618e23d00635d72dafdef28e68cbc88b9cc2030d4898fc5b7eac926fd621684c1958c075ed167192716b18308da5a0c1f1393396e31b99d0d3bde78b78fefc5
2022-03-24test: Add diamond-shape prioritisetransaction testMarcoFalke
2022-03-24test: Rework create_self_transfer_multiMarcoFalke
* Add fallback for utxos_to_spend if none are provided * Refactor a for-loop
2022-03-24Merge bitcoin/bitcoin#24626: init: disallow reindex-chainstate when pruningMarcoFalke
b2813980b81034ff9b40bd45080fa67dea475d39 init: disallow reindex-chainstate when pruning (Martin Zumsande) Pull request description: The combination of `-reindex-chainstate` and `-prune` currently makes the node stuck in an endless loop: - `LoadChainstate()` will wipe the existing chainstate (so we have no genesis block anymore). It won't clean up unusable block files by calling `CleanupBlockRevFiles()` as for full `-reindex`. - `ThreadImport()` has [logic](https://github.com/bitcoin/bitcoin/blob/91d12344b1e51809c1ef6b630b631a6da00267c3/src/node/blockstorage.cpp#L855) of reloading Genesis after reindexing. This is what makes full `-reindex` work with `-prune` but it's not executed for `-reindex-chainstate`. - Since we still don't have a genesis block, init will wait for it forever in an endless loop ([code](https://github.com/bitcoin/bitcoin/blob/91d12344b1e51809c1ef6b630b631a6da00267c3/src/init.cpp#L1630-L1640)). Fix this by disallowing `-reindex-chainstate` together with `-prune`. This is discouraged in the help for `-reindex-chainstate` anyway ("When in pruning mode or if blocks on disk might be corrupted, use full -reindex instead.") but wasn't enforced. Fixes #24242 ACKs for top commit: MarcoFalke: cr ACK b2813980b81034ff9b40bd45080fa67dea475d39 Tree-SHA512: 7220842daaf9a4f972d82b13b81fdeac2833bf5e665c5b0f8eaf6a4bcd0725c8e97d19ec956ca4b730065a983475bb3a2732713d338f4caf8666ccbf63d4d988
2022-03-24init: disallow reindex-chainstate when pruningMartin Zumsande
This fixes a bug where the node would be stuck in an endless loop when combining these parameters.
2022-03-24Merge bitcoin/bitcoin#24574: test: Actually print TSan tracebacksfanquake
fa76d8d4d71d844e217686881d4f630eac3a8e10 test: Actually print TSan tracebacks (MarcoFalke) Pull request description: Commit 5e5138a721738f47053d915e4c65f925838ad5b4 made the TSan logs to be printed before returning an error from the ci script. However, it seems that on Cirrus CI, the `--failfast` option will kill not only all python process and bitcoind child process, but also the parent CI bash script, rendering the `trap` inefficient. I believe this bug was introduced in commit 451b96f7d2796d00eabaec56d831f9e9b1a569cc. ACKs for top commit: fanquake: utACK fa76d8d4d71d844e217686881d4f630eac3a8e10 Tree-SHA512: 686f889d38a343882cb62ad6e0c2080196330e7cc7086891a7ff66d9443b455c82ba8d7e4a5cc42daa0513b0ad2743055bfe90e2f6ac88a910ee3b663fabddcd
2022-03-24Merge bitcoin/bitcoin#24637: test: use MiniWallet for mempool_package_onemore.pyMarcoFalke
2b6dd4e75b3ad2daff553fde018fe4c8f1187878 test: use MiniWallet for mempool_package_onemore.py (Sebastian Falbesoner) eb3c5c4ef2eeb1d37d729d4487ed067a24cf81c8 test: MiniWallet: add helper methods `{send,create}_self_transfer_multi` (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (mempool_package_onemore.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. For this purpose helper methods `MiniWallet.{create,send}_self_transfer_multi` are introduced which serve as a replacement for `chain_transaction`. With this, it should be also quite straight-forward to change the larger related test `mempool_packages.py` to use MiniWallet. ACKs for top commit: MarcoFalke: ACK 2b6dd4e75b3ad2daff553fde018fe4c8f1187878 💾 Tree-SHA512: 0c97fa0519ca5eaa6df8953a04678aa8a6a66905a82db6ff40042a675d0c0682aee829a48db84e4e7983d8f766875021f0d39d65e12889342610b8861bc29cd5
2022-03-24Merge bitcoin/bitcoin#24587: test: use MiniWallet for rpc_createmultisig.pyfanquake
2726b60a3ac098b44f2970bed21147b70e12a1c2 test: use MiniWallet for rpc_createmultisig.py (Ayush Sharma) Pull request description: This PR enables one of the non-wallet functional tests (rpc_createmultisig.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078 . ACKs for top commit: danielabrozzoni: re-ACK 2726b60a3ac098b44f2970bed21147b70e12a1c2 Tree-SHA512: fb0ef22d3f1c161ca5963cb19ce76533ac3941f15102fc0aa2286ef3bec48f219e5934d504b41976f9f295fb6ca582b737e0fea896df4eb964cdaba1b2c91650
2022-03-24[move only] remove `is_wallet_compiled` checksjosibake
2022-03-24test: use MiniWallet in `interfaces_zmq`josibake
make interfaces_zmg run deterministically. this test is for the zmg notifications, so it doesn't need the wallet compiled to run
2022-03-23Merge bitcoin/bitcoin#24635: test: Run non-wallet tests only oncefanquake
fa7a576391ad5d61af937dd62496ded44105c671 test: Run non-wallet tests only once (MarcoFalke) Pull request description: I don't see why non-wallet tests should run for two wallet configs, even though they never use a wallet. ACKs for top commit: achow101: ACK fa7a576391ad5d61af937dd62496ded44105c671 Tree-SHA512: 2a135acf3c3c83a2704ae11f40c72882b23a676828647be1a066653c4d00e4523704f377eb8745c6386829601cc5d643abdce376831c1db91a07e999e1d5e01f
2022-03-22test: check localaddresses in getnetworkinfo for nodes with proxybrunoerg
2022-03-22test: use MiniWallet for mempool_package_onemore.pySebastian Falbesoner
This test can now be run even with the Bitcoin Core wallet disabled.
2022-03-22test: MiniWallet: add helper methods `{send,create}_self_transfer_multi`Sebastian Falbesoner
2022-03-22test: use MiniWallet for rpc_createmultisig.pyAyush Sharma
This test can now be run even with the Bitcoin Core wallet disabled.
2022-03-22Merge bitcoin/bitcoin#24535: test: Fix generate calls and comments in ↵MarcoFalke
feature_segwit fa8593f89892ddb09b64a7740087b725b3d7b5eb test: Fix generate calls and comments in feature_segwit (MarcoFalke) Pull request description: There are currently a few incorrect comments: Block `432` is mined "twice" (The second one is actually 433). There isn't any need to mine this many blocks anyway, so remove a few calls. ACKs for top commit: theStack: Tested ACK fa8593f89892ddb09b64a7740087b725b3d7b5eb Tree-SHA512: b034077b85e6c978a80aa4de493797b4ae451d686cfb3e4fe40f37a38f41f7cb886f8e00a1c245a284be3502164b17414097fcb0bef66d155a1c1db5cfbe9e8f
2022-03-22test: Run non-wallet tests only onceMarcoFalke
2022-03-22Merge bitcoin/bitcoin#24605: test: Use MiniWallet in feature_coinstatsindexMarcoFalke
fa48ea3067698954dd6630748964429686d8eaba Use MiniWallet in feature_coinstatsindex (MarcoFalke) fab61437f68d2fa9c791f09ab6d53e3c7be535e0 test: Refactor MiniWallet get_utxo helper (MarcoFalke) Pull request description: Allows the test to be run even without a wallet compiled ACKs for top commit: josibake: ACK https://github.com/bitcoin/bitcoin/pull/24605/commits/fa48ea3067698954dd6630748964429686d8eaba ayush933: tACK fa48ea3 . The test runs successfully with the wallet disabled. willcl-ark: tACK https://github.com/bitcoin/bitcoin/commit/fa48ea3067698954dd6630748964429686d8eaba both with and without wallet compiled in. Tree-SHA512: e04e04ea0f236c062d6be68909ece2770130ce1d5343823893073d95aebc6eedb1ad1dc5bc41e5b0cb0bf2cd9018bb1d668f0e7f5f1101ed4e0b007ed6b00f69
2022-03-18test: Fix generate calls and comments in feature_segwitMarcoFalke
2022-03-18scripted-diff: rename TxRelay membersJohn Newbery
-BEGIN VERIFY SCRIPT- ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); } ren cs_filter m_bloom_filter_mutex ren fRelayTxes m_relay_txs ren pfilter m_bloom_filter ren cs_tx_inventory m_tx_inventory_mutex ren filterInventoryKnown m_tx_inventory_known_filter ren setInventoryTxToSend m_tx_inventory_to_send ren fSendMempool m_send_mempool ren nNextInvSend m_next_inv_send_time ren minFeeFilter m_fee_filter_received ren lastSentFeeFilter m_fee_filter_sent -END VERIFY SCRIPT-
2022-03-17Use MiniWallet in feature_coinstatsindexMarcoFalke
2022-03-17test: Refactor MiniWallet get_utxo helperMarcoFalke
2022-03-16test: Fix intermittent failure in feature_segwitDrahtBot
2022-03-15test: Actually print TSan tracebacksMarcoFalke
2022-03-15Merge bitcoin/bitcoin#24510: test: check for importprunedfunds RPC errorsMarcoFalke
7573789925f6b5c3d73f43d2ebf8c732945c1824 test: check for importprunedfunds RPC errors (Sebastian Falbesoner) Pull request description: This PR adds missing test coverage for the following errors of the `importprunedfunds` RPC: https://github.com/bitcoin/bitcoin/blob/7003b6ab24f6adfffd71d7b7d4182afde52ff859/src/wallet/rpc/backup.cpp#L320-L322 https://github.com/bitcoin/bitcoin/blob/7003b6ab24f6adfffd71d7b7d4182afde52ff859/src/wallet/rpc/backup.cpp#L332-L334 https://github.com/bitcoin/bitcoin/blob/7003b6ab24f6adfffd71d7b7d4182afde52ff859/src/wallet/rpc/backup.cpp#L338-L340 https://github.com/bitcoin/bitcoin/blob/7003b6ab24f6adfffd71d7b7d4182afde52ff859/src/wallet/rpc/backup.cpp#L343-L345 ACKs for top commit: MarcoFalke: review ACK 7573789925f6b5c3d73f43d2ebf8c732945c1824 Tree-SHA512: b054520d102e5940bdeed2456ca644e91afb187d169b751b1262ce34480e4e9fbe1616ab184a78777c184350dced23508c3d367ed5825cab78bb5ad687fd7dac
2022-03-14Merge bitcoin/bitcoin#24505: wallet: Add a deprecation warning for newly ↵MarcoFalke
created legacy wallets 61152183ab18960c8b42cf22ff7168762946678e wallet: Add a deprecation warning for newly created legacy wallets (Andrew Chow) Pull request description: As we slowly deprecate legacy wallets, we need to warn users that are making new legacy wallets that their wallet type is going to be unsupported in the future. ACKs for top commit: jonatack: ACK 61152183ab18960c8b42cf22ff7168762946678e S3RK: reACK 61152183ab18960c8b42cf22ff7168762946678e theStack: ACK 61152183ab18960c8b42cf22ff7168762946678e Tree-SHA512: e89bfb8168869542498958f0c9a2ab302dfd43287f8a49e7d9e09f60438a567bb8b7219a4e569797ee819b30b624f532fcc0b70c6aa0edcb392a301b8ce8b541
2022-03-13Merge bitcoin/bitcoin#24528: rpc: rename getdeploymentinfo status-next to ↵MarcoFalke
status_next 5d7c69b8871aad747969247c7a047b439c5ca59e rpc: rename getdeploymentinfo status-next to status_next (Jon Atack) Pull request description: Rename the `status-next` field to `status_next` in getdeploymentinfo before the RPC is released in v23. Before ``` Result: { (json object) "hash" : "str", (string) requested block hash (or tip) "height" : n, (numeric) requested block height (or tip) "deployments" : { (json object) "xxxx" : { (json object) name of the deployment "type" : "str", (string) one of "buried", "bip9" "height" : n, (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) "active" : true|false, (boolean) true if the rules are enforced for the mempool and the next block "bip9" : { (json object, optional) status of bip9 softforks (only for "bip9" type) "bit" : n, (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status) "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in "min_activation_height" : n, (numeric) minimum height of blocks for which the rules may be enforced "status" : "str", (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed") "since" : n, (numeric) height of the first block to which the status applies "status-next" : "str", (string) status of deployment at the next block "statistics" : { (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status) "period" : n, (numeric) the length in blocks of the signalling period "threshold" : n, (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status) "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period "count" : n, (numeric) the number of blocks with the version bit set in the current period "possible" : true|false (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status) }, "signalling" : "str" (string) indicates blocks that signalled with a # and blocks that did not with a - } } } } ``` After ``` Result: { (json object) "hash" : "str", (string) requested block hash (or tip) "height" : n, (numeric) requested block height (or tip) "deployments" : { (json object) "xxxx" : { (json object) name of the deployment "type" : "str", (string) one of "buried", "bip9" "height" : n, (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) "active" : true|false, (boolean) true if the rules are enforced for the mempool and the next block "bip9" : { (json object, optional) status of bip9 softforks (only for "bip9" type) "bit" : n, (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status) "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in "min_activation_height" : n, (numeric) minimum height of blocks for which the rules may be enforced "status" : "str", (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed") "since" : n, (numeric) height of the first block to which the status applies "status_next" : "str", (string) status of deployment at the next block "statistics" : { (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status) "period" : n, (numeric) the length in blocks of the signalling period "threshold" : n, (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status) "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period "count" : n, (numeric) the number of blocks with the version bit set in the current period "possible" : true|false (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status) }, "signalling" : "str" (string) indicates blocks that signalled with a # and blocks that did not with a - } } } } ``` Top commit has no ACKs. Tree-SHA512: 4facfd7af3cfb7b6f5495758c4387602802f5e39d9270b162d17350a7f954eab0b74d895f17f0d8dfbc7814d36db7cff56d08c42728432885ea6f4e37aea4aa8
2022-03-11test: use MiniWallet for feature_maxuploadtarget.pySebastian Falbesoner
This test can now be run even with the Bitcoin Core wallet disabled.
2022-03-11Merge bitcoin/bitcoin#24421: miner: always assume we can build witness blocksfanquake
40e871d9b4e55f5b5f7ce2a89157cd3d9f152037 [miner] always assume we can create witness blocks (glozow) Pull request description: Given the low possibility of a reorg reverting the segwit soft fork, there is no longer a need to check whether segwit is active to see if it's okay to add to the block template (see also #23512, #21009, etc). `TestBlockValidity()` is also run on the block template at the end of `CreateNewBlock()`, so any invalid block would be caught there. ACKs for top commit: gruve-p: ACK https://github.com/bitcoin/bitcoin/pull/24421/commits/40e871d9b4e55f5b5f7ce2a89157cd3d9f152037 jnewbery: utACK 40e871d9b4, although I disagree about changing the test for segwit transaction in mempool before activagtion, instead of just removing it: https://github.com/bitcoin/bitcoin/pull/24421#discussion_r822933721. achow101: ACK 40e871d9b4e55f5b5f7ce2a89157cd3d9f152037 theStack: Code-review ACK 40e871d9b4e55f5b5f7ce2a89157cd3d9f152037 Tree-SHA512: bf4860bf2bed8339622d05228d11d60286edb0c32a9a3c434b8d154913c07ea56e50649f4af7009c2a1c6a58a81d2299ab43b41a6f16dee7d08cc89cc1603019
2022-03-11rpc: rename getdeploymentinfo status-next to status_nextJon Atack