feat(leaf_prover): pad and validate the leaf circuit against the registry#407
feat(leaf_prover): pad and validate the leaf circuit against the registry#407ilyalesokhin-starkware wants to merge 1 commit into
Conversation
PR SummaryMedium Risk Overview The CLI gains
Reviewed by Cursor Bugbot for commit 52e86fa. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
an alternative to #406 |
…stry Pad the leaf verifier circuit to a target read from a circuit registry rather than a hardcoded constant, and validate the result against the registry. `prove_leaf` takes a `&CircuitRegistry`: it looks up the leaf verifier for the verified Cairo proof's (trace_log_size, log_blowup_factor), pads the verifier circuit to that entry's config component sizes, and after proving asserts the circuit's preprocessed root equals the entry's root. A leaf not listed in the registry (or whose root differs) is rejected. The `leaf-prover` binary gains a required `--circuit-registry-json` argument. Adds `CircuitRegistry::leaf_verifier` / `config_pad_target`, the `LogSizes -> ComponentSizes` conversion and `RootHex::to_le_bytes` to `circuit-registry`, plus a fast fixture test; the slow e2e `cli_test` passes a registry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9a6569d to
5b7057f
Compare
7efc4c4 to
52e86fa
Compare

Type
Description
Breaking changes?
This change is