aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-31ci, android: Update Command-line Tools from 2.1 up to 7.0Hennadii Stepanov
2022-05-31ci: Drop unneeded packages in "ARM64 Android APK" taskHennadii Stepanov
2022-05-31Merge bitcoin/bitcoin#25200: doc: Fix spelling errors identified by ↵MacroFake
codespell in comments f565b2836d5efeb6f7c16d0fac813b06fa4d41e4 Fixup option name in bench message (Ben Woosley) bf209ac7a732394c3a54d6d1e3fb43f180ac1bb8 doc: Fix spelling errors identified by codespell in coments (Ben Woosley) Pull request description: From the output [here](https://cirrus-ci.com/task/5275612980969472?logs=lint#L849): ``` src/qt/test/addressbooktests.cpp:185: wilcard ==> wildcard src/qt/test/addressbooktests.cpp:191: wilcard ==> wildcard src/test/miniscript_tests.cpp:227: nd ==> and, 2nd src/test/versionbits_tests.cpp:260: everytime ==> every time src/util/time.h:89: precicion ==> precision src/util/time.h:90: precicion ==> precision ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt ``` ~~I left the 'nd' in miniscript_tests as-is, as it's valid miniscript, and I'm wary of whitelisting it.~~ ACKs for top commit: dunxen: ACK f565b28 Tree-SHA512: 501a426c5f6f9761e2c8f980d5d955611428a827321888f53e0ae9526b0fecd43f9d1fa845fc70ae2489d77be6dc0b5b371dff55c5146f4b39ed874f4a1ea917
2022-05-31Merge bitcoin/bitcoin#25253: test: add coverage for non-hex value to ↵MacroFake
-minimumchainwork ebfc308ea4b8851118e8194d837556bf443c329c test: add coverage for non-hex value to -minimumchainwork (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/b9ef5a10e2fa4609d048db57b99463305455ebe4/src/init.cpp#L917-L919 Passing a non-hex value to -minimumchainwork should throw an initial error. ACKs for top commit: laanwj: Code review ACK ebfc308ea4b8851118e8194d837556bf443c329c kristapsk: re-ACK ebfc308ea4b8851118e8194d837556bf443c329c Tree-SHA512: c665903757ae3b8b2480df97bb888e60ba4387b009fcb8031041822e87a155a0e4950ebe79873c1034f0826504521d82b1fdfdb5e8378b227d14ca545b8d4e11
2022-05-31test: add coverage for non-hex value to -minimumchainworkbrunoerg
2022-05-31Merge bitcoin/bitcoin#24178: p2p: Respond to getheaders if we have ↵MacroFake
sufficient chainwork a35f963edf1a14ee572abea106fb0147575e4694 Add test for getheaders behavior (Suhas Daftuar) ef6dbe6863d92710fd2da7781e5b2aac87578751 Respond to getheaders if we have sufficient chainwork (Suhas Daftuar) Pull request description: Previously, we would check to see if we were in IBD and ignore getheaders requests accordingly. However, the IBD criteria -- an optimization mostly targeted at behavior when we have peers serving us many blocks we need to download -- is difficult to reason about in edge-case scenarios, such as if the network were to go a long time without any blocks found and nodes are getting restarted during that time. To make things simpler to reason about, just use `nMinimumChainWork` as our anti-DoS threshold for responding to a getheaders request; as long as our chain has that much work, it should be fine to respond to a peer asking for our headers (and this should allow such a peer to request blocks from us if needed). ACKs for top commit: klementtan: crACK a35f963edf1a14ee572abea106fb0147575e4694 naumenkogs: ACK a35f963edf1a14ee572abea106fb0147575e4694 MarcoFalke: review ACK a35f963edf1a14ee572abea106fb0147575e4694 🗯 Tree-SHA512: 131e3872e7fe80382ea9c1ec202d6c2dc59c006355c69000aa3f4ce6bccd02a6c689c8cb8f3542b5d9bc48bfa61edcbd1a78535c0b79018971d02bed2655d284
2022-05-31Merge bitcoin/bitcoin#25246: Revert "build: more robustly check for ↵MacroFake
fcf-protection support" a7973bf8f46a7fe1c70d33a1098da6aba66baaed Revert "build: more robustly check for fcf-protection support" (fanquake) Pull request description: We no-longer support Clang 7 (#24164). Introduced in #20720. This reverts commit e9189a750b237eba1befc6b16c12c2cee3e0176c. ACKs for top commit: hebasto: re-ACK a7973bf8f46a7fe1c70d33a1098da6aba66baaed Tree-SHA512: 82559637f21a97434ab29f908ebda1aada08b0786cbbf0b4d11085241942314c3f04261a624c5cd2cb3c94c99046b56626830da6b9775981ab4ba10d5979f998
2022-05-31Revert "build: more robustly check for fcf-protection support"fanquake
We no-longer support Clang 7 (#24164). This reverts commit e9189a750b237eba1befc6b16c12c2cee3e0176c.
2022-05-30Merge bitcoin-core/gui#609: wallet, refactor: Drop unused ↵Hennadii Stepanov
`WalletModel::PaymentRequestExpired` 151009cf76f3f1adc17630d5370bf019be127373 qt, wallet, refactor: Drop unused `WalletModel::PaymentRequestExpired` (Hennadii Stepanov) Pull request description: The `PaymentRequestExpired` value in the `WalletModel::StatusCode` enumeration has been unused since bitcoin/bitcoin#17165. ACKs for top commit: furszy: ACK 151009cf, no usage for it. kristapsk: cr ACK 151009cf76f3f1adc17630d5370bf019be127373, checked that `PaymentRequestExpired` is not referenced anywhere else. Tree-SHA512: c2ea3443af5d369ca294d79559869f688aaa806b91ffe0090f3b34638a8377ec2f11d6f5c09cc2d11ab55035850237e60e992acba671097a6642c6bb9e709273
2022-05-30Merge bitcoin/bitcoin#25044: test: Use MiniWallet in rpc_rawtransaction.pyMacroFake
e8959000b63db4f2a21579fd4be27618c5fbd5b9 test: Use MiniWallet in rpc_rawtransaction.py (Daniela Brozzoni) e93046c10b4d4e139cd7b41791ad1bfe925351e2 MOVEONLY: Move signrawtransactionwithwallet test (Daniela Brozzoni) Pull request description: This PR allows `rpc_rawtransaction.py` to be run even without the Core wallet by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. This test was previously run twice, once with `--legacy-wallet` and once with `--descriptors`. Since this would have meant running the same test twice if the wallet wasn't compiled, now we run it just once with the legacy wallet. ACKs for top commit: jonatack: ACK e8959000b63db4f2a21579fd4be27618c5fbd5b9 Tree-SHA512: d1580570a54dad8e30a5df1ab7d03ecb3f824efe6843323e1f3aef63592045d823c7d54fc86321dc7c1d414854a253431a01a7baa9f30426ea9a09ef11ae3a04
2022-05-30test: Use MiniWallet in rpc_rawtransaction.pyDaniela Brozzoni
This test was previously run twice, once with `--legacy-wallet` and once with `--descriptors`. Now we run it only with `--legacy-wallet`, as all the tests has been ported to the MiniWallet but `raw_multisig_transaction_legacy_tests`, which can be run only with the legacy wallet. We also decrease the number of nodes used from 4 to 3, making the test run slightly faster.
2022-05-30MOVEONLY: Move signrawtransactionwithwallet testDaniela Brozzoni
Put signrawtransactionwithwallet_tests in rpc_signrawtransaction.py, as the test is mainly testing the signrawtransaction RPC. Review with `git show --color-moved=dimmed-zebra`
2022-05-30Merge bitcoin/bitcoin#24424: doc: release process chainparams updateslaanwj
74743ad90590708b46a8bc8cb9cefedb66471306 Clarify in release process how to update defaultAssumeValid/nMinimumChainWork (Jon Atack) 415345d5475854ae34056594ac0bc464d739d3af Release process: use 4096 blocks and getbestblockhash for getchaintxstats (Jon Atack) fe048f7f7cd15597f24ca219a0077c46d088ca30 Specify in release process which chains need to be updated (Jon Atack) 584147682ad670cd3be99006af5d643549bba3bc Reorganize release process chainparams section to reduce repetition (Jon Atack) e8f844888f3663d0cbb8765271d1ee5fea4af579 Clarify release process overhead note to be more actionable (Jon Atack) e538eada7c559362f43051f18d38b3d3c3be2dc8 Release process: exclude huge files for mainnet m_assumed_blockchain_size (laanwj) b4d2d74767ed0441dbc3a789cad2334eaac54290 Release process: specify blockchain/chain_state units, reduce repetition (Jon Atack) 318655c3951d69adfa0aaf9f7b5064172678494f Add missing references to signet in the release process (Jon Atack) Pull request description: Release process updates, fixes and clarifications regarding updating the chainparams: - add missing references to signet - specify specify blockchain/chainstate units, reduce repetition - exclude huge files for m_assumed_blockchain_size on mainnet - rewrite overhead note to be more actionable - reorganize the chainparams section to reduce repetition - specify which chains need to be updated - use 4096 blocks and getbestblockhash for getchaintxstats - clarify how to update defaultAssumeValid and nMinimumChainWork ACKs for top commit: laanwj: ACK 74743ad90590708b46a8bc8cb9cefedb66471306 brunoerg: re-ACK 74743ad90590708b46a8bc8cb9cefedb66471306 Tree-SHA512: 7fc092be739f63c5d8404add2dcbcd0c570b680ff0ab36a9b5a774b2e930717beebaa6c867ab6db6795b3c234d9016ab1ae905a78d6ea6610140a59930c43029
2022-05-30Merge bitcoin/bitcoin#25233: compat: remove glibcxx sanity checksMacroFake
cc61bc2e19b1c8cb32778ef42746d32b02cc2671 compat: remove glibcxx sanity checks (fanquake) Pull request description: These checks were added in #4339, (see also #4081), to test our back-compat stubs, however, those stubs no-longer exist (#22930), meaning that these checks are now just testing some specific standard library behaviour, without a particular rationale, or reason, compared to any other standard library functionlity we use. There has also been some discussion about our sanity checks in the context of the libbitcoinkernel refactoring, see https://github.com/bitcoin/bitcoin/pull/25065#discussion_r880668218. Removing the checks removes the need to worry about atleast the glibcxx checks. Also remove the list of checks from the doc in `init.h`, because it is incomplete, and anyone who wants to know what checks are included can look at the function. Guix Build (arm64): ```bash e18a81e25b4707cbe113fb4d3ba2459013c1178e7cecfe446e4f14ee5ecd2ce8 guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/SHA256SUMS.part 9928cc38b79f827018cba0bdde98666b31806afcc79dd95a00acb8e153c36eec guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/bitcoin-cc61bc2e19b1-arm-linux-gnueabihf-debug.tar.gz ebf4635ba4688899ae62e4bb17ebb2afb25c538c4a8068ef515920fd4e43754e guix-build-cc61bc2e19b1/output/arm-linux-gnueabihf/bitcoin-cc61bc2e19b1-arm-linux-gnueabihf.tar.gz 74c7e35b47c6d101fda7205f144d37150329b4c360db09d37b8c1437f3390898 guix-build-cc61bc2e19b1/output/arm64-apple-darwin/SHA256SUMS.part 6e12643b17be9326f1d873dfe51a52c082671540792877af624b42ca9f6e1791 guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin-unsigned.dmg 1d86d0416c7a50afd7bd8d850f416b7c7277464ccc95e4dae53b5b59415fc83d guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin-unsigned.tar.gz 84070843f23839e7191ad3a667eb63c45f668eb95afbfb3fcdfb8363320f67d4 guix-build-cc61bc2e19b1/output/arm64-apple-darwin/bitcoin-cc61bc2e19b1-arm64-apple-darwin.tar.gz bf6ccd7b8c40476b1dc52b491757313ea3e96c43a01c8aabaf39f94dc1837329 guix-build-cc61bc2e19b1/output/dist-archive/bitcoin-cc61bc2e19b1.tar.gz 25e7e1ff7d8de38632abf9926343c8ba556209f3d03109c92864ffe72813a05f guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/SHA256SUMS.part d0398de83841607b1bf921d4553b30ad5e2d70d0570e96a2eaaf2762e1103c79 guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64-linux-gnu-debug.tar.gz f09cdc2ac2a2bb644f4749f3d74b5210ddb531594c33d127a907f0223e7793e5 guix-build-cc61bc2e19b1/output/powerpc64-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64-linux-gnu.tar.gz ef36a68ef4e5ee9b311df40062cd2296f897e7b1550e39e0643601cd7d469010 guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/SHA256SUMS.part 937b600a2b86304ccc5b6c71a7eaf8aa5e2020592724cef6a933a1955995480b guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64le-linux-gnu-debug.tar.gz eca4eec41e71fdf7a7b0fa4065afa49c47d3b9541ed2cb4d083ad4a0de102e37 guix-build-cc61bc2e19b1/output/powerpc64le-linux-gnu/bitcoin-cc61bc2e19b1-powerpc64le-linux-gnu.tar.gz 981c0968c19905925a599cff357ec259c1e806bdb7691c7b52039be450bdad7c guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/SHA256SUMS.part 89c709967f9a157256281fbf682aad246f2eaad9c2f1797c2787253cbabe12f8 guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/bitcoin-cc61bc2e19b1-riscv64-linux-gnu-debug.tar.gz 454cd830dd382e176f5a23041fc33f93937668245481b0dd29fc04882d9528eb guix-build-cc61bc2e19b1/output/riscv64-linux-gnu/bitcoin-cc61bc2e19b1-riscv64-linux-gnu.tar.gz e0812c2dc492e5c5f06e3685d19da8fb29ed38d3b32821d293ef01cb4fefbd79 guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/SHA256SUMS.part 0e7d4241d8ac882a8091fa00a7813db87a3e5afec59627e45b6c910cfdd4a7b0 guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin-unsigned.dmg 3faaca046cbb2642445a7dd1f389ed7bf94a65de8372441c36d5cb79c030ce31 guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin-unsigned.tar.gz 73080f032a42db679baf0d09619671ac5b9d85be84a68bdd6b6709eb0e6465bd guix-build-cc61bc2e19b1/output/x86_64-apple-darwin/bitcoin-cc61bc2e19b1-x86_64-apple-darwin.tar.gz 07b6e1b6291404bca1044df4a45b6958b882ffb88c143ba98f1959960a394897 guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/SHA256SUMS.part 16b455f62398f4aa0d3821abb1cceb8151e31c2664e3f974a764a5b8702b50f3 guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/bitcoin-cc61bc2e19b1-x86_64-linux-gnu-debug.tar.gz 3c1a3a6a343f17b83f3b3d47e9426eccd2d0bcc7f824cd958fcf2cf06cdc3276 guix-build-cc61bc2e19b1/output/x86_64-linux-gnu/bitcoin-cc61bc2e19b1-x86_64-linux-gnu.tar.gz f05afa688ea7211b0049555385fb2acc26986e24d8d00893389160e07037e693 guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/SHA256SUMS.part 8bcbae67dd0746c42e1e7c7db67725a69289b08e9aa97b873d443d0aa355615d guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-debug.zip efa45e3b76e5ae08a8392d58e741325df572d92c7dd69b65d876cdcda541d2fc guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-setup-unsigned.exe 3a8c2461ca826138c3017d06279a79b4c6bee2a507ad362aa6e424f76678596c guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64-unsigned.tar.gz e56ae4f609d4e6a3ca5917a4bb763c91012ece2d236d6b62a666358791e43525 guix-build-cc61bc2e19b1/output/x86_64-w64-mingw32/bitcoin-cc61bc2e19b1-win64.zip ``` ACKs for top commit: MarcoFalke: lgtm ACK cc61bc2e19b1c8cb32778ef42746d32b02cc2671 laanwj: Concept and code review ACK cc61bc2e19b1c8cb32778ef42746d32b02cc2671 Tree-SHA512: 3da6aba44eef3f864fcbe897db1faa964923756e68c6a713e444b5d01c6d3542c3d7ca26678760e81a7a9e3cd40bd90622d0a7b697c27166817ba4f1023661ef
2022-05-30Merge bitcoin/bitcoin#25237: rpc: Capture UniValue by ref for rpcdoccheckfanquake
20ff4991e548630d7bb5e491fa4d69ec49369872 rpc: Capture potentially large UniValue by ref for rpcdoccheck (Martin Zumsande) Pull request description: Capturing it by reference instead of value should save us from making a copy of a potentially large object. Saw this while having a look at #25229 although I couldn't reproduce an actual leak, so this is not a fix for that issue. ACKs for top commit: MarcoFalke: review ACK 20ff4991e548630d7bb5e491fa4d69ec49369872 theStack: Code-review ACK 20ff4991e548630d7bb5e491fa4d69ec49369872 furszy: Code ACK 20ff4991 Tree-SHA512: faf7bb14e37f8324b93a39095b07693626329da47c4a1ac8929bf99385e2e0567008e959e7e8540bc7d454d08fa41cccd39f55253c9a839fa88362922058a93b
2022-05-30Merge bitcoin/bitcoin#25204: rpc: remove deprecated top-level fee fields ↵MacroFake
from mempool entries 885694d7941ccb601388bc8412ac1df182785ef8 doc: add release note about removal of `deprecatedrpc=fees` flag (Sebastian Falbesoner) 387ae8bc09ac211af4a4e45ea4ff22518d541d0b rpc: remove deprecated fee fields from mempool entries (Sebastian Falbesoner) Pull request description: Deprecating the top-level fee fields (`fee`, `modifiedfee`, `ancestorfees` and `descendantfees`) from the mempool entries and introducing `-deprecatedrpc=fees` was done in PR #22689 (released in v23.0). For the next release v24.0, this configuration option can be removed. ACKs for top commit: fanquake: ACK 885694d7941ccb601388bc8412ac1df182785ef8 Tree-SHA512: fec6b5be5c3f0cd55738a888b390ef9271e70b2dba913a14ce82427dac002e999f93df298bb3b494f3d1b850a23d2b5b3e010e901543b0d18db9be133579e1ec
2022-05-29Merge bitcoin/bitcoin#25231: ci: Install documented packages for "Win64" CI taskfanquake
3ffc190321836f7c79f0cb21ee71d357a0e32c44 ci: Install documented packages for "Win64" CI task (Hennadii Stepanov) Pull request description: This minor change has the following benefits: - it follows the [documented](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md#building-for-64-bit-windows) way for modern Ubuntu distros (this CI task uses jammy) - it makes package installation time shorter as no need to install the `g++-mingw-w64-x86-64-win32` package - (not directly related to this repo) in https://github.com/bitcoin-core/gui-qml Qt 5.15.3 (but not 5.15.2) build system goes [wild](https://cirrus-ci.com/task/6231535933194240) otherwise ACKs for top commit: fanquake: ACK 3ffc190321836f7c79f0cb21ee71d357a0e32c44 jarolrod: ACK 3ffc190321836f7c79f0cb21ee71d357a0e32c44 Tree-SHA512: 41fd6deedb3febc90cc4f2037dfbf840d82ef5b1dd950a0ff458cae6c1b1024559b21c8e1135c2d37780e80dd3f9f9751d638120443d0d60c22ac160cf693e2a
2022-05-29qt, wallet, refactor: Drop unused `WalletModel::PaymentRequestExpired`Hennadii Stepanov
Also dead code has been removed.
2022-05-29rpc: Capture potentially large UniValue by ref for rpcdoccheckMartin Zumsande
2022-05-28ci: Install documented packages for "Win64" CI taskHennadii Stepanov
2022-05-28compat: remove glibcxx sanity checksfanquake
These checks were added in #4339, (see also #4081), to test our back-compat stubs, however, those stubs no-longer exist (#22930), meaning that these checks are now just testing some specific standard library behaviour, without a particular rationale, or reason, compared to any other standard library functions we use. There has also been some discussion about the sanity checks in the context of the libbitcoinkernel refactoring, see https://github.com/bitcoin/bitcoin/pull/25065#discussion_r880668218. Removing the checks removes the need to worry about atleast the glibcxx checks. Also remove the list of check from the doc in init.h, because it is incomplete, and anyone who wants to know what checks are included can look at the function.
2022-05-28Merge bitcoin/bitcoin#25224: Get time less often in ↵fanquake
AddrManImpl::ResolveCollisions_() fa27ee88edbf696b7eef2efbfcf1446ec522fd85 Get time less often in AddrManImpl::ResolveCollisions_() (MarcoFalke) Pull request description: First commit split out from https://github.com/bitcoin/bitcoin/pull/24697 ACKs for top commit: sipa: utACK fa27ee88edbf696b7eef2efbfcf1446ec522fd85 fanquake: ACK fa27ee88edbf696b7eef2efbfcf1446ec522fd85 Tree-SHA512: 40c8594d2a5ce02a392ac5f9f120c24c6bcd495b0bcc901fd6064dde9f6123cd109504cee7b612a9555b70cfd7759cbd6cd496d007bb374c27610d01b464191c
2022-05-27doc: add release note about removal of `deprecatedrpc=fees` flagSebastian Falbesoner
2022-05-27rpc: remove deprecated fee fields from mempool entriesSebastian Falbesoner
2022-05-27Merge bitcoin/bitcoin#25214: multiprocess build fix: ipc/capnp/init.capnp.h: ↵fanquake
No such file or directory 44904aa632cbe0722a52f1907ae015f1c6338ddf multiprocess build cleanup: comment on manual dependencies (Ryan Ofsky) 6e1c16c1442ab30694a3668b45af5bfd532f1e12 multiprocess build fix: ipc/capnp/init.capnp.h: No such file or directory (Ryan Ofsky) Pull request description: Error was reported by SatoriHoshiAiko in https://github.com/bitcoin/bitcoin/issues/25207 and happens unpredictably because make doesn't always build dependencies in the same order. The source file `src/ipc/capnp/protocol.cpp` includes some generated headers so needs to have an explicit dependency specified in the makefile so the headers will be generated before the file is compiled. #19160 added the explicit dependency, but it was incorrect because it referred to an old file path from before the source file was renamed (`ipc.cpp` -> `protocol.cpp`) ACKs for top commit: hebasto: re-ACK 44904aa632cbe0722a52f1907ae015f1c6338ddf Tree-SHA512: 578ef4ef35a97e9d8d4e6d4edf39e57a32674234bf145e8159268324cb6ba15b420517afc07f6f42bb11a562954ea74af686c3fb92ce178c1fc378421b352531
2022-05-27Merge bitcoin/bitcoin#24408: rpc: add rpc to get mempool txs spending ↵MacroFake
specific prevouts 418557034055f740951294e7677ae9fd5149ea9b Add RPC to get mempool txs spending outputs (t-bast) Pull request description: We add an RPC to fetch mempool transactions spending any of the given outpoints. Without this RPC, application developers need to first call `getrawmempool` which returns a long list of `txid`, then fetch each of these transactions individually (`getrawtransaction`) to check whether they spend the given outpoints, which wastes a lot of bandwidth (in the worst case we need to transfer the whole mempool). For example in lightning, when we discover that one of our channel funding transactions has been spent, we need to find the spending transaction to claim our outputs from it. We are currently forced to fetch the whole mempool to do the analysis ourselves, which is quite costly. I believe that this RPC is also generally useful when doing some introspection on your mempool after one of your transactions failed to broadcast, for example when you implement RBF at the application level. Fetching and analyzing the conflicting transaction gives you more information to successfully replace it. ACKs for top commit: darosior: re-utACK 418557034055f740951294e7677ae9fd5149ea9b vincenzopalazzo: re-ACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b danielabrozzoni: re-tACK 418557034055f740951294e7677ae9fd5149ea9b w0xlt: reACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b Tree-SHA512: 206687efb720308b7e0b6cf16dd0a994006c0b5a290c8eb386917a80130973a6356d0d5cae1c63a01bb29e066dd721594969db106cba7249214fcac90d2c3dbc
2022-05-27Merge bitcoin/bitcoin#24934: refactor, miner: Delete call to ↵MacroFake
UpdatePackagesForAdded at beginning of addPackageTxs 7036cf52aa080d2a63993c2298555252d507dd2f Delete UpdatePackagesForAdded at beginning of addPackageTxs. (KevinMusgrave) Pull request description: In `CreateNewBlock` (in miner.cpp), `inBlock` is cleared before `addPackageTxs`, so `inBlock` will be empty in the first call to `UpdatePackagesForAdded`. I saw this brought up in these [PR review club logs](https://bitcoincore.reviews/24538) and there didn't seem to be a definitive answer for why the call is necessary. There's also an [old PR](https://github.com/bitcoin/bitcoin/pull/10200) where this change was going to be applied, but it got closed. If `addPackageTxs` can be called when `inBlock` is not empty, then maybe a test should be added for that case. All the tests seem to pass with this deletion. ACKs for top commit: glozow: utACK 7036cf52aa080d2a63993c2298555252d507dd2f Tree-SHA512: 9e757b71b9035f68a0c6fef229b8cd83f1bdbe23f05bb02cc1bab8c3c177805b388bceb2bb1f0bce354791ccb29f351a6c51979b96ffe4d9fc6c978f83e36afc
2022-05-27Merge bitcoin/bitcoin#25201: windeploy: Renewed windows code signing certificatefanquake
7e9fe6d800ee8f3381e8f6ad2371f7775c68fad9 windeploy: Renewed windows code signing certificate (Andrew Chow) Pull request description: The current windows code signing certificate expires on May 26 23:59:59 2022 GMT. I have purchased a new code signing certificate which will expire on May 29 23:59:59 2024 GMT. ACKs for top commit: laanwj: ACK 7e9fe6d800ee8f3381e8f6ad2371f7775c68fad9 fanquake: ACK 7e9fe6d800ee8f3381e8f6ad2371f7775c68fad9 - tested above with OpenSSL 3 & faketime. Tree-SHA512: 283eb863d4db0573c7e78fe9d8f1b855533fc45b0995cd2d66e40b5242eb9bc9317b01e1b151fe49d512cd4aa6c48e2390017070f79db46493813fdd0a0f568a
2022-05-27Merge bitcoin/bitcoin#25217: scripts and tools: update lint-logs.py to ↵MacroFake
detect LogPrintLevel, mention WalletLogPrintf 75848ec2daa43b648cf497c59924d389e8243320 scripts and tools: update lint-logs.py to detect LogPrintLevel() (Jon Atack) Pull request description: Follow-up to #24464 that added the `LogPrintLevel()` macro. - update the `lint-logs.py` script to detect `LogPrintLevel()` - add `WalletLogPrintf()` (already detected but not mentioned) to the linter suggestion Example output: ``` $ test/lint/lint-logs.py All calls to LogPrintf(), LogPrint(), LogPrintLevel(), and WalletLogPrintf() should be terminated with "\n". src/addrdb.cpp:147: LogPrintf("banlist.dat ignored because it can only be read by " PACKAGE_NAME " version 22.x. Remove %s to silence this warning.", fs::quoted(fs::PathToString(m_banlist_dat))); src/addrman.cpp:388: LogPrint(BCLog::ADDRMAN, "addrman lost %i new and %i tried addresses due to collisions or invalid addresses", nLostUnk, nLost); src/banman.cpp:41: LogPrintf("Recreating the banlist database"); src/banman.cpp:66: LogPrint(BCLog::NET, "Flushed %d banned node addresses/subnets to disk %dms", banmap.size(), src/banman.cpp:194: LogPrint(BCLog::NET, "Removed banned node address/subnet: %s", sub_net.ToString()); src/net.cpp:2092: LogPrint(BCLog::NET, "Trying to make an anchor connection to %s", addrConnect.ToString()); src/net.cpp:2408: LogPrintLevel(BCLog::Level::Error, BCLog::NET, "%s", strError.original); src/net.cpp:2416: LogPrintf("%s", strError.original); src/net.cpp:2432: LogPrintf("%s", strError.original); src/net.cpp:2453: LogPrintLevel(BCLog::Level::Error, BCLog::NET, "%s", strError.original); src/netbase.cpp:573: LogPrintf("wait for connect to %s failed: %s", src/netbase.cpp:578: LogPrint(BCLog::NET, "connection attempt to %s timed out", addrConnect.ToString()); src/netbase.cpp:590: LogPrintf("getsockopt() for %s failed: %s", addrConnect.ToString(), NetworkErrorString(WSAGetLastError())); src/wallet/wallet.cpp:186: wallet->WalletLogPrintf("Releasing wallet"); src/wallet/wallet.cpp:1809: WalletLogPrintf("Rescan completed in %15dms", duration_milliseconds.count()); ``` ACKs for top commit: laanwj: ACK 75848ec2daa43b648cf497c59924d389e8243320 Tree-SHA512: 78b3bc4428aaec2d198e1ff1c44b614fa2f2a228feb6303d97765136e4796171928d341c6e55a1d4e9e5a82ab099b14fee562b878dcf7bd2276f87bd9a8d323e
2022-05-26Merge bitcoin/bitcoin#24032: Add defaults to vDeployments to avoid ↵laanwj
uninitialized variables c4c5b9ca6e98cf44309af73edf5559940a04d00f consensus/params: set default values for BIP9Deployment (Anthony Towns) Pull request description: Adds default values for `vDeployments` in `consensus/params.h` so that undefined behaviour is avoided if a deployment is not initialized. Also adds a check in the unit tests to alert if this is happening, since even if it doesn't invoke undefined behaviour it's probably a mistake. ACKs for top commit: laanwj: Code review ACK c4c5b9ca6e98cf44309af73edf5559940a04d00f Tree-SHA512: 22d7ff86a817d9e9e67c47301fc3b7e9d5821c13565d7706711f113dea220eea29b413a7c8d029691009159cebc85a108d77cb52418734091c196bafb2b12423
2022-05-26Merge bitcoin/bitcoin#25003: tracing: fix ↵Andrew Chow
`coin_selection:aps_create_tx_internal` calling logic 6b636730f4befee39d57fcfd51298f3015dbf563 tracing: fix `coin_selection:aps_create_tx_internal` calling logic (Sebastian Falbesoner) Pull request description: According to the documentation, the tracepoint `coin_selection:aps_create_tx_internal` "Is called when the second `CreateTransactionInternal` with Avoid Partial Spends enabled completes." Currently it is only called if the second call to `CreateTransactionInternal` succeeds, i.e. the third parameter is always `true` and we don't get notified in the case that it fails. This PR fixes this by moving the tracepoint call and the `use_aps` boolean variable outside the if body. ACKs for top commit: achow101: ACK 6b636730f4befee39d57fcfd51298f3015dbf563 furszy: re-ACK 6b636730 Tree-SHA512: 453825123aa10748642c7dd94324ced2d07df0f4fac478b0947a34820b515ae300f75721679a90a164f3127029739df55c4de035c4567e663893c3c6dbdef216
2022-05-26Merge bitcoin/bitcoin#15936: interfaces: Expose settings.json methods to GUIMacroFake
f9fdcec7e932843a91ddf7f377e00bd2a6efb82a settings: Add resetSettings() method (Ryan Ofsky) 77fabffef4ea840ee15c97061048fe8443d74658 init: Remove Shutdown() node.args reset (Ryan Ofsky) 0e55bc6e7fe439404dc56093a0949395dae51e6b settings: Add update/getPersistent/isIgnored methods (Ryan Ofsky) Pull request description: Add `interfaces::Node` `updateSetting`, `forceSetting`, `resetSettings`, `isSettingIgnored`, and `getPersistentSetting` methods so GUI is able to manipulate `settings.json` file and use and modify node settings. (Originally this PR also contained GUI changes to unify bitcoin-qt and bitcoind persistent settings and call these methods, but the GUI commits have been dropped from this PR and moved to bitcoin-core/gui/pull/602) ACKs for top commit: vasild: ACK f9fdcec7e932843a91ddf7f377e00bd2a6efb82a hebasto: re-ACK f9fdcec7e932843a91ddf7f377e00bd2a6efb82a, only a function renamed since my recent [review](https://github.com/bitcoin/bitcoin/pull/15936#pullrequestreview-979324357). Tree-SHA512: 4cac853ee29be96d2ff38404165b9dfb7c622b2a9c99a15979596f3484ffde0da3d9c9c372677dff5119ca7cffa6383d81037fd9889a29cc9285882a8dc0c268
2022-05-26Merge bitcoin/bitcoin#25216: Doc: Fix parameter in hwm example blocklaanwj
43ff37f60eac1f867c798c1e3f18cb402f7ee795 Update zmq.md: Fix parameter in hwm example block (mutatrum) Pull request description: Looks like a copy/paste error when `zmqpubsequence` was introduced. ACKs for top commit: theStack: ACK 43ff37f60eac1f867c798c1e3f18cb402f7ee795 Tree-SHA512: 4d0abbba4e9fd0adc2824d0804891d677d56216d245ed0d3bffbaf76042c650edf68975d1ec4728328e69421c024fe6f8800c7e0a497934082206ea4f15cc517
2022-05-26Merge bitcoin/bitcoin#25210: doc: remove misleading AreInputsStandard() commentlaanwj
be6d4315c150646cf672778e9232f086403e95df doc: remove misleading AreInputsStandard() comment (James O'Beirne) Pull request description: This check isn't any longer just about bad pay-to-script-hash inputs; it also excludes any kind of nonstandard input, unknown witness versions, coinbases, etc. ACKs for top commit: laanwj: ACK be6d4315c150646cf672778e9232f086403e95df dunxen: ACK be6d431 jonatack: ACK be6d4315c150646cf672778e9232f086403e95df Tree-SHA512: 1c4befadff6a7b5789901ca2a2cc39adc35c688f7e3c093ab5292123f9193ce078731016b773b3d05f7004ff01ee62f23f8362ae8d05134d41dc097ba094a42b
2022-05-26Merge bitcoin/bitcoin#25202: log: Use severity-based logging for ↵laanwj
leveldb/libevent messages, reverse LogPrintLevel order c4e77177276ea2b79c4675cb2678ee2cc757b743 refactor: Change LogPrintLevel order to category, severity (laanwj) ce920713bf0810614c2c0c994511b50d4f660bce leveldb: Log messages from leveldb with category and debug level (laanwj) 18ec120bb9e1fc9d27d2419da4c580bd3cde7e86 http: Use severity-based logging for messages from libevent (laanwj) bd971bffb02c7b06aac9a479f7e5ed8f71de2bec logging: Unconditionally log levels >= WARN (laanwj) Pull request description: Log messages from leveldb and libevent libraries in the severity+level based log format introduced in bitcoin/bitcoin#24464. Example of messages before: ``` 2022-05-24T18:11:57Z [libevent] libevent: event_add: event: 0x55da963fcc10 (fd 10), EV_READ call 0x7f1c7a254620 2022-05-24T18:11:57Z [libevent] libevent: Epoll ADD(1) on fd 10 okay. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none) 2022-05-24T18:12:08Z leveldb: Generated table #609127@1: 6445 keys, 312916 bytes 2022-05-24T18:12:08Z leveldb: Generated table #609128@1: 5607 keys, 268548 bytes 2022-05-24T18:12:08Z leveldb: Generated table #609129@1: 189 keys, 9384 bytes 2022-05-24T18:12:08Z leveldb: Generated table #609130@1: 293 keys, 13818 bytes ``` Example of messages after: ``` 2022-05-24T17:59:52Z [libevent:debug] event_add: event: 0x5652f44dac10 (fd 10), EV_READ call 0x7f210f2e6620 2022-05-24T17:59:52Z [libevent:debug] Epoll ADD(1) on fd 10 okay. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none) 2022-05-24T17:59:53Z [leveldb:debug] Recovering log #1072 2022-05-24T17:59:53Z [leveldb:debug] Level-0 table #1082: started 2022-05-24T17:59:53Z [leveldb:debug] Level-0 table #1082: 193 bytes OK 2022-05-24T17:59:53Z [leveldb:debug] Delete type=3 #1070 2022-05-24T17:59:53Z [leveldb:debug] Delete type=0 #1072 ``` The first commit changes it so that messages with level Warning and Error are always logged independent of the `-debug` setting. I think this is useful to make sure warnings and errors, which tend to be important, are not lost. In the future this should be made more configurable. Last commit changes LogPrintLevel argument order to category, severity: This is more consistent with the other functions, as well as with the logging output itself. If we want to make this change, we should do it before it's all over the place. ACKs for top commit: jonatack: Tested ACK c4e77177276ea2b79c4675cb2678ee2cc757b743 Tree-SHA512: ea48a1517f8c1b23760e59933bbd64ebf09c32eb947e31b8c2696b4630ac1f4303b126720183e2de052bcede3a17e475bbf3fbb6378a12b0fa8f3582d610930d
2022-05-26scripts and tools: update lint-logs.py to detect LogPrintLevel()Jon Atack
and add WalletLogPrintf() (already detected) to the lint-logs.py suggestion Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-05-26Merge bitcoin/bitcoin#25132: consensus: Add BIP-341 specified constraints in ↵laanwj
`ComputeTaprootMerkleRoot` bd7c5e2f0a1b572decdf3a4bafe4ee990e1f4953 Add BIP-341 specified constraints to `ComputeTaprootMerkleRoot` (David Bakin) Pull request description: [**N.B.:** This PR **_does not change the consensus_**. It only adds `assert` statements according to the current consensus in consensus-sensitive code (`interpreter.cpp`). So that's why the bot added the "consensus" tag and I prefixed the PR title with "consensus".] BIP 341 specifies [constraints on the size of the control block _c_ used to compute the taproot merkle root](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#script-validation-rules). > The last stack element is called the control block _c_, and must have length _33 + 32m_, for a value of _m_ that is an integer between 0 and 128, inclusive. Fail if it does not have such a length. The actual merkle root is computed in `ComputeTaprootMerkleRoot` ([interpreter.cpp@1833](https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L1833)) - this code does _not_ check these constraints. All the callers do check the constraints before calling `ComputeTaprootMerkleRoot`. But in the future there may be more callers, and these checks may be inadvertently omitted at those future calls. Also, code at/near the current call sites may also change and skip these checks. Therefore _this PR adds those checks as `asserts` directly in `ComputeTaprootMerkleRoot`_ to help prevent that error. No unit tests provided: they'd have to be death tests as these are `assert` statements which raise `SIGABRT` and kill the program. Boost Test has a way to implement death tests (see the in-progress draft PR #25097 at [this code (you may have to click to expand the diff)](https://github.com/bitcoin/bitcoin/pull/25097/files#diff-21483d0e032747850208f21325b29cde89e9c1f55f83a7a166a388cc5c27115aR1089) and could be added here if desired by reviewers. Current callers of `ComputeTaprootMerkleRoot`: - `InferTaprootTree` ([standard.cpp@1552](https://github.com/bitcoin/bitcoin/blob/master/src/script/standard.cpp#L546)) - `VerifyTaprootCommittment` ([interpreter.cpp@1859](https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L1859)) does a partial check, but it is called from `VerifyWitnessProgram` ([interpreter.cpp@1922](https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L1918)) where a full check is done ACKs for top commit: sipa: ACK bd7c5e2f0a1b572decdf3a4bafe4ee990e1f4953 theStack: ACK bd7c5e2f0a1b572decdf3a4bafe4ee990e1f4953 Tree-SHA512: cec5aebfdf9fc9d13011abdf8427c934edf1df1ffc32b3e7cc5580f12809f24cf83e64ab0c843fabfce3591873bfcfa248277b30820fd786684319a196e4e550
2022-05-25Merge bitcoin/bitcoin#25213: fuzz: fix crash at coinselection, add missing ↵Andrew Chow
fee rate. c97e961d4652acfc55fd50273cf0a20beb4857e0 fuzz: coinselection, add missing fee rate. (furszy) Pull request description: Fixing https://github.com/bitcoin/bitcoin/pull/25083#issuecomment-1136774756. Without the fee rate, 'GroupOutputs' will crash at group insertion time `OutputGroup::Insert` because now `output.GetEffectiveValue()` asserts that the value exists. ACKs for top commit: achow101: ACK c97e961d4652acfc55fd50273cf0a20beb4857e0 ishaanam: ACK c97e961d4652acfc55fd50273cf0a20beb4857e0 Xekyo: ACK c97e961d4652acfc55fd50273cf0a20beb4857e0 brunoerg: ACK c97e961d4652acfc55fd50273cf0a20beb4857e0 Tree-SHA512: f495886a5078842103e0f05a9018d7cb491967d8362f893dd7b21132b98e94321df860c50acb69e84d7232779f5915322ca6b5f99908e05e0480012580ee9d5d
2022-05-25multiprocess build cleanup: comment on manual dependenciesRyan Ofsky
Also move manual dependency closer to actual build target
2022-05-25Update zmq.md: Fix parameter in hwm example blockmutatrum
2022-05-25Add BIP-341 specified constraints to `ComputeTaprootMerkleRoot`David Bakin
BIP 341 specifies constraints on the size of the control block _c_ used to compute the taproot merkle root. > The last stack element is called the control block _c_, and must have > length _33 + 32m_, for a value of m that is an integer between 0 and > 128, inclusive. Fail if it does not have such a length. (See BIP-341 "Script Validation Rules" here: https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#script-validation-rules)
2022-05-25fuzz: coinselection, add missing fee rate.furszy
Otherwise, 'GroupOutputs' will crash at group insertion time (output.GetEffectiveValue() asserts that the value exists).
2022-05-25multiprocess build fix: ipc/capnp/init.capnp.h: No such file or directoryRyan Ofsky
Error was reported by SatoriHoshiAiko in https://github.com/bitcoin/bitcoin/issues/25207 and happens unpredictably because make doesn't always build dependencies in the same order. The source file src/ipc/capnp/protocol.cpp includes some generated headers so needs to have an explicit dependency specified in the makefile so the headers will be generated before the file is compiled. #19160 added the explicit dependency, but it was incorrect because it referred to an old file path from before the source file was renamed (ipc.cpp -> protocol.cpp)
2022-05-25doc: remove misleading AreInputsStandard() commentJames O'Beirne
This check isn't any longer just about bad pay-to-script-hash inputs; it also excludes any kind of nonstandard input, unknown witness versions, coinbases, etc.
2022-05-25Merge bitcoin/bitcoin#25197: contrib: Remove keys that are no longer used ↵laanwj
for merging d4b3dc5b0a726cc4cc7a8467be43126e78f841cf contrib: Remove keys that are no longer used for merging (Hennadii Stepanov) Pull request description: See: - https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-21#726591 - https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-12-09#750000 Also updated `trusted-git-root` to be right after **meshcollider**'s last merge. The latest similar change was bitcoin/bitcoin#7713. A related discussion on [IRC](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727090): > [12:28](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727090) \<MarcoFalke> jonasschnelli: I was about to ask you whether you planned to remove your fingerprint from the "trusted-keys" for merging, but it looks like this will break verify-commits ... > [12:31](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727091) \<laanwj> you would also have a add all his merge commits to exceptions, i guess > [12:32](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727092) \<laanwj> or patch the script to allow different key for different ranges of commits > [13:15](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727118) \<jonasschnelli> MarcoFalke: I had no plan to remove my keyid,… would that make sense and how would you fix verify commits? > [13:16](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-10-22#727119) \<jonasschnelli> Ideally, we should set en expiration date next to those keyid ACKs for top commit: laanwj: ACK d4b3dc5b0a726cc4cc7a8467be43126e78f841cf Tree-SHA512: 6c23c932288b56b546a9ba45288205fae063e3f98ff308393acffd5d79eb5097417de1c3d8e865a3f66734740ca2388b2452c3c810e45cdf3b15ccfa215f574e
2022-05-25refactor: Change LogPrintLevel order to category, severitylaanwj
This is more consistent with the other functions, as well as with the logging output itself. If we want to make this change, we should do it before it's all over the place.
2022-05-25leveldb: Log messages from leveldb with category and debug levellaanwj
2022-05-25http: Use severity-based logging for messages from libeventlaanwj
Map libevent's severity to our own severity level for logging.
2022-05-25logging: Unconditionally log levels >= WARNlaanwj
Messages with level `WARN` or higher should be logged even when the category is not provided with `-debug=`, to make sure important warnings are not lost.
2022-05-25Get time less often in AddrManImpl::ResolveCollisions_()MarcoFalke
This makes the code less verbose. Also, future changes that change how to get the time are less verbose. Moreover, GetAdjustedTime() might arbitrarily change the value during the execution of this function. For example, the system time advances over a second boundary, or the network adjusts the time arbitrarily. Most of the time however the value will not change, so it seems better to always lock the value in this scope for clarity.