Repository navigation
multi_index: fix compilation failure with boost >= 1.91 - #35175
Conversation
This effectively reverts a3cb309 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste |
|
All good with bumped boost: https://github.com/bitcoin/bitcoin/actions/runs/25070811505/ I've popped off that commit so the boost bump can happen separately. |
hebasto
left a comment
There was a problem hiding this comment.
Concept ACK.
This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case...
To clarify, this only affects compile times, right?
hebasto
left a comment
There was a problem hiding this comment.
What about an alternative approach: hebasto@335cc90?
I doubt it really affects compile times much, it's mostly just cosmetic, as the types are much easier to deal with for compiler warnings or debugger output. Take
vs.
Size-wise, the bloated types cause an unstripped bitcoind to be 594,600 bytes larger. Stripped, they're no different. So the release binaries are the same either way.
This is the same as what's here, just with aliases as syntactic sugar. It still produces the bloated types when using <1.91. We wouldn't use those aliases anywhere else, so I don't see any use in creating them. I'm not opposed if there's a preference for it, though. Edit: with boost 1.91, it looks like: |
So the following bumping Boost to 1.91 in depends should also be backported to all supported release branches. |
Why's that? We can just ship the slightly larger debug symbols. |
|
review ACK 0bc9d35 🎶 Show signatureSignature: |
This effectively reverts a3cb309 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: bitcoin#35175 Rebased-From: 0bc9d35
|
Backported to |
Ah, sorry, the way I described that was confusing. I meant that when stripped, there's no difference between the two approaches. So it's irrelevant for release binaries. Thinking about this though, I think we actually want to avoid bumping boost for any backports, because (starting with v1.91), that would mean backporting a |
|
Backported to |
83b4650 doc: update release notes for v29.x (fanquake) 18739ec ci: unconfine seccomp for i686 no IPC (Lőrinc) 546598b multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 0fb5e16 cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer) Pull request description: Backports: * #34848 * #35175 * #35202 ACKs for top commit: achow101: ACK 83b4650 willcl-ark: reACK 83b4650 Tree-SHA512: 564ad5e9f9ab1f627bb87f083ba55c5e32af31942b2e365e5889bab6e3e85a957b1c513967fe7e1310ab439d23256f8de39bef25105dbded5514977b6ad81cf9
c1c2184 doc: update release notes for v28.x (fanquake) 2c5242d multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 2d3edd9 ci: unconfine seccomp for i686 no IPC (Lőrinc) Pull request description: Backports: * #35202 * #35175 ACKs for top commit: achow101: ACK c1c2184 Tree-SHA512: ca7624f2eca1a40f3da41a1dfd8b3cb89b6029eb75b6a076b815438f1f8381c7c48c337768e08e2e18052de93d1ab6ae93a1e8a6a2804e61420cf7f17dad9f74
6c3f401 doc: update release notes for v30.x (fanquake) 33d66c6 ci: unconfine seccomp for i686 no IPC (Lőrinc) 9632450 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 561d072 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py (MarcoFalke) Pull request description: Backports: * #35080 * #35175 * #35202 ACKs for top commit: achow101: ACK 6c3f401 Tree-SHA512: 3acc73ef19001f4a84e388f21215a239fd3017351f561019b4f688165f3fb2f347879ca285aa31b9cd9b96473c5b6edf175a050cf6c6a7ffed61ad3065df603e
6bb2b07 doc: update release notes for v31.x (fanquake) 1bb9c40 ci: unconfine seccomp for i686 no IPC (Lőrinc) 2eafae9 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) ab19213 test: Remove unused, confusing and brittle connect_nodes.wait_for_connect (MarcoFalke) bb536df test: Fix all races after a socket is closed gracefully (MarcoFalke) 402f347 test: Stricter checks in rpc_setban.py (MarcoFalke) 332d2a2 test: Add is_connected_to helper (MarcoFalke) e1545b5 test: Add clean shutdown to Socks5Server (optout) 20480f5 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py (MarcoFalke) 27e5a30 net_processing: don't modify addrman for private broadcast connections (Vasil Dimov) Pull request description: Backports: * #34425 * #34863 * #35032 * #35080 * #35175 * #35202 ACKs for top commit: achow101: ACK 6bb2b07 Tree-SHA512: ea6827e7a1643f96e27ab5f26621f9d4c137df2cb03938d96f7bee82d11f66a61757c609a604653469a4699b3417a1659395d039bbf4348988c2ea4a34a26418
This effectively reverts 9baf5a9 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: bitcoin#35175 Rebased-From: 0bc9d35
0cc0669 doc: update release notes for v30.x (fanquake) 424a42c ci: unconfine seccomp for i686 no IPC (Lőrinc) 87ae24f multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) f68475d test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py (MarcoFalke) Pull request description: Backports: * bitcoin#35080 * bitcoin#35175 * bitcoin#35202 ACKs for top commit: achow101: ACK 0cc0669 Tree-SHA512: 3acc73ef19001f4a84e388f21215a239fd3017351f561019b4f688165f3fb2f347879ca285aa31b9cd9b96473c5b6edf175a050cf6c6a7ffed61ad3065df603e
This effectively reverts 9baf5a9 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: bitcoin#35175 Rebased-From: 0bc9d35
e90e447 doc: update release notes for v28.x (fanquake) 2aca20a multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 3d3661c ci: unconfine seccomp for i686 no IPC (Lőrinc) Pull request description: Backports: * bitcoin#35202 * bitcoin#35175 ACKs for top commit: achow101: ACK e90e447 Tree-SHA512: ca7624f2eca1a40f3da41a1dfd8b3cb89b6029eb75b6a076b815438f1f8381c7c48c337768e08e2e18052de93d1ab6ae93a1e8a6a2804e61420cf7f17dad9f74
This effectively reverts 9baf5a9 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: bitcoin#35175 Rebased-From: 0bc9d35
9cd0420 doc: update release notes for v31.x (fanquake) f97d891 ci: unconfine seccomp for i686 no IPC (Lőrinc) 08b2435 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 6b35260 test: Remove unused, confusing and brittle connect_nodes.wait_for_connect (MarcoFalke) 19e4dea test: Fix all races after a socket is closed gracefully (MarcoFalke) fec034c test: Stricter checks in rpc_setban.py (MarcoFalke) ebd0221 test: Add is_connected_to helper (MarcoFalke) bd521c7 test: Add clean shutdown to Socks5Server (optout) ef9e6c4 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py (MarcoFalke) b462cc9 net_processing: don't modify addrman for private broadcast connections (Vasil Dimov) Pull request description: Backports: * bitcoin#34425 * bitcoin#34863 * bitcoin#35032 * bitcoin#35080 * bitcoin#35175 * bitcoin#35202 ACKs for top commit: achow101: ACK 9cd0420 Tree-SHA512: ea6827e7a1643f96e27ab5f26621f9d4c137df2cb03938d96f7bee82d11f66a61757c609a604653469a4699b3417a1659395d039bbf4348988c2ea4a34a26418
This effectively reverts 9baf5a9 from PR bitcoin#30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: bitcoin#35175 Rebased-From: 0bc9d35
42086a2 doc: update release notes for v29.x (fanquake) 38a39fd ci: unconfine seccomp for i686 no IPC (Lőrinc) 01f551d multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) 6256d76 cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer) Pull request description: Backports: * bitcoin#34848 * bitcoin#35175 * bitcoin#35202 ACKs for top commit: achow101: ACK 42086a2 willcl-ark: reACK 42086a2 Tree-SHA512: 564ad5e9f9ab1f627bb87f083ba55c5e32af31942b2e365e5889bab6e3e85a957b1c513967fe7e1310ab439d23256f8de39bef25105dbded5514977b6ad81cf9
de925455c80 Merge bitcoin/bitcoin#35141: fuzz: apply node context reset pattern to p2p_handshake
9f7b08c61ca Merge bitcoin/bitcoin#35334: test: Allow --usecli in more tests
b9f0040caf4 Merge bitcoin/bitcoin#34614: ci: Put space and non-ASCII char in scratch dir
f28cd7587b0 Merge bitcoin/bitcoin#35348: ci: switch to GitHub cache for all runners
59918de329a Merge bitcoin/bitcoin#34801: ci: Enable pipefail in 03_test_script.sh
e4f033789cc Merge bitcoin/bitcoin#35324: test: Document rare failure in test_inv_block better
033a56ccb2f Merge bitcoin/bitcoin#34342: cli: Replace libevent usage with simple http client
c03107acf50 ci: switch to GitHub cache for all runners
908cc9d30b9 Merge bitcoin/bitcoin#35344: kernel: improve BITCOINKERNEL_WARN_UNUSED_RESULT usage
e91f8713ac0 Merge bitcoin/bitcoin#35349: ci: Fix `path` input for vcpkg downloads cache
faf02674b36 refactor: Set TestNode.cli only after RPC is connected
fae376cafb0 refactor: Inline get_rpc_proxy
fa00c7c7a41 test: Allow rpc_bind.py --usecli
fa8f25118c0 refactor: Use create_new_rpc_connection in wallet_multiwallet.py
fa3ae6c7d3c test: Allow feature_shutdown.py --usecli
fa2a3683d51 test: Allow mining_getblocktemplate_longpoll.py --usecli
735b1cf4311 Merge bitcoin/bitcoin#34806: refactor: logging: Various API improvements
a56b4ead414 Merge bitcoin/bitcoin#35017: mempool: remove all subsequent tx in pkg on failure
00e9df90c85 Merge bitcoin/bitcoin#35333: qa: use NORMAL_GBT_REQUEST_PARAMS consistently in functional tests
37d7ce47c5d Merge bitcoin/bitcoin#35350: test: suppress ECONNABORTED in wait_for_rpc_connection on Windows
18c1cc65e94 kernel: improve BITCOINKERNEL_WARN_UNUSED_RESULT usage
7209eb77902 test: suppress ECONNABORTED in wait_for_rpc_connection on Windows
0553ce5ddb3 Merge bitcoin/bitcoin#35316: musig: Reject empty pubkey list in GetMuSig2KeyAggCache
e4f1e43103c ci: Fix `path` input for vcpkg downloads cache
fa99a3ccace ci: Enable pipefail in 03_test_script.sh
d61053d97be build: Drop libevent from bitcoin-cli link libraries
798d051c800 cli: Remove libevent usage
ca5483a6628 qa: use NORMAL_GBT_REQUEST_PARAMS consistently
bd0942bbd98 Merge bitcoin/bitcoin#34887: fuzz: target CDBWrapper
29400537610 Merge bitcoin/bitcoin#33223: coinselection: Tiebreak SRD eviction by weight
5ccb698f53a Merge bitcoin-core/gui#936: Remove opt-in RBF
211e1053bfd Merge bitcoin/bitcoin#32220: cmake: Get rid of undocumented `BITCOIN_GENBUILD_NO_GIT` environment variable
ecf20317cb5 Merge bitcoin/bitcoin#35270: doc: Document minimum versions for Xcode CLT and MSVC
8ee5622455c Merge bitcoin/bitcoin#35338: qa: regenerate hardcoded regtest chain for kernel lib unit tests
c6dbf3158b4 Merge bitcoin/bitcoin#35304: kernel: doc: document wipe lifecycle and best entry nullability
98f706c698a qa: regenerate hardcoded regtest chain for kernel lib unit tests
ac9aa71b7f9 mempool: remove all subsequent tx in pkg on failure
b63ef20d545 test: add fuzz harness for CDBWrapper
32169c3855f dbwrapper: accept optional testing leveldb::Env in DBParams
8d390c93fc5 dbwrapper: make max_file_size a configurable DBParams field
376e7ef07cf util: Expose IOErrorIsPermanent in sock header
b796bf44f33 Merge bitcoin/bitcoin#35228: wallet: use `outpoint` when estimating input size
3158b890e17 Merge bitcoin/bitcoin#33765: doc: update interface, --stdin flag, `signtx` (#31005)
21edcc47e23 Merge bitcoin/bitcoin#35328: test: restore assertion that tx contains exactly 2500 sigops
5d562430de9 netbase: Add timeout parameter to ConnectDirectly
fa37c6a529f test: [move-only] Extract create_new_rpc_connection
a988ac592fb cli: Add HTTPResponseHeaders class for parsing response headers
ae73b69b527 test: restore assertion that tx contains exactly 2500 sigops
a7df1bd7ca2 Merge bitcoin/bitcoin#34537: crypto: fix incorrect variable names in SHA-256 ARM intrinsics
5570b86fa7f Merge bitcoin/bitcoin#33160: bench: Add more realistic Coin Selection Bench
239424064b2 Merge bitcoin/bitcoin#35189: kernel: document validation state outputs as overwritten in-place
0358c26d427 kernel: document overwritten validation state outputs
489da5df60f Merge bitcoin/bitcoin#33856: kernel: Refactor process_block_header to return btck_BlockValidationState
fa890988889 test: Document rare failure in test_inv_block better
ce2044a91dd Merge bitcoin/bitcoin#33362: Run feature_bind_port_(discover|externalip).py in CI
2284288e9a7 Merge bitcoin/bitcoin#35279: psbt, test: remove address type restrictions in test
278b9e39df2 Merge bitcoin/bitcoin#34934: fuzz: exercise ForNode/ForEachNode callbacks in connman fuzz harness
88d9bc5aa4f kernel: Return btck_BlockValidationState from process_block_header API
ed15e14b636 Merge bitcoin/bitcoin#35193: test: avoid non-loopback network traffic from node_init_tests/init_test
4f348c2d730 Merge bitcoin/bitcoin#28802: ArgsManager: support command-specific options
c7056ff03f6 Merge bitcoin/bitcoin#34893: psbt: preserve proprietary fields when combining PSBTs
8ce84321cea musig: Reject empty pubkey list in GetMuSig2KeyAggCache
b2a3ca3df90 Merge bitcoin/bitcoin#35117: i2p: clean up SESSION CREATE error logging
7802e578c3f Merge bitcoin/bitcoin#34860: mining: always pad scriptSig at low heights, drop include_dummy_extranonce
da769855d0c test: add PSBT proprietary merge regression coverage
3f5b3c7a801 psbt: preserve proprietary fields when combining PSBTs
6189335f6bf kernel: doc: document wipe lifecycle and best entry nullability
ed1795aa172 Merge bitcoin/bitcoin#35285: bench: add benchmark for GetMappedAS()
379b9fbf036 Merge bitcoin/bitcoin#34225: refactor, key: move `CreateMuSig2{Nonce,PartialSig}` functions to `musig.{h,cpp}` module
c471c5085b2 common: Add unused UrlEncode function
9687ef1bd95 ci: Tolerate unused free functions in intermediate commits
02b2c411034 logging: use util/log.h where possible
57d7495fe5c IWYU fixes
611878b46f7 scripted-diff: logging: Drop LogAcceptCategory
34332dba2f6 util/log, logging: Provide ShouldDebugLog and ShouldTraceLog instead of a generic ShouldLog
abea304dd6d logging: Move GetLogCategory into Logger class
58113e58334 util/log: Rename LogPrintLevel_ into detail_ namespace
f69d1ae56db util/log: Provide util::log::NO_RATE_LIMIT to avoid rate limits
72e92d67df7 logging: Protect ShrinkDebugFile by m_cs
096bb0b5c05 bench: add benchmark for GetMappedAS()
b6c36704428 i2p: clean up SAM error logging
1c500b17098 test: avoid non-loopback network traffic from node_init_tests/init_test
3381855e51c doc: external signer: update interface, --stdin flag, IPC-command signtx, contains updates from #33947
ddb94fd3e10 Merge bitcoin/bitcoin#35289: fuzz: Fix timeout in `txorphan`
3142e5f8cf4 doc: Add release notes for #32220
b71cd5c1622 cmake: Skip using git when building from source tarball or as subproject
fe941938e84 cmake: Remove unnecessary `BITCOIN_GENBUILD_NO_GIT` environment variable
9a2cced23a6 cmake, refactor: Move `find_package(Git)` to `src/CMakeLists.txt`
3cab711d695 Merge bitcoin/bitcoin#35284: fuzz: use ImmediateBackgroundTaskRunner to silence DEBUG_LOCKORDER
004a7e3cfbc fuzz: Fix txorphan timeout by limiting block weight
7777a92a927 ci: Use path with spaces on windows as well
fac6c4270da ci: Put space and non-ASCII char in scratch dir
fa387598236 ci: Require $FILE_ENV
cad5f560458 Merge bitcoin/bitcoin#29136: wallet: `addhdkey` RPC to add just keys to wallets via new `unused(KEY)` descriptor
9961229360c Merge bitcoin/bitcoin#31298: rpc: combinerawtransaction now rejects unmergeable transactions
c680cfe3436 Merge bitcoin/bitcoin#35123: wallet: remove outdated arguments from chain scanning methods
a145fa881a2 Merge bitcoin/bitcoin#35156: dbwrapper: reuse scratch `DataStream` buffers
04003e1fa37 Merge bitcoin/bitcoin#35274: doc: clarify libfuzzer-nosan preset uses build_fuzz_nosan dir
5309c905422 Merge bitcoin/bitcoin#35283: doc: mention -DWITH_ZMQ=ON in BSD build guides
90eda67bb8f Remove opt-in RBF
fa3d7ce11c6 doc: Document minimum versions for Xcode CLT and MSVC
8544537f41d mining: drop unused include_dummy_extranonce option
58eeab790d9 mining: only pad with OP_0 at heights <= 16
00d22328b05 mining: pad coinbase to fix createNewBlock at heights <=16
801d36f55b6 fuzz: use ImmediateBackgroundTaskRunner to silence DEBUG_LOCKORDER
ca93ab808c4 doc: mention -DWITH_ZMQ=ON in BSD build guides
605ff37403f test: bad-cb-length for createNewBlock() at low heights
1966621b768 test: refactor IPC mining test to use script_BIP34_coinbase_height
8ba5f68b1df refactor, key: move `CreateMuSig2PartialSig` to `musig.{h,cpp}` module
d087f266fc2 refactor, key: move `CreateMuSig2Nonce` to `musig.{h,cpp}` module
f36d89f4363 key: add `GetSecp256k1SignContext` access function
0065f354a7e doc: clarify libfuzzer-nosan preset uses build_fuzz_nosan dir
81348576cc4 psbt, test: remove address type restrictions in test
82733e61dee Merge bitcoin/bitcoin#35277: ci: Enable ruff ambiguous-unicode-character checks
fe2bb43e437 Merge bitcoin/bitcoin#35044: contrib: Fix NameError in signet miner gbt()
fa9c919678c refactor: Use ignore-list over verbose select-list
cd8d3bd937b wallet: use outpoint when estimating input size
fa9b01adecc ci: Enable ruff ambiguous-unicode-character checks
09a9bb35367 Merge bitcoin/bitcoin#34547: lint: modernise lint tooling
10ca73c02cb Merge bitcoin/bitcoin#34580: build: Add a compiler minimum feature check
1af8e0c4e89 Merge bitcoin/bitcoin#35183: doc: recommend script_flags instead of deployments.taproot
f24a7b5f759 doc: recommend script_flags instead of deployments.taproot
ccbd00ab87c Merge bitcoin/bitcoin#35152: doc: clarify local IWYU workflow and pragmas
88bfe89793d Merge bitcoin/bitcoin#35227: wallet: check the final BDB page LSN during migration
21599ea612e Merge bitcoin/bitcoin#35241: cmake: Set `CTEST_NIGHTLY_START_TIME` for CDash Nightly pipelines
d406cffafdd Merge bitcoin/bitcoin#34228: depends: Unset `SOURCE_DATE_EPOCH` in `gen_id` script
4defc466a22 cmake: Set `CTEST_NIGHTLY_START_TIME` for CDash Nightly pipelines
1f28ed6b6af Merge bitcoin/bitcoin#35235: contrib: mv verify-commits/pre-push-hook.sh to maintainer tools repo
8396b7f2a3b Merge bitcoin/bitcoin#35236: doc: typo roundup
2b7f5914c42 Merge bitcoin/bitcoin#35222: cmake: add CTestConfig.cmake
888857c5514 mv contrib/verify-commits/pre-push-hook.sh to maintainer tools repo
d9b57eecadf doc: fix whitespace in build-osx.md
e7d4a7e3f9a doc: fix stale autotools reference and SQLite typo
3f9c55426a1 Merge bitcoin/bitcoin#35230: ci: Move --usecli --extended from i386 task to alpine task
fad61896e86 ci: Move --usecli --extended from i386 task to alpine task
7c84a2bdb16 Merge bitcoin/bitcoin#35219: doc: Add my key to SECURITY.md
cf5c962a39f Merge bitcoin/bitcoin#34991: test: fix feature_index_prune.py bug when using --usecli
6690117c7ac Merge bitcoin/bitcoin#35218: test: fix `P2SH` script in coins cache fuzz target
5b11108145c Merge bitcoin/bitcoin#35223: refactor: [rpc] Remove confusing and brittle integral casts (take 3)
e2b0984f995 wallet: check BDB last page LSN
fa864b937e1 refactor: [rpc] Remove confusing and brittle integral casts (take 3)
9f7a2293c48 depends: Unset `SOURCE_DATE_EPOCH` in `gen_id` script
086894098ec cmake: add CTestConfig.cmake
0651a1fc154 doc: Add Niklas Goegge's key to SECURITY.md
ac58e6c53c2 test: fix P2SH output in coins cache fuzz
aa1d0d7cd73 Merge bitcoin/bitcoin#35209: validation: correct lifetime of precomputed tx data
0429c503fb0 bench: Replace Coin Selection bench
ec1eefda774 bench: Remove unnecessary wallet parameter
e6c4ffb9560 bench: Fix type mismatch
d7ed2840acc Merge bitcoin/bitcoin#21283: Implement BIP 370 PSBTv2
1ed799fb21d validation: correct lifetime of precomputed tx data
371eac8069a fuzz: exercise ForNode/ForEachNode callbacks in connman fuzz harness
c89c8ddbb36 Merge bitcoin/bitcoin#33300: fuzz: compact block harness
4bf1701f58b Merge bitcoin/bitcoin#33796: kernel: Expose `CheckTransaction` consensus validation function
999e9dbfb43 Merge bitcoin/bitcoin#35202: ci: restore sockets in `i686, no IPC` job
224120bf129 Merge bitcoin/bitcoin#32394: net: make m_nodes_mutex non-recursive
11c9ef92a8d ci: unconfine seccomp for i686 no IPC
86718e45896 scripted-diff: rename ABEF_SAVE/CDGH_SAVE to ABCD_SAVE/EFGH_SAVE in SHA-256 ARM intrinsics
8f4a3ba8972 Merge bitcoin/bitcoin#35165: cmake: Remove NetBSD-specific workaround from `add_boost_if_needed`
b1ff4773ba7 Merge bitcoin/bitcoin#34544: wallet: Disallow wallet names that are paths including `..` and `.` elements
db98e357d3e Merge bitcoin/bitcoin#35018: wallet, bench: Use Nanobench setup() for wallet benchmarks, and remove DuplicateMockDatabase
18d003c3dcc Merge bitcoin/bitcoin#34916: contrib: override system locale in gen-manpages.py
567ff2b6d69 Merge bitcoin/bitcoin#33196: docs: clarify RPC credentials security boundary
3c2646eacc1 Merge bitcoin/bitcoin#34026: fuzz: Add tests for `CCoinControl` methods
bfbf1a7ef3e kernel: Expose btck_transaction_check consensus function
404470505a8 Merge bitcoin/bitcoin#34256: test: support `get_bind_addrs` and `feature_bind_extra` on macOS & BSD
25100fc28da Merge bitcoin/bitcoin#35186: util, iwyu: Add missed header
d28179bac90 util, iwyu: Add missed header
32e479f7a5a Merge bitcoin/bitcoin#34669: feefrac: drop comparison and operator{<<,>>} for sorted wrappers
11713c9fa91 net: make CConnman::m_nodes_mutex non-recursive
aec4fa2de00 net: drop the only recursive usage of CConnman::m_nodes_mutex
eed7af666b6 doc: Add release note for disallowing some wallet path names
3d7f0e4ed5a wallettool: Use GetWalletPath to determine the wallet path
ef499680c8d Merge bitcoin/bitcoin#34176: wallet: crash fix, handle non-writable db directories
a39cc16b434 doc: Release note for addhdkey
89b9a01b4ea wallet, rpc: Disallow importing unused() to wallets without privkeys
35bbee63746 wallet, rpc: Disallow import of unused() if key already exists
f3f8bcbd1df wallet: Add addhdkey RPC
9fa4076b20a test: Test merging implicit PSBTv0 with explicit PSBTv0
1660c18232a doc: Release notes for psbtv2
470e52a5f81 fuzz: Enforce additional version invariants in PSBT fuzzer
5bd0579c09c test: Tests for PSBT AddInput and AddOutput
b8b6e7f0c29 tests: Add PSBT unit test for ComputeTimeLock
0bc1c2e5084 tests: Add test vectors from BIP 370
e0e4dbdeb5c psbt: Change default psbt version to 2
bcc1dca77b3 Add psbt_version to PSBT RPCs and default to v2
ab38c301953 Implement PSBTv2 field merging
93e339e29ff Implement PSBTv2 AddInput and AddOutput
b39c86ae606 Allow specifying PSBT version in constructor
dcc9a3c8dfd Implement PSBTv2 in decodepsbt
5770dbd39fc Add PSBT::ComputeLockTime()
863cf47b33e Update test_framework/psbt.py for PSBTv2
925161eaf0c Implement PSBTv2 fields de/ser
d9cf658ee01 Restrict joinpsbts to PSBTv0 only
3da0e160124 Replace PSBT.tx with PSBT::GetUnsignedTx and PSBT::GetUniqueID
c568624ff29 psbt: Return std::optional from PrecomputePSBTData
092de4f1f6c Replace PSBT::GetInputUTXO with PSBTInput::GetUTXO
1d1ae6f0c4f wallet, test: Remove DuplicateMockDatabase
82bc280de47 test: Simple test for importing unused(KEY)
80c29bc6f14 descriptor: Add unused(KEY) descriptor
82c9fe31793 psbt: Use PSBTInput and PSBTOutput fields instead of accessing global tx
95897507e9e psbt: AddInput and AddOutput should take only PSBTInput and PSBTOutput
1b7d323a726 Add PSBTInput::GetOutPoint
543d3e1cdcf psbt: add PSBTv2 global tx fields
c01c7f068c5 psbt: Remove default constructor
9671aa08c2a psbt: add tx input and output fields in PSBTInput and PSBTOutput
990b084f11c Have PSBTInput and PSBTOutput know the PSBT's version
7eacc21ff67 psbt: make PSBT structs into classes
f926c326bb8 gui: Store PSBT in std::optional in PSBTOperationsDialog
1e2d146b47c psbt: Refactor duplicate key lookup and size checks
88384180d3e test: PSBTs should roundtrip through RPCs that do nothing
001877500dc test: construct psbt with unknown field programmatically
0cb884e6df8 psbt: Fill hash preimages and taproot builder from SignatureData
57820c472b4 bench: Utilize setup() for WalletLoading and use a real database
9a7604fd257 bench: Use setup() in WalletMigration to prepare the legacy wallet
426a94e7bd7 bench: Utilize setup() in WalletEncrypt to create the encryption wallet
d672455d201 bench: Utilitze setup() in WalletBalance for marking caches dirty
61412ef887f bench: Utilize setup() in WalletCreate to cleanup previous wallets
2424e528367 lint: doc: detail lint tool install methods
5fefa5a654e Don't pin Python patch version
fd15b55c2ef lint: use requirements.txt
5f4d3383daa lint: switch to ruff for formatting and linting
a53b81ce4e6 lint: switch to uv for python management in linter
fb0e8612d6f Merge bitcoin/bitcoin#35175: multi_index: fix compilation failure with boost >= 1.91
2b0dc0d2280 wallet: Disallow . and .. from wallet names
d084bc88beb doc: clarify IWYU workflow
7c7cec45678 ci: update IWYU patch reference
cef58341a0b Merge bitcoin/bitcoin#32876: refactor: use options struct for signing and PSBT operations
75cf9708a05 ci: add one more routable address to the VMs (docker containers)
1b93983bf5c test: make feature_bind_port_(discover|externalip).py auto-detect the skip condition
0bc9d354dfd multi_index: fix compilation failure with boost >= 1.91
eab72d14d79 refactor: use SignOptions for MutableTransactionSignatureCreator
5ed41752c5a refactor: use SignOptions for SignTransaction
dc4a5d1270f refactor: use PSBTFillOptions for filling and signing
032223f403d dbwrapper: reuse iterator scratch stream
7403c0f907d dbwrapper: guard `CDBBatch` scratch streams
cb1ab0a7168 test: cover repeated dbwrapper stream use
31ce729b28e streams: add `ScopedDataStreamUsage`
85921521866 Merge bitcoin/bitcoin#34911: rpc, mempool: -deprecatedrpc fullrbf and bip125-replaceable from mempool RPCs
c8d688f41cc fuzz: send blocktxn messages in cmpctblock harness
d0333bfe990 fuzz: send compact blocks in cmpctblock harness
3c58efe2acf fuzz: mine blocks and send headers for them in cmpctblock harness
651622432d2 fuzz: create and send transactions in cmpctblock harness
8c9a3fd0e87 net, fuzz: move CMPCTBLOCK_VERSION to header, use in cmpctblock harness
6cd480f62f6 fuzz: initial compact block fuzz harness
ad3f73862bd Merge bitcoin/bitcoin#35149: doc: clarify clang-tidy in developer notes
f40da7afc03 Merge bitcoin/bitcoin#35153: doc: update llvm based coverage example
e2ef54b8ba8 cmake: Remove NetBSD-specific workaround from `add_boost_if_needed`
6d86184a8bc rpc: combinerawtransaction now rejects unmergeable transactions
a7bea426b4a Merge bitcoin/bitcoin#35143: kernel: guard btck::Handle move-assignment against self-move
08925d5ee75 test: add coverage for loading a wallet in a non-writable directory
0218966c0dc test: add coverage for wallet creation in non-writable directory
bc0090f1d60 wallet: handle non-writable db directories
0abbe35bb20 Merge bitcoin/bitcoin#35148: refactor: Remove confusing DataStream::in_avail() alias
6322c1697d8 Merge bitcoin/bitcoin#33920: Export embedded ASMap RPC
28a523fb94d Merge bitcoin/bitcoin#35097: util: Return uint64_t from _MiB and _GiB operators
ef21e292988 doc: update llvm based coverage example
fa43da21f19 refactor: Run ShouldWarnOversizedDbCache calculation in u64
fa5801762e3 util: Return uint64_t from _MiB and _GiB operators
a1e534bbf07 doc: clarify clang-tidy in developer notes
a49bc1e24e6 ci: add --extended when using --usecli
fa204100e14 streams: Remove confusing DataStream::in_avail()
fa5ab0220e0 move-only: Extract ProcessPong() helper
8deed0df066 doc: add release notes for PR 34911
1a85ca1dff1 rpc, mempool: rpcdeprecate `bip125-replaceable` key in mempool RPCs reponses
f89d18c3b1c rpc, mempool: rpcdeprecate `fullrbf` key in getmempoolinfo RPC response
2d5ab09f0dc Merge bitcoin/bitcoin#35124: bench: fix benchmark fixtures and setup checks
1aef4d53ff0 Merge bitcoin/bitcoin#34885: kernel: expose btck_block_tree_entry_get_ancestor
e6430b27734 bench: make `setup()` use single-iteration epochs
ba0078e3bf1 bench: fix ephemeral spend inputs
b8b7f896e8f bench: drop duplicate balance benchmark
290e48fbf0a Merge bitcoin/bitcoin#35128: dbwrapper: avoid copying `CDBIterator` keys in `GetKey()`
904c0d07bb3 util/stdmutex: Drop StdLockGuard
f17cd18d02b Merge bitcoin/bitcoin#35116: net: cleanup SOCKS5 auth logging
fa9ddb01c96 test: Use MiB operator directly in cuckoocache_tests
14547eb4892 kernel: guard btck::Handle move-assignment against self-move
8a843a1b7c0 Merge bitcoin/bitcoin#34865: logging: better use of log::Entry internally
cd7865b0ce1 Merge bitcoin/bitcoin#33671: wallet: Add separate balance info for non-mempool wallet txs
0cbd2202943 Merge bitcoin/bitcoin#34440: refactor: Change CChain methods to use references, add tests
bb908999558 Merge bitcoin/bitcoin#34435: refactor: use `_MiB`/`_GiB` consistently for byte conversions
8a05adc5f81 Merge bitcoin/bitcoin#35138: doc: add missed advisory to 31.0 rel notes
c95968f780c doc: add missed advisory to 31.0 rel notes
3f09a4703f4 Merge bitcoin/bitcoin#35132: doc: update release process to mention security advisories pre-announcements
89af67d79f2 tests: Add some fuzz test coverage for command-specific args
92df7858592 tests: Add some test coverage for ArgsManager::AddCommand
33c8090be95 ArgsManager: automate checking for correct command options
186354a0d8a bitcoin-wallet: use command-specific options
d21e82b7d64 ArgsManager: support command-specific options
1a4371cc3d5 Merge bitcoin/bitcoin#34882: refactor: Use NodeClock::time_point in more places
4abc0c2e047 doc: update release process to mention security advisories pre-announcements
875faa29e16 Merge bitcoin/bitcoin#35087: tor: limit torcontrol line size that is processed to prevent OOM
2a90b6132a5 Add release notes for exportasmap
8cb2d926b4f rpc: Add exportasmap RPC
e32bc7f817e Merge bitcoin/bitcoin#35025: refactor: use `SpanReader` in deserialization benchmarks
13c8df4d5a9 refactor: replace `DataStream` with `SpanReader` in block deserialization tests
2529f255554 refactor: use `SpanReader` in `PrevectorDeserialize`
b8eb6c2081a refactor: use `SpanReader` in `TestBlockAndIndex`
61d678a6e35 refactor: use `DataStream::clear` in `::read` and `::ignore`
5de2f97a052 dbwrapper: use `SpanReader` for iterator keys
f0e498af5c0 test: cover failed `CDBIterator::GetKey()` deserialization
d3a40dd9de0 Merge bitcoin/bitcoin#35127: fuzz: remove redundant CScript method calls from script harness
dfe5d6a81dc fuzz: apply node context reset pattern to p2p_handshake
c9d8582235a fuzz: remove redundant CScript method calls from script harness
89e7c4274c6 Merge bitcoin/bitcoin#31449: coins,refactor: Reduce `getblockstats` RPC UTXO overhead estimation
6b3dd6314fb Merge bitcoin/bitcoin#34863: test: Clean shutdown in Socks5Server
64a88c8c1ed Merge bitcoin/bitcoin#35096: kernel: align height parameters to int32_t in btck API
dc84a310143 wallet: remove fUpdate argument from AddToWalletIfInvolvingMe
94845df073a wallet: remove update_tx argument from SyncTransaction
6e796e1f473 wallet: remove fUpdate argument from ScanForWalletTransactions
54e4c0be8f1 wallet: remove update argument from RescanFromTime method
0c0f75eaaf1 Merge bitcoin/bitcoin#35091: doc: archive release notes for v31.0
5c50a033094 Merge bitcoin/bitcoin#35006: cli, rpc: add -rpcid option for custom request IDs
b6d1b65062a Merge bitcoin/bitcoin#34908: rpc, refactor: gettxoutsetinfo race condition fix follow-ups
af0ee28eb62 refactor: use _MiB consistently for Mebibyte conversions
b3edd30aa24 util: add _GiB for Gibibyte conversions
7c75244adef Change pindexMostWork parameter of ActivateBestChainStep() to reference
c5eb283bca7 Change CChain::FindFork() to take ref
20b58e281ad Change CChain::Next() to take reference
fe2d6e25e03 Change CChain::Contains() to take reference
db56bcd6927 test: Add CChain::FindFork() tests
8333abdd916 test: Add CChain basic tests
3bf3b6d59ab net: log SOCKS5 auth before sending
b2debc9276d net: cleanup SOCKS5 auth logging
ad0545ba967 Merge bitcoin/bitcoin#35024: ci: Mitigate network issues in native Windows job
a51ec89e0c6 Merge bitcoin/bitcoin#35099: ci: drop `-lstdc++` from msan fuzz job
963ea38c0c8 Merge bitcoin/bitcoin#35038: bench: add script verification benchmark for P2TR script-path spends
0bdf21022ce Merge bitcoin/bitcoin#35089: test: Allow to set height in create_block
ac9ce25b5f0 Merge bitcoin/bitcoin#34425: test: Fix all races after a socket is closed gracefully
2f9aa400d9f Merge bitcoin/bitcoin#33032: wallet, test: Replace MockableDatabase with in-memory SQLiteDatabase
378e17f7035 Merge bitcoin/bitcoin#33477: Rollback for dumptxoutset without invalidating blocks
654556e631d Merge bitcoin/bitcoin#35086: test: interface_http follow-ups
9fe5896a446 tor: torcontrol disconnect on too many lines to avoid OOM
8b68287bf9a test: Make torcontrol max line length test stricter and test boundaries.
c5ec2d53130 logging: replace FormatLogStrInPlace with Format
3b92ec20362 logging: replace BufferedLog with log::Entry
07b9b13b45f doc: add integer type conventions in btck api remarks
f49a2afd94c test: interface_http follow-ups
ba6287a4493 kernel: align height parameters to int32_t in btck API
df44afdc983 kernel: expose btck_block_tree_entry_get_ancestor
8115001cd4c logging: pass log::Entry through to logging functions
b414913c73e util: add timestamp and thread_name to log::Entry
8a55b17751a util: make SourceLocation constructor explicit
b02d6b0567a ci: drop -lstdc++ usage in msan fuzz job
655a39ee148 ci: use llvm 22.1.3
1fa34f90a2f Merge bitcoin/bitcoin#35095: doc: fix typos and minor formatting issues
bdc8e496dab doc: fix typos and formatting in CONTRIBUTING, i2p, bitcoin-conf, files
ab5889796f7 refactor: torcontrol add connection checks to restart_with_mock
e7d647388c2 Merge bitcoin/bitcoin#34923: depends: remove workaround for Make older than 4.2.90
c4361e53cdb Merge bitcoin/bitcoin#34757: guix: re-enable riscv exported symbol checking
fa16bc53d79 test: Require named arg for create_block ntime arg
fab352053d6 test: Remove unused create_coinbase imports
fad6deb3cb2 scripted-diff: Use new create_block height option
fa5eb74b967 test: Allow to set height in create_block
c54f37c1ba9 cli, rpc: add -rpcid option for custom request IDs
4d040b7d623 doc: archive release notes for v31.0
44ac0c32b9e Merge bitcoin/bitcoin#34401: kernel: add serialization method for btck_BlockHeader API
53f4743c215 Merge bitcoin/bitcoin#35080: test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py
edcf84c73ab Merge bitcoin/bitcoin#35077: kernel: build: remove unused serfloat dependency
fa02eb87df0 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py
49895b9cbd1 kernel: build: remove unused serfloat dependency
577a3e74c82 test: Add check for return type in `HasToBytes` concept
1ad551281aa kernel: Add Block Header serialization method
86662623ec2 Add `SpanWriter` class for zero-allocation stream writing
fbffe8a64a9 bench: improve `VerifyNestedIfScript` benchmark precision (make stack clearing untimed)
616ee6fe74e bench: add script verification benchmark for P2TR script-path spends
7844a2f0830 Merge bitcoin/bitcoin#34772: test: modernize interface_http and cover more libevent behavior
6ac49373aac test: Add clean shutdown to Socks5Server
976985eccd5 Merge bitcoin/bitcoin#34124: validation: make `CCoinsView` a pure virtual interface
09c0e377899 ci: Rename vcpkg binary cache entity to force rebuild
fa1015bbcb1 refactor: Use NodeClock::time_point for m_connected
7aa033d3d4a Merge bitcoin/bitcoin#34773: test: migrate functional test equality asserts to `assert_equal`
34c3279d25e Merge bitcoin/bitcoin#34623: Update secp256k1 subtree to latest master
7e3e22e1f7d Merge bitcoin/bitcoin#35047: doc: fix typo 'parlor' to 'parlance' in developer-notes
ea893cff07d doc: fix typo 'parlor' to 'parlance' in developer-notes
701bc2dc02f contrib: Fix NameError in signet miner gbt()
eff9e798b95 coinselection: Tiebreak SRD eviction by weight
58dccd27e11 Merge bitcoin/bitcoin#34858: test: Use NodeClockContext in more tests
fe3d2be1d67 Merge bitcoin/bitcoin#32757: net: Fix Discover() not running when using -bind=0.0.0.0:port
7015f709203 Merge bitcoin/bitcoin#34886: test: Rework Single Random Draw coin selection tests
7c6f1ab654a Merge bitcoin/bitcoin#35032: net_processing: don't modify addrman for private broadcast connections
94f1d35145c Merge bitcoin/bitcoin#34922: test: Use BasicTestingSetup when sufficient
dc930910838 ci: Cache `vcpkg/downloads` folder in native Windows CI job
88bbf2ad33b ci, refactor: Reuse primary key in `actions/cache/save`
141fbe4d530 Merge bitcoin/bitcoin#34884: validation: remove unused code in FindMostWorkChain
1ed1a124028 net_processing: don't modify addrman for private broadcast connections
2b541eeb363 Merge bitcoin/bitcoin#34495: Replace boost signals with minimal compatible implementation
f8ab0b778c7 Merge bitcoin/bitcoin#34905: Update string and net utils for future HTTP operations
b7f9178976b Update secp256k1 subtree to latest master
dfd54c959ef Squashed 'src/secp256k1/' changes from 57315a6985..7262adb4b4
ab304b0ef24 Merge bitcoin/bitcoin#35031: ci: Match `VCPKG_HOST_TRIPLET` to `VCPKG_TARGET_TRIPLET`
80572c75556 Merge bitcoin/bitcoin#34158: torcontrol: Remove libevent usage
8783cc8056d refactor: inline `CCoinsViewBacked` implementation
86296f276d1 coins: make `CCoinsView` methods pure virtual
b637566c8d0 coins: add explicit `CoinsViewEmpty` noop backend
90c635c01cf fuzz: keep backend assertions aligned to active backend
a9f92e34975 refactor: normalize CCoinsView whitespace and signatures
38a99f33444 scripted-diff: normalize `CCoinsView` naming
06172ef0d50 refactor: rename `hashBlock` to `m_block_hash` to avoid shadowing
0e712b3812d Make DynSock accepted sockets queue optional, with precise lifetime
3de02abf3f7 util/test: Add string_view constructor to LineReader and remove StringToBuffer
b0ca400612d string: replace AsciiCaseInsensitiveKeyEqual with CaseInsensitiveEqual
81720992931 util: get number of bytes consumed from buffer by LineReader
ba01b00d45a refactor: use for loops in FindMostWorkChain
aa0eef735b1 test: add InvalidateBlock/ReconsiderBlock asymmetry test
1b0b3e2c2cb validation: remove redundant marking in FindMostWorkChain
c74c6cfd840 ci: Match `VCPKG_HOST_TRIPLET` to `VCPKG_TARGET_TRIPLET`
d2844c6a4ff Merge bitcoin/bitcoin#35014: test: remove macOS REDUCE_EXPORTS exception workaround
858a0a9c96b test: Add SRD maximum weight tests
fe9f53bf0b2 test: Add SRD success tests
2840f041c5e test: Rework SRD insufficient balance test
64ab97466f7 Test: Add new minimum to tested feerates
65900f8dc6e test: Init coin selection params with feerate
82235bbf2b5 Merge bitcoin/bitcoin#34988: rpc: fix initialization-order-fiasco by lazy-init of decodepsbt_inputs
b555a0b789f test: remove macOS REDUCE_EXPORTS exception workaround
1d7edee34c1 Merge bitcoin/bitcoin#34977: Update libmultiprocess subtree to fix test timeout
2af003ae372 test: Use BasicTestingSetup when TestingSetup is not necessary
9ee77701ddb refactor(test): Only specify TestChain100Setup in test cases
d868667fdc5 Merge bitcoin/bitcoin#34985: fuzz: remove GetDescriptorChecksum from string harness
66b4e30ec80 Merge commit '7a6d210989af56a03d7efa79f1f3a90047bb88fe' into 2026/04/libmultiprocess-subtree
7a6d210989a Squashed 'src/ipc/libmultiprocess/' changes from 70f632bda8..3edbe8f67c
422ca211ec0 test: ensure HTTP server enforces limits on headers and body size
485ebad1ee9 Merge bitcoin/bitcoin#33385: contrib: Add bash completion for new bitcoin command
3fd68a95e68 scripted-diff: replace remaining Python test equality asserts
301b1d7b1fa test: add missing `assert_equal` imports
06a4176c420 test: convert truthy asserts in `wallet_miniscript` and `rpc_psbt`
d9a3cf20a49 test: convert simple equality asserts in excluded files
23c06d4e6d0 test: convert equality asserts with comments or special chars
dcd90fbe54c test: prep manual equality assert conversions
4f4516e3f6c test: split equality asserts joined by `and`
76a5570b368 test: use `in` for two-value equality asserts
996e4f7edd6 Merge bitcoin/bitcoin#35001: validation: Remove stale `BlockManager` param from `ContextualCheckBlockHeader`
b730dc3301f Merge bitcoin/bitcoin#34208: bench: add fluent API for untimed `setup` steps in nanobench
0c1a07e8901 test: ensure HTTP server timeout is not caused by a delayed response
f06de5c1ea6 test: clean up and modernize interface_http
1950da94fce test: enable `rpc_bind` on macOS and BSD
7236a055035 test: enable `feature_bind_extra` on macOS and BSD
74e75180886 Merge bitcoin/bitcoin#34989: doc: remove stale shortid collision TODO
8edb13dbdd5 Merge bitcoin/bitcoin#34967: doc: Discourage trailing doxygen comments, and fix the broken ones
19e99be011b guix: remove riscv exclusion from symbol check
47b7a9f6668 guix: binutils 2.46.0
851152e42a4 validation: Remove stale BlockManager param in ContextualCheckBlockHeader
a7c30da1f6f Merge bitcoin/bitcoin#34873: net: fix premature stale flagging of unpicked private broadcast txs
1401011f71c test: Add test for exceeding max line length in torcontrol
84c1f320710 test: Add torcontrol coverage for PoW defense enablement
7dff9ec2989 test: Add test for partial message handling in torcontrol
569383356ec test: Add simple functional test for torcontrol
4117b92e67c fuzz: Improve torcontrol fuzz test
b1869e9a2db torcontrol: Move tor controller into node context
eae193e7502 torcontrol: Remove libevent usage
242b0ebb5ca btcsignals: use a single shared_ptr for liveness and callback
b12f43a0a82 signals: remove boost::signals2 from depends and vcpkg
a4b16079837 signals: remove boost::signals2 mentions in linters and docs
375397ebd94 signals: remove boost includes where possible
091736a153c signals: re-add forward-declares to interface headers
9958f4fe491 Revert "signals: Temporarily add boost headers to bitcoind and bitcoin-node builds"
34eabd77a23 signals: remove boost compatibility guards
e60a0b9a22f signals: Add a simplified boost-compatible implementation
63c68e2a3f9 signals: add signals tests
d517fa0a948 rpc: fix initialization-order-fiasco by lazy-init of decodepsbt_inputs
f1e14dfbe9b depends: remove workaround for Make older than 4.2.90
5603ae0ffa3 test: fix send_batch_request to pass callables when using --usecli
fa1f4feac4b Merge bitcoin/bitcoin#34965: cli: Return more helpful authentication errors
4b989627316 Merge bitcoin/bitcoin#34448: ci, iwyu: Fix warnings in `src/util` and treat them as errors
59199fa5eaa Merge bitcoin/bitcoin#33908: kernel: add context‑free block validation API (`btck_check_block_context_free`) with POW/Merkle flags
fc736013a59 rpc: Add in_memory option to dumptxoutset with rollback
d0fd7189485 test: Extend named pipe sqlite tool test to use rollback
ab9463efac7 test: Add dumptxoutset fork test
49d5e835a87 rpc: Don't invalidate blocks in dumptxoutset
fe58eb98507 blockstorage: Add DeletePruneLock
037ea2c714c walletdb: Remove m_mock from SQLiteDatabase
59484e2fdbd wallet: Make Mockable{Database,Batch} subclasses of SQLite classes
b69f989dc53 wallet, bench: Use TestingSetup in CoinSelection benchmark
e7d67c9fd9a test: Make duplicating MockableDatabases use cursor and batch
964eafb71c1 bench, wallet: Make WalletMigration's setup WalletBatch scoped
facaeb9c762 doc: Discourage trailing doxygen comments, and fix the broken ones
8cc690ea9bc Merge bitcoin/bitcoin#34379: wallet: fix `gethdkeys` RPC for descriptors with partial xprvs
194f57109de Merge bitcoin/bitcoin#34976: lint: Clarify rmtree/remove_all error message with preferred alternatives
fc9987dfc64 doc: remove stale shortid collision TODO
1189702d2f4 Merge bitcoin/bitcoin#34982: kernel: Remove NONNULL annotation from destroy method
52c3381fa8f Merge bitcoin/bitcoin#33506: test: sock: Enable all socket tests on Windows
24609389a42 Merge bitcoin/bitcoin#34986: docs: remove duplicate ///@} from bitcoinkernel.h
7abf6f6fb61 docs: remove duplicate ///@} from bitcoinkernel.h
91cd0e3aaa4 fuzz: remove GetDescriptorChecksum from string harness
75608547b46 kernel: Remove NONNULL annotation from destroy method
fa955af6181 lint: Clarify rmtree/remove_all error message with preferred alternatives
8e789322c5a Merge bitcoin/bitcoin#34944: guix: Clean up module list in manifest
8b461c530e9 Merge bitcoin/bitcoin#34956: depends, qt: Fix build on aarch64 macOS 26.4
aeb667f6b7d Merge bitcoin/bitcoin#33343: help: enrich help text for `-loadblock`
0831173c017 Merge bitcoin/bitcoin#34640: wallet: rpc: Improve error message for low feerates.
d0ed369b3b4 Merge bitcoin/bitcoin#34049: rpc: Disallow captures in RPCMethodImpl
5deed3deabf Merge bitcoin/bitcoin#34958: test: mining: add coverage for GBT's "coinbasevalue" result field
54fa356365a Merge bitcoin/bitcoin#34957: policy: remove incorrect `MANDATORY_SCRIPT_VERIFY_FLAGS` comment
4757b71aa79 Merge bitcoin/bitcoin#34938: refactor: Return std::optional over bool+mut&
257769a7ce8 qa: Improve error message
20a94c1524c cli: Clearer error messages on authentication failure
84c3f8d325e refactor(rpc): GenerateAuthCookieResult -> AuthCookieResult
fa244b984c0 refactor: Use NodeClock::time_point for m_last_send/recv and m_ping_start
fa2605b2047 refactor: Use NodeClock::time_point for CNetMessage::m_time
c97ac44c34e Merge bitcoin/bitcoin#32297: bitcoin-cli: Add -ipcconnect option
a846a7c805c Merge bitcoin/bitcoin#34811: doc: update cjdns.md for current cjdns installation and peering
12c3c3f81d5 test: mining: add coverage for GBT's "coinbasevalue" result field
8b49e2dd4ee ci, iwyu: Fix warnings in `src/util` and treat them as errors
6953363be8c refactor: Move license info into new module
eb750d277bc iwyu: Remove workaround for issue that has been fixed upstream
5fa6898818c policy: remove incorrect MANDATORY_SCRIPT_VERIFY_FLAGS comment
3aeccb7d739 depends, qt: Fix build on aarch64 macOS 26.4
f6e6fad0d9d Merge bitcoin/bitcoin#34867: wallet: document importdescriptors error object fields
0e2122c62eb Merge bitcoin/bitcoin#32875: index: handle case where pindex_prev equals chain tip in NextSyncBlock()
550f603025a Merge bitcoin/bitcoin#34382: test: wallet: Check fallbackfee default argument behavior.
b0f68f0a3a3 Merge bitcoin/bitcoin#34804: Update libmultiprocess subtree to fix race conditions on disconnects
325f743eedd guix: Clean up module list in manifest
fabab69e9e8 refactor: Return std::optional from ParseDouble
fa0a09441d2 refactor: Return std::optional from GetWalletNameFromJSONRPCRequest
fafb0c4cbe4 refactor: Return std::optional from GetLogCategory
826819a5108 Merge bitcoin/bitcoin#34939: fuzz: Use CAmount for storing best_waste
2b6af628b14 Merge bitcoin/bitcoin#34491: ci: add FreeBSD Clang cross job
e602ad62d04 Merge bitcoin/bitcoin#34919: test: script: boundary at exactly 65535 bytes must use OP_PUSHDATA2
954374d4058 Merge bitcoin/bitcoin#34926: test: Replace DEBUG_LOG_OUT with -printtoconsole=1
890a09b1e49 fuzz: Use CAmount for storing best_waste
fae807ed255 test: Remove unused, confusing and brittle connect_nodes.wait_for_connect
fab27726478 test: Fix all races after a socket is closed gracefully
fa21edddb27 test: Stricter checks in rpc_setban.py
faa404e119c test: Add is_connected_to helper
613a5486488 Merge commit '2478a15ef966cc93d47dd0f461a44be39bc51534' into pr/subtree-9
2478a15ef96 Squashed 'src/ipc/libmultiprocess/' changes from 1868a84451f..70f632bda8f
fa644e625b0 refactor: Use NodeClock::duration for m_last_ping_time/m_min_ping_time/m_ping_wait
333316f6bee doc: Fix typo "eviction criterium" -> "eviction criterion"
fa54fb01295 refactor: gui: Accept up to nanoseconds in formatDurationStr, but clarify they are ignored
fab88884b73 refactor: Avoid manual chrono casts with * or /
facfce37f62 util: Add NodeClock::epoch alias
fa41e072b3b refactor: Use NodeClock alias over deprecated GetTime
4f8bd396f8a Merge bitcoin/bitcoin#34913: fuzz: Use time helpers in node_eviction
21da421b42d Merge bitcoin/bitcoin#34439: qa: Drop recursive deletes from test code, add lint checks.
8a8edc8d882 Merge bitcoin/bitcoin#34741: refactor: Return std::optional from GetNameProxy/GetProxy
a5609fc249b Merge bitcoin/bitcoin#34458: net: Don't log own ips during discover
261d229455e test: Replace DEBUG_LOG_OUT with -printtoconsole=1
3dcdb2b9ba1 test: wallet: Warning for excessive fallback fee.
6664e41e56a test: wallet: -fallbackfee default is 0
d28c989243d test: wallet: refactor: fallbackfee extract common send failure checks.
99f99c989e7 Merge bitcoin/bitcoin#34918: fuzz: [refactor] Remove unused g_setup pointers
fde37778ba6 Merge bitcoin/bitcoin#34915: doc: archive release notes for v28.4
6d54365c3ef Merge bitcoin/bitcoin#34920: wallet: drop stale TODOs
fa1ebde1adf fuzz: Use time helpers in node_eviction
325afe664d1 net: delay stale evaluation and expose time_added in private broadcast
1438165b1fb wallet: drop stale TODOs
fabbfec3b00 fuzz: Remove unused g_setup pointers
f8996746393 test: script: boundary at exactly 65535 bytes must use OP_PUSHDATA2
758f208cc17 contrib: override system locale in gen-manpages.py
5a81d73a810 scripted-diff: rpc: Don't pointlessly capture in RPCMethod lambdas
4e789299af7 scripted-diff: rpc: Rename RPCHelpMan to RPCMethod
3e089038aae doc: archive release notes for v28.4
2fe76ed8324 Merge bitcoin/bitcoin#34896: ci: Upgrade IWYU to 0.26 compatible with Clang 22
c61c504f273 Merge bitcoin/bitcoin#34883: ci: vcpkg-specific cleanups
0d1301b47a3 test: functional: drop rmtree usage and add lint check
8bfb422de83 test: functional: drop unused --keepcache argument
a7e4a59d6df qa: Remove all instances of `remove_all` except test cleanup
38886a67108 Merge bitcoin/bitcoin#34786: validation: do not add the snapshot to candidates set of the background chainstate
6b99a3e4f0e doc: update cjdns.md for current upstream changes
0587c56091f kernel: Expose context-free block validation
bfc84eb2eaf Merge bitcoin/bitcoin#33259: rpc, logging: add backgroundvalidation to getblockchaininfo
1ef71660294 Merge bitcoin/bitcoin#34891: doc: Note that generateblock does not collect transaction fees
4ecf473c361 Merge bitcoin/bitcoin#34727: test: Add IPC wake-up test and reuse mining context
3129d4a6934 ci: Rename `TIDY_LLVM_V` to `IWYU_LLVM_V` in IWYU-specific code
71f827c3c2b kernel: Expose consensus parameters (`btck_ConsensusParams`)
999d18ab1ca net: introduce TxSendStatus internal state container
667e081a2a4 Merge bitcoin/bitcoin#34598: bench: use larger payload in HexStrBench
25f69d970a4 release note
af629821cf9 test: add background validation test for getblockchaininfo
a3d6f32a396 rpc, log: add backgroundvalidation to getblockchaininfo
5b2e4c4a88c log: update progress calculations for background validation
3e5dc610353 rpc, refactor: gettxoutsetinfo race condition fix follow-ups
400aa68b4aa Merge bitcoin/bitcoin#34809: threadsafety: Add STDLOCK() macro for StdMutex
fa73ed467cb refactor: Fix redundant conversion to std::string and then to std::string_view [performance-string-view-conversions]
16613c9de98 Merge bitcoin/bitcoin#34857: test: Remove confusing assert_debug_log in wallet_reindex.py
65379bb8d0e ci: add FreeBSD cross CI job
f44191f1637 depends: build qrencode for Freebsd
7f7018738e9 depends: FreeBSD cross with Clang
6464f140818 depends: disable inotify in Freebsd Qt build
fbabe861907 Merge bitcoin/bitcoin#34870: wallet: feebumper, fix crash when combined bump fee is unavailable
696b5457c5a Merge bitcoin/bitcoin#34667: test: ensure FastWalletRescanFilter is correctly updated during scanning
9a03ba1e3a9 Merge bitcoin/bitcoin#34888: wallet: fix amount computed as boolean in coin selection
8444efbd4a0 refactor: Get rid of unnecessary newlines in logs
6bcb60354e6 refactor: Modernize member variable names in torcontrol
a36591d1948 refactor: Use constexpr in torcontrol where possible
1a1f584360c Merge bitcoin/bitcoin#29963: depends: Do not consider `CC` environment variable for detecting system
28b93af19da Merge bitcoin/bitcoin#33414: tor: enable PoW defenses for automatically created hidden services
8d2f06853ac sync: Use StdMutex for thread safety annotations
cbc231ed8ee scripted-diff: logging: Switch from StdLockGuard to STDLOCK
f808786f48e logging: Add missing thread safety annotations
e196cf26e0e util/stdmutex.h: Add STDLOCK() and improve annotation checking for StdMutex
a703c70bb82 Merge bitcoin/bitcoin#34589: ci: Temporarily use clang in valgrind tasks
cdaf2f20ae0 Merge bitcoin/bitcoin#34850: depends: Remove no longer necessary `dsymutil`
3d1b7d0f6a9 Merge bitcoin/bitcoin#34639: iwyu: Document or remove some `pragma: export` and other improvements
559df68240b Merge bitcoin/bitcoin#34878: depends: Fix cross-compiling on macOS for Windows
999c42484f7 Merge bitcoin-core/gui#815: Bugfix on TransactionsView - Disable if privacy mode is set during wallet selection
0b489886f85 ci: Upgrade IWYU to 0.26 compatible with Clang 22
0026b330c4a wallet: fix amount computed as boolean in coin selection
31365599235 doc: Note that generateblock does not collect transaction fees
483769c0461 Merge bitcoin/bitcoin#26201: Remove Taproot BIP 9 deployment
2d5cedfe129 ci: Switch to VS-vendored vcpkg instance
ad75b147b5c test: scale IPC mining wait timeouts by timeout_factor
e7a918b69a5 test: verify IPC error handling for invalid coinbase
63684d6922e test: move make_mining_ctx to ipc_util.py
4ada575d6c6 test: verify createNewBlock wakes promptly when tip advances
0fe6fccec27 doc: Document rationale for using `IWYU pragma: export`
cfa3b10d50d iwyu, doc: Document `IWYU pragma: export` for `<logging/categories.h>`
015bea05e6a iwyu, doc: Document `IWYU pragma: export` for `<chrono>`
48bfcfedec0 iwyu, doc: Document `IWYU pragma: export` for `<threadsafety.h>`
179abb387f4 refactor: Move `StdMutex` to its own header
9aa5b3c3a33 ci: Switch to `x64-windows-release` triplet
65882fa68f7 ci: Remove upstreamed vcpkg workaround
19c94747426 Merge bitcoin/bitcoin#34791: test: Suppress another unsolicited `mock_process/*` output
7a9304f8872 depends: Fix cross-compiling on macOS for Windows
faad08e59c4 test: Use NodeClockContext in more tests
fa8fe0941ed fuzz: Use NodeClockContext
6e295d8ad5f Merge bitcoin/bitcoin#34059: refactor: Use NodeClock::time_point for m_addr_token_timestamp
fa9f434df89 test: Allow time_point in boost checks
faaea7895fd refactor: Use current_time over redundant call to Now()
3333c5023f7 refactor: Use NodeClock::time_point for m_addr_token_timestamp
f80bf5128d7 Merge bitcoin/bitcoin#34869: tests: applied PYTHON_GIL to the env for every test
b425a81f070 Merge bitcoin/bitcoin#34868: scripted-diff: Rename `WAIT_TIMEOUT` to `TEST_WAIT_TIMEOUT`
d14293c3a92 Merge bitcoin/bitcoin#34859: ci: Retry on intermittent Windows generate download failures
d58e0ad0a42 Merge bitcoin/bitcoin#33215: Fix compatibility with `-debuglogfile` command-line option
93e8bcc077e Merge bitcoin/bitcoin#32442: doc: guix: Troubleshooting zdiff3 issue and uninstalling.
14053d85207 Merge bitcoin/bitcoin#34550: guix: update time-machine to c5eee3336cc1d10a3cc1c97fde2809c3451624d3
bc1c5409205 Merge bitcoin/bitcoin#29060: Policy: Report debug message why inputs are non standard
3ca3e519b64 Merge bitcoin/bitcoin#34684: refactor: Enable -Wswitch in exhaustive switch'es, Enable -Wcovered-switch-default
b14f2c76a1f tests: applied PYTHON_GIL to the env for every test
6d2952c3c35 serialize: Add missing `<span>` header
6072a2a6a1f wallet: feebumper, fix crash when combined bump fee is unavailable
c53021b0ec4 Merge bitcoin/bitcoin#34499: miniscript: Use valid script in test, etc (#31713 follow-ups)
3c9e4219423 Merge bitcoin/bitcoin#34846: kernel: Add API getter functions for timelock fields (`nLockTime`, `nSequence`)
658e68f95b1 scripted-diff: Rename `WAIT_TIMEOUT` to `TEST_WAIT_TIMEOUT`
445143bfc67 wallet: document structured importdescriptors errors
c0d3d493a97 Merge bitcoin/bitcoin#34704: validation: Explicitly move blocks to validation signals
7e18e2b16ff Merge bitcoin/bitcoin#32624: fuzz: wallet: add target for `MigrateToDescriptor`
3a4a863d191 Merge bitcoin/bitcoin#34823: threading: never require logging from sync.h (take 2)
4169e72d9ed Merge bitcoin/bitcoin#34451: rpc: fix race condition in gettxoutsetinfo
fa71c6e84c1 ci: Avoid intermittent Windows generate download failures
fa30951af5b test: Remove confusing assert_debug_log in wallet_reindex.py
a7514c1aa91 Merge bitcoin/bitcoin#34848: cmake: Migrate away from deprecated SQLite3 target
81bf3ebff7e Merge bitcoin/bitcoin#34852: test: Fix intermittent issue in feature_assumeutxo.py
d81b562fcaf Merge bitcoin/bitcoin#34799: rpc: Run type check on decodepsbt result
33eaf910bd9 Merge bitcoin/bitcoin#34820: test: Use asyncio.SelectorEventLoop() over deprecated asyncio.WindowsSelectorEventLoopPolicy(), move loop creation
faf71d6cb49 test: [refactor] Use verbosity=0 named arg
99996f6c06d test: Fix intermittent issue in feature_assumeutxo.py
5cf6ea24d35 Merge bitcoin/bitcoin#34479: fuzz: Add and use NodeClockContext
578525d31d4 depends: Remove no longer necessary `dsymutil`
ca85b8c22d3 Merge bitcoin/bitcoin#34742: fuzz: set whitelist permissions on connman target
d6f680b4275 validation: Move block into BlockDisconnected signal
4d02d2b316a validation: Move block into BlockConnected signal
8b0fb64c024 validation: Move validation signal events to task runner
498b6eb6b5e cmake: Migrate away from deprecated SQLite3 target
fa70b9ebaa4 ci: Temporarily use clang in valgrind tasks
faf3ef4ee79 ci: Clarify why valgrind task has gui disabled
9f28120a5bf kernel: Add API function for getting a tx input's nSequence
6b64b181d5a kernel: Add API function for getting a tx's nLockTime
2104282ddde fuzz: Add tests for CCoinControl methods
43b09b993d0 fuzz: Improve oracle for existing CCoinControl tests
04480c25583 Merge bitcoin/bitcoin#34830: fuzz: set fSuccessfullyConnected in connman harness
3293e9a61fd guix: document when GCC SSA gen patch can be removed
978023fd9ea guix: use latest glibc 2.31
ab9a98b1e46 guix: combine gcc-libgcc-patches with base-gcc
2276426bb1b guix: switch to upstream python-oscrypto package
feea2a850ea ci: use LIEF 0.17.5 in lint job
a7524f57ba5 guix: switch to upstream python-lief package
2bf97e813d9 guix: switch to upstream osslsigncode package
dc0ddab389f guix: drop CMake workaround
31eb46f054f guix: update to c5eee3336cc1d10a3cc1c97fde2809c3451624d3
0f323e10759 guix: add --no-same-owner to TAR_OPTIONS
dc104cc3335 Merge bitcoin/bitcoin#34832: lint: detect arch for mlc binary
db3c25cfae1 index: add explicit early exit in NextSyncBlock() when the input is the chain tip
551875360cd ci: Use arch-appropriate binaries in lint install
52e8c1ce32a Merge bitcoin/bitcoin#34825: depends: capnp 1.4.0
8d551546554 Merge bitcoin/bitcoin#34602: test: addrman: successive failures in the last week for IsTerrible
bac8046fcee Merge bitcoin/bitcoin#34831: lint: remove excluded files from whitespace check
79467e3ec7c threading: never require logging from sync.h
f55c891a65e lint: more reuse of SHARED_EXCLUDED_SUBTREES
8864917d8bc lint: add missing ipc/test to grep_boost_fixture_test_suite
ecefc129277 lint: fix lint issue in lint script
ee8c22eb6a4 contrib: fix whitespace issues in scripts
fa55723b8fb move-only: Extract ProcessAddrs() helper
92287ae7539 test/wallet: ensure FastWalletRescanFilter is updated during scanning
04e21183729 lint: remove excluded .cpp/.h files from whitespace check
685a44c6012 fuzz: set fSuccessfullyConnected in connman harness
fadf901fd4b rpc: Run type check on decodepsbt result
ff7cdf633e3 Merge bitcoin/bitcoin#34816: test: Remove vulture from ci, Remove some --min-confidence=60 unused code
bde35d61f93 depends: capnp 1.4.0
92a3d30f382 Merge bitcoin/bitcoin#34418: qa: Make wallet_multiwallet.py Windows crossbuild-compatible
abaadc3d5bb Merge bitcoin/bitcoin#31774: crypto: Use secure_allocator for `AES256_ctx`
16a02bf5af4 Merge bitcoin/bitcoin#33451: doc: Add `INSTALL.md` to Linux release tarballs
ac1ccc5bd91 build: Add CTAD feature check
9f273f1c1c5 build: Add path to doc recommended versions for CLANG, GCC and MSVC
fa050da9805 test: Move event loop creation to network thread
a1f22a0a6b9 test: Suppress another unsolicited `mock_process/*` output
fa9168ffcd6 test: Use asyncio.SelectorEventLoop() over deprecated asyncio.WindowsSelectorEventLoopPolicy()
390e7d61bd5 Merge bitcoin/bitcoin#34787: build: fix native macOS deployment
5440280891b Merge bitcoin/bitcoin#34745: refactor: replace `ArgsManager::cs_args RecursiveMutex` with `Mutex`
fa4ec13b44d build: Enable -Wcovered-switch-default
fa2670bd4b5 refactor: Enable -Wswitch in exhaustive switch
5f75d90c388 Merge bitcoin/bitcoin#34813: threads: qa: Add lock order annotation for `TxMempool::cs`
f1e0245f891 Merge bitcoin/bitcoin#34818: doc: fix process name typo in multiprocess.md
c2732146d14 doc: fix process name typo in multiprocess.md
faea12ecd9f test: Fixup docs for NodeClockContext and SteadyClockContext
5608b8ce9e0 Merge bitcoin/bitcoin#34750: test: fix addr relay test silently passing and other improvements
fa90b21430b test: Remove unused feature_segwit.py functions
fa6b05c96ff test: Remove unused CUSTOM_._COUNT
fa7bac94d87 test: Remove unused wait_for_addr, firstAddrnServices, on_addr
fa388a35855 test: Remove unused self.p2p_conn_index = 1
fa803710e27 test: Remove unused AddressType
e31ab8040fc Merge bitcoin/bitcoin#34749: rpc: Refactor gettxspendingprevout to be easier to parse
fab5072ce13 ci: Remove vulture
56983a4d4d1 Merge bitcoin/bitcoin#34815: ci: bump cirruslabs actions versions
136132e075f Merge bitcoin/bitcoin#34776: guix: Make guix-clean more careful
d236415649e rpc: Refactor gettxspendingprevout to be easier to parse
e19df67332d Merge bitcoin/bitcoin#33144: build: Set AUTHOR_WARNING on warnings
ab642773757 Merge bitcoin/bitcoin#34708: validation: refactor: remove ConnectTrace
44ddc9c93f0 Merge bitcoin/bitcoin#31560: rpc: allow writing UTXO set to a named pipe
1a2f4e9750d Merge bitcoin/bitcoin#34814: lint: Temporarily revert to vulture==2.14
9a968ad35ef ci: bump cirruslabs actions versions
51a4dc5515f Merge bitcoin/bitcoin#34796: rpc, net: remove `startingheight` field of `getpeerinfo` RPC and from node state
2efb8c44bbf Merge bitcoin/bitcoin#34807: kernel: doc: explain return value for `btck_WriteBytes` callback
faae981d354 lint: Temporarily revert to vulture==2.14
9085dee476d qa: Add lock order annotation for TxMempool::cs
32325d17777 tests: Add test for mempool-invalid wallet tx
25e063d950a wallet: Add separate balance info for non-mempool wallet txs
ec4ec91d59b kernel: doc: explain return value for `btck_WriteBytes` callback
b19caeea098 doc: add release note for #31560 (named pipe support for `dumptxoutset` RPC)
e98d36715ea Merge bitcoin/bitcoin#34802: ci: Bump GHA actions versions
61a5460d0d6 test: add test for utxo-to-sqlite conversion using named pipe
2e8072edbeb rpc: support writing UTXO set dump (`dumptxoutset`) to a named pipe
745ad941ded p2p: remove m_starting_height field from node state (only show once in debug log)
b267efcdaf8 rpc, net: completely remove `startingheight` field of `getpeerinfo` RPC
fadaa7db335 ci: Bump GHA actions versions
ce6f1820910 Merge bitcoin/bitcoin#33902: doc: Document compiler configuration for native depends packages
e96d9e6492c Merge bitcoin/bitcoin#34389: net/log: standardize peer+addr log formatting via `LogPeer`
281c0cce73e Merge bitcoin/bitcoin#34301: wallet: remove outdated `RewriteDB` calls from SPKM & `DBErrors::NEED_REWRITE` enum value
524aa1e5331 Merge bitcoin/bitcoin#34576: threadpool: add ranged Submit overload
4c07cf87e22 doc: document depends compiler configuration
f25843d8ad0 Merge bitcoin/bitcoin#34441: ci: Allow running iwyu CI in worktree
fa4d5891b96 refactor: Introduce TxDocOptions
b8c84ec5a62 Merge bitcoin/bitcoin#34788: fuzz: register PeerManager in process_message(s)
fa8250e961c refactor: Add and use RPCResultOptions
d03e3be246f ci: check macos bundle structure and codesigning
66d80d57b48 macdeploy: use plugins dir to find plugins
ab137cbfe27 macdeploy: subprocess out to zip rather than shutil.make_archive
b62abc7eecb Merge bitcoin/bitcoin#34436: refactor: add overflow-safe `CeilDiv` helper and use it in unsigned callsites
7c214136162 Merge bitcoin/bitcoin#34755: depends: cleanup meta files
63f27721c2a Merge bitcoin/bitcoin#32985: wallet: Always rewrite tx records during migration
9df4f9d1003 Merge bitcoin/bitcoin#34472: bench: add script verification benchmark for P2TR key path spends
3201abe3eac Merge bitcoin/bitcoin#34359: test: add test for rebroadcast of transaction received via p2p
410f2a0d205 Merge bitcoin/bitcoin#33772: prevector: simplify operator==
3dcba2eff0f Merge bitcoin/bitcoin#26988: cli: rework -addrinfo cli to use addresses which aren’t filtered for quality/recency
af0da2fce21 crypto: Use `secure_allocator` for `AES256CBC*::iv`
d53852be316 crypto: Use `secure_allocator` for `AES256_ctx`
8c6fedaa818 build: `lockedpool.cpp` kernel -> crypto
51ac1abf6fd bench: Add wallet encryption benchmark
9a158725161 wallet: Make encryption derivation clock mockable
b97abdcdf13 Merge bitcoin/bitcoin#34766: Pre-31.x branching updates
ae5485fa0d2 refactor: Generalize derivation target calculation
eed31618937 Merge bitcoin/bitcoin#34792: clusterlin: update SFL comments for deterministic order
98fcd7af23f wallet: rpc: Improve error message for low feerates.
f3bf63ec4f0 kernel: acquire coinstats cursor and block info atomically
5e77072fa60 rpc: fix race condition in gettxoutsetinfo
730308386a4 Merge bitcoin/bitcoin#34696: Update embedded asmap to 1772726400 for v31
951863d022b Merge bitcoin/bitcoin#34769: doc: update http worker thread names
79571b91813 threadpool: add ranged Submit overload
fa270fdacf5 refactor: Return std::optional from GetProxy
faeac1a931e refactor: Return std::optional from GetNameProxy
d67c8ed7889 clusterlin: update SFL comments for deterministic order
0690a5d0f27 Update embedded asmap to 1772726400
20fb7618b00 args: make most ArgsManager members private
22b40f34f33 args: replace cs_args RecursiveMutex with Mutex
3a16ec8582b test: scope cs_args locks to avoid recursive locking
70b51fef7af args: eliminate all recursive locking of cs_args
7d61e03c701 args: extract lock-requiring internal helpers
f82d0767713 Merge bitcoin/bitcoin#34784: ci: use latest versions of lint deps
74f71c5054f Remove Taproot activation height
a9baf19172d Merge bitcoin/bitcoin#34789: doc: update build guides pre v31
48f26e2040c Merge bitcoin/bitcoin#34751: doc: Update asmap-data repository rule for file inclusion
6b20ad84e0a doc: update build guides pre v31
b5037688192 fuzz: register PeerManager in process_message(s)
195306c359f Merge bitcoin/bitcoin#34785: ci: remove TODOs from retry
ddf2a064deb Fix compatibility with `-debuglogfile` command-line option
c08f0c3c29b ci: remove TODOs from retry
9f3752c4377 ci: use latest versions of lint deps
544c15ff4e2 Merge bitcoin/bitcoin#34759: walletdb: hash pubkey/privkey in one shot to avoid leaking secret data
9aea2905fe2 Merge bitcoin/bitcoin#34783: depends: link to upstream qt issue
fadb77169be test: Scale feature_dbcrash.py timeout with factor
3a83715c2ad depends: link to upstream qt issue
8dcd79949f1 Merge bitcoin/bitcoin#34718: Release: 31.0 translations update
5f9068bdcd1 Merge bitcoin/bitcoin#34781: test: Remove fixed TODO in address_to_scriptpubkey
eeeeb2a0b90 fuzz: Use NodeClockContext
fa4fae6227a test: Add NodeClockContext
d21afb297cd qt: 31.0 translations update
fa0587a3064 test: Remove fixed TODO in address_to_scriptpubkey
46189fd5264 doc: update http worker thread names
be6d24ec22c guix: Make guix-clean less destructive
d3056bc149f Merge bitcoin/bitcoin#34606: doc: clarify swapping impact on IBD performance
f201ccc8003 Merge bitcoin/bitcoin#34673: contrib: Update fixed seeds pre-31.0
42f97c542db Merge bitcoin/bitcoin#34705: kernel: Use fs:: namespace and unicode path in kernel tests
7691e8a005a Merge bitcoin/bitcoin#34471: refactor: Use aliasing shared_ptr in Sock::Wait
49bd12bd890 Merge bitcoin/bitcoin#34693: doc: Use relative markdown links
aefa8e6d148 Merge bitcoin/bitcoin#34361: test: clean up tx resurrection (re-org) test in feature_block.py
3a222507fd4 Merge bitcoin/bitcoin#34037: wallet, doc: clarify the coin selection filters that enforce cluster count
69baddc9103 validation: do not add the snapshot block to candidates of bg chainstate
501a3dd4ad4 walletdb: hash pubkey/privkey in one shot to avoid leaking secret data
d198635fa2d Merge bitcoin/bitcoin#34677: kernel: Chainparams and headerssync updates pre-31.0
9833ef5f861 Merge bitcoin/bitcoin#34702: doc: Fix fee field in getblock RPC result
f2f0a0ca4cd Merge bitcoin/bitcoin#34700: script: Fix undefined behavior in Clone() -- std::transform writes past end of empty vector
8825051e084 refactor: improve benchmark setup and execution for various tests
83b8528ddb1 bench: add fluent API for untimed setup steps in `nanobench`
48b952cbb67 build: bump to 31.99
1b3d58f128a docs Remove 31.0 release notes fragments
b7cf2f87d0c docs: Update bips.md
c7a3ea24830 Merge bitcoin/bitcoin#34692: Bump dbcache to 1 GiB
8b70ed69960 Merge bitcoin/bitcoin#34521: validation: fix UB in `LoadChainTip`
0ebc6891e21 depends: delete Boost extra files
168997e9b57 depends: disable Qt sbom generation
f6d3201e141 Merge bitcoin/bitcoin#33929: test: Remove `system_tests/run_command` runtime dependencies
b5737b755de Merge bitcoin/bitcoin#34650: depends: Update Qt to version 6.8.3
c0802e20be2 Merge bitcoin/bitcoin#34734: test: Fix shutdown vptr race in BlockFilterIndexSync bench
2ac4f6e019b Merge bitcoin/bitcoin#34612: leveldb: remove unused files
d97df29d5d5 Merge bitcoin/bitcoin#34747: test: Sync mempools and wait for txospender index to be synced in rpc_gettxspendingprevout
c12be53f850 Merge bitcoin/bitcoin#34635: rpc, index: txospenderindex improve formatting, docs and test coverage
8bc62ce173d doc: Update asmap-data repository rule for file inclusion
57bfa864fe6 test: use static methods and clarify comment in addr_relay
7ee8c0abc62 test: protect outbound connection from eviction in getaddr_test
ecb5ce6e76e test: fix addr relay test silent pass and wrong peerinfo index
15c4889497b index: document TxoSpenderIndex::FindSpender
f8b9595aaa9 test: Add missing txospenderindex coverage in feature_init
9316d96240f test: sock: Enable socket pair tests on Windows
cbdb891de23 test: Wait for txospender index to be synced in rpc_gettxspendingprevout
2db5c049bb3 test: Sync mempools after tx creation in rpc_gettxspendingprevout
ca45461ddb2 Merge bitcoin/bitcoin#33986: doc: improvements to doc/descriptors.md
fc39a4f5686 Merge bitcoin/bitcoin#34713: depends: Allow building Qt packages after interruption
39668f1eebd contrib: Add bash completion for new bitcoin command
32debfa1ed8 fuzz: set whitelist permissions on connman target
a1074d852a7 index, rpc, test: Misc formatting fixes
7e91060ec77 Merge bitcoin/bitcoin#34733: subprocess: replace __USING_WINDOWS__ with WIN32
69b2c813f0e Merge bitcoin/bitcoin#34591: cmake: Improve `install_name_tool` workaround
2e041b4905a help: enrich help text for `-loadblock`
f2f56193606 Merge bitcoin/bitcoin#34709: wallet, test: improve wallet functional tests
2f8f2e90011 validation: remove ConnectTrace wrapper class
083242aac81 Merge bitcoin/bitcoin#34725: fuzz: assert we accept any PSBT serialization we create
20ae9b98eab Extend functional test for setBlockIndexCandidates UB
4c40a923f00 Merge bitcoin/bitcoin#34728: test: Fix intermittent issue in wallet_assumeutxo.py
854a6d5a9a0 validation: fix UB in LoadChainTip
fa79098ce2a test: Fix shutdown vptr race in BlockFilterIndexSync bench
9249e6089ec validation: remove LoadChainTip call from ActivateSnapshot
d76ec4de148 fuzz: make sure PSBT serialization roundtrips
faa68ed4bdc test: Fix intermittent issue in wallet_assumeutxo.py
bff8a7a80d2 subprocess: replace __USING_WINDOWS__ with WIN32
e09b81638ba Merge bitcoin/bitcoin#34219: psbt: validate pubkeys in MuSig2 pubnonce/partial sig deserialization
89386e700eb kernel: Use fs:: namespace and unicode path in kernel tests
2678abe902c prevector: simplify `operator==`
01dcb2fcc58 Merge bitcoin/bitcoin#34715: test: avoid interface_ipc.py race and null pointer dereference
dc109e1b343 Merge bitcoin/bitcoin#34706: doc: Improve dependencies.md IPC documentation
0a6724aaae9 doc: Update Windows build notes
473e5f8efcd qt: Add patch to fix SFINAE warnings in QAnyStringView with gcc16
3cb4d6066b8 qt: add patches to fix SFINAE errors/warnings with gcc16
d7e972a90d5 qt: add patch to fix build with gcc16
19693a8c914 depends: Update Qt to 6.8.3
c55584575a9 cmake: Fix `FindQt` module
2eaf701bc0d Merge bitcoin/bitcoin#34679: ci: Download script_assets_test.json for Windows CI
17a04039bc5 Merge bitcoin/bitcoin#34662: ci: use LLVM/Clang 22 in tidy job
5e35a9069d6 interpreter: remove clang-tidy suppression
4089682f5cf ci: use Clang 22 in tidy task
7ea076f996d tidy: remove deprecated header
eb17f29aa57 tidy: clang-tidy is required
bf9ef4f0433 Merge bitcoin/bitcoin#34422: Update libmultiprocess subtree to be more stable with rust IPC client
b83de7f28e7 validation: remove sentinel block from ConnectTrace
d8f4e7caf0d doc: add release notes
248c175e3dc test: ensure `ValidateInputsStandardness` optionally returns debug string
d2716e9e5bc policy: update `AreInputsStandard` to return error string
2702711c3a5 Merge bitcoin/bitcoin#34642: wallet: call SyncWithValidationInterfaceQueue after disconnecting chain notifications
1c1de334e9c test: avoid interface_ipc.py race and null pointer dereference
2a7a4f608a4 depends: Allow building Qt packages after interruption
6b0a980de94 Merge bitcoin/bitcoin#34410: test: let connections happen in any order in p2p_private_broadcast.py
a61907e5d9c doc: explain swapping in `reduce-memory.md`
5c005363a88 test: improve `wallet_backup` test
04d95157485 test: improve `wallet_assumeutxo` func test
b87a1c27c99 doc: Improve dependencies.md IPC documentation
f580cc7e9f2 doc: Fix `fee` field in `getb…
…h boost >= 1.91 550de8f multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) Pull request description: This effectively reverts cefda17 from PR #30194. That PR reduced the `multi_index` type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. ACKs for top commit: maflcko: review ACK 550de8f 🎶 hebasto: ACK 550de8f. w0xlt: ACK 550de8f Tree-SHA512: 883ee998efd16d944628653ca204e3d2acaf2554b2eced40556143a66d6072a3625861d961d1a4a194a7b8d4d448562581e5d11a09380754a5635a871d2a0aa1
…h boost >= 1.91 e2ac332 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields) Pull request description: This effectively reverts 9baf5a9 from PR #30194. That PR reduced the `multi_index` type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. ACKs for top commit: maflcko: review ACK e2ac332 🎶 hebasto: ACK e2ac332. w0xlt: ACK e2ac332 Tree-SHA512: 883ee998efd16d944628653ca204e3d2acaf2554b2eced40556143a66d6072a3625861d961d1a4a194a7b8d4d448562581e5d11a09380754a5635a871d2a0aa1
…h boost >= 1.91
0bc9d354dfd8074d1c36a891a69b6585a8775c65 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields)
Pull request description:
This effectively reverts a3cb309e7c31853f272bffaa65fb6ab0a7cc4083 from PR #30194.
That PR reduced the `multi_index` type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with.
The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define.
This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs.
ACKs for top commit:
maflcko:
review ACK 0bc9d354dfd8074d1c36a891a69b6585a8775c65 🎶
hebasto:
ACK 0bc9d354dfd8074d1c36a891a69b6585a8775c65.
w0xlt:
ACK 0bc9d354dfd8074d1c36a891a69b6585a8775c65
Tree-SHA512: 883ee998efd16d944628653ca204e3d2acaf2554b2eced40556143a66d6072a3625861d961d1a4a194a7b8d4d448562581e5d11a09380754a5635a871d2a0aa1
nixos-unstable ships boost 1.91, which breaks the multi_index type hiding used by Bitcoin Core (fixed upstream in bitcoin/bitcoin#35175). v29.4, v30.3 and v31.1 include the backported fix. No v28 release contains it, so v28 is removed.
The first macOS arm64 run failed to compile txmempool.h: with NO_DEPENDS=1 the job used Homebrew's Boost, now 1.92, and Boost 1.91 stopped accepting a struct derived from multi_index::indexed_by as an index list. Bitcoin Core fixed the source in bitcoin/bitcoin#35175; that backport is handled on its own. Build Boost and libevent with depends, natively for the runner, so the jobs compile against the versions qbit releases with. Homebrew now installs GNU Make 4 for depends instead of the two libraries. A step sets HOST and reads depends' own build id (packages, recipes and compilers), which keys an actions/cache of depends/built. It is saved once the toolchain file exists, even if the suites fail. After the build, a step requires that depends built that id and that CMake took the toolchain, libevent and Boost at boost.mk's version from it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This effectively reverts a3cb309 from PR #30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: #35175 Rebased-From: 0bc9d354dfd8074d1c36a891a69b6585a8775c65 (cherry picked from commit 9632450ff65c1fee29c2564a6ad64dfaad4d663c) Backport of bitcoin/bitcoin#35175. Co-authored-by: Cory Fields <[email protected]>
…d selection (#225) * crypto: vendor pinned mlkem-native without source changes Vendor mlkem-native v2.0.0 (d1b2fe782888bdb761a50336012923180be7f502): the whole upstream mlkem/ directory and LICENSE, byte for byte, in src/mlkem-native. Nothing compiles it yet. contrib/devtools/mlkem-native.pin records the commit, tag, the tree id of mlkem/ and the LICENSE blob id. contrib/devtools/update-mlkem-native.sh reproduces the tree from upstream and rewrites the pin from the fetched object ids. test/lint/mlkem-native-check.sh, run by the subtree lint, proves offline that HEAD still holds exactly the pinned tree. Lints that scan src/ ignore the vendored tree, and doc/subtrees/mlkem-native.md is the runbook. Part of #184 (part 3, #190, D1). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: share x86 feature primitives and detect usable AVX2 Move the XGETBV instruction out of sha256.cpp into compat/cpuid.h as XGetBV(), next to GetCPUID(). SHA256AutoDetect keeps its own selection logic unchanged; it calls the shared primitive only. Add compat/cpu_features.{h,cpp} with a standalone answer to "can this CPU and OS run AVX2 code": the supported leaves are queried first, XCR0 is read only once leaf 1 reports OSXSAVE and AVX, and AVX2 is usable only with XMM and YMM state enabled and the leaf 7 AVX2 bit set. Unlike the SHA256 logic it does not depend on SSE4 or SHA-NI. HasMlkemX86Native() adds the other extensions that mlkem-native's x86_64 assembly executes, found by auditing the assembled object: SSSE3, SSE4.1, POPCNT and BMI2. A virtual machine can show AVX2 while hiding those, and checking AVX2 alone would then end in SIGILL. Both checks detect once and cache the result, because the ML-KEM capability hook asks about a hundred times per operation. Non-x86 targets and compilers without <cpuid.h> report false. Part of #184 (part 3, #190, D2). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: require SSSE3 for the SSE4 and SHA-NI SHA256 paths SHA256AutoDetect selects the SSE4 code whenever CPUID leaf 1 reports SSE4.1, and only under that check also the 4-way SSE4.1 code and the SHA-NI code. All three execute SSSE3 instructions. An audit of the built objects finds pshufb and palignr in the SSE4 and SHA-NI code and pshufb in the 4-way code, besides SSE4.1's pinsrd, pextrd and pblendw; no SSE4.2 instruction occurs. A virtual machine can report SSE4.1 while masking SSSE3, and the self-test then dies with SIGILL at startup. Require SSSE3 as well. Under qemu-x86_64, -cpu Haswell,-ssse3 and the SHA-NI model EPYC,-ssse3 die with SIGILL before this change and select the standard implementation after it. Unmasked, Haswell still selects sse4, sse41 and avx2, and EPYC and Denverton x86_shani. This is an upstream Bitcoin Core bug, so the change is kept minimal enough to go upstream. Part of #184 (part 3, #190). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: add ML-KEM-1024 wrapper and runtime backend dispatch Build the vendored mlkem-native as ML-KEM-1024 into bitcoin_node only, behind a small C++ wrapper. Nothing in qbitd calls it yet. - src/crypto/mlkem_config.h configures the library (MLK_CONFIG_FILE): parameter set 1024, the qbit_mlkem1024 prefix, deterministic APIs only, zeroization through memory_cleanse, and a capability hook. - Native backends are chosen by qbit-owned backend headers instead of upstream's compile-time defaults, which enable x86_64 only for AVX2 compilers. No source is compiled with an ISA flag: every native entry point asks the hook, which reads only cached CPU detection and one atomic portable override. On x86_64 that detection requires every extension the assembly executes (AVX2, SSSE3, SSE4.1, POPCNT, BMI2), not only the AVX2 that upstream's capability name says. - Upstream's AArch64 single-lane Keccak entry point skips the hook, so the override could not reach it. qbit mirrors that header's dispatch glue with the check added; every other entry point checks itself. - mlkem::KeyGen, CheckPublicKey, Encaps and Decaps take fixed-size spans, map upstream's invalid-key results separately from internal failures, and clear their outputs on every failure. GetBackendNames() reports the implementation that runs. ForcePortableForTesting and InjectResultForTesting are test-only guards. - cmake/mlkem-native.cmake adds WITH_MLKEM_NATIVE=AUTO|ON|OFF and the configure summary line. The library gets core_interface's hardening flags but not qbit's C++ warnings, then APPEND_CPPFLAGS and APPEND_CFLAGS, so the MSan jobs' -U_FORTIFY_SOURCE applies to it as to the other C libraries. MSVC builds without assembly, MSan builds portable C, and AArch64 ELF targets build portable C because the upstream assembly has no BTI landing pads or GNU property note and would strip BTI/PAC marking from the binary (doc/subtrees has the evidence and the revisit trigger). ON fails where native is impossible. mlkem_tests covers NIST ACVP keygen, encapsulation, decapsulation and key checks, all 1040 C2SP CCTV modulus vectors and the 3328/3329 boundary, implicit rejection against an independent SHAKE256, injected failures, moves and wiping, and backend selection, each on the native backend and with portable C forced. ci/checks/test_mlkem_build_policy.py checks the WITH_MLKEM_NATIVE matrix, builds the library with each compiler found (core-checks requires the AArch64 cross compiler), and counts assembly calls to show that the portable override reaches every x86_64 routine. Part of #184 (part 3, #190, D3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fuzz: exercise ML-KEM validation and backend equivalence Add two fuzz targets over the mlkem:: wrapper: - mlkem: honest key generation, encapsulation and decapsulation agree; an arbitrary encapsulation key is accepted exactly when an independent modulus check passes, and a rejected one leaves no output; any ciphertext of the right length decapsulates to a secret that differs from the honest one (implicit rejection is never proof of validity); an arbitrary decapsulation key is rejected exactly when an independent SHA3-256 hash check fails, and the secret is then cleared. - mlkem_backend_diff: the detected backend and forced portable C give equal statuses and outputs for the same inputs, and the override is restored afterwards. Both honor MLKEM_FORCE_PORTABLE=1. They join the required qbit corpus with nine generated seeds each (CCTV modulus key and 3328/3329/4095 coefficients, NIST ACVP decapsulation vectors, a ciphertext bit flip). CI replays them a second time with MLKEM_FORCE_PORTABLE=1 and includes them in the mutation phase; the PQ CI contract test checks that wiring. UBSan's -fsanitize=integer checks are suppressed for the vendored tree, as for the other external libraries. Part of #184 (part 3, #190, D5). Co-Authored-By: Claude Opus 5.5 <[email protected]> * bench: measure ML-KEM operations by active backend Benchmark ML-KEM-1024 key generation, encapsulation and decapsulation twice each: on the detected backend and with portable C forced. Like the per-implementation SHA256 benchmarks, each is named after the backend that ran, so on an AVX2 host bench_qbit -filter='MLKEM.*' lists both, and the portable guard restores auto-detection afterwards. Part of #184 (part 3, #190, D5). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: add s390x and macOS arm64 PQ unit jobs Add two jobs to the PQ workflow, selectable by name like aarch64-unit: - s390x-unit cross-compiles only test_bitcoin for big-endian s390x on the x64 runner, with Ubuntu's g++-s390x-linux-gnu and the depends tree, and runs the suites through ctest with qemu-s390x as the crosscompiling emulator, so only the tests run emulated. It stays out of the merge gate. Its timeout is 180 minutes until runs are measured. - macos-arm64-unit runs natively on a GitHub-hosted macos-14 runner without Docker, asserts that uname -m is arm64, and shares the unit job's source checks and evidence report through YAML anchors. It is the job that runs native AArch64 ML-KEM, and configures with WITH_MLKEM_NATIVE=ON so that losing native code fails it. All three jobs now expect mlkem_tests besides bip324_tests and net_tests (CTEST_REGEX ^(mlkem_tests|bip324_tests|net_tests)$), and report the suites through ctest_evidence.py. The aarch64 job's description says that ML-KEM runs portable C on AArch64 Linux. The PQ CI contract test covers selecting each job, the s390x cross and emulator settings, the macOS architecture check and report, and that every expression uses a context GitHub makes available there (no runner in job env, no matrix in a job without one), which GitHub enforces when loading the file. Part of #184 (part 3, #190, C2 and the CI part of D3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: gate ML-KEM and transport changes on the aarch64 PQ job The merge-profile classifier gains a pq_aarch64_required output, true when a change touches the ML-KEM library (src/mlkem-native, src/crypto/mlkem*, cmake/mlkem-native.cmake), the v2 transport (src/bip324*, src/net.h, src/net.cpp), the CPU feature checks, the PQ workflow or its env files, or the PQ test suites and vectors. A path it cannot read also requires the job. Full Validation calls ci-pq.yml with jobs: aarch64-unit on the change itself (a pull request's merge commit) when the output is true. The gate accepts a skipped job only when the classifier says it is not required; a required job that was skipped, failed or cancelled, or a missing or unreadable classifier output, fails it. The changed-file lists that feed the classifier, in Full Validation and in the Required Merge Gate, use --no-renames, so moving a file out of a gated path still names it. ci/checks/test_pq_merge_gate_contract.py runs the real classifier, job condition, ci-pq selection step and gate script: a pull request touching src/bip324.cpp requires and runs the job, while docs-only and other source pull requests skip it and pass, and a rename out of a gated path still requires it. The Required Merge Gate runs it with the other PQ CI contracts. Part of #184 (part 3, #190, C3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: run the PQ macOS arm64 job on macos-15 GitHub is retiring the macos-14 runner image: brownouts start on 2026-10-05 and the image is removed on 2026-11-02. Move the macos-arm64-unit job to macos-15, which is also Apple Silicon. Co-Authored-By: Claude Opus 5.5 <[email protected]> * build: probe the ML-KEM target with the appended flags APPEND_CPPFLAGS and APPEND_CFLAGS reach mlkem_native's C and assembly compiles, but the architecture probes ran without them. A build that appends a target-changing flag such as -m32 was detected as x86_64, enabled the native backend, and then failed in mlkem_config.h. Run the probes with the appended flags, and probe afresh on every configure, since those flags may change between configures. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: require the macOS arm64 and x86_64 PQ jobs on PQ changes No pull request ever built or ran ML-KEM's native code on macOS: the macos-arm64-unit job could only be dispatched, and nothing ran the x86_64 native code on an Intel Mac at all. Apple Silicon and Intel macOS are release targets with native code enabled. ci-pq.yml gains a macos-x86_64-unit job on GitHub's Intel image (macos-15-intel), sharing every step with macos-arm64-unit. Both build with WITH_MLKEM_NATIVE=ON, check the runner's architecture, and after the suites pass require the native backend by name from mlkem_tests/backend_selection, so a runner whose CPU lacks an extension cannot pass on portable C. Full Validation's PQ job, renamed pq-unit, now calls ci-pq.yml with aarch64-unit, macos-arm64-unit and macos-x86_64-unit, so all three are required exactly when the classifier says the change needs them. The classifier output is renamed pq_unit_required to match. On-demand runs accept the new job name; an empty jobs input runs it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: check the portable override on AArch64 and per entry point The build-policy test counted assembly calls only for the x86_64 backend, so nothing in CI showed that the portable override reaches every AArch64 assembly routine. With upstream's x1 Keccak glue in place of qbit's mirror, 221 assembly calls ran with portable C forced, and every test passed: outputs agree, and the backend name comes from the hook. The counting harness now also runs on AArch64: a static binary built with aarch64-linux-gnu-g++, from a copy of mlkem_config.h without the AArch64 ELF refusal, and run under qemu-aarch64. A negative control builds upstream's x1 glue and requires the leaked calls to show. Each entry point also runs alone on a new thread while portable C is forced, and must make no assembly call: one that skipped BeginOperation() would run on the new thread's stale copy of the override. The earlier round trip could not show this, since KeyGen set the copy for the whole thread. The build smoke job installs g++-aarch64-linux-gnu and qemu-user and lists them as required, so the AArch64 case cannot skip. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: cover each ML-KEM entry point's override and its per-thread copy Two wrapper mutations passed every test. An entry point without BeginOperation() went unnoticed because ForEachBackend calls GetBackendNames() on the same thread first, which takes the override for it. A shared (not thread_local) copy of the override went unnoticed because only one thread ran operations. every_entry_point_takes_the_override runs each entry point alone on a new thread with portable C forced, then asks the capability hooks what that thread's copy says. override_copy_is_per_thread lets one thread take the override set while another holds it unset, and checks that the first thread's copy did not change. override_changed_by_another_thread now runs operations on two threads at once, so a shared copy also gives wrong outputs on x86_64 and a data race under ThreadSanitizer. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fuzz: check that the ML-KEM portable replay runs portable C CI replays the mlkem and mlkem_backend_diff targets a second time with MLKEM_FORCE_PORTABLE=1, but nothing checked that the binary honored it: any other value, such as "true", silently selected native code, and the second replay would have repeated the first. Initialize now refuses any value but unset, empty, 0 or 1, prints the active backend once, and aborts when MLKEM_FORCE_PORTABLE=1 but the active backend is not portable/portable. A host without native code also shows in the log, where mlkem_backend_diff compares portable C with itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: cover SHA256's SSSE3 requirement with synthetic CPUs SHA256AutoDetect requires SSSE3 besides SSE4.1 before it selects its SSE4, SSE4.1 or SHA-NI code, all of which execute SSSE3 instructions. Nothing tested that: dropping the SSSE3 term passed every test, because real SSE4.1 hardware always has SSSE3. An overload of SHA256AutoDetect takes the CPUID and XGETBV functions, as cpu_features::DetectX86Features does, and the existing one passes the real ones, so the queries and the selection are unchanged. A cpu_features_tests case runs it on synthetic CPUs derived from this one: unmasked it selects what this CPU gets, and with SSSE3 or SSE4.1 masked the standard code. Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: say exactly where ML-KEM native code runs The wrapper's header said native code runs on "x86_64 with AVX2, AArch64", and the WITH_MLKEM_NATIVE help text spoke of "the x86_64 and AArch64 ML-KEM assembly". AArch64 runs native code only on macOS (AArch64 ELF builds stay portable to keep their BTI and PAC marking), and x86_64 also needs SSSE3, SSE4.1, POPCNT and BMI2, as cpu_features::HasMlkemX86Native checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: keep the clone unshallow when vendoring mlkem-native update-mlkem-native.sh fetched the upstream release with --depth=1 into the qbit repository itself. That writes .git/shallow, so a full clone then reported itself as shallow to git and every tool that asks. Fetch into a temporary bare repository instead, and read the commit, the object ids and the archive from there. Staging and the byte-for-byte check still run in the qbit repository. Re-vendoring v2.0.0 by tag and by commit leaves no diff, and the clone stays complete. Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: record the local x86_64 GNU property evidence for mlkem-native #190 asks for ELF property evidence that linking the x86_64 assembly keeps the CET marking. Record what a local Ubuntu build shows: the assembly and C objects and the test_qbit and fuzz binaries that link the native backend all carry IBT and SHSTK, the binaries need only baseline x86-64, and the assembly loses its note only when built with -fcf-protection=none. The Guix release evidence is still outstanding and is required before the post-quantum feature branch merges into 1.x.x. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: name the ML-KEM entry point instead of capturing a binding every_entry_point_takes_the_override captured a structured binding in the thread's lambda, which compilers accept only from C++20 (P1091R3, P1381R1). Bind the label and the entry point to ordinary variables, so the test does not depend on that support. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: build the macOS PQ jobs' Boost and libevent through depends The first macOS arm64 run failed to compile txmempool.h: with NO_DEPENDS=1 the job used Homebrew's Boost, now 1.92, and Boost 1.91 stopped accepting a struct derived from multi_index::indexed_by as an index list. Bitcoin Core fixed the source in bitcoin/bitcoin#35175; that backport is handled on its own. Build Boost and libevent with depends, natively for the runner, so the jobs compile against the versions qbit releases with. Homebrew now installs GNU Make 4 for depends instead of the two libraries. A step sets HOST and reads depends' own build id (packages, recipes and compilers), which keys an actions/cache of depends/built. It is saved once the toolchain file exists, even if the suites fail. After the build, a step requires that depends built that id and that CMake took the toolchain, libevent and Boost at boost.mk's version from it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Backport of bitcoin/bitcoin#35175 (Cory Fields, upstream commit 0bc9d354dfd8). Boost 1.91 made multi_index's indexed_by an Mp11 list, and an index specifier list must now be an indexed_by<...> itself. A struct that inherits from indexed_by no longer passes is_index_list, so with Boost 1.91 or later (current Homebrew ships 1.92) txmempool.h, node/miner.h and txrequest.cpp stop compiling. Defining BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT does not help. As upstream did, pass indexed_by directly to multi_index_container instead of inheriting from it. This works with every Boost version. Builds against Boost < 1.91 get the longer type names back in diagnostics and symbols; the container types and behaviour are unchanged. Adapted to this tree: upstream's txorphanage.cpp hunk has no counterpart here (the orphanage has no multi_index), and node/miner.h still carries CTxMemPoolModifiedEntry_Indices, which gets the same treatment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* ci: run pull request and push validation for feature/pq-transport feature/pq-transport collects the #184 hybrid post-quantum transport work before it goes to 1.x.x. Add it to the branch lists of Full Validation, Core Checks and the Required Merge Gate, so pull requests into it and merges to it get the same validation as 1.x.x. Remove the entry when the branch merges into 1.x.x. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: build pull request RPC docs from the event commit (#228) The pull request build of the development RPC docs checked out refs/pull/<n>/merge and then required it to be the event's merge commit. That ref moves whenever the base branch or the pull request's stack changes, so a run that overlapped such a change checked out a different merge commit and failed "Validate version source checkout". Check out the event's merge commit by hash instead, as the release entries already do, and drop the now unused --development-checkout-ref plumbing. Co-authored-by: Claude Opus 5.5 <[email protected]> * i2p: request post-quantum leasesets (6,4) and retry once with 4,0 on explicit rejection (#223) * net: support bounded interruptible SAM session creation Proxy::Connect() waits up to -timeout for a connection and does not watch any interrupt, so a caller that has to finish several dependent steps by one deadline, and stop promptly on shutdown, cannot use it. Add a Proxy::Connect(deadline, interrupt) overload for that. It waits for the connection in slices of at most MAX_CONNECT_POLL_INTERVAL (100 ms), rechecking the interrupt and the deadline between them, and creates no socket if either is already over. It does not use nConnectTimeout; callers cap the deadline as they need. Proxy::Connect() and ConnectDirectly() behave as before. The new netbase tests use a socket whose connect stays in progress to check that the overload connects, gives up at the deadline rather than at -timeout, notices an interrupt within one slice, never waits longer than a slice, and that the existing overload still waits once for -timeout. TCP and Unix socket proxies are both covered. Part of #185. Co-Authored-By: Claude Opus 5.5 <[email protected]> * i2p: prefer hybrid leasesets and retry explicit router rejection once Backport Bitcoin Core #35696: ask the SAM router for the post-quantum hybrid leaseset encryption type, i2cp.leaseSetEncType=6,4 (MLKEM768-X25519, then ECIES-X25519), instead of 4,0, for persistent and transient sessions. Java I2P 2.10.0 or newer and i2pd 2.58.0 or newer built with OpenSSL 3.5 or newer use it; other i2pd versions ignore it. Java I2P older than 2.10.0 fails the session instead. qbit-only, as upstream has no retry: on an explicit rejection of 6,4, a well-formed SESSION STATUS whose RESULT is present, not OK and not one of DUPLICATED_ID, DUPLICATED_DEST, INVALID_ID or INVALID_KEY, close that control socket and retry once on a fresh connection with a fresh HELLO and session id, keeping the persistent destination, with 4,0. A SAM reply with RESULT=TIMEOUT is such a rejection and is retried. No reply (a timeout waiting for one, EOF, a socket error), a malformed reply, a missing RESULT or a lost success reply is never retried. The original rejection is logged at debug level with RESULT and a sanitized MESSAGE capped at 200 characters. m_session_id and m_control_sock are set only on success. Only a rejection whose MESSAGE names the encryption type is evidence that the router lacks 6,4. Java I2P 2.9.0 replies "... Failed to build tunnels - ...: Unsupported crypto type: 6". The MESSAGE, parsed like the logged one but before it is sanitized or capped, names the type if it contains "crypto type", "encryption type", "enc type" or "enctype", ASCII case-insensitively. A process-lifetime, mutex-protected record per router (its TCP endpoint or Unix socket path), shared by all sessions, counts the sessions in a row in which the router rejected 6,4 naming the encryption type and accepted 4,0. After two, later sessions through it start with 4,0 and never retry, until qbit restarts. A session created with 6,4 starts the count anew, so one transient rejection does not turn 6,4 off, and a failed retry counts for nothing. The record keeps at most 64 routers and forgets the least recently updated one. At the first such session through a router, this is logged once at warning level, with RESULT shown only if it is one of the SAM protocol's RESULT values, otherwise "other": I2P: the router rejected leaseSetEncType=6,4 (RESULT=I2P_ERROR) and accepted 4,0, so this session has no post-quantum leaseset. Java I2P older than 2.10.0 does this; upgrade the router to get it. An info line says when later sessions through the router start using 4,0 until qbit restarts. A rejection that does not name the encryption type, such as a passing failure to build tunnels, RESULT=TIMEOUT or CANT_REACH_PEER, is retried the same way but is no evidence either way: it neither counts nor starts the count anew, and does not warn. One info line says that the session uses 4,0 because of that rejection, with RESULT shown as in the warning and the sanitized MESSAGE, and that the next session asks for 6,4 again. Session creation now has one deadline, SAM_CREATE_TIMEOUT (180 s), over connecting, HELLO, the optional DEST GENERATE and both SESSION CREATE attempts, through new Hello() and SendRequestAndGetReply() overloads that take it. Each connect uses Proxy::Connect(deadline, interrupt), capped by -timeout as before, so shutdown interrupts it promptly. Other SAM requests behave as before. Session constructors take an optional creation timeout for tests. An unexpected reply to SESSION CREATE is now reported with the sanitized request, "SESSION CREATE ...", instead of the raw one, which carried the private key. The new i2p tests use a recording mock SAM router to cover creation with 6,4, the retry, the two-sessions-in-a-row rule and its reset, rejections that name the encryption type (with the reply of Java I2P 2.9.0) and ones that do not, which are retried but neutral, the phrase matching, the bounded record, sessions through a remembered router including concurrent ones, rejections that are not retried, a failing retry, transport failures and lost replies, interruption during reconnect, HELLO and CREATE, an exhausted deadline across steps, during DEST GENERATE and while connecting, the -timeout cap on connecting, and that the persistent private key is never logged. Deadline checks use the timeouts the mock router saw rather than wall-clock margins. Tests and the i2p fuzz target forget the router record between runs. The existing tests are unchanged. Part of #185. Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: document I2P hybrid router requirements and compatibility retry State in i2p.md which routers use the post-quantum leaseset type that qbit now asks for, that Java I2P older than 2.10.0 rejects it naming the encryption type, and how qbit retries once with 4,0 and warns at the first such session through a router. After two such sessions in a row, qbit uses 4,0 with that router until qbit restarts; a session that gets the post-quantum type starts the count anew. Other rejections, a SAM RESULT=TIMEOUT reply among them, are retried but neither count nor warn. Tell users to restart qbit after upgrading the router. Note that the retry is qbit-only, that no reply from the router is not retried, and the single 3-minute limit on creating a session. Add a release-note fragment, to be renamed to the pull request number. Part of #185. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * bench: bound the Cadence benchmark chain without -asymptote (#229) StarvationDistance() cast nanobench's complexityN() to size_t. It is -1 unless -asymptote sets it, so a plain bench_qbit run (including ctest's bench_sanity_check) built a header chain of about 2^64 blocks and grew until the host ran out of memory: 27 GiB before it was killed. Use complexityN() only when -asymptote sets it to at least 1, and default to 10,000 legacy blocks since the last AuxPoW block otherwise. Both Cadence benchmarks now run in about 17 MB. Co-authored-by: Claude Opus 5.5 <[email protected]> * multi_index: fix compilation failure with boost >= 1.91 (#237) This effectively reverts a3cb309e7c31853f272bffaa65fb6ab0a7cc4083 from PR #30194. That PR reduced the multi_index type signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with. The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide compatibility with removed features, but it does not work for this case. Using `indexed_by` directly when defining the `multi_index` (as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define. This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs. Github-Pull: #35175 Rebased-From: 0bc9d354dfd8074d1c36a891a69b6585a8775c65 (cherry picked from commit 9632450ff65c1fee29c2564a6ad64dfaad4d663c) Backport of bitcoin/bitcoin#35175. Co-authored-by: Cory Fields <[email protected]> * ci: wait for a newer run instead of failing on an earlier one's result (#231) * ci: wait for a newer run instead of failing on an earlier one's result The Required Merge Gate reads the newest check run of each required name on the commit. When CI runs again on the same commit (a re-run, a reopened pull request, a label), the gate starts within seconds, before the new workflows have created their own gate checks. It then found the previous run's result and, if that run had been cancelled or failed, failed at once, although the new run was still on its way. PR #229's gate failed this way three seconds after a reopen. Treat a check that concluded other than success before this gate run started as pending: it belongs to an earlier run, and a newer one may not have reported yet. The gate keeps polling and fails, with the reason named, only if no newer result arrives before its deadline. A failure after the gate run started still fails at once, and an earlier success still counts, as a label starts no new Core Checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: date the merge gate from its workflow run, not its step The gate step starts only after the jobs it needs, so a check from the current run can fail before the step's own start time and be taken for an earlier run's result, making the gate wait out its deadline instead of failing at once. Read this run attempt's run_started_at from the API instead, and only when checks are polled, so profiles that poll nothing still make no API calls. If it can't be read, fall back to the step's start with a warning. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: never take a cancelled check as the merge gate's verdict A newer push, reopen or label cancels the running Full Validation (cancel-in-progress), and that cancellation can complete after this gate run started, so the run-start cutoff alone took it for a current failure. A cancelled check means superseded or never run, so treat it as pending and wait for the run that replaces it; the gate still fails at its deadline if none arrives. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: let the merge gate read its run attempt's start time Getting a workflow run attempt needs Actions: read, and the workflow grants only contents and checks, so the start-time lookup always fell back to the step's own start. Grant actions: read, and pin it in the poller contract test. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: start Core Checks on every event that starts the merge gate The gate now waits for a newer Core Checks Gate instead of trusting an earlier failure, but Core Checks ran only on opened, synchronize and reopened, so a label, unlabel or ready-for-review event left the gate waiting out its deadline for a run that could not start. Give Core Checks the same pull_request activity types as the gate and Full Validation, and pin that in the poller contract test. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: tell the merge gate's checks apart by the event that started them The gate waited on a check that failed before its own run started, taking it for an earlier run's result. A time cutoff cannot tell the two apart: Core Checks, Full Validation and the gate are separate workflows, so this event's check can fail before the gate's run starts, an earlier event's can fail or be cancelled after it, and re-running the gate alone moves its start but starts nothing else. Date each failed check by its event instead. Every workflow run an event starts is created at that event, and a re-run keeps the run, its check suite and its created_at. The gate maps a failed check's check suite to its workflow run (GET /actions/runs?check_suite_id=) and compares that run's created_at with its own run's (GET /actions/runs/{run_id}), allowing 60 seconds between one event's runs. - An earlier event's failure is waited on until a newer run reports. - A failure from this event or a later one fails at once, including after a gate-only re-run. - A success counts whichever event produced it, and a cancellation is never a verdict; neither needs a lookup. - If either run can't be read after the usual retries, the gate fails closed under its own error title. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: let the newest event's check decide, not the newest-started one The gate judged only the newest check run of each required name by started_at. A manual re-run of an earlier event's workflow starts later than this event's check, so it hid this event's result: a failed old re-run was taken as an earlier event's failure and waited on, poll after poll, until the deadline, even with this event's success already on the commit. Read every check run of the name instead. When they come from more than one workflow run and not all of them succeeded, map each check suite to its workflow run (cached per suite) and let the newest workflow run's check decide, by created_at, then run_number for runs created in the same second, then started_at for its attempts. - An earlier event's re-run never outranks this or a later event's result, whether it failed, passed, was cancelled or is still running. - Attempts within one workflow run still rank by started_at alone, and a check whose runs all succeeded passes, both without a lookup. - If the runs to rank can't be read, or a check run names no check suite, the gate fails closed under its "could not correlate" title. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: tell close events apart by a newer run of the check's workflow The gate took any failure whose workflow run was created within 60 s of its own as this event's. Two events that close together (a label, then an unlabel or a reopen) made the second gate fail at once on the first event's result. That is the usual case, not an edge one: the newer event cancels the earlier event's Core Checks and Full Validation, and their if: always() gate jobs then conclude failure (7 of 8 cancelled Core Checks runs sampled here did), after the newer event has started. GitHub's REST API names no event on a workflow run, check suite or check run, so there is no marker to compare. It does give each workflow's runs a run_number that grows with every new run and is kept by re-runs. Before failing at once, the gate now lists the check's workflow's runs on the commit (GET /actions/workflows/{id}/runs ?head_sha=): if one has a higher run_number, an event since has started the run that replaces this one, and the failure is waited on. That tells events apart at any spacing, even within the same second. Tighten the allowance from 60 s to 10 s. Across 325 pull request events on this repository (June to October 2026), one event's runs were created within 4 s of each other, and the gate's up to 3 s after another's, so exact equality would misdate a current failure; the closest two events on one commit were 28 s apart. - A current failure with no newer run of its workflow still fails at once, including after a gate-only re-run. - A current failure whose workflow already has a newer run, from a later event, is waited on, and that run's result decides. - A newer run, once listed, is cached; a listing that can't be read, or lacks the check's own run, fails closed. - Left open: two events within 10 s where the earlier one's check fails and the later one's run is not yet listed when the gate judges it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * test, ci: foundations for hybrid v2 transport (Python ML-KEM, qbit releases, v1.0.0 interop, PQ CI, canary tools) (#224) * test: add an independent ML-KEM-1024 Python reference Add test_framework/crypto/mlkem.py, a pure-Python FIPS 203 ML-KEM-1024 written from the standard and independent of the C library: KeyGen from a 64-byte d || z seed, Encaps from a 32-byte m, Decaps with implicit rejection, and the section 7.2 (length and modulus) and 7.3 (length and hash) input checks. Hashing uses hashlib's SHA3 and SHAKE only. TestMLKEM1024, registered in feature_framework_unit_tests.py, checks: - NIST ACVP-Server ML-KEM-1024 keyGen and encapsulation vectors (exact ek, dk, ct and shared secret); - ACVP decapsulation vectors, including modified ciphertexts whose expected secret is the implicit-rejection value J(z || ct); - ACVP encapsulationKeyCheck vectors: valid keys pass the section 7.2 check and encapsulate, the others are rejected; - C2SP CCTV modulus vectors (q and 4095 at the first and last coefficient of every polynomial, plus a sample of the full run), each rejected, and accepted once the bad coefficient is set to 3328; - round trips, implicit rejection on corrupted ciphertexts, and input size and hash checks. mlkem1024_test_vectors.txt holds the subset with its sources and pinned commits in a header comment. The new tests take about 0.07 s; the whole feature_framework_unit_tests.py run about 4 s. Part of #184 (part 2, #186, work item B2). Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: identify qbit releases independently of Core versions Let functional tests download and run qbit release binaries the way they run Bitcoin Core releases, starting with v1.0.0. get_previous_releases.py resolves each tag through resolve_download(). qbit tags come from explicit descriptors: the GitHub release URL, the archive per host (the "-unsigned" tarballs on macOS, whose -unsigned.zip holds only the GUI app, and the "-unsigned" zip on win64), the archive root and each archive's SHA256 copied from the release's SHA256SUMS. Unsigned arm64 macOS binaries are self-signed as old Core ones are. A host without a qbit archive fails with a message instead of a guessed download. Bitcoin Core URLs, archives, hashes and messages are unchanged, and qbit tags join the default download list, so the previous-releases and Windows jobs fetch v1.0.0. The test framework maps client versions through explicit ReleaseInfo metadata (test_node.py): 10000 is qbit v1.0.0, based on Core v30.2 (core_compat_version 300200), with qbitd/qbit-cli binary names. A version from 140000 (Core v0.14) up is the Core release it names, as before; any lower version not in QBIT_RELEASES is an unknown qbit release and raises, instead of being read as a Core version. version_is_at_least() compares core_compat_version, so v1.0.0 nodes get -v2transport and the logging options, and qbit_version_is_at_least() gates qbit-only options: -p2mronly=0 now reaches qbit releases that have it, and supports_v2_pq marks which nodes may get -v2pqtransport. tool_qbit_release_resolution.py (qbit_release_resolution) checks v1.0.0 on every published host triple including win64 against a verbatim copy of SHA256SUMS, the Core mappings, the rejection of unknown qbit versions, and the options a v1.0.0, Core and current node get. It needs no downloads, so it runs in every functional job, Linux and Windows. Part of #184 (part 2, #186, work item B1). Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: baseline v1.0.0 v2 transport interoperability Add p2p_v2_previous_release.py, which pins how the qbit v1.0.0 release binary treats non-empty BIP324 version-packet contents, where the hybrid post-quantum handshake (#184) will carry its ML-KEM-1024 key and ciphertext. It drives a BIP324 peer on a plain socket, so it controls every byte and pause, against v1.0.0 in both roles: - test_version_contents: with 0, 1,572 and 65,000 bytes of contents, and with record-shaped contents (CompactSize(len) || header || payload): one 0xF0 record exactly as the hybrid offer and accept carry it (fd 21 06 f0 || 1,568 bytes), a 0xF0 record followed by an unknown 0xF1 record, and a single 65,000-byte record, each sent after three decoy packets, both immediately and after a 10 s pause under the default 60 s -peertimeout, v1.0.0 completes the handshake, exchanges version/verack and ping/pong, sends empty contents itself, and reports the plain BIP324 session id. As initiator it sends its version packet and VERSION message before receiving ours. - test_limits: v1.0.0 keeps a connection whose packet length is exactly MAX_CONTENTS_LEN (4,000,013), drops one at 4,000,014 bytes at once ("packet too large"), and drops a handshake stalled after the keys at -peertimeout ("V2 handshake timeout"), within a bounded time. The test skips without previous releases and runs in the previous-releases job, which downloads v1.0.0 since the previous commit. It takes about 24 s. Part of #184 (part 2, #186, work item B3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: add reusable maintained-branch validation entry points Add .github/workflows/ci-pq.yml, one reusable workflow for the post-quantum transport jobs, and make ci-nightly-heavy.yml callable and job-selectable, so main's callers (C4), on a schedule and on demand, can run either against a recorded commit. GitHub dispatches only workflows whose file is on the default branch, so on-demand PQ runs go through C4's caller on main (workflow_dispatch with source_ref and jobs, calling [email protected]), available after this part merges; ci-pq.yml keeps its own workflow_dispatch trigger for when it is on main. ci-nightly-heavy.yml is already on main, so it can also be dispatched on a branch directly. ci-pq.yml runs on workflow_call and workflow_dispatch with two inputs: - source_ref: resolved once by the resolve-source job to a full commit (empty: the triggering commit; a branch or tag, looked up on the remote with annotated tags peeled; or a full hash). A missing, ambiguous or malformed ref fails the run. Every job checks out that commit, verifies HEAD against it, and the summaries record it. - jobs: a comma-separated allowlist; empty runs all jobs, and an unknown, repeated or empty name fails the run. The resolve-source job emits the matrix, since a job-level if cannot see matrix values. Its first job, aarch64-unit, runs on GitHub's ubuntu-24.04-arm runner with the public-runner environment (docker.io/library images, CI_ENFORCE_INTERNAL_REGISTRY=0, public DNS, no tailnet search domains), builds only test_bitcoin and runs bip324_tests and net_tests (ci/test/00_setup_env_native_aarch64_pq.sh). Its summary shows the source commit, labels this the pre-library phase, and lists both suites with their results. ci/test/03_test_script.sh: - CI_BUILD_TARGET (default all) selects the target of the build and of its verbose retry; GOAL's install/deploy targets apply to full builds; - CTEST_REGEX selects tests by name and is rejected together with CTEST_INCLUDE_RANGE; - ctest runs with --no-tests=error, lists the selected tests first and writes JUnit results; when CTEST_EXPECTED_SUITES is set, ci/checks/ctest_evidence.py fails the job unless every expected suite was selected, executed and passed (ctest itself passes a skipped suite, for example one compiled out). ci-nightly-heavy.yml gains workflow_call inputs mirroring workflow_dispatch (choices become strings, which run-scanners.py validates), an optional LIBBITCOINPQC_READ_TOKEN secret, and a jobs input over arm32-unit-1, arm32-unit-2, previous-releases, fuzz and scanner. The matrix entries are unchanged and now come from resolve-source. A called run gets its caller's github context, so github.event_name, github.ref and github.sha are main's and cannot choose what a called run validates. Only workflow_call takes a source_ref input (default 1.x.x, must not be empty), and a non-empty source_ref marks a run as called: - a called run resolves source_ref once, with the same function as ci-pq.yml (which the contract test keeps identical), never reads github.ref or github.sha, and records source_mode maintained when source_ref names 1.x.x and requested otherwise; it honors run_test_matrix, run_scanners, the scanner settings and jobs whatever its caller's event; - a direct scheduled run still resolves 1.x.x and follows the CI_NIGHTLY_HEAVY_RUN_* variables and scheduled defaults, and a direct dispatch keeps its selected ref and event commit; - a first step fails the run when source_ref disagrees with GitHub's job.workflow_ref, for example a caller that passes an empty source_ref, and skips that check, saying so in its summary, where job.workflow_ref is unavailable; - a called run's concurrency group names its caller's event and source_ref, so callers for different sources, and an on-demand call beside the scheduled one, never cancel each other; - the summaries record the source_ref input and source_mode. ci/checks/test_ci_pq_contract.py executes the workflows' inline steps and the 03_test_script.sh blocks against git fixtures and stub cmake/ctest: job selection, rejection of unknown jobs, an immutable source commit, suites that really ran, and called and direct nightly runs with their concurrency groups. The shared expression evaluator follows GitHub's loose equality and supports format() and toJSON(). test_scheduled_validation_contract.py reads the nightly matrix from its new catalog. Both now run in required CI: the Required Merge Gate's classify-changes job (.github/workflows/required-merge-gate.yml) gains one step that runs them, beside the classifier contract. Part of #184 (part 2, #186, work item C1). Co-Authored-By: Claude Opus 5.5 <[email protected]> * tools: add PQ canary sampling and evidence evaluation Scripted evidence for the mainnet canary of the hybrid post-quantum v2 transport (#184, R5), ready before the 14-day R0 baseline starts on v1.0.0 nodes. Everything lives in contrib/pq-canary/. pq-canary-sample.sh runs every 5 minutes from cron or a systemd timer on each canary node and the control node. Through qbit-cli it appends one row to samples.csv: time, host label, uptime, version; enabled, instance_id, backends, since, every per-direction handshake counter, load_shedding.active and each ring's last_sequence and dropped from getpqtransportinfo; connections_in and connections_pq; and, on the pool node (--pinned), the pinned archive node's getpeerinfo connection_type, transport_pq and transport_pq_status. sample_ok is 1 only when uptime, getnetworkinfo and, on the pool node, getpeerinfo answered. A failed call or a missing field is NA, never 0, and a real 0 stays 0, so a v1.0.0 node writes NA for the new fields with sample_ok=1. The raw recent_failures and fallback_set go to failures.jsonl, which keeps its addresses between the team's canary nodes. --pinned and --host are validated. pq_canary.py holds the format shared with the evaluator. pq-canary-eval.py prints each figure with its sample count, coverage and pass, fail or unknown: the pinned link manual and hybrid in at least 99% of samples excluding restarts (with the disconnectnode remedy when an automatic connection holds the address); no malformed_record, first_packet_failed or fallback entry between known-good endpoints, on every monitored canary node (one node's failures file cannot pass it); closed_after_switch entries between them, listed for triage; and the archive node's connections_in within +-20% of the control's, relative to their baseline ratio, per UTC day, excluding 48 hours after a restart. A jump in boot time is a restart gap. A ring that wrapped stays judged while the entries read continue from the last sequence processed; only a wrap that evicted unread entries, a changed instance_id or an inconsistent ring makes that ring's interval unknown. A figure, node or day below --min-coverage (default 90% of the expected 5-minute samples) is unknown, not judged, and every figure reports its coverage. Missing evidence is unknown, never clean. The report names known-good peers by label and never prints a peer address, so it can be posted. Unknown, malformed or missing arguments are rejected with a message and exit status 2. Tests: contrib/pq-canary/test/test_pq_canary.py (stdlib only, fixtures in the #184 getpqtransportinfo schema) covers, among others, a monitored outbound failure surviving 300 unrelated inbound failures, unrelated noise, a restart gap, an RPC outage, a wrapped ring with and without lost entries, per-node evidence, coverage thresholds, address redaction and argument validation. The Required Merge Gate's PQ contract step (.github/workflows/required-merge-gate.yml) now runs it as well, and test/functional/tool_pq_canary.py runs the real sampler against the node under test and, when previous releases are present, a v1.0.0 node. The README covers install, the cron lines and how to read the output. Part of #184 (part 2, #186, work item C5). Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: treat missing PQ canary fallback-set evidence as unknown The evaluator read a missing or malformed fallback_set as an empty list, so a sample without fallback evidence could pass Figure 2. Record it as an unknown interval for that host instead, as for malformed rings, and iterate fallback_set only when it is a list. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: treat PQ canary records without an instance_id as unknown A missing or malformed instance_id was compared like a real process identity, so a restart between samples whose new ring did not go backwards went unnoticed and lost failures could pass Figure 2. Mark both rings unknown from the previous sample through the next record with a valid 64-hex-digit instance_id. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: treat PQ canary entries with malformed endpoints as unknown A ring entry whose endpoint was missing or malformed got no known-good label and was skipped like a valid unrelated peer, so a fallback, malformed_record or first_packet_failed entry without endpoint telemetry could still let the failure figure pass. Check that an endpoint has the getpqtransportinfo Endpoint shape: a kind and network that agree, an address of that network without a port, and a port from 0 to 65535. An entry that counts towards figure 2 or 3 and has neither a known-good nor a well-formed endpoint now makes that figure unknown. A malformed endpoint that still names a known-good peer remains that peer's failure. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: reject PQ canary samples that compare a node with itself Giving the same samples.csv for --archive and --control, or two files with the same host label, made figure 4 compare a node with itself: a perfect ratio that could pass at full coverage. The same applied to --pool and --archive, which also set the nodes monitored for figure 2. Require --pool, --archive and --control to be three different nodes. A file given for two roles, two roles sharing a host label or an instance_id, and a file whose rows carry no host label or more than one are bad input: the evaluator exits with status 2 and names the roles. The node test gave one node's samples as both pool and archive; give it the pool samples alone and check the rejection instead. The unit tests' simulated nodes now get distinct instance_ids, as real nodes do. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: leave qbit releases without a host archive out of the default list On powerpc64le, a host set_host() recognizes, running get_previous_releases.py without tags now always included v1.0.0, which has no powerpc64le archive, so the default download stopped with "No qbit v1.0.0 archive". Without tags, download every Core tag as before but only the qbit releases that have an archive for the host, and say which were skipped. A tag given explicitly still fails when it has no archive for the host. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: treat malformed PQ canary failure evidence as unknown Audit every failures.jsonl field the evaluator reads, so that a missing, malformed or contradictory value makes its stretch unknown rather than clean, and never crashes the evaluator into a "fail" exit status: - recent_failures that is not an object, and ring counters or sequences that are booleans, negative or zero, are a malformed ring (a non-object recent_failures raised AttributeError); - an entry outcome outside the getpqtransportinfo vocabulary may be a monitored or a triage one, so both figures are unknown (it was skipped as clean; an object outcome raised TypeError); - an entry time that is missing, malformed, before its process started or more than CLOCK_SLACK after the sample that read it is unknown (it was read as 1970 and skipped, or raised TypeError); - a fallback-set entry that is not an object or lacks a well-formed endpoint is unknown, once per distinct entry (it was skipped); - since that is missing, malformed, after the sample or changed within one instance_id makes the record's process identity unusable, like a missing instance_id (it fell back to the sample time); - a failures.jsonl line needs a time in Unix seconds up to year 9999 and a host label, else it is bad input (a boolean time was accepted, and a huge one crashed the report); - a known-good failure whose reason, cause, connection type, peer id, streak or times are malformed is still a failure, and those fields print as "malformed": a malformed field could put an address in the report, and malformed times or unhashable values raised. Labels are now matched in full, so a host label with a trailing newline is rejected. The unit tests' simulated nodes now report only failures recorded by the time of each sample, and boot before their first sample. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: treat malformed PQ canary sample values as unknown Audit every samples.csv field the evaluator reads, so that a missing, malformed or contradictory value is unknown rather than a pass, a miss or a crash: - time, uptime and connections_in must be plain non-negative decimal integers. int() also took "-30", " 30", "3_0" and non-ASCII digits, so a negative uptime looked like a fresh restart and excluded samples from figures 1 and 4; a time such as "soon" raised ValueError. A row without a usable time is now a missing sample. --canary-start and --end must lie between 1970 and 9999, and so must a sample time, which the report prints. - A row with more or fewer fields than the header, such as a line cut short by a crash and continued by the next sample, has values in the wrong columns, so it is not a sample. - A connected pinned peer needs a connection type, transport_pq 0 or 1 and a transport_pq_status from the getpeerinfo vocabulary, with transport_pq 1 exactly when the status is hybrid. A malformed or contradictory value is unknown: it counted as a miss, and transport_pq=1 with status "pending" counted as hybrid. - Figure 4 pairs only samples with sample_ok=1. - An uptime whose boot time contradicts the one already seen for the same instance_id is unknown: it was read as a restart and excluded samples. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: write only well-typed values to PQ canary samples The sampler wrote any integer, string or boolean it found: true became a connections_in or counter of 1, a negative uptime or since was kept, and an instance_id of any shape was recorded. Write each column only when the RPC value has its contract type (counts are non-negative integers, flags booleans, backends and statuses strings, instance_id 64 lowercase hex digits); anything else is NA, which the evaluator reads as unknown. Reject --host NA, which would read back as a missing host label. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: keep one stray PQ canary value from making whole stretches unknown Two of the new unknown rules reached further than the evidence: - An uptime was checked against the first boot time seen for its instance_id. A restart between the sampler's uptime and getpqtransportinfo calls pairs the old uptime with the new instance_id once, which made every later uptime of that process unknown. Check each uptime against the median boot time of its instance_id instead, so one racy or malformed value is the only unknown. - An entry with an implausible time made figure 2 or 3 unknown even when the sample that first read it was taken long before the window. Such an entry was recorded before that sample, so it cannot be in the window. Also rename the samples() helper to sample_rows(), which evaluate_failures shadowed with its sample count. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: check the release default list without the real host tool_qbit_release_resolution's default-tags case set HOST to make get_previous_releases.py act as a powerpc64le host. set_host() ignores HOST on Windows and answers win64, so on the Windows CI job the case downloaded the v1.0.0 win64 archive and failed. Stand in for set_host() so the case checks main()'s use of the host on any platform. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: skip the v1.0.0 transport baseline unless v1.0.0 is downloaded p2p_v2_previous_release.py only checked that previous releases were enabled. A releases directory that holds other releases, such as Bitcoin Core's, but not qbit v1.0.0 enables them, so the test went on and setup_nodes() aborted on the missing qbitd and qbit-cli. Skip unless both v1.0.0 binaries are present, as tool_pq_canary.py leaves out its v1.0.0 sample. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: count each expected PQ canary sample once Figure 1 counted every samples.csv row in the window, so rows repeated for one sampling slot (overlapping files, a manual run beside cron) added to its total: 95 of 100 expected samples is unknown, but the same rows recorded six times read as 99.1% hybrid and passed. Expected samples are now --interval apart from --canary-start, a sample stands for the nearest one, and every figure counts an expected sample once. Several samples for one count as the least favorable of them, so an extra sample can never improve the evidence: for the pinned link a miss, then unknown, then excluded, then hybrid; for inbound connections unknown, then excluded, then a measurement, where measurements that disagree are unknown (figure 4 kept whichever row came last). Figure 2 counted a record nearest to an expected sample just outside the window as covering one inside it; it now uses the same expected samples. A row repeated exactly is one sample, so repeated rows cannot outvote the median boot time that decides whether an uptime is a restart: one racy uptime copied a hundred times made two misses look like a restart and excluded them. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: find every host qbit publishes v1.0.0 archives for get_previous_releases.py registers the arm-linux-gnueabihf and powerpc64-linux-gnu v1.0.0 archives, but set_host() had no pattern for either host, so on 32-bit ARM or big-endian POWER it exited "Not sure which binary to download" before resolve_download() saw them. Map both hosts. Each pattern for a qbit host now accepts the depends triplet given in HOST, which the script's help documents, as well as config.guess output. This also fixes the upstream-derived aarch64, riscv64 and arm64 macOS patterns, which only matched config.guess output: HOST=aarch64-linux-gnu, riscv64-linux-gnu or arm64-apple-darwin exited the same way. The ARM patterns accept only little-endian ARMv7 or ARMv8 hosts with hard float, because the v1.0.0 ARM binaries are ARMv7 VFPv3 armhf builds; an ARMv6 host still gets "Not sure which binary". powerpc64le (Core archives only) and x86_64-w64-mingw32 (win64 comes from platform.system(), not HOST) are left as they were. tool_qbit_release_resolution now runs set_host() with a mocked platform, HOST and config.guess output for every published host, and checks that each answer resolves to that host's v1.0.0 archive. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: skip the v1.0.0 canary sample unless both executables exist tool_pq_canary enabled its v1.0.0 node whenever releases/v1.0.0/bin existed. get_previous_releases.py creates the release directory before extracting into it and keeps it after a failed extraction, so a stale or partial download could leave bin/ without qbitd or qbit-cli, and add_nodes() then aborted the whole test. Check both resolved executables, as p2p_v2_previous_release does, and otherwise skip only the optional v1.0.0 sample. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: pass a PQ canary day exactly 20% off its baseline ratio Figure 4 passes a day whose archive/control connections_in ratio is within 20% of the baseline ratio, inclusive. The evaluator computed the relative ratio in floats with two divisions, so a day exactly on the bound could round past it: 24/10 against a baseline of 3 came out as 0.7999999999999999, and 108/10 against 9 as 1.2000000000000002, and both failed the figure and the release gate. Compute the ratios as exact fractions, and read --baseline-ratio exactly too, since the float nearest 1.2 is below it. float() still screens the argument first, so nan, infinity and exponents outside its range are rejected as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: match a known-good IP address however it is written The failure figures look endpoints up in the known-good list by string. The node reports an IPv6 address compressed, so a list entry spelled out, such as [2001:0db8:0:0:0:0:0:5]:8333, never matched 2001:db8::5: its first_packet_failed entries were counted as another endpoint's, and Figure 2 passed at full coverage despite a failure between known-good peers. Give every IP address one spelling on both sides, the list and the node's endpoints, address-only entries included: compressed, lower case, and an IPv4-mapped IPv6 address as IPv4, which is how the node reports it. Two spellings of one entry are now "listed twice". Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * crypto: vendor mlkem-native and build ML-KEM-1024 with runtime backend selection (#225) * crypto: vendor pinned mlkem-native without source changes Vendor mlkem-native v2.0.0 (d1b2fe782888bdb761a50336012923180be7f502): the whole upstream mlkem/ directory and LICENSE, byte for byte, in src/mlkem-native. Nothing compiles it yet. contrib/devtools/mlkem-native.pin records the commit, tag, the tree id of mlkem/ and the LICENSE blob id. contrib/devtools/update-mlkem-native.sh reproduces the tree from upstream and rewrites the pin from the fetched object ids. test/lint/mlkem-native-check.sh, run by the subtree lint, proves offline that HEAD still holds exactly the pinned tree. Lints that scan src/ ignore the vendored tree, and doc/subtrees/mlkem-native.md is the runbook. Part of #184 (part 3, #190, D1). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: share x86 feature primitives and detect usable AVX2 Move the XGETBV instruction out of sha256.cpp into compat/cpuid.h as XGetBV(), next to GetCPUID(). SHA256AutoDetect keeps its own selection logic unchanged; it calls the shared primitive only. Add compat/cpu_features.{h,cpp} with a standalone answer to "can this CPU and OS run AVX2 code": the supported leaves are queried first, XCR0 is read only once leaf 1 reports OSXSAVE and AVX, and AVX2 is usable only with XMM and YMM state enabled and the leaf 7 AVX2 bit set. Unlike the SHA256 logic it does not depend on SSE4 or SHA-NI. HasMlkemX86Native() adds the other extensions that mlkem-native's x86_64 assembly executes, found by auditing the assembled object: SSSE3, SSE4.1, POPCNT and BMI2. A virtual machine can show AVX2 while hiding those, and checking AVX2 alone would then end in SIGILL. Both checks detect once and cache the result, because the ML-KEM capability hook asks about a hundred times per operation. Non-x86 targets and compilers without <cpuid.h> report false. Part of #184 (part 3, #190, D2). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: require SSSE3 for the SSE4 and SHA-NI SHA256 paths SHA256AutoDetect selects the SSE4 code whenever CPUID leaf 1 reports SSE4.1, and only under that check also the 4-way SSE4.1 code and the SHA-NI code. All three execute SSSE3 instructions. An audit of the built objects finds pshufb and palignr in the SSE4 and SHA-NI code and pshufb in the 4-way code, besides SSE4.1's pinsrd, pextrd and pblendw; no SSE4.2 instruction occurs. A virtual machine can report SSE4.1 while masking SSSE3, and the self-test then dies with SIGILL at startup. Require SSSE3 as well. Under qemu-x86_64, -cpu Haswell,-ssse3 and the SHA-NI model EPYC,-ssse3 die with SIGILL before this change and select the standard implementation after it. Unmasked, Haswell still selects sse4, sse41 and avx2, and EPYC and Denverton x86_shani. This is an upstream Bitcoin Core bug, so the change is kept minimal enough to go upstream. Part of #184 (part 3, #190). Co-Authored-By: Claude Opus 5.5 <[email protected]> * crypto: add ML-KEM-1024 wrapper and runtime backend dispatch Build the vendored mlkem-native as ML-KEM-1024 into bitcoin_node only, behind a small C++ wrapper. Nothing in qbitd calls it yet. - src/crypto/mlkem_config.h configures the library (MLK_CONFIG_FILE): parameter set 1024, the qbit_mlkem1024 prefix, deterministic APIs only, zeroization through memory_cleanse, and a capability hook. - Native backends are chosen by qbit-owned backend headers instead of upstream's compile-time defaults, which enable x86_64 only for AVX2 compilers. No source is compiled with an ISA flag: every native entry point asks the hook, which reads only cached CPU detection and one atomic portable override. On x86_64 that detection requires every extension the assembly executes (AVX2, SSSE3, SSE4.1, POPCNT, BMI2), not only the AVX2 that upstream's capability name says. - Upstream's AArch64 single-lane Keccak entry point skips the hook, so the override could not reach it. qbit mirrors that header's dispatch glue with the check added; every other entry point checks itself. - mlkem::KeyGen, CheckPublicKey, Encaps and Decaps take fixed-size spans, map upstream's invalid-key results separately from internal failures, and clear their outputs on every failure. GetBackendNames() reports the implementation that runs. ForcePortableForTesting and InjectResultForTesting are test-only guards. - cmake/mlkem-native.cmake adds WITH_MLKEM_NATIVE=AUTO|ON|OFF and the configure summary line. The library gets core_interface's hardening flags but not qbit's C++ warnings, then APPEND_CPPFLAGS and APPEND_CFLAGS, so the MSan jobs' -U_FORTIFY_SOURCE applies to it as to the other C libraries. MSVC builds without assembly, MSan builds portable C, and AArch64 ELF targets build portable C because the upstream assembly has no BTI landing pads or GNU property note and would strip BTI/PAC marking from the binary (doc/subtrees has the evidence and the revisit trigger). ON fails where native is impossible. mlkem_tests covers NIST ACVP keygen, encapsulation, decapsulation and key checks, all 1040 C2SP CCTV modulus vectors and the 3328/3329 boundary, implicit rejection against an independent SHAKE256, injected failures, moves and wiping, and backend selection, each on the native backend and with portable C forced. ci/checks/test_mlkem_build_policy.py checks the WITH_MLKEM_NATIVE matrix, builds the library with each compiler found (core-checks requires the AArch64 cross compiler), and counts assembly calls to show that the portable override reaches every x86_64 routine. Part of #184 (part 3, #190, D3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fuzz: exercise ML-KEM validation and backend equivalence Add two fuzz targets over the mlkem:: wrapper: - mlkem: honest key generation, encapsulation and decapsulation agree; an arbitrary encapsulation key is accepted exactly when an independent modulus check passes, and a rejected one leaves no output; any ciphertext of the right length decapsulates to a secret that differs from the honest one (implicit rejection is never proof of validity); an arbitrary decapsulation key is rejected exactly when an independent SHA3-256 hash check fails, and the secret is then cleared. - mlkem_backend_diff: the detected backend and forced portable C give equal statuses and outputs for the same inputs, and the override is restored afterwards. Both honor MLKEM_FORCE_PORTABLE=1. They join the required qbit corpus with nine generated seeds each (CCTV modulus key and 3328/3329/4095 coefficients, NIST ACVP decapsulation vectors, a ciphertext bit flip). CI replays them a second time with MLKEM_FORCE_PORTABLE=1 and includes them in the mutation phase; the PQ CI contract test checks that wiring. UBSan's -fsanitize=integer checks are suppressed for the vendored tree, as for the other external libraries. Part of #184 (part 3, #190, D5). Co-Authored-By: Claude Opus 5.5 <[email protected]> * bench: measure ML-KEM operations by active backend Benchmark ML-KEM-1024 key generation, encapsulation and decapsulation twice each: on the detected backend and with portable C forced. Like the per-implementation SHA256 benchmarks, each is named after the backend that ran, so on an AVX2 host bench_qbit -filter='MLKEM.*' lists both, and the portable guard restores auto-detection afterwards. Part of #184 (part 3, #190, D5). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: add s390x and macOS arm64 PQ unit jobs Add two jobs to the PQ workflow, selectable by name like aarch64-unit: - s390x-unit cross-compiles only test_bitcoin for big-endian s390x on the x64 runner, with Ubuntu's g++-s390x-linux-gnu and the depends tree, and runs the suites through ctest with qemu-s390x as the crosscompiling emulator, so only the tests run emulated. It stays out of the merge gate. Its timeout is 180 minutes until runs are measured. - macos-arm64-unit runs natively on a GitHub-hosted macos-14 runner without Docker, asserts that uname -m is arm64, and shares the unit job's source checks and evidence report through YAML anchors. It is the job that runs native AArch64 ML-KEM, and configures with WITH_MLKEM_NATIVE=ON so that losing native code fails it. All three jobs now expect mlkem_tests besides bip324_tests and net_tests (CTEST_REGEX ^(mlkem_tests|bip324_tests|net_tests)$), and report the suites through ctest_evidence.py. The aarch64 job's description says that ML-KEM runs portable C on AArch64 Linux. The PQ CI contract test covers selecting each job, the s390x cross and emulator settings, the macOS architecture check and report, and that every expression uses a context GitHub makes available there (no runner in job env, no matrix in a job without one), which GitHub enforces when loading the file. Part of #184 (part 3, #190, C2 and the CI part of D3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: gate ML-KEM and transport changes on the aarch64 PQ job The merge-profile classifier gains a pq_aarch64_required output, true when a change touches the ML-KEM library (src/mlkem-native, src/crypto/mlkem*, cmake/mlkem-native.cmake), the v2 transport (src/bip324*, src/net.h, src/net.cpp), the CPU feature checks, the PQ workflow or its env files, or the PQ test suites and vectors. A path it cannot read also requires the job. Full Validation calls ci-pq.yml with jobs: aarch64-unit on the change itself (a pull request's merge commit) when the output is true. The gate accepts a skipped job only when the classifier says it is not required; a required job that was skipped, failed or cancelled, or a missing or unreadable classifier output, fails it. The changed-file lists that feed the classifier, in Full Validation and in the Required Merge Gate, use --no-renames, so moving a file out of a gated path still names it. ci/checks/test_pq_merge_gate_contract.py runs the real classifier, job condition, ci-pq selection step and gate script: a pull request touching src/bip324.cpp requires and runs the job, while docs-only and other source pull requests skip it and pass, and a rename out of a gated path still requires it. The Required Merge Gate runs it with the other PQ CI contracts. Part of #184 (part 3, #190, C3). Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: run the PQ macOS arm64 job on macos-15 GitHub is retiring the macos-14 runner image: brownouts start on 2026-10-05 and the image is removed on 2026-11-02. Move the macos-arm64-unit job to macos-15, which is also Apple Silicon. Co-Authored-By: Claude Opus 5.5 <[email protected]> * build: probe the ML-KEM target with the appended flags APPEND_CPPFLAGS and APPEND_CFLAGS reach mlkem_native's C and assembly compiles, but the architecture probes ran without them. A build that appends a target-changing flag such as -m32 was detected as x86_64, enabled the native backend, and then failed in mlkem_config.h. Run the probes with the appended flags, and probe afresh on every configure, since those flags may change between configures. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: require the macOS arm64 and x86_64 PQ jobs on PQ changes No pull request ever built or ran ML-KEM's native code on macOS: the macos-arm64-unit job could only be dispatched, and nothing ran the x86_64 native code on an Intel Mac at all. Apple Silicon and Intel macOS are release targets with native code enabled. ci-pq.yml gains a macos-x86_64-unit job on GitHub's Intel image (macos-15-intel), sharing every step with macos-arm64-unit. Both build with WITH_MLKEM_NATIVE=ON, check the runner's architecture, and after the suites pass require the native backend by name from mlkem_tests/backend_selection, so a runner whose CPU lacks an extension cannot pass on portable C. Full Validation's PQ job, renamed pq-unit, now calls ci-pq.yml with aarch64-unit, macos-arm64-unit and macos-x86_64-unit, so all three are required exactly when the classifier says the change needs them. The classifier output is renamed pq_unit_required to match. On-demand runs accept the new job name; an empty jobs input runs it too. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: check the portable override on AArch64 and per entry point The build-policy test counted assembly calls only for the x86_64 backend, so nothing in CI showed that the portable override reaches every AArch64 assembly routine. With upstream's x1 Keccak glue in place of qbit's mirror, 221 assembly calls ran with portable C forced, and every test passed: outputs agree, and the backend name comes from the hook. The counting harness now also runs on AArch64: a static binary built with aarch64-linux-gnu-g++, from a copy of mlkem_config.h without the AArch64 ELF refusal, and run under qemu-aarch64. A negative control builds upstream's x1 glue and requires the leaked calls to show. Each entry point also runs alone on a new thread while portable C is forced, and must make no assembly call: one that skipped BeginOperation() would run on the new thread's stale copy of the override. The earlier round trip could not show this, since KeyGen set the copy for the whole thread. The build smoke job installs g++-aarch64-linux-gnu and qemu-user and lists them as required, so the AArch64 case cannot skip. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: cover each ML-KEM entry point's override and its per-thread copy Two wrapper mutations passed every test. An entry point without BeginOperation() went unnoticed because ForEachBackend calls GetBackendNames() on the same thread first, which takes the override for it. A shared (not thread_local) copy of the override went unnoticed because only one thread ran operations. every_entry_point_takes_the_override runs each entry point alone on a new thread with portable C forced, then asks the capability hooks what that thread's copy says. override_copy_is_per_thread lets one thread take the override set while another holds it unset, and checks that the first thread's copy did not change. override_changed_by_another_thread now runs operations on two threads at once, so a shared copy also gives wrong outputs on x86_64 and a data race under ThreadSanitizer. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fuzz: check that the ML-KEM portable replay runs portable C CI replays the mlkem and mlkem_backend_diff targets a second time with MLKEM_FORCE_PORTABLE=1, but nothing checked that the binary honored it: any other value, such as "true", silently selected native code, and the second replay would have repeated the first. Initialize now refuses any value but unset, empty, 0 or 1, prints the active backend once, and aborts when MLKEM_FORCE_PORTABLE=1 but the active backend is not portable/portable. A host without native code also shows in the log, where mlkem_backend_diff compares portable C with itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: cover SHA256's SSSE3 requirement with synthetic CPUs SHA256AutoDetect requires SSSE3 besides SSE4.1 before it selects its SSE4, SSE4.1 or SHA-NI code, all of which execute SSSE3 instructions. Nothing tested that: dropping the SSSE3 term passed every test, because real SSE4.1 hardware always has SSSE3. An overload of SHA256AutoDetect takes the CPUID and XGETBV functions, as cpu_features::DetectX86Features does, and the existing one passes the real ones, so the queries and the selection are unchanged. A cpu_features_tests case runs it on synthetic CPUs derived from this one: unmasked it selects what this CPU gets, and with SSSE3 or SSE4.1 masked the standard code. Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: say exactly where ML-KEM native code runs The wrapper's header said native code runs on "x86_64 with AVX2, AArch64", and the WITH_MLKEM_NATIVE help text spoke of "the x86_64 and AArch64 ML-KEM assembly". AArch64 runs native code only on macOS (AArch64 ELF builds stay portable to keep their BTI and PAC marking), and x86_64 also needs SSSE3, SSE4.1, POPCNT and BMI2, as cpu_features::HasMlkemX86Native checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> * contrib: keep the clone unshallow when vendoring mlkem-native update-mlkem-native.sh fetched the upstream release with --depth=1 into the qbit repository itself. That writes .git/shallow, so a full clone then reported itself as shallow to git and every tool that asks. Fetch into a temporary bare repository instead, and read the commit, the object ids and the archive from there. Staging and the byte-for-byte check still run in the qbit repository. Re-vendoring v2.0.0 by tag and by commit leaves no diff, and the clone stays complete. Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: record the local x86_64 GNU property evidence for mlkem-native #190 asks for ELF property evidence that linking the x86_64 assembly keeps the CET marking. Record what a local Ubuntu build shows: the assembly and C objects and the test_qbit and fuzz binaries that link the native backend all carry IBT and SHSTK, the binaries need only baseline x86-64, and the assembly loses its note only when built with -fcf-protection=none. The Guix release evidence is still outstanding and is required before the post-quantum feature branch merges into 1.x.x. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test: name the ML-KEM entry point instead of capturing a binding every_entry_point_takes_the_override captured a structured binding in the thread's lambda, which compilers accept only from C++20 (P1091R3, P1381R1). Bind the label and the entry point to ordinary variables, so the test does not depend on that support. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: build the macOS PQ jobs' Boost and libevent through depends The first macOS arm64 run failed to compile txmempool.h: with NO_DEPENDS=1 the job used Homebrew's Boost, now 1.92, and Boost 1.91 stopped accepting a struct derived from multi_index::indexed_by as an index list. Bitcoin Core fixed the source in bitcoin/bitcoin#35175; that backport is handled on its own. Build Boost and libevent with depends, natively for the runner, so the jobs compile against the versions qbit releases with. Homebrew now installs GNU Make 4 for depends instead of the two libraries. A step sets HOST and reads depends' own build id (packages, recipes and compilers), which keys an actions/cache of depends/built. It is saved once the toolchain file exists, even if the suites fail. After the build, a step requires that depends built that id and that CMake took the toolchain, libevent and Boost at boost.mk's version from it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * net: hybrid post-quantum v2 handshake with key confirmation (#184 part 4) (#230) * bip324: derive hybrid keys from an ordered transport transcript Add the hybrid ML-KEM-1024 key recipe of #184 to BIP324Cipher. Nothing calls it from the transport yet; E3 does. - Initialize(..., retain_for_hybrid) keeps the raw BIP324 ECDH secret, starts a running SHA256 transcript with ellswift_I || ellswift_R, and snapshots the network magic and cipher direction. The default (false) keeps today's secret lifetime and the existing vectors. - AddVersionContents hashes CompactSize(len) || contents, responder first, through a small stream adapter without copying the contents. - SwitchToHybrid derives HKDF-SHA256 with salt "qbit_v2_hybrid_mlkem1024" || magic over ss_ECDH || ss_MLKEM || TH, re-emplaces all four packet ciphers with counters at 0 and replaces the session id; garbage terminators stay. Misuse (not initialized, not retained, wrong contents count, a second switch) returns false and changes nothing. - The retained secret, IKM, HKDF state and derived keys are wiped on switch, in DiscardHybridSecret and in the destructor. Copying is deleted. The same recipe goes into test_framework/crypto/bip324_cipher.py, and contrib/devtools/generate-pq-transport-vectors.py uses it, the Python ML-KEM-1024 and the BIP324 ECDH helpers (imported by path, never the C++ code) to write src/test/data/pq_transport_vectors.json: inputs, every intermediate, both confirmations and first packets, and negative cases. Its --check mode runs in lint through test/lint/lint-pq-transport-vectors.py. bip324_tests gains hybrid_vectors (both roles and self-decrypt mode, with every intermediate recomputed from qbit's own primitives), hybrid_transcript_binding, hybrid_api_order and hybrid_rekey_boundaries. The bip324_cipher_roundtrip fuzz target gains an optional switch, transcript and secret mutations and discards. The existing BIP324 vectors are unchanged. Part of #184 (#199, E1). Co-Authored-By: Claude Opus 5.5 <[email protected]> * doc: specify hybrid v2 transport (doc/design/pq-transport.md) Add the specification of the hybrid ML-KEM-1024 v2 transport from #184's design, written for interoperating implementations and outside review: the record grammar and header registry (0x00 reserved, 0xF0 for the ML-KEM-1024 offer and accept, qbit's values from 0xF0 upward), byte layouts, parse rules (unparseable contents are ignored, unlike the Transport Feature Negotiation draft), the key recipe byte by byte, the responder and initiator message rules and why progress still holds, the switch boundary, key confirmation MUSTs, failure handling, security notes, an interop walk-through of the vectors file, the convergence and retirement policy, and a contributor section. The spec quotes vector 0 in a marked block, and…
This effectively reverts a3cb309 from PR #30194.
That PR reduced the
multi_indextype signatures as recommended upstream, but this is no longer supported as of boost 1.91 because it is no longer necessary. 1.91 drops support for the pre-c++11 work-arounds that bloated the type signatures to begin with.The upstream
BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORTdefine is meant to provide compatibility with removed features, but it does not work for this case. Usingindexed_bydirectly when defining themulti_index(as opposed to inheriting from it) works with all versions, and avoids the use of the back-compat define.This is a slight regression when building against boost < 1.91 because the bloated type signatures are reintroduced in that case, but it's not significant enough to go to the trouble of introducing version detection and ifdefs.