Add flag for validator gas limit catch-all (#11134)

* Add flag for validator gas limit catch-all

* Update flags.go
This commit is contained in:
terencechain 2022-07-29 15:20:56 -07:00 committed by GitHub
parent 5005fbfe71
commit 616cfd3390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View File

@ -351,6 +351,13 @@ var (
Usage: "Enables Builder validator registration APIs for the validator client to update settings such as fee recipient and gas limit. Note* this flag is not required if using proposer settings config file",
Value: false,
}
// BuilderGasLimitFlag defines the gas limit for the builder to use for constructing a payload.
BuilderGasLimitFlag = &cli.IntFlag{
Name: "suggested-gas-limit",
Usage: "Sets gas limit for the builder to use for constructing a payload for all the validators",
Value: int(params.BeaconConfig().DefaultBuilderGasLimit),
}
)
// DefaultValidatorDir returns OS-specific default validator directory.

View File

@ -79,6 +79,7 @@ var appFlags = []cli.Flag{
flags.ProposerSettingsURLFlag,
flags.ProposerSettingsFlag,
flags.EnableBuilderFlag,
flags.BuilderGasLimitFlag,
////////////////////
cmd.DisableMonitoringFlag,
cmd.MonitoringHostFlag,

View File

@ -113,6 +113,7 @@ var appHelpFlagGroups = []flagGroup{
flags.ProposerSettingsURLFlag,
flags.SuggestedFeeRecipientFlag,
flags.EnableBuilderFlag,
flags.BuilderGasLimitFlag,
},
},
{

View File

@ -501,7 +501,7 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett
if cliCtx.Bool(flags.EnableBuilderFlag.Name) {
vr = &validatorServiceConfig.BuilderConfig{
Enabled: true,
GasLimit: reviewGasLimit(params.BeaconConfig().DefaultBuilderGasLimit),
GasLimit: reviewGasLimit(uint64(cliCtx.Int(flags.BuilderGasLimitFlag.Name))),
}
}
fileConfig = &validatorServiceConfig.ProposerSettingsPayload{