From 64e53367d88bdf89d95772f87eb34abdc3a50e50 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Sat, 16 Dec 2023 00:48:02 +0800 Subject: [PATCH] a bit closer to stateless execution working --- cmd/stateless/main.go | 4 +++- core/state_processor.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/stateless/main.go b/cmd/stateless/main.go index d305b820ff..766ff0cd48 100644 --- a/cmd/stateless/main.go +++ b/cmd/stateless/main.go @@ -70,7 +70,9 @@ func stateless(ctx *cli.Context) error { if err != nil { panic(err) } - chainConfig := params.MainnetChainConfig + + // TODO: we will want to parameterize the chain config. hard-coding here for testing in the mean-time. + chainConfig := params.AllDevChainProtocolChanges //params.MainnetChainConfig engine, err := ethconfig.CreateConsensusEngine(chainConfig, memoryDb) if err != nil { panic(err) diff --git a/core/state_processor.go b/core/state_processor.go index 9aca838bdf..157b845a0e 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -119,7 +119,7 @@ func (p *StateProcessor) ProcessStateless(witness *state.Witness, block *types.B misc.ApplyDAOHardFork(statedb) } var ( - context = NewStatelessEVMBlockContext(witness, header, p.bc.Engine()) + context = NewStatelessEVMBlockContext(witness, header, p.engine) vmenv = vm.NewEVM(context, vm.TxContext{}, statedb, p.config, cfg) signer = types.MakeSigner(p.config, header.Number, header.Time) )