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
Currently, Zebra ignores any UTXOs in FinalizedState.queued_by_prev_hash, because it is only used during checkpoint verification.
This creates a rare race condition between concurrent:
pending blocks in the last few checkpoints, and
the first few blocks doing full validation using UTXOs.
But it doesn't seem to happen much in practice. If it did, some blocks would temporarily fail full validation, until they get retried after the checkpointed blocks are committed.
Suggested Solution
Make QueuedBlocks generic, and use it for StateService.queued_finalized_blocks
Check StateService.queued_finalized_blocks in AwaitUtxo
Do a full sync to check that it's not too slow
Optional:
Only do the check when we're close to the last checkpoint configured for zebra_consensus::CheckpointVerifier, to avoid cloning a bunch of unused UTXOs. The last checkpoint depends on the checkpoint_sync config.
The text was updated successfully, but these errors were encountered:
teor2345
changed the title
Move FinalizedState.queued_blocks to the StateService, and check it in AwaitUtxo
Avoid an AwaitUtxo race condition when switching to the non-finalized state
Sep 9, 2022
Motivation
Currently, Zebra ignores any UTXOs in
FinalizedState.queued_by_prev_hash
, because it is only used during checkpoint verification.This creates a rare race condition between concurrent:
But it doesn't seem to happen much in practice. If it did, some blocks would temporarily fail full validation, until they get retried after the checkpointed blocks are committed.
Suggested Solution
QueuedBlocks
generic, and use it forStateService.queued_finalized_blocks
StateService.queued_finalized_blocks
inAwaitUtxo
Optional:
zebra_consensus::CheckpointVerifier
, to avoid cloning a bunch of unused UTXOs. The last checkpoint depends on thecheckpoint_sync
config.The text was updated successfully, but these errors were encountered: