assumeUTXNO#172
Draft
l0rinc wants to merge 7 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.