Skip to content

Batched commitment of polys with different sizes on mpcs layer #864

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions mpcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ multilinear_extensions = { path = "../multilinear_extensions" }
num-bigint = "0.4"
num-integer = "0.1"
p3 = { path = "../p3" }
p3-field.workspace = true
p3-goldilocks.workspace = true
plonky2.workspace = true
poseidon.workspace = true
rand.workspace = true
rand_chacha.workspace = true
rayon = { workspace = true, optional = true }
serde.workspace = true
sumcheck = { path = "../sumcheck" }
transcript = { path = "../transcript" }
whir = { path = "../whir", features = ["ceno"] }
witness = { path = "../witness" }
Expand Down
19 changes: 14 additions & 5 deletions mpcs/src/basefold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,10 @@ where
ret
}

fn batch_commit(
fn batch_commit_polys(
pp: &Self::ProverParam,
rmm: witness::RowMajorMatrix<<E as ff_ext::ExtensionField>::BaseField>,
polys: &[DenseMultilinearExtension<E>],
) -> Result<Self::CommitmentWithWitness, Error> {
let polys = rmm.to_mles();
// assumptions
// 1. there must be at least one polynomial
// 2. all polynomials must exist in the same field type
Expand Down Expand Up @@ -1115,8 +1114,7 @@ mod test {
use crate::{
basefold::Basefold,
test_util::{
gen_rand_poly_base, gen_rand_poly_ext, run_batch_commit_open_verify,
run_commit_open_verify, run_simple_batch_commit_open_verify,
gen_rand_poly_base, gen_rand_poly_ext, run_batch_commit_open_verify, run_commit_open_verify, run_diff_size_batch_commit_open_verify, run_simple_batch_commit_open_verify
},
};

Expand Down Expand Up @@ -1216,4 +1214,15 @@ mod test {
);
}
}

#[test]
fn batch_commit_diff_size_open_verify() {
let gen_rand_poly = gen_rand_poly_base;
run_diff_size_batch_commit_open_verify::<GoldilocksExt2, PcsGoldilocksBaseCode>(
gen_rand_poly,
20,
3,
5,
);
}
}
Loading
Loading