aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-12-05Merge bitcoin/bitcoin#26414: test: Move tx creation to ↵MarcoFalke
create_self_transfer_multi 0b78110f73965fd827748107e0f3497d3352be71 test: Move tx creation to create_self_transfer_multi (kouloumos) Pull request description: Two birds with one stone: replacement of https://github.com/bitcoin/bitcoin/pull/26278 with simplification of the MiniWallet's transaction creation logic. Currently the MiniWallet creates simple txns (1 input, 1 output) with `create_self_transfer`. https://github.com/bitcoin/bitcoin/pull/24637 introduced `create_self_transfer_multi` **which uses** `create_self_transfer` to create a "transaction template" which then adjusts (copy and mutate inputs and outputs) in order to create more complex multi-input multi-output transactions. This can more easily lead to issues such as https://github.com/bitcoin/bitcoin/pull/26278 and is more of a maintenance burden. This PR simplifies the logic by going the other way around. Now `create_self_transfer` **uses** `create_self_transfer_multi`. The transaction creation logic has been moved to `create_self_transfer_multi` which is being called by `create_self_transfer` to construct the simple case of 1 input 1 output transaction. ACKs for top commit: MarcoFalke: ACK 0b78110f73965fd827748107e0f3497d3352be71 👒 Tree-SHA512: 147e577ed5444bee57865bd375b37c9b49d6539e9875c30c2667e70fcba27fe80bcb4552a4e6efb42760d34b40d5dad826883b778eaeefe29425ec081787b4bd
2022-12-05test: Run mempool_compatibility.py with MiniWalletMarcoFalke
2022-12-03test: Fix intermittent issue in rpc_net.pyMarcoFalke
2022-12-03Merge bitcoin/bitcoin#26622: test: Add test for sendall min-fee settingMarcoFalke
cb44c5923a7c0ba15400d2b420faedd39cdce128 test: Add sendall test for min-fee setting (Aurèle Oulès) Pull request description: While experimenting with mutation testing it appeared that the minimum fee-rate check was not tested for the `sendall` RPC. https://bcm-ui.aureleoules.com/mutations/3581479318544ea6b97f788cec6e6ef1 ACKs for top commit: 0xB10C: ACK cb44c5923a7c0ba15400d2b420faedd39cdce128 ishaanam: ACK cb44c5923a7c0ba15400d2b420faedd39cdce128 stickies-v: re-ACK [cb44c59](https://github.com/bitcoin/bitcoin/commit/cb44c5923a7c0ba15400d2b420faedd39cdce128) Tree-SHA512: 31978436e1f01cc6abf44addc62b6887e65611e9a7ae7dc72e6a73cdfdb3a6a4f0a6c53043b47ecd1b10fc902385a172921e68818a7f5061c96e5e1ef5280b48
2022-12-02bitcoin-cli: Make it an error to specify the "args" parameter two different waysRyan Ofsky
MarcoFalke reported the case of positional arguments silently overwriting the named "args" parameter in bitcoin-cli https://github.com/bitcoin/bitcoin/pull/19762#discussion_r1035761471 and this behavior is confusing and was not intended when support for "args" parameters was added to bitcoin-cli in #19762. Instead of letting one "args" value overwrite the other in the client, just pass the values to the server verbatim, and let the error be handled server side.
2022-12-02test: Add RPC tests for same named parameter specified more than onceRyan Ofsky
Current behavior isn't ideal and will be changed in upcoming commits, but it's useful to have test coverage regardless. MarcoFalke reported the case of bitcoin-cli positional arguments overwriting the named "args" parameter in https://github.com/bitcoin/bitcoin/pull/19762#discussion_r1035761471
2022-12-02test: Coin Selection, duplicated preset inputs selectionfurszy
This exercises the bug inside CoinsResult::Erase that ends up on (1) a wallet crash or (2) a created and broadcasted tx that contains a reduced recipient's amount. This is covered by making the wallet selects the preset inputs twice during the coin selection process. Making the wallet think that the selection process result covers the entire tx target when it does not. It's actually creating a tx that sends more coins than what inputs are covering for. Which, combined with the SFFO option, makes the wallet incorrectly reduce the recipient's amount by the difference between the original target and the wrongly counted inputs. Which means, a created and relayed tx sending less coins to the destination than what the user inputted.
2022-12-02Merge bitcoin/bitcoin#26569: p2p: Ensure transaction announcements are only ↵fanquake
queued for fully connected peers 8f2dac54096c20afd8fd12c21a2ee5465fea085e [test] Add p2p_tx_privacy.py (dergoegge) ce63fca13e9b500e9f687d80a457175ac967a371 [net processing] Assume that TxRelay::m_tx_inventory_to_send is empty pre-verack (dergoegge) 845e3a34c49abcc634b5a10ccdd6b10fb4fcf449 [net processing] Ensure transaction announcements are only queued for fully connected peers (dergoegge) Pull request description: `TxRelay::m_next_inv_send_time` is initialized to 0, which means that any txids in `TxRelay::m_tx_inventory_to_send` will be announced on the first call to `PeerManagerImpl::SendMessages` for a fully connected peer (i.e. it completed the version handshake). Prior to #21160, `TxRelay::m_tx_inventory_to_send` was guaranteed to be empty on the first `SendMessages` call, as transaction announcements were only queued for fully connected peers. #21160 replaced a `CConnman::ForEachNode` call with a loop over `PeerManagerImpl::m_peer_map`, in which the txid for a transaction to be relayed is added to `TxRelay::m_tx_inventory_to_send` for all peers. Even for those peers that have not completed the version handshake. Prior to the PR this was not the case as `ForEachNode` has a "fully connected check" before calling a function for each node. ACKs for top commit: MarcoFalke: ACK 8f2dac54096c20afd8fd12c21a2ee5465fea085e 🔝 jnewbery: utACK 8f2dac54096c20afd8fd12c21a2ee5465fea085e Tree-SHA512: e9eaccf7e00633ee0806fff1068b0e413a69a5e389d96c9659f68079915a6381ad5040c61f716cfcde77931d1b563b1049da97a232a95c6cd8355bd3d13404b9
2022-12-02test: Add sendall test for min-fee settingAurèle Oulès
2022-12-02Merge bitcoin/bitcoin#26610: test: Remove unused blocktools imports from ↵MarcoFalke
wallet_bumpfee fa15c671f7cd140434cbc10767a3c57faa6f8f17 test: Remove unused blocktools imports from wallet_bumpfee (MarcoFalke) Pull request description: Seems bloaty and confusing to use "tools" when a single RPC can already achieve the same. ACKs for top commit: theStack: ACK fa15c671f7cd140434cbc10767a3c57faa6f8f17 Tree-SHA512: 87f9c31bbb286fee5e479ae54a1f9131f4d4294d665a985df8b14a0cc837a2a2e145ccd3660612768d88cfa0827a3eef392f85519b6cb7df365ba9fadafb0a41
2022-12-01Merge bitcoin/bitcoin#26620: test: refactor: eliminate genesis block ↵MarcoFalke
timestamp magic numbers dbed28968ae48ab62e91e0f965f9645a769f6404 test: refactor: eliminate genesis block timestamp magic numbers (Sebastian Falbesoner) Pull request description: This tiny PR replaces all occurences of the regtest/testnet genesis block timestamp (found via `git grep 1296688602`) with the constant `TIME_GENESIS_BLOCK` to increase the readability. ACKs for top commit: aureleoules: ACK dbed28968ae48ab62e91e0f965f9645a769f6404 Tree-SHA512: be39d5c2631ad20eb775c2a077b1b1f056a1a4930aa44e6fdec73b974fd4bdf8da0103a3a38e3514b68fcf6a6316e007a371c523da5076a315545c9bf3091aee
2022-12-01Merge bitcoin/bitcoin#26617: test: add extra_args to BitcoinTestFramework classMarcoFalke
150340aeacb5e884cb875c77dc10c0d8b9984a33 test: remove unneeded extra_args code (josibake) 989a52e0a50c0ae30a5c2bd3c08bb3ad1363a250 test: add extra_args to BTF class (josibake) Pull request description: ## problem If you try to add `extra_args` when using `TestShell`, you will get the following error: ```python >>> import sys >>> >>> sys.path.insert(0, "/home/josibake/bitcoin/test/functional") >>> >>> from test_framework.test_shell import TestShell >>> test = TestShell().setup(num_nodes=2, extra_args=[[],['-fallbackfee=0.0002']]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/josibake/bitcoin/test/functional/test_framework/test_shell.py", line 41, in setup raise KeyError(key + " not a valid parameter key!") KeyError: 'extra_args not a valid parameter key!' >>> ``` ## solution add `self.extra_args = None` so that `extra_args` is recognized as a valid parameter to be passed to `BitcoinTestFramework` ```python >>> import sys >>> >>> sys.path.insert(0, "/home/josibake/bitcoin/test/functional") >>> >>> from test_framework.test_shell import TestShell >>> test = TestShell().setup(num_nodes=2, extra_args=[[],['-fallbackfee=0.0002']]) 2022-12-01T11:23:23.765000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_sbwthbb_ ``` ACKs for top commit: willcl-ark: re-ACK 150340aeacb5e884cb875c77dc10c0d8b9984a33 Tree-SHA512: e6fa2a780a8f2d3472c322e8cdb00ec35cb220c3b4d6ca02291eb8b41c0d8676a635fbc79c6be80e3bb71d700a2501a4b73f762478f533ae453d492d449307bb
2022-12-01test: remove unneeded extra_args codejosibake
2022-12-01test: refactor: eliminate genesis block timestamp magic numbersSebastian Falbesoner
2022-12-01test: add extra_args to BTF classjosibake
this allows us to pass extra_args when using TestShell
2022-12-01Merge bitcoin/bitcoin#26594: wallet: Avoid a segfault in migratewallet ↵fanquake
failure cleanup 5e65a216d1fd00c447757736d4f2899d235e731a wallet: Explicitly say migratewallet on encrypted wallets is unsupported (Andrew Chow) 88afc73ae0c67a4482ecd3d77eb2a8fd2673f82d tests: Test for migrating encrypted wallets (Andrew Chow) 86ef7b3c7be84e4183098f448c77ecc9ea7367ab wallet: Avoid null pointer deref when cleaning up migratewallet (Andrew Chow) Pull request description: When `migratewallet` fails, we do an automatic cleanup in order to reset everything so that the user does not experience any interruptions. However, this apparently has a segfault in it, caused by the the pointers to the watchonly and solvables wallets being nullptr. If those wallets are not created (either not needed, or failed early on), we will accidentally attempt to dereference these nullptrs, which causes a segfault. This failure can be easily reached by trying to migrate an encrypted wallet. Currently, we can't migrate encrypted wallets because of how we unload wallets before migrating, and therefore forget the encryption key if the wallet was unlocked. So any encrypted wallets will fail, entering the cleanup, and because watchonly and solvables wallets don't exist yet, the segfault is reached. This PR fixes this by not putting those nullptrs in a place that we will end up dereferencing them later. It also adds a test that uses the encrypted wallet issue. ACKs for top commit: S3RK: reACK 5e65a216d1fd00c447757736d4f2899d235e731a stickies-v: ACK [5e65a21](https://github.com/bitcoin/bitcoin/commit/5e65a216d1fd00c447757736d4f2899d235e731a) furszy: diff ACK 5e65a21 Tree-SHA512: f75643797220d4232ad3ab8cb4b46d0f3667f00486e910ca748c9b6d174d446968f1ec4dd7f907da1be9566088849da7edcd8cd8f12de671c3241b513deb8e80
2022-11-30[test] Add p2p_tx_privacy.pydergoegge
2022-11-30test: Remove unused blocktools imports from wallet_bumpfeeMarcoFalke
2022-11-30wallet: Explicitly say migratewallet on encrypted wallets is unsupportedAndrew Chow
2022-11-30Merge bitcoin/bitcoin#26359: p2p: Erlay support signaling follow-upsfanquake
46339d29b10c9fb597af928c21c34945d76bbd22 test, refactor: Reorder sendtxrcncl tests for better readability (Gleb Naumenko) 14263c13f153b84e50191366a6f64f884ed4ddd9 p2p, refactor: Extend logs for unexpected sendtxrcncl (Gleb Naumenko) 87493e112ee91923adf38b75491bedeb45f87c80 p2p, test, refactor: Minor code improvements (Gleb Naumenko) 00c5dec818f60e8297d42b49a919aa82c42821b5 p2p: Clarify sendtxrcncl policies (Gleb Naumenko) ac6ee5ba211d05869800497d6b518ea1ddd2c718 test: Expand unit and functional tests for txreconciliation (Gleb Naumenko) bc84e24a4f0736919ea4a76f7d45085587625aba p2p, refactor: Switch to enum class for ReconciliationRegisterResult (Gleb Naumenko) a60f729e293dcd11ca077b7c1c72b06119437faa p2p: Drop roles from sendtxrcncl (Gleb Naumenko) 6772cbf69cf075ac8dff3507bf9151400ed255b7 tests: stabilize sendtxrcncl test (Gleb Naumenko) Pull request description: Non-trivial changes include: - Getting rid of roles in `sendtxrcncl` message (summarized in the [BIP PR](https://github.com/bitcoin/bips/pull/1376)); - Disconnect the peer if it send `sendtxrcncl` although we are in `blocksonly` and notified the peer with `fRelay=0`; - Don't send `sendtxrcncl` to feeler connections. ACKs for top commit: vasild: ACK 46339d29b10c9fb597af928c21c34945d76bbd22 ariard: ACK 46339d2 mzumsande: Code Review ACK 46339d29b10c9fb597af928c21c34945d76bbd22 Tree-SHA512: b5cc6934b4670c12b7dbb3189e739ef747ee542ec56678bf4e4355bfb481b746d32363c173635685b71969b3fe4bd52b1c8ebd3ea3b35c82044bba69220f6417
2022-11-30Merge bitcoin/bitcoin#26600: test: Set wallet type in test_runner when only ↵MarcoFalke
one type is allowed fadb8696dd0f7569e429fb6568a66866d67a2ce6 test: Set wallet type in test_runner when only one type is allowed (MarcoFalke) Pull request description: Currently devs are free to set or not set the wallet type in the test_runner when only one type is allowed to be set. This is inconsistent and causes review comments such as: * https://github.com/bitcoin/bitcoin/pull/24865#discussion_r1009752111 ACKs for top commit: achow101: ACK fadb8696dd0f7569e429fb6568a66866d67a2ce6 Tree-SHA512: 1ca0946df07b5bf6778fea957d74393757781c324d554fec2f7d03bf1915033e644d9a4c3d77e0b24090ab593d7ed3cb3c9169666bc39fff423706fceaa1af80
2022-11-29tests: Test for migrating encrypted walletsAndrew Chow
Due to an oversight, we cannot currently migrate encrypted wallets, regardless of whether they are unlocked. Migrating such wallets will trigger an error, and result in the cleanup being run. This conveniently allows us to check some parts of the cleanup code.
2022-11-29Merge bitcoin/bitcoin#19762: rpc: Allow named and positional arguments to be ↵Andrew Chow
used together d8b12a75dbfdc1d3e62352f0fa815bbbdc685caf rpc: Allow named and positional arguments to be used together (Ryan Ofsky) Pull request description: It's nice to be able to use named options and positional arguments together. Most shell tools accept both, and python functions combine options and arguments allowing them to be passed with even more flexibility. This change adds support for python's approach so as a motivating example: ```sh bitcoin-cli -named createwallet wallet_name=mywallet load_on_startup=1 ``` Can be shortened to: ```sh bitcoin-cli -named createwallet mywallet load_on_startup=1 ``` JSON-RPC standard doesn't have a convention for passing named and positional parameters together, so this implementation makes one up and interprets any unused `"args"` named parameter as a positional parameter array. This change is backwards compatible. It doesn't change the interpretation of any previously valid calls, just treats some previously invalid calls as valid. Another use case even if you only occasionally use named arguments is that you can define an alias: ``` alias bcli='bitcoin-cli -named' ``` And now use both named named and unnamed arguments from the same alias without having to manually add `-named` option for named arguments or see annoying error "No '=' in named argument... this needs to be present for every argument (even if it is empty)`" for unnamed arguments ACKs for top commit: achow101: ACK d8b12a75dbfdc1d3e62352f0fa815bbbdc685caf stickies-v: re-ACK d8b12a75d aureleoules: re-ACK d8b12a75dbfdc1d3e62352f0fa815bbbdc685caf Tree-SHA512: 0cff8b50f584bcbbd376624adccf40536566ed8d1bcd6c88ad565dbc208f19d5e7a48c994efd6329d42b560149340d330397278f08a2912af5f3418d8c8837a9
2022-11-29test: Set wallet type in test_runner when only one type is allowedMarcoFalke
2022-11-28Merge bitcoin/bitcoin#26588: ci: Skip COMMIT_RANGE if no CIRRUS_PRMarcoFalke
fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a lint: Skip COMMIT_RANGE if no CIRRUS_PR (MarcoFalke) Pull request description: It doesn't make sense to run this for non-PRs, because: * There are known whitespace "violations" in previous commits, so the lint may fail * Once the changes are merged, it is too late to fix them up (force pushes are illegal) * It isn't possible to determine which commits to run on if there is no reference branch (target branch of the pull request) Moreover, the test fails on non-master: * https://github.com/bitcoin/bitcoin/runs/8664441400 Fix all issues by skipping it. ACKs for top commit: hebasto: ACK fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a, also tested in my personal Cirrus account. Tree-SHA512: be15f00e2b2a9069583833545883e0e5968a33d2455dad59e6fb47c1102b4dd16ef932e9ba945e29e9d941e6c17bd531a02c66b0491097801be6bda476875537
2022-11-28Merge bitcoin/bitcoin#26480: test: Remove wallet option from non-wallet testsAndrew Chow
fa10f193b54650b3071bc7ee2d90fcfe40a16dc9 test: Set default in add_wallet_options if only one type can be chosen (MacroFake) 555519d082fbe5e047595f06d7f301e441bb7149 test: Remove wallet option from non-wallet tests (MacroFake) fac8d59d310fa94a8d5dd99659a76cd958d1fd1b test: Set -disablewallet when no wallet has been compiled (MacroFake) fa68937b89aa5b10b33b3f5146390cd7ad369ff7 test: Make requires_wallet private (MacroFake) Pull request description: The tests have several issues: * Some tests that are wallet-type specific offer the option to run the test with the incompatible type For example, `wallet_dump.py` offers `--descriptors` and on current master fails with `JSONRPCException: Invalid public key`. After the changes here, it fails with a clear error: `unrecognized arguments: --descriptors`. * Tests that don't use the wallet at all offer the option to run it with a wallet type. This is confusing and wastes developers time if they are "tricked" into running the test for both wallet types, even though no wallet code is executed at all. For example, `feature_addrman.py` will happily accept and run with `--descriptors` or `--legacy-wallet`. After the changes here, it no longer silently ignores the flag, but reports a clear error: `unrecognized arguments`. ACKs for top commit: achow101: ACK fa10f193b54650b3071bc7ee2d90fcfe40a16dc9 Tree-SHA512: a5784da7305f4ec58c0013f433289000d94fc3d434b00fc329ffa37b812e2cd1da0071e34c3462bf79d904808564f2ae6d3d582f6b86b26215f9b07391b58460
2022-11-28Merge bitcoin/bitcoin#26589: test: small fixups/improvements for ↵MarcoFalke
get_previous_releases.py 9b5feb76bc9458eec806db677af6161b56b8b23f script: small fixups/improvements for get_previous_releases.py (Sebastian Falbesoner) Pull request description: This is a small follow-up to #25650 (commit 614d4682badaadac74b825a45aaee9c2309a3e81) with three fixes/improvements: - fix "Checksum did not match" detection, which was not adapted to the new `SHA256_SUMS` structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the `'tarball'` field of each value) - make both help text and default tag download order deterministic by sorting default tags - `--tags` argument help text: add missing space between "for" and "backwards" ACKs for top commit: Sjors: tACK 9b5feb76bc9458eec806db677af6161b56b8b23f. Tested that if I change a checksum, or remove a release, it catches that. josibake: tested ACK https://github.com/bitcoin/bitcoin/pull/26589/commits/9b5feb76bc9458eec806db677af6161b56b8b23f Tree-SHA512: 791fa693477eebbda7fd41f3f5ec78fe7eab57df06979aa907ab258a6945534bdc3b931ddfce0fb440c9666b98c88ce5e1b6dc353ed39e129e87d3634855165c
2022-11-28Merge bitcoin/bitcoin#25986: test: refactor `RPCPackagesTest` to use ↵glozow
`MiniWallet` 17cad448516a6906ff637593ab57df332fade5d2 test: refactor `RPCPackagesTest` to use `MiniWallet` (w0xlt) Pull request description: This PR refactors `RPCPackagesTest` to use `MiniWallet` and removes `create_child_with_parents`, `make_chain`, and `create_raw_chain` from `test_framework/wallet`, as requested in https://github.com/bitcoin/bitcoin/issues/25965. Close https://github.com/bitcoin/bitcoin/issues/25965. ACKs for top commit: glozow: ACK 17cad448516a6906ff637593ab57df332fade5d2 pablomartin4btc: tested ACK 17cad44; went thru all changes and recommendations from @kouloumos & @glozow; also went up to #20833 to get a bit of background of the origin and purpose of these tests. kouloumos: ACK 17cad448516a6906ff637593ab57df332fade5d2 Tree-SHA512: 9228c532afaecedd577019dbc56f8749046d66f904dd69eb23e7ca3d7806e2132d90af29be276c7635fefb37ef348ae781eb3b225cd6741b20300e6f381041c3
2022-11-28lint: Skip COMMIT_RANGE if no CIRRUS_PRMarcoFalke
2022-11-28script: small fixups/improvements for get_previous_releases.pySebastian Falbesoner
This is a small follow-up to #25650 (commit 614d4682badaadac74b825a45aaee9c2309a3e81) with three fixes/improvements: - fix "Checksum did not match" detection, which was not adapted to the new SHA256_SUMS structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the 'tarball' field of each value) - make both help text and default tag download order deterministic by sorting default tags - "--tags" argument help text: add missing space between "for" and "backwards"
2022-11-22Merge bitcoin/bitcoin#26383: test: Add feature_taproot case involving ↵fanquake
invalid internal pubkey 5d413c8e793a439540d064d24fddfc868e1817d0 Add feature_taproot case involved invalid internal pubkey (Pieter Wuille) Pull request description: Add a test case to feature_taproot which involves an output that is (incorrectly) constructed, using an invalid internal public key and valid script tree. It is designed to detect cases where the script path spending validation logic does not detect this case, and instead treats the internal public key as the point at infinity. Equivalent unit test case added in https://github.com/bitcoin-core/qa-assets/pull/98. ACKs for top commit: instagibbs: ACK 5d413c8e793a439540d064d24fddfc868e1817d0 aureleoules: reACK 5d413c8e793a439540d064d24fddfc868e1817d0 Tree-SHA512: dfa014e383cd2743f3c9a996e1f2a2fceb9e244edf4b05dc0c110c4ba32a87684482222907805a4ca998aebcb42a197bb3e7967bfb5f0554fe9f1e5aa5463603
2022-11-22Merge bitcoin/bitcoin#26520: doc: test: update/fix TestShell example ↵fanquake
instructions 31d0067f8bccd6b090bf88bad8472bb5cb1f20a4 doc: test: update/fix TestShell example instructions (Sebastian Falbesoner) Pull request description: This PR tackles two issues in the TestShell documentation: - add missing instruction for creating a wallet prior to the `getnewaddress` call (needed as there is no default wallet created anymore since v0.21) - fix `generatetoaddress` call syntax (the scripted-diff in commit fa0b916971e5bc23ad6396831940a2899ca05402 only worked for tests using `BitcoinTestFramework`) ACKs for top commit: fanquake: ACK 31d0067f8bccd6b090bf88bad8472bb5cb1f20a4 - current instructions don't work. These do. Tree-SHA512: d2b7808a06892ad16728cb2b6d4a72b255ad711d27fe98b1de562f80444e7bb25d73296abdde4308162fe3be702864e2f7b7dbbbb000fe54c709951c09e6c730
2022-11-21test: Fix intermittent failure in rpc_net.pyMartin Zumsande
The wait in disconnect_p2ps checked for subver, which is unavailable for the peer that didn't send a version msg.
2022-11-21Add feature_taproot case involved invalid internal pubkeyPieter Wuille
2022-11-21Merge bitcoin/bitcoin#26545: test: Remove unused sanitizer suppressionsMacroFake
fadb71403910cdb91b6173d5dc909d3db72742ba test: Remove unused sanitizer suppressions (MacroFake) Pull request description: ACKs for top commit: fanquake: ACK fadb71403910cdb91b6173d5dc909d3db72742ba hebasto: ACK fadb71403910cdb91b6173d5dc909d3db72742ba Tree-SHA512: 28d4d2eacdbad567434f0f792dbcaa424344dbd13e8686c72f1cbf8a79343b6ee9661246b13ab3f295757269861405315f42180ef49b69411d0b45f9b7796dd7
2022-11-21test: remove unused class `NodePongAdd1`Sebastian Falbesoner
This class was introduced in commit fa3365430c5fb57d7c0b5f2bce9fbbe290be93c3 ("net: Use mockable time for ping/pong, add tests"), but actually never used.
2022-11-21test: Remove unused sanitizer suppressionsMacroFake
2022-11-21Merge bitcoin/bitcoin#26508: RPC/Blockchain: Minor improvements for ↵MacroFake
scanblocks & scantxoutset docs/errors f9869843a664391a493fca4b0ad2828f944cb13a RPC/blockchain: scan{blocks,txoutset>: Further doc improvements (Luke Dashjr) 54b45e155e02cba19975be0bb826ff748d7e895e RPC/Blockchain: Clarify invalid-action error in scanblocks & scantxoutset (Luke Dashjr) Pull request description: * Clarify invalid-action error in scanblocks & scantxoutset * Mention action=='start' only returns after scan completes (already in scantxoutset) * Document `relevant_blocks` ACKs for top commit: kristapsk: utACK f9869843a664391a493fca4b0ad2828f944cb13a aureleoules: ACK f9869843a664391a493fca4b0ad2828f944cb13a MarnixCroes: ACK f9869843a664391a493fca4b0ad2828f944cb13a Tree-SHA512: a37c9cc8a9a2f59376e8d8ed7dbf5e140eb3fefb4b7c19a23fc8190f3aef060bda1f0d5d06dc81cd7dca9e871d65f6c8094bab6e8d42e0bcef0fc7ffd2342d09
2022-11-18Merge bitcoin/bitcoin#17786: refactor: Nuke policy/fees->mempool circular ↵glozow
dependencies c8dc0e3eaa9e0f956c5177bcb69632beb0d51770 refactor: Inline `CTxMemPoolEntry` class's functions (Hennadii Stepanov) 75bbe594e54402ed248ecf2bdfe54e8283d20fff refactor: Move `CTxMemPoolEntry` class to its own module (Hennadii Stepanov) Pull request description: This PR: - gets rid of the `policy/fees` -> `txmempool` -> `policy/fees` circular dependency - is an alternative to #13949, which nukes only one circular dependency ACKs for top commit: ryanofsky: Code review ACK c8dc0e3eaa9e0f956c5177bcb69632beb0d51770. Just include and whitespace changes since last review, and there's a moveonly commit now so it's very easy to review theStack: Code-review ACK c8dc0e3eaa9e0f956c5177bcb69632beb0d51770 glozow: utACK c8dc0e3eaa9e0f956c5177bcb69632beb0d51770, agree these changes are an improvement. Tree-SHA512: 36ece824e6ed3ab1a1e198b30a906c8ac12de24545f840eb046958a17315ac9260c7de26e11e2fbab7208adc3d74918db7a7e389444130f8810548ca2e81af41
2022-11-18Merge bitcoin/bitcoin#25315: Add warning on first startup if free disk space ↵Andrew Chow
is less than necessary 6630a1e8448c633e4abaa8f5903f11cac6f433a7 Add warning on first startup if free disk space is less than necessary (Ben Woosley) Pull request description: This reworks/revives https://github.com/bitcoin/bitcoin/pull/15848 to add a check for low disk space on first startup and issue a warning if disk space is below the expected space required to accommodate the blocks. This PR was fashioned by a team of developers at the [bitcoin++](https://www.btcplusplus.dev/) conference workshop: "[Let's contribute to Bitcoin Core](https://sched.co/12P6Z)" Fixes #15813 ACKs for top commit: achow101: ACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7 willcl-ark: tACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7 rebased on master. Warning shows on first start but not on restart after some blocks have been downloaded. aureleoules: ACK 6630a1e8448c633e4abaa8f5903f11cac6f433a7 pablomartin4btc: re-ACK https://github.com/bitcoin/bitcoin/commit/6630a1e8448c633e4abaa8f5903f11cac6f433a7 hernanmarino: ReACK https://github.com/bitcoin/bitcoin/commit/6630a1e8448c633e4abaa8f5903f11cac6f433a7 Tree-SHA512: 0f18acabdf2b514e96e2eea8f304960b952226b83dc91334cf7d1f6355ea2f257aaec0ee38d43ac36435385ecd918333d20657c35a8a7407e7cf2680ccb643bb
2022-11-18Merge bitcoin/bitcoin#26519: test: Add getpeerinfo test for missing version ↵MacroFake
message fa68d086f33cb4fc13877308d21b6344a804a222 test: Add getpeerinfo test for missing version message (MacroFake) Pull request description: There seems to be a lot of discussion about behaviour/code that is completely untested. Fix this by adding a test. The test documents the current behaviour and helps to detect when the behaviour changes in the future. ACKs for top commit: jonatack: ACK fa68d086f33cb4fc13877308d21b6344a804a222 mzumsande: Code Review ACK fa68d086f33cb4fc13877308d21b6344a804a222 Tree-SHA512: d092b30d5bdb46712c91a7c5bd2d0c82a0da281f1460967aa4e32c648b15d8d97870ded9565a90af34874eb468aad8b99694a2485af6807994e7cfc05482aa8c
2022-11-17doc: test: update/fix TestShell example instructionsSebastian Falbesoner
Tackles two issues in the TestShell documentation: - add missing instruction for creating a wallet prior to the `getnewaddress` call (needed as there is no default wallet created anymore since v0.21) - fix `generatetoaddress` call syntax (the scripted-diff in commit fa0b916971e5bc23ad6396831940a2899ca05402 only worked for tests using `BitcoinTestFramework`)
2022-11-17test: Add getpeerinfo test for missing version messageMacroFake
2022-11-17test: Changed small_txpuzzle_randfee to return the virtual size instead of ↵Randall Naar
the transaction hex for feerate calculation.
2022-11-16refactor: Inline `CTxMemPoolEntry` class's functionsHennadii Stepanov
2022-11-16refactor: Move `CTxMemPoolEntry` class to its own moduleHennadii Stepanov
This change nukes the policy/fees->mempool circular dependency. Easy to review using `diff --color-moved=dimmed-zebra`.
2022-11-15Merge bitcoin/bitcoin#25730: RPC: listunspent, add "include immature ↵Andrew Chow
coinbase" flag fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 scripted-diff: wallet: rename AvailableCoinsParams members to snake_case (furszy) 61c2265629fdf11a2cc266fad54ceb0a1247bb5e wallet: group AvailableCoins filtering parameters in a single struct (furszy) f0f6a3577bef2e9ebd084fe35850e4e9580128a9 RPC: listunspent, add "include immature coinbase" flag (furszy) Pull request description: Simple PR; adds a "include_immature_coinbase" flag to `listunspent` to include the immature coinbase UTXOs on the response. Requested by #25728. ACKs for top commit: danielabrozzoni: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 achow101: ACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 aureleoules: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 kouloumos: reACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 theStack: Code-review ACK fa84df1f033a5d1a8342ea941eca0b5ef73d78e7 Tree-SHA512: 0f3544cb8cfd0378a5c74594480f78e9e919c6cfb73a83e0f3112f8a0132a9147cf846f999eab522cea9ef5bd3ffd60690ea2ca367dde457b0554d7f38aec792
2022-11-16RPC/Blockchain: Clarify invalid-action error in scanblocks & scantxoutsetLuke Dashjr
2022-11-15Merge bitcoin/bitcoin#16981: Improve runtime performance of --reindexAndrew Chow
db929893ef0bc86ea2708cdbcf41152240cd7c73 Faster -reindex by initially deserializing only headers (Larry Ruane) c72de9990ae8f1744006d9c852023b882d5ed80c util: add CBufferedFile::SkipTo() to move ahead in the stream (Larry Ruane) 48a68908ba3d5e077cda7bd1e908b923fbead824 Add LoadExternalBlockFile() benchmark (Larry Ruane) Pull request description: ### Background During the first part of reindexing, `LoadExternalBlockFile()` sequentially reads raw blocks from the `blocks/blk00nnn.dat` files (rather than receiving them from peers, as with initial block download) and eventually adds all of them to the block index. When an individual block is initially read, it can't be immediately added unless all its ancestors have been added, which is rare (only about 8% of the time), because the blocks are not sorted by height. When the block can't be immediately added to the block index, its disk location is saved in a map so it can be added later. When its parent is later added to the block index, `LoadExternalBlockFile()` reads and deserializes the block from disk a second time and adds it to the block index. Most blocks (92%) get deserialized twice. ### This PR During the initial read, it's rarely useful to deserialize the entire block; only the header is needed to determine if the block can be added to the block index immediately. This change to `LoadExternalBlockFile()` initially deserializes only a block's header, then deserializes the entire block only if it can be added immediately. This reduces reindex time on mainnet by 7 hours on a Raspberry Pi, which translates to around a 25% reduction in the first part of reindexing (adding blocks to the index), and about a 6% reduction in overall reindex time. Summary: The performance gain is the result of deserializing each block only once, except its header which is deserialized twice, but the header is only 80 bytes. ACKs for top commit: andrewtoth: ACK db929893ef0bc86ea2708cdbcf41152240cd7c73 achow101: ACK db929893ef0bc86ea2708cdbcf41152240cd7c73 aureleoules: ACK db929893ef0bc86ea2708cdbcf41152240cd7c73 - minor changes and new benchmark since last review theStack: re-ACK db929893ef0bc86ea2708cdbcf41152240cd7c73 stickies-v: re-ACK db929893e Tree-SHA512: 5a5377192c11edb5b662e18f511c9beb8f250bc88aeadf2f404c92c3232a7617bade50477ebf16c0602b9bd3b68306d3ee7615de58acfd8cae664d28bb7b0136
2022-11-15test: Set default in add_wallet_options if only one type can be chosenMacroFake