-
Notifications
You must be signed in to change notification settings - Fork 8
added "backfilling of keystones" #39
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
@AL-CT hold off on review for now, I am going to take a closer look at changes to the snap protocol before asserting which way to handle this 🤔 |
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.
Looks good! Thanks for the hard work, I think I understand the premise, just left some comments on things I am not sure about
core/blockchain.go
Outdated
} | ||
|
||
if l2Keystone.L2BlockNumber >= hemi.KeystoneHeaderPeriod { | ||
// 475 |
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.
remove this comment
core/blockchain.go
Outdated
// so continue the for loop if we inserted a new one to handle | ||
// more missing ones | ||
|
||
if bc.keystonesBackfilled && l2BlockNumber < finalizedBlockNumber && !insertedNew { |
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.
nit, probably need a read lock to read bc.keystonesBackfilled
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.
yes we absolutely do 👍 I'll update
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 👍
upon startup, "backfill" keystones to genesis. this shouldn't take too long. upon each new keystone, backfill keystones from unsafe head to either finalized block or until we have populated all non-found keystones (missing blocks)
9adfc65
to
97b0fe8
Compare
upon startup, "backfill" keystones to genesis. this shouldn't take too long. upon each new keystone, backfill keystones from unsafe head to either finalized block or until we have populated all non-found keystones (missing blocks)
on startup, op-geth will backfill all keystones to genesis in an upsert fashion
afterwards, upon each new keystone, it will backfill up to the first keystone found