perf(planner): prefer narrower roots within payload slack - #344
perf(planner): prefer narrower roots within payload slack#344markosg04 wants to merge 5 commits into
Conversation
# Conflicts: # crates/akita-config/src/lib.rs # crates/akita-config/tests/runtime_fallback.rs # crates/akita-planner/src/schedule_params.rs # crates/akita-schedules/src/runtime.rs
|
Closing per review feedback (thread with @quangvdao): the payload-slack selection policy comes out of the stack entirely. #345 now reverts the planner, config policy surface, and catalog identity to their main state and keeps only the prover optimizations; the Jolt-side adapter and catalogs are being regenerated at the default min-payload policy. One data point worth keeping for the planner rework: at the 2^28 D128 shape, the rank-3 / P=2^21 schedule proves 15.6% faster with ~4 GiB lower peak RSS and an identical proof payload to the selected rank-4 / P=2^18 schedule — that case is an equal-payload tie-break, not a payload trade. Happy to pick that up as a planner-native tie-break or via the adaptive-dimension candidate sets once #356/#355 settle. |
Summary
The scalar planner currently chooses the smallest proof payload even when a negligible payload difference requires a wider root commitment. This adds an opt-in payload budget: find the minimum-payload candidates, admit candidates within
ceil(min_payload * (1000 + slack_permille) / 1000), then choose the smallest root inner rank and payload. Recursive configurations carry the same budget into direct fallback.The Akita default remains zero; Jolt's adapters use
10(1%). The parameter is included in generated-catalog identity, and every selected candidate still passes the existing SIS, fold-bound, setup-envelope, and schedule checks.Testing
cargo fmt --all --checkpassescargo clippymode passesThe full local nextest suite passes (1,202 tests), schedule regeneration is clean, and all three required Clippy configurations pass with warnings denied.
Security Considerations
This changes schedule selection and catalog identity, not verifier equations or Fiat-Shamir ordering.
Breaking Changes
SelectionPolicyId::MinFirstDirectSetupThenPayloadWithinSupportedEnvelopenow carries its direct-fallback payload slack. Generated catalogs using this policy need regeneration.