diff options
author | James O'Beirne <james.obeirne@pm.me> | 2022-02-02 14:40:47 -0500 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2023-02-22 12:13:11 -0500 |
commit | c29f26b47b8ef978d8689dc0222aa663361ee6cb (patch) | |
tree | 77a8e1de311b09768e81674a8175bba7c0516eb3 /doc | |
parent | 5ee22cdafd2562bcb8bf0ae6025e4b53c826382d (diff) |
validation: add CChainState::m_disabled and ChainMan::isUsable
and remove m_snapshot_validated. This state can now be inferred by the
number of isUsable chainstates.
m_disabled is used to signal that a chainstate should no longer be used
by validation logic; it is used as a sentinel when background validation
completes or if the snapshot chainstate is found to be invalid.
isUsable is a convenience method that incorporates m_disabled.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/design/assumeutxo.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/design/assumeutxo.md b/doc/design/assumeutxo.md index ea51b1b87f..652eca7675 100644 --- a/doc/design/assumeutxo.md +++ b/doc/design/assumeutxo.md @@ -107,7 +107,7 @@ sequentially. ### Background chainstate hits snapshot base block Once the tip of the background chainstate hits the base block of the snapshot -chainstate, we stop use of the background chainstate by setting `m_stop_use` (not yet +chainstate, we stop use of the background chainstate by setting `m_disabled` (not yet committed - see #15606), in `CompleteSnapshotValidation()`, which is checked in `ActivateBestChain()`). We hash the background chainstate's UTXO set contents and ensure it matches the compiled value in `CMainParams::m_assumeutxo_data`. @@ -119,10 +119,10 @@ The background chainstate data lingers on disk until shutdown, when in | | | | ---------- | ----------- | -| number of chainstates | 2 (ibd has `m_stop_use=true`) | +| number of chainstates | 2 (ibd has `m_disabled=true`) | | active chainstate | snapshot | -**Failure consideration:** if bitcoind unexpectedly halts after `m_stop_use` is set on +**Failure consideration:** if bitcoind unexpectedly halts after `m_disabled` is set on the background chainstate but before `CompleteSnapshotValidation()` can finish, the need to complete snapshot validation will be detected on subsequent init by `ChainstateManager::CheckForUncleanShutdown()`. |