allow geth --evm.experimental

This commit is contained in:
Kevaundray Wedderburn 2026-04-03 09:18:24 +01:00
parent a30cb22324
commit 1a55bd8a98
4 changed files with 14 additions and 0 deletions

View file

@ -136,6 +136,7 @@ var (
utils.DeveloperGasLimitFlag, utils.DeveloperGasLimitFlag,
utils.DeveloperPeriodFlag, utils.DeveloperPeriodFlag,
utils.VMEnableDebugFlag, utils.VMEnableDebugFlag,
utils.VMEnableExperimentalInterpFlag,
utils.VMTraceFlag, utils.VMTraceFlag,
utils.VMTraceJsonConfigFlag, utils.VMTraceJsonConfigFlag,
utils.VMWitnessStatsFlag, utils.VMWitnessStatsFlag,

View file

@ -598,6 +598,12 @@ var (
Usage: "Record information useful for VM and contract debugging", Usage: "Record information useful for VM and contract debugging",
Category: flags.VMCategory, Category: flags.VMCategory,
} }
VMEnableExperimentalInterpFlag = &cli.BoolFlag{
Name: "evm.experimental",
Usage: "Enable the experimental EVM interpreter. This flag may be removed or changed without notice.",
Category: flags.VMCategory,
Hidden: true,
}
VMTraceFlag = &cli.StringFlag{ VMTraceFlag = &cli.StringFlag{
Name: "vmtrace", Name: "vmtrace",
Usage: "Name of tracer which should record internal VM operations (costly)", Usage: "Name of tracer which should record internal VM operations (costly)",
@ -1892,6 +1898,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if ctx.IsSet(VMEnableDebugFlag.Name) { if ctx.IsSet(VMEnableDebugFlag.Name) {
cfg.EnablePreimageRecording = ctx.Bool(VMEnableDebugFlag.Name) cfg.EnablePreimageRecording = ctx.Bool(VMEnableDebugFlag.Name)
} }
if ctx.IsSet(VMEnableExperimentalInterpFlag.Name) {
cfg.EnableExperimentalInterpreter = ctx.Bool(VMEnableExperimentalInterpFlag.Name)
}
if ctx.IsSet(VMWitnessStatsFlag.Name) { if ctx.IsSet(VMWitnessStatsFlag.Name) {
cfg.EnableWitnessStats = ctx.Bool(VMWitnessStatsFlag.Name) cfg.EnableWitnessStats = ctx.Bool(VMWitnessStatsFlag.Name)
} }

View file

@ -242,6 +242,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
TxLookupLimit: int64(min(config.TransactionHistory, math.MaxInt64)), TxLookupLimit: int64(min(config.TransactionHistory, math.MaxInt64)),
VmConfig: vm.Config{ VmConfig: vm.Config{
EnablePreimageRecording: config.EnablePreimageRecording, EnablePreimageRecording: config.EnablePreimageRecording,
EnableExperimentalInterpreter: config.EnableExperimentalInterpreter,
}, },
// Enables file journaling for the trie database. The journal files will be stored // Enables file journaling for the trie database. The journal files will be stored
// within the data directory. The corresponding paths will be either: // within the data directory. The corresponding paths will be either:

View file

@ -168,6 +168,9 @@ type Config struct {
// Enables tracking of SHA3 preimages in the VM // Enables tracking of SHA3 preimages in the VM
EnablePreimageRecording bool EnablePreimageRecording bool
// Enables the experimental EVM interpreter
EnableExperimentalInterpreter bool
// Enables collection of witness trie access statistics // Enables collection of witness trie access statistics
EnableWitnessStats bool EnableWitnessStats bool