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: add membership check #444

Merged
merged 2 commits into from
Jan 15, 2025
Merged

feat: add membership check #444

merged 2 commits into from
Jan 15, 2025

Conversation

iajoiner
Copy link
Contributor

@iajoiner iajoiner commented Dec 18, 2024

Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.

Please go through the following checklist

Rationale for this change

The membership check gadget is a crucial component of joins. Hence we need to add it.

What changes are included in this PR?

  • add membership check gadget and a related test.

Are these changes tested?

Yes.

@iajoiner iajoiner force-pushed the feat/subset branch 9 times, most recently from afda721 to fb13f72 Compare December 22, 2024 03:51
@iajoiner iajoiner force-pushed the feat/subset branch 6 times, most recently from 72a4eaf to cfa7a3c Compare January 6, 2025 22:01
@iajoiner iajoiner requested a review from JayWhite2357 January 6, 2025 22:01
@iajoiner iajoiner force-pushed the feat/subset branch 2 times, most recently from dbff583 to 9908847 Compare January 6, 2025 22:06
@iajoiner iajoiner marked this pull request as ready for review January 6, 2025 22:07
Cargo.toml Outdated Show resolved Hide resolved
@iajoiner iajoiner force-pushed the feat/subset branch 5 times, most recently from a4e87a5 to 5ff2063 Compare January 8, 2025 14:52
@iajoiner iajoiner force-pushed the feat/subset branch 6 times, most recently from d7c477b to e7047a8 Compare January 14, 2025 19:44
@iajoiner iajoiner requested a review from JayWhite2357 January 14, 2025 19:44
@iajoiner iajoiner force-pushed the feat/subset branch 3 times, most recently from ec3558e to 92252bd Compare January 14, 2025 21:01
@iajoiner iajoiner enabled auto-merge January 14, 2025 21:02
@iajoiner iajoiner force-pushed the feat/subset branch 3 times, most recently from 2186ee5 to 99d5ac8 Compare January 14, 2025 21:10
Comment on lines 18 to 23
multiplicities: &[usize],
alloc: &'a Bump,
) {
let casted_multiplicities: Vec<i128> = multiplicities.iter().map(|&x| x as i128).collect();
let alloc_multiplicities = alloc.alloc_slice_copy(casted_multiplicities.as_slice());
builder.produce_intermediate_mle(alloc_multiplicities as &[_]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
multiplicities: &[usize],
alloc: &'a Bump,
) {
let casted_multiplicities: Vec<i128> = multiplicities.iter().map(|&x| x as i128).collect();
let alloc_multiplicities = alloc.alloc_slice_copy(casted_multiplicities.as_slice());
builder.produce_intermediate_mle(alloc_multiplicities as &[_]);
multiplicities: &'a [u64],
) {
builder.produce_intermediate_mle(multiplicities);

Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing in final_round_evaluate_membership_check as well.

Comment on lines 45 to 46
let input_ones = alloc.alloc_slice_fill_copy(num_rows, true);
let candidate_ones = alloc.alloc_slice_fill_copy(candidate_num_rows, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Making these parameters allows them to be reused, which is likely, saving memory and sumcheck perf.

@iajoiner iajoiner requested a review from JayWhite2357 January 15, 2025 05:40
@iajoiner iajoiner force-pushed the feat/subset branch 3 times, most recently from 5b96478 to 0e8faaf Compare January 15, 2025 06:51
@iajoiner iajoiner merged commit d7b3643 into main Jan 15, 2025
11 checks passed
Copy link

🎉 This PR is included in version 0.66.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants