From 19edc755d62a9e0ef707af4eae8bd4dfb2d100e2 Mon Sep 17 00:00:00 2001 From: bfish713 Date: Fri, 20 Sep 2024 15:05:32 -0400 Subject: [PATCH 1/4] patch hs --- Cargo.lock | 63 ++++++++++++++++++++++++++++++++++++++++++------------ Cargo.toml | 13 ++++++++++- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acc193545..10fe49136 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1322,7 +1322,7 @@ dependencies = [ "jf-merkle-tree", "jf-signature", "libp2p", - "libp2p-networking", + "libp2p-networking 0.5.74 (git+https://github.com/EspressoSystems/hotshot?tag=0.5.74)", "portpicker", "rand 0.8.5", "sequencer", @@ -4080,7 +4080,7 @@ dependencies = [ [[package]] name = "hotshot" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-broadcast", @@ -4108,7 +4108,7 @@ dependencies = [ "hotshot-types", "jf-signature", "libp2p-identity", - "libp2p-networking", + "libp2p-networking 0.5.74 (git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1)", "lru 0.12.4", "num_enum", "portpicker", @@ -4127,7 +4127,7 @@ dependencies = [ [[package]] name = "hotshot-builder-api" version = "0.1.7" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "async-trait", "clap", @@ -4228,7 +4228,7 @@ dependencies = [ [[package]] name = "hotshot-example-types" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-broadcast", @@ -4261,7 +4261,7 @@ dependencies = [ [[package]] name = "hotshot-fakeapi" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -4280,7 +4280,7 @@ dependencies = [ [[package]] name = "hotshot-macros" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "derive_builder", "proc-macro2", @@ -4291,7 +4291,7 @@ dependencies = [ [[package]] name = "hotshot-orchestrator" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-compatibility-layer", @@ -4377,7 +4377,7 @@ dependencies = [ [[package]] name = "hotshot-stake-table" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "ark-bn254", "ark-ed-on-bn254", @@ -4439,7 +4439,7 @@ dependencies = [ [[package]] name = "hotshot-task" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-broadcast", @@ -4454,7 +4454,7 @@ dependencies = [ [[package]] name = "hotshot-task-impls" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-broadcast", @@ -4491,7 +4491,7 @@ dependencies = [ [[package]] name = "hotshot-testing" version = "0.5.74" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "async-broadcast", @@ -4537,7 +4537,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/hotshot?tag=0.5.74#b08660bf9e01d4d59a79009d67100ba13895e4b2" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" dependencies = [ "anyhow", "ark-bn254", @@ -5826,6 +5826,41 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-networking" +version = "0.5.74" +source = "git+https://www.github.com/EspressoSystems/HotShot.git?tag=0.5.74-patch1#4136ca05ea4fb7ee6a398da1c206572a2b230384" +dependencies = [ + "anyhow", + "async-compatibility-layer", + "async-lock 2.8.0", + "async-std", + "async-trait", + "bincode", + "blake3", + "custom_debug 0.5.1", + "delegate", + "derive_builder", + "either", + "futures", + "hotshot-types", + "lazy_static", + "libp2p", + "libp2p-identity", + "libp2p-swarm-derive", + "pin-project", + "portpicker", + "rand 0.8.5", + "serde", + "serde_bytes", + "serde_json", + "snafu 0.8.4", + "tokio", + "tokio-stream", + "tracing", + "void", +] + [[package]] name = "libp2p-quic" version = "0.10.3" @@ -8627,7 +8662,7 @@ dependencies = [ "jf-signature", "jf-vid", "libp2p", - "libp2p-networking", + "libp2p-networking 0.5.74 (git+https://github.com/EspressoSystems/hotshot?tag=0.5.74)", "marketplace-builder-core", "marketplace-solver", "num_enum", diff --git a/Cargo.toml b/Cargo.toml index 71b3951e7..d1d1d3871 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5 libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74" } 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.74" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74-patch1" } # Push CDN imports cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", features = [ @@ -140,3 +140,14 @@ paste = "1.0" rand = "0.8.5" time = "0.3" trait-set = "0.3.0" + +[patch."https://github.com/EspressoSystems/HotShot.git"] +hotshot = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-builder-api = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-orchestrator = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-stake-table = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-task ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-task-impls ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-testing ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } \ No newline at end of file From 74e60b12b16a65a52b6258043c5e4471c278196e Mon Sep 17 00:00:00 2001 From: Rob Date: Fri, 20 Sep 2024 15:14:35 -0400 Subject: [PATCH 2/4] libp2p fix --- builder/src/permissioned.rs | 5 ++--- sequencer/src/lib.rs | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builder/src/permissioned.rs b/builder/src/permissioned.rs index 0c5b44276..d90014e98 100644 --- a/builder/src/permissioned.rs +++ b/builder/src/permissioned.rs @@ -43,8 +43,8 @@ use hotshot::{ traits::{ election::static_committee::GeneralStaticCommittee, implementations::{ - derive_libp2p_peer_id, CdnMetricsValue, CdnTopic, CombinedNetworks, KeyPair, - Libp2pNetwork, PushCdnNetwork, WrappedSignatureKey, + derive_libp2p_peer_id, CdnMetricsValue, CdnTopic, CombinedNetworks, GossipConfig, + KeyPair, Libp2pNetwork, PushCdnNetwork, WrappedSignatureKey, }, BlockPayload, }, @@ -96,7 +96,6 @@ use hotshot_types::{ }; use jf_merkle_tree::{namespaced_merkle_tree::NamespacedMerkleTreeScheme, MerkleTreeScheme}; use jf_signature::bls_over_bn254::VerKey; -use libp2p_networking::network::GossipConfig; use sequencer::{ catchup::StatePeers, context::{Consensus, SequencerContext}, diff --git a/sequencer/src/lib.rs b/sequencer/src/lib.rs index da5929a59..b2233a5ad 100644 --- a/sequencer/src/lib.rs +++ b/sequencer/src/lib.rs @@ -24,7 +24,6 @@ use futures::FutureExt; use genesis::L1Finalized; // Should move `STAKE_TABLE_CAPACITY` in the sequencer repo when we have variate stake table support use libp2p::Multiaddr; -use libp2p_networking::network::GossipConfig; use network::libp2p::split_off_peer_id; use options::Identity; use state_signature::static_stake_table_commitment; @@ -40,7 +39,7 @@ use derivative::Derivative; use espresso_types::v0::traits::{PersistenceOptions, SequencerPersistence}; pub use genesis::Genesis; #[cfg(feature = "libp2p")] -use hotshot::traits::implementations::{CombinedNetworks, Libp2pNetwork}; +use hotshot::traits::implementations::{CombinedNetworks, GossipConfig, Libp2pNetwork}; use hotshot::{ traits::implementations::{ derive_libp2p_peer_id, CdnMetricsValue, CdnTopic, KeyPair, MemoryNetwork, PushCdnNetwork, From 8ca648056401f722ef2ca4b8456c57acb5d34e8e Mon Sep 17 00:00:00 2001 From: bfish713 Date: Fri, 20 Sep 2024 15:25:26 -0400 Subject: [PATCH 3/4] revert tag change to hs examples --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d1d1d3871..ffdcf166d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ hotshot-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5 libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74" } 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.74-patch1" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74" } # Push CDN imports cdn-broker = { git = "https://github.com/EspressoSystems/Push-CDN", features = [ @@ -150,4 +150,5 @@ hotshot-task ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag hotshot-task-impls ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } hotshot-testing ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } hotshot-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } +# libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74-patch1" } hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } \ No newline at end of file From c20a399544955df7cdcc25c39fe69e8f0d1720cf Mon Sep 17 00:00:00 2001 From: bfish713 Date: Fri, 20 Sep 2024 15:33:58 -0400 Subject: [PATCH 4/4] add new line --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ffdcf166d..d1f4a1807 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -151,4 +151,4 @@ hotshot-task-impls ={ git = "https://www.github.com/EspressoSystems/HotShot.git" hotshot-testing ={ git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } hotshot-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } # libp2p-networking = { git = "https://github.com/EspressoSystems/hotshot", tag = "0.5.74-patch1" } -hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" } \ No newline at end of file +hotshot-example-types = { git = "https://www.github.com/EspressoSystems/HotShot.git", tag = "0.5.74-patch1" }