Skip to content

Commit

Permalink
(feat): enable successful execution proof run using controller
Browse files Browse the repository at this point in the history
  • Loading branch information
srinathln7 committed Feb 19, 2025
1 parent f2ae46a commit 7f65783
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
17 changes: 9 additions & 8 deletions prover/backend/execution/craft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 8 additions & 9 deletions prover/cmd/controller/controller/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions prover/config/config_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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() {
Expand Down

0 comments on commit 7f65783

Please sign in to comment.