Repository navigation
feat(builder): write circuit-info.json into the artifact dir - #191
Conversation
The parsed `k` / `rows` per circuit went to a hidden `.circuit-info.json` beside the compiled source, merged per directory and keyed by file name. Measurements are build output, not source, so they now land in the contract's own artifact directory beside `compiler/`, one file per contract with the source path recorded inside it. `artifactDir` is the single place the flattened / hierarchical layout is computed, shared by the compile step and the writer.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. WalkthroughThe builder now writes per-contract ChangesArtifact metadata output
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant CompilerService
participant CompactCompiler
participant artifactDir
participant writeCircuitInfo
participant FileSystem
CompilerService->>artifactDir: resolve compilation output directory
CompilerService->>CompactCompiler: compile source into artifact directory
CompactCompiler->>artifactDir: resolve metadata directory
CompactCompiler->>writeCircuitInfo: write source and circuit constraints
writeCircuitInfo->>FileSystem: create directory and replace circuit-info.json
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No verified merge-blocking behavior remains in the changed artifact metadata flow. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit hops through artifacts bright Comment |
Types of changes
Every ZK compile through
CompactCompilernow writes<artifacts>/<Contract>/circuit-info.jsonbeside the compiler'scompiler/contract-info.json, and nothing into the source tree.--skip-zkwrites nothing, as before.Not visible in the diff:
sourcefield removes that.@openzeppelin/compact-builderis unchanged:index.tsnever re-exported the circuit-info helpers. The rename is module-internal.compact-lint fill-constraints --no-compileon the open lint stack; feat(compact-lint): biome output, compact.toml, sections, timings, artifacts #189 carries the matching reader change. compact-contracts has no reader and can drop.circuit-info.jsonfrom its.gitignoreonce this ships..gitignorehere loses the.circuit-info.jsonblock; feat(compact-lint): add the fill-constraints command #185/feat(compact-lint): biome output, compact.toml, sections, timings, artifacts #189 touch the same lines, so whichever lands second takes a one-line conflict.PR Checklist
Summary by CodeRabbit
New Features
circuit-info.jsonfile in each contract’s artifact directory.Documentation
--skip-zkexception.