WIP: [Demo] validation: remove AssumeUTXO

bitcoin/bitcoin: PR #36598

2 suggestions

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

Optional improvements

Link

[suggestion] · Startup tests miss the markerless block-index rejection

Both new rejection tests stop at the snapshot marker, so they would still pass if the separate markerless block-index check or its pre-wipe ordering regressed.

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

Details and suggested fix

feature_init.py retains base_blockhash for every failing start, and the kernel test removes it only before successful construction. Both therefore throw in Flatten() before m_blockman exists; neither exercises this loop. The loop handles a different case: a user deletes chainstate_snapshot after the snapshot has connected a block above its still-unvalidated base, leaving a validation-level discontinuity in the persisted index. The release notes rely on rejecting that state before InitCoinsDB() can wipe the coins database for -reindex-chainstate.

Add a disk-backed chain fixture without the marker and persist a BLOCK_VALID_SCRIPTS child at height at least 2 over a parent below BLOCK_VALID_CHAIN. Assert FAILURE_INCOMPATIBLE_DB for ordinary loading and wipe_chainstate_db=true, with the coins database preserved. Then test full -reindex recovery and successful loading of an ordinary validated index, including the genesis exemption.


Link

[suggestion] · Unfinished-snapshot recovery instructions bypass translation

bitcoin-qt cannot translate the new startup-blocking recovery instructions because Flatten() throws plain English and init wraps it with Untranslated().

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

Details and suggested fix

When chainstate_snapshot/base_blockhash exists, Flatten() throws a std::runtime_error. The pre-existing generic exception handler turns e.what() into Untranslated(...), so InitError() reaches Qt with identical English original and translated fields. This sends the older-release and -reindex recovery steps outside the translation path used by the companion block-index error. Mark the message with _(), carry it in a typed exception holding a bilingual_str, and catch that type separately in InitAndLoadChainstate(). Keep the throw in option initialization so rejection still precedes BlockManager construction and storage changes.


Coverage details

Earlier concerns

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