-
Notifications
You must be signed in to change notification settings - Fork 111
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 proof block height verification #400
Add proof block height verification #400
Conversation
ff16d31
to
05289f7
Compare
GetBlockHash accepts a block height and, if successful, returns the corresponding block hash.
05289f7
to
bad914e
Compare
As far as I can tell, we should be able to release after this PR is merged. Once this PR is merged, the header verifier takes into account both the block header and block height. Therefore, we should probably generalise the verifier's name. I would like to open another PR after this to rename |
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! Just one comment about the order of RPC calls, should be a small thing to fix.
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.
In agreement with previous comments - seems like we should have a negative test in the itests? Or as a unit test, not sure how easy it is to reorg under itest.
bad914e
to
9532fd7
Compare
9532fd7
to
389f4c6
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.
Just two more nits, otherwise LGTM 🎉
389f4c6
to
03be04b
Compare
@jharveyb I've updated this PR with an additional negative unit test orientated around block height. Oli mentioned that the re-org work is planned for 0.3.0. Perhaps after that work is complete we can revisit itests for proof block fields? |
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.
Forgot that the reorg work will happen later and separately - LGTM!
Closes #387