aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-21Merge bitcoin/bitcoin#31097: validation: Improve input script check error ↵merge-script
reporting 86e2a6b749c7fecbd086b361806ac9f6e9426d79 [test] A non-standard transaction which is also consensus-invalid should return the consensus error (Antoine Poinsot) f859ff8a4e9c3aa23bf5be6eceb7099ca72b2290 [validation] Improve script check error reporting (dergoegge) Pull request description: An input script might be invalid for multiple reasons. For example, it might fail both a standardness check and a consensus check, which can lead to a `mandatory-script-verify-flag-failed` error being reported that includes the script error string from the standardness failure (e.g. `mandatory-script-verify-flag-failed (Using OP_CODESEPARATOR in non-witness script)`), which is confusing. ACKs for top commit: darosior: re-ACK 86e2a6b749c7fecbd086b361806ac9f6e9426d79 ariard: Re-Code Review ACK 86e2a6b7 instagibbs: ACK 86e2a6b749c7fecbd086b361806ac9f6e9426d79 Tree-SHA512: 053939107c0bcd6643e9006b2518ddc3a6de47d2c6c66af71a04e8af5cf9ec207f19e54583b7a056efd77571edf5fd4f36c31ebe80d1f0777219c756c055eb42
2024-10-21Merge bitcoin/bitcoin#31105: Update libmultiprocess librarymerge-script
90b405516f7f3be522ced3e0c4d23b3892df0661 Update libmultiprocess library (Ryan Ofsky) Pull request description: Add recent changes and fixes for shutdown bugs. https://github.com/chaincodelabs/libmultiprocess/pull/111: doc: Add internal design section https://github.com/chaincodelabs/libmultiprocess/pull/113: Add missing include to util.h https://github.com/chaincodelabs/libmultiprocess/pull/116: shutdown bugfix: destroy RPC system before running cleanup callbacks https://github.com/chaincodelabs/libmultiprocess/pull/118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call https://github.com/chaincodelabs/libmultiprocess/pull/119: cmake: avoid libatomic not found error on debian ACKs for top commit: fanquake: ACK 90b405516f7f3be522ced3e0c4d23b3892df0661 TheCharlatan: ACK 90b405516f7f3be522ced3e0c4d23b3892df0661 Tree-SHA512: 2c256667f0c16e00bb5a81b2c6d3db103fae211844e32b111bbed673ab2612ad1478e6b3ecd3a867a4e425cfa6e778b67388343626597a8fac800a15cea5e53a
2024-10-21Merge bitcoin/bitcoin#31063: lint: commit-script-check.sh: echo to stderrmerge-script
fac6cfe5ac06547c90da6f976d7c8bed20da8bac lint: commit-script-check.sh: echo to stderr (MarcoFalke) Pull request description: This makes it easier to redirect the produced `git diff` on failure. On success, it shouldn't hurt, because the same output is still present, just on stderr. Can be tested by introducing a fault in any scripted diff and then calling `commit-script-check.sh HEAD~..HEAD > any_file.txt`. Previously the file contained the full output, now it contains just the diff. ACKs for top commit: TheCharlatan: ACK fac6cfe5ac06547c90da6f976d7c8bed20da8bac Tree-SHA512: b4dfad10a4a902729a7ad7533ed0ef86b9e79761083f2ec623d448a551462b268fe04bdba387ca62160dae9ef7b1781e005dec60f18b111d9bfa6b97357108e6
2024-10-17Merge bitcoin/bitcoin#29877: tracing: explicitly cast block_connected ↵merge-script
duration to nanoseconds cd0edf26c07c8c615f3ae3ac040c4774dcc8e650 tracing: cast block_connected duration to nanoseconds (0xb10c) Pull request description: When the `validation:block_connected` tracepoint was introduced in 8f37f5c2a562c38c83fc40234ade9c301fc4e685, the connect block duration was passed in microseconds `µs`. By starting to use steady clock in fabf1cdb206e368a9433abf99a5ea2762a5ed2c0 this changed to nanoseconds `ns`. As the test only checked if the duration value is `> 0` as a plausibility check, this went unnoticed. This was detected this when setting up monitoring for block validation time as part of the Great Consensus Cleanup Revival discussion. This change casts the duration explicitly to nanoseconds, updates the documentation, and adds a check for an upper bound to the tracepoint interface tests. The upper bound is quite lax as mining the block takes much longer than connecting the empty test block. It's however able to detect a duration passed in an incorrect unit (1000x off). A previous version of this PR casted the duration to microseconds `µs` - however, as the last three major releases have had the duration as nanoseconds (and this went unnoticed), we assume that this is the API now and changeing it back to microseconds would break the API again. See also https://github.com/bitcoin/bitcoin/pull/29877#issuecomment-2067867597 ACKs for top commit: maflcko: re-lgtm ACK cd0edf26c07c8c615f3ae3ac040c4774dcc8e650 laanwj: re-ACK cd0edf26c07c8c615f3ae3ac040c4774dcc8e650 Tree-SHA512: 54a1eea0297e01c07c2d071ffafbf97dbd080f763e1dc0014ff086a913b739637c1634b1cf87c90b94a3c2f66006acfaada0414a15769cac761e03bc4aab2a77
2024-10-17[test] A non-standard transaction which is also consensus-invalid should ↵Antoine Poinsot
return the consensus error
2024-10-17Merge bitcoin/bitcoin#31100: doc: remove dependency install instructions ↵merge-script
from win docs 184f12c1542f6c53eb2bd9dfb08dfdd490e38846 doc: remove dependency install instructions from win docs (fanquake) Pull request description: This duplicates what is in depends, and is outdated. Closes #31090. ACKs for top commit: maflcko: lgtm ACK 184f12c1542f6c53eb2bd9dfb08dfdd490e38846 jarolrod: ACK 184f12c1542f6c53eb2bd9dfb08dfdd490e38846 BrandonOdiwuor: ACK 184f12c1542f6c53eb2bd9dfb08dfdd490e38846 Tree-SHA512: 089c9ff91c501c22ec1b9d5925a2b8c6cd1ea9ac2b75dd6a8c5fe75cf2f0090d808842cb321017894d2da70a30a87dbc1c4c481771d3c4aba13ce44244fcf392
2024-10-16Update libmultiprocess libraryRyan Ofsky
Add recent changes and fixes for shutdown bugs. https://github.com/chaincodelabs/libmultiprocess/pull/111: doc: Add internal design section https://github.com/chaincodelabs/libmultiprocess/pull/113: Add missing include to util.h https://github.com/chaincodelabs/libmultiprocess/pull/116: shutdown bugfix: destroy RPC system before running cleanup callbacks https://github.com/chaincodelabs/libmultiprocess/pull/118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call https://github.com/chaincodelabs/libmultiprocess/pull/119: cmake: avoid libatomic not found error on debian
2024-10-16Merge bitcoin/bitcoin#30996: doc: update signet documentation related to ↵merge-script
build directories a647d4400d55558735f102988e84eedc39b3affa doc: update signet documentation related to build directories (Torkel Rogstad) Pull request description: While setting up my own signet I noticed that the binary paths in the documentation for this is out of date, after build artifacts moved to the `build` directory. This PR mimics what happened in #30741 ACKs for top commit: maflcko: lgtm ACK a647d4400d55558735f102988e84eedc39b3affa pablomartin4btc: ACK a647d4400d55558735f102988e84eedc39b3affa tdb3: Code review and light test ACK a647d4400d55558735f102988e84eedc39b3affa Tree-SHA512: ac7c3806e0ff65860c41d7b7bdad538368d8a6d8d289c10f9714804f963bafd3a9658301b6697f110f5462a92826b62770963508d5eebf88bf9a0a8442d9f72d
2024-10-16Merge bitcoin/bitcoin#31099: doc: drop macOS LLVM install instructionsmerge-script
79aa8280b2edd6a153afa876ae4a5e9ead39dc88 doc: drop LLVM install instructions (fanquake) Pull request description: Followup from #31048. ACKs for top commit: maflcko: lgtm ACK 79aa8280b2edd6a153afa876ae4a5e9ead39dc88 hebasto: ACK 79aa8280b2edd6a153afa876ae4a5e9ead39dc88. Tree-SHA512: 9404845cc9a17f85363ce893addadaaba839b4a37e1e3e64ad4a50eb237ffb78636970480ff2f486ff5bd1b3dba9b85bf3d6654a680b11c6832d17daf6dd6c0a
2024-10-16Merge bitcoin/bitcoin#31067: test: Print CompletedProcess object on errormerge-script
fa43c4f93ca5b40734ec9b3ff91b74acf3ed7cf2 test: Print CompletedProcess object on error (MarcoFalke) Pull request description: It would be good to know the output on `Error parsing command output`. Otherwise test failures are meaningless: https://github.com/bitcoin/bitcoin/issues/30792#issuecomment-2325911157 Fix it by just printing the full `CompletedProcess` object. Also, use the modern `subprocess.run` to simplify the code. ACKs for top commit: BrandonOdiwuor: Code Review ACK fa43c4f93ca5b40734ec9b3ff91b74acf3ed7cf2 laanwj: This contains some useful information, so ACK fa43c4f93ca5b40734ec9b3ff91b74acf3ed7cf2 Tree-SHA512: ae7c1cb1f48af2a6feae6d1a5a967c0720f6c6675c1ce20ace7cac18c00f3d4069b8abcc58204855e92ff5303158b9a942bab3b71acae0737768d941a5773c91
2024-10-16doc: remove dependency install instructions from win docsfanquake
This duplicates what is in depends, and is outdated.
2024-10-16Merge bitcoin/bitcoin#30093: optimization: reserve memory allocation for ↵Ava Chow
transaction inputs/outputs ec585f11c38bbe277a596dcea3c813e7c6626050 Reserve space for transaction inputs in CreateTransactionInternal (Lőrinc) c76aaaf90034a15917d02a71e3fdc36e8dd927f6 Reserve space for transaction outputs in CreateTransactionInternal (Lőrinc) Pull request description: Reserved memory for the transaction inputs and outputs. Split out of https://github.com/bitcoin/bitcoin/pull/30050/files#r1597631104 ACKs for top commit: achow101: ACK ec585f11c38bbe277a596dcea3c813e7c6626050 TheCharlatan: ACK ec585f11c38bbe277a596dcea3c813e7c6626050 stickies-v: ACK ec585f11c38bbe277a596dcea3c813e7c6626050 Tree-SHA512: de399fb19824423467f48af64aa57f41a23cdd00eb17461e0131e4deafdd15e0d2daebf6a0a7ac7728b2fb486b2a54f1a7ef26bbe823c56b2a09f892f6b9a581
2024-10-16doc: drop LLVM install instructionsfanquake
2024-10-16Merge bitcoin/bitcoin#30527: Bump python minimum supported version to 3.10Ava Chow
fa1b139d17d04cb23bdfb1dd9c2abcdad4bdcd27 Bump python minimum supported version to 3.10 (MarcoFalke) Pull request description: All supported operating systems ship with python 3.10 (or later), so bumping the minimum should not cause any issues. A bump will allow new code to use new python features. For reference: * https://packages.debian.org/bookworm/python3 * https://packages.ubuntu.com/jammy/python3 * FreeBSD 13/14 ships with 3.11 * CentOS-like 8/9 ships with 3.11/3.12 (via `appstream`) * OpenSuse Tumbleweed ships with all python versions, e.g. https://software.opensuse.org/package/python312-base This is for Bitcoin Core 29.0 in 2025 (next year), not the soon upcoming 28.0 this fall. ACKs for top commit: achow101: ACK fa1b139d17d04cb23bdfb1dd9c2abcdad4bdcd27 AngusP: ACK fa1b139d17d04cb23bdfb1dd9c2abcdad4bdcd27 l0rinc: ACK fa1b139d17d04cb23bdfb1dd9c2abcdad4bdcd27 stickies-v: ACK fa1b139d17d04cb23bdfb1dd9c2abcdad4bdcd27 Tree-SHA512: 910b202ff2374bb21c93e5249a151fd2c8f63759bed5659676b0e467afa6e8e977be797c3fccceca303c82575e11ec236a8d7c5880910e4314b3875b820e7e8a
2024-10-16Merge bitcoin/bitcoin#31048: build: Bump minimum supported macOS to 13.0merge-script
a0e089a71dc449f4cc177d6eb3050400e63f4b3f build: Bump minimum supported macOS to 13.0 (Hennadii Stepanov) Pull request description: Running Bitcoin Core on unsupported OSes may expose users to security issues. macOS Monterey 12 received its final security update ([12.7.6](https://support.apple.com/en-us/100100)) on July 2024. Apple classifies the hardware that can run macOS 12 at most as ["obsolete worldwide"](https://support.apple.com/en-us/102772). ACKs for top commit: maflcko: lgtm ACK a0e089a71dc449f4cc177d6eb3050400e63f4b3f m3dwards: ACK a0e089a71dc449f4cc177d6eb3050400e63f4b3f itornaza: reACK a0e089a71dc449f4cc177d6eb3050400e63f4b3f Tree-SHA512: b219730de87bcb2bcb40a972e910f516c739a538b0741fc245d23df04650f7e2f5774c38c1d1c9c053ed9e2a377488002feb708e8c7cba9c0070b81169719b10
2024-10-16[validation] Improve script check error reportingdergoegge
2024-10-15Merge bitcoin/bitcoin#31092: doc: fuzz: remove Honggfuzz NetDriver instructionsmerge-script
d823ba6e20bd5fd312b65cf8f71c407c1861793e doc: fuzz: remove Honggfuzz NetDriver instructions (brunoerg) Pull request description: Remove Honggfuzz NetDriver instructions from the documentation since it has not been useful for us. See https://github.com/bitcoin/bitcoin/issues/30957 and https://github.com/bitcoin/bitcoin/pull/31012. ACKs for top commit: maflcko: lgtm ACK d823ba6e20bd5fd312b65cf8f71c407c1861793e marcofleon: ACK d823ba6e20bd5fd312b65cf8f71c407c1861793e Tree-SHA512: f63fde1076d523dc5e511ef868ca3c1ea2e38fe7df56ae275f33209581f96452d86effedb54d9b0ee8b7a1d492b610799807a727d8bd81e2286d31db4aa68731
2024-10-15doc: fuzz: remove Honggfuzz NetDriver instructionsbrunoerg
2024-10-15Merge bitcoin/bitcoin#30859: doc: cmake: prepend "build" to ↵merge-script
functional/test_runner.py e64b2f1a16e8d0ad2cd181d84e3b70312e3cdf33 doc: cmake: prepend and explain "build/" where needed (Larry Ruane) Pull request description: This is a small follow-on to #30741, prepend `build/` to the path for `test_runner.py`. ACKs for top commit: jonatack: ACK e64b2f1a16e8d0ad2cd181d84e3b70312e3cdf33 maflcko: lgtm ACK e64b2f1a16e8d0ad2cd181d84e3b70312e3cdf33 tdb3: re ACK e64b2f1a16e8d0ad2cd181d84e3b70312e3cdf33 Tree-SHA512: 80943d4f342987bf060adacb1c7db2e9ff8de5a6da592846ba23f230281d3a5b306162c4c86e61739a29323eaa4abf09f69f41302996d5809f448e5788a74a87
2024-10-15Merge bitcoin/bitcoin#31083: doc: add doxygen for m_args in testsmerge-script
1fe1b3ba8e9e73987a12fbd9eab7a29459d9f14c doc: doxygen comment for m_args usage in tests (willcl-ark) Pull request description: Closes: #25055 Add a doxygen comment to the `m_args` member in the unit test framework, clarifying its purpose and providing usage guidelines. ACKs for top commit: maflcko: lgtm ACK 1fe1b3ba8e9e73987a12fbd9eab7a29459d9f14c brunoerg: ACK 1fe1b3ba8e9e73987a12fbd9eab7a29459d9f14c Tree-SHA512: 9b8dc30e3b0d26c0cecec4599dc5addca519965603073d02f37fa0a46c488659958e327d9c25da8acdb4bb9b082a64455baaffb406ac11827d7f56a094522fce
2024-10-15build: Bump minimum supported macOS to 13.0Hennadii Stepanov
Running Bitcoin Core on unsupported OSes may expose users to security issues. macOS Monterey 12 received its final security update (12.7.6) on July 2024. Apple classifies the hardware that can run macOS 12 at most as "obsolete worldwide".
2024-10-13doc: doxygen comment for m_args usage in testswillcl-ark
Closes: #25055 Add doxygen comment to the m_args member in the unit test framework, clarifying its purpose.
2024-10-11doc: cmake: prepend and explain "build/" where neededLarry Ruane
2024-10-11Merge bitcoin/bitcoin#30970: build: Add missing USDT header dependency to kernelmerge-script
ccd10fdb97f9b8268a5cd60d7461967cfe536f16 build: Add missing USDT header dependency to kernel (Cory Fields) Pull request description: Noticed while testing a branch that replaces `boost::multi_index` with a custom replacement. Currently depends builds pick up usdt and boost from the same path, and because boost always exists, the usdt path is implicitly included. So without boost, USDT isn't found. An alternative to this would be to disable USDT for the kernel. I'd be open to either approach. ACKs for top commit: hebasto: ACK ccd10fdb97f9b8268a5cd60d7461967cfe536f16, the diff looks correct. fanquake: ACK ccd10fdb97f9b8268a5cd60d7461967cfe536f16 Tree-SHA512: 2f91b8d5c8b169f7b72323d9163b5201f606ccdab95de7085847d2a672d10f940f69642c2528226a5efa4c589af24ca3bb9dd909eed0993e4cecd9689b4bed2f
2024-10-11Merge bitcoin/bitcoin#31070: contrib: fix typos in check-deps.shmerge-script
da8824ba301c783fe9b600df8521fe1beb65f1f2 Fix typos in check-deps.sh (omahs) Pull request description: Fix typos in check-deps.sh ACKs for top commit: maflcko: lgtm ACK da8824ba301c783fe9b600df8521fe1beb65f1f2 Tree-SHA512: 217d18ff3f032f52730ca3bbfa2d874e88bfcd1289135fd24f7b836a02a69ef9bee759bdb88201c5a36315b6fca518d78fdb5ad462510ae862ad2ebfb7273f02
2024-10-11Fix typos in check-deps.shomahs
2024-10-10test: Print CompletedProcess object on errorMarcoFalke
2024-10-10Merge bitcoin/bitcoin#30857: cluster mempool: extend DepGraph functionalityglozow
0b3ec8c59b2b6d598531cd4e688eb276e597c825 clusterlin: remove Cluster type (Pieter Wuille) 1c24c625105cd62518d2eee7e95c3b1c74ea9923 clusterlin: merge two DepGraph fuzz tests into simulation test (Pieter Wuille) 0606e66fdbb914f984433d8950f0c32b5fb871f3 clusterlin: add DepGraph::RemoveTransactions and support for holes in DepGraph (Pieter Wuille) 75b5d42419ed1286fc9557bc97ec5bac3f9be837 clusterlin: make DepGraph::AddDependency support multiple dependencies at once (Pieter Wuille) abf50649d13018bf40c5803730a03053737efeee clusterlin: simplify DepGraphFormatter::Ser (Pieter Wuille) eaab55ffc8102140086297877747b7fa07b419eb clusterlin: rework DepGraphFormatter::Unser (Pieter Wuille) 5901cf7100a75c8131223e23b6c90e0e93611eae clusterlin: abstract out DepGraph::GetReduced{Parents,Children} (Pieter Wuille) Pull request description: Part of cluster mempool: #30289 This adds: * `DepGraph::AddDependencies` to add 0 or more dependencies to a single transaction at once (identical to calling `DepGraph::AddDependency` once for each, but more efficient). * `DepGraph::RemoveTransactions` to remove 0 or more transactions from a depgraph. * `DepGraph::GetReducedParents` (and `DepGraph::GetReducedChildren`) to get the (reduced) direct parents and children of a transaction in a depgraph. After which, the `Cluster` type is removed. This is the result of fleshing out the design for the "intermediate layer" ("TxGraph", no PR yet) between the cluster linearization layer and the mempool layer. My earlier thinking was that TxGraph would store `Cluster` objects (vectors of pairs of `FeeFrac`s and sets of parents), and convert them to `DepGraph` on the fly whenever needed. However, after more consideration, it seems better to have TxGraph store `DepGraph` objects, and manipulate them directly without constantly re-creating them. This requires `DepGraph` to have some additional functionality. The bulk of the complexity here is the addition of `DepGraph::RemoveTransactions`, which leaves the remaining transactions' positions within the `DepGraph` untouched (we want existing identifiers to remain valid), so this implies that graphs can now have "holes" (positions that are unused, but followed by positions that are used). To enable that, an extension of the fuzz/test serialization format `DepGraphFormatter` is included to deal with such holes. ACKs for top commit: sdaftuar: reACK 0b3ec8c59b2b6d598531cd4e688eb276e597c825 instagibbs: reACK 0b3ec8c59b2b6d598531cd4e688eb276e597c825 ismaelsadeeq: reACK 0b3ec8c59b2b6d598531cd4e688eb276e597c825 glozow: ACK 0b3ec8c59b2b6d598531cd4e688eb276e597c825, reviewed range-diff from aab53ddcd8fcbc3c0be0da9383f8e06abe5badda and `clusterlin_depgraph_sim` Tree-SHA512: a804b7f26d544c5cb0847322e235c810525cb0607737be6116c3156d582da3ba3352af8ea48e74eed5268f9c3eca63b30181d01b23a6dd0be1b99191f81cceb0
2024-10-10Merge bitcoin/bitcoin#30937: build: scripted-diff: drop config/ subdir for ↵merge-script
bitcoin-config.h 882f736d0a607976ee5e3a6cbcb5385524bc72c6 doc: lint: correct outdated comment (s/Makefile.am/CMakeLists.txt/) (Sebastian Falbesoner) 1786be7b4a56db8f4a0dd13cf3672bf53d1d2a51 scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h (Sebastian Falbesoner) Pull request description: This PR is a follow-up to #30856, as suggested in comment https://github.com/bitcoin/bitcoin/pull/30856#issuecomment-2356804690. With the scripted diff, review should be fairly trivial, but it could still be seen as controversial due to the large number of files (78 in total) being touched. ACKs for top commit: fanquake: ACK 882f736d0a607976ee5e3a6cbcb5385524bc72c6 Tree-SHA512: 2e6cae4590f660e741edf84df456168b8b1f3861d381cfebf6647bb0a303c26bf7b969a837e0058e59bf852d220990dd8f5f400d8975fd0fab106d0507a70c9b
2024-10-10doc: lint: correct outdated comment (s/Makefile.am/CMakeLists.txt/)Sebastian Falbesoner
2024-10-10scripted-diff: drop config/ subdir for bitcoin-config.h, rename to ↵Sebastian Falbesoner
bitcoin-build-config.h Follow-up for PR #30856, commit 0dd66251. -BEGIN VERIFY SCRIPT- sed -i "s|config/bitcoin-config\.h|bitcoin-build-config.h|g" $(git grep -l config/bitcoin-config\.h) sed -i "s|bitcoin-config\.h|bitcoin-build-config.h|g" $(git grep -l "bitcoin-config\.h" ./src ./test ./cmake) git mv ./cmake/bitcoin-config.h.in ./cmake/bitcoin-build-config.h.in -END VERIFY SCRIPT-
2024-10-09Merge bitcoin/bitcoin#30955: Mining interface: getCoinbaseMerklePath() and ↵Ava Chow
submitSolution() 525e9dcba0b8c6744bcd3725864f39786afc8ed5 Add submitSolution to BlockTemplate interface (Sjors Provoost) 47b4875ef050c4a41bd04398021af8d605415cab Add getCoinbaseMerklePath() to Mining interface (Sjors Provoost) 63d6ad7c89cd682f6e779968c4861ea085058356 Move BlockMerkleBranch back to merkle.{h,cpp} (Sjors Provoost) Pull request description: The new `BlockTemplate` interface introduced in #30440 allows for a more efficient way for a miner to submit the block solution. Instead of having the send the full block, it only needs to provide the nonce, timestamp, version fields and coinbase transaction. This PR introduces `submitSolution()` for that. It's currently unused. #29432 and https://github.com/Sjors/bitcoin/pull/48 use it to process the Stratum v2 message [SubmitSolution](https://github.com/stratum-mining/sv2-spec/blob/main/07-Template-Distribution-Protocol.md#77-submitsolution-client---server). The method should be sufficiently generic to work with alternative mining protocols (none exist that I'm aware off). This PR also introduces `getCoinbaseMerklePath()`, which is needed in Stratum v2 to construct the `merkle_path` field of the `NewTemplate` message (see [spec](https://github.com/stratum-mining/sv2-spec/blob/main/07-Template-Distribution-Protocol.md#72-newtemplate-server---client)). The coinbase merkle path is also used in Stratum "v1", see e.g. https://bitcoin.stackexchange.com/questions/109820/questions-on-merkle-root-hashing-for-stratum-pools This last function uses `BlockMerkleBranch` which was moved to the test code in #13191. The reason back then for moving it was that it was no longer used. This PR moves it back. This PR does not change behaviour since both methods are unused. ACKs for top commit: achow101: ACK 525e9dcba0b8c6744bcd3725864f39786afc8ed5 itornaza: Code review ACK 525e9dcba0b8c6744bcd3725864f39786afc8ed5 tdb3: Code review and light test ACK 525e9dcba0b8c6744bcd3725864f39786afc8ed5 ryanofsky: Code review ACK 525e9dcba0b8c6744bcd3725864f39786afc8ed5. Left minor suggestions but none are important, and looks like this could be merged as-is Tree-SHA512: 2a6a8f5d409ff4926643193cb67702240c7c687615414371e53383d2c13c485807f65e21e8ed98515b5456eca3d9fca13cec04675814a4081467d88b849c5653
2024-10-09Merge bitcoin/bitcoin#30992: doc: update IBD requirements in doc/README.mdAva Chow
36a6d4b0078ebb39ed082c866bf49214a2a01241 doc: update IBD requirements in doc/README.md (Mackain) Pull request description: A small change to the first paragraph of the Setup part of the README that has been bugging me for a while. The disk space required for the Bitcoin transactions can no longer be described as "a few" hundred gigabytes. So I thought it was time it was changed to "several" instead. <!-- *** Please remove the following help text before submitting: *** Pull requests without a rationale and clear improvement may be closed immediately. GUI-related pull requests should be opened against https://github.com/bitcoin-core/gui first. See CONTRIBUTING.md --> <!-- Please provide clear motivation for your patch and explain how it improves Bitcoin Core user experience or Bitcoin Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Bitcoin Core, if possible. * Refactoring changes are only accepted if they are required for a feature or bug fix or otherwise improve developer experience significantly. For example, most "code style" refactoring changes require a thorough explanation why they are useful, what downsides they have and why they *significantly* improve developer experience or avoid serious programming bugs. Note that code style is often a subjective matter. Unless they are explicitly mentioned to be preferred in the [developer notes](/doc/developer-notes.md), stylistic code changes are usually rejected. --> <!-- Bitcoin Core has a thorough review process and even the most trivial change needs to pass a lot of eyes and requires non-zero or even substantial time effort to review. There is a huge lack of active reviewers on the project, so patches often sit for a long time. --> ACKs for top commit: achow101: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 danielabrozzoni: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 jonatack: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 ismaelsadeeq: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 tdb3: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 itornaza: ACK 36a6d4b0078ebb39ed082c866bf49214a2a01241 Tree-SHA512: c5b21aca526c0ebe5f3234bd72e4080dc64cbba0ccd2306397aafe8349bc3573773ee64ff31fafcf59ea1afc7527caaf6d7cd8fe798311d9dc11ad0cd539e21e
2024-10-09lint: commit-script-check.sh: echo to stderrMarcoFalke
2024-10-09Merge bitcoin/bitcoin#31058: refactor: include the proper header rather than ↵merge-script
forward-declaring RemovalReasonToString ca2e4ba352cb0a3b5983c002b09ce15ebbf95177 refactor: include the proper header rather than forward-declaring RemovalReasonToString (Cory Fields) Pull request description: Trivial no-op fixup. This was pointed out by #31053, which causes the include order to be shuffled around: ``` [21:49:26.130] /ci_container_base/src/validationinterface.cpp:22:13: error: redundant 'RemovalReasonToString' declaration [readability-redundant-declaration,-warnings-as-errors] [21:49:26.130] 22 | std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept; [21:49:26.130] | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [21:49:26.130] /ci_container_base/src/kernel/mempool_removal_reason.h:22:13: note: previously declared here [21:49:26.130] 22 | std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept; [21:49:26.130] | ^ ``` I don't see any reason why the include shouldn't just be used. ACKs for top commit: maflcko: lgtm ACK ca2e4ba352cb0a3b5983c002b09ce15ebbf95177 hebasto: ACK ca2e4ba352cb0a3b5983c002b09ce15ebbf95177, IWYU seems [agree](https://cirrus-ci.com/task/6170839912022016): TheCharlatan: ACK ca2e4ba352cb0a3b5983c002b09ce15ebbf95177 Tree-SHA512: e3584cae4f50bf2bc6c824bfaddfe683ef6a17d16138d0cbcc544b98bd64d5d7353b0826b1e8cf16e12410e27b0fcedde27100d4241b7cc194cd4465c8175a5b
2024-10-08Merge bitcoin/bitcoin#30885: scripted-diff: Modernize nLocalServices namingAva Chow
33381ea530ad79ac1e04c37f5707e93d3e0509ca scripted-diff: Modernize nLocalServices to m_local_services (Fabian Jahr) Pull request description: The type of the `nLocalServices` variable was changed to `std::atomic<ServiceFlags>` in #30807 and I suggested the variable name to get updated with a scripted diff along with it. It wasn't included in the PR but I am still suggesting to do it as a follow-up since I had already prepared the commit. ACKs for top commit: sipa: utACK 33381ea530ad79ac1e04c37f5707e93d3e0509ca achow101: ACK 33381ea530ad79ac1e04c37f5707e93d3e0509ca furszy: utACK 33381ea530ad79ac1e04c37f5707e93d3e0509ca jonatack: ACK 33381ea530ad79ac1e04c37f5707e93d3e0509ca theStack: ACK 33381ea530ad79ac1e04c37f5707e93d3e0509ca Tree-SHA512: 407ea9eac694f079aa5b5c1611b5874d7a0897ba6bc3aa0570be94afe1bf3a826657b6890b6597c03c063e95b9dc868f0bdfbfc41e77ec7e06f5b045bf065c71
2024-10-08Merge bitcoin/bitcoin#30967: refactor: Replace g_genesis_wait_cv with ↵Ryan Ofsky
m_tip_block_cv fa22e5c430acaef9713d9a4b4b97bb3f4876f816 refactor: Remove dead code that assumed tip == nullptr (MarcoFalke) fa2e4439652172df27f14508eef078bd0ee2fca5 refactor: Replace g_genesis_wait_cv with m_tip_block_cv (MarcoFalke) fa7f52af1a47ebe3d1bc00e3bac70bf9f6fa769b refactor: Use wait_for predicate to check for interrupt (MarcoFalke) 5ca28ef28bcca1775ff49921fc2528d9439b71ab refactor: Split up NodeContext shutdown_signal and shutdown_request (Ryan Ofsky) fad8e7fba7bf2c523a191309d392cab79668264b bugfix: Mark m_tip_block_cv as guarded by m_tip_block_mutex (MarcoFalke) fa18586c29d4faba3d3f478eaabf9c4cbc1a16e2 refactor: Add missing GUARDED_BY(m_tip_block_mutex) (MarcoFalke) fa4c0750331f36121ba92bbc2f22c615b7934e52 doc: Clarify waitTipChanged docs (MarcoFalke) Pull request description: `g_genesis_wait_cv` is similar to `m_tip_block_cv` but shuffling everything through a redundant `boost::signals2`. So remove it, along with some other dead code, as well as minor fixups. ACKs for top commit: ryanofsky: Code review ACK fa22e5c430acaef9713d9a4b4b97bb3f4876f816 (just rebased since last review) Sjors: ACK fa22e5c430acaef9713d9a4b4b97bb3f4876f816 TheCharlatan: ACK fa22e5c430acaef9713d9a4b4b97bb3f4876f816 Tree-SHA512: a2cb59b651aaf85a3574723adfe403487566788ad945933b0458816ccc841fce08ca77b31afbd2d6adb5bf1deed7229c028bee74fb4bbaf6576e9edcfa0ad817
2024-10-08refactor: include the proper header rather than forward-declaring ↵Cory Fields
RemovalReasonToString This was not in its own header when it was added, but now that it is the forward-declare makes no sense.
2024-10-08Merge bitcoin/bitcoin#30920: test: Remove 0.16.3 test from ↵merge-script
wallet_backwards_compatibility.py fae44c83da982095661b034bdd01afe8ac2fb0a6 test: Remove 0.16.3 test from wallet_backwards_compatibility.py (MarcoFalke) Pull request description: The test checks that any wallet created with current master can not be loaded with `v0.16.3`. This is interesting documentation, however it is probably not something to keep as a test, because: * It seems like an extremely unlikely (and unsupported) edge case that someone creates a wallet with master and then goes ahead to open it with a long EOL software version. * A better test would be the inverse: Create a wallet with `v0.16.3` and open it with current master. This is already tested in `wallet_upgradewallet.py`, where I've added an additional balance check before upgrading the `v0.16.3` wallet. * The test is intermittently failing when shutting down the `v0.16.3` node, for example in https://github.com/bitcoin/bitcoin/pull/30875#issuecomment-2357565564. The exact cause is unclear, but given that the test isn't worthy to keep, removing it will ensure that the error disappears. ACKs for top commit: Sjors: utACK fae44c83da982095661b034bdd01afe8ac2fb0a6 fanquake: ACK fae44c83da982095661b034bdd01afe8ac2fb0a6 - I agree that test seems to have past it's usefulness, and the fact that it otherwise causes intemittent issues is further reason to remove it. Tree-SHA512: 85bf428e616e0880198c1a7529936520505d7fa87c2eeb87a0457f13b50a163accaf5f80f9364dea978f6bd14b0b5350cda88f49aa7584682c8b5e0b0b117724
2024-10-08Merge bitcoin/bitcoin#31045: ci: Add missing -DWERROR=ON to test-each-commitmerge-script
fa1cffacae61264ac89e30a069ba093495cb3216 ci: Install missing nproc in macos task (MarcoFalke) faf7a2bccc747f2d509710bd7eeb315e75b6c649 ci: Add missing -DWERROR=ON to test-each-commit (MarcoFalke) Pull request description: Found by in Sjors in https://github.com/bitcoin/bitcoin/pull/27260#discussion_r1785860610 (Thanks!) Also, includes an unrelated commit to simplify the ci scripts, by assuming nproc exists on macos as well. (Having more than one commit is also required to trigger the `test-each-commit` task) ACKs for top commit: theuni: utACK fa1cffacae61264ac89e30a069ba093495cb3216. Tree-SHA512: 881df6964da31c3f7161b763bdf74029743567272c7a4db24ded10909a8cedad39b494a9f486f0b059bbeb0beb190dcd91369650d014e1fc3b5f7ae07cd54771
2024-10-08Merge bitcoin/bitcoin#31018: test: Treat exclude list warning as failure in CImerge-script
fa6d14eacb2a8c1c3243e3075254dfdebaa9290e test: Treat exclude list warning as failure in CI (MarcoFalke) Pull request description: An outdated exclude list or otherwise an error in the exclude list handling is usually a bug. So make it fatal in the CI, instead of silently ignoring it. Fixes https://github.com/bitcoin/bitcoin/pull/30872/files#r1757015334 Can be tested with something like (with and without `--ci`): ``` ./bld-cmake/test/functional/test_runner.py wallet_disable -x wallet_disablee ACKs for top commit: tdb3: ACK fa6d14eacb2a8c1c3243e3075254dfdebaa9290e ismaelsadeeq: utACK fa6d14eacb2a8c1c3243e3075254dfdebaa9290e Tree-SHA512: 03a70dff9d1272d982591d60ab764f9233d4802488bc1bad305a2755e2d7ed86e691ee94767a3bc5f68321b63214aba44e6f9edd1543dfad7a20f9397cf78734
2024-10-08Merge bitcoin/bitcoin#31038: test: Fix copy-paste in wallet/test/db_tests ↵merge-script
ostream operator f50557f5d36f568b7fe65ff5e242303b16b9b258 test: Fix copy-paste in db_tests ostream operator (Hodlinator) Pull request description: Fix accidentally remaining copy-pasted variable name. Example output when intentionally adding `expected.erase(expected.begin());` before `BOOST_CHECK_EQUAL_COLLECTIONS` in *db_tests.cpp*/`CheckPrefix`: Before fix: ``` src/wallet/test/db_tests.cpp(61): error: in "db_tests/db_cursor_prefix_byte_test": check { actual.begin(), actual.end() } == { expected.begin(), expected.end() } has failed. Mismatch at position 0: ("�", "�") != ("�suffix", "�suffix") Mismatch at position 1: ("�suffix", "�suffix") != ("��", "��") Mismatch at position 2: ("��", "��") != ("��suffix", "��suffix") Collections size mismatch: 4 != 3 ``` After fix: ``` src/wallet/test/db_tests.cpp(61): error: in "db_tests/db_cursor_prefix_byte_test": check { actual.begin(), actual.end() } == { expected.begin(), expected.end() } has failed. Mismatch at position 0: ("�", "f") != ("�suffix", "fs") Mismatch at position 1: ("�suffix", "fs") != ("��", "ff") Mismatch at position 2: ("��", "ff") != ("��suffix", "ffs") Collections size mismatch: 4 != 3 ``` Super-minor issue only uncovered when tests fail, but might as well correct it. ACKs for top commit: maflcko: lgtm ACK f50557f5d36f568b7fe65ff5e242303b16b9b258 tdb3: code review ACK f50557f5d36f568b7fe65ff5e242303b16b9b258 Tree-SHA512: d36e9bc36f82f2c39e9c7585ae9e5c63f7fd07665d1d3c625709bc90168ced2f83ac7d577b4914dae2f0f101c415bf0c1ed6de98a20c96c8c0383a701cbdbe99
2024-10-08Merge bitcoin/bitcoin#31056: ci: Double ctest timeoutmerge-script
fa5ebc99207fb3dc9d052fbd489aa7abbaaf737f ci: Double ctest timeout (MarcoFalke) Pull request description: It looks like msan sometimes hits the timeout. So double it, which should still be useful to catch real timeouts in the wine windows-cross unit tests. Example: https://cirrus-ci.com/task/5141974322249728 ACKs for top commit: fanquake: ACK fa5ebc99207fb3dc9d052fbd489aa7abbaaf737f Tree-SHA512: de346f34c4d157be515706fd71c2072fb5859d50d0e8cd7e6c4637578e4dc54aa8c75b2521e7aecf679b486c4e20fd184e259ffc701b8b668d7f61abff883875
2024-10-08Merge bitcoin/bitcoin#31013: depends: For mingw cross compile use -gcc-posix ↵merge-script
to prevent library conflict ae56b3230b287eef5a5657d3089abebffde51484 depends: For mingw cross compile use -gcc-posix to prevent library conflict (laanwj) Pull request description: CMake parses some paths from the spec of the C compiler, assuming it will be the linker, resulting in the link to end up with `-L/usr/lib/gcc/x86_64-w64-mingw32/12-win32` on debian bookworm if both `-win32` and `-posix` variants are installed, and `-win32` is the default alternative. This results in the wrong C++ library being linked, missing std::threads::hardware_concurrency and other threading functions. To fix this, use the `-posix` variant of gcc as well when available. This fixes a regression compared to autotools, where this scenario worked. ACKs for top commit: theuni: utACK ae56b3230b287eef5a5657d3089abebffde51484. hebasto: ACK ae56b3230b287eef5a5657d3089abebffde51484. I've tested on both Debian Bookworm and Ubuntu 24.04 with the `g++-mingw-w64-x86-64` package installed. The resulting CMake internal configuration appears more accurate. For instance, on Ubuntu 24.04, for the `bitcoin-tx` target, the diff in `build/src/CMakeFiles/bitcoin-tx.dir/linkLibs.rsp` looks as follows: Tree-SHA512: f36fae50f91a29f565940494af9e46f47e219b99e329c0714ace47c516ac524602d5b6538a07488157bc2a71be7bac72176097fff3178129c5084bf6cc823167
2024-10-08Merge bitcoin/bitcoin#31051: test: remove unused code from `script_tests`merge-script
e0287bc4b2d83cefb7af48aef457153d0729bcd4 test: remove unused code from script_tests (fanquake) Pull request description: This has been unused since #29648. Noticed while running a newer version of clang-tidy (19.1.1): ```bash [127/391][6.2s] /opt/homebrew/opt/llvm/bin/clang-tidy -p=build -quiet --config-file=/bitcoin/src/.clang-tidy /bitcoin/src/test/script_tests.cpp bitcoin/src/test/script_tests.cpp:126:25: error: local copy 'tx2' of the variable 'tx' is never modified and never used; consider removing the statement [performance-unnecessary-copy-initialization,-warnings-as-errors] 126 | CMutableTransaction tx2 = tx; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 127 | BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err) == expect, message); 512 warnings generated. ``` ACKs for top commit: maflcko: review ACK e0287bc4b2d83cefb7af48aef457153d0729bcd4 BrandonOdiwuor: ACK e0287bc4b2d83cefb7af48aef457153d0729bcd4 Tree-SHA512: f69513d0b898e0e9afad047bcec200707b057e3718a3d35bd479a788a1973e49ee7e5f48feadb8731ab5fdbd12a2b53b0bcf65296701e2296c3fdb67cdcabfb5
2024-10-08Merge bitcoin/bitcoin#31008: depends: Print ready-to-use `--toolchain` ↵merge-script
option for CMake invocation 605926da0ab4ac7ae4e9aed55a059f37c31c15b5 depends: Print ready-to-use `--toolchain` option for CMake invocation (Hennadii Stepanov) Pull request description: Requested in https://github.com/bitcoin/bitcoin/pull/30997#issuecomment-2385057317: > P.S. it would be nice if `make` in `depends` provides the incantation needed for the configure stage. An example of a build log with this PR: ``` $ make --no-print-directory -C depends -j16 NO_QT=1 NO_WALLET=1 NO_UPNP=1 NO_NATPMP=1 NO_ZMQ=1 NO_USDT=1 LOG=1 Extracting boost... /home/hebasto/git/bitcoin/depends/sources/boost_1_81_0.tar.gz: OK Preprocessing boost... Configuring boost... Building boost... Staging boost... Postprocessing boost... Caching boost... Extracting libevent... /home/hebasto/git/bitcoin/depends/sources/libevent-2.1.12-stable.tar.gz: OK Preprocessing libevent... Configuring libevent... Building libevent... Staging libevent... Postprocessing libevent... Caching libevent... copying packages: boost libevent to: /home/hebasto/git/bitcoin/depends/x86_64-pc-linux-gnu To build Bitcoin Core with these packages, pass '--toolchain /home/hebasto/git/bitcoin/depends/x86_64-pc-linux-gnu/toolchain.cmake' to the first CMake invocation. ``` ACKs for top commit: Sjors: tACK 605926da0ab4ac7ae4e9aed55a059f37c31c15b5 theuni: ACK 605926da0ab4ac7ae4e9aed55a059f37c31c15b5 jarolrod: ACK 605926da0ab4ac7ae4e9aed55a059f37c31c15b5 pablomartin4btc: ACK 605926da0ab4ac7ae4e9aed55a059f37c31c15b5 Tree-SHA512: 658358cb12a2409486962273d418f8cfa9609c84c6e70b426250173925c0938a6eba0dca72f43d78cc63c9cb927514c959473da04bdcda714228c5d8c248c1fe
2024-10-08ci: Double ctest timeoutMarcoFalke
2024-10-07clusterlin: remove Cluster typePieter Wuille
2024-10-07clusterlin: merge two DepGraph fuzz tests into simulation testPieter Wuille
This combines the clusterlin_add_dependency and clusterlin_cluster_serialization fuzz tests into a single clusterlin_depgraph_sim fuzz test. This tests starts from an empty DepGraph and performs a arbitrary number of AddTransaction, AddDependencies, and RemoveTransactions operations on it, and compares the resulting state with a naive reimplementation.
2024-10-07clusterlin: add DepGraph::RemoveTransactions and support for holes in DepGraphPieter Wuille
This commits introduces support in DepGraph for the transaction positions to be non-continuous. Specifically, it adds: * DepGraph::RemoveTransactions which removes 0 or more positions from a DepGraph. * DepGraph::Positions() to get a set of which positions are in use. * DepGraph::PositionRange() to get the highest used position in a DepGraph + 1. In addition, it extends the DepGraphFormatter format to support holes in a compatible way (it serializes non-holey DepGraphs identically to the old code, and deserializes them the same way)