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

consortium: fix not validated snapshot query #397

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

NganSM
Copy link
Contributor

@NganSM NganSM commented Jan 15, 2024

The verifyFinalitySignatures function is invoked in VerifyHeaderAndParents before the condition
parent.Number.Uint64() == number-1 && parent.Hash() == header.ParentHash is checked. This can result in generating and storing an invalid snapshot because the block number and block hash provided as inputs for snapshot do not match. If the if number == c.forkedBlock-1 block is executed, this can lead to overwriting past snapshot with invalid data.

The `verifyFinalitySignatures` function is invoked in `VerifyHeaderAndParents`
before the condition
`parent.Number.Uint64() == number-1 && parent.Hash() == header.ParentHash`
is checked. This can result in generating and storing an invalid snapshot
because the block number and block hash provided as inputs for `snapshot`
do not match. If the `if number == c.forkedBlock-1` block is executed,
this can lead to overwriting past snapshot with invalid data.
@NganSM NganSM requested a review from minh-bq January 15, 2024 09:17
@minh-bq minh-bq requested review from DNK90 and andicrypt January 15, 2024 09:46
Copy link
Contributor

@DNK90 DNK90 left a comment

Choose a reason for hiding this comment

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

LGTM

@minh-bq minh-bq merged commit 265e913 into axieinfinity:master Jan 23, 2024
1 check passed
Francesco4203 pushed a commit to Francesco4203/ronin that referenced this pull request Jun 18, 2024
The `verifyFinalitySignatures` function is invoked in `VerifyHeaderAndParents`
before the condition
`parent.Number.Uint64() == number-1 && parent.Hash() == header.ParentHash`
is checked. This can result in generating and storing an invalid snapshot
because the block number and block hash provided as inputs for `snapshot`
do not match. If the `if number == c.forkedBlock-1` block is executed,
this can lead to overwriting past snapshot with invalid data.
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.

4 participants