Skip to content

Commit

Permalink
Block v3 builder boost factor (#9)
Browse files Browse the repository at this point in the history
* add builder boost factor param

* fmt
  • Loading branch information
eserilev authored Jan 8, 2024
1 parent b2894eb commit 7836ee6
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 54 deletions.
78 changes: 39 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ serde_json = "1.0.0"
clap = { version = "4", features = ["derive"] }
libp2p = "0.52.4"

eth2 = { git = "https://github.com/michaelsproul/lighthouse", branch = "v3-api-headers" }
eth2_network_config = { git = "https://github.com/michaelsproul/lighthouse", branch = "v3-api-headers" }
sensitive_url = { git = "https://github.com/michaelsproul/lighthouse", branch = "v3-api-headers" }
slot_clock = { git = "https://github.com/michaelsproul/lighthouse", branch = "v3-api-headers" }
logging = { git = "https://github.com/michaelsproul/lighthouse", branch = "v3-api-headers" }
eth2 = { git = "https://github.com/eserilev/lighthouse", branch = "block-v3-builder-comparison-factor" }
eth2_network_config = { git = "https://github.com/eserilev/lighthouse", branch = "block-v3-builder-comparison-factor" }
sensitive_url = { git = "https://github.com/eserilev/lighthouse", branch = "block-v3-builder-comparison-factor" }
slot_clock = { git = "https://github.com/eserilev/lighthouse", branch = "block-v3-builder-comparison-factor" }
logging = { git = "https://github.com/eserilev/lighthouse", branch = "block-v3-builder-comparison-factor" }

[dev-dependencies]
proptest = "1.0.0"
2 changes: 2 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub struct Node {
pub v3: bool,
#[serde(default = "default_true")]
pub enabled: bool,
#[serde(default)]
pub builder_boost_factor: Option<u64>,
}

#[derive(Debug, Deserialize)]
Expand Down
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ async fn run(shutdown_signal: Arc<AtomicBool>) -> Result<(), String> {
);
}

let (blinded_block, opt_metadata) =
inner.get_block_with_timeout::<E>(slot).await?;
let (blinded_block, opt_metadata) = inner
.get_block_with_timeout::<E>(slot, inner.config.builder_boost_factor)
.await?;
Ok((blinded_block, opt_metadata))
})
})
Expand Down
Loading

0 comments on commit 7836ee6

Please sign in to comment.