diff --git a/Cargo.lock b/Cargo.lock index 54e3bb94e..a94a92742 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3028,8 +3028,8 @@ dependencies = [ [[package]] name = "hotshot" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-broadcast", @@ -3075,7 +3075,7 @@ dependencies = [ [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "async-trait", "clap", @@ -3093,8 +3093,8 @@ dependencies = [ [[package]] name = "hotshot-example-types" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-broadcast", @@ -3126,8 +3126,8 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -3145,8 +3145,8 @@ dependencies = [ [[package]] name = "hotshot-macros" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "derive_builder", "proc-macro2", @@ -3156,8 +3156,8 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3186,7 +3186,7 @@ dependencies = [ [[package]] name = "hotshot-query-service" -version = "0.1.47" +version = "0.1.49" dependencies = [ "anyhow", "ark-serialize", @@ -3245,8 +3245,8 @@ dependencies = [ [[package]] name = "hotshot-task" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-broadcast", @@ -3260,8 +3260,8 @@ dependencies = [ [[package]] name = "hotshot-task-impls" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-broadcast", @@ -3296,8 +3296,8 @@ dependencies = [ [[package]] name = "hotshot-testing" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-broadcast", @@ -3342,7 +3342,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "ark-bn254", @@ -4393,8 +4393,8 @@ dependencies = [ [[package]] name = "libp2p-networking" -version = "0.5.63" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.66#f8f237a19af1eb6f8eada4d294db6ef022edcb4d" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.67#a8115816f131bf56b6689937dc8029871bbe8476" dependencies = [ "anyhow", "async-compatibility-layer", diff --git a/Cargo.toml b/Cargo.toml index 0988dd1ba..7d75db2dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "hotshot-query-service" -version = "0.1.47" +version = "0.1.49" authors = ["Espresso Systems "] edition = "2021" license = "GPL-3.0-or-later" @@ -75,9 +75,9 @@ derivative = "2.2" derive_more = "0.99" either = "1.12" futures = "0.3" -hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.66" } -hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.66" } -hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.66" } +hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.67" } +hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.67" } +hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.67" } itertools = "0.12.1" jf-merkle-tree = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5", features = [ "std", @@ -119,7 +119,7 @@ tokio-postgres = { version = "0.7", optional = true, default-features = false, f # Dependencies enabled by feature "testing". espresso-macros = { git = "https://github.com/EspressoSystems/espresso-macros.git", tag = "0.1.0", optional = true } -hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.66", optional = true } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.67", optional = true } portpicker = { version = "0.1", optional = true } rand = { version = "0.8", optional = true } spin_sleep = { version = "1.2", optional = true } @@ -140,7 +140,7 @@ backtrace-on-stack-overflow = { version = "0.3", optional = true } clap = { version = "4.5", features = ["derive", "env"] } espresso-macros = { git = "https://github.com/EspressoSystems/espresso-macros.git", tag = "0.1.0" } generic-array = "0.14" -hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.66" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.67" } portpicker = "0.1" rand = "0.8" reqwest = "0.12.3" diff --git a/examples/simple-server.rs b/examples/simple-server.rs index 43082f272..ed47137a9 100644 --- a/examples/simple-server.rs +++ b/examples/simple-server.rs @@ -42,8 +42,11 @@ use hotshot_query_service::{ }; use hotshot_testing::block_builder::{SimpleBuilderImplementation, TestBuilderImplementation}; use hotshot_types::{ - consensus::ConsensusMetricsValue, light_client::StateKeyPair, signature_key::BLSPubKey, - traits::election::Membership, ExecutionType, HotShotConfig, PeerConfig, ValidatorConfig, + consensus::ConsensusMetricsValue, + light_client::StateKeyPair, + signature_key::BLSPubKey, + traits::{election::Membership, network::Topic}, + ExecutionType, HotShotConfig, PeerConfig, ValidatorConfig, }; use std::{num::NonZeroUsize, time::Duration}; use url::Url; @@ -160,16 +163,23 @@ async fn init_consensus( // Get the number of nodes with stake let num_nodes_with_stake = NonZeroUsize::new(pub_keys.len()).unwrap(); - let membership = MockMembership::create_election( + let da_membership = MockMembership::create_election( known_nodes_with_stake.clone(), known_nodes_with_stake.clone(), + Topic::Da, + 0, + ); + let non_da_membership = MockMembership::create_election( + known_nodes_with_stake.clone(), + known_nodes_with_stake.clone(), + Topic::Global, 0, ); let memberships = Memberships { - quorum_membership: membership.clone(), - da_membership: membership.clone(), - vid_membership: membership.clone(), - view_sync_membership: membership.clone(), + quorum_membership: non_da_membership.clone(), + da_membership: da_membership.clone(), + vid_membership: non_da_membership.clone(), + view_sync_membership: non_da_membership.clone(), }; // Pick a random, unused port for the builder server @@ -245,8 +255,9 @@ async fn init_consensus( }; let network = Arc::new(MemoryNetwork::new( - pub_keys[node_id], + &pub_keys[node_id], &master_map.clone(), + &[Topic::Global, Topic::Da], None, )); diff --git a/src/testing/consensus.rs b/src/testing/consensus.rs index 4dc562974..04d517c97 100644 --- a/src/testing/consensus.rs +++ b/src/testing/consensus.rs @@ -40,7 +40,7 @@ use hotshot_types::{ consensus::ConsensusMetricsValue, light_client::StateKeyPair, signature_key::BLSPubKey, - traits::{election::Membership, signature_key::SignatureKey as _}, + traits::{election::Membership, network::Topic, signature_key::SignatureKey as _}, ExecutionType, HotShotConfig, PeerConfig, ValidatorConfig, }; use std::fmt::Display; @@ -92,17 +92,23 @@ impl MockNetwork { }) .collect::>(); - let membership = MockMembership::create_election( + let da_membership = MockMembership::create_election( known_nodes_with_stake.clone(), known_nodes_with_stake.clone(), + Topic::Da, + 0, + ); + let non_da_membership = MockMembership::create_election( + known_nodes_with_stake.clone(), + known_nodes_with_stake.clone(), + Topic::Global, 0, ); - let memberships = Memberships { - quorum_membership: membership.clone(), - da_membership: membership.clone(), - vid_membership: membership.clone(), - view_sync_membership: membership.clone(), + quorum_membership: non_da_membership.clone(), + da_membership: da_membership.clone(), + vid_membership: non_da_membership.clone(), + view_sync_membership: non_da_membership.clone(), }; // Pick a random, unused port for the builder server @@ -181,8 +187,9 @@ impl MockNetwork { let data_source = D::connect(&storage).await; let network = Arc::new(MemoryNetwork::new( - pub_keys[node_id], + &pub_keys[node_id], &master_map.clone(), + &[Topic::Global, Topic::Da], None, ));