From 0b704040e3464cec713cdf3ca9d7a976c72541dc Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 16 Dec 2024 23:32:29 +0000 Subject: [PATCH] increase default gas limit from 30M to 36M (#2941) --- nimbus/constants.nim | 2 +- nimbus/core/executor/process_transaction.nim | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nimbus/constants.nim b/nimbus/constants.nim index 269b8876a..5bafba67b 100644 --- a/nimbus/constants.nim +++ b/nimbus/constants.nim @@ -49,7 +49,7 @@ const GENESIS_EXTRA_DATA* = "" GAS_LIMIT_MINIMUM* = 5000 GAS_LIMIT_MAXIMUM* = int64.high.GasInt # Maximum the gas limit (2^63-1). - DEFAULT_GAS_LIMIT* = 30_000_000 + DEFAULT_GAS_LIMIT* = 36_000_000 EMPTY_SHA3* = hash32"c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" diff --git a/nimbus/core/executor/process_transaction.nim b/nimbus/core/executor/process_transaction.nim index 6938054f0..5cd0fc352 100644 --- a/nimbus/core/executor/process_transaction.nim +++ b/nimbus/core/executor/process_transaction.nim @@ -28,7 +28,7 @@ import # Private functions # ------------------------------------------------------------------------------ -proc eip1559BaseFee(header: Header; fork: EVMFork): UInt256 = +func eip1559BaseFee(header: Header; fork: EVMFork): UInt256 = ## Actually, `baseFee` should be 0 for pre-London headers already. But this ## function just plays safe. In particular, the `test_general_state_json.nim` ## module modifies this block header `baseFee` field unconditionally :(. @@ -138,7 +138,7 @@ proc processBeaconBlockRoot*(vmState: BaseVMState, beaconRoot: Hash32): call = CallParams( vmState : vmState, sender : SYSTEM_ADDRESS, - gasLimit : 30_000_000.GasInt, + gasLimit : DEFAULT_GAS_LIMIT.GasInt, gasPrice : 0.GasInt, to : BEACON_ROOTS_ADDRESS, input : @(beaconRoot.data), @@ -168,7 +168,7 @@ proc processParentBlockHash*(vmState: BaseVMState, prevHash: Hash32): call = CallParams( vmState : vmState, sender : SYSTEM_ADDRESS, - gasLimit : 30_000_000.GasInt, + gasLimit : DEFAULT_GAS_LIMIT.GasInt, gasPrice : 0.GasInt, to : HISTORY_STORAGE_ADDRESS, input : @(prevHash.data), @@ -197,7 +197,7 @@ proc processDequeueWithdrawalRequests*(vmState: BaseVMState): seq[byte] = call = CallParams( vmState : vmState, sender : SYSTEM_ADDRESS, - gasLimit : 30_000_000.GasInt, + gasLimit : DEFAULT_GAS_LIMIT.GasInt, gasPrice : 0.GasInt, to : WITHDRAWAL_QUEUE_ADDRESS, @@ -221,7 +221,7 @@ proc processDequeueConsolidationRequests*(vmState: BaseVMState): seq[byte] = call = CallParams( vmState : vmState, sender : SYSTEM_ADDRESS, - gasLimit : 30_000_000.GasInt, + gasLimit : DEFAULT_GAS_LIMIT.GasInt, gasPrice : 0.GasInt, to : CONSOLIDATION_QUEUE_ADDRESS,