Skip to content

Chunking#89

Open
swasilyev wants to merge 10 commits into
circuitfrom
chunking
Open

Chunking#89
swasilyev wants to merge 10 commits into
circuitfrom
chunking

Conversation

@swasilyev
Copy link
Copy Markdown
Contributor

No description provided.

@swasilyev swasilyev requested a review from davxy May 31, 2026 22:12
Copy link
Copy Markdown
Member

@davxy davxy left a comment

Choose a reason for hiding this comment

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

Few nits to fix no-std build

Comment on lines +40 to +44
println!(
"Chunking deg {} polynomial into {} chunks",
q_deg,
q_chunks.len()
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
println!(
"Chunking deg {} polynomial into {} chunks",
q_deg,
q_chunks.len()
);

use ark_poly::Evaluations;
use ark_poly::Polynomial;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::vec::Vec;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
use ark_std::vec::Vec;
use ark_std::{vec, vec::Vec};

@@ -0,0 +1,39 @@
use ark_ff::{Field, PrimeField};
use ark_poly::univariate::DensePolynomial;
use ark_poly::DenseUVPolynomial;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
use ark_poly::DenseUVPolynomial;
use ark_poly::DenseUVPolynomial;
use ark_std::vec::Vec;

Comment thread pasta-tree/src/prover.rs
let mut bfs = Vec::with_capacity(witness.len() * n_polys);
// per tree level
let n_columns = P::VerifierCircuit::N_COLUMNS;
let n_to_commit = n_columns + 4; // plus the quotient chunks
Copy link
Copy Markdown
Member

@davxy davxy Jun 1, 2026

Choose a reason for hiding this comment

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

IIUC 4 is the number of chunks the commitment quotient is split into for Pasta.
Nit: what about defining a global constant instead of a magic number?
something like: pub const MAX_QUOTIENT_CHUNKS = 4 in the pasta-tree/src/lib.rs?

For what concerns KZG commitment, we stick to 1 chunk, correct?
I.e. we're using the ProverPiop::quotient() default implementation. If so, AFAICT the proof remains backward compat?

Comment thread pasta-tree/src/lib.rs
Comment on lines +281 to +300
// let (log_n, h) = (9, 2);
// println!("n = {}, height = {h}, TALL", 1 << log_n);
// _test_proof::<
// ark_pallas::Projective,
// ark_vesta::Projective,
// CircuitParamsTall<ark_vesta::Affine>,
// CircuitParamsTall<ark_pallas::Affine>,
// >(log_n, h);
// println!();

// let (log_n, h) = (10, 2);
// println!("n = {}, height = {h}, TALL", 1 << log_n);
// _test_proof::<
// ark_pallas::Projective,
// ark_vesta::Projective,
// CircuitParamsTall<ark_vesta::Affine>,
// CircuitParamsTall<ark_pallas::Affine>,
// >(log_n, h);
// println!();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// let (log_n, h) = (9, 2);
// println!("n = {}, height = {h}, TALL", 1 << log_n);
// _test_proof::<
// ark_pallas::Projective,
// ark_vesta::Projective,
// CircuitParamsTall<ark_vesta::Affine>,
// CircuitParamsTall<ark_pallas::Affine>,
// >(log_n, h);
// println!();
// let (log_n, h) = (10, 2);
// println!("n = {}, height = {h}, TALL", 1 << log_n);
// _test_proof::<
// ark_pallas::Projective,
// ark_vesta::Projective,
// CircuitParamsTall<ark_vesta::Affine>,
// CircuitParamsTall<ark_pallas::Affine>,
// >(log_n, h);
// println!();

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.

2 participants