From 1f249d513de23694a739ddd29dc8d81fb280e75b Mon Sep 17 00:00:00 2001 From: Gus Gutoski Date: Wed, 20 Sep 2023 12:19:10 -0400 Subject: [PATCH] chore: update jellyfish (#1785) * update jellyfish dep * add TODO comments --- Cargo.lock | 6 +++--- Cargo.toml | 6 +++--- crates/task-impls/src/da.rs | 8 ++++---- crates/testing/tests/da_task.rs | 6 +++--- crates/testing/tests/network_task.rs | 6 +++--- crates/types/src/data.rs | 6 ++++-- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60b1a74849..30f9f438b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3270,7 +3270,7 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jf-primitives" version = "0.4.0-pre.0" -source = "git+https://github.com/EspressoSystems/jellyfish?rev=2fc42af#2fc42af31c955088f7ff4775cbd405a2f42c9322" +source = "git+https://github.com/EspressoSystems/jellyfish#f6866c5395405f807e62516b5d56d9dc390aeb61" dependencies = [ "anyhow", "ark-bls12-377", @@ -3315,7 +3315,7 @@ dependencies = [ [[package]] name = "jf-relation" version = "0.4.0-pre.0" -source = "git+https://github.com/EspressoSystems/jellyfish?rev=2fc42af#2fc42af31c955088f7ff4775cbd405a2f42c9322" +source = "git+https://github.com/EspressoSystems/jellyfish#f6866c5395405f807e62516b5d56d9dc390aeb61" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -3341,7 +3341,7 @@ dependencies = [ [[package]] name = "jf-utils" version = "0.4.0-pre.0" -source = "git+https://github.com/EspressoSystems/jellyfish?rev=2fc42af#2fc42af31c955088f7ff4775cbd405a2f42c9322" +source = "git+https://github.com/EspressoSystems/jellyfish#f6866c5395405f807e62516b5d56d9dc390aeb61" dependencies = [ "ark-ec", "ark-ff", diff --git a/Cargo.toml b/Cargo.toml index 1223493eca..d437aabeeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,9 +52,9 @@ either = { version = "1.8" } espresso-systems-common = { git = "https://github.com/espressosystems/espresso-systems-common", tag = "0.4.1" } ethereum-types = { version = "0.14.1", features = ["impl-serde"] } futures = "0.3.28" -jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "2fc42af" } -jf-relation = { git = "https://github.com/EspressoSystems/jellyfish", rev = "2fc42af" } -jf-utils = { git = "https://github.com/espressosystems/jellyfish", rev = "2fc42af" } +jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish" } +jf-relation = { git = "https://github.com/EspressoSystems/jellyfish" } +jf-utils = { git = "https://github.com/espressosystems/jellyfish" } libp2p-identity = "0.2" libp2p-networking = { path = "./crates/libp2p-networking", version = "0.1.0", default-features = false } libp2p-swarm-derive = { version = "=0.33.0" } diff --git a/crates/task-impls/src/da.rs b/crates/task-impls/src/da.rs index f8711b1d78..ff048ef469 100644 --- a/crates/task-impls/src/da.rs +++ b/crates/task-impls/src/da.rs @@ -671,7 +671,7 @@ where let vid = VidScheme::new(NUM_CHUNKS, NUM_STORAGE_NODES, &srs).unwrap(); let message_bytes = bincode::serialize(&message).unwrap(); - let (shares, common) = vid.dispersal_data(&message_bytes).unwrap(); + let vid_disperse = vid.disperse(&message_bytes).unwrap(); // TODO for now reuse the same block commitment and signature as DA committee // https://github.com/EspressoSystems/jellyfish/issues/369 @@ -680,9 +680,9 @@ where Proposal { data: VidDisperse { view_number: view, - commitment: block.commit(), - shares, - common, + commitment: block.commit(), // TODO GG should be vid_disperse.commit but that's a big change + shares: vid_disperse.shares, + common: vid_disperse.common, }, signature: message.signature, }, diff --git a/crates/testing/tests/da_task.rs b/crates/testing/tests/da_task.rs index a9dcbd0c2e..204038885c 100644 --- a/crates/testing/tests/da_task.rs +++ b/crates/testing/tests/da_task.rs @@ -49,13 +49,13 @@ async fn test_da_task() { }; let vid = vid_init(); let message_bytes = bincode::serialize(&message).unwrap(); - let (shares, common) = vid.dispersal_data(&message_bytes).unwrap(); + let vid_disperse = vid.disperse(&message_bytes).unwrap(); let vid_proposal = Proposal { data: VidDisperse { view_number: message.data.view_number, commitment: block_commitment, - shares, - common, + shares: vid_disperse.shares, + common: vid_disperse.common, }, signature: message.signature.clone(), }; diff --git a/crates/testing/tests/network_task.rs b/crates/testing/tests/network_task.rs index 8239fc72d4..7ad17e2008 100644 --- a/crates/testing/tests/network_task.rs +++ b/crates/testing/tests/network_task.rs @@ -53,15 +53,15 @@ async fn test_network_task() { let quorum_proposal = build_quorum_proposal(&handle, priv_key, 2).await; let vid = vid_init(); let da_proposal_bytes = bincode::serialize(&da_proposal).unwrap(); - let (shares, common) = vid.dispersal_data(&da_proposal_bytes).unwrap(); + let vid_disperse = vid.disperse(&da_proposal_bytes).unwrap(); // TODO for now reuse the same block commitment and signature as DA committee // https://github.com/EspressoSystems/jellyfish/issues/369 let da_vid_disperse = Proposal { data: VidDisperse { view_number: da_proposal.data.view_number, commitment: block_commitment, - shares, - common, + shares: vid_disperse.shares, + common: vid_disperse.common, }, signature: da_proposal.signature.clone(), }; diff --git a/crates/types/src/data.rs b/crates/types/src/data.rs index 8275c8d9b8..080355a195 100644 --- a/crates/types/src/data.rs +++ b/crates/types/src/data.rs @@ -173,11 +173,13 @@ pub struct VidDisperse { /// The view number for which this VID data is intended pub view_number: TYPES::Time, /// Block commitment + /// + /// TODO GG type should be `::Common` but that's a big change. pub commitment: Commitment, /// VID shares dispersed among storage nodes - pub shares: Vec<::StorageShare>, + pub shares: Vec<::Share>, /// VID common data sent to all storage nodes - pub common: ::StorageCommon, + pub common: ::Common, } /// Trusted KZG setup for VID.