Skip to content
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

fix: fix query height in ProveEpochSealed #352

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Conversation

SebastianElvis
Copy link
Member

@SebastianElvis SebastianElvis commented Apr 20, 2023

This PR fixes a bug in ProveEpochSealed.

When executing an ABCI query abci.RequestQuery, one needs to feed a height, such that the node will reply an inclusion proof of the queried KV pair against the header at height+1.

We use this ABCI query for generating proofs of inclusion for the validator set and the metadata of epoch i against the sealer header, i.e., the 2nd header of epoch i+1. In order to allow verifier to verify the proofs against the sealer header, the ABCI query should be given height queryHeight-1 rather than queryHeight, where queryHeight will be the sealer header's height. This PR fixes the bug where we use queryHeight rather than queryHeight - 1.

The corresponding unit test is also fixed.

Copy link
Member

@vitsalis vitsalis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@SebastianElvis SebastianElvis merged commit 754c3ba into dev Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants