Conversation
PR SummaryHigh Risk Overview Stops representing disabled components as Preserves Fiat–Shamir transcript compatibility via padding. The verifier pads component log sizes and claimed sums back to the full component layout for channel mixing, updates logup-sum validation accordingly, and adjusts example/prover tests and the Reviewed by Cursor Bugbot for commit 6dc8bd7. Bugbot is set up for automated code reviews on this repo. Configure here. |
bd25b8f to
a95c8f1
Compare
a95c8f1 to
6ac0490
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware made 1 comment.
Reviewable status: 0 of 16 files reviewed, 2 unresolved discussions (waiting on az-starkware, Gali-StarkWare, and leo-starkware).
6ac0490 to
a34dc90
Compare
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware resolved 1 discussion.
Reviewable status: 0 of 19 files reviewed, all discussions resolved (waiting on az-starkware, Gali-StarkWare, and leo-starkware).
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare partially reviewed 3 files.
Reviewable status: 3 of 19 files reviewed, 1 unresolved discussion (waiting on az-starkware, ilyalesokhin-starkware, and leo-starkware).
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed all commit messages.
Reviewable status: 3 of 19 files reviewed, 1 unresolved discussion (waiting on az-starkware, ilyalesokhin-starkware, and leo-starkware).
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed 1 file and made 2 comments.
Reviewable status: 4 of 19 files reviewed, 3 unresolved discussions (waiting on az-starkware, ilyalesokhin-starkware, and leo-starkware).
crates/cairo_air/src/privacy.rs line 23 at r3 (raw file):
let preprocessed_trace_variant = PreProcessedTraceVariant::CanonicalSmall; let privacy_set = privacy_components(); let all = all_components::<NoValue>();
Suggestion:
let all_components = all_components::<NoValue>();crates/cairo_air/src/privacy.rs line 26 at r3 (raw file):
let enabled_bits: Vec<bool> = all.keys().map(|name| privacy_set.contains(name)).collect(); let components: IndexMap<&'static str, Box<dyn CircuitEval<NoValue>>> = all.into_iter().filter(|(name, _)| privacy_set.contains(name)).collect();
Repeated code, maybe create them in one go? Similar to before with unzip?
Code quote:
let enabled_bits: Vec<bool> = all.keys().map(|name| privacy_set.contains(name)).collect();
let components: IndexMap<&'static str, Box<dyn CircuitEval<NoValue>>> =
all.into_iter().filter(|(name, _)| privacy_set.contains(name)).collect();
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed 1 file and made 1 comment.
Reviewable status: 5 of 19 files reviewed, 4 unresolved discussions (waiting on az-starkware, ilyalesokhin-starkware, and leo-starkware).
crates/cairo_air/src/statement.rs line 232 at r3 (raw file):
// The component is not supported by the circuit - actual_uses must be 0. eq(context, actual_uses, context.zero()); continue;
Why the added continue?
Code quote:
continue;436fadf to
c8a1958
Compare
a34dc90 to
4b3e641
Compare
|
Previously, Gali-StarkWare wrote…
No need to check: |
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware made 2 comments.
Reviewable status: 4 of 19 files reviewed, 3 unresolved discussions (waiting on az-starkware, Gali-StarkWare, and leo-starkware).
crates/cairo_air/src/privacy.rs line 26 at r3 (raw file):
Previously, Gali-StarkWare wrote…
Repeated code, maybe create them in one go? Similar to before with unzip?
Done.
crates/cairo_air/src/privacy.rs line 23 at r3 (raw file):
let preprocessed_trace_variant = PreProcessedTraceVariant::CanonicalSmall; let privacy_set = privacy_components(); let all = all_components::<NoValue>();
Done.
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed 2 files and all commit messages, and resolved 3 discussions.
Reviewable status: 6 of 19 files reviewed, all discussions resolved (waiting on az-starkware and leo-starkware).
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed 5 files and made 2 comments.
Reviewable status: 11 of 19 files reviewed, 2 unresolved discussions (waiting on az-starkware, ilyalesokhin-starkware, and leo-starkware).
crates/cairo_air/src/test.rs line 61 at r4 (raw file):
let components: indexmap::IndexMap<&'static str, Box<dyn CircuitEval<QM31>>> = zip_eq(all_components::<QM31>().into_iter(), &component_enable_bits) .filter_map(|((component_name, component), &enable_bit)| {
What does it filter here?
Code quote:
filter_mapcrates/stark_verifier_examples/src/simple_air.rs line 250 at r4 (raw file):
// Mix the component log sizes into the channel. // Component_3 is disabled, so it has trace size 0. prover_channel.mix_felts(&pack_component_log_sizes(&COMPONENT_LOG_SIZES));
Revert and use packed_component_log_sizes later
Code quote:
prover_channel.mix_felts(&pack_component_log_sizes(&COMPONENT_LOG_SIZES));There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b3e641. Configure here.
|
Previously, Gali-StarkWare wrote…
I'm removing disable components. |
4b3e641 to
18c570a
Compare
|
Previously, Gali-StarkWare wrote…
Done, |
18c570a to
84e7197
Compare
84e7197 to
5153f24
Compare
c8a1958 to
5ef6793
Compare
Store per-component enable bits directly in ProofConfig instead of deriving them from component disabled state. This supports dynamic component sets in the Cairo1 verifier. Disabled components are now filtered out before being passed to the verifier, and pad_disabled re-expands values for channel mixing to maintain Fiat-Shamir compatibility.
5153f24 to
6dc8bd7
Compare
ilyalesokhin-starkware
left a comment
There was a problem hiding this comment.
@ilyalesokhin-starkware resolved 1 discussion.
Reviewable status: 9 of 19 files reviewed, 1 unresolved discussion (waiting on az-starkware, Gali-StarkWare, and leo-starkware).


Store per-component enable bits directly in ProofConfig instead of deriving them from component disabled state. This supports dynamic component sets in the Cairo1 verifier. Disabled components are now filtered out before being passed to the verifier, and pad_disabled re-expands values for channel mixing to maintain Fiat-Shamir compatibility.