-
Notifications
You must be signed in to change notification settings - Fork 99
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
refactor(node)!: Store only first missing block in scheduler #2404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrations are must have here, so I'd switch atm on #2303 and merge it once mentioned one got solved
# Conflicts: # Cargo.lock # gclient/src/api/calls.rs
This reverts commit 2349d77.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case:
block N contains no tasks, first missed block = None
block N+1 contains tasks, but block producer missed run_queue extrinsic or runtime upgrade occurs
block N+2 contains tasks and starts execute them because missed blocks = None so tasks from block N+1 lost forever
# Conflicts: # runtime/gear/src/migrations.rs # runtime/vara/src/migrations.rs
@ark0f Are we ready to merge this brilliant PR? |
@ark0f merge master, please, and lets merge it |
# Conflicts: # runtime/gear/src/migrations.rs # runtime/vara/src/migrations.rs
Resolves #1333
A little internal optimization. We stored a set of block numbers whose on-chain tasks were skipped so we can process them later. Now we store only first block and process tasks up to current block (including). It makes internal algorithm a little bit simpler and uses less storage memory.