Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
59641ab to
d400784
Compare
Stavbe
left a comment
There was a problem hiding this comment.
revision 4: auto-generated
revision 5: manual changes
I checked, and the log size is the same for all the components in 'test_verify_privacy_with_recursion' and test_privacy_recursion_with_preprocessed_context after this change.
@Stavbe made 3 comments.
Reviewable status: 0 of 25 files reviewed, 2 unresolved discussions.
crates/circuit_air/src/sample_evaluations.rs line 3 at r1 (raw file):
// AIR version 5731579f use stwo::core::fields::{cm31::CM31, m31::M31, qm31::QM31}; pub const BLAKE_GATE_SAMPLE_EVAL_RESULT: QM31 =
Not used
crates/circuit_air/src/sample_evaluations.rs line 11 at r1 (raw file):
pub const BLAKE_ROUND_SIGMA_SAMPLE_EVAL_RESULT: QM31 = QM31(CM31(M31(512577297), M31(1730381685)), CM31(M31(592485643), M31(1900393320))); pub const CIRCUIT_BLAKE_ROUND_SAMPLE_EVAL_RESULT: QM31 =
Not used
d400784 to
831e98d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 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.
6fb2fc2 to
5bf133c
Compare
5bf133c to
38e1b48
Compare
anatgstarkware
left a comment
There was a problem hiding this comment.
@anatgstarkware made 3 comments.
Reviewable status: 0 of 27 files reviewed, 5 unresolved discussions (waiting on Stavbe).
crates/circuit_prover/src/witness/components/blake_gate.rs line 199 at r9 (raw file):
); for inputs in sub_component_inputs.verify_bitwise_xor_8 { verify_bitwise_xor_8_state.add_packed_inputs(&inputs[..n_rows / N_LANES], 0);
Why did you change this file?
crates/circuit_air/src/circuit_eval_components/blake_gate.rs line 1 at r9 (raw file):
// This file was created by the AIR team.
please remove
Code quote:
// This file was created by the AIR team.crates/circuit_air/src/circuit_eval_components/subroutines/create_blake_round_input.rs line 1 at r9 (raw file):
// This file was created by the AIR team.
please remove
Code quote:
// This file was created by the AIR team.|
Previously, anatgstarkware (anatg) wrote…
Actually, I don't understand why this is manual. Can we please talk about this f2f? |
1abdbf2 to
bf52c9b
Compare
Stavbe
left a comment
There was a problem hiding this comment.
@Stavbe made 4 comments.
Reviewable status: 0 of 27 files reviewed, 6 unresolved discussions (waiting on anatgstarkware).
crates/circuit_air/src/circuit_eval_components/blake_gate.rs line 1 at r9 (raw file):
Previously, anatgstarkware (anatg) wrote…
please remove
Done.
crates/circuit_air/src/circuit_eval_components/subroutines/create_blake_round_input.rs line 1 at r9 (raw file):
Previously, anatgstarkware (anatg) wrote…
Actually, I don't understand why this is manual. Can we please talk about this f2f?
You're right, it can be auto-gen (it wasn't the goal, and I didn't notice the last change because the cursor bot made it possible).
Done
crates/circuit_prover/src/witness/components/blake_gate.rs line 199 at r9 (raw file):
Previously, anatgstarkware (anatg) wrote…
Why did you change this file?
This change: " verify_bitwise_xor_8_state.add_packed_inputs(&inputs, 0);" is because with the enabler, padding rows had enabler = 0 so they contributed nothing to the logup sum — the slice [..n_rows / N_LANES] was used to pass only the real rows to verify_bitwise_xor_8.
Without the enabler, the AIR constraint evaluator includes all rows (including padding) in the logup.
Note that this is a lookup into const-size components and thus it doesn't add any rows.
crates/circuit_prover/src/witness/components/blake_gate.rs line 1962 at r9 (raw file):
.enumerate() .for_each(|(i, (writer, values0, values1))| { let blake_gate_enabler = blake_gate_enabler_col.packed_at(i);
This change is becausecircuit_eval_components/create_blake_round_input.rs, which is inline in blake_gate, was changed to not use the enabler in the lookup to verify_bitwise_xor (const size components - no extra rows). The prover's interaction trace must match what the Verifier's constraint evaluator computes.
8b04e92 to
67a19ea
Compare
anatgstarkware
left a comment
There was a problem hiding this comment.
@anatgstarkware made 1 comment and resolved 6 discussions.
Reviewable status: 0 of 27 files reviewed, all discussions resolved (waiting on Stavbe).
anatgstarkware
left a comment
There was a problem hiding this comment.
@anatgstarkware reviewed 24 files and all commit messages.
Reviewable status: 24 of 27 files reviewed, all discussions resolved (waiting on Stavbe).
anatgstarkware
left a comment
There was a problem hiding this comment.
@anatgstarkware reviewed 3 files.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Stavbe).
67a19ea to
348d51a
Compare
Stavbe
left a comment
There was a problem hiding this comment.
waiting on https://reviewable.io/reviews/starkware-industries/stwo-air-infra/937
@Stavbe made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Stavbe).
348d51a to
8389048
Compare
8389048 to
4539be8
Compare
Stavbe
left a comment
There was a problem hiding this comment.
@Stavbe reviewed 27 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Stavbe).


auto-gen files
manual change
Note
Medium Risk
Touches auto-generated AIR constraint evaluation and prover logup aggregation for Blake-related components; any mismatch can break proving/verification or change constraint soundness. Logic changes are localized but impact cryptographic circuit correctness.
Overview
Updates the auto-generated Blake circuit AIR code to remove
enabler-gating from several subroutine lookups (e.g.,bitwise_xor_num_bits_*,xor_rot_*,create_blake_round_input,triple_sum_32) and adjusts call sites inblake_g,blake_gate, andtriple_xor_32accordingly.Aligns the Rust component evaluators and prover witness generation with this new behavior by using constant
1relation numerators and simplifying theverify_bitwise_xor_8logup pairing incircuit_prover(no longer multiplying by the Blake gate enabler). Sample evaluation constants are regenerated/updated, including renaming the Blake round sample toCIRCUIT_BLAKE_ROUND_SAMPLE_EVAL_RESULTand updating Blake gate expected outputs.Written by Cursor Bugbot for commit 67a19ea. This will update automatically on new commits. Configure here.