Skip to content

Commit e9fc066

Browse files
authored
fix(core/vm): triple modexp cost post-cancun ethereum#32231 (#2319)
1 parent 7045e7f commit e9fc066

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/vm/contracts.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 {
438438
gas.Mul(gas, adjExpLen)
439439
}
440440
// 2. Different divisor (`GQUADDIVISOR`) (3)
441-
gas.Div(gas, big3)
441+
if !c.eip7883 {
442+
gas.Div(gas, big3)
443+
}
442444
if gas.BitLen() > 64 {
443445
return math.MaxUint64
444446
}

0 commit comments

Comments
 (0)