Skip to content

Commit

Permalink
Merge pull request #43 from EspressoSystems/cl/update-jf
Browse files Browse the repository at this point in the history
chore: update jellyfish dependency
  • Loading branch information
mrain authored May 9, 2024
2 parents 6a2578e + 9d40fc2 commit 569d6a6
Show file tree
Hide file tree
Showing 17 changed files with 113 additions and 282 deletions.
341 changes: 93 additions & 248 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ tokio = { version = "1", default-features = false, features = [
"parking_lot",
"tracing"
] }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish.git", tag = "0.4.2", default-features = false, features = [
"std",
jf-signature = { version = "0.1.0", git = "https://github.com/EspressoSystems/jellyfish.git", tag = "0.4.5", default-features = false, features = [
"std", "bls"
] }
rand = "0.8"
tracing = { version = "0.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion cdn-broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ console-subscriber = "0.2"


[dependencies]
jf-primitives.workspace = true
jf-signature.workspace = true
cdn-proto = { path = "../cdn-proto", default-features = false, features = [
"metrics",
] }
Expand Down
4 changes: 1 addition & 3 deletions cdn-broker/src/binaries/bad-broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ use std::time::Duration;
use cdn_broker::{Broker, Config};
use cdn_proto::{crypto::signature::KeyPair, def::ProductionRunDef, error::Result};
use clap::Parser;
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, SeedableRng};
use tokio::{spawn, time::sleep};
use tracing_subscriber::EnvFilter;
Expand Down
4 changes: 1 addition & 3 deletions cdn-broker/src/binaries/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
use cdn_broker::{Broker, Config};
use cdn_proto::{crypto::signature::KeyPair, def::ProductionRunDef, error::Result};
use clap::Parser;
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, SeedableRng};
use tracing_subscriber::EnvFilter;

Expand Down
2 changes: 1 addition & 1 deletion cdn-broker/src/tasks/user/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl<Def: RunDef> Inner<Def> {
}
}

/// This is the main loop where we deal with user connectins. On exit, the calling function
/// This is the main loop where we deal with user connections. On exit, the calling function
/// should remove the user from the map.
pub async fn user_receive_loop(
self: &Arc<Self>,
Expand Down
4 changes: 1 addition & 3 deletions cdn-broker/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ use cdn_proto::{
discovery::BrokerIdentifier,
message::{Message, Topic},
};
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, RngCore, SeedableRng};
use tokio::spawn;

Expand Down
2 changes: 1 addition & 1 deletion cdn-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ path = "src/binaries/bad-sender.rs"
[dependencies]
tokio = { workspace = true }
async-std = { workspace = true, optional = true }
jf-primitives.workspace = true
jf-signature.workspace = true
cdn-proto = { path = "../cdn-proto", default-features = false }
tracing-subscriber.workspace = true
rand.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions cdn-client/src/binaries/bad-connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ use cdn_proto::{
def::{ProductionClientConnection, TestTopic},
};
use clap::Parser;
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, SeedableRng};
use tokio::time::sleep;
use tracing_subscriber::EnvFilter;
Expand Down
4 changes: 1 addition & 3 deletions cdn-client/src/binaries/bad-sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use cdn_proto::{
def::{ProductionClientConnection, TestTopic},
};
use clap::Parser;
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, SeedableRng};
use tracing::info;
use tracing_subscriber::EnvFilter;
Expand Down
4 changes: 1 addition & 3 deletions cdn-client/src/binaries/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ use cdn_proto::{
message::{Broadcast, Direct, Message},
};
use clap::Parser;
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme};
use rand::{rngs::StdRng, SeedableRng};
use tokio::time::sleep;
use tracing::info;
Expand Down
2 changes: 1 addition & 1 deletion cdn-marshal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name = "marshal"
path = "src/binaries/marshal.rs"

[dependencies]
jf-primitives.workspace = true
jf-signature.workspace = true
cdn-proto = { path = "../cdn-proto", default-features = false, features = [
"metrics",
] }
Expand Down
2 changes: 1 addition & 1 deletion cdn-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ quinn = { version = "0.10", default-features = false, features = [
"tls-rustls",
"runtime-tokio",
] }
jf-primitives.workspace = true
jf-signature.workspace = true
ark-serialize = "0.4"
rand.workspace = true
url = "2"
Expand Down
8 changes: 4 additions & 4 deletions cdn-proto/src/crypto/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use anyhow::Result;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use jf_primitives::signatures::{
use jf_signature::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme as JfSignatureScheme,
};

Expand Down Expand Up @@ -58,7 +58,7 @@ pub struct KeyPair<Scheme: SignatureScheme> {
}

/// An example implementation of `Serializable` for Jellyfish's `bls_over_bn254`.
impl Serializable for jf_primitives::signatures::bls_over_bn254::VerKey {
impl Serializable for jf_signature::bls_over_bn254::VerKey {
/// Serialize `Self` using `ark-serialize` (uncompressed)
///
/// # Errors
Expand All @@ -81,8 +81,8 @@ impl Serializable for jf_primitives::signatures::bls_over_bn254::VerKey {
/// An example implementation of `SignatureScheme` for Jellyfish's `bls_over_bn254` signature scheme.
impl SignatureScheme for BLS {
/// The private and public key types
type PrivateKey = jf_primitives::signatures::bls_over_bn254::SignKey;
type PublicKey = jf_primitives::signatures::bls_over_bn254::VerKey;
type PrivateKey = jf_signature::bls_over_bn254::SignKey;
type PublicKey = jf_signature::bls_over_bn254::VerKey;

/// Sign using the private key and the message. We have to serialize the signature
/// so we can return it as a `Vec<u8>`.
Expand Down
2 changes: 1 addition & 1 deletion cdn-proto/src/def.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Compile-time run configuration for all CDN components.

use jf_primitives::signatures::bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS;
use jf_signature::bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS;
use num_enum::{IntoPrimitive, TryFromPrimitive};

use crate::connection::middleware::{
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ cdn-broker.path = "../cdn-broker"
cdn-proto.path = "../cdn-proto"
cdn-marshal.path = "../cdn-marshal"
rand.workspace = true
jf-primitives.workspace = true
jf-signature.workspace = true
4 changes: 1 addition & 3 deletions tests/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use cdn_proto::{
discovery::{embedded::Embedded, BrokerIdentifier, DiscoveryClient},
message::Topic,
};
use jf_primitives::signatures::{
bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme as _,
};
use jf_signature::{bls_over_bn254::BLSOverBN254CurveSignatureScheme as BLS, SignatureScheme as _};
use rand::RngCore;
use rand::{rngs::StdRng, SeedableRng};
use tokio::spawn;
Expand Down

0 comments on commit 569d6a6

Please sign in to comment.