-
Notifications
You must be signed in to change notification settings - Fork 834
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
feat: run StaticFileProvider::check_consistency
on start up
#8143
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.
I made a first pass, want to also look at unwrap_or_default()
usage
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.
gg
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.
LGTM, one comment
This reverts commit 8ff3736.
The bulk of changes are regarding
ProviderFactory
initialization, but the real change is introducing a function to check the overall consistency between static files and database:reth/crates/storage/provider/src/providers/static_file/manager.rs
Lines 512 to 516 in 14e2dbc
For each segment the following invariants are checked:
reth/crates/storage/provider/src/providers/static_file/manager.rs
Lines 611 to 621 in 14e2dbc
These will be called on starting up the node, before any data is queried from storage. If it fails any check it will try to self-heal, and if not possible, return a
PipelineTarget::Unwind(N)
that will be straight away handled by a standalone unwind-only pipeline.The tests live in
crates/stages/mod.rs
because there are other necessary test functions there and can not be imported into providers crate. Follow-up will refactor the test-utils in stages crate and move them to providers crate.Pending live testing - but open to review
fixes #7618