Skip to content

Commit

Permalink
chore: update jellyfish (#1785)
Browse files Browse the repository at this point in the history
* update jellyfish dep

* add TODO comments
  • Loading branch information
ggutoski authored Sep 20, 2023
1 parent 68edb53 commit 1f249d5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
8 changes: 4 additions & 4 deletions crates/task-impls/src/da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
},
Expand Down
6 changes: 3 additions & 3 deletions crates/testing/tests/da_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};
Expand Down
6 changes: 3 additions & 3 deletions crates/testing/tests/network_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};
Expand Down
6 changes: 4 additions & 2 deletions crates/types/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ pub struct VidDisperse<TYPES: NodeType> {
/// The view number for which this VID data is intended
pub view_number: TYPES::Time,
/// Block commitment
///
/// TODO GG type should be `<VidScheme as VidSchemeTrait>::Common` but that's a big change.
pub commitment: Commitment<TYPES::BlockType>,
/// VID shares dispersed among storage nodes
pub shares: Vec<<VidScheme as VidSchemeTrait>::StorageShare>,
pub shares: Vec<<VidScheme as VidSchemeTrait>::Share>,
/// VID common data sent to all storage nodes
pub common: <VidScheme as VidSchemeTrait>::StorageCommon,
pub common: <VidScheme as VidSchemeTrait>::Common,
}

/// Trusted KZG setup for VID.
Expand Down

0 comments on commit 1f249d5

Please sign in to comment.