-
Notifications
You must be signed in to change notification settings - Fork 249
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
Justified revision #802
Justified revision #802
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #802 +/- ##
==========================================
+ Coverage 62.33% 62.36% +0.03%
==========================================
Files 206 208 +2
Lines 18859 18904 +45
==========================================
+ Hits 11756 11790 +34
- Misses 6002 6009 +7
- Partials 1101 1105 +4 ☔ View full report in Codecov by Sentry. |
can we add test for justified in e2e ? (we can open PR for now and just merge it when needed, before we forget about it) |
Tests added in this PR. |
@paologalligit I had a non-persist way, if you have a bit, please take a look #808 |
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.
Did a partial review looks good, still want to digg one more time into the engine.go
c661c61
* feature: add justified revision for block * fix: missing err declaration * docs: add justified revision to thor.yaml * feat: storing justified blockId in engine.data * a non-persist way to implement jutified * use store point to restore quality * refactor: rename CommitLevel interface * refactor: change approach to non-persist the justified block * bft: add justified tests * fix: rename file name and simplified error check in test * improve bft package * add comments --------- Co-authored-by: tony <[email protected]> Co-authored-by: otherview <[email protected]> Co-authored-by: Darren Kelly <[email protected]>
Description
This PR refers to this ticket. It introduces a new revision named justified. The meaning of this revision is the same Ethereum is using (see here, in geth the justified revision is referred to as safe). The chain is composed of epochs (each epoch is composed of 180 blocks) whose starting point is called checkpoint. When an epoch ends, if its checkpoint has garnered a ⅔ supermajority, the checkpoint gets justified; this happens every 30 minutes.
Example:
-- current best block
|
|
-- checkpoint
|
|
|
|
|
-- justified checkpoint
|
|
|
|
|
-- finalized checkpoint
Type of change
How Has This Been Tested?
Checklist: