Skip to content

assumeUTXNO#172

Draft
l0rinc wants to merge 7 commits into
masterfrom
detached530
Draft

assumeUTXNO#172
l0rinc wants to merge 7 commits into
masterfrom
detached530

Conversation

@l0rinc
Copy link
Copy Markdown
Owner

@l0rinc l0rinc commented May 14, 2026

No description provided.

l0rinc added 7 commits May 14, 2026 10:38
Remove the runtime machinery for loading UTXO snapshots and maintaining background validation chainstates.

Drop the loadtxoutset and getchainstates RPCs together with the functional, unit, and fuzz coverage that only exercised snapshot activation.

History reviewed: bitcoin#19806 introduced snapshot activation and the assumeutxo hash table (7a6c46b, f6e2da5, 6606a4f, 4d8de04); bitcoin#25740 added the background validation completion flow and snapshot chainstate cleanup (c29f26b, d96c59c, f9f1735, 252abd1); bitcoin#27596 made AssumeUTXO usable with loadtxoutset/getchainstates, ChainstateRole notifications, pruning/blockfile separation, wallet/index gating, and chainparams entries (b73d3bb, c711ca1, 434495a, 4d8f4dc, 373cf91, 1019c39, 4c3b8ca, 9511fb3, ce585a9, 0f64bac, 42cae39). Followups such as bitcoin#28590, bitcoin#30214, bitcoin#33259, and bitcoin#34786 changed the public RPC shape and internal chainstate representation.

A clean revert stack is not practical because the old commits have been absorbed by later validation, wallet, index, p2p, kernel, and test refactors. Shared pieces like LoadChainstate/VerifyLoadedChainstate, MaybeRebalanceCaches, ChainstateManager accessors, ChainstateRole notification signatures, block storage pruning helpers, and chainparams includes are now used outside the original AssumeUTXO commits. This commit therefore removes the live snapshot activation surface first and keeps the still-shared single-chainstate behavior intact so the build passes; later commits remove chainparams data, stale text, temporary accessors, m_chainstates storage, and role plumbing in smaller reviewable steps.
Drop the hardcoded AssumeUTXO snapshot lookup table and its helper accessors now that snapshots cannot be loaded.

Add direct util/vector includes for files that previously got Cat through chainparams.h.
Update comments and RPC help after removing snapshot activation and the background validation RPC fields.

Drop stale Qt extracted strings for messages that no longer exist in the source tree.
Drop the temporary current, historical, and validated chainstate accessors after removing snapshot chainstates.

Use the active chainstate directly at the remaining call sites.
Only the active chainstate remains, so validation notifications no longer need to identify historical or assumed-valid chainstates.

Drop the ChainstateRole parameter from validation, node, wallet, index, ZMQ, test, and kernel notification interfaces. Remove the dead role checks, Chainstate::GetRole(), role logging, and the now-empty kernel/types.h header.

The mechanical signature cleanup can be reviewed with this scripted diff, followed by the manual removal of dead role branches and stale comments in this commit:

-BEGIN VERIFY SCRIPT-

sed -i '/#include <kernel\/types.h>/d' $(git grep -l 'kernel/types.h' -- src test)

sed -i '/using kernel::ChainstateRole;/d' $(git grep -l 'using kernel::ChainstateRole' -- src test)

perl -0pi -e 's/const (?:kernel::)?ChainstateRole& role, //g; s/const (?:kernel::)?ChainstateRole&, //g; s/^\s*const (?:kernel::)?ChainstateRole& role,\n//mg; s/ChainstateRole\{\}, //g' $(git grep -l 'ChainstateRole' -- src test)

git grep -n 'ChainstateRole\|GetRole(\|kernel/types.h' -- src test || true

-END VERIFY SCRIPT-
Drop the AssumeUTXO usage and design docs and the unreleased RPC release note now that snapshot loading has been removed.

Remove live release-process and ZMQ references that only applied to multiple chainstates.
@l0rinc l0rinc changed the title no assumeUTXO assumeUTXNO May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant