diff --git a/eth/tracers/api.go b/eth/tracers/api.go index e234851e37..5019780559 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -945,7 +945,8 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc } defer release() - if config != nil && config.TxIndex != nil { + // Apply only when we have used StateAtBlock since `StateAtTransaction` already handles the beacon root + if config == nil || config.TxIndex == nil { if beaconRoot := block.BeaconRoot(); beaconRoot != nil { context := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{})