1 minor finding · 5 suggestions
Earlier concerns neither republished nor resolved: 2 minor findings · 3 suggestions. See the Run archive for their assessments.
Findings
[minor] · Scratch UTXO read failures now abort the node and skip cleanup
During an on-disk dumptxoutset rollback, an I/O or decode error in the disposable database now terminates the node and leaves its UTXO-sized temporary directory behind.
Location: src/rpc/blockchain.cpp:3270 (head).
Details and suggested fix
rollback_cache reads directly from the temporary CCoinsViewDB, not the live chainstate. Previously, a failed point read threw through DisconnectBlock(), failed the RPC and unwound TemporaryUTXODatabase, which called DestroyDB(). It now reaches FatalReadError() and aborts, bypassing cleanup of temp_utxo_<height> after a fault on the caller-selected output filesystem. Keep these scratch-only failures local to the RPC. For example, record a scratch-read failure, check it after disconnect/flush and before snapshot export, then fail the RPC and discard the scratch result. This needs to accommodate the new noexcept coin lookups; merely throwing or omitting notifications still terminates the process. This requires corruption or an I/O failure during rollback; no production occurrence was identified.
Optional improvements
[suggestion] · Chainstate-manager creation docs omit fatal startup reads
A corrupt startup point read can now abort the embedding process instead of returning null, but the creation and general error-handling documentation still describes return-value recovery.
Location: src/kernel/bitcoinkernel.h:542 (head).
Details and suggested fix
During btck_chainstate_manager_create(), constructing the block-tree database reads OBFUSCATION_KEY, and loading chainstate performs further point reads. A LevelDB failure now notifies the host's fatal_error callback when registered and aborts before the existing exception handlers can return nullptr. The new callback comment mentions possible aborts, but the creation contract still says “null on error” and the general section recommends tearing down kernel objects. Document this startup-termination case on the create function and in the error-handling section, while preserving the distinction that database-open failures retain error-return handling. The API is unstable and unreleased; no in-tree consumer relying on null-return recovery was identified, so external impact remains unconfirmed.
[suggestion] · Release note includes iterator lookups that still fail nonfatally
The note promises fatal optional-index lookups, but an unreadable txindex iterator block can still yield a miss when no other candidate or legacy entry succeeds.
Location: doc/release-notes-34132.md:4 (head).
Details and suggested fix
The new fatal policy covers CDBWrapper::Read(), not iterator scans. FindTx() seeks the hashed txid bucket with CDBIterator, whose Valid() does not inspect LevelDB status. LevelDB can skip an unreadable data block and retain its error only in status(). If that removes all matching candidates and legacy fallback does not find the transaction, FindTx() returns nullopt without aborting. Block-filter range scans likewise return false for iterator read/decode failures. Limit the release note to keyed point reads and explicitly say iterator-based lookups, including the txid scan, remain unchanged.
[suggestion] · Fatal callback documentation omits worker-thread and lock constraints
A failed prevout read can invoke a host's fatal callback on a worker while validation waits under cs_main, so blocking or reentrant handlers can prevent the subsequent abort.
Location: src/kernel/bitcoinkernel.h:542 (head).
Details and suggested fix
With parallel prevout fetching active, ProcessInput() calls base->PeekCoin() before publishing input.ready, which validation waits for in FetchCoinFromBase(). A database read failure calls the host's fatal_error synchronously before aborting, with no serialization between workers. A handler that destroys the chainstate manager or waits for validation can therefore deadlock against cs_main and prevent readiness and abort. Document that fatal_error may run on internal workers, concurrently and while locks are held. Handlers must avoid library reentry or waits for validation, record or forward the error, and return promptly. No in-tree handler that blocks this way was found.
[suggestion] · Startup corruption test accepts an ordinary initialization exit
The chainstate table-corruption case checks only a nonzero exit and matching stderr, so it does not enforce the new startup-abort policy.
Location: test/functional/feature_init.py:169 (head).
Details and suggested fix
The chainstate/*.ldb perturbation round still calls start_expecting_error(), which uses assert_start_raises_init_error() with a partial stderr regex and accepts any nonzero status. A startup-specific regression that reports the fatal notification and then throws into initialization error handling would satisfy both checks, because notification precedes std::abort(). Start this round with node.start() without waiting for RPC and use wait_until_aborted(fatal_error="Error reading from database, shutting down.") to assert the platform-specific abort status. Keep the chainstate/CURRENT open-failure round on the initialization-error helper.
[suggestion] · Txindex consistency aborts and adjacent stale skips lack direct coverage
The tests exercise valid legacy positions, readable stale blocks and missing files, but not the newly fatal consistency conditions or the two stale-entry skip guards.
Location: src/index/txindex.cpp:186 (head).
Details and suggested fix
The changed branches distinguish missing BlockSeqKey mappings and active-chain blocks without BLOCK_HAVE_DATA from stale entries for unknown blocks or non-active blocks without data. FindLegacyTx() separately makes a readable wrong-transaction position fatal. The reorg test retains readable stale block data, the legacy test seeds the correct position, and the I/O test removes a file without clearing BLOCK_HAVE_DATA, so those tests do not enforce these boundaries. Add focused cases using TxIndexTest::GetDB to construct the stale candidates and verify another matching candidate remains discoverable. Add subprocess cases for the missing mapping, active-chain no-data state and legacy mismatch that assert the diagnostic and abort status. Seed the legacy row before constructing the index so fallback is enabled.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: A throwing read-error callback can bypass termination
- [minor]: A throwing read-error callback can bypass termination
- [suggestion]: Optional-index corruption can abort the node on request paths (earlier report)
- [suggestion]: Later lookups mask missing HaveInputs cache coverage (earlier report)
- [suggestion]: CCoinsViewBacked::GetCoin forwarding is unused after catcher removal (earlier report)