Skip to content

Commit f4d8945

Browse files
Chen-Yifanjhunsaker
authored andcommitted
reset MONAD_ETH_CALL_LOW_GAS_LIMIT based on Monad's storage access repricing
1 parent 7c0d8d7 commit f4d8945

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

category/rpc/monad_executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern "C"
2626
{
2727
#endif
2828

29-
static uint64_t const MONAD_ETH_CALL_LOW_GAS_LIMIT = 400'000;
29+
static uint64_t const MONAD_ETH_CALL_LOW_GAS_LIMIT = 8'100'000;
3030

3131
struct monad_state_override;
3232
struct monad_executor;

category/rpc/monad_executor_test.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ namespace
184184
.account =
185185
{std::nullopt,
186186
Account{
187-
.balance = 0x200000,
187+
.balance = 20'000'000u,
188188
.code_hash = NULL_HASH,
189189
.nonce = 0x0}}}},
190190
{ADDR_B,
@@ -197,7 +197,7 @@ namespace
197197

198198
Transaction const tx{
199199
.max_fee_per_gas = 1,
200-
.gas_limit = 500'000u,
200+
.gas_limit = 9'000'000u,
201201
.value = 0x10000,
202202
.to = ADDR_B,
203203
};
@@ -244,8 +244,9 @@ namespace
244244
.from = from,
245245
.to = ADDR_B,
246246
.value = 0x10000,
247-
.gas = gas_specified ? 500'000u : MONAD_ETH_CALL_LOW_GAS_LIMIT,
248-
.gas_used = gas_specified ? 500'000u : MONAD_ETH_CALL_LOW_GAS_LIMIT,
247+
.gas = gas_specified ? tx.gas_limit : MONAD_ETH_CALL_LOW_GAS_LIMIT,
248+
.gas_used =
249+
gas_specified ? tx.gas_limit : MONAD_ETH_CALL_LOW_GAS_LIMIT,
249250
.status = EVMC_SUCCESS,
250251
.depth = 0,
251252
.logs = std::vector<CallFrame::Log>{},

0 commit comments

Comments
 (0)