From 4d6c937ae7283ff3b75ef69ab568979eb0af437b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 8 Sep 2025 22:11:40 +0800 Subject: [PATCH] core/vm: fix comment and remove unused divisor in osakaModexpGas --- core/vm/contracts.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index a06b0d09ca..b9659f8fd7 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -531,7 +531,6 @@ func berlinModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64 func osakaModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64 { const ( multiplier = 16 - divisor = 3 minGas = 500 ) @@ -542,7 +541,7 @@ func osakaModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64 } iterationCount := modexpIterationCount(expLen, expHead, multiplier) - // Calculate gas: (multComplexity * iterationCount) / osakaDivisor + // Calculate gas: multComplexity * iterationCount carry, gas := bits.Mul64(iterationCount, multComplexity) if carry != 0 { return math.MaxUint64