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

charge proper warm costs #497

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

jsign
Copy link
Collaborator

@jsign jsign commented Sep 13, 2024

This PR makes some changes reg charging at least warm costs for precompile (2929). This was found by @tanishqjasoria by running the fixtures.

Signed-off-by: Ignacio Hagopian <[email protected]>
return gas, nil
}
wgas := evm.Accesses.TouchBasicData(addr[:], false)
if wgas == 0 {
wgas = params.WarmStorageReadCostEIP2929
}
var overflow bool
// We charge (cold-warm), since 'warm' is already charged as constantGas
Copy link
Collaborator Author

@jsign jsign Sep 13, 2024

Choose a reason for hiding this comment

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

@gballet, if I looked correctly, for the verkle fork there aren't constant gas costs? Or maybe I misinterpreted the comment.

Link

Copy link
Owner

Choose a reason for hiding this comment

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

yeah that's incorrect. There was a time when it was, but this comment should have been deleted a long time ago.

@jsign jsign requested a review from gballet September 13, 2024 12:02
@jsign jsign marked this pull request as ready for review September 13, 2024 12:02
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. Tanishq wants to update the EIP to make it clear when warm gas costs are charged, but we agree that the current state of the EIP already implicitely says these costs should be charged. So I'll merge this.

@gballet gballet added this to the verkle-gen-devnet-7 milestone Sep 13, 2024
@gballet gballet merged commit 218365f into kaustinen-with-shapella Sep 13, 2024
10 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.

2 participants