-
Notifications
You must be signed in to change notification settings - Fork 143
feat(l1): persist bad blocks in db. #2267
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
Conversation
Lines of code reportTotal lines added: Detailed view |
5f07ffd to
747d7cd
Compare
…to persist-bad-blocks
ElFantasma
left a comment
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.
This LGTM, but don't have an opinion on whether we should store invalid ancestors on db or in memory. I guess it depends on if we want the data to survive app restart or not, right?
| .get_invalid_ancestor(head_block.parent_hash) | ||
| .unwrap() |
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.
Is it safe to unwrap here?
| } else { | ||
| // Check if there is an ongoing sync before applying the forkchoice | ||
| match context.sync_status()? { | ||
| // Apply current fork choice | ||
| SyncStatus::Inactive => { |
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.
Probably for another PR, but this change in addition to the refactor of the SyncManger might allow us to enable some additional Invalid NewPayload hive test.
fmoletta
left a comment
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!
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
**Motivation** Don't have to rely on the global mutex of the Syncer to fetch invalid blocks **Description** Not sure if this is the ultimate solution, Im still unsure if it is better to store invalid ancestors in db or in memoy --------- Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Motivation
Don't have to rely on the global mutex of the Syncer to fetch invalid blocks
Description
Not sure if this is the ultimate solution, Im still unsure if it is better to store invalid ancestors in db or in memoy