Review fixes for #758: dedupe private-input page math, drop leaky serde derives, fix stale CLI README#771
Merged
nicole-graus merged 2 commits intoJul 3, 2026
Conversation
…erde derives, fix stale docs - Extract private_input_page_count / is_private_input_page / private_input_page_bases / max_private_input_pages into tables::page as the single source of truth; the monolithic trace builder, monolithic verifier bound, continuation prover, and continuation verifier all previously re-derived the same wire-format math independently and could drift. - Add PRIVATE_INPUT_LENGTH_PREFIX_BYTES to executor::vm::memory next to the wire-format writer and use it everywhere instead of a bare 4. - Remove the now-unused serde derives from InitClaim/FiniClaim/CellBoundary: nothing serializes them since the bundle dropped EpochProof.boundary, and keeping them off makes re-introducing the value leak a compile error. - Make the verifier-side private-page config explicitly data-free (include_private_genesis flag) instead of a dead init_page_data lookup. - Reject a non-page-aligned touched_page_bases entry as a malformed bundle (new Error::MalformedContinuationBundle) instead of Ok(None), matching the count bound's Err semantics for structural validation of untrusted fields. - Fix bin/cli/README.md, which still claimed the continuation bundle ships the raw private input bytes.
nicole-graus
approved these changes
Jul 3, 2026
b270a1d
into
fix-continuation-private-input-main
18 checks passed
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.
Motivation
Follow-up to the review of #758. Five findings surfaced: one stale doc directly contradicting the PR, duplicated security-critical page math, dead serde derives on the value-carrying boundary types, a dead verifier-side data lookup, and an inconsistent malformed-bundle error signal.
Description
bin/cli/README.md): still claimed the serialized continuation proof includes the raw private input bytes so the verifier can rebuild genesis — the exact behavior Fix(Continuations): Make private input private #758 removes. Rewritten to describe the count-only bundle, with the non-ZK caveat kept (committed columns are still opened at STARK query positions).private_input_page_count,is_private_input_page,private_input_page_bases, andmax_private_input_pagesnow live intables::page, used by the monolithic trace builder, the monolithic verifier bound, and the continuation prover/verifier. Previously the same4 + lenwire-format math was re-derived independently intrace_builder.rs,lib.rs, andcontinuation.rs(kept in lockstep only by comments); a drift would make one path build a private page preprocessed while the other commits it. Also addsPRIVATE_INPUT_LENGTH_PREFIX_BYTEStoexecutor::vm::memorynext to the wire-format writer, replacing the bare4s.InitClaim/FiniClaim/CellBoundary: nothing serializes them since the bundle droppedEpochProof.boundary, andInitClaim.valueis a private-input byte for a private first-read. With the derives gone, re-introducing that leak is a compile error instead of a silent regression.global_memory_configs_from_init_page_datatakes aninclude_private_genesisflag; the verifier passesfalse(its AIR never consultsinit_valuesand its image is ELF-only), removing a dead lookup that could silently start mattering ifwith_private_inputever grew data-dependent logic.touched_page_basesentry is nowErr(Error::MalformedContinuationBundle)instead ofOk(None), matching the count bound'sErr(InvalidTableCounts)— structural validation of untrusted bundle fields is an error,Ok(None)is reserved for well-formed proofs that fail verification. Test updated accordingly.No constraint, statement, or serialization-format changes; behavior is identical except the error variant for hand-crafted non-aligned bundles.
Testing
cargo test -p executor --lib— 27/27cargo test -p lambda-vm-prover private_input— 14/14 (incl. multipage, aftermake compile-programs-asm)cargo test -p lambda-vm-prover -- touched_page_base continuation_global_state local_to_global— 32/32cargo clippy --all-targetsclean on both crates