-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use polynomial.rs instead of virtual_poly for equality polynomial #42
Conversation
Realized I forgot |
e7c9aaa
to
58d0873
Compare
Isn't this ready for review yet @oskarth ? |
@CPerezz it can be merged as is, I can do the |
1a6423b
to
bc43637
Compare
A bit stuck. Tests currently failing due to different order of evaluations inside the MLE. E.g:
Existing test failing: Minimal reproducible test for ordering: See this commit 567aa34 for failing diff and how to reproduce. |
567aa34
to
1cc96fb
Compare
@CPerezz @arnaucube ready for review |
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.
Some comments but overall looks good
src/ccs/multifolding.rs
Outdated
let e1 = EqPolynomial::new(r_x.to_vec()).evaluate(r_x_prime); | ||
let e2 = EqPolynomial::new(beta.to_vec()).evaluate(r_x_prime); |
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.
The to_vec
forces the clone.
Can't we modify the fn signature then so that forces us to clone too? (So no reference)?? Otherwise, this looks like you just need a ref while in reality, is basically copying the entire vector inside.
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.
Hm, I'd rather not change Nova code API (EqPolynomial::new
args) in this PR tbh unless strong need, since it touches upstream and other stuff
Including EqPolynomial. This ensures we get docstrings for this module.
Remove old eq_eval, redundant and probably less performant.
Fixes clippy error
Tests currently failing due to different order of evaluations inside the MLE. E.g: ``` [src/ccs/util/virtual_poly.rs:576] eq_x_r_old.Z.clone() = [ 0x34a2da9a5f67ca3e8955b20a35d0bb5e33f182e4821c672b7b60bee92cc210ae, 0x1a4de95e591506758747746c9f5a8b82926547116f590b455add73e40043959d, 0x1baaba6f39ed721fed5d82f989195a505a3990fa4657c770b059eb68e1efcb3d, 0x156481980d95bd2c0205568fa1bb5ecf23fcd707db5c17d991f5b80bf10a8e7b, ] [src/ccs/util/virtual_poly.rs:577] eq_x_r_new.Z.clone() = [ 0x34a2da9a5f67ca3e8955b20a35d0bb5e33f182e4821c672b7b60bee92cc210ae, 0x1baaba6f39ed721fed5d82f989195a505a3990fa4657c770b059eb68e1efcb3d, 0x1a4de95e591506758747746c9f5a8b82926547116f590b455add73e40043959d, 0x156481980d95bd2c0205568fa1bb5ecf23fcd707db5c17d991f5b80bf10a8e7b, ] ``` Existing test failing: `cargo test test_compute_g` Minimal reproducible test for ordering: `cargo test test_eq_x_r_equality`
This reverts commit a8b242d.
Just to see how changing order of evals there impacts tests With this minimal equality test succeeds but integration test fails
This reverts commit 9a9895b.
Tests pass with this
9081556
to
06d382d
Compare
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.
LGTM
Addresses #19