Skip to content

Commit 4a863e7

Browse files
committed
core/vm: clean vm.Config
1 parent b8ae093 commit 4a863e7

4 files changed

Lines changed: 2 additions & 32 deletions

File tree

cmd/utils/flags.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,8 +2929,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
29292929
}
29302930
vmcfg := vm.Config{
29312931
EnablePreimageRecording: ctx.Bool(VMEnableDebugFlag.Name),
2932-
EnableWitnessStats: ctx.Bool(VMWitnessStatsFlag.Name),
2933-
StatelessSelfValidation: ctx.Bool(VMStatelessSelfValidationFlag.Name) || ctx.Bool(VMWitnessStatsFlag.Name),
29342932
EnableOpcodeOptimizations: ctx.Bool(VMOpcodeOptimizeFlag.Name),
29352933
}
29362934

core/vm/interpreter.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ import (
2929

3030
// Config are the configuration options for the Interpreter
3131
type Config struct {
32-
Tracer *tracing.Hooks
32+
Tracer *tracing.Hooks
33+
3334
NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls)
3435
EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages
3536
ExtraEips []int // Additional EIPS that are to be enabled
3637
EnableOpcodeOptimizations bool // Enable opcode optimization
37-
38-
StatelessSelfValidation bool // Generate execution witnesses and self-check against them (testing purpose)
39-
EnableWitnessStats bool // Whether trie access statistics collection is enabled
4038
}
4139

4240
// ScopeContext contains the things that are per-call, such as stack and memory,

eth/api_debug.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -520,27 +520,3 @@ func (api *DebugAPI) ExecutionWitness(bn rpc.BlockNumberOrHash) (*stateless.ExtW
520520

521521
return result.Witness().ToExtWitness(), nil
522522
}
523-
524-
func (api *DebugAPI) ExecutionWitnessByHash(hash common.Hash) (*stateless.ExtWitness, error) {
525-
bc := api.eth.blockchain
526-
block := bc.GetBlockByHash(hash)
527-
if block == nil {
528-
return &stateless.ExtWitness{}, fmt.Errorf("block hash %x not found", hash)
529-
}
530-
531-
parent := bc.GetHeader(block.ParentHash(), block.NumberU64()-1)
532-
if parent == nil {
533-
return &stateless.ExtWitness{}, fmt.Errorf("block number %x found, but parent missing", hash)
534-
}
535-
config := core.ExecuteConfig{
536-
WriteState: false,
537-
EnableTracer: false,
538-
MakeWitness: true,
539-
}
540-
result, err := bc.ProcessBlock(context.Background(), parent.Root, block, config)
541-
if err != nil {
542-
return nil, err
543-
}
544-
545-
return result.Witness().ToExtWitness(), nil
546-
}

eth/backend.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
361361
TxLookupLimit: int64(min(config.TransactionHistory, math.MaxInt64)),
362362
VmConfig: vm.Config{
363363
EnablePreimageRecording: config.EnablePreimageRecording,
364-
EnableWitnessStats: config.EnableWitnessStats,
365-
StatelessSelfValidation: config.StatelessSelfValidation,
366364
EnableOpcodeOptimizations: config.EnableOpcodeOptimizing,
367365
},
368366
// Enables file journaling for the trie database. The journal files will be stored

0 commit comments

Comments
 (0)