Skip to content

feat(circuit_params): build the leaf circuit from a real program#409

Open
ilyalesokhin-starkware wants to merge 1 commit into
ilya/leaf-registry-paddingfrom
ilya/circuit-params-program
Open

feat(circuit_params): build the leaf circuit from a real program#409
ilyalesokhin-starkware wants to merge 1 commit into
ilya/leaf-registry-paddingfrom
ilya/circuit-params-program

Conversation

@ilyalesokhin-starkware

@ilyalesokhin-starkware ilyalesokhin-starkware commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

This change is Reviewable

Add a required `--program` argument (a compiled Cairo program JSON) baked into the leaf verifier circuit, replacing the fixed 128-cell dummy. The program shapes the circuit's topology, so accurate component sizes need the real (typically bootloader) program.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Developer tooling and CLI contract change only; no runtime prover/verifier paths, though registry and size reports now depend on the chosen program.

Overview
circuit-params now requires --program (path to compiled Cairo JSON). The leaf verifier circuit topology is built from that program’s memory segment (M31 limbs), matching how leaf_prover encodes program_felts, instead of a fixed 128-word zero placeholder.

The loaded program is threaded through all leaf and multiverifier sizing paths (human-readable report and --registry JSON). CLI tests pass a bundled opcode test program JSON.

Breaking: callers of the circuit-params binary must supply --program; reported component sizes and preprocessed roots can change versus the old dummy program.

Reviewed by Cursor Bugbot for commit 5c06866. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant