Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

no-std fix: patch the std crate #141

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ ark-ff = { git = "https://github.com/arkworks-rs/algebra/" }
ark-ec = { git = "https://github.com/arkworks-rs/algebra/" }
ark-poly = { git = "https://github.com/arkworks-rs/algebra/" }
ark-serialize = { git = "https://github.com/arkworks-rs/algebra/" }
ark-std = { git = "https://github.com/arkworks-rs/std/" }

ark-ed-on-bls12-377 = { git = "https://github.com/arkworks-rs/algebra/" }
ark-ed-on-bls12-381 = { git = "https://github.com/arkworks-rs/algebra/" }
Expand Down
4 changes: 2 additions & 2 deletions crypto-primitives/src/crh/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait CRHScheme {
+ Default
+ CanonicalSerialize
+ CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize + Sync;
Copy link
Member Author

Choose a reason for hiding this comment

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

this seems to be required after patching to include arkworks-rs/std#48.
Now while adding Sync to these types here is innocuous, I'd like to understand how the change in std causes an explicit requirement on Sync here


fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;
fn evaluate<T: Borrow<Self::Input>>(
Expand All @@ -50,7 +50,7 @@ pub trait TwoToOneCRHScheme {
+ Default
+ CanonicalSerialize
+ CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize + Sync;

fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;

Expand Down
5 changes: 4 additions & 1 deletion crypto-primitives/src/merkle_tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ pub trait Config {
+ Default
+ CanonicalSerialize
+ CanonicalDeserialize
+ Send;
+ Send
+ Sync;

// transition between leaf layer to inner layer
type LeafInnerDigestConverter: DigestConverter<
Self::LeafDigest,
Expand All @@ -80,6 +82,7 @@ pub trait Config {
+ CanonicalSerialize
+ CanonicalDeserialize
+ Send
+ Sync
+ Absorb;

// Tom's Note: in the future, if we want different hash function, we can simply add more
Expand Down
Loading