From f46f0e7e867fdc55e5618f95189a16071c1eab9f Mon Sep 17 00:00:00 2001 From: ciaranmcveigh5 Date: Thu, 21 Jul 2022 15:36:00 +0100 Subject: [PATCH] cmd: builderAPI flag in the cli for builder proposer (#834) - skeleton of the builder-api flag for cmd and app (nothing wired up or any functionality) category: feature ticket: #809 --- app/app.go | 3 +++ cmd/run.go | 1 + docs/configuration.md | 1 + 3 files changed, 5 insertions(+) diff --git a/app/app.go b/app/app.go index e2261461c..4b5d7d7cb 100644 --- a/app/app.go +++ b/app/app.go @@ -79,6 +79,7 @@ type Config struct { JaegerService string SimnetBMock bool SimnetVMock bool + BuilderAPI bool TestConfig TestConfig } @@ -105,6 +106,8 @@ type TestConfig struct { BroadcastCallback func(context.Context, core.Duty, core.PubKey, core.SignedData) error // DisablePromWrap disables wrapping prometheus metrics with cluster identifiers. DisablePromWrap bool + // BuilderAPI enables the builder API opt-in feature + BuilderAPI bool } // Run is the entrypoint for running a charon DVC instance. diff --git a/cmd/run.go b/cmd/run.go index 9c035debe..e9e20d21c 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -66,6 +66,7 @@ func bindRunFlags(cmd *cobra.Command, config *app.Config) { cmd.Flags().StringVar(&config.JaegerService, "jaeger-service", "charon", "Service name used for jaeger tracing.") cmd.Flags().BoolVar(&config.SimnetBMock, "simnet-beacon-mock", false, "Enables an internal mock beacon node for running a simnet.") cmd.Flags().BoolVar(&config.SimnetVMock, "simnet-validator-mock", false, "Enables an internal mock validator client when running a simnet. Requires simnet-beacon-mock.") + cmd.Flags().BoolVar(&config.BuilderAPI, "builder-api", false, "Enables the builder api. Will only produce builder blocks. Builder API must also be enabled on the validator client. Beacon node must be connected to a builder-relay to access the builder network.") preRunE := cmd.PreRunE // Allow multiple wraps of PreRunE. cmd.PreRunE = func(cmd *cobra.Command, args []string) error { diff --git a/docs/configuration.md b/docs/configuration.md index 8fc867a54..be51248cf 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -85,6 +85,7 @@ Usage: Flags: --beacon-node-endpoint string Beacon node endpoint URL. Deprecated, please use beacon-node-endpoints. --beacon-node-endpoints strings Comma separated list of one or more beacon node endpoint URLs. + --builder-api Enables the builder api. Will only produce builder blocks. Builder API must also be enabled on the validator client. Beacon node must be connected to a builder-relay to access the builder network. --data-dir string The directory where charon will store all its internal data (default ".charon") --feature-set string Minimum feature set to enable by default: alpha, beta, or stable. Warning: modify at own risk. (default "stable") --feature-set-disable strings Comma-separated list of features to disable, overriding the default minimum feature set.