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

[zk-sdk] Add range_proof module #1091

Merged
merged 5 commits into from
May 2, 2024

Conversation

samkim-crypto
Copy link

@samkim-crypto samkim-crypto commented Apr 27, 2024

Summary of Changes

This is a follow-up to #1065, which migrates the range_proof module from the zk-token-sdk into zk-sdk.

Everything from the range proof module seemed to be fine and so it is copied verbatim, with the exception of allow(dead_code) to prevent ci from complaining, and a minor update to comments.

@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2024

Codecov Report

Attention: Patch coverage is 86.42746% with 87 lines in your changes are missing coverage. Please review.

Project coverage is 82.1%. Comparing base (12d009e) to head (b032a38).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1091    +/-   ##
========================================
  Coverage    82.1%    82.1%            
========================================
  Files         881      886     +5     
  Lines      235742   236383   +641     
========================================
+ Hits       193677   194244   +567     
- Misses      42065    42139    +74     

@samkim-crypto samkim-crypto marked this pull request as ready for review April 29, 2024 02:10
@samkim-crypto samkim-crypto requested a review from joncinque May 1, 2024 00:14
Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Just a couple of comments, but the rest looks great!

#[cfg(not(target_os = "solana"))]
const MAX_GENERATOR_LENGTH: usize = u32::MAX as usize;

Choose a reason for hiding this comment

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

Is this meant to have the #[cfg(...)] here? It's used later in code that's not gated with the same cfg

Copy link
Author

Choose a reason for hiding this comment

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

Oh yes, the entire generators module is included in #[cfg(...)]`, so this is actually not needed. It seems like this is a relic of the past before some of the refactoring was done... I removed it. Thanks!


#[allow(non_snake_case)]
#[derive(Clone)]
pub struct BulletproofGens {

Choose a reason for hiding this comment

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

I thought Bulletproof would get changed to RangeProof, is that not the case?

Copy link
Author

@samkim-crypto samkim-crypto May 2, 2024

Choose a reason for hiding this comment

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

Oh wait, this is the bulletproofs generators. Yes, those should be changed 🙏

@samkim-crypto samkim-crypto merged commit 69064c1 into anza-xyz:master May 2, 2024
38 checks passed
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