-
Notifications
You must be signed in to change notification settings - Fork 534
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
Checkpoint data signing #840
Checkpoint data signing #840
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/v3-parity #840 +/- ##
====================================================
Coverage ? 53.31%
====================================================
Files ? 161
Lines ? 21449
Branches ? 0
====================================================
Hits ? 11436
Misses ? 9079
Partials ? 934 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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
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
87de519
to
7647052
Compare
Description
This PR introduces new fields to the
Header.Extra
, which are required for checkpointing mechanism and are part of consensus protocol.Checkpoint data consists of:
BlockRound
- round for which we are building block at given height,EpochNumber
- denoting current epoch,CurrentValidatorsHash
- hash of the current validator set (for the current epoch),NextValidatorsHash
- hash of the next validator set (applicable for next epoch, namely epoch ending blocks which contain such information),EventRoot
- merkle root hash of all exit events triggered by the appropriate smart contract.Other than that, checkpoint is described with
BlockNumber
,BlockHash
andChainID
, but we don't write those information into the blockchain, as it would be redundant.Checkpoint data hash is in the following format:
Current validators and next validators hash is in the following format:
Also format of the proposal hash being signed by the validators has changed. Prior to this PR, it was corresponding to
BlockHash
. However now it is the same ascheckpointHash
.Changes include
Checklist
Testing