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

Include Add<&Self> in SharedValue #1395

Closed

Conversation

andyleiserson
Copy link
Collaborator

This will be required to eliminate Add bounds from the shuffle traits.

This is on top of #1394.

This will be required to eliminate `Add` bounds from the shuffle traits.
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 88.70968% with 42 lines in your changes missing coverage. Please review.

Project coverage is 93.64%. Comparing base (b8a5fd1) to head (e1adf57).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
ipa-core/src/protocol/ipa_prf/shuffle/mod.rs 15.38% 22 Missing ⚠️
ipa-core/src/protocol/context/malicious.rs 0.00% 12 Missing ⚠️
ipa-core/src/ff/curve_points.rs 50.00% 4 Missing ⚠️
ipa-core/src/protocol/ipa_prf/shuffle/malicious.rs 98.27% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1395      +/-   ##
==========================================
- Coverage   93.68%   93.64%   -0.04%     
==========================================
  Files         223      223              
  Lines       37737    37976     +239     
==========================================
+ Hits        35353    35562     +209     
- Misses       2384     2414      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andyleiserson
Copy link
Collaborator Author

andyleiserson commented Nov 1, 2024

We actually don't have to do this, if we believe that Copy is always cheap. Shuffle operates on BooleanArrays, which are SharedValues, which are Copy. (Originally, ShuffleShare only required Sendable + Clone + FromRandom + Add<Output = Self>. That's not sufficient for the malicious shuffle MACs. But we could come up with something less than BooleanArray.)

For the things that we currently shuffle, I think it's reasonable to assume Copy is cheap. But I'm not sure we want to bake that assumption in to the implementation, which otherwise could easily be used to shuffle larger things.

We may also want to remove the implication that BooleanArrays are Copy if we add larger boolean arrays to increase vectorization dimensions for performance.

@andyleiserson
Copy link
Collaborator Author

I don't think we need this. I am going to use a more precise set of bounds for ShuffleShare.

@andyleiserson andyleiserson deleted the ref-arith branch November 1, 2024 18:54
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.

1 participant