-
Notifications
You must be signed in to change notification settings - Fork 810
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
Add block ban flag --invalid-block-roots
#7042
base: release-v7.0.0
Are you sure you want to change the base?
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.
Nice, LGTM!
6f2b7ef
to
f5b4e4a
Compare
I've cherry-picked all the block ban related changes to this PR and rebased on |
I reverted the |
--invalid-block-roots
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 👍
false | ||
} | ||
}; | ||
if chain.config.invalid_block_roots.contains(&block_root) || invalid_holesky_block { |
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 flag can be exploited for censoring, you should restrict usage to a specific network
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.
ive constrained this flag to holesky only
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 disagree with both of Lion's suggested changes, sorry 😅
I think we need the flag to be not limited to Holesky so that we can potentially use it to get out of trouble on other catastrophically failing networks (without having to patch). We don't have another solution for preventing optimistic sync of the wrong chain at the moment.
I think this also means we should keep the hardcoded Holesky block as a separate check. It doesn't make sense as the flag default if the flag works on multiple networks.
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.
got it, I had assumed that this was strictly a holesky thing. If the plan is to keep this flag until we have a better solution for optimistic sync of the wrong chain, I'm cool with that
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've reverted the changes back to what they were originally
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.
We can get rid of this when we implement checkpoint sync from an unfinalized checkpoint
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.
@realbigsean would that prevent us from importing an invalid block though? wouldn't sync still attempt to sync with the invalid chain?
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.
you’d have to use a checkpoint ahead of the invalid block, and since we’d backfill from there we’d avoid it. Part of the complexity of unfinalized checkpoint sync would be making sure you ignore chain tips older than the checkpoint
This pull request has merge conflicts. Could you please resolve them @eserilev? 🙏 |
b3395b0
to
05e0871
Compare
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.
Re-reviewed, looks good!
I'm going to move the invalid block check so it happens sooner. |
Add a new flag that allows users to ban block roots listed in a file. Also make sure the hardcoded invalid block root is only considered on holesky