|
|
@ -382,6 +382,12 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed |
|
|
|
vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Insert parent hash in history contract.
|
|
|
|
|
|
|
|
if api.backend.ChainConfig().IsPrague(next.Number(), next.Time()) { |
|
|
|
|
|
|
|
context := core.NewEVMBlockContext(next.Header(), api.chainContext(ctx), nil) |
|
|
|
|
|
|
|
vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
|
|
|
|
core.ProcessParentBlockHash(next.ParentHash(), vmenv, statedb) |
|
|
|
|
|
|
|
} |
|
|
|
// Clean out any pending release functions of trace state. Note this
|
|
|
|
// Clean out any pending release functions of trace state. Note this
|
|
|
|
// step must be done after constructing tracing state, because the
|
|
|
|
// step must be done after constructing tracing state, because the
|
|
|
|
// tracing state of block next depends on the parent state and construction
|
|
|
|
// tracing state of block next depends on the parent state and construction
|
|
|
@ -534,6 +540,9 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config |
|
|
|
vmenv := vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}) |
|
|
|
vmenv := vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if chainConfig.IsPrague(block.Number(), block.Time()) { |
|
|
|
|
|
|
|
core.ProcessParentBlockHash(block.ParentHash(), vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}), statedb) |
|
|
|
|
|
|
|
} |
|
|
|
for i, tx := range block.Transactions() { |
|
|
|
for i, tx := range block.Transactions() { |
|
|
|
if err := ctx.Err(); err != nil { |
|
|
|
if err := ctx.Err(); err != nil { |
|
|
|
return nil, err |
|
|
|
return nil, err |
|
|
@ -613,6 +622,10 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac |
|
|
|
vmenv := vm.NewEVM(blockCtx, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
vmenv := vm.NewEVM(blockCtx, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if api.backend.ChainConfig().IsPrague(block.Number(), block.Time()) { |
|
|
|
|
|
|
|
vmenv := vm.NewEVM(blockCtx, vm.TxContext{}, statedb, api.backend.ChainConfig(), vm.Config{}) |
|
|
|
|
|
|
|
core.ProcessParentBlockHash(block.ParentHash(), vmenv, statedb) |
|
|
|
|
|
|
|
} |
|
|
|
for i, tx := range txs { |
|
|
|
for i, tx := range txs { |
|
|
|
// Generate the next state snapshot fast without tracing
|
|
|
|
// Generate the next state snapshot fast without tracing
|
|
|
|
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee()) |
|
|
|
msg, _ := core.TransactionToMessage(tx, signer, block.BaseFee()) |
|
|
@ -771,6 +784,10 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block |
|
|
|
vmenv := vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}) |
|
|
|
vmenv := vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
core.ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if chainConfig.IsPrague(block.Number(), block.Time()) { |
|
|
|
|
|
|
|
vmenv := vm.NewEVM(vmctx, vm.TxContext{}, statedb, chainConfig, vm.Config{}) |
|
|
|
|
|
|
|
core.ProcessParentBlockHash(block.ParentHash(), vmenv, statedb) |
|
|
|
|
|
|
|
} |
|
|
|
for i, tx := range block.Transactions() { |
|
|
|
for i, tx := range block.Transactions() { |
|
|
|
// Prepare the transaction for un-traced execution
|
|
|
|
// Prepare the transaction for un-traced execution
|
|
|
|
var ( |
|
|
|
var ( |
|
|
|