diff --git a/Cargo.lock b/Cargo.lock index 5ba0ed55..51d7e2ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3028,8 +3028,8 @@ dependencies = [ [[package]] name = "hotshot" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-broadcast", @@ -3069,13 +3069,14 @@ dependencies = [ "time 0.3.36", "tokio", "tracing", + "url", "vbs", ] [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "async-trait", "clap", @@ -3093,8 +3094,8 @@ dependencies = [ [[package]] name = "hotshot-example-types" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-broadcast", @@ -3126,8 +3127,8 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -3145,8 +3146,8 @@ dependencies = [ [[package]] name = "hotshot-macros" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "derive_builder", "proc-macro2", @@ -3156,8 +3157,8 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3186,12 +3187,12 @@ dependencies = [ [[package]] name = "hotshot-query-service" -version = "0.1.50" +version = "0.1.51" dependencies = [ "anyhow", "ark-serialize", "async-compatibility-layer", - "async-lock 2.8.0", + "async-lock 3.4.0", "async-std", "async-trait", "atomic_store", @@ -3245,8 +3246,8 @@ dependencies = [ [[package]] name = "hotshot-task" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-broadcast", @@ -3260,8 +3261,8 @@ dependencies = [ [[package]] name = "hotshot-task-impls" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-broadcast", @@ -3290,14 +3291,15 @@ dependencies = [ "time 0.3.36", "tokio", "tracing", + "url", "vbs", "vec1", ] [[package]] name = "hotshot-testing" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-broadcast", @@ -3320,6 +3322,7 @@ dependencies = [ "hotshot-task", "hotshot-task-impls", "hotshot-types", + "itertools 0.13.0", "jf-signature", "jf-vid", "lru 0.12.3", @@ -3342,7 +3345,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "ark-bn254", @@ -3620,7 +3623,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -3849,6 +3852,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -4393,8 +4405,8 @@ dependencies = [ [[package]] name = "libp2p-networking" -version = "0.5.68" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.68#572c5c77d22c3e66acc9683efea8cc1ddbb7a9c5" +version = "0.5.67" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=rc-0.5.70#88b22d90606ee22ece66857b9e70363d92082146" dependencies = [ "anyhow", "async-compatibility-layer", @@ -5715,7 +5727,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.72", @@ -6925,7 +6937,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.72", @@ -8646,7 +8658,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core 0.51.1", + "windows-core", "windows-targets 0.48.5", ] @@ -8659,15 +8671,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.48.0" diff --git a/Cargo.toml b/Cargo.toml index 27838f6b..90783d63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "hotshot-query-service" -version = "0.1.50" +version = "0.1.51" authors = ["Espresso Systems "] edition = "2021" license = "GPL-3.0-or-later" @@ -63,7 +63,7 @@ ark-serialize = "0.4.2" async-compatibility-layer = { version = "1.1", default-features = false, features = [ "logging-utils", ] } -async-lock = "2.8" +async-lock = "3.3.0" async-std = { version = "1.9.0", features = ["unstable", "attributes"] } async-trait = "0.1" bincode = "1.3" @@ -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 = "0.5.68" } -hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.68" } -hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.68" } +hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.70" } +hotshot-testing = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.70" } +hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.70" } 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 = "0.5.68", optional = true } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.70", 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 = "0.5.68" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "rc-0.5.70" } portpicker = "0.1" rand = "0.8" reqwest = "0.12.3" diff --git a/examples/simple-server.rs b/examples/simple-server.rs index ed47137a..70b97ed0 100644 --- a/examples/simple-server.rs +++ b/examples/simple-server.rs @@ -23,7 +23,7 @@ use futures::future::{join_all, try_join_all}; use hotshot::{ traits::implementations::{MasterMap, MemoryNetwork}, types::{SignatureKey, SystemContextHandle}, - HotShotInitializer, Memberships, SystemContext, + HotShotInitializer, MarketplaceConfig, Memberships, SystemContext, }; use hotshot_example_types::{ auction_results_provider_types::TestAuctionResultsProvider, state_types::TestInstanceState, @@ -48,7 +48,7 @@ use hotshot_types::{ traits::{election::Membership, network::Topic}, ExecutionType, HotShotConfig, PeerConfig, ValidatorConfig, }; -use std::{num::NonZeroUsize, time::Duration}; +use std::{num::NonZeroUsize, str::FromStr, time::Duration}; use url::Url; use vbs::version::StaticVersionType; @@ -275,7 +275,10 @@ async fn init_consensus( .unwrap(), ConsensusMetricsValue::new(&*data_source.populate_metrics()), storage, - TestAuctionResultsProvider::default(), + MarketplaceConfig { + auction_results_provider: Arc::new(TestAuctionResultsProvider::default()), + generic_builder_url: Url::from_str("https://some.url").unwrap(), + }, ) .await .unwrap() diff --git a/src/testing/consensus.rs b/src/testing/consensus.rs index 04d517c9..e0e7cacf 100644 --- a/src/testing/consensus.rs +++ b/src/testing/consensus.rs @@ -29,7 +29,7 @@ use futures::{ use hotshot::{ traits::implementations::{MasterMap, MemoryNetwork}, types::{Event, SystemContextHandle}, - HotShotInitializer, Memberships, SystemContext, + HotShotInitializer, MarketplaceConfig, Memberships, SystemContext, }; use hotshot_example_types::{ auction_results_provider_types::TestAuctionResultsProvider, state_types::TestInstanceState, @@ -43,9 +43,9 @@ use hotshot_types::{ traits::{election::Membership, network::Topic, signature_key::SignatureKey as _}, ExecutionType, HotShotConfig, PeerConfig, ValidatorConfig, }; -use std::fmt::Display; use std::num::NonZeroUsize; use std::time::Duration; +use std::{fmt::Display, str::FromStr}; use tracing::{info_span, Instrument}; use url::Url; @@ -207,7 +207,12 @@ impl MockNetwork { .unwrap(), ConsensusMetricsValue::new(&*data_source.populate_metrics()), hs_storage, - TestAuctionResultsProvider::default(), + MarketplaceConfig { + auction_results_provider: Arc::new( + TestAuctionResultsProvider::default(), + ), + generic_builder_url: Url::from_str("https://some.url").unwrap(), + }, ) .await .unwrap() diff --git a/src/testing/mocks.rs b/src/testing/mocks.rs index 1095dc37..897cfd30 100644 --- a/src/testing/mocks.rs +++ b/src/testing/mocks.rs @@ -20,9 +20,8 @@ use hotshot::traits::{ election::static_committee::GeneralStaticCommittee, implementations::MemoryNetwork, NodeImplementation, }; -use hotshot_example_types::auction_results_provider_types::TestAuctionResultsProvider; use hotshot_example_types::{ - auction_results_provider_types::TestAuctionResult, + auction_results_provider_types::{TestAuctionResult, TestAuctionResultsProvider}, block_types::{TestBlockHeader, TestBlockPayload, TestTransaction}, state_types::{TestInstanceState, TestValidatedState}, storage_types::TestStorage, @@ -137,7 +136,7 @@ impl NodeType for MockTypes { type BuilderSignatureKey = BLSPubKey; type Base = StaticVersion<0, 1>; type Upgrade = StaticVersion<0, 2>; - type AuctionResult = MockAuctionResults; + type AuctionResult = TestAuctionResult; const UPGRADE_HASH: [u8; 32] = [ 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,