Skip to content

Commit

Permalink
Fix builder-related things
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinI committed Aug 9, 2024
1 parent 4300f42 commit f997987
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion sequencer/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ impl<N: ConnectedNetwork<PubKey>, P: SequencerPersistence, Ver: StaticVersionTyp
metrics: &dyn Metrics,
stake_table_capacity: u64,
public_api_url: Option<Url>,
generic_builder_url: Url,
_: Ver,
marketplace_config: MarketplaceConfig<SeqTypes, Node<N, P>>,
) -> anyhow::Result<Self> {
Expand Down
7 changes: 1 addition & 6 deletions sequencer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ pub mod state;

#[cfg(feature = "libp2p")]
use std::time::Duration;
use std::{
collections::BTreeMap, fmt::Debug, marker::PhantomData, net::SocketAddr, str::FromStr,
sync::Arc,
};
use std::{collections::BTreeMap, fmt::Debug, marker::PhantomData, net::SocketAddr, sync::Arc};

use derivative::Derivative;
use espresso_types::v0::traits::{PersistenceOptions, SequencerPersistence};
Expand Down Expand Up @@ -411,7 +408,6 @@ pub async fn init_node<P: PersistenceOptions, Ver: StaticVersionType + 'static>(
metrics,
genesis.stake_table.capacity,
network_params.public_api_url,
Url::from_str("http://localhost").unwrap(),
bind_version,
marketplace_config,
)
Expand Down Expand Up @@ -761,7 +757,6 @@ pub mod testing {
metrics,
stake_table_capacity,
None, // The public API URL
Url::from_str("http://localhost").unwrap(),
bind_version,
MarketplaceConfig::<SeqTypes, Node<network::Memory, P::Persistence>> {
auction_results_provider: Arc::new(SolverAuctionResultsProvider(
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ where
auction_results_provider: Arc::new(SolverAuctionResultsProvider(
opt.auction_results_solver_url,
)),
fallback_builder_url: opt.generic_builder_url,
fallback_builder_url: opt.fallback_builder_url,
};

// Initialize HotShot. If the user requested the HTTP module, we must initialize the handle in
Expand Down
4 changes: 2 additions & 2 deletions sequencer/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ pub struct Options {
/// URL of generic builder
#[clap(
long,
env = "ESPRESSO_GENERIC_BUILDER_URL",
env = "ESPRESSO_FALLBACK_BUILDER_URL",
default_value = "http://localhost:31004"
)]
#[derivative(Debug(format_with = "Display::fmt"))]
pub generic_builder_url: Url,
pub fallback_builder_url: Url,

/// Path to TOML file containing genesis state.
#[clap(
Expand Down
14 changes: 7 additions & 7 deletions types/src/v0/impls/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl Header {
#[allow(clippy::too_many_arguments)]
fn from_info(
payload_commitment: VidCommitment,
builder_commitment: Option<BuilderCommitment>,
builder_commitment: BuilderCommitment,
ns_table: NsTable,
parent_leaf: &Leaf,
mut l1: L1Snapshot,
Expand Down Expand Up @@ -470,7 +470,7 @@ impl Header {
l1_head: l1.head,
l1_finalized: l1.finalized,
payload_commitment,
builder_commitment: builder_commitment.unwrap(),
builder_commitment,
ns_table,
block_merkle_tree_root,
fee_merkle_tree_root,
Expand All @@ -486,7 +486,7 @@ impl Header {
l1_head: l1.head,
l1_finalized: l1.finalized,
payload_commitment,
builder_commitment: builder_commitment.unwrap(),
builder_commitment,
ns_table,
block_merkle_tree_root,
fee_merkle_tree_root,
Expand All @@ -500,7 +500,7 @@ impl Header {
l1_head: l1.head,
l1_finalized: l1.finalized,
payload_commitment,
builder_commitment: builder_commitment.unwrap(),
builder_commitment,
ns_table,
block_merkle_tree_root,
fee_merkle_tree_root,
Expand Down Expand Up @@ -836,7 +836,7 @@ impl BlockHeader<SeqTypes> for Header {

Ok(Self::from_info(
payload_commitment,
None,
builder_commitment,
metadata,
parent_leaf,
l1_snapshot,
Expand Down Expand Up @@ -952,7 +952,7 @@ impl BlockHeader<SeqTypes> for Header {

Ok(Self::from_info(
payload_commitment,
Some(builder_commitment),
builder_commitment,
metadata,
parent_leaf,
l1_snapshot,
Expand Down Expand Up @@ -1154,7 +1154,7 @@ mod test_headers {

let header = Header::from_info(
genesis.header.payload_commitment(),
Some(genesis.header.builder_commitment().clone()),
genesis.header.builder_commitment().clone(),
genesis.ns_table,
&parent_leaf,
L1Snapshot {
Expand Down

0 comments on commit f997987

Please sign in to comment.