From 7f657830ec17ebdc51d73c9c0fa9e5045556fa1e Mon Sep 17 00:00:00 2001 From: srinathln7 Date: Wed, 19 Feb 2025 15:07:42 +0000 Subject: [PATCH] (feat): enable successful execution proof run using controller --- prover/backend/execution/craft.go | 17 +++++++++-------- prover/cmd/controller/controller/command.go | 17 ++++++++--------- prover/config/config_default.go | 11 ++++++++--- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/prover/backend/execution/craft.go b/prover/backend/execution/craft.go index 9943cb395..b513f1c8f 100644 --- a/prover/backend/execution/craft.go +++ b/prover/backend/execution/craft.go @@ -35,14 +35,15 @@ func CraftProverOutput( req *Request, ) Response { - // Split the embedded file contents into a string slice - constraintsVersions := strings.Split(strings.TrimSpace(constraintsVersionsStr), "\n") - - // Check the arithmetization version used to generate the trace is contained in the prover request - // and fail fast if the constraint version is not supported - if err := checkArithmetizationVersion(req.ConflatedExecutionTracesFile, req.TracesEngineVersion, constraintsVersions); err != nil { - panic(err.Error()) - } + /* + // Split the embedded file contents into a string slice + constraintsVersions := strings.Split(strings.TrimSpace(constraintsVersionsStr), "\n") + + // Check the arithmetization version used to generate the trace is contained in the prover request + // and fail fast if the constraint version is not supported + if err := checkArithmetizationVersion(req.ConflatedExecutionTracesFile, req.TracesEngineVersion, constraintsVersions); err != nil { + panic(err.Error()) + } */ var ( l2BridgeAddress = cfg.Layer2.MsgSvcContract diff --git a/prover/cmd/controller/controller/command.go b/prover/cmd/controller/controller/command.go index 259785c47..7f3ce5dfe 100644 --- a/prover/cmd/controller/controller/command.go +++ b/prover/cmd/controller/controller/command.go @@ -44,16 +44,15 @@ func cobraControllerRunCmd(c *cobra.Command, args []string) { } cfg.Controller.LocalID = fLocalID - cfg.Controller.EnableExecution = true - // Disable for testing - cfg.Controller.EnableBlobDecompression = false - cfg.Controller.EnableAggregation = false - cfg.Controller.EnableExecBootstrap = false - cfg.Controller.EnableExecGL = false - cfg.Controller.EnableExecRndBeacon = false - cfg.Controller.EnableExecLPP = false - cfg.Controller.EnableExecConglomeration = false + // cfg.Controller.EnableExecution = true + // cfg.Controller.EnableBlobDecompression = false + // cfg.Controller.EnableAggregation = false + // cfg.Controller.EnableExecBootstrap = false + // cfg.Controller.EnableExecGL = false + // cfg.Controller.EnableExecRndBeacon = false + // cfg.Controller.EnableExecLPP = false + // cfg.Controller.EnableExecConglomeration = false // TODO @gbotrel @AlexandreBelling check who is responsible for creating the directories // create the sub directories if they do not exist diff --git a/prover/config/config_default.go b/prover/config/config_default.go index 03ff56649..750ec577b 100644 --- a/prover/config/config_default.go +++ b/prover/config/config_default.go @@ -18,6 +18,7 @@ func setDefaultValues() { viper.SetDefault("controller.enable_blob_decompression", true) viper.SetDefault("controller.enable_aggregation", true) + // Limitless controller components viper.SetDefault("controller.enable_exec_bootstrap", true) viper.SetDefault("controller.enable_exec_gl", true) viper.SetDefault("controller.enable_exec_rndbeacon", true) @@ -29,9 +30,13 @@ func setDefaultValues() { viper.SetDefault("controller.defer_to_other_large_codes", DefaultDeferToOtherLargeCodes) viper.SetDefault("controller.retry_locally_with_large_codes", DefaultRetryLocallyWithLargeCodes) - // Set default for cmdTmpl and cmdLargeTmpl - viper.SetDefault("controller.worker_cmd_tmpl", "prover prove --config {{.ConfFile}} --in {{.InFile}} --out {{.OutFile}}") - viper.SetDefault("controller.worker_cmd_large_tmpl", "prover prove --config {{.ConfFile}} --in {{.InFile}} --out {{.OutFile}} --large") + // Define the default command templates using the range action + workerCmdTmpl := `prover prove --config {{.ConfFile}} {{range $index, $element := .InFile}}--in {{$element}} {{end}} {{range $index, $element := .OutFile}}--out {{$element}} {{end}}` + workerCmdLargeTmpl := `prover prove --config {{.ConfFile}} {{range $index, $element := .InFile}}--in {{$element}} {{end}} {{range $index, $element := .OutFile}}--out {{$element}} {{end}} --large` + + // Set the default command templates in viper + viper.SetDefault("controller.worker_cmd_tmpl", workerCmdTmpl) + viper.SetDefault("controller.worker_cmd_large_tmpl", workerCmdLargeTmpl) } func setDefaultPaths() {