Repository navigation
net: optimize compact block extra tx iteration - #35670
Merged
sedited merged 1 commit intoJul 9, 2026
Merged
Conversation
`vExtraTxnForCompact` was resized to its configured capacity on the first insertion.
Before the ring was filled, compact block reconstruction scanned default `{Wtxid::ZERO, nullptr}` entries created for unused slots.
Reserve the configured capacity and append entries until the cache is full, then keep the same ring-buffer overwrite behavior.
This preserves the configured maximum and replacement order while keeping reconstruction from scanning unused capacity.
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35670. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste |
Member
davidgumberg
reviewed
Jul 8, 2026
davidgumberg
reviewed
Jul 8, 2026
davidgumberg
reviewed
Jul 8, 2026
Contributor
|
crACK 1a3cbf1 I would prefer this PR without the if (vExtraTxnForCompact.empty()) vExtraTxnForCompact.reserve(m_opts.max_extra_txs);(see the discussion above: #35670 (comment)) Since I don't think it is that helpful, but it is also not very harmful, so merging as-is seems fine. |
sedited
approved these changes
Jul 9, 2026
oleonardolima
added a commit
to oleonardolima/rust-bitcoinkernel
that referenced
this pull request
Jul 9, 2026
…05fc7ab 81405fc7ab Merge bitcoin/bitcoin#35689: test: Inline incorrect check in `util_tests` cd2a4bc510 test: Redeclare variable as signed in `util_tests` 6f1c56f03a Merge bitcoin/bitcoin#35670: net: optimize compact block extra tx iteration e94fda8a40 Merge bitcoin/bitcoin#35685: doc: Archive 30.3 release notes 5223cf1795 Merge bitcoin/bitcoin#35616: refactor: Use u64 over size_t for all cache sizes to fix a 32-bit overflow c0e91efdb3 Merge bitcoin/bitcoin#35295: validation: fetch block input prevouts in parallel during ConnectBlock f0da26cfc8 Merge bitcoin/bitcoin#34997: p2p: Don't participate in addr relay with feelers 443179a9eb doc: Archive 30.3 release notes fabafd91f1 refactor: Use u64 over size_t for all cache sizes to fix a 32-bit overflow 32941e1314 Merge bitcoin/bitcoin#35649: depends: move FreeBSD SDK handling to CI f379d716b1 Merge bitcoin/bitcoin#35669: doc: archive release notes for v31.1 881bb7b355 Merge bitcoin/bitcoin#35673: refactor: Move LoadGenesisBlock to ChainstateManager 3f3e644beb Merge bitcoin/bitcoin#35678: private broadcast: define and use new RPC_LIMIT_EXCEEDED error code ( + other follow-ups) e3b026bf56 Merge bitcoin/bitcoin#34020: mining: add getTransactions(ByWitnessID) IPC methods 62f9089343 Merge bitcoin/bitcoin#35386: doc: add an AI contribution policy fa615bd163 refactor: Move LoadGenesisBlock to ChainstateManager 8ac222484c private broadcast: remove no-op [[nodiscard]] 191bdcba26 test: align test better with described scenario 7ad311be18 test: use BOOST_CHECK_EQUAL for PrivateBroadcast::AddResult 82a02a2a22 rpc: define and use new RPC_LIMIT_EXCEEDED error code a64df338e6 Merge bitcoin/bitcoin#35651: doc: Improve offline-signing-tutorial after 32489 4498fa5d5b Merge bitcoin/bitcoin#35406: private broadcast: limit outstanding txs to count of 10,000 ec5edcd72b Merge bitcoin/bitcoin#35661: Update libmultiprocess subtree to add `ThreadMap.makePool` method ea67fea062 Merge bitcoin/bitcoin#35464: kernel: Add function for creating chainparams with a signet challenge a7b5f23bb8 Merge bitcoin/bitcoin#35667: refactor: Use `NetworkErrorString` for macOS code in `netif.cpp` 69fc991791 Merge bitcoin/bitcoin#32606: p2p: Drop unsolicited CMPCTBLOCK from non-HB peer and when blocksonly 1a3cbf1bd2 net: optimize compact block extra tx iteration bc33509ae2 Merge bitcoin/bitcoin#35650: doc: Add release notes for 32489 (exportwatchonlywallet RPC) 2b6e767d96 doc: archive release notes for v31.1 b0735336ee p2p: Don't participate in addr relay with feeler connections 302733fd96 Merge bitcoin/bitcoin#35652: init: fix reindex deadlock by waking cv after interrupt c1313b199f init: wake genesis wait after ImportBlocks() returns eccb04a321 refactor: Use `NetworkErrorString` for macOS code in `netif.cpp` f79ecfd9c7 Merge bitcoin/bitcoin#35658: refactor: Drop unneeded `<sys/types.h>` include before `<ifaddrs.h>` 22ac4ad949 ci: ensure we use correct lld version in OpenBSD job 495f43f7b3 ci: FreeBSD 15.1 244739db9d depends: move FreeBSD SDK handling to CI bab0120053 Merge bitcoin/bitcoin#35621: validation: Ignore eventual error message from flushing in AcceptBlock 02afa66169 Merge commit '6b0a907302364649dcaffeb0340b985f14141b4e' into pr/subtree-11 6b0a907302 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02 22c328d388 refactor: Drop unneeded `<sys/types.h>` include before `<ifaddrs.h>` 2063f02bd5 Merge bitcoin/bitcoin#35510: test: SOCKS5 proxy: expect that connection may be reset during SOCKS5 handshake or data forwarding 1360001f43 Merge bitcoin/bitcoin#34959: wallet: Enforce BDB btree levels and overflow item sizes 10ffef4b3b Merge bitcoin/bitcoin#35604: log: expose `-logratelimit` in normal help b393985aa0 Merge bitcoin/bitcoin#35634: txospenderindex: use zero-byte entry values 1835f2fcbf Merge bitcoin/bitcoin#35653: fuzz: Remove `ConsumeUniValue` 9f3e427228 fuzz: Remove ConsumeUniValue 68cb7840d2 doc: improve offline-signing-tutorial after 32489 32ddfc92d9 Merge bitcoin/bitcoin#35599: doc: Add release notes for #33671 (getbalances nonmempool field) f56804bcf5 Merge bitcoin/bitcoin#35640: ci: use a 8x instance over 16x for riscv job 239d6c5260 Merge bitcoin/bitcoin#35614: HTTPServer: Prevent race condition between worker thread and I/O thread cddbad325d doc: Add release notes for 32489 (exportwatchonlywallet RPC) 0a1bbec688 Merge bitcoin/bitcoin#32489: wallet: Add `exportwatchonlywallet` RPC to export a watchonly version of a wallet 4a007126fb Merge bitcoin/bitcoin#35147: depends: Boost 1.91.0-1 31abaa264c doc: add an AI contribution policy a15bdc0598 doc: update offline-signing-tutorial to use exportwatchonlywallet rpc a388076401 test: Test for exportwatchonlywallet d053e3e5c8 wallet, rpc: Add exportwatchonlywallet RPC 444878efef wallet: Add CWallet::ExportWatchOnly f9273f01db wallet: Move listdescriptors retrieving from RPC to CWallet a1c83789a7 wallet: Write new descriptor's cache in AddWalletDescriptor 1e996640e6 wallet: Use Descriptor::CanSelfExpand() in CanGetAddresses() d2ee9227da descriptor: Add CanSelfExpand() 2990bd7735 Merge bitcoin/bitcoin#35118: fuzz: add ipc round-trip fuzz target fb1d152c24 depends: Boost 1.91.0-1 ba48852f9e Merge bitcoin/bitcoin#35438: test: introduce NodeSigner, run feature_taproot.py without wallet compiled 47bbed052e ci: use true|false over "true|false" 9a25bc3989 ci: use a 8x instance over 16x 9871dc7ab4 Merge bitcoin/bitcoin#31425: CI: Add Riscv bare metal job 113402286e doc: add txospenderindex release note ce06878288 index: shrink txospenderindex value markers a99148d576 test kernel: Don't log on warnings change 5b4fd284f4 kernel: Generate a signet with a challenge 037ad77071 fuzz: add IPC round-trip target a8823c0996 Merge bitcoin/bitcoin#35607: nanobench: fix performance counter buffer initialization f26c15bdd2 Merge bitcoin/bitcoin#35397: ci: add OpenBSD Clang cross job 91586f701e test: introduce NodeSigner, run feature_taproot.py without wallet compiled 771200ca43 test: return full keypair from `getnewdestination` helper 4e29de719e private broadcast: add release note for limited cap cbf8c107c1 Release cs_main between individual private tx re-attempts 5aea3d0373 private broadcast: limit outstanding txs to count of 10,000 dc282ff31d Merge bitcoin/bitcoin#35597: logging: More fully remove libevent log category ec98037f7a Merge bitcoin/bitcoin#35615: fuzz: restore CreateSock in PCP targets 43d89bb6e1 Merge bitcoin/bitcoin#35610: bitcoin-util: Add netmagic command e35c805489 Merge bitcoin/bitcoin#35129: test: add fuzz test for private broadcast dc1c17c085 doc: add release notes 0e10937184 fuzz: add coins_view_stacked fuzz harness to test concurrent leveldb reads ce610a6ff4 fuzz: update harnesses to cover CoinsViewOverlay::StartFetching 760fb22dc3 test: add unit tests for CoinsViewOverlay::StartFetching d69a3b20de doc: update CoinsViewOverlay docstring to describe parallel fetching ab2a379237 coins: fetch inputs in parallel fdf283036a coins: add ready flag to InputToFetch ede11b8314 validation: collect block inputs in CoinsViewOverlay before ConnectBlock f82043af50 coins: introduce thread pool in CoinsViewOverlay 5bf1c32008 validation: add -prevoutfetchthreads configuration option a318f43254 bitcoin-util: Add netmagic command 256482ab56 validation: In AcceptBlock, ignore flush result 3c76bd4356 Merge bitcoin/bitcoin#35603: build: QRencode cleanups f595daf1dd test: ensure HTTPServer race condition is fixed b98b10c072 test: introduce a worker thread in http socket error test 922b08d375 test: socket error handling in HTTPServer using ErrorSock mock socket 73da2a8a52 http: prevent race condition between worker thread and I/O thread 57b3bf8496 Merge bitcoin/bitcoin#35609: ci: Bump tsan config to ubuntu:26.04 with -U_FORTIFY_SOURCE d64ea15824 ci: add openBSD cross CI job 5404b62074 depends: add openbsd_LDFLAGS 2a9e35d293 Merge bitcoin/bitcoin#35588: scripted-diff: Rename `Sock::{RECV,SEND,ERR}` a0e5e30010 fuzz: restore CreateSock in PCP targets 41ceea400e scripted-diff: Rename `StatusLevel::{INFO,WARN,ERR}` f395acdeee scripted-diff: Rename `Sock::{RECV,SEND,ERR}` 7a74f65293 Merge bitcoin/bitcoin#35536: fuzz: share a single mocked steady clock across FuzzedSock instances e1290ce7f7 Merge bitcoin/bitcoin#35543: test: introduce ExtendedPrivateKey and ExtendedPublicKey classes 7ac25c9177 util, refactor: Rename local `ERR` in `Sock::Accept` bbbbab86a8 ci: Bump tsan config to ubuntu:26.04 with -U_FORTIFY_SOURCE 095596ddf7 log: expose -logratelimit option ea9afb61a1 Merge bitcoin/bitcoin#35602: doc: Clarify build docs about `pkgconf` / `pkg-config` requirements 672eedc46b Merge bitcoin/bitcoin#35220: fuzz: connman: strengthen assertions and extend coverage 0e5c718d8a Merge bitcoin/bitcoin#35506: test: ensure group data cluster pointers are live b6b1d0653a nanobench: fix perf counter buffer init 93012d7ff9 Merge bitcoin/bitcoin#35601: wallet: remove experimental warning from send and sendall 829255c8be cmake: Remove `SelectLibraryConfigurations` from `FindQRencode` module 5c55606da9 depends: Remove unused `lib/pkgconfig` in `qrencode` package 402ba10b20 cmake: Drop optional `PkgConfig` use in `FindQRencode` module 8ebfff0f88 doc: add send RPC release note fb8a103886 doc: Clarify build docs about `pkgconf` / `pkg-config` requirements 5884f5a4fa wallet: remove experimental warning from send RPCs 7b84e5106c Merge bitcoin/bitcoin#35595: ci: remove some packages from Chimera job 58560c281d ci: remove some packages from Chimera job 295ce6f45c Merge bitcoin/bitcoin#35576: test: raise `feature_reindex` RPC timeout b36730a3ef Add CI job for riscv bare metal bfdbf513f6 Add CI job for producing a static bare metal binary a9a1d92a1d build: Add option for building for bare metal envs 9b2ef81757 doc: add release notes for #33671 (getbalances nonmempool field) 633044f143 Merge bitcoin/bitcoin#35266: rpc, wallet: add an option to not load the wallet after migrating d6269e2a90 Merge bitcoin/bitcoin#35594: fuzz: cover async chainstate compaction 3765b428d1 logging: More fully remove libevent log category 703a671fbc fuzz: compact coins view db during fuzzing 0868c85fd5 refactor: rename async coin compaction 6fa4132298 fuzz: share a single mocked steady clock across FuzzedSock instances 8791c4764c test: use ExtendedPrivateKey in wallet_taproot.py 89ceafafb9 test: use ExtendedPrivateKey in wallet_listdescriptors.py bbfffcab58 test: use ExtendedPrivateKey in wallet_send.py 2ab6e590f7 test: use ExtendedPrivateKey in wallet_keypool.py 9e20118720 test: use ExtendedPrivateKey in wallet_fundrawtransaction.py 06af0cddbb test: use ExtendedPrivateKey in wallet_descriptor.py 4100fac20e test: use ExtendedPrivateKey in wallet_createwallet.py ff3f6def9a test: use ExtendedPrivateKey in wallet_bumpfee.py 003f2a01f6 test: use ExtendedPrivateKey in feature_notifications.py f988e6d6e6 test: use ExtendedPrivateKey in wallet_importdescriptors.py 0cdd817a82 add release note 517d37ce3e test: tests wallet migration with load_wallet disabled b98dd63da7 rpc: Add load_wallet argument to migratewallet RPC 4acd063ba6 wallet: make loading the wallet after migrating optional 1a3cfdf1b7 fuzz: connman: cover AddLocalServices/RemoveLocalServices c507fb3063 fuzz: connman: add outbound-bytes invariants 4a6fce43ea fuzz: connman: add AddNode/RemoveAddedNode invariants 9e6546c517 test: raise reindex mining RPC timeout d2a03d50ac test: add extendedkey.py unit tests by using BIP32 test vectors afdb378082 test: introduce ExtendedPrivateKey and ExtendedPublicKey classes 55e3a57f22 qa: Avoid UTXO reuse between test functions 9c5dd2926a p2p: Ignore CMPCTBLOCK from peer that hasn't sent SENDCMPCT bf9884f4e5 p2p: make blocksonly nodes ignore CMPCTBLOCK messages 92cea63c71 test: (Un)solicited invalid cb -> get disconnected. e845e26344 test: p2p: Nodes ignore unsolicited CMPCTBLOCK's 8313591715 p2p: Drop unsolicited CMPCTBLOCK from non-HB peer 44f377a71f refactor: test: Static assert_highbandwidth_states 25457a3272 test: Tighten getblocktxn checks in parallel cb reconstruction test. 2ee4fafa3f test: add fuzz test for private broadcast 08b7c61fc7 private broadcast: enforce sending to unique node ids 9a8ef9b0a3 test: SOCKS5 proxy: expect that connection may be reset during handshake eb3208364a test: SOCKS5 proxy: expect that connection may be reset when forwarding 4dbaa7cc65 test: generalise byte_to_base58 utility function to allow more version types df9eb72b12 test: ensure group data cluster pointers are live a5859edef4 fuzz: connman: set m_local_services/m_use_addrman_outgoing/m_max_automatic_connections 4b84c9125a fuzz: connman: add network activity invariants 9784818442 mining: add getTransactionsByWitnessID() IPC method d282ae6883 mining: add getTransactionsByTxID() IPC method 0d5e4d4712 test: restart node after IPC option override test f16b3613cd ipc: Serialize null CTransactionRef as empty Data 0f466e1094 mempool: add lookup by witness hash 51dd90fb50 refactor: Merge announce_cmpct_block() defs into one 97d08d62ba refactor: store wallet names to MigrationResult 8a739a5510 build: allow ipc fuzz builds b2de59d486 wallet, bdbro: Validate btree page levels dc3a2b9c3b wallet, bdbro: Enforce overflow data lengths git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 81405fc7abbd1889f3978b8924e7acbe12b3403b
Kino1994
pushed a commit
to Kino1994/bitcoin-full-history
that referenced
this pull request
Jul 10, 2026
…ration c482c50 net: optimize compact block extra tx iteration (Lőrinc) Pull request description: **Problem:** `vExtraTxnForCompact` gives compact block reconstruction one more source for recently removed transactions. Before this PR, the first insertion resized the cache to its configured capacity, so before the cache was full, `PartiallyDownloadedBlock::InitData()` also scanned default `{Wtxid::ZERO, nullptr}` entries that had never been added to the cache. Those unused entries could still participate in reconstruction short-id matching. **Fix:** Reserve the configured capacity and append entries until the cache is full. Once full, keep the same ring-buffer overwrite behavior, configured maximum, and replacement order. **Risk:** Triggering the affected duplicate-match branch requires a block-specific 6-byte short-id collision while the extra-txn cache still contains default null slots. With a 16-thread benchmark of the `CBlockHeaderAndShortTxIDs` nonce-grinding path, the 50% collision time was ~178 days on my machine. ACKs for top commit: davidgumberg: crACK bitcoin/bitcoin@c482c50 darosior: utACK c482c50 w0xlt: ACK c482c50 sedited: ACK c482c50 Tree-SHA512: 9022a2ea5f3ff4279bdee7fa0316d6e5c922be3f7c566743b4d16708c49c0c8dc8a8dcbd60530a0128277db6f192355be88312419952213ae06353a0d937c507
Merged
Kino1994
pushed a commit
to Kino1994/bitcoin-full-history
that referenced
this pull request
Aug 19, 2026
…ration
1a3cbf1bd2c0d4d350063bf5162c3e1c2ec2df30 net: optimize compact block extra tx iteration (Lőrinc)
Pull request description:
**Problem:** `vExtraTxnForCompact` gives compact block reconstruction one more source for recently removed transactions.
Before this PR, the first insertion resized the cache to its configured capacity, so before the cache was full, `PartiallyDownloadedBlock::InitData()` also scanned default `{Wtxid::ZERO, nullptr}` entries that had never been added to the cache.
Those unused entries could still participate in reconstruction short-id matching.
**Fix:** Reserve the configured capacity and append entries until the cache is full.
Once full, keep the same ring-buffer overwrite behavior, configured maximum, and replacement order.
**Risk:** Triggering the affected duplicate-match branch requires a block-specific 6-byte short-id collision while the extra-txn cache still contains default null slots.
With a 16-thread benchmark of the `CBlockHeaderAndShortTxIDs` nonce-grinding path, the 50% collision time was ~178 days on my machine.
ACKs for top commit:
davidgumberg:
crACK bitcoin/bitcoin@1a3cbf1
darosior:
utACK 1a3cbf1bd2c0d4d350063bf5162c3e1c2ec2df30
w0xlt:
ACK 1a3cbf1bd2c0d4d350063bf5162c3e1c2ec2df30
sedited:
ACK 1a3cbf1bd2c0d4d350063bf5162c3e1c2ec2df30
Tree-SHA512: 9022a2ea5f3ff4279bdee7fa0316d6e5c922be3f7c566743b4d16708c49c0c8dc8a8dcbd60530a0128277db6f192355be88312419952213ae06353a0d937c507
1 of 3 tasks
PastaPastaPasta
added a commit
to dashpay/dash
that referenced
this pull request
Oct 29, 2026
71b3f0c Merge #7556: fix: gate BLS vote-signature failure log behind gobject category (pasta) 14dddb1 Merge #7838: fix(wallet): authenticate unlock deadline extensions (pasta) 5f73355 Merge #7858: fix: do not InstantSend-lock provider transactions (pasta) 0d2e579 fix(evo): keep -allowprivatenet out of masternode address validation (Konstantin Akimov) b4cd3fa fix(evo): only write credit pool snapshots inside a block-scoped EvoDB transaction (#7549) (pasta) d215280 Merge #7846: fix: treat pending owner keys and Platform node IDs as one conflict namespace (pasta) db9ec2b Merge #7826: fix: skip repeated authenticated Platform bans (pasta) dcc9596 Merge #7867: fix: refuse masternode list RPCs for blocks outside the active chain (pasta) 197b14a Merge #7866: fix: stop `masternode payments` at the genesis block (pasta) 3055a19 Merge #7850: perf: let CHECKDATASIG use the signature cache (pasta) 4da0099 Merge #7821: fix: relock encrypted wallets after HD upgrade failures (pasta) c7393c0 Merge #7833: fix: gate signing intake before quorum retrieval (pasta) fdf40fe Merge #7828: fix: omit recovery words from invalid mnemonic errors (pasta) 8888af8 Merge #7753: fix: bound masternode list caches by size instead of by new block (pasta) 457af6d Merge #7738: refactor: avoid double lookups and default-inserting map access in governance (pasta) be3b55e Merge #7662: fix: isolate missing quorums in InstantSend batches (pasta) 9bc1e77 Merge #7489: fix: conflict ProRegTx collateral reuse with in-mempool masternode updates (pasta) 5278ce8 Merge #7583: fix: bound pending DKG message retention per proTxHash (pasta) 9ebf78f Merge #7522: fix(net): bound verified inbound connections per proRegTxHash (pasta) 9f2946e Merge #7487: fix: bound DomainPort string deserialization and stop swallowing deser failures (pasta) c077d32 Merge #7527: fix: require a valid masternode signature before caching an orphan governance vote (pasta) dfa7db1 Merge #7518: fix: memoize governance vote signature checks to bound govsync cost (pasta) bb09c49 Merge #7532: fix: bound DYNBITSET allocation against remaining stream size (pasta) 9739f35 Merge #7488: fix: validate ProUpServTx nType at mempool acceptance (pasta) 4687550 Merge #7385: fix: reject invalid extended masternode net info (Pasta) Pull request description: ## Issue being fixed or feature implemented Backports for v23.1.9, on top of current `v23.1.x`. The base already carries the negative-nVersion consensus fix (#2), the invalid-DKG-share fix (#4), the per-sender sig-share scoping (#5), the individual DKG contribution verification (#7) and the provider-decode/orphan-cap hardening (#8), so those are not part of this diff. ## What was done? Cherry-picked (`git cherry-pick -m1 -x`) the develop merges below into `v23.1.x`, in develop merge order. Where a develop merge carried develop-only refactors or APIs absent on `v23.1.x`, only the fix was taken and the adaptation is noted in that commit's message. ### Included (cherry-picks of merged dashpay/dash PRs) - #7385 — `fix: reject invalid extended masternode net info` - #7488 — `fix: validate ProUpServTx nType at mempool acceptance` - #7532 — `fix: bound DYNBITSET allocation against remaining stream size` - #7518 — `fix: memoize governance vote signature checks to bound govsync cost` - #7527 — `fix: require a valid masternode signature before caching an orphan governance vote` - #7487 — `fix: bound DomainPort string deserialization and stop swallowing deser failures` - #7522 — `fix(net): bound verified inbound connections per proRegTxHash` - #7583 — `fix: bound pending DKG message retention per proTxHash` - #7489 — `fix: conflict ProRegTx collateral reuse with in-mempool masternode updates` - #7662 — `fix: isolate missing quorums in InstantSend batches` - #7738 — `fix: do not record a masternode vote before it is validated` - #7753 — `fix: bound masternode list caches by size instead of by new block` - #7828 — `fix: omit recovery words from invalid mnemonic errors` - #7833 — `fix: gate signing intake before quorum retrieval` - #7821 — `fix: relock encrypted wallets after HD upgrade failures` - #7850 — `perf: let CHECKDATASIG use the signature cache` - #7866 — `fix: stop 'masternode payments' at the genesis block` - #7867 — `fix: refuse masternode list RPCs for blocks outside the active chain` - #7826 — `fix: skip repeated authenticated Platform bans` - #7846 — `fix: treat pending owner keys and Platform node IDs as one conflict namespace` - #7858 — `fix: do not InstantSend-lock provider transactions` (with its functional test, ported to v23.1.x) - #7838 — `fix(wallet): authenticate unlock deadline extensions` - #7556 — `fix: gate BLS vote-signature failure log behind gobject category` ### Upstream-derived changes with no clean develop merge (own commits) - `fix(evo): only write credit pool snapshots inside a block-scoped EvoDB transaction (#7549)` — the develop fix landed inside #7639, which is not on this branch, so it is hand-ported (EvoDB transaction-depth counter + `HasActiveTransaction()` gate); develop commits `8503c5d211`/`0325195ecb` cited in the commit. - `fix(evo): keep -allowprivatenet out of masternode address validation` — the consensus portion of #7888 only (develop commit `e3e780801b`); the V24-gated ExtNetInfo parts are excluded. ### Adaptation notes - #7556 pairs with #7527 (already here): once orphan governance votes must pass `IsValid` before caching, a peer with a valid masternode outpoint and an invalid BLS signature can reach the BLS vote-signature failure log, so that log (and two sibling `ProcessVote` logs) is gated behind `BCLog::GOBJECT`. - #7662: the unit test calls `SetMinSporkKeys(1)`; v23.1.x defaults the spork signer threshold to `INT_MAX`, so without it `SPORK_2_INSTANTSEND_ENABLED` never activates and the regression check would be vacuous. - #7858 is taken with its functional test ported to v23.1.x: `wait_for_instantlock` is `(txid, node)` here and does not sync/bump mocktime itself, and develop's `DashTestFramework.bury_tx` does not exist, so the waits sync+bump per node and the bury step is inlined. `IsProviderTx` lists only the four v23.1.x provider special-tx types (the v24-only `DISSOLVE`/`UPDATE_SHARE`/`UPDATE_SHARED_REGISTRAR` are omitted). - #7385/#7488/#7489/#7846: kept v23.1.x `ProTxVersion::ExtAddr` equality and the atomic-pointer `dmnman`; dropped develop-only test setups and the shared-masternode owner-key branch. - #7527/#7738: v23.1.x governance lookup/`ProcessVote` shapes; develop-only refactors excluded. - #7583: re-threaded through `active/dkgsession.*`; #7867: `insert_or_assign`; #7821: `interfaces::MakeHandler`; #7753: dropped the `<atomic>` include/`DoMaintenance` test calls. ### Not included - #7822 (`fix: reject malformed detached quorum share batches`) — its one-line change (record the node in `badSources` rather than `BanNode`) is already present in the base via #5, so the pick is redundant and was dropped. - #7895 (`test: cover retroactive provider tx refusal`) — its functional test needs the single-member-quorum harness absent on `v23.1.x`. - Compact-block extra-tx fix (bitcoin bitcoin#35670) — dropped from this release as a latent, very-hard-to-trigger crash; opened as its own PR against `develop`. - #7861 (pruned-node historical-block reject) — deferred; also missing from `v24.0.0-rc.4` (should land in v24.0.0 final). - Develop-only regressions and V24-gated changes that do not affect `v23.1.x`. ## How Has This Been Tested? Rebased onto current `v23.1.x`; the only merge conflicts were the additive test appends in `src/test/evo_netinfo_tests.cpp` and `src/test/governance_inv_tests.cpp` (kept both the base's and the picks' cases). Assembled branch builds with `--enable-werror` (`dashd` + `test_dash`). The full `test_dash` unit suite passes, and `p2p_instantsend.py` (including the restored `test_provider_tx_not_locked`) passes. Each pick's changed lines were compared with its develop merge; differences are the adaptations above. ## Breaking Changes - #7858: provider transactions no longer receive InstantSend locks. Software that waited for an islock on a ProTx should wait for a ChainLock or confirmations instead. - #7828: invalid-mnemonic RPC errors no longer echo the mnemonic. #7821: encrypted wallets relock after a failed HD upgrade. #7867: `protx info/listdiff` and `masternode payments` error for blocks off the active chain. #7489/#7488: provider transactions with reused collateral or an invalid type are rejected at mempool acceptance. #7888: the RFC1918 masternode-address check applies even with `-allowprivatenet`. #7838: a wallet unlock deadline can no longer be extended without re-authenticating. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Behavior Changes** * Provider transactions no longer receive InstantSend locks. They are mined after 10 minutes in the mempool and then protected by a ChainLock; transactions spending their outputs can be locked once mined. Use ChainLocks or confirmations instead of waiting for an InstantSend lock on a provider transaction. * **Bug Fixes** * Masternode RPCs now reject blocks outside the active chain. * Wallet unlock attempts with an incorrect passphrase no longer alter an existing unlock period. * Improved validation and handling of governance votes, network addresses, and masternode connections. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Top commit has no ACKs. Tree-SHA512: d48eaae945bcbad443cf3280c08d2ed00f06816bb09ef70f85fca497a864b89e502d09fb3c9c977f8d0a74d761dc3c29f3b11e217cc7e29c43d1ee691d4df572
PastaPastaPasta
added a commit
to dashpay/dash
that referenced
this pull request
Oct 29, 2026
4722ad9 chore: prepare v23.1.9 release (pasta) Pull request description: ## Issue being fixed or feature implemented Release preparation for **v23.1.9**. This should be the **last** PR merged on `v23.1.x` for this release — after the fix/backport PRs land — then the `v23.1.9` tag is cut from it. ## What was done? - `configure.ac`: bump `_CLIENT_VERSION_BUILD` 8 → 9 (`_CLIENT_VERSION_IS_RELEASE` stays `true`, no RC). - `doc/release-notes.md`: v23.1.9 notes (consensus fix, crash fixes, InstantSend behavior change, security/DoS hardening, wallet). Includes the **Credits** (contributors) and **Older releases** sections and the **v23.1.9 Change log** set-of-changes link. - Archived the v23.1.8 notes to `doc/release-notes/dash/release-notes-23.1.8.md`. - `contrib/flatpak/org.dash.dash-core.metainfo.xml`: added the `23.1.9` release entry. - `doc/man/*.1`: version/date string bump (no CLI options changed this release). ## Notes / decisions for the release owner - **The release notes track the full merged fix set on `v23.1.x`** — #2, #4, #5, #6, #7, #8, #9: - #6: provider transactions are no longer InstantSend-locked (#7858, its own "InstantSend" note), the wallet unlock-deadline re-authentication (#7838), and the BLS vote-signature log gating (#7556, folded into the governance line). - #9: flat-file (block/undo) positions are now 64-bit (folded into "Crash fixes"); socket `poll()`/`select()` exception monitoring alignment and the paused-send peer timeout (folded into "Security and denial-of-service hardening"). - The compact-block extra-tx fix (bitcoin bitcoin#35670) was **dropped** from this release and moved to its own `develop` PR, so it is not in the notes. - **Release notes wording** is a draft and should get a final editorial pass before public disclosure — in particular the consensus-split and DKG items. It follows the v23.1.8 tone (effect, not exploit detail). - **Contributor list** mirrors v23.1.8's; adjust names at release time if needed. - **Man pages**: this commit carries only the version/date bump. A full `contrib/devtools/gen-manpages.py` regeneration from the release build (no `--enable-debug`) is part of the tag/build step, as for v23.1.8. - **Version string vs nightly disclosure**: `_CLIENT_VERSION_IS_RELEASE` is `true`, so the binary reports `v23.1.9` regardless of the git tag name. If the initial (pre-disclosure) publish is under a nightly tag, confirm that is acceptable or decide whether `IS_RELEASE` should be `false` for that phase. - Rebased onto current `v23.1.x` (`4695b31275`, through #9). After #6 merges this should get one final trivial rebase onto `v23.1.x` so the release commit lands on top of every fix. ## Breaking Changes None in this PR (version/notes/manpages only). The behavior changes themselves ship in the fix PRs (most notably #6: provider transactions no longer receive InstantSend locks; #7838: wallet unlock deadline re-authentication). ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone 🤖 Generated with [Claude Code](https://claude.com/claude-code) Top commit has no ACKs. Tree-SHA512: 877689ec8c661010ffbf6224ed553f1abb131c62ba86c8ac3eac657c7d0811eb58b15654f6ce7818b7ea9aa2b33028ba5c9ded740a31e3328585cfab46e8be75
PastaPastaPasta
added a commit
to dashpay/dash
that referenced
this pull request
Oct 31, 2026
Align the backport 1:1 with bitcoin/bitcoin@1a3cbf1bd2. After the append-until-full change, vExtraTxnForCompact (the only production source of extra_txn) never holds an entry without a transaction, so the Dash-only null check in PartiallyDownloadedBlock::InitData and its ExtraTxnWithoutTransactionTest covered a state that can no longer occur. Also apply the upstream `max_extra_txs == 0` early return that the first commit left as `<= 0` (equivalent for the unsigned option). Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta
added a commit
to dashpay/dash
that referenced
this pull request
Oct 31, 2026
vExtraTxnForCompact was resized to its configured capacity on the first
insertion. Until the ring filled, compact block reconstruction scanned
default {uint256(), nullptr} entries created for the unused slots.
Reserve the configured capacity and append entries until the cache is
full, then keep the same ring-buffer overwrite behavior. This preserves
the configured maximum and replacement order while keeping
reconstruction from scanning unused capacity.
Port of bitcoin/bitcoin@1a3cbf1bd2. Dash keys the cache by the
transaction instance hash (GetInstanceHash()) instead of upstream's
witness hash.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PastaPastaPasta
added a commit
to dashpay/dash
that referenced
this pull request
Oct 31, 2026
…a txn until full f5930b8 backport: bitcoin#35670 - net: append compact-block extra txn until full (pasta) Pull request description: ## Issue being fixed or feature implemented - `vExtraTxnForCompact` holds orphan and rejected transactions for compact block reconstruction. On the first insertion it was resized to its full configured capacity. Until the ring filled, `PartiallyDownloadedBlock::InitData` scanned default `{uint256(), nullptr}` entries in the unused slots. ## What was done? Backport of bitcoin#35670 (upstream commit 1a3cbf1): the extra-transaction ring buffer now appends until full. - `src/net_processing.cpp`: `AddToCompactExtraTransactions` now reserves the configured capacity and appends entries until the cache is full. After that it overwrites in ring order, as before. The configured maximum and the replacement order are unchanged. - Dash adaptation: the cache is keyed by the transaction instance hash (`GetInstanceHash()`) rather than upstream's witness hash. The diff is 1:1 with upstream apart from that hash adaptation. No upstream hunks were omitted. ## How Has This Been Tested? - Built `test_dash` and `dashd` on Linux x86_64 with `--enable-werror --enable-suppress-external-warnings --without-gui`, plus `CXXFLAGS=-Wno-error=suggest-override`. The extra flag is needed because the Boost `signals2` headers from depends trigger that warning under this host's newer GCC. The warning is in an untouched file and unrelated to this change. - `./src/test/test_dash --run_test=blockencodings_tests,net_peer_connection_tests,denialofservice_tests` passes. - `p2p_compactblocks.py` passes. ## Breaking Changes None. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: knst: utACK f5930b8 Tree-SHA512: 8810f1df6fa56527ea5311f7c56e0bcac9519d3382d8842ca28285ddd11126d0520b67b2b5fc6764f3c6ec4b070ff6b2855f36c2e49e26eae71033b5289a59eb
3 tasks
DCG-Claude
added a commit
to thepastaclaw/dash
that referenced
this pull request
Nov 16, 2026
…codings a8203e9 refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> (AngusP) c3c1843 refactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256. (AngusP) Pull request description: The first commit replaces `uint256` with typesafe `Wtxid` (or `Txid`) types introduced in bitcoin#28107. The second commit then simplifies the extra tx `vector` to just be of `CTransactionRef`s instead of a `std::pair<Wtxid, CTransactionRef>`, as it's easy to get a `Wtxid` from a transaction ref. ACKs for top commit: glozow: ACK a8203e9 dergoegge: ACK a8203e9 Tree-SHA512: b4ba1423a8059f9fc118782bd8a668213d229c822f22b01267de74d6ea97fe4f2aad46b5da7c0178ecc9905293e9a0eafba1d75330297c055e27fd53c8c8ebfd Dash adaptations: - src/blockencodings.cpp: extra_txn short IDs use GetInstanceHash() instead of GetWitnessHash(), the hash Dash computes short IDs from (no witness in Dash) - src/blockencodings.cpp: duplicate check keeps Dash's GetHash() comparison instead of upstream's GetWitnessHash(); only the .second access is dropped - src/net_processing.cpp: stores bare CTransactionRef in Dash's append-until-full ring buffer (bitcoin#35670 backport) instead of upstream's resize-based version - src/test/blockencodings_tests.cpp: short-ID call sites use GetInstanceHash() where upstream switched to GetWitnessHash(), and the stream stays CDataStream as in Dash Not applicable to Dash (intentionally omitted): - src/blockencodings.h: GetShortID(const Wtxid&): Dash has no Wtxid type and its short IDs hash the instance hash, not a witness hash; signature stays uint256 - src/blockencodings.cpp: GetShortID(const Wtxid& wtxid) definition: same reason, Dash keeps GetShortID(const uint256& txhash) - src/test/blockencodings_tests.cpp: TestHeaderAndShortIDs::GetShortID(const Wtxid&) helper: stays uint256 to match Dash's CBlockHeaderAndShortTxIDs::GetShortID
DCG-Claude
added a commit
to thepastaclaw/dash
that referenced
this pull request
Nov 18, 2026
…codings a8203e9 refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> (AngusP) c3c1843 refactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256. (AngusP) Pull request description: The first commit replaces `uint256` with typesafe `Wtxid` (or `Txid`) types introduced in bitcoin#28107. The second commit then simplifies the extra tx `vector` to just be of `CTransactionRef`s instead of a `std::pair<Wtxid, CTransactionRef>`, as it's easy to get a `Wtxid` from a transaction ref. ACKs for top commit: glozow: ACK a8203e9 dergoegge: ACK a8203e9 Tree-SHA512: b4ba1423a8059f9fc118782bd8a668213d229c822f22b01267de74d6ea97fe4f2aad46b5da7c0178ecc9905293e9a0eafba1d75330297c055e27fd53c8c8ebfd Dash adaptations: - src/blockencodings.cpp: extra_txn short IDs use GetInstanceHash() instead of GetWitnessHash(), the hash Dash computes short IDs from (no witness in Dash) - src/blockencodings.cpp: duplicate check keeps Dash's GetHash() comparison instead of upstream's GetWitnessHash(); only the .second access is dropped - src/net_processing.cpp: stores bare CTransactionRef in Dash's append-until-full ring buffer (bitcoin#35670 backport) instead of upstream's resize-based version - src/test/blockencodings_tests.cpp: short-ID call sites use GetInstanceHash() where upstream switched to GetWitnessHash(), and the stream stays CDataStream as in Dash Not applicable to Dash (intentionally omitted): - src/blockencodings.h: GetShortID(const Wtxid&): Dash has no Wtxid type and its short IDs hash the instance hash, not a witness hash; signature stays uint256 - src/blockencodings.cpp: GetShortID(const Wtxid& wtxid) definition: same reason, Dash keeps GetShortID(const uint256& txhash) - src/test/blockencodings_tests.cpp: TestHeaderAndShortIDs::GetShortID(const Wtxid&) helper: stays uint256 to match Dash's CBlockHeaderAndShortTxIDs::GetShortID
DCG-Claude
added a commit
to thepastaclaw/dash
that referenced
this pull request
Nov 18, 2026
…codings a8203e9 refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> (AngusP) c3c1843 refactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256. (AngusP) Pull request description: The first commit replaces `uint256` with typesafe `Wtxid` (or `Txid`) types introduced in bitcoin#28107. The second commit then simplifies the extra tx `vector` to just be of `CTransactionRef`s instead of a `std::pair<Wtxid, CTransactionRef>`, as it's easy to get a `Wtxid` from a transaction ref. ACKs for top commit: glozow: ACK a8203e9 dergoegge: ACK a8203e9 Tree-SHA512: b4ba1423a8059f9fc118782bd8a668213d229c822f22b01267de74d6ea97fe4f2aad46b5da7c0178ecc9905293e9a0eafba1d75330297c055e27fd53c8c8ebfd Dash adaptations: - src/blockencodings.cpp: extra_txn short IDs use GetInstanceHash() instead of GetWitnessHash(), the hash Dash computes short IDs from (no witness in Dash) - src/blockencodings.cpp: duplicate check keeps Dash's GetHash() comparison instead of upstream's GetWitnessHash(); only the .second access is dropped - src/net_processing.cpp: stores bare CTransactionRef in Dash's append-until-full ring buffer (bitcoin#35670 backport) instead of upstream's resize-based version - src/test/blockencodings_tests.cpp: short-ID call sites use GetInstanceHash() where upstream switched to GetWitnessHash(), and the stream stays CDataStream as in Dash Not applicable to Dash (intentionally omitted): - src/blockencodings.h: GetShortID(const Wtxid&): Dash has no Wtxid type and its short IDs hash the instance hash, not a witness hash; signature stays uint256 - src/blockencodings.cpp: GetShortID(const Wtxid& wtxid) definition: same reason, Dash keeps GetShortID(const uint256& txhash) - src/test/blockencodings_tests.cpp: TestHeaderAndShortIDs::GetShortID(const Wtxid&) helper: stays uint256 to match Dash's CBlockHeaderAndShortTxIDs::GetShortID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
vExtraTxnForCompactgives compact block reconstruction one more source for recently removed transactions.Before this PR, the first insertion resized the cache to its configured capacity, so before the cache was full,
PartiallyDownloadedBlock::InitData()also scanned default{Wtxid::ZERO, nullptr}entries that had never been added to the cache.Those unused entries could still participate in reconstruction short-id matching.
Fix: Reserve the configured capacity and append entries until the cache is full.
Once full, keep the same ring-buffer overwrite behavior, configured maximum, and replacement order.
Risk: Triggering the affected duplicate-match branch requires a block-specific 6-byte short-id collision while the extra-txn cache still contains default null slots.
With a 16-thread benchmark of the
CBlockHeaderAndShortTxIDsnonce-grinding path, the 50% collision time was ~178 days on my machine.