-
Notifications
You must be signed in to change notification settings - Fork 47
Merge stir #161
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
base: main
Are you sure you want to change the base?
Merge stir #161
Conversation
Prover refactoring
…whir into verifier-improvements
| ); | ||
| } | ||
| } | ||
| pub mod lagrange_iterator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these at the end? This file seems to have some conflicts.
src/stir_ldt/committer/reader.rs
Outdated
| } | ||
|
|
||
| pub struct CommitmentReader<'a, F, MerkleConfig, PowStrategy>( | ||
| // TODO: Refactor to use this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can even just remove it no?
src/stir_ldt/utils.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
src/stir_ldt/verifier.rs
Outdated
| folded_domain_size: usize, | ||
| } | ||
|
|
||
| type ToBeReplaced<F> = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I forgot about this. Will remove.
WizardOfMenlo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think let's wait a bit to merge, I think things are still in a bit of a rough stage, left some comments.
src/poly_utils/mod.rs
Outdated
| // #[derive(Debug, Clone, PartialEq, Eq)] | ||
| // pub struct MultilinearPoint<F>(pub Vec<F>); | ||
|
|
||
| pub fn eq_poly<F>(coords: &MultilinearPoint<F>, point: BinaryHypercubePoint) -> F |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now lives in multilinear. Please go ahead and double checked that these are not duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 16bb823
src/stir_ldt/committer/reader.rs
Outdated
| ProofResult, | ||
| }; | ||
|
|
||
| use crate::whir::utils::DigestToUnitDeserialize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can move this to a common fs_utils/util module? Because it's now WHIR specific anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. There is a lot of streamlining and logic separation to do, and I just thought it would be nice to deal with it separately after this is merged. I could do it in this PR if you prefer, though. lmk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 271d84d
src/stir_ldt/committer/reader.rs
Outdated
| F: FftField, | ||
| MerkleConfig: Config<Leaf = [F]>, | ||
| VerifierState: | ||
| FieldToUnitDeserialize<F> + UnitToField<F> + DigestToUnitDeserialize<MerkleConfig>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trait bound here can be simplified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified in 10e89ca
src/stir_ldt/committer/reader.rs
Outdated
| } | ||
| } | ||
|
|
||
| impl Default for CommitmentReader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a #[derive] istead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in f724060
src/stir_ldt/utils.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 41303b7
WizardOfMenlo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
| &ctx.prev_root, | ||
| virtual_evals.iter().map(|a| a.as_ref()), | ||
| ) | ||
| .unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done for the final round, so it might be necessary here, too. I don’t yet understand the code well enough to be sure.
| .unwrap() | |
| .unwrap() || merkle_proof.leaf_indexes != r_shift_indexes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose the merkle_proof.leaf_indexes are implicitly checked later since the corresponding points become part of the quotient set for that round. However, the final_merkle_proof.leaf_indexes are also implicitly checked against the final_r_shift_indexes later, since the latter are used to get the final_evaluations, which are then compared to the final_folds.
So it seems to me that checking the correctness of (final_)merkle_proof.leaf_indexes is redundant in any case, but doing so might make the error cleaner in case of verification failure. If that cleaner error is irrelevant, then I don’t think the check is necessary at all; if the cleaner error is the reason the check exists for the final indices, I’d argue the code becomes more consistent when my suggestion above is included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: feel free to let me know in case this PR is stale, then I’ll stop necroposting.
No description provided.