diff --git a/Cargo.lock b/Cargo.lock index e5955431d0..1101fc1a0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1122,7 +1122,7 @@ dependencies = [ "bitflags 2.5.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.10.5", "lazy_static", "lazycell", "log", @@ -1455,9 +1455,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -1465,9 +1465,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -1477,9 +1477,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3077,7 +3077,7 @@ dependencies = [ [[package]] name = "hotshot" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3144,7 +3144,7 @@ dependencies = [ [[package]] name = "hotshot-example-types" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "hotshot-examples" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3226,7 +3226,7 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -3244,7 +3244,7 @@ dependencies = [ [[package]] name = "hotshot-macros" -version = "0.5.74" +version = "0.5.75" dependencies = [ "derive_builder", "proc-macro2", @@ -3254,7 +3254,7 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3283,7 +3283,7 @@ dependencies = [ [[package]] name = "hotshot-stake-table" -version = "0.5.74" +version = "0.5.75" dependencies = [ "ark-bn254", "ark-ed-on-bn254", @@ -3304,7 +3304,7 @@ dependencies = [ [[package]] name = "hotshot-task" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3318,7 +3318,7 @@ dependencies = [ [[package]] name = "hotshot-task-impls" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3354,7 +3354,7 @@ dependencies = [ [[package]] name = "hotshot-testing" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-broadcast", @@ -3426,7 +3426,6 @@ dependencies = [ "espresso-systems-common", "ethereum-types", "futures", - "generic-array", "jf-pcs", "jf-signature", "jf-utils", @@ -4232,7 +4231,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -4515,7 +4514,7 @@ dependencies = [ [[package]] name = "libp2p-networking" -version = "0.5.74" +version = "0.5.75" dependencies = [ "anyhow", "async-compatibility-layer", @@ -5773,7 +5772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.10.5", "proc-macro2", "quote", "syn 2.0.77", @@ -6995,7 +6994,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.77", @@ -7666,9 +7665,9 @@ dependencies = [ [[package]] name = "tide-disco" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e81752cd71cc517973c6ff743919848d7c9890331f38c43abadfb49eede3a6" +checksum = "4cb76ff5fefcbad305ea82288a2f6828e6a2eff992fe60fb492b45b195382c8f" dependencies = [ "anyhow", "async-h1", diff --git a/Cargo.toml b/Cargo.toml index 41365c9a2c..57b30eba38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.5.74" # same as `hotshot`, but workspace subcrate can also release its own version +version = "0.5.75" # same as `hotshot`, but workspace subcrate can also release its own version authors = ["Espresso Systems "] edition = "2021" rust-version = "1.76.0" @@ -57,11 +57,8 @@ espresso-systems-common = { git = "https://github.com/espressosystems/espresso-s ethereum-types = { version = "0.14", default-features = false, features = [ "serialize", ] } -derive_more = { version = "1.0", features = [ "from" ] } +derive_more = { version = "1.0", features = ["from"] } futures = { version = "0.3", default-features = false } -# TODO generic-array should not be a direct dependency -# https://github.com/EspressoSystems/HotShot/issues/1850 -generic-array = { version = "0.14.7", features = ["serde"] } jf-crhf = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5" } jf-vid = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5" } jf-signature = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish", tag = "0.4.5" } diff --git a/crates/orchestrator/src/lib.rs b/crates/orchestrator/src/lib.rs index f6c83c9309..ba9d31e463 100644 --- a/crates/orchestrator/src/lib.rs +++ b/crates/orchestrator/src/lib.rs @@ -12,7 +12,7 @@ pub mod client; pub mod config; use std::{ - collections::HashMap, + collections::{HashMap, HashSet}, fs::OpenOptions, io::{self, ErrorKind}, time::Duration, @@ -90,7 +90,7 @@ struct OrchestratorState { /// Will be set to true once all nodes post they are ready to start start: bool, /// The total nodes that have posted they are ready to start - nodes_connected: u64, + nodes_connected: HashSet>, /// The results of the benchmarks bench_results: BenchResults, /// The number of nodes that have posted their results @@ -131,7 +131,7 @@ impl OrchestratorState { config: network_config, peer_pub_ready, pub_posted: HashMap::new(), - nodes_connected: 0, + nodes_connected: HashSet::new(), start: false, bench_results: BenchResults::default(), nodes_post_results: 0, @@ -534,12 +534,16 @@ where }); } - self.nodes_connected += 1; - - tracing::error!("Nodes connected: {}", self.nodes_connected); + // `HashSet::insert()` returns whether the node was newly inserted (true) or not + if self.nodes_connected.insert(peer_config.clone()) { + tracing::error!( + "Node {peer_config} connected. Total nodes connected: {}", + self.nodes_connected.len() + ); + } // i.e. nodes_connected >= num_nodes_with_stake * (start_threshold.0 / start_threshold.1) - if self.nodes_connected * self.config.config.start_threshold.1 + if self.nodes_connected.len() as u64 * self.config.config.start_threshold.1 >= (self.config.config.num_nodes_with_stake.get() as u64) * self.config.config.start_threshold.0 { diff --git a/crates/task-impls/src/quorum_proposal/handlers.rs b/crates/task-impls/src/quorum_proposal/handlers.rs index 867b6298a9..e53a618320 100644 --- a/crates/task-impls/src/quorum_proposal/handlers.rs +++ b/crates/task-impls/src/quorum_proposal/handlers.rs @@ -362,7 +362,7 @@ impl HandleDepOutput for ProposalDependencyHandle< ) .await { - error!("Failed to publish proposal; error = {e}"); + error!("Failed to publish proposal; error = {e:#}"); } } } diff --git a/crates/testing/tests/tests_3/test_marketplace.rs b/crates/testing/tests/tests_3/test_marketplace.rs index 2d97535427..eb0738ffc7 100644 --- a/crates/testing/tests/tests_3/test_marketplace.rs +++ b/crates/testing/tests/tests_3/test_marketplace.rs @@ -73,7 +73,7 @@ cross_tests!( ); // Test marketplace with both regular builders down but solver + fallback builder up -// Requires 90% nonempty blocks +// Requires 80% nonempty blocks cross_tests!( TestName: test_marketplace_builders_down, Impls: [MemoryImpl], @@ -96,7 +96,7 @@ cross_tests!( changes: HashMap::from([(0, BuilderChange::Down)]) } ], - validate_transactions: nonempty_block_threshold((90,100)), + validate_transactions: nonempty_block_threshold((40,50)), ..TestDescription::default() } }, @@ -128,7 +128,7 @@ cross_tests!( BuilderDescription { changes: HashMap::from([(0, BuilderChange::Down)]) }, - validate_transactions: nonempty_block_threshold((80,100)), + validate_transactions: nonempty_block_threshold((40,50)), ..TestDescription::default() } }, diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index cb0f1faede..652c035e89 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -29,10 +29,6 @@ futures = { workspace = true } cdn-proto = { workspace = true } reqwest = { workspace = true } -generic-array = { workspace = true } - -# TODO generic-array should not be a direct dependency -# https://github.com/EspressoSystems/HotShot/issues/1850 lazy_static = { workspace = true } memoize = { workspace = true } rand = { workspace = true } diff --git a/crates/types/src/qc.rs b/crates/types/src/qc.rs index 18a9739347..2f556159a2 100644 --- a/crates/types/src/qc.rs +++ b/crates/types/src/qc.rs @@ -16,8 +16,8 @@ use ark_std::{ vec::Vec, }; use bitvec::prelude::*; +use digest::generic_array::GenericArray; use ethereum_types::U256; -use generic_array::GenericArray; use jf_signature::{AggregateableSignatureSchemes, SignatureError}; use serde::{Deserialize, Serialize}; use typenum::U32; diff --git a/crates/types/src/signature_key.rs b/crates/types/src/signature_key.rs index 562e77cb06..2741912f14 100644 --- a/crates/types/src/signature_key.rs +++ b/crates/types/src/signature_key.rs @@ -8,8 +8,8 @@ use ark_serialize::SerializationError; use bitvec::{slice::BitSlice, vec::BitVec}; +use digest::generic_array::GenericArray; use ethereum_types::U256; -use generic_array::GenericArray; use jf_signature::{ bls_over_bn254::{BLSOverBN254CurveSignatureScheme, KeyPair, SignKey, VerKey}, SignatureError, SignatureScheme, diff --git a/crates/types/src/traits/qc.rs b/crates/types/src/traits/qc.rs index 439b5bcc89..1f907ed59c 100644 --- a/crates/types/src/traits/qc.rs +++ b/crates/types/src/traits/qc.rs @@ -12,7 +12,7 @@ use ark_std::{ vec::Vec, }; use bitvec::prelude::*; -use generic_array::{ArrayLength, GenericArray}; +use digest::generic_array::{ArrayLength, GenericArray}; use jf_signature::{AggregateableSignatureSchemes, SignatureError}; use serde::{Deserialize, Serialize};