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 self destruct gas charges #483

Merged

Conversation

tanishqjasoria
Copy link

No description provided.

statelessGas := evm.Accesses.TouchBasicData(contractAddr[:], false)
balanceIsZero := evm.StateDB.GetBalance(contractAddr).Sign() == 0

if _, isPrecompile := evm.precompile(beneficiaryAddr); isPrecompile && balanceIsZero {
Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Owner

@gballet gballet left a comment

Choose a reason for hiding this comment

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

LGTM. We might have changed that in one of the EIP update PRs, that I still need to review, so I'm not merging right away, but I agree this is against the spec.

@gballet gballet added this to the verkle-gen-devnet-7 milestone Sep 3, 2024
contractAddr := contract.Address()

statelessGas := evm.Accesses.TouchBasicData(contractAddr[:], false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

While it's true that this touch should have not practical effect, I'd still keep it after the precompile if.

Copy link
Owner

@gballet gballet left a comment

Choose a reason for hiding this comment

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

LGTM

@gballet gballet merged commit b8bc851 into gballet:kaustinen-with-shapella Sep 6, 2024
12 of 13 checks passed
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