Verify All Builtins Acorrding to Whether They are Supported or Not#430
Verify All Builtins Acorrding to Whether They are Supported or Not#430Gali-StarkWare wants to merge 1 commit intomainfrom
Conversation
85518d3 to
89be0c3
Compare
|
? Code quote: ptr::eq(*s, segment_range) |
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on ilyalesokhin-starkware).
crates/cairo_air/src/statement.rs line 263 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
?
Checking if they are in the supported list. I'll change it
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware made 1 comment.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on Gali-StarkWare).
crates/cairo_air/src/statement.rs line 185 at r1 (raw file):
_range_check96_segment_range, _add_mod_segment_range, _mul_mod_segment_range,
now you have unused vars, isn't the old flow better?
Code quote:
_add_mod_segment_range,
_mul_mod_segment_range,89be0c3 to
f049fdc
Compare
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare made 1 comment.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on Gali-StarkWare and ilyalesokhin-starkware).
crates/cairo_air/src/statement.rs line 185 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
now you have unused vars, isn't the old flow better?
How about now?
|
Suggestion: u32::from(*size) |
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware reviewed 1 file, made 1 comment, and resolved 2 discussions.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on Gali-StarkWare).
crates/cairo_air/src/statement.rs line 217 at r2 (raw file):
let diff = eval!(context, (segment_range.end.value) - (segment_range.start.value)); eq(context, diff, zero);
might as well fix that.
Suggestion:
None => {
eq(context, segment_range.end.value, segment_range.start.value);f049fdc to
6c1b6b4
Compare
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare made 2 comments.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on Gali-StarkWare and ilyalesokhin-starkware).
crates/cairo_air/src/statement.rs line 217 at r2 (raw file):
Previously, ilyalesokhin-starkware wrote…
might as well fix that.
Done. I'll see if there are any other places this occurs
crates/cairo_air/src/statement.rs line 240 at r2 (raw file):
let builtin_instance_size_inverses = pack_into_qm31s( supported_builtins.iter().map(|(_, _, size)| M31::from(*size as u32).inverse()),
It doesn't compile
|
Previously, Gali-StarkWare wrote…
than make it compile without using as |

Note
High Risk
High risk because it changes core proof/statement verification constraints for builtin segments, which could cause valid proofs to fail or invalid proofs to pass if the mapping/sizes are wrong. Also updates hard-coded privacy recursion hashes/roots that must match the generated circuit/preprocessed trace.
Overview
Statement verification now validates builtin segments based on support.
verify_builtinsis refactored to treat each builtin as supported (compute/constraint itsn_usesagainst the enabled component size) or unsupported (enforcestart == end, i.e., an empty segment), instead of only checking a fixed subset plus ad-hoc zeroing for others.Privacy proof constants updated.
PRIVACY_RECURSION_CIRCUIT_CONSTS_HASHandPRIVACY_RECURSION_CIRCUIT_PREPROCESSED_ROOTare replaced with new values to match the current privacy recursion circuit artifacts.Written by Cursor Bugbot for commit 6c1b6b4. This will update automatically on new commits. Configure here.