Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions prover/zkevm/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,5 @@ func FullZKEVMWithSuite(
}

// Initialize the Full zkEVM arithmetization
fullZkEvm = NewZkEVM(settings)
return fullZkEvm
return NewZkEVM(settings)
}
Comment on lines 416 to 418
20 changes: 20 additions & 0 deletions prover/zkevm/zkevm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ func TestCanGenerateFullZkEVM(t *testing.T) {

_ = FullZkEvm(&cfg.TracesLimits, cfg)
}

// FullZKEVMWithSuite must not overwrite memoized globals.
func TestFullZKEVMWithSuiteNoGlobalOverwrite(t *testing.T) {
cfg, err := config.NewConfigFromFileUnchecked("../config/config-mainnet-limitless.toml")
if err != nil {
t.Fatal(err)
}

sentinel := &ZkEvm{}
original := fullZkEvm
fullZkEvm = sentinel

_ = FullZKEVMWithSuite(&cfg.TracesLimits, cfg, dummyCompilationSuite, nil)

if fullZkEvm != sentinel {
t.Fatal("FullZKEVMWithSuite overwrote the fullZkEvm global")
}

fullZkEvm = original
}
Loading