diff --git a/Cargo.lock b/Cargo.lock index b9626f89..28d30354 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,9 +210,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arbitrary" @@ -1266,20 +1266,18 @@ checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "cdn-broker" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.9#8f9cc2d56e725a6cc29a792c6ed67e2e9efee756" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.11#c854b7c106f72f21c94a1235e8222f76f78e47e6" dependencies = [ "async-std", "cdn-proto", "clap", "dashmap", - "delegate", "derivative", "derive_builder 0.13.1", "jf-primitives", "lazy_static", "local-ip-address", "parking_lot", - "paste", "prometheus", "rkyv", "tokio", @@ -1290,7 +1288,7 @@ dependencies = [ [[package]] name = "cdn-client" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.9#8f9cc2d56e725a6cc29a792c6ed67e2e9efee756" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.11#c854b7c106f72f21c94a1235e8222f76f78e47e6" dependencies = [ "async-std", "cdn-proto", @@ -1306,7 +1304,7 @@ dependencies = [ [[package]] name = "cdn-marshal" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.9#8f9cc2d56e725a6cc29a792c6ed67e2e9efee756" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.11#c854b7c106f72f21c94a1235e8222f76f78e47e6" dependencies = [ "async-std", "cdn-proto", @@ -1321,7 +1319,7 @@ dependencies = [ [[package]] name = "cdn-proto" version = "0.1.0" -source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.9#8f9cc2d56e725a6cc29a792c6ed67e2e9efee756" +source = "git+https://github.com/EspressoSystems/Push-CDN?tag=0.1.11#c854b7c106f72f21c94a1235e8222f76f78e47e6" dependencies = [ "anyhow", "ark-serialize", @@ -1819,27 +1817,6 @@ dependencies = [ "serdect", ] -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - [[package]] name = "ctr" version = "0.6.0" @@ -2057,17 +2034,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "delegate" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e018fccbeeb50ff26562ece792ed06659b9c2dae79ece77c4456bb10d9bf79b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "der" version = "0.7.8" @@ -2349,18 +2315,6 @@ dependencies = [ "serde", ] -[[package]] -name = "embed-doc-image" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e" -dependencies = [ - "base64 0.13.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "embedded-io" version = "0.6.1" @@ -3137,7 +3091,7 @@ dependencies = [ [[package]] name = "hotshot" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "anyhow", "async-broadcast", @@ -3155,14 +3109,13 @@ dependencies = [ "dashmap", "derive_more", "either", - "embed-doc-image", "ethereum-types", "futures", - "hotshot-orchestrator", "hotshot-task", "hotshot-task-impls", "hotshot-types", "hotshot-web-server", + "jf-primitives", "libp2p-identity", "libp2p-networking", "lru", @@ -3180,7 +3133,7 @@ dependencies = [ [[package]] name = "hotshot-builder-api" version = "0.1.6" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "async-trait", "clap", @@ -3198,7 +3151,7 @@ dependencies = [ [[package]] name = "hotshot-example-types" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "anyhow", "async-broadcast", @@ -3212,7 +3165,6 @@ dependencies = [ "ethereum-types", "futures", "hotshot", - "hotshot-orchestrator", "hotshot-task", "hotshot-task-impls", "hotshot-types", @@ -3226,36 +3178,10 @@ dependencies = [ "tracing", ] -[[package]] -name = "hotshot-orchestrator" -version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" -dependencies = [ - "async-compatibility-layer", - "async-lock 2.8.0", - "async-std", - "blake3", - "clap", - "csv", - "futures", - "hotshot-types", - "libp2p", - "serde", - "serde-inline-default", - "serde_json", - "surf-disco", - "thiserror", - "tide-disco", - "tokio", - "toml", - "tracing", - "versioned-binary-serialization", -] - [[package]] name = "hotshot-task" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3268,7 +3194,7 @@ dependencies = [ [[package]] name = "hotshot-task-impls" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "async-broadcast", "async-compatibility-layer", @@ -3300,7 +3226,7 @@ dependencies = [ [[package]] name = "hotshot-types" version = "0.1.11" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "anyhow", "ark-bls12-381", @@ -3348,7 +3274,7 @@ dependencies = [ [[package]] name = "hotshot-web-server" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "async-compatibility-layer", "async-lock 2.8.0", @@ -4315,7 +4241,7 @@ dependencies = [ [[package]] name = "libp2p-networking" version = "0.5.26" -source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.27#8bf55cfb3a1d096c0330ba62d03ed1e5f7298cf8" +source = "git+https://github.com/EspressoSystems/HotShot.git?tag=0.5.28#db3fcfafccdc909845de47e2dd241662c3849b77" dependencies = [ "anyhow", "async-compatibility-layer", @@ -4324,7 +4250,6 @@ dependencies = [ "async-trait", "blake3", "custom_debug", - "dashmap", "derive_builder 0.20.0", "either", "futures", @@ -6601,17 +6526,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-inline-default" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa824cde50b5f01ff28a955114d8152a07cd62d81f53459dad0f2610136be844" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "serde_bytes" version = "0.11.14" diff --git a/Cargo.toml b/Cargo.toml index e0ce8651..4968dc4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,10 @@ async-trait = "0.1" clap = { version = "4.4", features = ["derive", "env"] } commit = { git = "https://github.com/EspressoSystems/commit.git" } futures = "0.3" -hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.27" } -hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.27" } -hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.27" } -hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.27" } +hotshot = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.28" } +hotshot-example-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.28" } +hotshot-types = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.28" } +hotshot-builder-api = { git = "https://github.com/EspressoSystems/HotShot.git", tag = "0.5.28" } sha2 = "0.10" serde = { version = "1.0", features = ["derive"] } tide-disco = { git = "https://github.com/EspressoSystems/tide-disco", tag = "v0.5.0" } diff --git a/src/builder_state.rs b/src/builder_state.rs index 08017a36..6dda4f63 100644 --- a/src/builder_state.rs +++ b/src/builder_state.rs @@ -182,12 +182,7 @@ pub trait BuilderProgress { async fn process_decide_event(&mut self, decide_msg: DecideMessage) -> Option; /// spawn a clone of builder - fn spawn_clone( - self, - da_proposal: DAProposal, - quorum_proposal: QuorumProposal, - leader: TYPES::SignatureKey, - ); + fn spawn_clone(self, da_proposal: DAProposal, quorum_proposal: QuorumProposal); /// build a block fn build_block(&mut self, matching_vid: VidCommitment) -> Option>; @@ -279,7 +274,8 @@ impl BuilderProgress for BuilderState { } let da_proposal_data = da_msg.proposal.data.clone(); - let sender = da_msg.sender; + // TODO: confirm signature with this... + // let sender = da_msg.sender; // get the view number and encoded txns from the da_proposal_data let view_number = da_proposal_data.view_number; @@ -324,8 +320,7 @@ impl BuilderProgress for BuilderState { // make sure we don't clone for the bootstrapping da and qc proposals if qc_proposal_data.view_number.get_u64() != 0 { tracing::info!("Spawning a clone"); - self.clone() - .spawn_clone(da_proposal_data, qc_proposal_data, sender); + self.clone().spawn_clone(da_proposal_data, qc_proposal_data); } else { tracing::info!("Not spawning a clone despite matching DA and QC proposals, as they corresponds to bootstrapping phase"); } @@ -361,7 +356,8 @@ impl BuilderProgress for BuilderState { return; } let qc_proposal_data = qc_msg.proposal.data; - let sender = qc_msg.sender; + // TODO: confirm signature with this... + // let sender = qc_msg.sender; let payload_vid_commitment = qc_proposal_data.block_header.payload_commitment(); tracing::debug!( @@ -383,8 +379,7 @@ impl BuilderProgress for BuilderState { // make sure we don't clone for the bootstrapping da and qc proposals if da_proposal_data.view_number.get_u64() != 0 { tracing::info!("Spawning a clone"); - self.clone() - .spawn_clone(da_proposal_data, qc_proposal_data, sender); + self.clone().spawn_clone(da_proposal_data, qc_proposal_data); } else { tracing::info!("Not spawning a clone despite matching DA and QC proposals, as they corresponds to bootstrapping phase"); } @@ -476,7 +471,6 @@ impl BuilderProgress for BuilderState { mut self, da_proposal: DAProposal, quorum_proposal: QuorumProposal, - leader: TYPES::SignatureKey, ) { self.built_from_view_vid_leaf.0 = quorum_proposal.view_number; self.built_from_view_vid_leaf.1 = quorum_proposal.block_header.payload_commitment(); @@ -487,7 +481,6 @@ impl BuilderProgress for BuilderState { parent_commitment: quorum_proposal.justify_qc.get_data().leaf_commit, block_header: quorum_proposal.block_header.clone(), block_payload: None, - proposer_id: leader, }; self.built_from_view_vid_leaf.2 = leaf.commit(); diff --git a/src/testing/basic_test.rs b/src/testing/basic_test.rs index 544477ad..829583a6 100644 --- a/src/testing/basic_test.rs +++ b/src/testing/basic_test.rs @@ -242,7 +242,6 @@ mod tests { .block_header .clone(), block_payload: None, - proposer_id: sqc_msgs[(i - 1) as usize].proposal.data.proposer_id, }; let q_data = QuorumData:: { @@ -275,14 +274,11 @@ mod tests { tracing::debug!("Iteration: {} justify_qc: {:?}", i, justify_qc); let qc_proposal = QuorumProposal:: { - //block_header: TestBlockHeader::genesis(&TestInstanceState {}).0, block_header: block_header, view_number: ViewNumber::new(i as u64), justify_qc: justify_qc.clone(), - timeout_certificate: None, upgrade_certificate: None, - proposer_id: pub_key, - view_sync_certificate: None, + proposal_certificate: None, }; let payload_commitment = @@ -325,7 +321,6 @@ mod tests { &qc_proposal.block_header, ), )), - proposer_id: qc_proposal.proposer_id, }; current_leaf }