Add prepare-all-payloads flag (#12260)

* Add prepare-all-payloads flag

* add unit tests

* do not use the nsc

---------

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Potuz
2023-04-13 11:47:13 -03:00
committed by GitHub
parent 80e26143eb
commit 5fdd4e9148
10 changed files with 71 additions and 12 deletions

View File

@@ -65,6 +65,8 @@ type Flags struct {
EnableVerboseSigVerification bool // EnableVerboseSigVerification specifies whether to verify individual signature if batch verification fails
EnableOptionalEngineMethods bool // EnableOptionalEngineMethods specifies whether to activate capella specific engine methods
PrepareAllPayloads bool // PrepareAllPayloads informs the engine to prepare a block on every slot.
// KeystoreImportDebounceInterval specifies the time duration the validator waits to reload new keys if they have
// changed on disk. This feature is for advanced use cases only.
KeystoreImportDebounceInterval time.Duration
@@ -206,6 +208,10 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
logEnabled(enableOptionalEngineMethods)
cfg.EnableOptionalEngineMethods = true
}
if ctx.IsSet(prepareAllPayloads.Name) {
logEnabled(prepareAllPayloads)
cfg.PrepareAllPayloads = true
}
Init(cfg)
return nil
}

View File

@@ -114,6 +114,10 @@ var (
Name: "enable-optional-engine-methods",
Usage: "Enables the optional engine methods",
}
prepareAllPayloads = &cli.BoolFlag{
Name: "prepare-all-payloads",
Usage: "Informs the engine to prepare all local payloads. Useful for relayers and builders",
}
)
// devModeFlags holds list of flags that are set when development mode is on.
@@ -159,6 +163,7 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
enableFullSSZDataLogging,
enableVerboseSigVerification,
enableOptionalEngineMethods,
prepareAllPayloads,
}...)...)
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.