From ea032924bc0a0f20f270afc41dcc32e4b48a2f80 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Tue, 14 May 2019 15:11:49 +0300 Subject: [PATCH] Updated cardano-deps to master Adapted to rust-crypto trait changes, but the network changes are left dangling for this commit. --- Cargo.lock | 14 ++++++++++++++ cardano-deps | 2 +- utils/src/serde.rs | 8 ++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39c021c13b..d3025ac038 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -402,6 +402,7 @@ dependencies = [ "curve25519-dalek 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-bip32 0.1.0", + "ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -689,6 +690,18 @@ dependencies = [ "cryptoxide 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ed25519-dalek" +version = "1.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "clear_on_drop 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "curve25519-dalek 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "either" version = "1.5.2" @@ -3229,6 +3242,7 @@ dependencies = [ "checksum digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f47366984d3ad862010e22c7ce81a7dbcaebbdfb37241a620f8b6596ee135c" "checksum dirs 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum ed25519-dalek 1.0.0-pre.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81956bcf7ef761fb4e1d88de3fa181358a0d26cbcb9755b587a08f9119824b86" "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" diff --git a/cardano-deps b/cardano-deps index 0ac5ac6327..50a648b231 160000 --- a/cardano-deps +++ b/cardano-deps @@ -1 +1 @@ -Subproject commit 0ac5ac6327a648679dd2157592cf6e910125953b +Subproject commit 50a648b231c19d94b77e391cfcf2e5b5bdcf45f6 diff --git a/utils/src/serde.rs b/utils/src/serde.rs index c1a262c303..23bd6fd27e 100644 --- a/utils/src/serde.rs +++ b/utils/src/serde.rs @@ -6,7 +6,7 @@ use chain_crypto::{bech32::Bech32, Ed25519Extended, PublicKey}; use chain_impl_mockchain::leadership::bft::LeaderId; use serde::{ de::{Deserializer, Error as DeserializerError, Visitor}, - ser::{Error as _, Serializer}, + ser::Serializer, Deserialize, Serialize, }; use std::fmt::{self, Display}; @@ -130,12 +130,12 @@ pub mod witness { pub mod crypto { use super::*; use ::bech32::{Bech32 as Bech32Data, FromBase32 as _}; - use chain_crypto::{AsymmetricKey, Blake2b256, PublicKey, SecretKey}; + use chain_crypto::{AsymmetricKey, Blake2b256, PublicKey, SecretKey, SecretKeySizeStatic}; pub fn deserialize_secret<'de, D, A>(deserializer: D) -> Result, D::Error> where D: Deserializer<'de>, - A: AsymmetricKey, + A: SecretKeySizeStatic, { let secret_key_visitor = SecretKeyVisitor::new(); if deserializer.is_human_readable() { @@ -244,7 +244,7 @@ pub mod crypto { impl<'de, A> Visitor<'de> for SecretKeyVisitor where - A: AsymmetricKey, + A: SecretKeySizeStatic, { type Value = SecretKey;