mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Merge branch 'electra-epoch-proc' of https://github.com/sigp/lighthouse into electra-engine-api
This commit is contained in:
@@ -8,9 +8,7 @@ edition = { workspace = true }
|
||||
[dependencies]
|
||||
types = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
async-trait = "0.1.51"
|
||||
slog = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
sensitive_url = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
ethereum_serde_utils = { workspace = true }
|
||||
|
||||
@@ -242,7 +242,6 @@ pub mod deposit_methods {
|
||||
/// Represents an eth1 chain/network id.
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
pub enum Eth1Id {
|
||||
Goerli,
|
||||
Mainnet,
|
||||
Custom(u64),
|
||||
}
|
||||
@@ -266,7 +265,6 @@ pub mod deposit_methods {
|
||||
fn into(self) -> u64 {
|
||||
match self {
|
||||
Eth1Id::Mainnet => 1,
|
||||
Eth1Id::Goerli => 5,
|
||||
Eth1Id::Custom(id) => id,
|
||||
}
|
||||
}
|
||||
@@ -277,7 +275,6 @@ pub mod deposit_methods {
|
||||
let into = |x: Eth1Id| -> u64 { x.into() };
|
||||
match id {
|
||||
id if id == into(Eth1Id::Mainnet) => Eth1Id::Mainnet,
|
||||
id if id == into(Eth1Id::Goerli) => Eth1Id::Goerli,
|
||||
id => Eth1Id::Custom(id),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,6 +370,9 @@ pub struct Config {
|
||||
pub execution_endpoint: Option<SensitiveUrl>,
|
||||
/// Endpoint urls for services providing the builder api.
|
||||
pub builder_url: Option<SensitiveUrl>,
|
||||
/// The timeout value used when making a request to fetch a block header
|
||||
/// from the builder api.
|
||||
pub builder_header_timeout: Option<Duration>,
|
||||
/// User agent to send with requests to the builder API.
|
||||
pub builder_user_agent: Option<String>,
|
||||
/// JWT secret for the above endpoint running the engine api.
|
||||
@@ -400,6 +403,7 @@ impl<E: EthSpec> ExecutionLayer<E> {
|
||||
execution_endpoint: url,
|
||||
builder_url,
|
||||
builder_user_agent,
|
||||
builder_header_timeout,
|
||||
secret_file,
|
||||
suggested_fee_recipient,
|
||||
jwt_id,
|
||||
@@ -469,7 +473,7 @@ impl<E: EthSpec> ExecutionLayer<E> {
|
||||
};
|
||||
|
||||
if let Some(builder_url) = builder_url {
|
||||
el.set_builder_url(builder_url, builder_user_agent)?;
|
||||
el.set_builder_url(builder_url, builder_user_agent, builder_header_timeout)?;
|
||||
}
|
||||
|
||||
Ok(el)
|
||||
@@ -491,9 +495,14 @@ impl<E: EthSpec> ExecutionLayer<E> {
|
||||
&self,
|
||||
builder_url: SensitiveUrl,
|
||||
builder_user_agent: Option<String>,
|
||||
builder_header_timeout: Option<Duration>,
|
||||
) -> Result<(), Error> {
|
||||
let builder_client = BuilderHttpClient::new(builder_url.clone(), builder_user_agent)
|
||||
.map_err(Error::Builder)?;
|
||||
let builder_client = BuilderHttpClient::new(
|
||||
builder_url.clone(),
|
||||
builder_user_agent,
|
||||
builder_header_timeout,
|
||||
)
|
||||
.map_err(Error::Builder)?;
|
||||
info!(
|
||||
self.log(),
|
||||
"Using external block builder";
|
||||
|
||||
Reference in New Issue
Block a user