Expose additional builder booster related flags in the vc (#5086)

* expose builder booster flags in vc, enable options in validator endpoints, update tests

* resolve failing test

* fix issues related to CreateConfig and MoveConfig

* remove unneeded val, change how boost factor flag logic in the vc, add some additional documentation

* fix typos

* fix typos

* assume builder-proosals flag if one of other two vc builder flags are present

* fmt

* typo

* typo

* Fix CLI help text

* Prioritise per validator builder boost configurations over CLI flags.

* Add http test for builder boost factor with process defaults.

* Fix issue with PATCH request

* Add prefer builder proposals

* Add more builder boost factor tests.

---------

Co-authored-by: Mac L <mjladson@pm.me>
Co-authored-by: Jimmy Chen <jchen.tc@gmail.com>
Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
Eitan Seri-Levi
2024-01-25 00:09:47 +02:00
committed by GitHub
parent 612eaf2d41
commit f9e36c94ed
28 changed files with 715 additions and 21 deletions

View File

@@ -77,6 +77,10 @@ pub struct Config {
pub validator_registration_batch_size: usize,
/// Enables block production via the block v3 endpoint. This configuration option can be removed post deneb.
pub produce_block_v3: bool,
/// Specifies the boost factor, a percentage multiplier to apply to the builder's payload value.
pub builder_boost_factor: Option<u64>,
/// If true, Lighthouse will prefer builder proposals, if available.
pub prefer_builder_proposals: bool,
}
impl Default for Config {
@@ -118,6 +122,8 @@ impl Default for Config {
enable_latency_measurement_service: true,
validator_registration_batch_size: 500,
produce_block_v3: false,
builder_boost_factor: None,
prefer_builder_proposals: false,
}
}
}
@@ -346,6 +352,10 @@ impl Config {
config.produce_block_v3 = true;
}
if cli_args.is_present("prefer-builder-proposals") {
config.prefer_builder_proposals = true;
}
config.gas_limit = cli_args
.value_of("gas-limit")
.map(|gas_limit| {
@@ -365,6 +375,8 @@ impl Config {
);
}
config.builder_boost_factor = parse_optional(cli_args, "builder-boost-factor")?;
config.enable_latency_measurement_service =
parse_optional(cli_args, "latency-measurement-service")?.unwrap_or(true);