-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear mempool storage if the syncer starts syncing large numbers of blocks again #2723
Comments
Hey team! Please add your planning poker estimate with ZenHub @conradoplg @dconnolly @jvff @oxarbitrage @upbqdn |
* Pass sync_status to mempool * Update zebrad/src/components/mempool.rs Co-authored-by: Deirdre Connolly <[email protected]> * Remove enabled flag for now; will be handled in #2723 Co-authored-by: Deirdre Connolly <[email protected]>
@jvff I think PRs #2773 and #2764 might have already closed this ticket: Here's the code that clears the mempool if the syncer reports large numbers of blocks: zebra/zebrad/src/components/mempool.rs Lines 155 to 167 in 18acec6
And we also clear if the state commits more than one block at the same time: zebra/zebrad/src/components/mempool.rs Lines 249 to 254 in 18acec6
|
Motivation
If large numbers of blocks get synced, Zebra needs to clear the mempool storage and reject list, because:
Design
Tasks can check if they are behind the tip using
SyncStatus::is_close_to_tip
:zebra/zebrad/src/components/sync/status.rs
Lines 42 to 43 in 44ac067
Tasks can await tip jumps using
ChainTipChange::tip_change
andTipAction::Reset
:zebra/zebra-state/src/service/chain_tip.rs
Line 313 in 44ac067
The text was updated successfully, but these errors were encountered: