mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 11:52:42 +00:00
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:
@@ -565,6 +565,8 @@ pub fn serve<T: 'static + SlotClock + Clone, E: EthSpec>(
|
||||
let suggested_fee_recipient = body.suggested_fee_recipient;
|
||||
let gas_limit = body.gas_limit;
|
||||
let builder_proposals = body.builder_proposals;
|
||||
let builder_boost_factor = body.builder_boost_factor;
|
||||
let prefer_builder_proposals = body.prefer_builder_proposals;
|
||||
|
||||
let validator_def = {
|
||||
if let Some(handle) = task_executor.handle() {
|
||||
@@ -577,6 +579,8 @@ pub fn serve<T: 'static + SlotClock + Clone, E: EthSpec>(
|
||||
suggested_fee_recipient,
|
||||
gas_limit,
|
||||
builder_proposals,
|
||||
builder_boost_factor,
|
||||
prefer_builder_proposals,
|
||||
))
|
||||
.map_err(|e| {
|
||||
warp_utils::reject::custom_server_error(format!(
|
||||
@@ -625,6 +629,8 @@ pub fn serve<T: 'static + SlotClock + Clone, E: EthSpec>(
|
||||
suggested_fee_recipient: web3signer.suggested_fee_recipient,
|
||||
gas_limit: web3signer.gas_limit,
|
||||
builder_proposals: web3signer.builder_proposals,
|
||||
builder_boost_factor: web3signer.builder_boost_factor,
|
||||
prefer_builder_proposals: web3signer.prefer_builder_proposals,
|
||||
description: web3signer.description,
|
||||
signing_definition: SigningDefinition::Web3Signer(
|
||||
Web3SignerDefinition {
|
||||
@@ -691,8 +697,12 @@ pub fn serve<T: 'static + SlotClock + Clone, E: EthSpec>(
|
||||
(Some(is_enabled), Some(initialized_validator))
|
||||
if Some(is_enabled) == body.enabled
|
||||
&& initialized_validator.get_gas_limit() == body.gas_limit
|
||||
&& initialized_validator.get_builder_boost_factor()
|
||||
== body.builder_boost_factor
|
||||
&& initialized_validator.get_builder_proposals()
|
||||
== body.builder_proposals
|
||||
&& initialized_validator.get_prefer_builder_proposals()
|
||||
== body.prefer_builder_proposals
|
||||
&& initialized_validator.get_graffiti() == maybe_graffiti =>
|
||||
{
|
||||
Ok(())
|
||||
@@ -706,6 +716,8 @@ pub fn serve<T: 'static + SlotClock + Clone, E: EthSpec>(
|
||||
body.enabled,
|
||||
body.gas_limit,
|
||||
body.builder_proposals,
|
||||
body.builder_boost_factor,
|
||||
body.prefer_builder_proposals,
|
||||
body.graffiti,
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user