feat(zebra-state): Send a reference to latest non-finalized state in TipAction::Reset #7927
Labels
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
C-feature
Category: New features
C-security
Category: Security issues
Motivation
This is needed for the scanner task in zebra-scan (#7905) to get any blocks in the non-finalized portion of the best chain when there is a
Reset
action without repeated calls to the state service.Possible Design
latest_non_finalized_state
watch channel receiverLatestTipChange
that returns all the blocks in the latest non-finalized chainThis is acceptable because the worst-case scanning performance is 3 blocks per second, which means we can re-scan an entire non-finalized chain before the next block arrives. (Forks usually only happen every 300+ blocks.)
Alternative Solution
This solution is more complex than we need.
Too complicated
Add a method on
LatestTipChange
:Related Work
This ticket is required for:
The text was updated successfully, but these errors were encountered: