Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
if lastBlock == nil {
return nil, errors.New("could not get parent block")
}
// Handle upgrade build-in system contract code
// Handle upgrade built-in system contract code
systemcontracts.TryUpdateBuildInSystemContract(p.config, blockNumber, lastBlock.Time, block.Time(), statedb, true)

var (
Expand Down
4 changes: 2 additions & 2 deletions eth/state_accessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
if err != nil {
return nil, vm.BlockContext{}, nil, nil, err
}
// upgrade build-in system contract before normal txs if Feynman is not enabled
// upgrade built-in system contract before normal txs if Feynman is not enabled
systemcontracts.TryUpdateBuildInSystemContract(eth.blockchain.Config(), block.Number(), parent.Time(), block.Time(), statedb, true)
// Insert parent beacon block root in the state as per EIP-4788.
context := core.NewEVMBlockContext(block.Header(), eth.blockchain, nil)
Expand All @@ -262,7 +262,7 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
beforeSystemTx = true
)
for idx, tx := range block.Transactions() {
// upgrade build-in system contract before system txs if Feynman is enabled
// upgrade built-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
if posa, ok := eth.Engine().(consensus.PoSA); ok {
if isSystem, _ := posa.IsSystemTransaction(tx, block.Header()); isSystem {
Expand Down
18 changes: 9 additions & 9 deletions eth/tracers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed
)
// Trace all the transactions contained within
for i, tx := range task.block.Transactions() {
// upgrade build-in system contract before system txs if Feynman is enabled
// upgrade built-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
if posa, ok := api.backend.Engine().(consensus.PoSA); ok {
if isSystem, _ := posa.IsSystemTransaction(tx, task.block.Header()); isSystem {
Expand Down Expand Up @@ -402,7 +402,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed
break
}

// upgrade build-in system contract before normal txs if Feynman is not enabled
// upgrade built-in system contract before normal txs if Feynman is not enabled
systemcontracts.TryUpdateBuildInSystemContract(api.backend.ChainConfig(), next.Number(), block.Time(), next.Time(), statedb, true)

// Insert block's parent beacon block root in the state
Expand Down Expand Up @@ -558,7 +558,7 @@ func (api *API) IntermediateRoots(ctx context.Context, hash common.Hash, config
}
defer release()

// upgrade build-in system contract before normal txs if Feynman is not enabled
// upgrade built-in system contract before normal txs if Feynman is not enabled
systemcontracts.TryUpdateBuildInSystemContract(api.backend.ChainConfig(), block.Number(), parent.Time(), block.Time(), statedb, true)

var (
Expand Down Expand Up @@ -649,7 +649,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
}
defer release()

// upgrade build-in system contract before normal txs if Feynman is not enabled
// upgrade built-in system contract before normal txs if Feynman is not enabled
systemcontracts.TryUpdateBuildInSystemContract(api.backend.ChainConfig(), block.Number(), parent.Time(), block.Time(), statedb, true)
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
evm := vm.NewEVM(blockCtx, statedb, api.backend.ChainConfig(), vm.Config{})
Expand Down Expand Up @@ -678,7 +678,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
beforeSystemTx = true
)
for i, tx := range txs {
// upgrade build-in system contract before system txs if Feynman is enabled
// upgrade built-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
if posa, ok := api.backend.Engine().(consensus.PoSA); ok {
if isSystem, _ := posa.IsSystemTransaction(tx, block.Header()); isSystem {
Expand Down Expand Up @@ -771,7 +771,7 @@ func (api *API) traceBlockParallel(ctx context.Context, block *types.Block, stat

txloop:
for i, tx := range txs {
// upgrade build-in system contract before system txs if Feynman is enabled
// upgrade built-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
if posa, ok := api.backend.Engine().(consensus.PoSA); ok {
if isSystem, _ := posa.IsSystemTransaction(tx, block.Header()); isSystem {
Expand Down Expand Up @@ -845,7 +845,7 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block
}
defer release()

// upgrade build-in system contract before normal txs if Feynman is not enabled
// upgrade built-in system contract before normal txs if Feynman is not enabled
systemcontracts.TryUpdateBuildInSystemContract(api.backend.ChainConfig(), block.Number(), parent.Time(), block.Time(), statedb, true)

// Retrieve the tracing configurations, or use default values
Expand Down Expand Up @@ -884,7 +884,7 @@ func (api *API) standardTraceBlockToFile(ctx context.Context, block *types.Block
core.ProcessParentBlockHash(block.ParentHash(), evm)
}
for i, tx := range block.Transactions() {
// upgrade build-in system contract before system txs if Feynman is enabled
// upgrade built-in system contract before system txs if Feynman is enabled
if beforeSystemTx {
if posa, ok := api.backend.Engine().(consensus.PoSA); ok {
if isSystem, _ := posa.IsSystemTransaction(tx, block.Header()); isSystem {
Expand Down Expand Up @@ -1068,7 +1068,7 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
}
defer release()

// upgrade build-in system contract before tracing if Feynman is not enabled
// upgrade built-in system contract before tracing if Feynman is not enabled
if block.NumberU64() > 0 {
parent, err := api.blockByNumberAndHash(ctx, rpc.BlockNumber(block.NumberU64()-1), block.ParentHash())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ func (w *worker) prepareWork(genParams *generateParams, witness bool) (*environm
return nil, err
}

// Handle upgrade build-in system contract code
// Handle upgrade built-in system contract code
systemcontracts.TryUpdateBuildInSystemContract(w.chainConfig, header.Number, parent.Time, header.Time, env.state, true)

if header.ParentBeaconRoot != nil {
Expand Down