Repository navigation
pcs: restrict the stacked opening to callers that bind its claims - #609
Merged
kevaundray merged 2 commits intoOct 12, 2026
Merged
kevaundray merged 2 commits into
kevaundray merged 2 commits into
Conversation
`CommittedStack::open` and `StackCommitment::verify` observe none of their claims, so a caller must bind every value and point into the transcript (or the public statement) before the opening draws its challenges. Rust cannot limit a public method to one dependent crate, so the workspace `clippy.toml` lists both as `disallowed-methods`: a call passes `clippyall` only under an `#[expect(clippy::disallowed_methods, reason = ...)]` that says where its claims are bound. The annotated callers are leanvm's `Committed::open` and `Commitment::verify` (their callers bind), `class_batch` (flock's reduction binds its claim), and pcs's own tests (fixed, public statements). The throughput bench now binds the root and its claims' values before opening, outside the timed region. No protocol change: proofs are byte-identical.
Benchmarks: base against this PR, on one runner7f62d8d merged into its base, against the base d3c7f9d: each benchmark run in turns on one runner, base and PR 5 times each. A size is shown when it changed; a time or a peak memory when it moved the same way in every round and its median by at least 1% (the change is the median ratio, with the rounds' range). Threads shows the named configuration; leanSPHINCSProver stages
leanXMSS
Prover stages
Every resultBLAKE2s
Prover stages
Fibonacci
Prover stages
Field and transpose kernels
Flock
PCS
leanSPHINCS
Prover stages
leanXMSS
Prover stages
|
…to kw/pcs-restrict-stack-api # Conflicts: # AGENTS.md # crates/pcs/benches/throughput.rs
This was referenced Oct 12, 2026
kevaundray
added a commit
to kevaundray/leanVM
that referenced
this pull request
Oct 12, 2026
…bsent places, leanEthereum#609 stacked-opening lint) Tree session leanvm-tree-16 and LVMT 19, above upstream's. leanEthereum#627's pinned-heights tests take this branch's PerRecTable heights (STEP and LINK absent) and pin the session tags as this branch derives them (they name the leaf family).
This was referenced Oct 12, 2026
kevaundray
added a commit
to kevaundray/leanVM
that referenced
this pull request
Oct 12, 2026
…clean-circuits-adder-20261010
kevaundray
added a commit
to kevaundray/leanVM
that referenced
this pull request
Oct 12, 2026
…claim-trees-per-program
kevaundray
added a commit
to kevaundray/leanVM
that referenced
this pull request
Oct 12, 2026
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pcs::stack::CommittedStack::openandStackCommitment::verifyobserve none of their claims. They are sound only if the caller has already bound every claim before the batching challenges are drawn: each value a prover message or part of the instance, each point an earlier challenge or public. Every production caller does this, but both methods were plainpub, so any workspace crate (benches, tests, future code) could call them on an unbound statement.Before: any crate depending on
pcscould call the opening and its verifier directly, with only a doc line stating the precondition.Now: the workspace
clippy.tomllists both methods asdisallowed-methods, soclippyall(and CI) refuses any call that is not under#[expect(clippy::disallowed_methods, reason = "...")], and each reason says where that caller's claims are bound. Rust visibility cannot expose a method to one dependent crate only (and moving the stack intoleanvmwould make the rawerwhir::prove/verifypublic), so the lint is the restriction. Annotated callers:leanvm'spcs::Committed::openandpcs::Commitment::verify(crate-private): their callers,cpu::Program::prove_witness,cpu::Layout::verify_coreand the recursion'sCircuit::prove_withandTableArgument::verify_core, send or read each value as a prover message, or take it from the instance, before the opening,class_batch: its one claim is flock's, whose slicesreduction::prove/verifysend/read as prover messages after the root,The throughput bench now sends the root and its claims' values as prover messages before opening, outside the timed region. The precondition is in both methods' docs and in AGENTS.md. Merged with
riscv-explorationafter #607 (the spongefish-style transcript) and #608; #607 added no new caller of either method, and the reasons name itsprover_message/ instance API.Behavior and proofs are unchanged: no protocol or version change, and leanXMSS leaf, first-level and node proofs are byte-identical to
riscv-exploration.Draft #600 and #606 call into the same API and will need the same
#[expect]annotation, with a reason, at their callers once rebased onto this.