Skip to content

core/vm: implement EIP 7883 - ModExp Gas Cost Increase #31606

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

Merged
merged 8 commits into from
Jun 5, 2025

Conversation

jwasinger
Copy link
Contributor

@jwasinger jwasinger commented Apr 10, 2025

@jwasinger jwasinger marked this pull request as ready for review April 11, 2025 10:49
@fjl fjl mentioned this pull request Apr 24, 2025
12 tasks
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

LGTM

@jwasinger jwasinger changed the title core/vm: implement EIP 7883 core/vm: implement EIP 7883 - ModExp Gas Cost Increase May 13, 2025
@fjl
Copy link
Contributor

fjl commented Jun 4, 2025

Please rebase.

@@ -440,6 +453,14 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 {
gas.Rsh(gas, 3)
gas.Mul(gas, gas)

var minPrice uint64 = 200
if c.eip7883 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this check is within the if c.eip2565 block, the two EIPs are effectively dependent on each other and cannot be toggled separately. Not sure if we need to be able to have them fully separate, but maybe it would be more appropriate to toggle them with a single setting.

@fjl fjl merged commit 35dd84c into ethereum:master Jun 5, 2025
3 of 4 checks passed
Thegaram pushed a commit to scroll-tech/go-ethereum that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants