Skip to content

Commit

Permalink
Try using builder v0_1 types
Browse files Browse the repository at this point in the history
  • Loading branch information
bfish713 committed Jul 19, 2024
1 parent e87e43b commit 9e5cbb5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use hotshot::{
types::{SignatureKey, SystemContextHandle},
HotShotInitializer, Memberships, SystemContext,
};
use hotshot_builder_api::v0_2::builder::{
use hotshot_builder_api::v0_1::builder::{
BuildError, Error as BuilderApiError, Options as HotshotBuilderApiOptions,
};
use hotshot_builder_core::service::{GlobalState, ProxyGlobalState};
Expand Down Expand Up @@ -76,14 +76,14 @@ pub mod permissioned;
// It runs the api service for the builder
pub fn run_builder_api_service(url: Url, source: ProxyGlobalState<SeqTypes>) {
// it is to serve hotshot
let builder_api = hotshot_builder_api::v0_2::builder::define_api::<
let builder_api = hotshot_builder_api::v0_1::builder::define_api::<
ProxyGlobalState<SeqTypes>,
SeqTypes,
>(&HotshotBuilderApiOptions::default())
.expect("Failed to construct the builder APIs");

// it enables external clients to submit txn to the builder's private mempool
let private_mempool_api = hotshot_builder_api::v0_2::builder::submit_api::<
let private_mempool_api = hotshot_builder_api::v0_1::builder::submit_api::<
ProxyGlobalState<SeqTypes>,
SeqTypes,
<SeqTypes as NodeType>::Base,
Expand Down Expand Up @@ -137,7 +137,7 @@ pub mod testing {
},
types::{EventType::Decide, Message},
};
use hotshot_builder_api::v0_2::builder::{
use hotshot_builder_api::v0_1::builder::{
BuildError, Error as BuilderApiError, Options as HotshotBuilderApiOptions,
};
use hotshot_builder_core::{
Expand Down Expand Up @@ -675,7 +675,7 @@ mod test {
use ethers::providers::Quorum;
use futures::StreamExt;
use hotshot::types::EventType::Decide;
use hotshot_builder_api::v0_2::block_info::AvailableBlockData;
use hotshot_builder_api::v0_1::block_info::AvailableBlockData;
use hotshot_builder_core::service::GlobalState;
use sequencer::{
empty_builder_commitment,
Expand Down
6 changes: 3 additions & 3 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use ethers::{
types::{Address, U256},
};
use hotshot::traits::BlockPayload;
use hotshot_builder_api::v0_2::builder::{
use hotshot_builder_api::v0_1::builder::{
BuildError, Error as BuilderApiError, Options as HotshotBuilderApiOptions,
};
use hotshot_builder_core::{
Expand Down Expand Up @@ -232,7 +232,7 @@ mod test {
use async_std::task;
use es_version::SequencerVersion;
use espresso_types::{FeeAccount, NamespaceId, Transaction};
use hotshot_builder_api::v0_2::{
use hotshot_builder_api::v0_1::{
block_info::{AvailableBlockData, AvailableBlockHeaderInput, AvailableBlockInfo},
builder::BuildError,
};
Expand Down Expand Up @@ -318,7 +318,7 @@ mod test {

// Start a builder api client
let builder_client = Client::<
hotshot_builder_api::v0_2::builder::Error,
hotshot_builder_api::v0_1::builder::Error,
<SeqTypes as NodeType>::Base,
>::new(hotshot_builder_api_url.clone());
assert!(builder_client.connect(Some(Duration::from_secs(60))).await);
Expand Down
6 changes: 3 additions & 3 deletions builder/src/permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use hotshot::{
types::{SignatureKey, SystemContextHandle},
HotShotInitializer, Memberships, SystemContext,
};
use hotshot_builder_api::v0_2::builder::{
use hotshot_builder_api::v0_1::builder::{
BuildError, Error as BuilderApiError, Options as HotshotBuilderApiOptions,
};
use hotshot_builder_core::{
Expand Down Expand Up @@ -550,7 +550,7 @@ mod test {
use async_std::task;
use es_version::SequencerVersion;
use espresso_types::{FeeAccount, NamespaceId, Transaction};
use hotshot_builder_api::v0_2::{
use hotshot_builder_api::v0_1::{
block_info::{AvailableBlockData, AvailableBlockHeaderInput, AvailableBlockInfo},
builder::BuildError,
};
Expand Down Expand Up @@ -625,7 +625,7 @@ mod test {

// Start a builder api client
let builder_client = Client::<
hotshot_builder_api::v0_2::builder::Error,
hotshot_builder_api::v0_1::builder::Error,
<SeqTypes as NodeType>::Base,
>::new(hotshot_builder_api_url.clone());
assert!(builder_client.connect(Some(Duration::from_secs(60))).await);
Expand Down

0 comments on commit 9e5cbb5

Please sign in to comment.