Allow validators registration batching on Builder API /eth/v1/builder/validators (#13178)

* builder `NewClient`: Simplify + fix some typos.

* Validator client: Implement `validator-registration-batch-size` option

* Address Potuz comments

* Address Potuz's comments

---------

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Manu NALEPA
2023-11-28 01:23:48 +01:00
committed by GitHub
parent 7cc05401ca
commit da2212f6cc
12 changed files with 260 additions and 50 deletions

View File

@@ -346,7 +346,7 @@ var (
Name: "suggested-fee-recipient",
Usage: "Sets ALL validators' mapping to a suggested eth address to receive gas fees when proposing a block." +
" note that this is only a suggestion when integrating with a Builder API, which may choose to specify a different fee recipient as payment for the blocks it builds." +
" For additional setting overrides use the --" + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " Flags. ",
" For additional setting overrides use the --" + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " flags. ",
Value: params.BeaconConfig().EthBurnAddressHex,
}
@@ -364,6 +364,13 @@ var (
Usage: "Sets gas limit for the builder to use for constructing a payload for all the validators",
Value: fmt.Sprint(params.BeaconConfig().DefaultBuilderGasLimit),
}
// ValidatorRegistrationBatchSizeFlag sets the maximum size for one batch of validator registrations. Use a non-positive value to disable batching.
ValidatorRegistrationBatchSizeFlag = &cli.IntFlag{
Name: "validator-registration-batch-size",
Usage: "Sets the maximum size for one batch of validator registrations. Use a non-positive value to disable batching.",
Value: 0,
}
)
// DefaultValidatorDir returns OS-specific default validator directory.

View File

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

View File

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