-
Notifications
You must be signed in to change notification settings - Fork 9
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
M31 and CM31 Fields #1
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @spapinistarkware and the rest of your teammates on Graphite |
87a5c99
to
1be1f57
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.
Reviewed 5 of 8 files at r1, all commit messages.
Reviewable status: 5 of 8 files reviewed, 4 unresolved discussions (waiting on @spapinistarkware)
stwo_cairo_verifier/Scarb.toml
line 2 at r1 (raw file):
[package] name = "stwo_cairo_verifier"
not stwo_cairo?
Code quote:
stwo_cairo_verifier
stwo_cairo_verifier/src/fields/cm31.cairo
line 52 at r1 (raw file):
} pub impl CM31Neg of Neg<CM31> { fn neg(a: CM31) -> CM31 {
a.a is odd
Suggestion:
fn neg(x: CM31) -> CM31 {
stwo_cairo_verifier/src/fields/cm31.cairo
line 68 at r1 (raw file):
#[test] fn test_m31() {
rename
Suggestion:
fn test_cm31() {
stwo_cairo_verifier/src/fields/m31.cairo
line 38 at r1 (raw file):
Result::Ok(res) => M31 { inner: res }, Result::Err(res) => M31 { inner: core::integer::u32_wrapping_add(res, P) } }
Can you instead just add neg(rhs)
Code quote:
match core::integer::u32_overflowing_sub(lhs.inner, rhs.inner) {
Result::Ok(res) => M31 { inner: res },
Result::Err(res) => M31 { inner: core::integer::u32_wrapping_add(res, P) }
}
1be1f57
to
7495849
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.
Reviewable status: 5 of 8 files reviewed, 4 unresolved discussions (waiting on @shaharsamocha7)
stwo_cairo_verifier/Scarb.toml
line 2 at r1 (raw file):
Previously, shaharsamocha7 wrote…
not stwo_cairo?
I put all fo this in a subdirectory under root, called stwo_cairo_verifier
. I imagine there will be more folders in this repo, for other things, such as the AIRs.
stwo_cairo_verifier/src/fields/cm31.cairo
line 52 at r1 (raw file):
Previously, shaharsamocha7 wrote…
a.a is odd
Done.
stwo_cairo_verifier/src/fields/cm31.cairo
line 68 at r1 (raw file):
Previously, shaharsamocha7 wrote…
rename
Done.
stwo_cairo_verifier/src/fields/m31.cairo
line 38 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Can you instead just add neg(rhs)
Done.
7495849
to
d91d4b7
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.
Reviewable status: 5 of 8 files reviewed, 4 unresolved discussions (waiting on @shaharsamocha7)
stwo_cairo_verifier/src/fields/cm31.cairo
line 52 at r1 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
Done.
Can't
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.
Reviewed 1 of 8 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)
.github/workflows/cairo-ci.yaml
line 1 at r2 (raw file):
name: Cairo workflow
I'm not sure how to check this file :(
Code quote:
name: Cairo workflow
Merge activity
|
This change is