aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2023-01-23init: Remove sensitive flag from rpcbindAndrew Chow
2023-01-23test: Avoid rpc timeout in p2p_headers_sync_with_minchainworkMarcoFalke
2023-01-21test: Fix intermittent feature_rbf issueMarcoFalke
2023-01-20rpc: Throw more user friendly arg type check errorMarcoFalke
2023-01-19Merge bitcoin/bitcoin#26906: test: add an easy way to run linters locallyMarcoFalke
b68e5a7feff3e93027e75da0cd9a590fef99aac1 lint: specify the right commit range when running locally (James O'Beirne) dff7ed5732c01b3ba47ef9e9ddb687d073d7739d test: add an easy way to run linters locally (James O'Beirne) Pull request description: Adds a Dockerfile configuration ~~(originally written mostly by fanquake)~~ that allows straightforward running of linters with compatible versions locally. This removes a ton of annoyance when trying to appease CI, because many of the linter versions are quite old and difficult to maintain locally. I realize that people may not be thrilled to add more ancillary tooling to the repo, but I think this makes a lot of sense given the linter versions listed in this container configuration are dictated by this repo (within the CI configuration), so having these things live in two separate places is a recipe for version mismatches. Eventually we can likely just use this container on CI directly to avoid any chance of inconsistencies between local dev experience and CI. ACKs for top commit: aureleoules: ACK b68e5a7feff3e93027e75da0cd9a590fef99aac1 stickies-v: ACK b68e5a7fe john-moffett: ACK b68e5a7feff3e93027e75da0cd9a590fef99aac1 Tree-SHA512: 7ef7a5dae023d81fdb6296d5d92dfa074ee321c7993e607c9f014d0f21c91558611aa00fc3ce1edc7b5e68371aea0d27fa1931291a79bb867a6c783bb536775f
2023-01-19test: refactor: simplify p2p_eviction.py by using MiniWalletSebastian Falbesoner
Also, use the pre-mined chain of the test framework rather than mining 100 blocks manually on each run.
2023-01-19test: refactor: simplify p2p_tx_download.py by using MiniWalletSebastian Falbesoner
2023-01-19Merge bitcoin/bitcoin#23395: util: Add -shutdownnotify optionMarcoFalke
d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d doc: Add release note for shutdownnotify. (klementtan) 0bd73e2c453e8a88312edf43d184c33109f12ad6 util: Add -shutdownnotify option. (klementtan) Pull request description: **Description**: Similar to `-startupnotify`, this PR adds a new option to allow users to specify a command to be executed when Bitcoin Core shuts down. **Note**: The `shutdownnotify` commands will not be executed if bitcoind shut down due to *unexpected* reasons (ie `killall -9 bitcoind`). ### Testing: **Normal shutdown commands** ``` # start bitcoind with shutdownnotify optioin ./src/bitcoind -signet -shutdownnotify="touch foo.txt" # shutdown bitcoind ./src/bitcoin-cli -signet stop # check that foo.txt has been created ``` **Final RPC call** Commands: ``` $ ./src/bitcoind -signet -nolisten -noconnect -shutdownnotify="./src/bitcoin-cli -signet getblockchaininfo > tmp.txt" $ ./src/bitcoin-cli stop $ cat tmp.txt ``` <details> <summary>Screen Shot</summary> ![image](https://user-images.githubusercontent.com/49265907/141186183-cbc6f82c-400d-4a8b-baba-27c0346c2c8a.png) </details> ACKs for top commit: achow101: ACK d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d 1440000bytes: ACK https://github.com/bitcoin/bitcoin/pull/23395/commits/d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d theStack: re-ACK d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d Tree-SHA512: 16f7406fd232e8b97aea5e58854c84755b0c35c88cb3ef9ee123b29a1475a376122b1e100da860cc336d4d657e6046a70e915fdb9b70c9fd097c6eef1b028161
2023-01-18wallet: migrate wallet, exit early if no legacy data existfurszy
otherwise the process will create a backup file then return an error when notices that the db is already running sqlite.
2023-01-18test: add an easy way to run linters locallyJames O'Beirne
Adds a Dockerfile configuration that allows straightforward running of linters with compatible versions locally. This removes a ton of annoyance when trying to appease CI, because many of the linter versions are quite old and difficult to maintain locally. I realize that people may not be thrilled to more ancillary tooling to the repo, but I think this makes a lot of sense given the linter versions listed in this container configuration are dictated by this repo (within the CI configuration), so having these things live in two separate places is a recipe for version mismatches. Eventually we can likely just use this container on CI directly to avoid any chance of inconsistencies between local dev experience and CI.
2023-01-18scripted-diff: Use new python 3.7 keywordsMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i 's/universal_newlines/text/g' $(git grep -l universal_newlines) -END VERIFY SCRIPT-
2023-01-17Improve address decoding errorsAurèle Oulès
2023-01-17Merge bitcoin/bitcoin#26625: test: Run mempool_packages.py with MiniWalletfanquake
fa6b4021142154f52fc35360e409907360808801 test: Run mempool_packages.py with MiniWallet (MarcoFalke) fa448c27d2cdd70698a4188c7478996ff8804556 test: Return fee from MiniWallet (MarcoFalke) faec09f240213e8540e8559a3b4396ee93950cb4 test: Return chain of MiniWallet txs from MiniWallet chain method (MarcoFalke) faa12d4ccd2ed14a4b892816b4771d7ff8d0d8a0 test: Refactor MiniWallet sign_tx (MarcoFalke) fa2d82103fcd3b9084edd2268443f61ca5af969c test: Return wtxid from create_self_transfer_multi (MarcoFalke) Pull request description: This allows to run the test even when no wallet is compiled in. Also, it is a lot nicer to read now. ACKs for top commit: glozow: reACK fa6b402 Tree-SHA512: de0338068fd51db01d64ce270f94fd2982a63a6de597325cd1e1f11127e9075bd4aeacace0ed76d09a2db8b962b27237cf11edb4c1fe1a01134d397f8a11bd05
2023-01-17test: Add test for missing and omitted required argMarcoFalke
2023-01-17test: add tests for `outputs` argument to `bumpfee`/`psbtbumpfee`Seibart Nedor
2023-01-17Merge bitcoin/bitcoin#26884: test: wallet: add coverage for ↵MarcoFalke
`-spendzeroconfchange` setting 603d29519931e6ab6a58db09b9d3eb9b355fe566 test: wallet: add coverage for `-spendzeroconfchange` setting (Sebastian Falbesoner) 50112034bcdd177311679610ef2f3c2c42d6819e test: remove `-spendzeroconfchange` setting from mempool_limit.py (Sebastian Falbesoner) Pull request description: This PR adds missing test coverage for the `-spendzeroconfchange` setting (in particular the non-default case `=0`). Note that in contrast to the name, the setting does not only apply to change outputs, but in fact to _all_ unconfirmed outputs that we sent to ourselves, i.e. we can trigger the testing path simply with a single recipient address. The first commit removes the setting from the functional test mempool_limit.py, where it doesn't have any effect, since the test was changed to use MiniWallet in commit dddca3899c4738e512313a85aeb006310e34e31f. ACKs for top commit: brunoerg: crACK 603d29519931e6ab6a58db09b9d3eb9b355fe566 Tree-SHA512: 15d9c8bd5eb37c6b228bf887eb27debee0a391c82356662785da4553ee2558e611834c3936ef7136812b46f877bab7aa5f3088bbd278b81f296bdda96cc8e1c3
2023-01-17Merge bitcoin/bitcoin#26039: refactor: Run type check against RPCArgs (1/2)fanquake
fa9f6d7bcdba5f18c46fff1dcc0ac6d3dd8db75d rpc: Run type check against RPCArgs (MarcoFalke) faf96721a66dcc215ea9d6affb30f9a00cc37000 test: Fix wrong types passed to RPCs (MarcoFalke) Pull request description: It seems brittle to require `RPCTypeCheck` being called inside the code logic. Without compile-time enforcement this will lead to places where it is forgotten and thus to inconsistencies and bugs. Fix this by removing the calls to `RPCTypeCheck` and doing the check internally. The changes should be reviewed as refactoring changes. However, if they change behavior, it will be a bugfix. For example the changes here happen to also detect/fix bugs like the one fixed in commit 3b5fb6e77a93f58b3d03b1eec3595f5c45e633a9. ACKs for top commit: ajtowns: ACK fa9f6d7bcdba5f18c46fff1dcc0ac6d3dd8db75d Tree-SHA512: fb2c0981fe6e24da3ca7dbc06898730779ea4e02ea485458505a281cf421015e44dad0221a04023fc547ea2c660d94657909843fc85d92b847611ec097532439
2023-01-17test: Run mempool_packages.py with MiniWalletMarcoFalke
2023-01-17test: Return fee from MiniWalletMarcoFalke
2023-01-17test: Return chain of MiniWallet txs from MiniWallet chain methodMarcoFalke
2023-01-17test: Refactor MiniWallet sign_txMarcoFalke
To make the code less verbose and easier to read.
2023-01-17test: Return wtxid from create_self_transfer_multiMarcoFalke
This is not used right now, but may be in the future. Also, it simplifies the create_self_transfer return logic
2023-01-17Merge bitcoin/bitcoin#26886: test: add `rescan utxos` inside MiniWallet's ↵MarcoFalke
initialization 6bd098a838881ba615c01354560a70d47256f90f test: simplify tests by using the pre-mined chain (kouloumos) 42029a7fd42e93426bdfb40d1918d739d20962af test: remove redundant blocks generation logic (kouloumos) 0377d6bb420b9a2fb79af0ebe088d2b20ec808a5 test: add `rescan_utxos` in MiniWallet's initialization (kouloumos) Pull request description: When a pre-mined blockchain is used (default behavior), it [contains coinbase outputs in blocks 76-10](https://github.com/bitcoin/bitcoin/blob/07c54de550035c3441f34ef6c34209666267eb38/test/functional/test_framework/test_framework.py#L809-L813) to [the MiniWallet's default address](https://github.com/bitcoin/bitcoin/blob/07c54de550035c3441f34ef6c34209666267eb38/test/functional/test_framework/wallet.py#L99-L101). That's why we always* `rescan_utxos()` after initializing the MiniWallet, in order for the MiniWallet to account for those mature UTXOs. > The tests following this usage pattern can be seen with: > ```git grep -n "MiniWallet(" $(git grep -le "rescan_utxos()" $(git grep -Le "self.setup_clean_chain = True"))``` **This PR adds `rescan_utxos()` inside MiniWallet's initialization to simplify usage when the MiniWallet is used with a pre-mined chain.** ### secondary changes - *There are a few tests that use the pre-mined blockchain but do not `rescan_utxos()`, they instead generate new blocks to create mature UTXOs. > Those were written before the `rescan_utxos()` method was introduced with https://github.com/bitcoin/bitcoin/pull/22955 (fac66d0a39cb0b4bc565b57087ba84dd932e9b6d) and can be seen with: > `git grep -n "MiniWallet(" $(git grep -Le "rescan_utxos()" $(git grep -Le "self.setup_clean_chain = True"))` > After including `rescan_utxos()` inside MiniWallets initilization, this blocks generation logic is not needed as the MiniWallet already accounts for enough mature UTXOs to perform the tests. **Therefore the now redundant blocks generation logic is removed from those tests with the second commit.** - The rest of the MiniWallet tests use a clean chain (`self.setup_clean_chain = True`) and can be seen with `git grep -n "MiniWallet(" $(git grep -le "self.setup_clean_chain = True")` From those, there are a few that start from a clean chain and then create enough mature UTXOs for the MiniWallet with this kind of logic: https://github.com/bitcoin/bitcoin/blob/07c54de550035c3441f34ef6c34209666267eb38/test/functional/mempool_expiry.py#L36-L40 **Those tests are simplified in the third commit to instead utilize the mature UTXOs of the pre-mined chain.** ACKs for top commit: MarcoFalke: ACK 6bd098a838881ba615c01354560a70d47256f90f 🕷 theStack: re-ACK 6bd098a838881ba615c01354560a70d47256f90f Tree-SHA512: 7f9361e36910e4000c33a32efdde4449f4a8a763bb42df96de826fcde469f9362f701b8c99e2a2c482d2d5a42a83ae5ae3844fdbed187ed0ff231f386c222493
2023-01-16Merge bitcoin/bitcoin#26325: rpc: Return accurate results for scanblocksAndrew Chow
5ca7a7be76f2521dca895daa70949fd11df0844c rpc: Return accurate results for scanblocks (Aurèle Oulès) Pull request description: Implements #26322. Adds a `filter_false_positives` mode to `scanblocks` to accurately verify results from blockfilters. If the option is enabled, pre-results given by blockfilters will be filtered out again by checking vouts and vins of all transactions of the relevant blocks against the given descriptors. ### Master ```bash ./src/bitcoin-cli -testnet -named scanblocks action=start scanobjects='["addr(tb1qcxf2gv93c26s6mqz7y6etpqdf70zmn67dualgr)"]' { "from_height": 0, "to_height": 2376055, "relevant_blocks": [ "000000000001bc35077dec4104e0ab1f667ae27059bd907f9a8fac55c802ae36", "00000000000120a9c50542d73248fb7c37640c252850f0cf273134ad9febaf61", "0000000000000082f7af3835da8b6146b0bfb243b8842f09c495fa1e74d454ed", "0000000000000094c32651728193bfbe91f6789683b8d6ac6ae2d22ebd3cb5d3" ] } ``` ### PR (without `filter_false_positives` mode) Same as master ```bash ./src/bitcoin-cli -testnet -named scanblocks action=start scanobjects='["addr(tb1qcxf2gv93c26s6mqz7y6etpqdf70zmn67dualgr)"]' filter_false_positives=false { "from_height": 0, "to_height": 2376055, "relevant_blocks": [ "000000000001bc35077dec4104e0ab1f667ae27059bd907f9a8fac55c802ae36", "00000000000120a9c50542d73248fb7c37640c252850f0cf273134ad9febaf61", "0000000000000082f7af3835da8b6146b0bfb243b8842f09c495fa1e74d454ed", "0000000000000094c32651728193bfbe91f6789683b8d6ac6ae2d22ebd3cb5d3" ] } ``` ### PR (with `filter_false_positives` mode) ```bash ./src/bitcoin-cli -testnet -named scanblocks action=start scanobjects='["addr(tb1qcxf2gv93c26s6mqz7y6etpqdf70zmn67dualgr)"]' filter_false_positives=true { "from_height": 0, "to_height": 2376058, "relevant_blocks": [ "0000000000000082f7af3835da8b6146b0bfb243b8842f09c495fa1e74d454ed", "0000000000000094c32651728193bfbe91f6789683b8d6ac6ae2d22ebd3cb5d3" ] } ``` Also adds a test to check that the blockhash of a transaction will be included in the `relevant_blocks` whether the `filter_false_positives` mode is enabled or not. ACKs for top commit: achow101: ACK 5ca7a7be76f2521dca895daa70949fd11df0844c theStack: re-ACK 5ca7a7be76f2521dca895daa70949fd11df0844c furszy: Code review ACK 5ca7a7be Tree-SHA512: e8f3cceddddd66f59509717b6314d89e2fef241e13cee81b18fd95e8362cbb95cc40f884342ce6cf892a86febd9e2d434afce05d51892240e67f72ae991852e7
2023-01-16Merge bitcoin/bitcoin#25375: rpc: add minconf/maxconf options to sendall and ↵Andrew Chow
fund transaction calls cfe5aebc79c510bd2156e199c3324d7ee1f8d2ad rpc: add minconf and maxconf options to sendall (ishaanam) a07a413466a0edd47eab9189b46a70aafbbe22b7 Wallet/RPC: Allow specifying min & max chain depth for inputs used by fund calls (Juan Pablo Civile) Pull request description: This PR adds a "minconf" option to `fundrawtransaction`, `walletcreatefundedpsbt`, and `sendall`. Alternative implementation of #14641 Fixes #14542 Edit: This PR now also adds this option to `send` ACKs for top commit: achow101: ACK cfe5aebc79c510bd2156e199c3324d7ee1f8d2ad Xekyo: ACK cfe5aebc79c510bd2156e199c3324d7ee1f8d2ad furszy: diff ACK cfe5aebc, only a non-blocking nit. Tree-SHA512: 836e610926eec3a62308fba88ddbd6a13d8f4dac37352d0309599f893cde9c1df5e9c298fda6e076493068e4d213e4afa7290a9e3bdb5a95a5d507da3f7b59e8
2023-01-16test: simplify tests by using the pre-mined chainkouloumos
2023-01-16test: remove redundant blocks generation logickouloumos
those tests already have enough mature utxos from the pre-mined chain.
2023-01-16test: add `rescan_utxos` in MiniWallet's initializationkouloumos
this simplifies usage when MiniWallet is used with a pre-mined chain.
2023-01-16Merge bitcoin/bitcoin#26657: test: Run feature_bip68_sequence.py with MiniWalletMarcoFalke
4159ccd03142899028019a7cb44ee4120e68505a test: Run feature_bip68_sequence.py with MiniWallet (Miles Liu) fc0caaf4aa3d4b26a8673cca48df1a4f0b964a59 test: Add "include mempool" flag to MiniWallet rescan_utxos (Miles Liu) d0a909ae54a34ecd925c9d5064d530eaeeba46eb test: Add "include immature coinbase" flag to MiniWallet get_utxos (Miles Liu) e5b9127d9e9d25bf8825b671ddb97529e877f593 test: Add signs P2TR and RAWSCRIPT to MiniWallet sign_tx (Miles Liu) Pull request description: This PR enables one more of the non-wallet functional tests (feature_bip68_sequence.py) to be run even when no wallet is compiled in by using the MiniWallet instead, as proposed in #20078. ACKs for top commit: achow101: ACK 4159ccd03142899028019a7cb44ee4120e68505a MarcoFalke: review ACK 4159ccd03142899028019a7cb44ee4120e68505a 🤸 Tree-SHA512: e891b189381e961c840b45fc30d058363707fd54c1c4bdc3d29623b03309981f1d3ebfac27e6aecf621bdbcd7e31754a3ef7c53f86346f7dd241c137e64c92bd
2023-01-16Merge bitcoin/bitcoin#26631: test: add coverage for dust mempool policy ↵MarcoFalke
(`-dustrelayfee` setting) d6fc1d6a3393c571a1691a6bda60433216643616 test: add coverage for dust mempool policy (`-dustrelayfee` setting) (Sebastian Falbesoner) 8a5dbe28793d2e2ad85242f2191a6e1956b980dc test: add `CScript` method for checking for witness program (Sebastian Falbesoner) Pull request description: This PR adds missing test coverage for the `-dustrelayfee` setting, which specifies the fee-rate used to define dust. Output scripts for all common types that are treated as standard by default (P2PK, P2(W)PKH, P2(W)SH, P2TR, bare multisig, null data, unknown witness versions v2+) are created and then checked for dust-mempool-policy each via the `testmempoolaccept` RPC: a tx with an output's nValue equal to the dust threshold should be accepted, one with an nValue of just one 1 satoshi below that should be rejected with reason `dust`. This is repeatedly done for a fixed (but obviously somewhat arbitrary) list of different `-dustrelayfee` settings on a single node, including the default and zero (i.e. no dust limit) settings. Note that the first commit introduces a necessary `CScript` helper method `IsWitnessProgram` (using PascalCase in Python is likely controversial; in this case the style for the already existing method `GetSigOpCount` was followed, which also refers to a method in the core `CScript` class). Some historical information about dust, contributed by pablomartin4btc: "The concept of dust was first introduced in https://github.com/bitcoin/bitcoin/pull/2577. This [commit](https://github.com/bitcoin/bitcoin/pull/9380/commits/eb30d1a5b215c6dd3763d7f7948f2dd8cb61f6bf) from https://github.com/bitcoin/bitcoin/pull/9380 introduced the -dustrelayfee option. Previous to that PR, the dust feerate was whatever -minrelaytxfee was set to." ACKs for top commit: LarryRuane: ACK d6fc1d6a3393c571a1691a6bda60433216643616 glozow: ACK d6fc1d6a3393c571a1691a6bda60433216643616 kouloumos: ACK d6fc1d6a3393c571a1691a6bda60433216643616 Tree-SHA512: 35ea2b2497dfb466395af5665bb217f7250aa7cab9dc43539a5658ab69a454e3623ff58fce7489fcc1105b37f8cb4840a93cec658c5df1de611732bc6439ccad
2023-01-16Merge bitcoin/bitcoin#26892: test: refactor: simplify p2p_permissions.py by ↵MarcoFalke
using MiniWallet 8cbd926a2c5f230dbb39c88eff9c5955068e7e41 test: refactor: simplify p2p_permissions.py by using MiniWallet (Sebastian Falbesoner) Pull request description: This PR simplies the functional test p2p_permissions.py by using MiniWallet in order to avoid manual low-level tx creation. Also, rather than mining 100 blocks manually, the pre-mined chain of the test framework is used, which speeds up the test a little (~2-3 seconds faster on my machine). ACKs for top commit: MarcoFalke: ACK 8cbd926a2c5f230dbb39c88eff9c5955068e7e41 Tree-SHA512: 36cbc2a0f6fb0251c8696cd017163ed30529690736bafd36e80b53007bd02b9030b68fe93b90dc50323526c8b7d8e0abd8f20890d46ff6015d5c632b64a08535
2023-01-15test: Remove redundant function callKolby ML
2023-01-15test: refactor: simplify p2p_permissions.py by using MiniWalletSebastian Falbesoner
Also, use the pre-mined chain of the test framework rather than mining 100 blocks manually on each run.
2023-01-13test: wallet: add coverage for `-spendzeroconfchange` settingSebastian Falbesoner
2023-01-13test: remove `-spendzeroconfchange` setting from mempool_limit.pySebastian Falbesoner
Since this test was changed to use MiniWallet instead of the Bitcoin Core wallet (see commit d447ded6babebe7c7948e585c9e78bf34dbef226), the setting doesn't have any effect and hence can be removed.
2023-01-12test: skip sqlite3 tests if it isn't availablefanquake
Fixes #26819. Related too #26873.
2023-01-12Merge bitcoin/bitcoin#26854: test: Fix intermittent timeout in ↵MarcoFalke
p2p_permissions.py fa1bf4e7052e617dd0e5c8c54969d84314af9577 test: Fix intermittent timeout in p2p_permissions.py (MarcoFalke) Pull request description: The sync is based on `bytesrecv_per_msg["verack"]`. However, the bytes are counted before processing the message, so they are not sufficient to ensure the connection is fully up. ACKs for top commit: mzumsande: ACK fa1bf4e7052e617dd0e5c8c54969d84314af9577 aureleoules: ACK fa1bf4e7052e617dd0e5c8c54969d84314af9577 Tree-SHA512: eb1ed537032c76a449b1ed5e42ff062e9b8b3c7e11fde2a5b8183ae0d6fbe31dba39e2c758836160cd8157d9ac5cc1f5d1916415861b8d711b7370c88f5e9790
2023-01-11Merge bitcoin/bitcoin#26675: wallet: For feebump, ignore abandoned ↵Andrew Chow
descendant spends f9ce0eadf4eb58d1e2207c27fabe69a5642482e7 For feebump, ignore abandoned descendant spends (John Moffett) Pull request description: Closes #26667 To be eligible for fee-bumping, a transaction must not have any of its outputs (eg - change) spent in other unconfirmed transactions in the wallet. This behavior is currently [enforced](https://github.com/bitcoin/bitcoin/blob/9e229a542ff2107be43eff2e4b992841367f0366/src/wallet/feebumper.cpp#L25-L28) and [tested](https://github.com/bitcoin/bitcoin/blob/9e229a542ff2107be43eff2e4b992841367f0366/test/functional/wallet_bumpfee.py#L270-L286). However, this check shouldn't apply to spends in abandoned descendant transactions, as explained by #26667. `CWallet::IsSpent` already carves out an exception for abandoned transactions, so we can just use that. I've also added a new test to cover this case. ACKs for top commit: Sjors: re-utACK f9ce0eadf4eb58d1e2207c27fabe69a5642482e7 achow101: ACK f9ce0eadf4eb58d1e2207c27fabe69a5642482e7 furszy: ACK f9ce0ead Tree-SHA512: 19d957d1cf6747668bb114e27a305027bfca5a9bed2b1d9cc9e1b0bd4666486c7c4b60b045a7fe677eb9734d746f5de76390781fb1e9e0bceb4a46d20acd1749
2023-01-11rpc: add minconf and maxconf options to sendallishaanam
2023-01-11Wallet/RPC: Allow specifying min & max chain depth for inputs used by fund callsJuan Pablo Civile
Enables users to craft BIP-125 replacements with changes to the output list, ensuring that if additional funds are needed they will be added.
2023-01-11test: Fix wrong types passed to RPCsMarcoFalke
2023-01-11test: Fix intermittent timeout in p2p_permissions.pyMarcoFalke
2023-01-11Merge bitcoin/bitcoin#26730: test: add coverage for `purpose` arg in ↵MarcoFalke
`listlabels` c467cfffcebb30f829eeb8160166a6b941d97ed6 test: add coverage for `purpose` arg in `listlabels` (brunoerg) Pull request description: This PR adds test coverage for `listlabels` command when specifying the `purpose` (send and receive). https://github.com/bitcoin/bitcoin/blob/dcdfd72861c09a7945b9facc3726177a2d06fa64/src/wallet/rpc/addresses.cpp#L698-L704 ACKs for top commit: kristapsk: ACK c467cfffcebb30f829eeb8160166a6b941d97ed6 Tree-SHA512: 7e7143c1264692f7b22952e7c70dbe9ed3f5dcd2e3b69962a47be9f9c21b3f4a9089ca87962fbc8ff9116e7d2dbeb7f36d6a132c9ac13724a255cfe1b32373a8
2023-01-11Merge bitcoin/bitcoin#26646: validation, bugfix: provide more info in ↵glozow
*MempoolAcceptResult 264f9ef17f650035882d24083fb419845942a3ac [validation] return MempoolAcceptResult for every tx on PCKG_TX failure (glozow) dae81e01e8698e04afb0db4d1442659c3b48fcf5 [refactor] rename variables in AcceptPackage for clarity (glozow) da484bc738eca47936a31a2e5ad663417e19f311 [doc] release note effective-feerate and effective-includes RPC results (glozow) 5eab397b9840de5a4729bea723794b529e5fcbb4 [validation] remove PackageMempoolAcceptResult::m_package_feerate (glozow) 601bac88cb95404e7d38ac6348d959c0e06bd922 [rpc] return effective-includes in testmempoolaccept and submitpackage (glozow) 1691eaa818f7a7b22907f756490b842d80a9a21d [rpc] return effective-feerate in testmempoolaccept and submitpackage (glozow) d6c7b78ef2924af72f677ce2a7472c2447141e18 [validation] return wtxids of other transactions whose fees were used (glozow) 1605886380e4d3ff2e1236739fb800fa07322c49 [validation] return effective feerate from mempool validation (glozow) 5d35b4a7dee95ae70bfdcbe79bc39fe488641b23 [test] package validation quits early due to non-policy, non-missing-inputs failure (glozow) be2e4d94e59510e0a98408313feb27e97321b16e [validation] when quitting early in AcceptPackage, set package_state and tx result (glozow) Pull request description: This PR fixes a bug and improves the mempool accept interface to return information more predictably. Bug: In package validation, we first try the transactions individually (see doc/policy/packages.md for more explanation) and, if they all failed for missing inputs and policy-related (i.e. fee) reasons, we'll try package validation. Otherwise, we'll just "quit early" since, for example, if a transaction had an invalid signature, adding a child will not help make it valid. Currently, when we quit early, we're not setting the `package_state` to be invalid, so the caller might think it succeeded. Also, we're returning no results - it makes more sense to return the individual transaction failure. Thanks instagibbs for catching https://github.com/bitcoin/bitcoin/pull/25038#discussion_r1013293248! Also, make the package results interface generally more useful/predictable: - Always return the feerate at which a transaction was considered for `CheckFeeRate` in `MempoolAcceptResult::m_effective_feerate` when it was successful. This can replace the current `PackageMempoolAcceptResult::m_package_feerate`, which only sometimes exists. - Always provide an entry for every transaction in `PackageMempoolAcceptResult::m_tx_results` when the error is `PCKG_TX`. ACKs for top commit: instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/26646/commits/264f9ef17f650035882d24083fb419845942a3ac achow101: ACK 264f9ef17f650035882d24083fb419845942a3ac naumenkogs: reACK 264f9ef17f650035882d24083fb419845942a3ac Tree-SHA512: ce7fd9927a80030317cc6157822596e85a540feff5dbf5eea7c62da2eb50c917cdddc9da1e2ff62cc18b98b27d360151811546bd9d498859679a04bbee090837
2023-01-11Merge bitcoin/bitcoin#26838: doc: I2P documentation updatesMarcoFalke
3e1d2941e921f96c489c5101e2a7a7bf7e7d8b73 doc: remove recommended I2P router versions (jonatack) 295849abb56ae5696f9f18f57f6af77087499756 doc: update/clarify/de-emphasize I2P transient address section (jonatack) dffa31945729d110e4fff0fa092c077b5ec9e0eb doc: update bandwidth section of I2P documentation (jonatack) 0ed9cc58928d98633fb59922ebacbcf248d667cb doc: clarify -i2pacceptincoming help documentation (jonatack) Pull request description: Address the documentation updates requested in issue #26754, clarify/simplify the -i2pacceptincoming help, and a few other fixups. ACKs for top commit: willcl-ark: ACK 3e1d294 1440000bytes: ACK https://github.com/bitcoin/bitcoin/pull/26838/commits/3e1d2941e921f96c489c5101e2a7a7bf7e7d8b73 w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/26838/commits/3e1d2941e921f96c489c5101e2a7a7bf7e7d8b73 vasild: ACK 3e1d2941e921f96c489c5101e2a7a7bf7e7d8b73 Tree-SHA512: e647221884af34646b99150617f4d4cc8d5fce325a769294f49047b9d8c9c8ab2b365cfdd9f56b3bd0303da706233f03d24cececf6e161c53f04ed947751052a
2023-01-10test: Check that orphaned coinbase unconf spend is still abandonedAndrew Chow
When an orphaned coinbase is reorged back into the main chain, any unconfirmed ancestors should still be marked as abandoned due to the original reorg that orphaned that coinbase.
2023-01-10wallet: Automatically abandon orphaned coinbases and their childrenAndrew Chow
2023-01-10Merge bitcoin/bitcoin#26186: rpc: Sanitize label name in various RPCs with testsAndrew Chow
65e78bda7cd23ad7b6ede63c6bf5ffe6f552c71d test: Invalid label name coverage (Aurèle Oulès) 552b51e682b5a52d9e2fbe64e44e623451692bd3 refactor: Add sanity checks in LabelFromValue (Aurèle Oulès) 67e7ba8e1aea58fc864f9bb1fc0e56b70777185e rpc: Sanitize label name in various RPCs (Aurèle Oulès) Pull request description: The following RPCs did not sanitize the optional label name: - importprivkey - importaddress - importpubkey - importmulti - importdescriptors - listsinceblock Thus is was possible to import an address with a label `*` which should not be possible. The wildcard label is used for backwards compatibility in the `listtransactions` rpc. I added test coverage for these RPCs. ACKs for top commit: ajtowns: ACK 65e78bda7cd23ad7b6ede63c6bf5ffe6f552c71d achow101: ACK 65e78bda7cd23ad7b6ede63c6bf5ffe6f552c71d furszy: diff ACK 65e78bd stickies-v: re-ACK 65e78bda7cd23ad7b6ede63c6bf5ffe6f552c71d theStack: re-ACK 65e78bda7cd23ad7b6ede63c6bf5ffe6f552c71d Tree-SHA512: ad99f2824d4cfae352166b76da4ca0069b7c2eccf81aaa0654be25bbb3c6e5d6b005d93960f3f4154155f80e12be2d0cebd5529922ae3d2a36ee4eed82440b31
2023-01-10[validation] remove PackageMempoolAcceptResult::m_package_feerateglozow
This value creates an extremely confusing interface as its existence is dependent upon implementation details (whether something was submitted on its own, etc). MempoolAcceptResult::m_effective_feerate is much more helpful, as it always exists for submitted transactions.
2023-01-10[rpc] return effective-includes in testmempoolaccept and submitpackageglozow