Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LFVM: make super-instruction configuration experimental #815

Merged
merged 2 commits into from
Sep 30, 2024
Merged
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
39 changes: 4 additions & 35 deletions go/interpreter/lfvm/lfvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,9 @@ func NewInterpreter(Config) (*lfvm, error) {

// Registers the long-form EVM as a possible interpreter implementation.
func init() {

configs := map[string]config{
// This is the officially supported LFVM interpreter configuration to be
// used for production purposes.
"lfvm": {
ConversionConfig: ConversionConfig{
WithSuperInstructions: false,
},
WithShaCache: true,
},

// This is an unofficial LFVM interpreter configuration that uses super
// instructions. It is currently exported by default since Aida's nightly
// tests are depending on it and Aida is not yet importing experimental
// configurations explicitly. Once Aida has been updated to import
// experimental configurations explicitly, this configuration should be
// removed from the default exports.
//
// TODO(#763): remove once Aida has been updated to import experimental
// configurations explicitly.
"lfvm-si": {
ConversionConfig: ConversionConfig{
WithSuperInstructions: true,
},
WithShaCache: true,
},
}

for name, config := range configs {
config := config
tosca.MustRegisterInterpreterFactory(name, func(any) (tosca.Interpreter, error) {
return newVm(config)
})
}
tosca.MustRegisterInterpreterFactory("lfvm", func(any) (tosca.Interpreter, error) {
return NewInterpreter(Config{})
})
}

// RegisterExperimentalInterpreterConfigurations registers all experimental
Expand Down Expand Up @@ -95,7 +64,7 @@ func RegisterExperimentalInterpreterConfigurations() error {
}

name := "lfvm" + si + shaCache + mode
if name != "lfvm" && name != "lfvm-si" {
if name != "lfvm" {
err := tosca.RegisterInterpreterFactory(
name,
func(any) (tosca.Interpreter, error) {
Expand Down
Loading