Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADVZ share duplicates payload data #659

Closed
ggutoski opened this issue Aug 16, 2024 · 0 comments · Fixed by #674
Closed

ADVZ share duplicates payload data #659

ggutoski opened this issue Aug 16, 2024 · 0 comments · Fixed by #674
Assignees

Comments

@ggutoski
Copy link
Contributor

This is bad because it doubles the communication size.

Shares are constructed here:

jellyfish/vid/src/advz.rs

Lines 923 to 932 in 92714a4

shares.push(Share {
index,
evals: mem::take(&mut evals),
aggregate_proofs: mem::take(&mut proofs),
evals_proof: all_evals_commit // TODO: check MT lookup for each index
.lookup(KzgEvalsMerkleTreeIndex::<E, H>::from(index as u64))
.expect_ok()
.map_err(vid)?
.1,
});

The first copy of payload data is evals, which is what we use everywhere in ADVZ.

The second copy is hidden deep inside evals_proof. The call to lookup returns a MerkleProof, which contains a copy of the payload data as described in #658 .

One of these copies must be eliminated. If we do not remove it from MerkleProof as suggested in #658 then ADVZ should extract the data from there instead of storing an independent copy in Share struct. cc @mrain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants