Skip to content

Commit

Permalink
cargo test in the crate root fails without this
Browse files Browse the repository at this point in the history
It worked in the individual crates before this, not sure why.
I bet this is due to ark_std::io being either std::io or the fork of it.

Awful lot of stupid shit in Rust is due to std::io not being core::io,
which afaik happens because of the missguided effort to add backtraces
everywhere.
  • Loading branch information
¨Jeff committed Aug 31, 2023
1 parent 9f0c655 commit 48b8507
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dleq_vrf/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ fn master() {

let mut buf = Vec::new();
sig_pedersen.serialize_compressed(&mut buf).unwrap();
let sig_pedersen = Signature::deserialize_compressed(buf.as_ref()).unwrap();
let sig_pedersen = Signature::deserialize_compressed::<&[u8]>(buf.as_slice()).unwrap();

buf.clear();
sig_thin.serialize_compressed(&mut buf).unwrap();
let sig_thin = Signature::deserialize_compressed(buf.as_ref()).unwrap();
let sig_thin = Signature::deserialize_compressed::<&[u8]>(buf.as_slice()).unwrap();

buf.clear();
sk.as_publickey().serialize_compressed(&mut buf).unwrap();
let pk = crate::PublicKey::deserialize_compressed(buf.as_ref()).unwrap();
let pk = crate::PublicKey::deserialize_compressed::<&[u8]>(buf.as_slice()).unwrap();
assert!( *sig_pedersen.as_key_commitment() == flavor.compute_blinded_publickey(&pk,&secret_blinding) );

let t = Transcript::new_labeled(b"AD1");
Expand Down
5 changes: 3 additions & 2 deletions nugget_bls/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn single() {
let mut buf = Vec::new();
let pk0 = sk.create_nugget_public();
pk0.serialize_compressed(&mut buf).unwrap();
let pk = AggregationKey::deserialize_compressed(buf.as_ref()).unwrap();
let pk = AggregationKey::deserialize_compressed::<&[u8]>(buf.as_slice()).unwrap();
assert_eq!(pk0,pk);
pk.validate_nugget_public().unwrap();
assert_eq!(sk.to_g1_publickey(), pk.to_g1_publickey());
Expand All @@ -29,7 +29,7 @@ fn single() {

buf.clear();
signature.serialize_compressed(&mut buf).unwrap();
let signature = Signature::deserialize_compressed(buf.as_ref()).unwrap();
let signature = Signature::deserialize_compressed::<&[u8]>(buf.as_slice()).unwrap();

let t = Transcript::new_labeled(b"AD1");
let msg = Message { domain, message };
Expand All @@ -56,3 +56,4 @@ fn aggregation() {
assert_eq!(g1pks0, g1pks);
agg.verify_by_pks(input,g1pks.iter()).unwrap();
}

0 comments on commit 48b8507

Please sign in to comment.