Skip to content

indexes: set prune lock to genesis before first block - #36150

Merged
sedited merged 2 commits into
bitcoin:masterfrom
andrewtoth:fix_prune
Sep 11, 2026
Merged

sedited merged 2 commits into
bitcoin:masterfrom
andrewtoth:fix_prune

Conversation

@andrewtoth

Copy link
Copy Markdown
Contributor

When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

Fix this by setting the prune lock to 0 if the index does not yet have a best block.

@DrahtBot

DrahtBot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36150.

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK sedited, fjahr
Concept ACK l0rinc, mzumsande
Stale ACK achow101, willcl-ark

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24230 (indexes: Stop using node internal types and locking cs_main, improve sync logic by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@l0rinc

l0rinc commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Concept ACK!
Since #34897 the locator can lag the in-memory tip while SetBestBlockIndex() still advances the lock on every update, so should we maybe derive the lock from the committed locator instead (initialize in Init(), advance in Commit(), cap at the chain height on reorg, flush and drain before pruneblockchain) and cover it with a prune-mode index test?

@andrewtoth

andrewtoth commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Since #34897 the locator can lag the in-memory tip while SetBestBlockIndex() still advances the lock on every update, so should we maybe derive the lock from the committed locator instead (initialize in Init(), advance in Commit(), cap at the chain height on reorg, flush and drain before pruneblockchain) and cover it with a prune-mode index test?

That seems out of scope for what this is fixing. If you have an unpruned node, and then add both a new index and a prune value to the config and restart, it will break on indexing because it will prune first before syncing the index. This is not about a lagging locator, but startup failing to lock the prune height for an empty index.

@mzumsande mzumsande left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 39e4a6b

@DrahtBot
DrahtBot requested review from l0rinc and mzumsande September 3, 2026 19:05
@andrewtoth

andrewtoth commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

I hope this can get in before v32 cutoff.
If you restart your non-pruned node with a prune target and a new index, you will first prune then crash on starting to index. Then you are S.O.L. with your new index and your only recourse is to do a full -reindex. I came across this while testing #36002.

It's a very simple fix. I assume the original check for block was intended as a null guard, but it should really set it to genesis instead of skipping the prune lock.

Here's a reproducer. I'm not sure it's worth putting it in the codebase though.

#!/usr/bin/env python3
from feature_pruning import mine_large_blocks
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_greater_than


class IndexPruneStartupTest(BitcoinTestFramework):
    def set_test_params(self):
        self.setup_clean_chain = True
        self.num_nodes = 1

    def run_test(self):
        node = self.nodes[0]
        self.log.info("Build an unpruned chain exceeding the minimum automatic prune target")
        mine_large_blocks(node, 1020)
        height = node.getblockcount()

        self.log.info("Enable automatic pruning and a fresh blockfilterindex on the same restart")
        self.restart_node(0, extra_args=["-prune=550", "-blockfilterindex=1"])
        self.wait_until(lambda: node.getindexinfo() == {
            "basic block filter index": {"synced": True, "best_block_height": height},
        })


if __name__ == "__main__":
    IndexPruneStartupTest(__file__).main()

@sedited sedited added this to the 32.0 milestone Sep 8, 2026

@l0rinc l0rinc left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not about a lagging locator, but startup failing to lock the prune height for an empty index.

Sure, let’s fix startup here and address the lock advancing beyond the committed index state separately.


The problem we're fixing here was introduced in #21726, which included the genesis fallback at one stage, but lost it without a regression test catching it, so we should learn from that and add one here.

Luckily, DeletePruneLock() already returns whether the lock existed, so we can check that and just reinitialize the index in blockfilter_index_initial_sync.
I’ve prepared characterization + fix commits in l0rinc/bitcoin#296 as a demo.

@DrahtBot
DrahtBot requested a review from l0rinc September 8, 2026 23:09
@andrewtoth

Copy link
Copy Markdown
Contributor Author

Thanks @l0rinc, I added the characterization test in the first commit and updated to the regression test in the second commit. I think the functional test suite is more appropriate for this, since we want to make sure we can startup and sync a new index when we introduce pruning at the same time. This functionality could possibly fail in other ways in the future, even if the underlying prune locks are correctly applied.

Comment thread test/functional/feature_pruning.py Resolved

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-ACK 6d7caa1

@DrahtBot
DrahtBot requested a review from l0rinc September 9, 2026 14:27
@achow101

achow101 commented Sep 9, 2026

Copy link
Copy Markdown
Member

ACK 6d7caa1

Comment thread test/functional/feature_pruning.py Resolved
Comment thread test/functional/feature_pruning.py Resolved
@DrahtBot
DrahtBot requested a review from l0rinc September 10, 2026 07:01

@willcl-ark willcl-ark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 6d7caa1

The genesis prune lock is set before startup pruning, preserving the blocks the index needs when they're available.

Did not run the reproducer from the comments.

When setting both a new index and prune size and restarting
an unpruned node, the node will prune the block store first
and then the index will fail to start syncing.

Fix this by setting the prune lock to 0 if the index does not
yet have a best block.

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-ACK 9b22995

@fjahr fjahr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK 9b22995

Comment thread src/index/base.cpp
if (AllowPrune()) {
node::PruneLockInfo prune_lock;
prune_lock.height_first = block->nHeight;
prune_lock.height_first = block ? block->nHeight : 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Wouldn't have hurt to add a comment here, to the effect of what's in the commit message.

@sedited
sedited merged commit a6b3309 into bitcoin:master Sep 11, 2026
29 checks passed

@willcl-ark willcl-ark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge reACK 9b22995

Kino1994 pushed a commit to Kino1994/bitcoin-full-history that referenced this pull request Sep 13, 2026
…e first block

9b2299514028f5055d4314e402776cbb45c5f538 indexes: set prune lock to genesis before first block (Andrew Toth)
0ae3b40c274a37a870f91a27ed6b2e70dda4ea29 test: characterize startup with newly added prune and index (Andrew Toth)

Pull request description:

  When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

  Fix this by setting the prune lock to 0 if the index does not yet have a best block.

ACKs for top commit:
  sedited:
    Re-ACK 9b2299514028f5055d4314e402776cbb45c5f538
  fjahr:
    Code review ACK 9b2299514028f5055d4314e402776cbb45c5f538

Tree-SHA512: fff46c65c6350bdcbb3e0bbc8cde655c619ce48c19730e3caf3175257f7d3cb1abb8cce07f84cf78e20e54f9e3e4963da072cdde6d01a1ceb8a731920220cd13
@andrewtoth
andrewtoth deleted the fix_prune branch September 28, 2026 12:40
alexanderwiederin added a commit to alexanderwiederin/rust-bitcoinkernel that referenced this pull request Oct 6, 2026
…8aedda9e983

38aedda9e983 test: add kernel tapscript v2 evaluation coverage
7d10a1c7a3c2 kernel: expose tapscript v2 script evaluation
4d9d46470a04 script: extract tapscript v2 witness execution
16c0ca94bf8f kernel: add varops to ScriptTraceFrame in Kernel API
599682f1815f kernel: add varops to script tracer
01d61cb08ebd script: extend trace hooks to tapscript v2 evaluation
231b0b2c80d7 kernel: Add script tracer
82cfa2cd9c47 bench: add BIP 440 varops calibration tool
a87b56a1fdae fuzz: add tapscript v2 and Val64 targets
b45d72f04a78 rpc: report script restoration deployment
9afee38c25c0 test: add tapscript v2 functional coverage
133151204f20 test: add BIP 440/441 unit coverage
a5a612b4bb3a script: support tapscript v2 in signing and utilities
0575a794c6b7 script: implement tapscript v2 evaluation
7be8cda33f5d consensus: add BIP 441 script restoration deployment
ecf3a0eb3e49 script: copy EvalScript for tapscript v2
004f8a6fc936 script: plumb transaction-wide varops budgets
cf43ac7d1f77 script: define tapscript v2 limits and opcode classification
ecd26db635fe script: add size-accounting stack for tapscript v2
ecc7779e4f74 test: add Val64 unit coverage
5c526ff67219 script: add Val64 for BIP 441 arithmetic
b6f80778126e script: define varops budgets and costs
ced4c6e6ab47 Merge bitcoin/bitcoin#36321: net: cast vector size to avoid overflow, truncation, sign change
e7a18350967f Merge bitcoin/bitcoin#36235: ci: fail iwyu job on compiler errors instead of silently logging them
05bc2f53ce0c Merge bitcoin/bitcoin#36024: ci: Make `test_bitcoin-qt.exe` output visible
ed7dd7cf4e15 Merge bitcoin/bitcoin#34371: wallet: allow importprunedfunds for spending transactions
f80aaf4bd7c6 Merge bitcoin/bitcoin#29278: Wallet:  Add `maxfeerate` wallet startup option
e19f83e944e9 Merge bitcoin/bitcoin#35984: sign: skip signing SIGHASH_SINGLE inputs with no corresponding output
ab8033566757 Merge bitcoin/bitcoin#36135: fuzz: test HTTPRequest state machine in http_request
65e075f89fdd Merge bitcoin/bitcoin#35696: i2p: update leaseset encryption types
d26f19c77c7b Merge bitcoin/bitcoin#35948: init: correct first-run disk space estimate
90374132737e Merge bitcoin/bitcoin#36335: Remove my key from SECURITY.md
f6b19b190b2e Merge bitcoin/bitcoin#36322: init: fee estimates can lag behind the chain after restart
5820537e1b4b Remove my key from SECURITY.md
da03790dbb11 Merge bitcoin/bitcoin#36324: test: Fixup MAX_BODY_SIZE http throttling test
37969fc15211 Merge bitcoin/bitcoin#36312: net: don't discourage private broadcast peers
e8e7e91a1144 Merge bitcoin/bitcoin#36284: wallet: don't double discard output groups with avoidpartialspends
8c27c3852641 init: drain callbacks before saving fee estimates
08729e6ef9c9 test: characterize fee callback loss at shutdown
308cd670195d net: cast vector size to avoid overflow, truncation, sign change
bfdcd9797cd1 Merge bitcoin/bitcoin#35890: doc: use overwrite (>) instead of append (>>) for one-shot PSBT files in offline-signing-tutorial.md
de9f42c497df Merge bitcoin/bitcoin#36316: ci: use POSIX threads for Nix Windows builds
fa2c62036b1d test: Fixup MAX_BODY_SIZE http throttling test
5c726f2058a4 Merge bitcoin/bitcoin#35675: mining: add block template manager
26241482e530 Merge bitcoin/bitcoin#35923: mempool: count unbroadcast txids in memory usage
a632d4f697f3 Merge bitcoin/bitcoin#35177: test: use MiniWallet for getblockstats test data generation
be5d0b5503fa Merge bitcoin/bitcoin#35301: Silent Payments: Implement bip352 (take 2)
b3f846ec3e5c Merge bitcoin/bitcoin#35440: wallet: check descriptor cache xpub length before decoding
dc3cd1969ed3 Merge bitcoin/bitcoin#35809: contrib: add deterministic fuzz coverage mode
81e2de897dbc Merge bitcoin/bitcoin#35893: test: cover submitpackage other-wtxid for same-txid-diff-witness
eab6630addc3 net: don't discourage private broadcast peers
31754523cd81 Merge bitcoin/bitcoin#36309: private broadcast: clarify claims, mark as experimental
9fd18aedb088 ci: print Windows cross compiler thread model
1d59d5ad2550 ci: use POSIX threads in Nix Windows cross shell
e3ee0ebd89e9 tests: add BIP352 test vectors as unit tests
f133d1373af6 common: add bip352.{h,cpp} secp256k1 module
96d487c11e8f ci: raise BuildKit step log limit
44997c391afc Add "sp" HRP
356c91f6ae51 crypto: add KeyPair::GetSecpKeypair
2b95b45a9abd Merge bitcoin/bitcoin#35813: wallet, rpc: Add listrawtransactions RPC
71c30b608382 Merge bitcoin/bitcoin#27052: test: rpc: add last block announcement time to getpeerinfo result
d36f4a1788da Merge bitcoin/bitcoin#36155: doc: remove json quoting from gettxoutsetinfo and getblockstats cli examples
b7211ba80cde Merge bitcoin/bitcoin#34717: p2p: remove m_getaddr_sent
7ee3d622e5fa Merge bitcoin/bitcoin#35752: wallet: make encryption state updates atomic
f41372998377 private broadcast: mark feature as experimental
2630d8e6c9d6 doc: scope claims about private broadcast feature
248ce46faf70 Merge bitcoin/bitcoin#35619: test:  ExtendedPrivateKey follow-ups
995da8678a02 Merge bitcoin/bitcoin#36302: ci: simplify macOS codesign check
db7ec4fb9762 refactor: (de)serialize CExtKey/CExtPubKey through streams
cb69853fc160 wallet: check descriptor cache xpub length before decoding
f86cbf53eb3e Merge bitcoin/bitcoin#36310: rpc: clarify that `getaddrmaninfo` counts unique addresses
bbc40ede1ba6 Merge bitcoin/bitcoin#36261: test: cover PSBT unknown field merging
f839ee1afb0f Merge bitcoin/bitcoin#35887: ipc: use std::optional for checkSpawned(), add tests and rename arg -ipcfd to -ipcchild
dac53c585b6a Merge bitcoin/bitcoin#31888: contrib: Support re-writing linearize-data dumps
0d34b6e9287f rpc: clarify that getaddrmaninfo counts unique addresses
4ecbc82d412f Merge bitcoin/bitcoin#36278: Update minisketch subtree to latest master
622817f097d6 ci, iwyu: fail job on compiler errors instead of ignoring them
5ca3773414df Merge bitcoin/bitcoin#36298: Update crc32c subtree to latest master
5945cb83ddcf contrib: add deterministic fuzz coverage mode
69ad2a67f26c Merge bitcoin/bitcoin#36283: kernel: expose transaction version
716e8605e5c8 ci: simplify macOS codesign check
bb5296576e8f Merge bitcoin/bitcoin#36206: build: drop use of `OBJC_OLD_DISPATCH_PROTOTYPES`
170d37983c7a Merge bitcoin/bitcoin#36198: http: Add missing LIFETIMEBOUND annotations
c08489fb2741 Merge bitcoin/bitcoin#36288: build: Revert remove `cmake/script/CoverageFuzz.cmake`"
4a583f38ef2f Merge bitcoin/bitcoin#36230: wallet: Improve `HasWalletDescriptor` performance and other canonical descriptor string followups
5f05d8c5f6dd Merge bitcoin/bitcoin#36297: rpc: Correct invalid OpenRPC defaults
b7f740c594ba rpc: Correct OpenRPC default metadata
2c8372db1131 Update crc32c subtree to latest master
5181c61d734f Squashed 'src/crc32c/' changes from efb8ea04e4..60bcf13edf
83434f7683e4 kernel: expose transaction version
7c311f5c6c3e doc: Add release notes for listrawtransactions
b377786df14e test: Add functional test for listrawtransactions
605c4fd3aee0 wallet, rpc: Add listrawtransactions RPC
ba6c179ba07c wallet, rpc: allow omitting parent_descs from TransactionDescriptionString
d48e76e689bb Merge bitcoin/bitcoin#36286: crypto: Fix MuHash3072 division by itself
719324977a41 test: Check that ineligible output groups are discarded only once
6d2414542b86 wallet: reuse unlock and passphrase change errors
593554622e2c wallet: return passphrase errors with Expected
f949b3ba2ad7 wallet: publish descriptor keys after writes
e3712b7d492f test: characterize descriptor insertion failure
bd558107784c wallet: abort failed descriptor key erases
537e79191585 test: cover encrypted descriptor key insertion
d8a6f5e48d6b wallet: abort failed descriptor key writes
14ce3fdb493a test: characterize descriptor key failures
5bc0be16fe4d wallet: reject failed passphrase changes
ee6d45a07e3a test: characterize passphrase write failure
2daa2f94f4a2 wallet: restore lock state before re-encryption
8b23fa47737a wallet: abort failed encryption transactions
e6c374d30201 test: characterize encryption transaction failures
70381010c0af refactor/test: add wallet failure injection
0e9018e8b656 Merge bitcoin/bitcoin#36249: net, rpc: Asmap version improvements/follow-ups
61edcf925325 test: Add 31.1 to wallet back compat
ebf2f69ee819 test: Simplify miniscript descriptor check in wallet back compat
f6cbcfd98a00 wallet: Document WalletDescriptor::UpdateFrom
f0f6dce84963 descriptor, doc: Clarify miniscript CompatDescriptorHash
405b1d6055e7 descriptor: Explicitly handle use_apostrophe cases
64abb3e8d361 wallet: Compare descriptors by hash of canonical string
bb5e8320d76f wallet: Make WalletDescriptor's descriptor const
4cc00f7bc04b wallet: Remove WalletDescriptor's default constructor
dc3e2bc6df68 wallet, rpc: extract PushTxAmountAndFee/PushTxDecoded helpers
b388f9bd0d2b crypto: Fix MuHash3072 division by itself
4f624bb82ddf Revert "build: Remove `cmake/script/CoverageFuzz.cmake`"
ad97933af248 Merge bitcoin/bitcoin#36285: refactor: Use static const over inline const to work around ld64 bug
a604a7647588 Merge bitcoin/bitcoin#36282: Update leveldb subtree to latest master
fa8fefb29b6c refactor: Use static const over inline const to work around ld64 bug
2bbbeaa663ec Merge bitcoin/bitcoin#34861: wallet: Add importdescriptors interface
20307f0ac0e1 wallet: don't double count discarded output groups with avoidpartialspends
7528f799d99d Update leveldb subtree to latest master
4be88b9bce45 Squashed 'src/leveldb/' changes from 13da2d6758..53a1914e00
749bd10fdf01 Update minisketch subtree to latest master
fcb2d832b2d9 Squashed 'src/minisketch/' changes from 4a179c61e3..a12f5de1c9
21e4ea8134d8 test: cover PSBT unknown field merging
59f7f3d07d95 build: drop use of OBJC_OLD_DISPATCH_PROTOTYPES
b82158554372 Merge bitcoin/bitcoin#33593: guix: Use UCRT runtime for Windows release binaries
0b353a9e872e netgroup: Cache asmap version
fb68c27002a7 Merge bitcoin/bitcoin#36260: torcontrol: Use reconnect backoff after dropped connections
7dedc4545a49 Merge bitcoin/bitcoin#36256: guix: Update osslsigncode to 2.14
a687188101af Merge bitcoin/bitcoin#36160: refactor: Minor improvements to HTTP unit tests
651e44f32797 Merge bitcoin/bitcoin#36194: kernel: expose block header Merkle root
d32a515fb0bb Merge bitcoin/bitcoin#34566: feature: Use different datadirs for different signets
59a465ce3782 guix: Validate codesigned windows binaries
66eeac216ad5 guix: Use osslsigncode 2.14
4556ef626754 torcontrol: Apply reconnect backoff after dropped connections
57721f8074c2 Merge bitcoin/bitcoin#36253: fuzz: Use `LIMITED_WHILE` in `connect_block`
dadca55f60ad Merge bitcoin/bitcoin#36251: rest: add `generated` and `height` to spenttxouts JSON
de394ad3b739 Merge bitcoin/bitcoin#36207: kernel: add wtxid accessor
f69e56bc1c43 [doc]: add release notes
40ab7aa90de5 [wallet]: warn when `-maxtxfee` conflicts with `-minrelaytxfee`
df1feeb487dc [wallet]: enforce `-maxfeerate` on wallet transactions
d2c832e9e79d [util]: add a new transaction error type
633c08d3f7af [node]: update `BroadcastTransaction` to check fee rate limit
7bfce65801bf [wallet]: add `maxfeerate` wallet startup option
607568f2b002 [wallet]: update `max_fee` to `max_tx_fee`
6b913b6224bd doc: add missing verb to make sentence readable
a9c39696f4be scripted-diff: rename `m_default_max_tx_fee` to `m_max_tx_fee`
16278c28166b kernel: expose block header Merkle root
51ddab532cb3 Merge bitcoin/bitcoin#35819: test: add coverage for untested descriptor parse error paths
2c249dbdf5c9 wallet: Add an importDescriptors() interface for the wallet
3be5f401370e wallet: add CheckDescriptorRangeBounds
43bba1ed74f8 kernel: expose transaction witness presence
31224d068077 kernel: expose transaction wtxid
a9cd985d0a54 wallet: Move ImportDescriptor and ProcessDescriptorsImport to imports.cpp
c9650d8f0e2f wallet: rename ProcessDescriptorImport to ImportDescriptor and add ProcessDescriptorsImport
a40ee4ec2659 wallet: rpc: refactor: ProcessDescriptorImport returns ImportDescriptorResult
48d3d717fb6e wallet, util: Add HandleWalletErrorCode
04c73a91d2cc wallet: Add ImportError struct and new WalletError codes
975215618505 wallet: rpc: refactor: Extract UniValue processing from ProcessDescriptorImport
f1f61af35727 wallet: Add ImportDescriptorRequest structs
7375124f4c9a wallet: refactor: make is_ranged no longer an optional
90485103c67d wallet: lower the minimum timestamp to 0
380d3ae0deab wallet: rpc: Use std::optional in GetImportTimestamp
e0229ca68515 fuzz: Use LIMITED_WHILE in connect_block
1566a4767afd rest: add generated and height to spenttxouts JSON
cff00c547e74 Merge bitcoin/bitcoin#34743: p2p: don't disconnect manual peers for block stalling
a09a81ebfce3 Merge bitcoin/bitcoin#35961: depends: Update `boost` package to 1.92.0
76343a09f802 Merge bitcoin/bitcoin#36186: test: return False for a too-short ECDSA signature
5551d39b202b doc: document manual peer stalling behavior
24628d3ae7dc test: cover manual peer block download cooldown
4c79f3a34d00 test: support manual connections in addconnection
698b5bbf3a0a p2p: pause stalling manual block downloads
c38e0d20c3c0 Merge bitcoin/bitcoin#36093: test: ipc should reject invalid json
a49fa1f6e698 Merge bitcoin/bitcoin#35849: init: don't suggest -reindex-chainstate for recovery on a pruned node
dd3c62c55fdc Merge bitcoin/bitcoin#36083: test: cover getrawtransaction on a stale block via txindex
36c1b149fe37 Merge bitcoin/bitcoin#35472: test: add coverage for feebumper uncomputable cluster error path
7c4facb51bbe Merge bitcoin/bitcoin#36081: rpc: add bestblockhash to getmininginfo
c1e9d15406fb doc: Describe how to verify the asmap in use
87ce88c1b53c rpc: Add asmap_version to getnetworkinfo
dd5a8a63b223 test: Check embedded asmap version log and addrman re-bucketing
d9d057841029 Merge bitcoin/bitcoin#34681: wallet: move rescan logic into ChainScanner and wallet/scan
2ca83ba2622a Merge bitcoin/bitcoin#35436: wallet: Add addHDkey interface
0bc87365cac1 init: Log asmap version from NetGroupManager
fdfd196908e1 rpc: Reuse AsmapVersion in exportasmap
adca0a97406d Merge bitcoin/bitcoin#36247: iwyu: Always keep `bitcoin-build-info.h` header
1aa500b6b7d8 iwyu: Always keep `bitcoin-build-info.h` header
d25470d992b7 Merge bitcoin/bitcoin#35975: wallet: Fix `CWalletTx` malleated transaction metadata sync
2c6047df8746 test: Bumping a transaction prevents bumping malleations
a44f9ad35058 test: Test rbf metadata sync of malleated tx
752fd437c7cf wallet: persist synced metadata and do not sync on load
31eedfc6fc8b wallet: simplify wtx metadata sync
6c16d76f790c wallet: sync tx replacement metadata to malleated txs
34533d5d22b6 wallet: Clarify IsEquivalentTo is actually checking malleation
b973a355c4eb Replace CTransaction::operator== with Equals that has options
8df006f23383 wallet: skip signing SIGHASH_SINGLE inputs with no corresponding output
3d7d190b6995 ci: enforce iwyu for block template manager
ffe3a631f38b node: remove NodeContext::mining and EnsureMining
6c71166bcfa4 test: create templates via BlockTemplateManager
ec4f24ef181a rpc: wait for tips via BlockTemplateManager
8372721f20e2 rpc: build generation templates via BlockTemplateManager
38556f817e06 rpc: only copy the header in getblocktemplate
951fac807d37 rpc: do not copy template data in getblocktemplate
0998c0bbdfcc rpc: build getblocktemplate via BlockTemplateManager
011cbfbcd2e3 rpc: route getblocktemplate internals through node
400ac328c91b interfaces: create block template via BlockTemplateManager
037d3519f2ff node: move tip and wait helpers into BlockTemplateManager
07964c525d47 miner: move SubmitBlock into BlockTemplateManager
bcdadf2b7111 node: move mining_args to BlockTemplateManager
482a5d27124c node: introduce BlockTemplateManager
2efaa6763bd2 wallet: simplify and restrict SyncMetaData to malleated txs
fc718ade4fce test: Test that metadata is synced to malleated transactions
17817818da3c Merge bitcoin/bitcoin#36228: ci, iwyu: generate embedded ASMap header explicitly
1cbbf64ea810 ci, iwyu: generate embedded ASMap header explicitly
1afa0cd70a09 cmake: add raw data header generation target
0476444e33bd Merge bitcoin/bitcoin#35935: wallet: Avoid unnecessary wtxvariant rewrites
feeb00af8cf3 cli: Add -signetchallenge info on RPC auth error
c47ea370dc9f doc: Update documentation for signet datadir
6f8c43f9efc6 test: Add signet datadir tests
9b37d42b23be Use different datadirs for different signets
6bdcae3f768b refactor: Import signet constant and helper from kernel/signet.h
f3fec67c3eeb Merge bitcoin/bitcoin#36227: Pre 32.x branching updates
9a48134aea11 docs: Update bips.md
57d3d0013054 build: Bump version to 32.99
4d463de80408 Merge bitcoin/bitcoin#36226: doc: Move release notes to wiki ahead of branch-off
5df082721cdb doc: Move release notes to wiki ahead of branch-off
8c64ff02425d Merge bitcoin/bitcoin#34914: contrib: replace deprecated --deep codesign flag, fix accidental --verify skip on ci
501ba4cad4b3 Merge bitcoin/bitcoin#36196: contrib, kernel: fixed seeds, chainparams, headerssync params, and assumeutxo updates pre-32.0
92986c736223 Merge bitcoin/bitcoin#36213: Release: 32.0 translations update
1a4e034ddbdc Merge bitcoin/bitcoin#36209: guix: cache GUI depends separately
a6b330973e64 Merge bitcoin/bitcoin#36150: indexes: set prune lock to genesis before first block
fed50258f8f0 kernel: add recent assumeutxo snapshot
7eb4cec1a983 kernel: Update headerssync params
9b2299514028 indexes: set prune lock to genesis before first block
fc6923cec5b4 Merge bitcoin/bitcoin#36215: asmap: Make version match externally computed hashes
2c2667eaa902 qt: 32.0 translations update
51b540c59aae Merge bitcoin/bitcoin#36218: build: avoid `pipe2` on Darwin (for now)
a42da819a96c Merge bitcoin/bitcoin#36174: http: throttle send buffer when client stops draining
da7d7dbc7c00 contrib: remove deprecated --deep codesign flag
9c7748315d31 build: avoid pipe2 on Darwin (for now)
1fe87c250547 guix: cache GUI depends separately
7ee94bf4b023 asmap: Make outputted ASMap version match externally computed hashes
4a15e0b6f9c5 Merge bitcoin/bitcoin#36195: test: `get_previous_releases.py` use `PREVIOUS_RELEASES_DIR`
b5ef74b248cd Merge bitcoin/bitcoin#36211: doc: Fix PR reference in productivity guide
5a5b1ed7471f Merge bitcoin/bitcoin#36201: Update embedded asmap to 1788801420
b3a9b84b37c0 doc: Correct upstream-pull reference
fc4f35fdce4d Merge bitcoin/bitcoin#35513: rpc: help metadata fixes
af83bacdf9d6 Merge bitcoin/bitcoin#36202: doc: add rel note about potential CJDNS removal
ecdf9db906b4 test: get_previous_releases.py use `PREVIOUS_RELEASES_DIR`
28b69e298884 http: stop processing requests from a client when send buffer is full
ad4eeaf859c4 ci: avoid modifying GOAL in 03_test_script.sh
7e75b3b922f9 Merge bitcoin/bitcoin#36116: iwyu: Fix warnings in `src/rpc` and treat them as errors
9d4325f40316 Merge bitcoin/bitcoin#36203: Update secp256k1 subtree to latest master
3c91db262b74 net: Update embedded asmap to 1788801420
ffe6aa57fef1 Merge bitcoin/bitcoin#36199: net: treat RFC 9637 new IPv6 documentation range as invalid
00d0c5107b92 test: return False for a too-short ECDSA signature
ba9050ac9b35 Update secp256k1 subtree to latest master
da3401e50fc1 Squashed 'src/secp256k1/' changes from 687155df6b..a7f264373e
7d54a88b4453 iwyu: Fix warnings in `src/rpc` and treat them as errors
462ff18d79bd iwyu, refactor: Fix includes in some source files
2285d1931aa8 Merge bitcoin/bitcoin#35468: ci, iwyu: Request IPC file generation explicitly
b48a27691ded fuzz: assert invalid addresses are not routable
e6c775c6d63a net: treat RFC 9637 new IPv6 documentation range as invalid
005ea9f42e50 Merge bitcoin/bitcoin#35778: scripted-diff: Use C.UTF-8 locale in all shell scripts
064122af269b Merge bitcoin/bitcoin#36181: ci: Upgrade IWYU to 0.27 compatible with Clang 23
99f81fe0296b Merge bitcoin/bitcoin#35303: policy: fix negative CFeeRate::ToString() formatting
46654094beef lint: Use C.UTF-8 locale only in shell scripts
d6a2341632a0 doc: add rel note about potential CJDNS removal
fb26bc9cfefe Merge bitcoin/bitcoin#35445: wallet, descriptor: Revert `StringType::COMPAT` for Miniscript expressions and drop the concept of a Descriptor ID that can be validated
494300f4cc92 Merge bitcoin/bitcoin#35796: depends: fix IPC listeners on macOS dying when accepting a dead socket
42d93d40de35 kernel: update chainTxData
a25511dfbcd3 kernel: update defaultAssumeValid and minimumChainWork
67726a63a41f kernel: update assumed blockchain and chainstate sizes
fcfc1df041b8 contrib: Update fixed seeds
6385aa1df8ab contrib: Update makeseeds for 30.3 and 31.x
0ae3b40c274a test: characterize startup with newly added prune and index
4c9d55a6125a Merge bitcoin/bitcoin#36076: psbt: preserve sighash type when merging inputs
59fd053dac83 Merge bitcoin/bitcoin#34931: validation: abort on DB unreadable coins instead of treating them as missing
33a363ea2508 Merge bitcoin/bitcoin#36168: PSBT: Make input/output `Merge()` methods return void
0b46fc9c5935 http: Add missing LIFETIMEBOUND annotations
ea785a31f783 psbt: preserve sighash type when merging inputs
013b0b2de481 Merge bitcoin/bitcoin#36176: wallet: avoid a crash when creating a wallet with -nosettings
2ed4be47213f Merge bitcoin/bitcoin#36113: psbt: fix rendering for invalid long sighash type field
19b0ff2fa050 Merge bitcoin/bitcoin#36136: rpc: remove stale "canonical form" claim from getdescriptorinfo help
0c6f2af97b5c Merge bitcoin/bitcoin#36127: wallet: remove unused code
3b944f194fdd iwyu: Switch to generated Clang intrinsics mapping file
1b5ee3be5948 ci: Upgrade IWYU to 0.27 compatible with Clang 23
6ed7c535adb0 iwyu: Prefer canonical headers
35104a8654f8 Merge bitcoin/bitcoin#35949: miner: Enforce Murch-Zawy rule (BIP54)
51db0e7696ed Merge bitcoin/bitcoin#36096: rpc: avoid quadratic JSON construction when keys are unique
161a9add8e02 Merge bitcoin/bitcoin#35164: test: cover P2SH sigop counting in test_witness_sigops
a174dd4017cf Merge bitcoin/bitcoin#36161: build: Remove `cmake/script/CoverageFuzz.cmake`
b557fb2728e9 Merge bitcoin/bitcoin#36164: util: diagnose dangling views of temporary strings
5f0daa0eae80 Merge bitcoin/bitcoin#36169: http: Use SO_EXCLUSIVEADDRUSE on Windows
a34fc8b11a42 wallet: handle disabled startup settings
b7113e6f42c2 test: characterize disabled wallet settings
f0c839ace5a2 Merge bitcoin/bitcoin#36123: http: throttle per-connection reads while a request is in flight
0f206eed51e2 Merge bitcoin/bitcoin#36130: test: add tests in transaction_tests.cpp covering live mutants
0b43dea121fc Merge bitcoin/bitcoin#36163: test: Add coverage for unsatisfiable locktime combination in PSBT `ComputeTimeLock()`
3596658af5eb Merge bitcoin/bitcoin#36166: validation: refactor: encapsulate Chainstate::m_target_blockhash
f32bfb25934f Merge bitcoin/bitcoin#35738: coins: parallel input prevout fetching followups
bcb09b3f4aec qa: Verify HTTP listen port exclusivity
af65069fd15b windows: Use SO_EXCLUSIVEADDRUSE over SO_REUSEADDR
82deb69111f1 PSBT: Make input/output `Merge()` methods return void
f04b0c31627a refactor(test): Make test method use Uppercase, shorten enum values
6eea8e313cce refactor(test): Simplify HTTP response check
852f201e09cb validation: refactor: encapsulate Chainstate::m_target_blockhash
fca8fef8f903 fuzz: assert HTTP framing is independent of stream segmentation
b57b0dbebd56 util: annotate `Split` input lifetime
34c5dc0583dd util: annotate string view input lifetimes
c368de3eec9c fuzz: exercise the HTTPRequest state machine
00a5f9b7375e build: Remove `cmake/script/CoverageFuzz.cmake`
69a640e05ec0 test: Add coverage for unsatisfiable locktime combination in PSBT ComputeTimeLock
5ce3a0b4aab5 test: cover legacy sigops count CHECKMULTISIG inaccurately
a5fc82e2b140 test: cover enforce BIP68 to tx versions higher than 2
bba1d4150ee8 test: cover IsFinalTx requires every input to be SEQUENCE_FINAL
4519933391dd Merge bitcoin/bitcoin#36137: validation: use unused SetTargetBlockHash
4ec6ff022a4b Merge bitcoin/bitcoin#36100: ci: use LLVM 23 in *san, fuzz, *cross jobs
7f0c4020e8d3 Merge bitcoin/bitcoin#36118: test: tolerate race condition in interface_http.py
455080105835 validation: use unused SetTargetBlockHash
5ba9af6b6922 ci: pass LIBCXX_INCLUDE_TESTS=OFF to LLVM build
feb3bd46e4c8 clang-tidy: remove some performance-* options
b4bd12d3d5d6 ci: use LLVM 23 in *san, fuzz, *cross jobs
d840adb9da54 Merge bitcoin/bitcoin#36144: rpc: detail x-bitcoin-unit in openrpc help
f41b917f47cd Merge bitcoin/bitcoin#36145: qa: Use IP_PORTRANGE_HIGH on OpenBSD for dynamic port allocation
d5fbe61f55b2 Merge bitcoin/bitcoin#35958: net: align v2 message type validation with v1 range
64ab0a06979e Merge bitcoin/bitcoin#36148: test: Avoid unsafe memory race in index_reorg_crash shutdown
57a79c69627d doc: remove json quoting from gettxoutsetinfo and getblockstats cli examples
a51df9b0ecf6 test: tolerate race condition in interface_http.py
fab80e82c108 test: Avoid unsafe memory race in baseindex_no_commit_ahead_of_flush
b811aeabad94 Merge bitcoin/bitcoin#36048: util: keep wallet names literal in notification commands
fa0f14ef5e76 test: Avoid unsafe memory race in index_reorg_crash shutdown
faf9c8e8a12c test: Clarify index.GetSummary().synced state in index_reorg_crash
a34861d280b3 test: unify how to avoid the creation of the default wallet in nodes
3458837a0b76 test: use ExtendedPrivateKey in wallet_importdescriptors.py
59ebf558f345 qa: Use IP_PORTRANGE_HIGH on OpenBSD for dynamic port allocation
6f6b2bbde244 Merge bitcoin/bitcoin#35808: fuzz: reset connman state in p2p targets
e85e27976bfb rpc: detail x-bitcoin-unit in openrpc help
3d1004cb9b8f http: throttle per-connection reads while a request is in flight
db39de560109 doc: add `-walletnotify` security note
1f9dfabef641 refactor: use string views in `ReplaceAll`
469b0e59a29a util: make `ReplaceAll` literal
604d7e8fdd95 test: characterize walletnotify shell injection
4efaa6763a7e test: simplify `ReplaceAll` coverage
793e22eed586 test: cover getrawtransaction on a stale block via txindex
a84fbf9dfd2c test: name the getrawtransaction test nodes
74ddf1c0a0ef refactor: use structured bindings for map entries
21d5d5cb7390 rpc: append unique container keys directly
23e512a58e69 rpc: avoid quadratic prioritised transaction JSON
9f0543d69a13 wallet: remove unused DatabaseOptions members
dc0395c5858a Merge bitcoin/bitcoin#36112: ci: Exclude subtrees from iwyu
37c57bc5c297 Merge bitcoin/bitcoin#36065: test: refactor: Remove confusing ignore_errors=True
8157964e66ce Merge bitcoin/bitcoin#36134: doc: Correct comment about which subsystem detects lagging clocks
259553c6628a Merge bitcoin/bitcoin#36131: rpc: Improve two field's OpenRPC types
1dad06eff3d5 remove stale canonical form claim from getdescriptorinfo help
55390d1827c7 doc: Correct comment about which subsystem detects lagging clocks
fe3c92cfe0da Merge bitcoin/bitcoin#36102: util: Replace !ContainsNoNUL() with ContainsNUL()
d23b53e0cfbc fuzz: allow http_request inputs to reach MAX_HEADERS_SIZE
58dfcf29f6da Merge bitcoin/bitcoin#35351: net: Disallow invalid HeadersSyncState due to lagging clock
c0ed327845be Merge bitcoin/bitcoin#36103: validation: remove unused code
78e691ea10a1 rpc: Change listunspent's ancestorfees type to NUM
73fb9ced563c rpc: Fix private key type in signrawtransactionwithkey
128e5c6805a0 Merge bitcoin/bitcoin#35477: test: exercise Schnorr signature cache in txvalidationcache_tests.cpp
bbed824a64f0 wallet: remove unused warnings parameter from CreateFromDump
2f6aa41d3d19 wallet: remove unused WalletDatabase::m_refcount
f64b3fa70f6a wallet: remove unused CHDChain keypool index members
4afc7bc40d4f wallet: remove unused COutput::ToString
a0e9aac42802 wallet: remove unused DescriptorScriptPubKeyMan::AddDescriptorKey
56af5e072a0d fuzz: extract http_request parse and framing check into helpers
d2e24e951de4 Merge bitcoin/bitcoin#36054: test: add script_tests cases covering interpreter mutants
75f64e50c67d test: exercise node abort on UTXO deserialization failure
4652cd0d828a txdb: detect UTXO deserialization errors via CDBWrapper::TryRead()
5dfbb91b6cc5 dbwrapper: add TryRead() to distinguish errors from valid outcomes
ca7162cde58e Merge bitcoin/bitcoin#35868: rpc, wallet: fix invalid JSON in HelpExampleRpc curl examples
d0e777baf5e2 Merge bitcoin/bitcoin#36111: rpc: bound memory for overlong Bech32 errors
fa3971011d1e ci: Exclude subtrees from iwyu
fa8566152a05 refactor: Bump old copyright header in univalue
05e49b342faa Merge bitcoin/bitcoin#36107: iwyu: Fix warnings in `src/init` and treat them as errors
1fca81960abc psbt: fix rendering for invalid long sighash type field
f14569f97d08 test: ipc should reject invalid json
858814146dd2 test: refactor Cap'n Proto exception assertions
7fcaccd9d0b7 bech32: bound overlength error locations
1bb5820b4411 wallet: Add addhdkey interface
1ad864127832 iwyu: Fix warnings in `src/init` and treat them as errors
82867073d6c3 wallet: Use WalletError for AddHDKey failures
f8769fc0b124 wallet: Move addhdkey logic into CWallet
e1a2b25d6c3b test: expand addhdkey coverage for locked wallet and bad key
21d4e0ba759b rpc, wallet, test: fix invalid JSON in HelpExampleRpc curl examples
15630c7b852c validation: remove unused m_chainparams from ATMPArgs
fa7be0a8df9d test: refactor: Remove confusing ignore_errors=True
84c5290149a3 validation: remove unused args from PolicyScriptChecks
a9d5cf7f9901 validation: remove unused args from ConsensusScriptChecks
d26dc09ee33e validation: remove unused total_vsize arg from PackageRBFChecks
2cb6c156e18b validation: remove unused PackageMempoolAcceptResult constructor
8d930981e9e1 refactor: Replace !ContainsNoNUL() with ContainsNUL()
f78834fac916 test: add missing coverage for CDBWrapper::Read() errors
1548d15de618 walletdb: Rename WriteTx to WriteFullTx
9a0628d9320d wallet: Write tx to database during CWalletTx::Update
74e1cd38f2a3 rpc: add bestblockhash to getmininginfo
ec2adf3c51ca test: Check miniscript descriptor h and apostrophe equivalence
a2d001b57c5f test: Enforce descriptor reimport is an update
e2b2f1c5c6f7 descriptor: Rename DescriptorID to CompatDescriptorHash
6ad31c062c70 test: Add 31.0 to wallet backwards compatibility test
2a6c53371be7 wallet, spkm: Treat Descriptor ID as an opaque SPKM ID
62e826fa7617 wallet: Update WalletDescriptor from another one instead of overwriting
1113f7590ed0 wallet, export: Include descriptor cache when exporting descriptors
9fc7b2618b6a spkm: Remove DescriptorSPKM constructor that doesn't take a descriptor
770ff64bd7fd test: Add v30.2 and Miniscript to wallet backwards compatibility test
35d6a60dbf5a descriptor: Add ToCanonicalString
1d87af26ce14 descriptors: Remove default StringType from PubkeyProvider::ToString()
1c7f9aaf758f miniscript: Don't use StringType::COMPAT
e07224f2d554 depends: fix IPC listeners on macOS dying when accepting a dead socket
b07810544f15 Remove MSVCRT-specific workarounds
7c86a370c8a2 doc: Update Windows build docs to reflect migration from MSVCRT to UCRT
f5910d1a3aaa ci: Remove Windows + MSVCRT jobs for cross-compiling and native testing
55f86ab1624a guix: Use UCRT runtime for Windows release binaries
4a12773f2697 test: cover DERSIG rejects a non-compound signature type
86c7fb910d67 test: cover OP_16 does not count towards the opcode limit
331bf798819c test: cover OP_WITHIN must pop all 3 elements
3bb87bc61b48 test: cover OP_FROMALTSTACK must pop the altstack
70701de7c555 ci: Make `test_bitcoin-qt.exe` output visible
ff3e2e4ebdce net: Trigger process abort when behind start block MTP
1883cecb4d05 test: Characterize lagging-clock headers presync
05e7d5731840 ipc, test: add checkSpawned() unit tests
42215b85811a init: correct first-run disk space estimate
e014e5bb61c1 miner: Enforce murch-zawy rule (BIP54)
d29b22d07897 fuzz: reset connman state in p2p targets
4200f8163a55 policy: fix negative CFeeRate::ToString() formatting
94cb65945738 depends: Update `boost` package to 1.92.0
cc577de95467 net: align v2 message type validation with v1 range
9054f7cde43a test: cover submitpackage other-wtxid for same-txid-diff-witness
1c557a380288 wallet: Add WriteTxMetadata to write just the tx record
e67f75cf7d3e wallet/scan: extract progress tracking helpers from `ChainScanner::Scan`
062aa3ce56d7 wallet/scan: extract QueueNextBlock
3655beb8f153 wallet/scan: extract block scanning logic to ScanBlock
4535dc0c7885 wallet/scan: extract block filter matching to ShouldFetchBlock
72a37031d325 wallet/scan: move WalletRescanReserver to scan files
0274e80130af wallet/scan: move RescanFromTime to ChainScanner as ScanFromTime
db9185a44464 wallet: introduce ChainScanner as a CWallet member
525163c2413e wallet/tests: pin rescan behavior
d180b891a290 test: add mixed P2SH/witness sigop accounting
c2da52d3660f wallet: allow importprunedfunds for spending transactions
db21e03c9d50 mempool: include unbroadcast txid memory
8d5c4a9290b0 test: characterize unbroadcast memory accounting
be30864ed1a6 doc: use overwrite (>) instead of append (>>) for one-shot PSBT files in offline-signing-tutorial.md
8bca7555f832 ipc, refactor: rename arg -ipcfd to -ipcchild
bd3a38f10ab7 ipc, refactor: return std::optional<mp::SocketId> from checkSpawned()
a31eb8bfa412 ci, iwyu: Request IPC file generation explicitly
0b3bb071036a test: add coverage for untested descriptor parse error paths
8e4b7ab7258a fuzz: use per-level fetch scopes in coinscache_sim
5292386b785a doc: improve CoinsViewOverlay documentation
d552c52b081c coins: log error reason when prevout fetch submission fails
2ffaa6e6a7db coins: delete Sync and SetBackend on CoinsViewOverlay
330022993fb9 coins: filter coinbase txid from parallel input fetching
adbff4d44286 init: don't suggest -reindex-chainstate for recovery on a pruned node
8976ba50a2b9 rpc: require connman in getnetworkinfo
975229580f74 rpc: Fix inaccuracies in RPC help docs
47632ab2a387 test: add coverage for feebumper uncomputable cluster error path
982ee649381f lint: Skip `libmultiprocess` subtree in `lint-shell-locale.py`
1194918a5d9c scripted-diff: Use C.UTF-8 locale in all shell scripts
13ce46ba1a79 doc: add release note for 27052
5d5397d84108 test: add functional test for block announcement time tracking
7d3d04e925c7 rpc: add last_block_announcement to the getpeerinfo output
26a25162a48a net: add m_last_block_announcement to CNodeStateStats
bb8bca630a8a change m_last_block_announcement type from int64_t to NodeClock::time_point
6e60c362bc1e test: add P2SH sigop counting coverage
412540e18d87 i2p: update leaseset encryption types
3ba1bbfa3f85 test: exercise Schnorr signature cache in txvalidationcache_tests.cpp
198b36bc85d5 test: respect "TAPROOT requires WITNESS" rule in `ValidateCheckInputsForAllFlags`
e78a2a0d00cf test: refactor: simplify tx vin/vout creation in txvalidationcache_tests.cpp
b7cbd804284b test: use MiniWallet for getblockstats test data generation
c8ee319fffa1 net: remove m_getaddr_sent
a1ecda260996 test: delete redundant addr relay assertion
e9dc16194b47 correct the linearize-data script (minor)
REVERT: e8a8daf3fad1 kernel: Add script tracer

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: 38aedda9e983f6dd1df7f3ec7bc5f1d0782e9459
knst added a commit to knst/dash that referenced this pull request Nov 3, 2026
…block

9b22995 indexes: set prune lock to genesis before first block (Andrew Toth)
0ae3b40 test: characterize startup with newly added prune and index (Andrew Toth)

Pull request description:

  When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

  Fix this by setting the prune lock to 0 if the index does not yet have a best block.

ACKs for top commit:
  sedited:
    Re-ACK 9b22995
  fjahr:
    Code review ACK 9b22995

Tree-SHA512: fff46c65c6350bdcbb3e0bbc8cde655c619ce48c19730e3caf3175257f7d3cb1abb8cce07f84cf78e20e54f9e3e4963da072cdde6d01a1ceb8a731920220cd13

BACKPORT NOTE: the feature_pruning.py restart keeps -txindex=0 and DEPLOYMENT_ARGS as the other node 0
starts in that test do, since -txindex is on by default in Dash and is incompatible with pruning.
knst added a commit to knst/dash that referenced this pull request Nov 3, 2026
…block

9b22995 indexes: set prune lock to genesis before first block (Andrew Toth)
0ae3b40 test: characterize startup with newly added prune and index (Andrew Toth)

Pull request description:

  When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

  Fix this by setting the prune lock to 0 if the index does not yet have a best block.

ACKs for top commit:
  sedited:
    Re-ACK 9b22995
  fjahr:
    Code review ACK 9b22995

Tree-SHA512: fff46c65c6350bdcbb3e0bbc8cde655c619ce48c19730e3caf3175257f7d3cb1abb8cce07f84cf78e20e54f9e3e4963da072cdde6d01a1ceb8a731920220cd13

BACKPORT NOTE: the feature_pruning.py restart keeps -txindex=0 and DEPLOYMENT_ARGS as the other node 0
starts in that test do, since -txindex is on by default in Dash and is incompatible with pruning.
PastaPastaPasta pushed a commit to dashpay/dash that referenced this pull request Nov 4, 2026
…block

9b22995 indexes: set prune lock to genesis before first block (Andrew Toth)
0ae3b40 test: characterize startup with newly added prune and index (Andrew Toth)

Pull request description:

  When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

  Fix this by setting the prune lock to 0 if the index does not yet have a best block.

ACKs for top commit:
  sedited:
    Re-ACK 9b22995
  fjahr:
    Code review ACK 9b22995

Tree-SHA512: fff46c65c6350bdcbb3e0bbc8cde655c619ce48c19730e3caf3175257f7d3cb1abb8cce07f84cf78e20e54f9e3e4963da072cdde6d01a1ceb8a731920220cd13

BACKPORT NOTE: the feature_pruning.py restart keeps -txindex=0 and DEPLOYMENT_ARGS as the other node 0
starts in that test do, since -txindex is on by default in Dash and is incompatible with pruning.
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Nov 4, 2026
…itcoin#32875, bitcoin#32878, bitcoin#32882, bitcoin#33212, bitcoin#34897, bitcoin#36150 (index unify + relevant fixes)

73ba99d fix(index): reject an uncommitted tip the block index lost (pasta)
3cc304e fix(index): check the blocks governance resumes from at startup (pasta)
5e37377 fix(index): resume from the tip a skipped commit leaves behind (pasta)
0afd6c3 fix(index): write a rewound block's erasures in one batch with its locator (pasta)
cc8362d fix(index): move the committed locator below the entries a rewind erases (Konstantin Akimov)
fa8a7c5 Merge bitcoin#36150: indexes: set prune lock to genesis before first block (Konstantin Akimov)
df7ac41 partial Merge bitcoin#34897: indexes: Don't commit ahead of the flushed chainstate (Konstantin Akimov)
7ad8070 Merge bitcoin#32875: index: handle case where pindex_prev equals chain tip in NextSyncBlock() (Konstantin Akimov)
ce05350 Merge bitcoin#32882: index: remove unnecessary locator cleaning in BaseIndex::Init() (Konstantin Akimov)
4bdfb4e Merge bitcoin#33212: index: Don't commit state in BaseIndex::Rewind (Konstantin Akimov)
a4cc3c0 Merge bitcoin#32878: index: fix wrong assert of current_tip == m_best_block_index (Konstantin Akimov)
ee7021f partial Merge bitcoin#32580: wallet, test: best block locator matches scan state follow-ups (Konstantin Akimov)
7e86e46 partial Merge bitcoin#30221: wallet: Ensure best block matches wallet scan state (Konstantin Akimov)
059ce4a partial Merge bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py (Konstantin Akimov)
ee9bb26 test: Test bdb_ro dump of wallet without reset LSNs (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

  bitcoin#25193 (#7883) brought back bitcoin#33208: after an unclean shutdown an index can name a block that was never flushed, and the node refuses to start until the index is rebuilt. Alternative to #8030: the upstream fixes bitcoin#33212 and bitcoin#34897 applied 1:1, with the upstream prerequisites they need instead of Dash-only adaptations.

  ## What was done?

  - bitcoin#30221, bitcoin#32580: the wallet no longer stores the locator from `ChainStateFlushed`, so the bitcoin#34897 notification applies unchanged.
  - bitcoin#26606 (one hunk), bitcoin#32069: `kill_process()` for the bitcoin#33212 functional test.
  - bitcoin#32875, bitcoin#32878, bitcoin#32882, bitcoin#36150: small `BaseIndex` fixes on the same code.
  - Two Dash-only commits: Dash's address, spent, timestamp and governance collateral indexes erase entries on rewind, so the committed locator is moved below them, and each rewound block's erasures are written in one batch with that locator so an interrupted rewind can't leave it above erased entries.

  Omitted hunks and Dash adaptations are listed in each commit's BACKPORT NOTE. bitcoin#29867 is skipped: Dash never took the bitcoin#28955 lock release it fixes.

  ## How Has This Been Tested?

  - `baseindex_tests`: committed height stays at the last flush (bitcoin#34897); erased blocks are indexed again after a restart, including after a rewind interrupted between blocks (Dash-only commits, each fails with its fix removed).
  - `blockfilter_index_tests/index_reorg_crash` (bitcoin#32878), `wallet_tests/scan_for_wallet_transactions` (bitcoin#30221).
  - `feature_coinstatsindex.py` unclean restart after a reorg (bitcoin#33212), `feature_pruning.py` new index on a pruned node (bitcoin#36150).

  ## Breaking Changes

  None. An index's committed best block may trail its in-memory tip until the next flush and re-syncs after an unclean shutdown.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

Top commit has no ACKs.

Tree-SHA512: df1762b9590e46e107434d238b93fefe45c167861449fbefa35d7e3cd6a3ff2857eaa5f179897686a0f2519a5a0035bf68afa632aeae02013a849dc9ef5493c6
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Nov 4, 2026
…block

BACKPORT NOTE:
- feature_pruning.py on v24.0.x syncs node 5 inside wallet_test(); the new pruned restart of node 0
  would leave node 5 with only a limited peer, so node 5 is synced to node 0 before it, as on develop.
- Pruned v24.0.x nodes disable governance and log a warning on stderr, so test_rescan_blockchain()
  now expects it when it restarts the already pruned node 0.

9b22995 indexes: set prune lock to genesis before first block (Andrew Toth)
0ae3b40 test: characterize startup with newly added prune and index (Andrew Toth)

Pull request description:

  When setting both a new index and prune size and restarting an unpruned node, the node will prune the block store first and then the index will fail to start syncing.

  Fix this by setting the prune lock to 0 if the index does not yet have a best block.

ACKs for top commit:
  sedited:
    Re-ACK 9b22995
  fjahr:
    Code review ACK 9b22995

Tree-SHA512: fff46c65c6350bdcbb3e0bbc8cde655c619ce48c19730e3caf3175257f7d3cb1abb8cce07f84cf78e20e54f9e3e4963da072cdde6d01a1ceb8a731920220cd13

BACKPORT NOTE: the feature_pruning.py restart keeps -txindex=0 and DEPLOYMENT_ARGS as the other node 0
starts in that test do, since -txindex is on by default in Dash and is incompatible with pruning.
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Nov 4, 2026
2bf133c docs: cite #8042 for the index fixes in the v24.0.0 release notes (pasta)
8aa11f6 docs: add the v24.0.0-rc.7 picks and index fixes to the v24.0.0 release notes (pasta)
ad4e5d6 docs: drop the index caveat from the -reindex-chainstate man page entry (pasta)
19a90bb test: blocks orphaned while the address index is disabled are removed from it (pasta)
d2f2a1f fix(index): don't adopt an empty or rebuilt async index as migrated legacy data (pasta)
e3bafdb fix(index): reject an uncommitted tip the block index lost (pasta)
9198962 fix(index): check the blocks governance resumes from at startup (pasta)
baff347 fix(index): resume from the tip a skipped commit leaves behind (pasta)
2dbf5ca fix(index): write a rewound block's erasures in one batch with its locator (pasta)
252acbe fix(index): move the committed locator below the entries a rewind erases (Konstantin Akimov)
e9f9c8a Merge bitcoin#36150: indexes: set prune lock to genesis before first block (Konstantin Akimov)
2edeb98 partial Merge bitcoin#34897: indexes: Don't commit ahead of the flushed chainstate (Konstantin Akimov)
3eba84c Merge bitcoin#32875: index: handle case where pindex_prev equals chain tip in NextSyncBlock() (Konstantin Akimov)
399125c Merge bitcoin#32882: index: remove unnecessary locator cleaning in BaseIndex::Init() (Konstantin Akimov)
bb724c6 Merge bitcoin#33212: index: Don't commit state in BaseIndex::Rewind (Konstantin Akimov)
d5ff431 Merge bitcoin#32878: index: fix wrong assert of current_tip == m_best_block_index (Konstantin Akimov)
31c7d8f partial Merge bitcoin#32580: wallet, test: best block locator matches scan state follow-ups (Konstantin Akimov)
94f5c58 partial Merge bitcoin#30221: wallet: Ensure best block matches wallet scan state (Konstantin Akimov)
8e0b1e8 partial Merge bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py (Konstantin Akimov)
4d17947 Merge bitcoin#25193: indexes: Read the locator's top block during init, allow interaction with reindex-chainstate (Konstantin Akimov)
0127df8 Merge #8045: test: scale the mempool-loaded wait by timeout_factor so TSAN reindex restarts stop timing out (pasta)
62d0cef Merge #8036: fix(qt): let a shared masternode participant follow a revised invitation that keeps their share (merge-script)
775d31c Merge #8018: fix(consensus): require IPv4 masternode primaries until IPv4 is optional, pin mainnet ports (merge-script)
e1b826e Merge #8026: fix(qt): keep shared masternode contribution fields locked while coins are reserved (merge-script)
9fa3df3 Merge #8020: fix(rpc): make protx shared_sign sign only dissolutions that return every principal (merge-script)
246a465 Merge #8024: fix(qt): keep the shared masternode dissolve dialog consistent with what it will send (merge-script)
590ad0a Merge #8021: fix(qt): don't load a newer shared masternode session copy that changes your own share (merge-script)
974aaa3 Merge #8034: fix(qt): check a shared masternode's service and refund addresses before coins are reserved (merge-script)
0026e3e Merge #8027: fix(qt): fund a shared masternode's service update from this wallet by default (merge-script)
6a5d2dc Merge #8035: fix(qt): don't strand coins reserved for a shared masternode session (merge-script)
df6083a Merge #8032: fix(qt): don't offer a new operator key when reopening a shared masternode session (merge-script)
2b5bf30 Merge #8029: fix: let dashd -version, -help and first start work without an existing data directory (merge-script)
e33d9b1 Merge #8037: docs: list the config file path each Linux init system uses (merge-script)
6030ea0 docs: add the #8014 migratewallet fixes to the v24.0.0 release notes (pasta)
1b1ea95 Merge #8014: backport: bitcoin#28609, bitcoin#34215, bitcoin#34226, bitcoin#34370, partials bitcoin#31423, bitcoin#34156 (migratewallet fixes from 28.x) (merge-script)
608ff63 Merge bitcoin#28542: wallet: Check for uninitialized last processed and conflicting heights in MarkConflicted (DCG-Claude)
3af6f63 Merge bitcoin#28038: wallet: address book migration bug fixes (DCG-Claude)
2fe41fb docs: add ecosystem notes on Asset Unlock txids, coinbase payees and RPC errors (pasta)
0e3f653 docs: correct operator guidance in the v24.0.0 release notes for rc.7 (pasta)
11c8140 Merge #8019: fix(qt): stop reporting refused shared masternode broadcasts as sent (merge-script)

Pull request description:

  ## Issue being fixed or feature implemented

  Backports and release prep for v24.0.0-rc.7, on top of `v24.0.x` at 8d195f1 (v24.0.0-rc.6, #8013). This PR collects the develop merges labeled `backport-candidate-24.0.x`, the v24.0.x port of #8042 with the index fixes from #8033, and the release notes for them, so rc.7 has a single backport PR to merge.

  ## What was done?

  ### Picked

  Cherry-picked with `git cherry-pick -m1 -x`, in develop merge order, except that bitcoin#28038 goes before bitcoin#28542 as in Bitcoin Core. Each pick changes exactly the same lines as its develop merge, except as noted below for bitcoin#28542, #8014, #8020 and #8018.

  - #8019 fix(qt): stop reporting refused shared masternode broadcasts as sent
  - bitcoin#28038 (from #7863): prerequisite of #8014
  - bitcoin#28542 (from #7762): prerequisite of #8014. Its `test_conflict_txs` migrates through `self.migrate_wallet`, as on develop since bitcoin#28868.
  - #8014 backport: bitcoin#28609, bitcoin#34215, bitcoin#34226, bitcoin#34370, partials bitcoin#31423, bitcoin#34156 (migratewallet fixes from 28.x), with the Dash adaptations below
  - #8037 docs: list the config file path each Linux init system uses
  - #8029 fix: let dashd -version, -help and first start work without an existing data directory
  - #8032 fix(qt): don't offer a new operator key when reopening a shared masternode session
  - #8035 fix(qt): don't strand coins reserved for a shared masternode session
  - #8027 fix(qt): fund a shared masternode's service update from this wallet by default
  - #8034 fix(qt): check a shared masternode's service and refund addresses before coins are reserved
  - #8021 fix(qt): don't load a newer shared masternode session copy that changes your own share
  - #8024 fix(qt): keep the shared masternode dissolve dialog consistent with what it will send
  - #8020 fix(rpc): make protx shared_sign sign only dissolutions that return every principal. Its `doc/release-notes-7437.md` sentence goes into the same paragraph of `doc/release-notes.md`, since that file was folded in for v24.0.0.
  - #8026 fix(qt): keep shared masternode contribution fields locked while coins are reserved (merged on develop as cc73a04; GitHub shows the PR as closed)
  - #8018 fix(consensus): require IPv4 masternode primaries until IPv4 is optional, pin mainnet ports, with the adaptation below
  - #8036 fix(qt): let a shared masternode participant follow a revised invitation that keeps their share
  - #8045 test: scale the mempool-loaded wait by timeout_factor so TSAN reindex restarts stop timing out

  ### Index fixes: #8042 port and #8033

  The index commits are #8042 (merge 9e5e3d5), ported commit by commit to `v24.0.x`, plus the parts of #8033 that #8042 doesn't cover. #8042's v24.0.x port replaces #8033's bitcoin#33212, bitcoin#34897 and rewind-locator commits, and #8033's flushed-block announcement fix (e6a687b) is dropped: bitcoin#30221 removes the wallet's `ChainStateFlushed` locator write, and nothing else on `v24.0.x` consumes that notification. This PR replaces #8033, and #8031 comes in through it (adapted to the `v24.0.x` `CCoinsViewDB` constructor), not as a separate pick.

  - bitcoin#25193 (from #7883, via #8033): indexes: read the locator's top block during init, allow interaction with `-reindex-chainstate`
  - From #8042: partial bitcoin#32069 (only `TestNode.kill_process()`, with develop's `wait_until_stopped(**kwargs)` handling it needs), partial bitcoin#30221, partial bitcoin#32580, bitcoin#32878, bitcoin#33212, bitcoin#32882, bitcoin#32875, partial bitcoin#34897, bitcoin#36150, and #8042's own fixes: move the committed locator below the entries a rewind erases; write a rewound block's erasures in one batch with its locator; resume from the tip a skipped commit leaves behind; check the blocks an index resumes from at startup; reject an uncommitted tip the block index lost
  - From #8033: #8031 fix(index): don't adopt an empty or rebuilt async index as migrated legacy data; test: blocks orphaned while the address index is disabled are removed from it; docs: drop the index caveat from the `-reindex-chainstate` man page entry

  #### Dash adaptations for #8042

  - The governance collateral index doesn't exist on `v24.0.x`, so its hunks are dropped; from the startup resume check only the `base.{h,cpp}` part is kept.
  - `feature_pruning.py`: node 5 syncs before node 0's pruned restart, and `test_rescan_blockchain` expects the governance-disabled stderr a pruned node prints on `v24.0.x`.
  - The wallet's `blockConnected` has no birthday skip on `v24.0.x`.
  - `TestNode.wait_until_stopped()` keeps `v24.0.x`'s `None` default for a clean exit.

  Apart from these, the `v24.0.x` index, validation and index test sources differ from develop after #8042 only by differences that already existed before it.

  #### Dash adaptations for #8018

  `v24.0.x` predates bitcoin#26177, so it has no `src/kernel/chainparams.cpp` and no `GetBuriedDeployment()`. The four `IPv4OptionalHeight` values (mainnet not scheduled, testnet 0, devnet 0, regtest only through `-testactivationheight=ipv4_optional@<height>`) go into the matching classes in `src/chainparams.cpp`, and `ipv4_optional` is parsed in its `MaybeUpdateHeights()`. The `GetBuriedDeployment()` hunk is dropped; the `DeploymentName()` case is kept. Every other file, including all tests, changes exactly the same lines as the develop merge. The same notes are in the pick's commit message.

  #### Dash adaptations for #8014

  #8014 doesn't cherry-pick cleanly onto `v24.0.x`. The conflicts were resolved against `v24.0.x` APIs. No prerequisite was backported, and no hunk or test was dropped. The same notes are in the pick's commit message.

  - `src/wallet/bdb.{cpp,h}`, `dump.cpp`, `sqlite.{cpp,h}`, `transaction.{cpp,h}`, `wallet.cpp`: the changed lines are identical to the develop merge. In `wallet.cpp`, the conflict was with develop-only context (`CanGrindR`), which stays out.
  - `src/wallet/db.h`: #8014 makes `WalletDatabase::Files()` pure virtual. `v24.0.x` still defines `DummyDatabase` in `db.h`, so it gets the `Files()` override there.
  - `src/wallet/test/wallet_tests.cpp`: the test database mock on `v24.0.x` is `FailDatabase`, so it gets the same `Files()` override. `src/wallet/salvage.cpp` and `src/wallet/test/util.h` keep the `v24.0.x` side, since develop's `DummyDatabase`/`MockableDatabase` placement doesn't exist here.
  - `test/functional/tool_wallet.py`, `wallet_backup.py`, `wallet_migration.py`: the test framework on `v24.0.x` has no `TestNode.wallets_path`/`datadir_path` (bitcoin#27884), so the new tests build these paths with `os.path.join` and pass RPC paths as strings. `wallet_migration.py` takes only #8014's new tests, not the develop-only tests around them.
  - `test/functional/wallet_migration.py`: `unsynced_wallet_on_pruned_node_fails` stops its pruned node with `EXPECTED_STDERR_NO_GOV_PRUNE`, because on `v24.0.x` a pruned node still prints the governance-disabled warning. The rc.6 picks handled the same warning the same way.

  ### Separate v24.0.x PRs, merged separately

  - #8016 backport: v23.1.10 fixes for v24.0.x
  - #8022 backport: bind CoinJoin signatures to the approved transaction (#7815) for v24.0.x, which depends on #7815 merging on develop

  #8016 and #8022 each merge cleanly with this branch in either order, and all three merge to the same tree in any order.

  ### Not picked

  - #8025: closed; superseded by #8014 (picked above)
  - #8031 is not picked separately; it comes through #8033's commits above.
  - #8039, #8040, #8041, #8043, #8044 (CI and tooling), #7905, follow-ups to #8042, and the PRs in the 24.1 milestone.
  - Explicitly deferred: #7870, #7679, #7675, #7220, #7217, #7109, #6988, #4974, #8028.

  ### Release notes

  `doc/release-notes.md` corrections, checked against the code on this branch:

  - **Version 2 Asset Unlocks:** version 1 Asset Unlocks stay valid after `v24` activation. Platform withdrawals keep using version 1 until a future Dash Platform release issues version 2, so the stable txid, InstantSend locking and instance-hash relay don't apply to them yet.
  - **Masternode requirements:** the startup refusals (#7754) and the DKG bad votes for missing transaction relay or compact filters (#7755) apply from the first start of v24.0.0, not from activation. Operators should remove conflicting settings and upgrade before the `v24` start date (November 9, 2026), so their masternodes are running when the activation signal is signed. `-peerblockfilters=0` is the new refusal; `-blockfilterindex=0` already failed on v23.
  - **How to Upgrade:** a pruned node with `-addressindex` or `-spentindex` now refuses to start; v23 accepted that combination.
  - **Downgrading:** there is no supported downgrade after `v24` activation: older versions can't follow the network, and they misread the masternode list data v24.0.0 writes. Before activation, downgrading to v23.1.x works with the listed caveats. Dash-Qt's dust-protection setting is migrated to the shared settings, so it reads as disabled after a downgrade.
  - **Dash Platform:** Platform/dashmate v5.0.0 and later handle the hidden `service` and `softforks` RPC fields. Older Platform versions need both `-deprecatedrpc` options.
  - **Compatibility:** users on macOS 13 or older must upgrade macOS, or move their node, before activation.
  - **Legacy wallets:** in v24, `createwallet` with `descriptors=false` also needs `load_on_startup`; before v24 this applied only to `descriptors=true`. The notes now give a working example.
  - **Wallet migration (#8014):** failure handling in `migratewallet`, `restorewallet` and `dash-wallet createfromdump` is fixed, and the new backup and watch-only/solvables wallet names are listed.
  - **Ecosystem notes:** the txid of a version 2 Asset Unlock zeroes `requestedHeight`, `quorumHash` and `quorumSig` before hashing (the full-bytes hash is `instanceHash`); pools should emit one coinbase output per `masternode[]` and `superblock[]` template entry, since merged or deduplicated payees are invalid after activation; client libraries that send numbers or booleans as strings fail (#7099); and some wallet RPC error messages changed with upstream backports.
  - **rc.7 picks:** `doc/release-notes-8018.md` and `doc/release-notes-8029.md` are folded in and removed. #8018's IPv4-primary and mainnet standard-port rules are under Extended addresses, with a pointer from the masternode upgrade notes; #8029's `dash.conf` change is under Updated settings. The other rc.7 picks fix code that is new in v24 and need no release note.
  - **Index fixes (#8042, #8031):** nodes that ran a release candidate with the address, spent or timestamp index should rebuild them once (with `-reindex`, or by starting once with them disabled, deleting their `indexes/` directories and starting with them enabled). The notes also cover `-reindex-chainstate` with indexes enabled, older versions refusing a migrated index until `-reindex`, the new "the block the index was last synced to is not found. Please rebuild the index." startup error, and the known limitation shared with earlier versions in the remaining cases.
  - All rc.7 TODO comments are resolved.

  `configure.ac` is already 24.0.0 with `CLIENT_VERSION_IS_RELEASE` false, so the version string comes from the `v24.0.0-rc.7` tag. The man pages carry #8033's `-reindex-chainstate` change; no other pick changes non-debug help text (#8018's `-testactivationheight` change is debug-only).

  ## How Has This Been Tested?

  On this head (2bf133c):
  - Every develop pick compared with its develop merge (`git patch-id --stable` and the set of changed lines). #8019, #8037, #8032, #8035, #8027, #8034, #8021, #8024, #8026, #8036 and #8045: identical. #8029: the same changed lines; only context differs in `feature_config_args.py`. #8020: the same changed lines, in `doc/release-notes.md` instead of `doc/release-notes-7437.md`. #8018: identical except the adaptation above, checked file by file against 900f085 and reviewed separately for consensus equivalence on mainnet, testnet, devnet and regtest. #8014 and its prerequisites: as in the earlier rounds (adaptations above).
  - #8042 port: `v24.0.x`'s divergence from develop, before #8042 (058b060) versus after it (9e5e3d5), is unchanged in `src/index/*`, `src/validation.{h,cpp}`, the index unit tests and `feature_coinstatsindex.py`, apart from the adaptations listed above. The #8031, test and man page commits have the same patch-id and message as on #8033.
  - Built with `--enable-debug --enable-werror` and Qt: no warnings.
  - Unit suites pass: `baseindex_tests`, `index_migration_tests`, `txindex_tests`, `blockfilter_index_tests`, `coinstatsindex_tests`, `validation_flush_tests`, `wallet_tests`, `interfaces_tests`, `evo_netinfo_tests` and `evo_snapshot_tests`. With the develop picks (7275005), every `evo_*` suite and `test_dash-qt` (15 classes, 152 passed, 0 failed) passed too.
  - Functional tests pass: `rpc_netinfo.py`, `feature_masternode_shares.py`, `wallet_migration.py`, `feature_coinstatsindex.py` (including the unclean restart after a reorg), `feature_addressindex.py`, `feature_config_args.py` and `feature_index_prune.py`. On the same C++ tree, these pass as well: `feature_spentindex.py`, `feature_timestampindex.py`, `feature_pruning.py`, `feature_txindex.py`, `feature_reindex.py`, `feature_init.py`, `feature_abortnode.py` and `wallet_reorgsrestore.py`.
  - Regtest upgrade gates, run on a build of this exact head: all pass. They cover v23.1.10 index migration, index contents vs v23 and `-reindex`, a kill mid-migration, 9 wallets, a pre-activation downgrade and round trip, and v22.1.3/v23.0.2 upgrades. The crash-after-reorg probe and the deleted-index probe are both required to be not reproduced: 0/10 stale (rc.6: about 4/10), and the plain-delete rebuild matches.
  - Man pages: `help2man` output of the built `dashd`, `dash-cli`, `dash-tx`, `dash-wallet` and `dash-util` matched `doc/man` on the develop picks (apart from the debug-build-only `lock` log category). No later commit changes non-debug help text, so nothing is regenerated beyond #8033's `-reindex-chainstate` change.
  - `git merge-tree` against #8016 (cdb250c) and #8022 (62609bf), heads fetched 05:23 UTC: clean in both orders, and all three merge to the same tree in every order.

  From the earlier rounds: the wallet suites and functional tests listed for #8014, bitcoin#28038 and bitcoin#28542 passed, and the `createwallet` example was checked against the official v24.0.0-rc.6 binary.

  ## Breaking Changes

  - From #8014: migration backups are now named `<name>_<time>.legacy.bak`, the unnamed wallet's watch-only and solvables wallets are named `default_wallet_watchonly` and `default_wallet_solvables`, and `restorewallet` accepts an existing empty directory.
  - From #8018: on mainnet, a version 3 ProRegTx or ProUpServTx must list an IPv4 address on the standard port as the first entry of each address list; testnet and devnets are unaffected.
  - From #8029: `dashd` no longer creates an empty `dash.conf`.
  - From #8031: older versions refuse an index migrated by v24.0.0 until they run `-reindex`; nodes that ran a release candidate should rebuild these indexes once.
  - From #8042: an index whose last synced block was lost in an unclean shutdown makes startup fail with a rebuild instruction.

  The release notes describe these.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [x] 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: 3c405ef570fc1c5b46d1ba8bb2e344213cf65018abe5ef4b94b7cf2b9aa7160ba2675f71a0a365c72bc8249a2f9a5defe774af2a4e33537245aeb420c5f66711
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Nov 6, 2026
d6c066f chore: add v23.1.10 to the flatpak release history (pasta)
202632c chore: release v24.0.0 (pasta)
2bf133c docs: cite #8042 for the index fixes in the v24.0.0 release notes (pasta)
8aa11f6 docs: add the v24.0.0-rc.7 picks and index fixes to the v24.0.0 release notes (pasta)
ad4e5d6 docs: drop the index caveat from the -reindex-chainstate man page entry (pasta)
19a90bb test: blocks orphaned while the address index is disabled are removed from it (pasta)
d2f2a1f fix(index): don't adopt an empty or rebuilt async index as migrated legacy data (pasta)
e3bafdb fix(index): reject an uncommitted tip the block index lost (pasta)
9198962 fix(index): check the blocks governance resumes from at startup (pasta)
baff347 fix(index): resume from the tip a skipped commit leaves behind (pasta)
2dbf5ca fix(index): write a rewound block's erasures in one batch with its locator (pasta)
252acbe fix(index): move the committed locator below the entries a rewind erases (Konstantin Akimov)
e9f9c8a Merge bitcoin#36150: indexes: set prune lock to genesis before first block (Konstantin Akimov)
2edeb98 partial Merge bitcoin#34897: indexes: Don't commit ahead of the flushed chainstate (Konstantin Akimov)
3eba84c Merge bitcoin#32875: index: handle case where pindex_prev equals chain tip in NextSyncBlock() (Konstantin Akimov)
399125c Merge bitcoin#32882: index: remove unnecessary locator cleaning in BaseIndex::Init() (Konstantin Akimov)
bb724c6 Merge bitcoin#33212: index: Don't commit state in BaseIndex::Rewind (Konstantin Akimov)
d5ff431 Merge bitcoin#32878: index: fix wrong assert of current_tip == m_best_block_index (Konstantin Akimov)
31c7d8f partial Merge bitcoin#32580: wallet, test: best block locator matches scan state follow-ups (Konstantin Akimov)
94f5c58 partial Merge bitcoin#30221: wallet: Ensure best block matches wallet scan state (Konstantin Akimov)
8e0b1e8 partial Merge bitcoin#32069: test: fix intermittent failure in wallet_reorgsrestore.py (Konstantin Akimov)
4d17947 Merge bitcoin#25193: indexes: Read the locator's top block during init, allow interaction with reindex-chainstate (Konstantin Akimov)
0127df8 Merge #8045: test: scale the mempool-loaded wait by timeout_factor so TSAN reindex restarts stop timing out (pasta)
62d0cef Merge #8036: fix(qt): let a shared masternode participant follow a revised invitation that keeps their share (merge-script)
775d31c Merge #8018: fix(consensus): require IPv4 masternode primaries until IPv4 is optional, pin mainnet ports (merge-script)
e1b826e Merge #8026: fix(qt): keep shared masternode contribution fields locked while coins are reserved (merge-script)
9fa3df3 Merge #8020: fix(rpc): make protx shared_sign sign only dissolutions that return every principal (merge-script)
246a465 Merge #8024: fix(qt): keep the shared masternode dissolve dialog consistent with what it will send (merge-script)
590ad0a Merge #8021: fix(qt): don't load a newer shared masternode session copy that changes your own share (merge-script)
974aaa3 Merge #8034: fix(qt): check a shared masternode's service and refund addresses before coins are reserved (merge-script)
0026e3e Merge #8027: fix(qt): fund a shared masternode's service update from this wallet by default (merge-script)
6a5d2dc Merge #8035: fix(qt): don't strand coins reserved for a shared masternode session (merge-script)
df6083a Merge #8032: fix(qt): don't offer a new operator key when reopening a shared masternode session (merge-script)
2b5bf30 Merge #8029: fix: let dashd -version, -help and first start work without an existing data directory (merge-script)
e33d9b1 Merge #8037: docs: list the config file path each Linux init system uses (merge-script)
6030ea0 docs: add the #8014 migratewallet fixes to the v24.0.0 release notes (pasta)
1b1ea95 Merge #8014: backport: bitcoin#28609, bitcoin#34215, bitcoin#34226, bitcoin#34370, partials bitcoin#31423, bitcoin#34156 (migratewallet fixes from 28.x) (merge-script)
608ff63 Merge bitcoin#28542: wallet: Check for uninitialized last processed and conflicting heights in MarkConflicted (DCG-Claude)
3af6f63 Merge bitcoin#28038: wallet: address book migration bug fixes (DCG-Claude)
2fe41fb docs: add ecosystem notes on Asset Unlock txids, coinbase payees and RPC errors (pasta)
0e3f653 docs: correct operator guidance in the v24.0.0 release notes for rc.7 (pasta)
11c8140 Merge #8019: fix(qt): stop reporting refused shared masternode broadcasts as sent (merge-script)
cdb250c doc: note operator-relevant v23.1.x patch-release changes for v24.0.0 (pasta)
fcd332b doc: state the provider-transaction InstantSend change on its own (pasta)
e6f3ad4 fix(bls): stop weighted contribution batch verification on an invalid partial aggregate (pasta)
e04acba fix(llmq): weight batched DKG contribution verification (UdjinM6)
ed96227 fix(bls): weight batch-verified signatures so complementary errors cannot cancel (UdjinM6)
b5c7985 fix(governance): don't vote on triggers while not synced (pasta)
a79f432 fix(governance): don't vote NO-FUNDING on triggers before their maturity window (pasta)
8615244 fix(llmq): accept equal DKG secret key shares when aggregating a member's share (pasta)
1c356f4 test: cover DKG members dealing identical contributions (UdjinM6)
f23f748 fix(llmq): drop DKG members whose verification vectors share coefficients (UdjinM6)
914c052 docs: add #8003 to the v24.0.0 release notes and man pages (pasta)
e81c511 Merge #8003: fix(net): don't refuse to start over the automatic onion service unless -listenonion=1 (merge-script)
41b4578 ci: run cppcheck as test/lint/cppcheck-dash.py, as develop does since #7966 (pasta)
c97f3b3 docs: regenerate man pages for v24.0.0-rc.6 (pasta)
784312c docs: add the v24.0.0-rc.6 changes to the v24.0.0 release notes (pasta)
f15a53a Merge #7991: fix(qt): shared masternode wizard fixes for taken shares, unconfirmed funding and reply handling (merge-script)
1c46224 Merge #7995: fix(wallet): don't let a waiting CoinJoin promotion/demotion queue block standard mixing (merge-script)
546db2f Merge #7996: fix(wallet): fill a CoinJoin promotion with sibling coins when needed (merge-script)
349859f Merge #7957: fix(qt): validate shared-masternode shares with the consensus rules (merge-script)
9091f0b Merge #8005: backport: bitcoin#27114, bitcoin#33395 (merge-script)
e915ab5 Merge #7990: fix(wallet): pay for 3 byte input and output counts so 253+ input sends work (merge-script)
4f4d188 Merge #7984: chore: Translations 2026-10 (pasta)
129a1fc Merge #7980: chore: update seeds, checkpoints, minimum chain work, assumevalid and tx stats for v24 (pasta)
5800e5d docs: state that SPORK_3/SPORK_9 were already hardened on mainnet (pasta)
ddc82a8 docs: separate extended addresses from shared masternodes in v24 notes (pasta)
8660e54 docs: complete the v24.0.0 release notes against the full v24 changeset (pasta)
11ea306 Merge #7947: fix: stop quorum key warming from stalling DKG on 2-core masternodes (pasta)
25d7c85 Merge #7826: fix: skip repeated authenticated Platform bans (pasta)
18073dd Merge #7850: perf: let CHECKDATASIG use the signature cache (pasta)
3759397 Merge #7833: fix: gate signing intake before quorum retrieval (pasta)
db98ee2 fix: keep flat-file positions 64-bit clean at the remaining raw seek/tell sites (Konstantin Akimov)
54c9738 Merge bitcoin#36667: net: enforce timeout interval for paused send peers (Konstantin Akimov)
f1adb2c Merge bitcoin#36665: sock: align exception monitoring between poll() and select() backends (Konstantin Akimov)
8becf6a Merge bitcoin#36669: refactor: store positions as a 64 bits integer in flatfiles (Konstantin Akimov)
4c0cbd6 fix(llmq): judge every sig-share sender by its own verified shares (pasta)
649259f fix(governance): cap the orphan parent objects re-requested per tick (pasta)
418f5ee fix(llmq): verify DKG contributions individually when a batch vvec check fails (pasta)
abf2eb0 fix(llmq): reject invalid decrypted DKG shares before aggregation (pasta)
39bda8f fix(consensus): reject negative transaction nVersion after DIP3 (pasta)
1ba2609 Merge #7951: fix(net): stop peers lingering after disconnect under edge-triggered epoll (pasta)
696d45f Merge #7861: feat: keep at least 4-days worth blocks after pruning (merge-script)
9cd1c72 Merge #7869: fix: let startup block replay handle quorum commitments and asset unlocks (pasta)
73e7254 Merge #7682: build: finish relic_conf.h regeneration before compiling BLS consumers (pasta)
7312925 ci: bake the macOS SDK into the CI runner image (pasta)
d885ecd Merge #7916: backport: bitcoin#27800, bitcoin#28125, bitcoin#28232, bitcoin#27695 (merge-script)
f55ad1d Merge bitcoin#28139: test: create wallet specific for test_locked_wallet case (DCG-Claude)
80f6cbe chore: add the v23.1.9 release entry to flatpak metainfo (pasta)
5ba801f chore: use translation source strings generated from v24.0.x (pasta)
a3b9e30 Merge #7974: chore: update man pages, translation strings, SECURITY.md and flatpak for v24.0.0 (pasta)
b5d26bd feat(consensus): schedule V24 and evo_shares on mainnet for November 9, 2026 (pasta)
fe78211 docs: state the earliest v24 activation height and the v23.1.9 fixes (pasta)
3bbe3e2 docs: address review of v24.0.0 release notes (pasta)
28c39fc docs: add v24.0.0 release notes and remove individual release notes files (pasta)
e8cbfaf docs: archive v23.1.8 and v23.1.9 release notes (pasta)
6c02b2b ci: let DEPENDS_ARCH override the machine arch for multiprocess and tsan (pasta)
ce5dbf3 Merge #7888: fix(consensus): canonical ExtNetInfo encoding and strict netInfo decoding (pasta)
54cba5c Merge #7537: fix: data races and check-then-act races in the CoinJoin server (pasta)
08d8bca Merge #7909: feat(mining): build the masternode list incrementally during block assembly (pasta)
5633761 Merge #7895: test: cover retroactive provider tx refusal, fix wording (pasta)
cbb9500 Merge #7846: fix: treat pending owner keys and Platform node IDs as one conflict namespace (pasta)
8efdf5e Merge #7857: fix: mine a pending ProUpServTx before a key change of its masternode (pasta)
e56e6ae Merge #7842: fix(wallet): reject mnemonic passphrases that seed derivation truncates (pasta)
79480ff test: follow-up for #7821: check if wallet is locked after failed upgrade instead creating brand-new scenario (Konstantin Akimov)
a56ed47 fix(net): announce sporks to new peers instead of requesting them during mnsync (pasta)
cdaea5f Merge #7894: fix: due to logical conflicts feature_pruning.py had been broken while (pasta)
98d92f6 Merge #7817: backport: partial bitcoin#34156 restore cleanup ownership (pasta)
35e6d18 Merge #7858: fix: do not InstantSend-lock provider transactions (pasta)
904d73d Merge #7881: fix: refuse to sign shared registrar updates that move the funder's coins (pasta)
95982f5 Merge #7782: fix(wallet): persist pending-observation coin locks once the record becomes readable (pasta)
cdf65d0 Merge #7836: backport: partial bitcoin#25812, bitcoin#29855 (pasta)
cc5716f Merge #7824: fix: retain initialized DKG sessions during inventory reads (pasta)
588e458 Merge #7827: backport: partial bitcoin#35984 (pasta)
795c6f1 Merge #7839: fix: release InstantSend tracking after mempool eviction (pasta)
dc1a6b2 Merge #7875: docs(rpc): clarify getchainlockbyheight availability (pasta)
e4798ff Merge #7876: fix(consensus): capture operator key scheme changes with unchanged bytes in state diffs (pasta)
fe68ecb Merge #7871: backport!: Merge bitcoin#27217: wallet: Replace use of purpose strings with an enum (pasta)
8348d22 Merge #7867: fix: refuse masternode list RPCs for blocks outside the active chain (pasta)
861a579 Merge #7866: fix: stop `masternode payments` at the genesis block (pasta)
efcef71 Merge #7521: fix: update masternode rate limit on failed governance trigger path (pasta)
0623182 Merge #7831: fix: bound governance object signatures and reset the governance cache (pasta)
b230657 Merge #7841: fix: authenticate cached InstantSend proof bytes (pasta)
a1f37ea Merge #7820: fix: hold chainstate lock during CoinJoin input validation (pasta)
50a5617 Merge #7829: fix: preserve wallet permissions when changing passphrases (pasta)
2ff0103 Merge #7818: fix: return REST errors for unavailable deployment data (pasta)
cb39369 Merge #7834: fix: validate Electrum import input boundaries (pasta)
e7e3daa Merge #7821: fix: relock encrypted wallets after HD upgrade failures (pasta)
2fea45f Merge #7792: fix: treat missing snapshots during evodb repair as repair errors (pasta)
3c5c039 Merge #7838: fix(wallet): authenticate unlock deadline extensions (pasta)
0bf80f8 Merge #7810: fix(rpc): handle unavailable masternode payment inputs (pasta)
bcefee4 Merge #7822: fix: reject malformed detached quorum share batches (pasta)
86a7737 Merge #7828: fix: omit recovery words from invalid mnemonic errors (pasta)
886d5c4 Merge #7816: fix: check credit pool amount accumulation (pasta)
00fc3b9 Merge #7851: fix(rpc): correct masternode status help for top-level service field (pasta)
0e75c22 Merge #7814: fix(qt): restore HTML escaping of send confirmation recipients (pasta)
fbe6526 Merge #7807: feat(consensus): hold EvoNode shares and multiple payouts behind a new evo_shares deployment (pasta)
57fd2d9 Merge #7776: fix: keep a pending ProUpServTx across a registrar update that keeps the operator key (pasta)
ca69801 Merge #7803: fix: return non-zero amount of accounts after sethdseed (pasta)
57a8f07 Merge #7796: backport: bitcoin#26720 (remaining), partial bitcoin#29523: weight-check the knapsack exact-match selection (pasta)
4eb82f6 Merge #7786: fix(net): keep a dedicated onion listener when -bind is given and correct the bind release note (pasta)
70626a0 Merge #7793: backport: partial bitcoin#28868 (wallet: reload wallet if migration exited early, keep mixed watchonly txs) (pasta)
250a3cd Merge #7790: fix: guard cached governance object flags with the object lock (pasta)
700c195 Merge #7787: fix: only sign EHF signals inside the deployment's start/timeout window (pasta)
a3b0f3c Merge #7785: fix: restore the txindex requirement when governance validation is enabled (pasta)
2d1735d Merge #7794: fix(wallet): floor the denomination gap threshold so rebalancing cannot oscillate (pasta)
d9f6592 Merge #7783: fix: stop fish completion from re-running the typed dash-cli command (pasta)
89d44c8 Merge #7795: backport: bitcoin#34272, partial bitcoin#31650 (pass PSBT by const reference in PSBTInputSignedAndVerified) (pasta)
a1d7411 Merge #7779: fix!: report legacy evonode Platform addresses when listdiff changes its address (pasta)
73f6ea2 Merge #7789: fix(qt): report malformed lang/font settings instead of aborting at startup (pasta)
40de493 Merge #7781: fix(rpc): use a consistent tip height in quorum dkgstatus (pasta)
7d1a90d Merge #7791: fix(net): request object votes from nPeersPerHashMax peers (pasta)
51b145c Merge #7778: test: use single-member in functional tests: feature_mnehf, feature_notifications, p2p_instantsend (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Merges the v24.0.0 release back into develop, as the release process asks once `master` is fast-forwarded. `master`, `v24.0.x` and the signed `v24.0.0` tag all point to the same commit (938fba5).

  ## What was done?
  One merge commit of `master` into develop.

  `v24.0.x` was cut from develop, so all of its code is already here. Every commit on it that develop lacks by patch is one of these:
  - a `cherry-pick -x` of a develop commit;
  - covered by a develop PR: the index fixes by #8042, the mainnet V24 schedule by #7973, the cppcheck CI move by #7966;
  - release bookkeeping.

  Git reports conflicts in many files, because `v24.0.x` carries adapted copies of develop's changes. All of them resolve to develop's side, which keeps develop's code, translations and version (`configure.ac` stays at 24.1.0, `CLIENT_VERSION_IS_RELEASE` false).

  Taken from v24.0.0:
  - `doc/release-notes.md`: the v24.0.0 release notes. The v23.1.10 notes move to `doc/release-notes/dash/`.
  - The man pages regenerated for v24.0.0, replacing develop's older v24.0.0 pages. A few entries (`-prune`, `-par`, `-parbls`, `-maxconnections`) still trail develop's help text, as they did before, until the next regeneration.
  - `feature_addressindex.py`: the v24.0.x test that blocks orphaned while the address index is disabled are removed from it once it is re-enabled.

  Release notes:
  - Individual `doc/release-notes-*.md` files whose content is in the v24.0.0 notes are removed. This includes `release-notes-8018.md`, `release-notes-8029.md` and `release-notes-27114.md`, whose changes shipped in v24.0.0 without the files.
  - `release-notes-28113.md` and `release-notes-28414.md` also covered `descriptorprocesspsbt`, which only develop has. They are trimmed to that RPC instead of removed.
  - Notes for changes v24.0.0 doesn't include stay: #7812, #7847, #7860, #7862, bitcoin#25943, bitcoin#26485 and bitcoin#27501.

  ## How Has This Been Tested?
  macOS arm64 against depends, `--enable-debug --enable-werror --disable-hardening --without-gui`. `dashd`, `dash-cli` and `test_dash` build cleanly.

  - `src/` is byte-identical to develop's. The only non-doc change is the new `feature_addressindex.py` case.
  - Functional tests, all passing: `feature_addressindex.py` (with the new case) and `feature_spentindex.py`.
  - Unit suites, all passing: `txindex_tests`, `blockfilter_index_tests`, `coinstatsindex_tests`, `index_migration_tests`, `baseindex_tests`.
  - `lint-python.py`, `lint-whitespace.py`, `lint-includes.py` and `lint-circular-dependencies.py` pass.
  - An independent review checked every non-merge commit in `develop..master` against develop (by patch, by cherry-pick source, and line by line for the rest), re-merged each `v24.0.x` merge commit to look for content added in a merge, and checked each release-note file decision.

  I did not run the full functional suite locally; CI covers it.

  ## Breaking Changes
  None. Develop's code is unchanged; the only non-doc change is the new functional test case.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 3c2d1b7d2885f983f1457a18920f42907009c8ca77522a6116739d387b011d8d5583da6a4b6a1227bcaa21fa07a7ef635aae58fb8b19e4f31a95582ee1ce2318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants