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

fix!: eliminate unnecessary merkle proofs in ADVZ shares #678

Merged
merged 10 commits into from
Sep 9, 2024
Merged

Conversation

ggutoski
Copy link
Contributor

@ggutoski ggutoski commented Sep 5, 2024

closes: #671

This PR:

  • Advz::evals_proof is no longer a Vec
  • structure of the merkle tree is changed accordingly. Each leaf in the merkle tree is a vec of polynomial evaluations as before, except now that vec looks like:

    jellyfish/vid/src/advz.rs

    Lines 702 to 715 in 689555e

    // Populate a Vec of polynomial evaluations for all storage nodes:
    //
    // The `i`th item is a Vec of `polys.len() * multiplicity`
    // polynomial evaluations.
    //
    // Evaluations for storage node `i` are ordered as follows. Define
    // - `n`: the number of storage nodes: `self.num_storage_nodes`
    // - `k`: the number of polynomials minus 1: `polys.len() - 1`
    // - `m`: `multiplicity - 1`
    // - `p[j](x)`: the value of the `j`th polynomial evaluated at `x`.
    //
    // p[0](i), p[0](i+n), ..., p[0](i+m*n),
    // ...,
    // p[k](i), p[k](i+n), ..., p[k](i+m*n),
  • delete test sad_path_verify_share_with_multiplicity as it is a regression for VID: verify consistency with the merkle root for all the evaluations in a VID share #654 , which is no longer relevant as there is now only one merkle path in each share.

This PR does not:

Key places to review:


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (main)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added relevant changelog entries to the CHANGELOG.md of touched crates.
  • Re-reviewed Files changed in the GitHub PR explorer

@ggutoski ggutoski requested review from akonring and removed request for akonring September 5, 2024 21:51
akonring
akonring previously approved these changes Sep 6, 2024
Copy link
Contributor

@akonring akonring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.
Don't fully understand the motivation for moving to a different "share evaluation layout".
But they seem equivalent and the docs added are great and needed. Thanks.

vid/src/advz.rs Show resolved Hide resolved
vid/src/advz/test.rs Show resolved Hide resolved
vid/src/advz.rs Show resolved Hide resolved
@ggutoski ggutoski merged commit 35d6cac into main Sep 9, 2024
5 checks passed
@ggutoski ggutoski deleted the gg/671 branch September 9, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate unnecessary merkle proofs in ADVZ shares
2 participants