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

chore: VID disperse also return payload commitment #371

Merged
merged 11 commits into from
Sep 14, 2023
Merged

chore: VID disperse also return payload commitment #371

merged 11 commits into from
Sep 14, 2023

Conversation

ggutoski
Copy link
Contributor

@ggutoski ggutoski commented Sep 13, 2023

Description

closes: #369

  • With this addition of the payload commitment to the return value of disperse, the return type would become a 3-tuple. This is unruly and clippy complained about type complexity when I tried it. (See fc4548c.) So instead I created a new struct VidDisperse to aggregate these values in a more legibile return type and give them names.
  • I took this opportunity to shorten/clarify some names.
  • Bizarre behaviour from the compiler forced me to add an unnecessary as cast:
    for poly_commit in common.poly_commits.iter() {
    // TODO compiler bug? `as` should not be needed here!
    (poly_commit as &P::Commitment)
    .serialize_uncompressed(&mut hasher)
    .map_err(vid)?;
    }

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 a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the GitHub PR explorer

@ggutoski ggutoski requested a review from mrain September 13, 2023 20:51
@ggutoski ggutoski changed the title VID disperse also return payload commitment chore: VID disperse also return payload commitment Sep 13, 2023
Copy link
Contributor

@mrain mrain left a comment

Choose a reason for hiding this comment

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

LGTM

@ggutoski ggutoski merged commit fcf2c12 into main Sep 14, 2023
5 checks passed
@ggutoski ggutoski deleted the gg/369 branch September 14, 2023 00:00
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.

VID convenient access to payload commitment
2 participants