diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 86ee254ef0..cf9f470eef 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -935,6 +935,14 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc tx = args.ToTransaction(args.GasPrice == nil) traceConfig *TraceConfig ) + // Lower the basefee to 0 to avoid breaking EVM + // invariants (basefee < feecap). + if msg.GasPrice.Sign() == 0 { + vmctx.BaseFee = new(big.Int) + } + if msg.BlobGasFeeCap != nil && msg.BlobGasFeeCap.BitLen() == 0 { + vmctx.BlobBaseFee = new(big.Int) + } if config != nil { traceConfig = &config.TraceConfig }