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: add check for block number #2199

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

pythonberg1997
Copy link
Contributor

Description

This pr is to fix a bug within precompile contract verifyDoubleSignEvidence

Rationale

An arbitrary block number that is bigger than 2^256 could overwrite the address in the returned bytes.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add check for block number in verifyDoubleSignEvidence

core/vm/contracts.go Outdated Show resolved Hide resolved
core/vm/contracts.go Outdated Show resolved Hide resolved
core/vm/contracts.go Outdated Show resolved Hide resolved
@j75689 j75689 self-requested a review February 2, 2024 04:04
@@ -1399,7 +1399,8 @@ func (c *verifyDoubleSignEvidence) RequiredGas(input []byte) uint64 {
}

var (
extraSeal = 65
extraSeal = 65
Copy link
Contributor

Choose a reason for hiding this comment

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

extraSeal can be const.

core/vm/contracts.go Outdated Show resolved Hide resolved
@pythonberg1997 pythonberg1997 merged commit e7cd04b into bnb-chain:bc-fusion Feb 2, 2024
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.

3 participants