mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
internal/ethapi: skip tx gas limit check for calls
This disables the tx gaslimit cap for eth_call and related RPC operations.
This commit is contained in:
parent
ab95477a65
commit
ef133c3c9f
2 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -492,6 +492,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, skipNonceCheck, skipEoA
|
|||
SetCodeAuthorizations: args.AuthorizationList,
|
||||
SkipNonceChecks: skipNonceCheck,
|
||||
SkipFromEOACheck: skipEoACheck,
|
||||
SkipTxGasLimitCheck: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue