Scaffold circuit_unpacker crate#356
Conversation
PR SummaryLow Risk Overview This change is scaffolding only: extensive module docs, Reviewed by Cursor Bugbot for commit 507d8f1. Bugbot is set up for automated code reviews on this repo. Configure here. |
742604d to
f735838
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #356 +/- ##
==========================================
+ Coverage 59.19% 59.39% +0.20%
==========================================
Files 35 36 +1
Lines 5303 5330 +27
==========================================
+ Hits 3139 3166 +27
Misses 2164 2164
🚀 New features to boost your workflow:
|
d33764b to
951f194
Compare
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.
Reviewed by Cursor Bugbot for commit 951f194. Configure here.
| // TODO: implement the Blake-binding tree walk. Returns one `Vec<Var>` per real leaf, in tree | ||
| // position order. | ||
| Vec::new() | ||
| } |
There was a problem hiding this comment.
Stub silently returns empty Vec instead of panicking
Medium Severity
run_unpacker returns Vec::new() instead of calling todo!(). The PR description explicitly states this function has a "todo!() body," but the actual implementation silently returns an empty vector. Any caller (including future integration tests or downstream crates) will receive an empty result without any runtime indication that the function is unimplemented, potentially masking real bugs. The documented soundness contract in the docstring is quietly violated rather than loudly failing.
Reviewed by Cursor Bugbot for commit 951f194. Configure here.
951f194 to
507d8f1
Compare


Summary
New
circuit_unpackercrate atcrates/circuit_unpacker/, added to the workspacemembers. This is the circuits-DSL analogue of the Cairo unpacker bootloader (BLAKE_UNPACKINGmode): it walks a statically-shaped perfect-binary-tree recursion ofcircuit_verifierproofs and emits each real leaf's outputs.This PR is scaffolding only — documented public API with a
todo!()body:UnpackerHints— prover-supplied per-real-leaf outputs; derives tree shape fromleaf_outputs.len().DUMMY_LEAF_MARKER(0xDEAD) anddummy_leaf_output()— canonical padding for non-power-of-twoN.run_unpacker()— entry point,todo!()for now.Tree shape is a complete perfect binary tree fixed by
N; right-aligned slots are dummies. Non_subtasks/sizeheaders in preimages — positions are compile-time-known.This change is