Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: skip structural witin commitment & PCS #654

Open
hero78119 opened this issue Nov 29, 2024 · 1 comment
Open

enhancement: skip structural witin commitment & PCS #654

hero78119 opened this issue Nov 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request protocol

Comments

@hero78119
Copy link
Collaborator

hero78119 commented Nov 29, 2024

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

let addr = cb.create_witin(|| "addr");

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.

SetTableAddrType::DynamicAddr(spec) => {
let expected_eval = eval_wellform_address_vec(
spec.offset as u64,
WORD_SIZE as u64,
&input_opening_point,
);
if expected_eval != proof.wits_in_evals[spec.addr_witin_id] {
return Err(ZKVMError::VerifyError(
"dynamic addr evaluate != expected_evals".into(),
));
}
}

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 #573

A soundness noted

We need to add "rw_hints_num_vars"

pub rw_hints_num_vars: Vec<usize>,
in transcript, as it's kind of circuit shape.
An add-on to #542

@hero78119 hero78119 changed the title optimisation: skip structural witin commitment optimisation: skip structural witin commitment & PCS Nov 29, 2024
@hero78119 hero78119 added the enhancement New feature or request label Nov 29, 2024
@hero78119 hero78119 changed the title optimisation: skip structural witin commitment & PCS enhancement: skip structural witin commitment & PCS Nov 29, 2024
@hero78119 hero78119 assigned hero78119 and unassigned hero78119 Nov 29, 2024
@matthiasgoergens
Copy link
Collaborator

Thanks for the detailed writeup.

10to4 added a commit to 10to4/ceno that referenced this issue Dec 10, 2024
10to4 added a commit to 10to4/ceno that referenced this issue Dec 10, 2024
10to4 added a commit to 10to4/ceno that referenced this issue Dec 12, 2024
- Add check for structural witnesses
10to4 added a commit to 10to4/ceno that referenced this issue Dec 12, 2024
10to4 added a commit to 10to4/ceno that referenced this issue Dec 12, 2024
- Modify create_structural_witin() & create_witin() to improve readability
10to4 added a commit to 10to4/ceno that referenced this issue Dec 16, 2024
-  Remove SetTableAddrType
-  Add  more meta information in StructuralWitIn
-  Remove from_expr
10to4 added a commit to 10to4/ceno that referenced this issue Dec 20, 2024
10to4 added a commit to 10to4/ceno that referenced this issue Dec 23, 2024
- StructuralWitIn: Addr -> u32
- Combine witness RowMajorMatrix and structural witness RowMajorMatrix
10to4 added a commit to 10to4/ceno that referenced this issue Dec 23, 2024
Modify annotations for StructuralWitIn
10to4 added a commit to 10to4/ceno that referenced this issue Dec 24, 2024
10to4 added a commit to 10to4/ceno that referenced this issue Dec 24, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 26, 2024
Work for #654

---------

Co-authored-by: sm.wu <[email protected]>
Co-authored-by: Matthias Görgens <[email protected]>
Co-authored-by: Ho <[email protected]>
Co-authored-by: mcalancea <[email protected]>
Co-authored-by: noelwei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request protocol
Projects
None yet
Development

No branches or pull requests

3 participants