From 72c390d3c5cf5fba77020a42f7db049198aab609 Mon Sep 17 00:00:00 2001 From: MariusVanDerWijden Date: Tue, 2 Sep 2025 10:03:01 +0200 Subject: [PATCH] core/vm: switch modexp gas computation to uint64 --- core/vm/contracts.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 670cce2513..48ba3333ec 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -458,14 +458,6 @@ func berlinMultComplexity(x uint64) uint64 { return x } -// Slow Bigint way (benchmark this) -// func berlinMultComplexity(xInt uint64) *big.Int { -// x := new(big.Int).SetUint64(xInt) -// x = new(big.Int).Add(x, big.NewInt(7)) // x + 7 -// x = new(big.Int).Rsh(x, 3) // (x + 7) / 8 -// return new(big.Int).Mul(x, x) // ((x + 7) / 8) ^ 2 -// } - // osakaMultComplexity implements the multiplication complexity formula for Osaka. // // For x <= 32: returns 16