-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: declare post compilation prime validation #297
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ArniStarkware and the rest of your teammates on Graphite |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
=======================================
Coverage 83.55% 83.56%
=======================================
Files 37 37
Lines 1770 1777 +7
Branches 1770 1777 +7
=======================================
+ Hits 1479 1485 +6
- Misses 212 213 +1
Partials 79 79 ☔ View full report in Codecov by Sentry. |
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: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware and @dafnamatsry)
crates/gateway/src/gateway.rs
line 227 at r1 (raw file):
return Err(GatewayError::InvalidPrime { prime, expected_prime }); }
Can you explain what this check is? what is the meaning of prime here?
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: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @ArniStarkware and @dafnamatsry)
crates/gateway/src/gateway.rs
line 212 at r1 (raw file):
for entry_point in entry_points_iterator { let builtins = &entry_point.builtins; println!("{builtins:?}");
remove.
Code quote:
println!("{builtins:?}");
332ec2c
to
c5b052a
Compare
9ee212a
to
46e9d96
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: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @Yael-Starkware)
crates/gateway/src/gateway.rs
line 212 at r1 (raw file):
Previously, Yael-Starkware (YaelD) wrote…
remove.
Done.
c5b052a
to
f342117
Compare
46e9d96
to
df78ad6
Compare
f342117
to
e6bdf01
Compare
df78ad6
to
9089147
Compare
e6bdf01
to
e82f53b
Compare
9089147
to
f3747cf
Compare
e82f53b
to
f67b511
Compare
f3747cf
to
b2d444a
Compare
f67b511
to
c2d41e8
Compare
b2d444a
to
a179aaf
Compare
c2d41e8
to
d0d4053
Compare
a179aaf
to
093d9d0
Compare
d0d4053
to
ab76a25
Compare
093d9d0
to
f36fd0f
Compare
ab76a25
to
0c30c7a
Compare
Previously, Yael-Starkware (YaelD) wrote…
This was first referenced here: https://github.com/starkware-industries/starkware/pull/17777 |
Previously, ArniStarkware (Arnon Hod) wrote…
One step back. This validation was copied from the Python code. |
7dc1d09
to
fe9d1f4
Compare
2546a4b
to
6a332d4
Compare
fe9d1f4
to
bddbf77
Compare
6a332d4
to
0f229c0
Compare
bddbf77
to
cc45be8
Compare
0f229c0
to
93e2b1b
Compare
8d7f983
to
cde907a
Compare
cde907a
to
151c4c5
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 2 of 6 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ArniStarkware and @Yael-Starkware)
crates/gateway/src/compilation.rs
line 96 at r5 (raw file):
let prime = contract_class.prime.clone(); let expected_prime = BigUint::from_str_radix(&PRIME_STR[2..], 16).expect("Error parsing field prime.");
Can this be a constant?
Code quote:
BigUint::from_str_radix(&PRIME_STR[2..], 16).expect("Error parsing field prime.");
6fff151
to
9bb8586
Compare
c834846
to
cc10684
Compare
cc10684
to
04deeb9
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: 1 of 6 files reviewed, 3 unresolved discussions (waiting on @dafnamatsry, @Yael-Starkware, and @Yoni-Starkware)
crates/gateway/src/gateway.rs
line 227 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
One step back. This validation was copied from the Python code.
@Yoni-Starkware agrees this validation is no longer needed. See: https://starkwareindustries.slack.com/archives/C03D7FDE1EZ/p1721116020563769
This validation is not needed for Cairo 1 contracts. The prime used during the compilation into CASM is independent of the transaction. |
This change is