Ohadn/verify program builtin deployment#1702
Ohadn/verify program builtin deployment#1702ohad-nir-starkware wants to merge 2 commits intoohadn/program_segment-as-pptfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
|
||
| pub const PROGRAM_N_COLUMNS: usize = FELT252_N_WORDS; | ||
|
|
||
| const DEFAULT_PROGRAM_LOG_LEN: usize = 8; |
There was a problem hiding this comment.
Verifier program column log_size mismatch causes verification failure
High Severity
DEFAULT_PROGRAM_LOG_LEN is 8, but program_component::LOG_SIZE is 12. The verifier's new_with_program_for_verifier doesn't call set_program_table, so ProgramColumn::new reads the default PROGRAM_TABLE (size 1 << 8 = 256), producing columns with log_size = 8. The prover creates columns matching the actual program size (expected to be log_size = 12). This causes a mismatch in log_sizes[PREPROCESSED_TRACE_IDX] and column ordering (sorted by log_size), breaking commitment scheme verification.
Additional Locations (1)
b61227e to
e1bd879
Compare
cd8b1b5 to
c3afbc7
Compare
c3afbc7 to
e908d2d
Compare
b98167c to
c1f44f6
Compare
c1f44f6 to
89efde0
Compare
e908d2d to
339127a
Compare
87fe062 to
2406cde
Compare


Note
Medium Risk
Introduces new AIR components and witness generation paths for
verify_program, affecting proof generation/verification and preprocessed trace usage; failures would surface as invalid proofs or mismatched traces.Overview
Adds end-to-end support for a new
verify_programbuiltin that attests to the program segment using preprocessed program columns.The adapter now derives and injects a
verify_programmemory segment (coveringinitial_pc..initial_ap-2) intoBuiltinSegments, and the AIR/prover pipelines are extended with newprogram_componentandverify_programclaims, components, witness generators, fast-deduction logic, and CASM registry entries.Enables the builtin only when the preprocessed trace contains
curr_program_*columns, updates regression expected values/test data, and adds a prove/verify test that exercises paddedverify_programin the all-components layout.Written by Cursor Bugbot for commit 89efde0. This will update automatically on new commits. Configure here.
This change is