diff --git a/Cargo.lock b/Cargo.lock index 52628910..272b417d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1459,8 +1459,9 @@ dependencies = [ [[package]] name = "redjubjub" -version = "0.1.1" -source = "git+https://github.com/ZcashFoundation/redjubjub.git?branch=main#ba256655ddf84dac7ea6281a1b398495e46d232a" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9717635678eabb203f6806561c7aa976610a9f6f0bfaadf1ca14dca35957741" dependencies = [ "blake2b_simd", "byteorder", @@ -1471,19 +1472,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "redjubjub" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05af26cd84133b56adf15179b564320ace234fa926b7a8c5fa8e391ffb65359f" -dependencies = [ - "blake2b_simd", - "jubjub", - "rand_core 0.5.1", - "serde", - "thiserror", -] - [[package]] name = "redox_syscall" version = "0.1.56" @@ -2385,7 +2373,7 @@ dependencies = [ "proptest", "proptest-derive", "rand_core 0.5.1", - "redjubjub 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redjubjub", "ripemd160", "secp256k1", "serde", @@ -2409,7 +2397,7 @@ dependencies = [ "futures", "futures-util", "rand 0.7.3", - "redjubjub 0.1.1 (git+https://github.com/ZcashFoundation/redjubjub.git?branch=main)", + "redjubjub", "spandoc", "tokio", "tower", diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index 28ab1838..337e2598 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -28,7 +28,7 @@ x25519-dalek = { version = "0.6", features = ["serde"] } serde-big-array = "0.3.0" # ZF deps ed25519-zebra = "1.0" -redjubjub = "0.1" +redjubjub = "0.2" equihash = { git = "https://github.com/ZcashFoundation/librustzcash.git", branch = "equihash-crate" } displaydoc = "0.1.6" diff --git a/zebra-chain/src/keys/sapling.rs b/zebra-chain/src/keys/sapling.rs index 10371a74..ef803459 100644 --- a/zebra-chain/src/keys/sapling.rs +++ b/zebra-chain/src/keys/sapling.rs @@ -386,13 +386,13 @@ impl PartialEq<[u8; 32]> for OutgoingViewingKey { /// /// [ps]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents #[derive(Copy, Clone, Debug)] -pub struct AuthorizingKey(pub redjubjub::PublicKey); +pub struct AuthorizingKey(pub redjubjub::VerificationKey); impl Eq for AuthorizingKey {} impl From<[u8; 32]> for AuthorizingKey { fn from(bytes: [u8; 32]) -> Self { - Self(redjubjub::PublicKey::try_from(bytes).unwrap()) + Self(redjubjub::VerificationKey::try_from(bytes).unwrap()) } } @@ -404,8 +404,8 @@ impl From for [u8; 32] { impl From for AuthorizingKey { fn from(ask: SpendAuthorizingKey) -> Self { - let sk = redjubjub::SecretKey::::try_from(<[u8; 32]>::from(ask)).unwrap(); - Self(redjubjub::PublicKey::from(&sk)) + let sk = redjubjub::SigningKey::::try_from(<[u8; 32]>::from(ask)).unwrap(); + Self(redjubjub::VerificationKey::from(&sk)) } } diff --git a/zebra-chain/src/transaction/shielded_data.rs b/zebra-chain/src/transaction/shielded_data.rs index f97aac54..9127be91 100644 --- a/zebra-chain/src/transaction/shielded_data.rs +++ b/zebra-chain/src/transaction/shielded_data.rs @@ -20,7 +20,7 @@ pub struct Spend { /// The nullifier of the input note. pub nullifier: crate::nullifier::sapling::Nullifier, /// The randomized public key for `spend_auth_sig`. - pub rk: redjubjub::PublicKeyBytes, + pub rk: redjubjub::VerificationKeyBytes, /// The ZK spend proof. pub zkproof: Groth16Proof, /// A signature authorizing this spend. diff --git a/zebra-chain/src/transaction/tests/arbitrary.rs b/zebra-chain/src/transaction/tests/arbitrary.rs index e988cb0d..beafaaa4 100644 --- a/zebra-chain/src/transaction/tests/arbitrary.rs +++ b/zebra-chain/src/transaction/tests/arbitrary.rs @@ -165,7 +165,7 @@ impl Arbitrary for Spend { anchor, cv: cv_bytes, nullifier: nullifier_bytes, - rk: redjubjub::PublicKeyBytes::from(rpk_bytes), + rk: redjubjub::VerificationKeyBytes::from(rpk_bytes), zkproof: proof, spend_auth_sig: redjubjub::Signature::from({ let mut b = [0u8; 64]; diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 8d469939..22560d5f 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -10,7 +10,7 @@ chrono = "0.4.13" futures = "0.3.5" futures-util = "0.3.5" rand = "0.7" -redjubjub = { git = "https://github.com/ZcashFoundation/redjubjub.git", branch = "main"} +redjubjub = "0.2" tokio = { version = "0.2", features = ["time", "sync", "stream"] } tower = "0.3" tracing = "0.1.16"