scroll-tech / ceno

Accelerate Zero-knowledge Virtual Machine by Non-uniform Prover Based on GKR Protocol
Apache License 2.0
62 stars 10 forks source link

enhancement: skip structural `witin` commitment & PCS #654

Open hero78119 opened 3 days ago

hero78119 commented 3 days ago

Purpose

This issue is for further enhancement to skip structural witin commitment & PCS.

Context

In current backend for dynamic non-uniform memory addr witin, it's a well-form MLE, and in lasso we called it structural table https://github.com/scroll-tech/ceno/blob/cec7b82c29f0d06041bf20aec3e3c0932e6643fa/ceno_zkvm/src/tables/ram/ram_impl.rs#L299

As verifier can evaluate structural table succinctly without rely on PCS.

Which also imply we can

For now, we already support verifier directly evaluated it. https://github.com/scroll-tech/ceno/blob/cec7b82c29f0d06041bf20aec3e3c0932e6643fa/ceno_zkvm/src/scheme/verifier.rs#L724-L735 But as its a normal witin, in PCS we still do the commitment, and create/verify its PCS.

Proposed Methodology

One solution is to introduce a new expression type e.g. Structural polynomial type to represent this witin, similar to Expression::Constant or Expression::Fix. With this new type, we can make PCS skip its commitment & evaluation.

Similar idea proposed in https://github.com/scroll-tech/ceno/issues/573

A soundness noted

We need to add "rw_hints_num_vars" https://github.com/scroll-tech/ceno/blob/cec7b82c29f0d06041bf20aec3e3c0932e6643fa/ceno_zkvm/src/scheme.rs#L61 in transcript, as it's kind of circuit shape. An add-on to https://github.com/scroll-tech/ceno/issues/542

matthiasgoergens commented 3 days ago

Thanks for the detailed writeup.