-
Notifications
You must be signed in to change notification settings - Fork 1k
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 get_checkpoint_block to the fork choice spec #3308
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
201f113
Introduce get_epoch_boundary_block
saltiniroberto ddbd82e
Add toc
saltiniroberto c7029ce
Rename get_epoch_boundary_block to get_ancestor_at_epoch_boundary
saltiniroberto e255d09
Apply changes to Bellatrix and Daneb
saltiniroberto cdcf458
Merge branch 'dev' into pr3308
hwwhww 4cac761
make linter happy
hwwhww 4138609
Apply changes to p2p-interface.md
saltiniroberto 6d7b9e3
Merge remote-tracking branch 'upstream/dev' into add_get_boundary_block
saltiniroberto fdf2dc7
Merge remote-tracking branch 'upstream/dev' into add_get_boundary_block
saltiniroberto 334114d
Rename get_ancestor_at_epoch_boundary to get_checkpoint_block
saltiniroberto 36fcb81
Break long statement into two statements
saltiniroberto c985605
Fix copy and past error
saltiniroberto b5bd90d
Applied changes to tests
saltiniroberto 313439a
Fix lint erorrs
saltiniroberto ffb8459
Fixed doc in get_checkpoint_block
saltiniroberto a044c0c
Merge branch 'dev' into pr3308
hwwhww File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it seems no need to modify this one
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.
@hwwhww Why do you think that there may be no need to modify this one?
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.
because we need to define the variable
finalized_slot
to checkassert block.slot > finalized_slot
anyway, the change of this change doesn't simplify much here.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.
The objective of this PR is not so much about simplifying the code, but rather making explicit when we are computing an epoch boundary block.
For example, in this line, we are not only checking that
store.finalized_checkpoint.root
is an ancestor ofblock.parent_root
, but also thatstore.finalized_checkpoint.root
is an epoch boundary block in the chain ofblock.parent_root
, which I don't think that it is immediate in the original code.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.
But the difference between checking whether a block is just an ancestor or it is also an epoch boundary block is significant when performing security analysis on the code.