a bit closer to stateless execution working

This commit is contained in:
Jared Wasinger 2023-12-16 00:48:02 +08:00
parent a32c8408bf
commit 64e53367d8
2 changed files with 4 additions and 2 deletions

View file

@ -70,7 +70,9 @@ func stateless(ctx *cli.Context) error {
if err != nil { if err != nil {
panic(err) 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) engine, err := ethconfig.CreateConsensusEngine(chainConfig, memoryDb)
if err != nil { if err != nil {
panic(err) panic(err)

View file

@ -119,7 +119,7 @@ func (p *StateProcessor) ProcessStateless(witness *state.Witness, block *types.B
misc.ApplyDAOHardFork(statedb) misc.ApplyDAOHardFork(statedb)
} }
var ( var (
context = NewStatelessEVMBlockContext(witness, header, p.bc.Engine()) context = NewStatelessEVMBlockContext(witness, header, p.engine)
vmenv = vm.NewEVM(context, vm.TxContext{}, statedb, p.config, cfg) vmenv = vm.NewEVM(context, vm.TxContext{}, statedb, p.config, cfg)
signer = types.MakeSigner(p.config, header.Number, header.Time) signer = types.MakeSigner(p.config, header.Number, header.Time)
) )