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

WIP: hotshot 0.5.83 #2417

Draft
wants to merge 16 commits into
base: ab/st
Choose a base branch
from
Draft
472 changes: 339 additions & 133 deletions Cargo.lock

Large diffs are not rendered by default.

35 changes: 17 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@ tokio = { version = "1", default-features = false, features = [
"sync",
] }

hotshot = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
# Hotshot imports
hotshot-builder-api = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.57" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.57" }
marketplace-builder-shared = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.1.57" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.56" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "v0.1.75" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "ma/hotshot-0.5.83" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "ma/hotshot-0.5.83" }
marketplace-builder-shared = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "ma/hotshot-0.5.83" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", branch = "ma/hotshot-0.5.83" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", branch = "ma/hotshot-0.5.83" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-state-prover = { version = "0.1.0", path = "hotshot-state-prover" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }
hotshot-contract-adapter = { version = "0.1.0", path = "contracts/rust/adapter" }
# Temporary, used to pull in the mock auction results provider
hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.82" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/0.5.83" }

# Push CDN imports
cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", tag = "0.5.1-upgrade", package = "cdn-broker" }
Expand Down Expand Up @@ -164,7 +164,6 @@ opt-level = 0
opt-level = 0
[profile.test.package.hotshot-state-prover]
opt-level = 3
[profile.test.package.gen-vk-contract]
opt-level = 3
[profile.test.package.diff-test-hotshot]
opt-level = 3

# patch
# https://github.com/rust-lang/cargo/issues/5478
2 changes: 2 additions & 0 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ impl BuilderConfig {
vid_commitment,
leaf_commit: fake_commitment(),
builder_commitment,
tx_count: 0,
last_nonempty_view: None,
},
decide_receiver,
da_receiver,
Expand Down
32 changes: 17 additions & 15 deletions marketplace-builder/src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashSet, num::NonZeroUsize, time::Duration};
use std::{arch::global_asm, collections::HashSet, num::NonZeroUsize, time::Duration};

use anyhow::Context;
use async_broadcast::{
Expand Down Expand Up @@ -36,8 +36,10 @@ use hotshot_types::{
},
utils::BuilderCommitment,
};
use marketplace_builder_core::service::{GlobalState, ProxyGlobalState};
use marketplace_builder_core::{hooks::BuilderHooks, service::EventServiceStream};
use marketplace_builder_core::{
hooks::BuilderHooks,
service::{EventServiceStream, GlobalState, ProxyGlobalState},
};
use marketplace_builder_shared::block::ParentBlockReferences;
use marketplace_solver::SolverError;
use sequencer::{catchup::StatePeers, L1Params, NetworkParams, SequencerApiVersion};
Expand Down Expand Up @@ -105,11 +107,8 @@ impl BuilderConfig {
// spawn the builder service
tracing::info!("Running builder against hotshot events API at {events_api_url}",);

let stream = marketplace_builder_core::service::EventServiceStream::<
SeqTypes,
SequencerApiVersion,
>::connect(events_api_url)
.await?;
let stream =
EventServiceStream::<SeqTypes, SequencerApiVersion>::connect(events_api_url).await?;

spawn(async move {
let res = global_state.start_event_loop(stream).await;
Expand Down Expand Up @@ -169,13 +168,16 @@ impl BuilderConfig {
};

// create the global state
let global_state: Arc<GlobalState<SeqTypes, DynamicHooks>> = GlobalState::new(
(builder_key_pair.fee_account(), builder_key_pair),
api_timeout,
maximize_txns_count_timeout_duration,
Duration::from_secs(60),
tx_channel_capacity.get(),
base_fee.as_u64().expect("Base fee too high"),
let global_state = GlobalState::new(
marketplace_builder_core::service::BuilderConfig {
builder_keys: (builder_key_pair.fee_account(), builder_key_pair),
api_timeout,
tx_capture_timeout: maximize_txns_count_timeout_duration,
txn_garbage_collect_duration: Duration::from_secs(60),
txn_channel_capacity: tx_channel_capacity.get(),
tx_status_cache_capacity: 81920,
base_fee: base_fee.as_u64().expect("Base fee too high"),
},
hooks,
);

Expand Down
Loading
Loading