From 4d37c5ae5a837f7e38d72fc99eca13fc8311765b Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Mon, 20 Apr 2026 16:04:26 +0800 Subject: [PATCH] fix(core/vm): triple modexp cost post-cancun #32231 --- core/vm/contracts.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 3d10174d1e63..ebfaa24b1650 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -438,7 +438,9 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 { gas.Mul(gas, adjExpLen) } // 2. Different divisor (`GQUADDIVISOR`) (3) - gas.Div(gas, big3) + if !c.eip7883 { + gas.Div(gas, big3) + } if gas.BitLen() > 64 { return math.MaxUint64 }