Skip to content

Commit 624f572

Browse files
committed
internal/ethapi: skip tx gas limit check for calls
This disables the tx gaslimit cap for eth_call and related RPC operations.
1 parent 6492751 commit 624f572

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/state_transition.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ type Message struct {
166166

167167
// When SkipFromEOACheck is true, the message sender is not checked to be an EOA.
168168
SkipFromEOACheck bool
169+
170+
// If enabled, the message gas limit is not checked against the protocol-enforced tx gaslimit.
171+
SkipTxGasLimitCheck bool
169172
}
170173

171174
// TransactionToMessage converts a transaction into a Message.
@@ -399,7 +402,7 @@ func (st *stateTransition) preCheck() error {
399402
}
400403
}
401404
// Verify tx gas limit does not exceed EIP-7825 cap.
402-
if isOsaka && msg.GasLimit > params.MaxTxGas {
405+
if isOsaka && !msg.SkipTxGasLimitCheck && msg.GasLimit > params.MaxTxGas {
403406
return fmt.Errorf("%w (cap: %d, tx: %d)", ErrGasLimitTooHigh, params.MaxTxGas, msg.GasLimit)
404407
}
405408
return st.buyGas()

internal/ethapi/transaction_args.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, skipNonceCheck, skipEoA
492492
SetCodeAuthorizations: args.AuthorizationList,
493493
SkipNonceChecks: skipNonceCheck,
494494
SkipFromEOACheck: skipEoACheck,
495+
SkipTxGasLimitCheck: true,
495496
}
496497
}
497498

0 commit comments

Comments
 (0)