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

Feat/skip fixed commit of range table #797

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

10to4
Copy link
Collaborator

@10to4 10to4 commented Dec 30, 2024

Work for #789

Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR :) Just would like to raise a preliminary question before goes into the detail

@@ -94,6 +94,10 @@ pub struct ConstraintSystem<E: ExtensionField> {
pub num_fixed: usize,
pub fixed_namespace_map: Vec<String>,

pub num_structural_fixed: usize,
pub structural_fixed_namespace_map: Vec<String>,
pub structural_fixed_len: Vec<usize>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we dont need to define new structural_fixed. Instead we can just reuse current structural_witin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok😆

ceno_zkvm/src/expression.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/utils.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/tables/mod.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/expression.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/circuit_builder.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/tables/range/range_impl.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/tables/range/range_impl.rs Outdated Show resolved Hide resolved
@naure naure mentioned this pull request Jan 2, 2025
Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After latest change, overall LGTM now!

Also verified with benchmark, before/after no significant change on prover througput so it's good to go.

Just pointing out a further improvement

@@ -75,12 +66,19 @@ impl RangeTableConfig {
mlts[*idx as usize] = *mlt;
}

let offset_range = StructuralWitIn {
Copy link
Collaborator

@hero78119 hero78119 Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just indicate some following up improvement: previous it's fixed column, thus fixed column just generate once and cached. Now we save prover key size & no PCS opening anymore on range column, but we need to assign and create same witness polynomial every time. We can improve this by introducing a extra design cache structural witness column for first time and reuse.

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.

3 participants