You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interrupted AssumeUTXO validation is reported as a statistics failure #37072
If shutdown interrupts the final UTXO hash, MaybeValidateSnapshot() returns STATS_FAILED, the same result as a real statistics failure.
At startup, a shutdown request during that hash then fails initialization with "UTXO snapshot failed to validate. Restart to resume normal initial block download, or try loading a different snapshot." instead of exiting quietly.
Reproducer
diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp
index d8463f5dc3..0402ee22e5 100644
--- a/src/test/validation_chainstatemanager_tests.cpp+++ b/src/test/validation_chainstatemanager_tests.cpp@@ -949,6 +949,14 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_snapshot_completion_hash_mismatch, Sna
}
}
+BOOST_FIXTURE_TEST_CASE(chainstatemanager_snapshot_hash_interrupted, SnapshotTestSetup)+{+ auto [validated, snapshot]{this->SetupSnapshot()};+ BOOST_REQUIRE((*Assert(m_node.shutdown_signal))());+ BOOST_CHECK_EQUAL(WITH_LOCK(::cs_main, return Assert(m_node.chainman)->MaybeValidateSnapshot(*validated, *snapshot)), SnapshotCompletionResult::STATS_FAILED);+ BOOST_REQUIRE(m_node.shutdown_signal->reset());+}+
/** Helper function to parse args into args_man and return the result of applying them to opts */
template <typename Options>
util::Result<Options> SetOptsFromArgs(ArgsManager& args_man, Options opts,
The direct fix would be to represent interruption separately and run completion only after validation succeeds (extending the restart problem in #32029), but given that this validation lifecycle disappears with background validation, I'm proposing to remove AssumeUTXO entirely in #36598 instead.
Activity