-
Notifications
You must be signed in to change notification settings - Fork 112
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
feat(consensus/grandpa): Add warp sync proof verification #4240
Conversation
a905fca
to
bf1c72c
Compare
28677f7
to
c6a47c3
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.
Do you mind moving the internal/client/consensus/grandpa/warp_sync.go
file to lib/grandpa
package? I think this is more inline with the "old" way of doing this with the local interfaces for the older block BlockState
and GrandpaState
. I'd like to keep things more analogous to substrate in the internal/primitives
and internal/client
code.
2f60fe3
to
c249195
Compare
Moved! |
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 made few comments, but overall looks good, nice work 🚀
2900682
to
3ccddb3
Compare
3ccddb3
to
ebf72c6
Compare
Changes
Implement warp sync proof verification.
The warp proof is verified by traversing the warp proof fragments (with the block headers and justifications), then we verify the justifications against the authorities based on the genesis authorities and the scheduled changes.
If we are able to verify all the fragments, then the warp proof is valid.
verify
methodReference parity code
Note: I'd rather to not use generics in this initial phase because that will imply more changes (eg: in
BlockState
andGrandpaState
) we can revisit this later to make the structs generic.Tests
make test
Issues
#4237