From cbde59aeda7000dcfc9b82067ae57e21381d0c49 Mon Sep 17 00:00:00 2001 From: Dustin Xie Date: Fri, 25 Mar 2022 10:08:44 -0700 Subject: [PATCH] address comment --- action/protocol/execution/evm/evm.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action/protocol/execution/evm/evm.go b/action/protocol/execution/evm/evm.go index 0b7a83d370..055afbde1f 100644 --- a/action/protocol/execution/evm/evm.go +++ b/action/protocol/execution/evm/evm.go @@ -399,8 +399,10 @@ func executeInEVM(ctx context.Context, evmParams *Params, stateDB *StateDBAdapte log.L().Debug("statedb error", zap.Error(stateDB.Error())) } if !london { + // Before EIP-3529: refunds were capped to gasUsed / 2 refund = (evmParams.gas - remainingGas) / params.RefundQuotient } else { + // After EIP-3529: refunds are capped to gasUsed / 5 refund = (evmParams.gas - remainingGas) / params.RefundQuotientEIP3529 } if refund > stateDB.GetRefund() {