diff --git a/core/arbitrum_hooks.go b/core/arbitrum_hooks.go index 5f4b57f2d..ea93ebefc 100644 --- a/core/arbitrum_hooks.go +++ b/core/arbitrum_hooks.go @@ -45,8 +45,8 @@ var InterceptRPCMessage = func( // Gets ArbOS's maximum intended gas per second var GetArbOSSpeedLimitPerSecond func(statedb *state.StateDB) (uint64, error) -// Allows ArbOS to update the gas cap so that it ignores the message's specific L1 poster costs. -var PostingGasHook = func(msg *Message, header *types.Header, statedb *state.StateDB) (uint64, error) { return 0, nil } +// While processing RPC only - Ask ArbOS what are the poster costs for this message. +var RPCPostingGasHook = func(msg *Message, header *types.Header, statedb *state.StateDB) (uint64, error) { return 0, nil } // Renders a solidity error in human-readable form var RenderRPCError func(data []byte) error diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e9125ecdd..5ce1e3d7d 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1304,7 +1304,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr // Arbitrum: raise the gas cap to ignore L1 costs so that it's compute-only { - postingGas, err := core.PostingGasHook(call, header, state) + postingGas, err := core.RPCPostingGasHook(call, header, state) if err != nil { return 0, err } diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index 3e73dba64..197584a74 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -492,7 +492,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, globalGasCap uint64, he if state != nil && !skipL1Charging { // ToMessage recurses once to allow ArbOS to intercept the result for all callers // ArbOS uses this to modify globalGasCap so that the cap will ignore this tx's specific L1 data costs - postingGas, err := core.PostingGasHook(msg, header, state) + postingGas, err := core.RPCPostingGasHook(msg, header, state) if err == nil { args.setGasUsingCap(globalGasCap + postingGas) msg.GasLimit = uint64(*args.Gas)