From 001a9cb19fbb4407709424cf98bd66f68df466a9 Mon Sep 17 00:00:00 2001 From: Jeb Bearer Date: Tue, 7 May 2024 11:46:58 -0400 Subject: [PATCH] Update HotShot 0.5.50 --- Cargo.lock | 63 +++++++++++++++++---------------------- Cargo.toml | 12 ++++---- src/builder_state.rs | 7 ++--- src/testing/basic_test.rs | 2 +- 4 files changed, 37 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b2c00c7..1d3ed638 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1279,6 +1279,15 @@ dependencies = [ "embedded-io", ] +[[package]] +name = "capnpc" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ba30e0f08582d53c2f3710cf4bb65ff562614b1ba86906d7391adffe189ec" +dependencies = [ + "capnp", +] + [[package]] name = "cbor4ii" version = "0.3.2" @@ -1297,17 +1306,19 @@ checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cdn-broker" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.2.5#c4208513280bd9beeb151e20e44179f2d3cc690a" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.3.2#c41604361b634830b5ba874e06b997993055c25c" dependencies = [ "async-std", "cdn-proto", "clap", + "console-subscriber", "dashmap", "derivative", "jf-primitives 0.4.0-pre.0", "lazy_static", "local-ip-address", "parking_lot", + "portpicker", "prometheus", "rand 0.8.5", "rkyv", @@ -1319,7 +1330,7 @@ dependencies = [ [[package]] name = "cdn-client" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.2.5#c4208513280bd9beeb151e20e44179f2d3cc690a" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.3.2#c41604361b634830b5ba874e06b997993055c25c" dependencies = [ "async-std", "cdn-proto", @@ -1334,7 +1345,7 @@ dependencies = [ [[package]] name = "cdn-marshal" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.2.5#c4208513280bd9beeb151e20e44179f2d3cc690a" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.3.2#c41604361b634830b5ba874e06b997993055c25c" dependencies = [ "async-std", "cdn-proto", @@ -1348,19 +1359,19 @@ dependencies = [ [[package]] name = "cdn-proto" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.2.5#c4208513280bd9beeb151e20e44179f2d3cc690a" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.3.2#c41604361b634830b5ba874e06b997993055c25c" dependencies = [ "anyhow", "ark-serialize", "async-trait", "capnp", + "capnpc", "derivative", "jf-primitives 0.4.0-pre.0", "kanal", "lazy_static", "mnemonic", "mockall", - "parking_lot", "pem", "prometheus", "quinn", @@ -3072,7 +3083,7 @@ dependencies = [ [[package]] name = "hotshot" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "async-broadcast", @@ -3097,7 +3108,6 @@ dependencies = [ "hotshot-task", "hotshot-task-impls", "hotshot-types", - "hotshot-web-server", "jf-primitives 0.4.4", "libp2p-identity", "libp2p-networking", @@ -3117,7 +3127,7 @@ dependencies = [ [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "async-trait", "clap", @@ -3135,7 +3145,7 @@ dependencies = [ [[package]] name = "hotshot-builder-core" -version = "0.1.16" +version = "0.1.18" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3163,8 +3173,8 @@ dependencies = [ [[package]] name = "hotshot-events-service" -version = "0.1.18" -source = "git+https://github.com/EspressoSystems/hotshot-events-service.git?tag=0.1.18#fb32c7c0f12e571436ec462c48ad2938017f9f8b" +version = "0.1.19" +source = "git+https://github.com/EspressoSystems/hotshot-events-service.git?tag=0.1.19#b6b6ac5aa27742539bbc19eebe2e6a90b03a660c" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3189,7 +3199,7 @@ dependencies = [ [[package]] name = "hotshot-example-types" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "async-broadcast", @@ -3219,7 +3229,7 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "async-compatibility-layer", @@ -3248,7 +3258,7 @@ dependencies = [ [[package]] name = "hotshot-task" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3261,7 +3271,7 @@ dependencies = [ [[package]] name = "hotshot-task-impls" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "async-broadcast", @@ -3294,7 +3304,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "ark-bls12-381", @@ -3343,25 +3353,6 @@ dependencies = [ "vbs", ] -[[package]] -name = "hotshot-web-server" -version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" -dependencies = [ - "async-compatibility-layer", - "async-lock 2.8.0", - "async-std", - "clap", - "futures", - "hotshot-types", - "rand 0.8.5", - "tide-disco", - "tokio", - "toml", - "tracing", - "vbs", -] - [[package]] name = "http" version = "0.2.12" @@ -4417,7 +4408,7 @@ dependencies = [ [[package]] name = "libp2p-networking" version = "0.5.43" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.48#136dd95096528dfdaf3672b17e2d7bfcb6a581d7" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.50#6facd5bb4c5800486dd427c84b5de607f17b4224" dependencies = [ "anyhow", "async-compatibility-layer", diff --git a/Cargo.toml b/Cargo.toml index bece4e84..52dba5ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hotshot-builder-core" -version = "0.1.17" +version = "0.1.18" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -16,10 +16,10 @@ clap = { version = "4.4", features = ["derive", "env"] } committable = "0.2" derivative = "2.2" futures = "0.3" -hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" } -hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" } -hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.18" } -hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" } +hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" } +hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" } +hotshot-events-service = { git = "https://github.com/EspressoSystems/hotshot-events-service.git", tag = "0.1.19" } +hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" } serde = { version = "1.0", features = ["derive"] } sha2 = "0.10" snafu = "0.8" @@ -30,4 +30,4 @@ tracing = "0.1" vbs = "0.1" [dev-dependencies] -hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.48" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.50" } diff --git a/src/builder_state.rs b/src/builder_state.rs index 2eb1f1bb..db60a632 100644 --- a/src/builder_state.rs +++ b/src/builder_state.rs @@ -5,7 +5,6 @@ use hotshot_types::{ traits::{ block_contents::precompute_vid_commitment, node_implementation::{ConsensusTime, NodeType}, - states::InstanceState, }, utils::BuilderCommitment, vid::{VidCommitment, VidPrecomputeData}, @@ -181,7 +180,7 @@ pub struct BuilderState { pub base_fee: u64, /// instance state to enfoce max_block_size - pub instance_state: Arc, + pub instance_state: Arc, } /// Trait to hold the helper functions for the builder @@ -692,7 +691,7 @@ impl BuilderProgress for BuilderState { .get(tx_hash) .map(|(_ts, tx, _source)| tx.clone()) }), - self.instance_state.clone(), + &self.instance_state, ) { let builder_hash = payload.builder_commitment(&metadata); // count the number of txns @@ -969,7 +968,7 @@ impl BuilderState { buffer_view_num_count: u64, maximize_txn_capture_timeout: Duration, base_fee: u64, - instance_state: Arc, + instance_state: Arc, ) -> Self { BuilderState { timestamp_to_tx: BTreeMap::new(), diff --git a/src/testing/basic_test.rs b/src/testing/basic_test.rs index fd1e5659..c672ac32 100644 --- a/src/testing/basic_test.rs +++ b/src/testing/basic_test.rs @@ -169,7 +169,7 @@ mod tests { let (block_payload, metadata) = ::from_transactions( vec![tx.clone()], - Arc::new(TestInstanceState {}), + &TestInstanceState {}, ) .unwrap();