Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sidecar): builder proxy not spinning up with delegations #352

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions bolt-sidecar/src/api/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use ethereum_consensus::{
Fork,
};
use parking_lot::Mutex;
use reqwest::Url;
use serde::Deserialize;
use thiserror::Error;
use tokio::net::TcpListener;
Expand Down Expand Up @@ -219,8 +218,8 @@ where
/// Configuration for the builder proxy.
#[derive(Debug, Clone)]
pub struct BuilderProxyConfig {
/// The URL of the target constraints client server.
pub constraints_url: Url,
/// The target constraints client server.
pub constraints_client: ConstraintsClient,
/// The port on which the builder proxy should listen.
pub server_port: u16,
}
Expand All @@ -235,12 +234,11 @@ where
{
info!(
port = config.server_port,
target = config.constraints_url.to_string(),
target = config.constraints_client.url.to_string(),
"Starting builder proxy..."
);

let mev_boost = ConstraintsClient::new(config.constraints_url);
let server = Arc::new(BuilderProxyServer::new(mev_boost, payload_fetcher));
let server = Arc::new(BuilderProxyServer::new(config.constraints_client, payload_fetcher));

let router = Router::new()
.route("/", get(index))
Expand Down
3 changes: 2 additions & 1 deletion bolt-sidecar/src/client/constraints_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ use crate::{
/// A client for interacting with the Constraints client API.
#[derive(Debug, Clone)]
pub struct ConstraintsClient {
url: Url,
/// The URL of the MEV-Boost target supporting the Constraints API.
pub url: Url,
client: reqwest::Client,
delegations: Vec<SignedDelegation>,
}
Expand Down
2 changes: 1 addition & 1 deletion bolt-sidecar/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl<C: StateFetcher, ECDSA: SignerECDSA> SidecarDriver<C, ECDSA> {

let (payload_requests_tx, payload_requests_rx) = mpsc::channel(16);
let builder_proxy_cfg = BuilderProxyConfig {
constraints_url: opts.constraints_api_url.clone(),
constraints_client: constraints_client.clone(),
server_port: opts.constraints_proxy_port,
};

Expand Down
Loading