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: check eval_proof for all evaluations #657

Merged
merged 10 commits into from
Aug 20, 2024
Merged

fix: check eval_proof for all evaluations #657

merged 10 commits into from
Aug 20, 2024

Conversation

akonring
Copy link
Contributor

@akonring akonring commented Aug 16, 2024

closes: #654 , #661

This PR:

See comment here:
#657 (comment)


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

@akonring akonring changed the title check eval_proof for all evaluations fix: check eval_proof for all evaluations Aug 16, 2024
Copy link
Contributor

@ggutoski ggutoski left a comment

Choose a reason for hiding this comment

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

Thanks Anders! Some comments below.

General comment: I'm having a hard time reading this code after such a long break since we last examined it. We need more comments about multiplicity, and that applies not just to code in this PR.

Example: each of the Share struct fields that is a Vec should have a comment explaining why it's a Vec like Vec length equals multiplicity or something.

vid/src/advz.rs Show resolved Hide resolved
vid/src/advz.rs Outdated Show resolved Hide resolved
vid/src/advz/test.rs Show resolved Hide resolved
@akonring
Copy link
Contributor Author

Thanks for the review, @ggutoski.

Trying to summarize issues so far:

Let me know if you agree with this assessment and scope of this PR.

General comment: I'm having a hard time reading this code after such a long break since we last examined it. We need more comments about multiplicity, and that applies not just to code in this PR.

We should add additional tests and comments when (fixing 660 and 659) as per your comment.

@akonring akonring marked this pull request as ready for review August 19, 2024 15:41
@ggutoski
Copy link
Contributor

ggutoski commented Aug 19, 2024

Let me know if you agree with this assessment and scope of this PR.

Seems mostly right except this PR also addresses #654. So we have

closed by this PR: #654 , #661

not addressed in this PR: #659 , #660

@ggutoski ggutoski linked an issue Aug 19, 2024 that may be closed by this pull request
@akonring akonring requested a review from ggutoski August 20, 2024 16:12
.expect_err("bad share value should fail verification");
}

// corrupt the first eval proof of this share by assigning it the value of last
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought the purpose of this test is to corrupt evals (and their proofs) for shares beyond the first, no?

Also, maybe add a comment for this test explaining that it's a regression test for #654 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought the purpose of this test is to corrupt evals (and their proofs) for shares beyond the first, no?

Yes, that is better. Modified here: 1fd8293

Comment added here: 049d20d

@akonring akonring requested a review from ggutoski August 20, 2024 16:42
Copy link
Contributor

@ggutoski ggutoski left a comment

Choose a reason for hiding this comment

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

Awesome thank you!

@ggutoski ggutoski merged commit 7cd4f76 into main Aug 20, 2024
5 checks passed
@ggutoski ggutoski deleted the ak/654 branch August 20, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants