From ef133c3c9f025ae7083769a2ff12b0a602b25fbe Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 17 Sep 2025 16:30:43 +0200 Subject: [PATCH] internal/ethapi: skip tx gas limit check for calls This disables the tx gaslimit cap for eth_call and related RPC operations. --- core/state_transition.go | 5 ++++- internal/ethapi/transaction_args.go | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/state_transition.go b/core/state_transition.go index 2cafe4865f..2dd1d8d0e3 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -166,6 +166,9 @@ type Message struct { // When SkipFromEOACheck is true, the message sender is not checked to be an EOA. SkipFromEOACheck bool + + // If enabled, the message gas limit is not checked against the protocol-enforced tx gaslimit. + SkipTxGasLimitCheck bool } // TransactionToMessage converts a transaction into a Message. @@ -399,7 +402,7 @@ func (st *stateTransition) preCheck() error { } } // Verify tx gas limit does not exceed EIP-7825 cap. - if isOsaka && msg.GasLimit > params.MaxTxGas { + if isOsaka && !msg.SkipTxGasLimitCheck && msg.GasLimit > params.MaxTxGas { return fmt.Errorf("%w (cap: %d, tx: %d)", ErrGasLimitTooHigh, params.MaxTxGas, msg.GasLimit) } return st.buyGas() diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index f80ef6d080..c910cab2d0 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -492,6 +492,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, skipNonceCheck, skipEoA SetCodeAuthorizations: args.AuthorizationList, SkipNonceChecks: skipNonceCheck, SkipFromEOACheck: skipEoACheck, + SkipTxGasLimitCheck: true, } }