WIP: [Demo] validation: remove AssumeUTXO

bitcoin/bitcoin: PR #36598

4 suggestions

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · RPC and unfinished-snapshot removal has no deprecation window

For mergeable extractions of this demo, removing these RPC behaviors and unfinished-snapshot startup without the documented grace release would force immediate migration, though no specific downstream dependency was established.

Location: src/rpc/blockchain.cpp:3680 (base).

Details and suggested fix

getchainstates disappears, including ordinary nodes' coins_db_cache_bytes and coins_tip_cache_bytes fields, with no replacement RPC exposure. loadtxoutset becomes an unconditional error, and the documented dumptxoutset <path> rollback form now requires an explicit target. A datadir containing chainstate_snapshot/base_blockhash also stops before startup can resume validation. The release note offers finishing on an older version or deleting that directory and using -reindex, but neither provides a compatibility window. doc/developer-notes.md specifies at least one major release and -deprecatedrpc=<feature> access to deprecated RPC behavior.

Plan a deprecation release before stopping historical synchronization: announce removal, retain completion and restart support, and keep the old RPC behaviors, including implicit rollback selection, available behind -deprecatedrpc. Decide whether to preserve RPC access to the cache budgets before removing getchainstates. If the extracted PRs intentionally make an exception to the grace period, state that explicitly.


Link

[suggestion] · Startup tests miss marker-free snapshot validation flags

The new rejection tests stop at Flatten()'s marker check, so they do not exercise the block-index compatibility guard or the documented recovery distinction between -reindex and -reindex-chainstate.

Location: src/node/chainstate.cpp:75 (head).

Details and suggested fix

feature_init.py::init_snapshot_test and the kernel test both retain chainstate_snapshot/base_blockhash during their rejection assertions. Construction therefore throws before LoadChainstate() scans for a child at least BLOCK_VALID_CHAIN whose non-genesis parent is below that level. Removing the scan would leave those assertions unchanged. This misses the recovery state where the snapshot directory has been deleted but its block-index validity flags remain: -reindex-chainstate preserves that index, while -reindex rebuilds it.

Add a small persisted, marker-free fixture containing that validity gap. Assert that ordinary startup and -reindex-chainstate fail with the block-index guard's diagnostic, then verify that -reindex can start successfully. This distinguishes the second guard from marker rejection without retaining the snapshot importer.


Link

[suggestion] · Unfinished-snapshot recovery instructions bypass GUI translation

Users upgrading mid-snapshot with a non-English GUI receive the required recovery steps only in English because Flatten()'s exception reaches the GUI through Untranslated().

Location: src/validation.cpp:5360 (head).

Details and suggested fix

Flatten() throws std::runtime_error with instructions to finish validation on an older release or delete the snapshot directory and run -reindex. InitAndLoadChainstate() wraps that text in Untranslated() and returns FAILURE_FATAL; Qt subsequently displays message.translated, which still contains the English text. Unlike the sibling block-index guard, these instructions cannot enter the translation catalog. Check for chainstate_snapshot/base_blockhash in node initialization before constructing ChainstateManager and return the recovery text through _(), while retaining the constructor guard for kernel callers. Keep rejection ahead of construction, since BlockManager may otherwise open or wipe storage before LoadChainstate() runs.


Link

[suggestion] · getchaintxstats contract edits are mixed into count-loader cleanup

A separate rpc: commit would expose the getchaintxstats result-contract cleanup for independent RPC review, without changing the final tree or behavior for supported ordinary chains.

Location: src/rpc/blockchain.cpp:1879 at c17fb97eab16 (commit) (commit).

Details and suggested fix

Commit c17fb97eab1609359c95ee6b3a1e2281a3ba1f59 (node: load block counts without AssumeUTXO) makes txcount required and removes the count-availability guards around window_tx_count and txrate. It also removes the snapshot-count bootstrap, commitment lookups, and FindFirst. The window-size and positive-interval conditions remain unchanged.

Move only the getchaintxstats help and result edits into an immediately following rpc: always return getchaintxstats txcount commit, leaving the lookup and helper removals together. At this point legacy snapshot startup is already rejected and ordinary active-chain counts are complete, so retaining the previous conditional RPC implementation in the preceding commit creates no dependency gap. This separates review of the field-presence guarantees from validation of count reconstruction; it is a series-organization suggestion, not a head defect or an established downstream break.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

Background synchronization also had an ecosystem incentive rationale: maintaining the practical ability to synchronize from scratch. In 2024, Marco Falke argued that making snapshots the resource-saving default could weaken pressure to keep ordinary IBD affordable, eventually leaving snapshots as the only technically feasible bootstrap route. He separately identified historical block storage and block-index metadata as benefits of background downloading.

The historical download, transaction-count reconstruction, and background chainstate being removed served purposes beyond checking one user's commitment. This argument concerns preserving independent bootstrap capability and archival functionality; it is not evidence that mandatory background validation is the only way to preserve them.

Source 1 · Source 2

Unresolved disagreements

The inspected record does not settle whether eventual local verification justifies mandatory background synchronization. The original proposal values ending reliance on the snapshot through the same node's reconstruction. Later arguments emphasize that the node is already usable under that reliance, verification cannot retroactively protect earlier decisions, and mandatory history adds the snapshot download and temporary second database to ordinary synchronization costs.

This is the central tradeoff behind removing background validation separately from snapshot loading. The later #32377 proposal substitutes confidence from independent IBD checks, while optout21 argues that merely making background validation optional would retain the multiple-chainstate maintenance cost. These are competing design positions, not an established resolution or an assessment of this patch.

Source 1 · Source 2 · Source 3 · Source 4

Whether and how to communicate provisional snapshot trust remained disputed. Sjors argued that users should distinguish locally verified history from history vouched for by others, including the possibility of an otherwise legitimate release containing a bad commitment. Other participants questioned wallet-specific warnings when arbitrary commitments were not configurable, and a UX objection was that presenting the wallet as not ready undermines the advertised usability benefit.

This supplies context for background-progress reporting and assumed-state distinctions affected by the series. It does not establish that any particular wallet icon or warning was required, or that the head changes transaction accounting; the historical disagreement is about exposing the two-phase assurance model to users.

Source 1 · Source 2 · Source 3 · Source 4 · Source 5