Skip to content

commit pi as hash digest#1281

Open
hero78119 wants to merge 6 commits intofeat/pi_observefrom
feat/pi_hash_digest
Open

commit pi as hash digest#1281
hero78119 wants to merge 6 commits intofeat/pi_observefrom
feat/pi_hash_digest

Conversation

@hero78119
Copy link
Copy Markdown
Collaborator

@hero78119 hero78119 commented Mar 27, 2026

This PR migrates public input/output handling from raw public-io memory openings to a digest-based path and unifies PI plumbing across prover/verifier/recursion.

Design rationales

  • Avoids carrying vector-style public-io MLE openings through proving/verifying paths.
  • Reduces PI plumbing complexity and duplicated logic between native verifier and recursion verifier.
  • Makes public output commitment explicit and uniform via digest commitments.

Changes Highlights

  • Commit public IO as a Keccak-256 digest (8 x u32 words) instead of opening raw public-io MLE columns.
  • Add runtime commit APIs in ceno_rt:
    • commit(data: &[u8])
    • commit_digest([u32; 8])
    • CommitCtx for incremental accumulation + finalize.
  • Add PUB_IO_COMMIT syscall support end-to-end:
    • emulator syscall implementation in ceno_emul/src/syscalls/pubio_commit.rs
    • zkVM ecall instruction in ceno_zkvm/src/instructions/riscv/ecall/pubio_commit.rs
    • RV32IM wiring and dispatch updates.
  • Introduce digest limb layout/query path:
    • PUBIO_DIGEST_IDX, PUBIO_DIGEST_U16_LIMBS
    • query_public_io_digest() and PubioCommitLayout.
  • Simplify PI representation:
    • ProofInput.pi replaces pub_io_evals/public-input MLE plumbing
    • remove pi_in_evals, instance_openings, raw_pi_num_variables, and related split/eval paths.
  • Update recursion verifier/binding to consume scalar PI directly and keep transcript order aligned with native verifier.
  • Remove legacy public-io memory region usage from platform/linker init flow (no preloaded pubio segment).

@hero78119 hero78119 marked this pull request as draft March 27, 2026 01:58
- rename ProofInput.pi_evals to pi

- remove pi_in_evals and instance_openings plumbing

- drop recursion mles/raw_pi_num_variables fields and keep scalar PI conversion path
@hero78119 hero78119 marked this pull request as ready for review March 27, 2026 09:08
@hero78119 hero78119 force-pushed the feat/pi_hash_digest branch from fe0b9e1 to 0f499a1 Compare March 27, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant