3 suggestions
Earlier concerns neither republished nor resolved: 1 major finding. See the Run archive for their assessments.
Optional improvements
[suggestion] · Missing-undo stop truncates body checks after cache exhaustion
At levels 3–4, missing undo now stops checks of older refetched bodies even when dbcache already rules out disconnection, although verification still reports an incomplete result.
Location: src/validation.cpp:4702 (head).
Details and suggested fix
With consecutive refetched pruned bodies in the requested range and curr_coins_usage above the cache budget, this guard breaks out before the cache-size branch. Previously, that branch set skipped_l3_checks and continued reading older bodies, checking their validity and checking any available undo records. Move the missing-undo guard inside the sufficient-cache branch, immediately before the assertion and DisconnectBlock, to retain that fallback while protecting every attempted disconnect. Once disconnects stop, the remaining checks do not change either coins cache, so cache usage cannot fall enough to resume disconnection. There is a result tradeoff if the cache first exceeds its budget at the missing-undo block: this change would return SKIPPED_L3_CHECKS instead of SKIPPED_MISSING_BLOCKS. As in the base code, explicitly setting -checklevel or -checkblocks would then make startup fail with “Insufficient dbcache for block verification”.
[suggestion] · Level-4 assertions do not observe the reconnect pass
The RPC assertion accepts corruption as well as incomplete verification, and neither level-4 check observes whether the reconnect pass runs.
Location: test/functional/rpc_getblockfrompeer.py:166 (head).
Details and suggested fix
verifychain returns False for every non-success result, including corruption reached after the missing-undo message, and assert_debug_log rejects no messages by default. The successful restart catches startup corruption, but startup accepts SKIPPED_MISSING_BLOCKS. Replacing the new break with an immediate return of that result would therefore satisfy both checks while skipping reconnection. The final tip and body assertions do not distinguish this because disconnection and reconnection use a temporary coins cache. Add unexpected_msgs=["Verification error"] and require "Verification progress: 90%" in both level-4 log contexts. This fixture's backward pass stays below 50%, so the 90% message observes reconnect activity rather than merely reaching the missing-undo boundary. It does not prove the exact number of reconnected blocks.
[suggestion] · Missing-undo tests leave body-check ordering unprotected
Because the refetched body is valid, the new assertions would still pass if deep verification stopped before reading or validating that body.
Location: test/functional/rpc_getblockfrompeer.py:165 (head).
Details and suggested fix
The current implementation correctly performs ReadBlock, CheckBlock and any available-undo validation before the missing-undo stop. The level-2 success assertion does not protect that ordering at levels 3–4: moving the guard earlier while retaining nCheckLevel >= 3 leaves level 2 unchanged. The valid body also leaves the deep stop message, false result and restart unchanged. Add a focused CVerifyDB regression fixture in prune mode with BLOCK_HAVE_DATA set and BLOCK_HAVE_UNDO absent. Require SKIPPED_MISSING_BLOCKS for the valid body and CORRUPTED_BLOCK_DB for an unreadable body or one failing CheckBlock. Assert the enum result directly, since the RPC returns false for both. This requires new unit-fixture setup.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [major]: Limit the snapshot allowance to snapshot history