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

Refactor BaseFold test code #552

Merged
merged 20 commits into from
Nov 28, 2024
Merged

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
Collaborator

@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
Collaborator

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
Collaborator

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
Collaborator

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
6 checks passed
@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 <[email protected]>
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