diff --git a/core/state_transition.go b/core/state_transition.go index bc52a265dceb..7b40f9764784 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -302,7 +302,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { // 6. caller has enough balance to cover asset transfer for **topmost** call // Arbitrum: drop support for tips from upgrade 2 onward - if st.evm.ProcessingHook.DropTip() && st.gasPrice.Cmp(st.evm.Context.BaseFee) > 0 { + if st.gasPrice.Cmp(st.evm.Context.BaseFee) > 0 { st.gasPrice = st.evm.Context.BaseFee st.gasTipCap = common.Big0 } @@ -328,8 +328,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { } st.gas -= gas - tipRecipient, err := st.evm.ProcessingHook.GasChargingHook(&st.gas) - if err != nil { + if err := st.evm.ProcessingHook.GasChargingHook(&st.gas); err != nil { return nil, err } @@ -365,10 +364,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { if london { effectiveTip = cmath.BigMin(st.gasTipCap, new(big.Int).Sub(st.gasFeeCap, st.evm.Context.BaseFee)) } - if tipRecipient == nil { - tipRecipient = &st.evm.Context.Coinbase - } - st.state.AddBalance(*tipRecipient, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), effectiveTip)) + st.state.AddBalance(st.evm.Context.Coinbase, new(big.Int).Mul(new(big.Int).SetUint64(st.gasUsed()), effectiveTip)) st.evm.ProcessingHook.EndTxHook(st.gas, vmerr == nil) diff --git a/core/types/transaction.go b/core/types/transaction.go index 8b9b5a29fead..aacf3faf6515 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -60,8 +60,7 @@ type Transaction struct { time time.Time // Time first seen locally (spam avoidance) // Arbitrum cache - PosterCost *big.Int - PosterIsReimbursable bool + PosterCost *big.Int // caches hash atomic.Value diff --git a/core/vm/evm_arbitrum.go b/core/vm/evm_arbitrum.go index 66d025eee133..9cd18183cde5 100644 --- a/core/vm/evm_arbitrum.go +++ b/core/vm/evm_arbitrum.go @@ -36,7 +36,7 @@ func (evm *EVM) DecrementDepth() { type TxProcessingHook interface { StartTxHook() (bool, uint64, error, []byte) // return 4-tuple rather than *struct to avoid an import cycle - GasChargingHook(gasRemaining *uint64) (*common.Address, error) + GasChargingHook(gasRemaining *uint64) error PushCaller(addr common.Address) PopCaller() ForceRefundGas() uint64 @@ -46,7 +46,6 @@ type TxProcessingHook interface { L1BlockNumber(blockCtx BlockContext) (uint64, error) L1BlockHash(blockCtx BlockContext, l1BlocKNumber uint64) (common.Hash, error) FillReceiptInfo(receipt *types.Receipt) - DropTip() bool } type DefaultTxProcessor struct{} @@ -55,8 +54,8 @@ func (p DefaultTxProcessor) StartTxHook() (bool, uint64, error, []byte) { return false, 0, nil, nil } -func (p DefaultTxProcessor) GasChargingHook(gasRemaining *uint64) (*common.Address, error) { - return nil, nil +func (p DefaultTxProcessor) GasChargingHook(gasRemaining *uint64) error { + return nil } func (p DefaultTxProcessor) PushCaller(addr common.Address) {} @@ -87,7 +86,3 @@ func (p DefaultTxProcessor) L1BlockHash(blockCtx BlockContext, l1BlocKNumber uin } func (p DefaultTxProcessor) FillReceiptInfo(*types.Receipt) {} - -func (p DefaultTxProcessor) DropTip() bool { - return false -}