Conversation
Replace the `hachi_root_commitment_layout` fallback in the default `commitment_layout` impl with a direct call to the new `planner::compute_root_layout_dimensions`, which derives the root layout from SIS security tables and digit math. Also compute the commit layout directly via `hachi_batched_root_layout` instead of extracting it from `HachiRootRuntimePlan`. Made-with: Cursor
Extend `commitment_layout` to accept `num_claims` so the planner can optimize the (m_vars, r_vars) split for batched openings using a witness-size cost model with batched fold digits. Simplify `hachi_batched_root_layout` and `root_batched_layout` to delegate layout computation through `commitment_layout`. - Add `compute_num_digits_fold_batched` to planner digit math - Add batched m/r split optimization to planner layout module - Update all callers to pass num_claims (1 for single-poly) - Gate old `optimal_root_batch_split` behind #[cfg(test)] - Ignore 4 blessed schedule tests pending table regeneration Made-with: Cursor
PR SummaryMedium Risk Overview Batched root layout optimization is simplified and centralized. The previous bespoke batched root split search in API plumbing updates across benches/tests and runtime. All call sites are updated to pass Reviewed by Cursor Bugbot for commit 30bf4fc. Bugbot is set up for automated code reviews on this repo. Configure here. |
Benchmark Report
Single Polynomial x 32 Variables
Per-level parameters
Per-level proof-size breakdown
4 Polynomials x 30 Variables
Per-level proof-size breakdown
|
Remove the private copy in commit.rs and import the canonical pub version from planner::digit_math, preventing silent divergence between the planner and runtime scaling paths. Made-with: Cursor
Keep caller-provided root layouts when sizing batched setup envelopes so custom widths are not replaced by planner defaults. Retain planner-derived batched layouts only when the incoming root matches the config's default singleton layout. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 30bf4fc. Configure here.
| let layout = hachi_batched_root_layout::<Cfg, D>( | ||
| num_vars, | ||
| setup.expanded.seed.max_num_batched_polys, | ||
| )?; |
There was a problem hiding this comment.
Redundant layout computation duplicates plan's internal work
Low Severity
hachi_batched_root_layout::<Cfg, D>(num_vars, max_num_batched_polys) is called directly on line 1998, but hachi_root_runtime_plan_with_batch on line 1992 already calls the same function internally to compute root_plan.root_layout. The old code simply read root_plan.root_layout; the new code recomputes the identical value, duplicating schedule-plan lookups and/or planner work. Using root_plan.root_layout directly avoids the redundant computation.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 30bf4fc. Configure here.


WIP