Skip to content

Conversation

@yczhangsjtu
Copy link
Collaborator

@yczhangsjtu yczhangsjtu commented Nov 5, 2024

Extracting small PR from #294

Refactor the test code in mpcs/src/lib.rs. Define some utility functions to simplify the tests.

Also merged the test functions in mpcs/src/basefold.rs.

Copy link
Contributor

@matthiasgoergens matthiasgoergens left a comment

Choose a reason for hiding this comment

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

Looks ok in general, but please have a look at my comments. Thanks!

// Both challenge and poly are over base field
run_batch_commit_open_verify::<GoldilocksExt2, PcsGoldilocksRSCode>(true, 10, 11);
fn commit_open_verify_goldilocks() {
for base in [true, false].into_iter() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Small cosmetic suggestion:

Suggested change
for base in [true, false].into_iter() {
for base in [true, false] {

(Similar for the other loops, too.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yczhangsjtu good suggestion to pick


pub fn gen_rand_poly<E: ExtensionField>(
num_vars: usize,
base: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't we have a PR where we moved away from using booleans here (and in similar situations)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I guess that's happening in the follow up PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yczhangsjtu feel free either to resolve coversation (so i can merge) or change some code.

@yczhangsjtu yczhangsjtu enabled auto-merge (squash) November 28, 2024 05:26
@yczhangsjtu yczhangsjtu merged commit 304b2ae into master Nov 28, 2024
@yczhangsjtu yczhangsjtu deleted the feat/basefold-refactor-extract-0 branch November 28, 2024 05:44
yczhangsjtu added a commit that referenced this pull request Nov 28, 2024
Extracting small PR from #294.

The two benchmarks `benches_commit_verify_rs` and
`benches_commit_verify_basecode` are similar, differing only in the
choice of parameter. Merge them into one benchmark file.

Also simplify the codes using the test utility functions introduced in
#552

Waiting for #552 to merge.

---------

Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
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.

4 participants