|
|
|
@ -268,7 +268,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed |
|
|
|
|
for task := range taskCh { |
|
|
|
|
var ( |
|
|
|
|
signer = types.MakeSigner(api.backend.ChainConfig(), task.block.Number(), task.block.Time()) |
|
|
|
|
blockCtx = core.NewEVMBlockContext(task.block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
blockCtx = core.NewEVMBlockContext(task.block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
) |
|
|
|
|
// Trace all the transactions contained within
|
|
|
|
|
for i, tx := range task.block.Transactions() { |
|
|
|
@ -379,7 +379,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed |
|
|
|
|
} |
|
|
|
|
// Insert block's parent beacon block root in the state
|
|
|
|
|
// as per EIP-4788.
|
|
|
|
|
context := core.NewEVMBlockContext(next.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
context := core.NewEVMBlockContext(next.Header(), api.chainContext(ctx), nil) |
|
|
|
|
evm := vm.NewEVM(context, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
|
if beaconRoot := next.BeaconRoot(); beaconRoot != nil { |
|
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, evm) |
|
|
|
@ -533,7 +533,7 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config |
|
|
|
|
roots []common.Hash |
|
|
|
|
signer = types.MakeSigner(api.backend.ChainConfig(), block.Number(), block.Time()) |
|
|
|
|
chainConfig = api.backend.ChainConfig() |
|
|
|
|
vmctx = core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
vmctx = core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
deleteEmptyObjects = chainConfig.IsEIP158(block.Number()) |
|
|
|
|
) |
|
|
|
|
evm := vm.NewEVM(vmctx, statedb, chainConfig, vm.Config{}) |
|
|
|
@ -599,7 +599,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac |
|
|
|
|
} |
|
|
|
|
defer release() |
|
|
|
|
|
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
evm := vm.NewEVM(blockCtx, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
|
if beaconRoot := block.BeaconRoot(); beaconRoot != nil { |
|
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, evm) |
|
|
|
@ -675,7 +675,7 @@ func (api *API) traceBlockParallel(ctx context.Context, block *types.Block, stat |
|
|
|
|
// as the GetHash function of BlockContext is not safe for
|
|
|
|
|
// concurrent use.
|
|
|
|
|
// See: https://github.com/ethereum/go-ethereum/issues/29114
|
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
res, err := api.traceTx(ctx, txs[task.index], msg, txctx, blockCtx, task.statedb, config) |
|
|
|
|
if err != nil { |
|
|
|
|
results[task.index] = &txTraceResult{TxHash: txs[task.index].Hash(), Error: err.Error()} |
|
|
|
@ -688,7 +688,7 @@ func (api *API) traceBlockParallel(ctx context.Context, block *types.Block, stat |
|
|
|
|
|
|
|
|
|
// Feed the transactions into the tracers and return
|
|
|
|
|
var failed error |
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
evm := vm.NewEVM(blockCtx, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
|
|
|
|
|
|
txloop: |
|
|
|
@ -765,7 +765,7 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block |
|
|
|
|
dumps []string |
|
|
|
|
signer = types.MakeSigner(api.backend.ChainConfig(), block.Number(), block.Time()) |
|
|
|
|
chainConfig = api.backend.ChainConfig() |
|
|
|
|
vmctx = core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
vmctx = core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
canon = true |
|
|
|
|
) |
|
|
|
|
// Check if there are any overrides: the caller may wish to enable a future
|
|
|
|
@ -946,7 +946,7 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc |
|
|
|
|
} |
|
|
|
|
defer release() |
|
|
|
|
|
|
|
|
|
vmctx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), api.backend.ChainConfig(), nil) |
|
|
|
|
vmctx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) |
|
|
|
|
// Apply the customization rules if required.
|
|
|
|
|
if config != nil { |
|
|
|
|
config.BlockOverrides.Apply(&vmctx) |
|
|
|
|