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

[WEEKLY RELEASE] HotShot - rc-0.5.71 #1872

Merged
merged 19 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 13 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
66 changes: 40 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ dotenvy = "0.15"
ethers = { version = "2.0", features = ["solc"] }
futures = "0.3"

hotshot = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
# Hotshot imports
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.70" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/hotshot-builder-core", tag = "0.1.41" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", tag = "0.0.5" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.41" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", tag = "0.1.52" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", branch = "bump/rc-0.5.71" }
hotshot-builder-core = { git = "https://github.com/EspressoSystems/hotshot-builder-core", branch = "hotshot/rc-0.5.71" }
marketplace-builder-core = { git = "https://github.com/EspressoSystems/marketplace-builder-core", branch = "bump/rc-0.5.71" }
hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", branch = "hotshot/rc-0.5.71" }
hotshot-orchestrator = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
hotshot-query-service = { git = "https://github.com/EspressoSystems/hotshot-query-service", branch = "hotshot/rc-0.5.71" }
hotshot-stake-table = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
hotshot-state-prover = { version = "0.1.0", path = "hotshot-state-prover" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.70" }
hotshot-task = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
hotshot-testing = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }
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.70" }
hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", branch = "bump/rc-0.5.71" }

# Push CDN imports
cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", features = [
Expand Down
20 changes: 5 additions & 15 deletions builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub mod testing {

use espresso_types::{
mock::MockStateCatchup, v0_3::ChainConfig, Event, FeeAccount, L1Client, NodeState, PrivKey,
PubKey, SequencerVersions, Transaction, ValidatedState,
PubKey, Transaction, ValidatedState,
};
use ethers::{
types::spoof::State,
Expand Down Expand Up @@ -338,10 +338,7 @@ pub mod testing {
&self,
bind_version: Ver,
options: impl PersistenceOptions<Persistence = P>,
) -> Vec<(
Arc<SystemContextHandle<SeqTypes, Node<network::Memory, P>, SequencerVersions>>,
Option<StateSigner<Ver>>,
)> {
) -> Vec<(Arc<Consensus<network::Memory, P>>, Option<StateSigner<Ver>>)> {
let num_staked_nodes = self.num_staked_nodes();
let mut is_staked = false;
let stake_table_commit = static_stake_table_commitment(
Expand Down Expand Up @@ -379,10 +376,7 @@ pub mod testing {
metrics: &dyn Metrics,
bind_version: Ver,
persistence: P,
) -> (
SystemContextHandle<SeqTypes, Node<network::Memory, P>, SequencerVersions>,
StateSigner<Ver>,
) {
) -> (Consensus<network::Memory, P>, StateSigner<Ver>) {
let mut config = self.config.clone();

let num_staked_nodes = self.num_staked_nodes();
Expand Down Expand Up @@ -465,9 +459,7 @@ pub mod testing {
hotshot_events_api_url: Url,
known_nodes_with_stake: Vec<PeerConfig<VerKey>>,
num_non_staking_nodes: usize,
hotshot_context_handle: Arc<
SystemContextHandle<SeqTypes, Node<network::Memory, P>, SequencerVersions>,
>,
hotshot_context_handle: Arc<Consensus<network::Memory, P>>,
) {
// create a event streamer
let events_streamer = Arc::new(RwLock::new(EventsStreamer::new(
Expand Down Expand Up @@ -604,9 +596,7 @@ pub mod testing {
{
pub async fn init_permissioned_builder(
hotshot_test_config: HotShotTestConfig,
hotshot_handle: Arc<
SystemContextHandle<SeqTypes, Node<network::Memory, P>, SequencerVersions>,
>,
hotshot_handle: Arc<Consensus<network::Memory, P>>,
node_id: u64,
state_signer: StateSigner<Ver>,
hotshot_builder_api_url: Url,
Expand Down
22 changes: 9 additions & 13 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use async_compatibility_layer::{
use async_std::sync::{Arc, RwLock};
use espresso_types::{
eth_signature_key::EthKeyPair, v0_3::ChainConfig, FeeAmount, L1Client, NodeState, Payload,
SeqTypes, SequencerVersions, ValidatedState,
SeqTypes, SeqVersions, ValidatedState,
rob-maron marked this conversation as resolved.
Show resolved Hide resolved
};
use ethers::{
core::k256::ecdsa::SigningKey,
Expand Down Expand Up @@ -195,18 +195,14 @@ impl BuilderConfig {
let events_url = hotshot_events_api_url.clone();
tracing::info!("Running permissionless builder against hotshot events API at {events_url}",);
async_spawn(async move {
// TODO this is proabably a mistake in builder-core. These
// generic params can be removed and the concrete types
// used instead.
let res =
run_non_permissioned_standalone_builder_service::<SeqTypes, SequencerVersions>(
da_sender,
qc_sender,
decide_sender,
tx_sender,
events_url,
)
.await;
let res = run_non_permissioned_standalone_builder_service::<_, SeqVersions>(
da_sender,
qc_sender,
decide_sender,
tx_sender,
events_url,
)
.await;
tracing::error!(?res, "builder service exited");
if res.is_err() {
panic!("Builder should restart.");
Expand Down
9 changes: 3 additions & 6 deletions builder/src/permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use async_std::{
use espresso_types::{
eth_signature_key::EthKeyPair,
v0::traits::{PersistenceOptions, SequencerPersistence, StateCatchup},
FeeAmount, L1Client, NodeState, Payload, PubKey, SeqTypes, SequencerVersions,
SolverAuctionResultsProvider, ValidatedState,
FeeAmount, L1Client, NodeState, Payload, PubKey, SeqTypes, SolverAuctionResultsProvider,
ValidatedState,
};
use ethers::{
core::k256::ecdsa::SigningKey,
Expand Down Expand Up @@ -339,10 +339,7 @@ pub async fn init_hotshot<
stake_table_commit: StakeTableCommitmentType,
_: Ver,
persistence: P,
) -> (
SystemContextHandle<SeqTypes, Node<N, P>, SequencerVersions>,
StateSigner<Ver>,
) {
) -> (Consensus<N, P>, StateSigner<Ver>) {
let combined_known_nodes_with_stake = match stake_table_entries_for_non_voting_nodes {
Some(stake_table_entries) => {
let combined_entries = config
Expand Down
11 changes: 3 additions & 8 deletions hotshot-state-prover/src/bin/state-prover.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use std::time::Duration;

use clap::Parser;
use espresso_types::{parse_duration, SequencerVersions};
use espresso_types::{parse_duration, BaseVersion};
use ethers::{
providers::{Http, Middleware, Provider},
signers::{coins_bip39::English, MnemonicBuilder, Signer},
types::Address,
};
use hotshot_stake_table::config::STAKE_TABLE_CAPACITY;
use hotshot_state_prover::service::{run_prover_once, run_prover_service, StateProverConfig};
use hotshot_types::traits::node_implementation::Versions;
use sequencer_utils::logging;
use url::Url;
use vbs::version::StaticVersionType;
Expand Down Expand Up @@ -114,16 +113,12 @@ async fn main() {

if args.daemon {
// Launching the prover service daemon
if let Err(err) =
run_prover_service(config, <SequencerVersions as Versions>::Base::instance()).await
{
if let Err(err) = run_prover_service(config, BaseVersion::instance()).await {
tracing::error!("Error running prover service: {:?}", err);
};
} else {
// Run light client state update once
if let Err(err) =
run_prover_once(config, <SequencerVersions as Versions>::Base::instance()).await
{
if let Err(err) = run_prover_once(config, BaseVersion::instance()).await {
tracing::error!("Error running prover once: {:?}", err);
};
}
Expand Down
Loading
Loading