Skip to content

Commit 19e4e06

Browse files
authored
add eip-7883 changes (#3399)
* add eip-7883 changes * Update execution_chain/evm/precompiles.nim
1 parent a7d5ff3 commit 19e4e06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

execution_chain/evm/precompiles.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ func modExpFee(c: Computation,
205205
result = result * result
206206

207207
func mulComplexityEIP7883(maxLen: UInt256): UInt256 =
208-
# gas = ceil(x div 8) ^ 2
209-
result = maxLen + 7
210-
result = result div 8
211-
result = result * result
208+
result = 16.u256
212209
if maxLen > 32.u256:
210+
result = maxLen + 7
211+
result = result div 8
212+
result = result * result
213213
result = result * 2
214214

215215
let adjExpLen = block:

0 commit comments

Comments
 (0)