mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 16:21:39 +00:00
Bump most dependencies (#1268)
* Bump most dependencies This actually builds 😊. * Bump all dependencies Includes the excellent work of @rschulman in #1265. * Remove use of ed25519-dalek fork * Monomorphize more dependencies * Add compatibility hack for rand Cargo allows a crate to depend on multiple versions of another, but `cargo-web` panics in that situation. Use a wrapper crate to work around the panic. * Use @tomaka’s idea for using a newer `rand` instead of my own ugly hack. * Switch to Parity master as its dependency-bumping PR has been merged. * Update some depenendencies again * Remove unwraps and `#[allow(deprecated)]`. * Remove spurious changes to dependencies Bumping minor or patch versions is not needed, and increases likelyhood of merge conflicts. * Remove some redundant Cargo.toml changes * Replace a retry loop with an expect `ed25519::SecretKey::from_bytes` will never fail for 32-byte inputs. * Revert changes that don’t belong in this PR
This commit is contained in:
committed by
Pierre Krieger
parent
eb7b7bd919
commit
979c82040e
@ -32,7 +32,7 @@ libp2p-swarm = { version = "0.2.0", path = "swarm" }
|
||||
libp2p-uds = { version = "0.12.0", path = "transports/uds" }
|
||||
libp2p-wasm-ext = { version = "0.5.0", path = "transports/wasm-ext" }
|
||||
libp2p-yamux = { version = "0.12.0", path = "muxers/yamux" }
|
||||
parking_lot = "0.8"
|
||||
parking_lot = "0.9.0"
|
||||
smallvec = "0.6"
|
||||
tokio-codec = "0.1"
|
||||
tokio-executor = "0.1"
|
||||
@ -48,7 +48,7 @@ libp2p-tcp = { version = "0.12.0", path = "transports/tcp" }
|
||||
libp2p-websocket = { version = "0.12.0", path = "transports/websocket", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.6.0"
|
||||
env_logger = "0.7.1"
|
||||
tokio = "0.1"
|
||||
tokio-stdin-stdout = "0.1"
|
||||
|
||||
|
@ -11,9 +11,9 @@ categories = ["network-programming", "asynchronous"]
|
||||
|
||||
[dependencies]
|
||||
asn1_der = "0.6.1"
|
||||
bs58 = "0.2.0"
|
||||
bs58 = "0.3.0"
|
||||
bytes = "0.4"
|
||||
ed25519-dalek = "1.0.0-pre.1"
|
||||
ed25519-dalek = "1.0.0-pre.2"
|
||||
failure = "0.1"
|
||||
fnv = "1.0"
|
||||
lazy_static = "1.2"
|
||||
@ -22,10 +22,10 @@ multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../misc/m
|
||||
multihash = { package = "parity-multihash", version = "0.1.0", path = "../misc/multihash" }
|
||||
multistream-select = { version = "0.5.0", path = "../misc/multistream-select" }
|
||||
futures = "0.1"
|
||||
parking_lot = "0.8"
|
||||
parking_lot = "0.9.0"
|
||||
protobuf = "2.8"
|
||||
quick-error = "1.2"
|
||||
rand = "0.6"
|
||||
rand = "0.7"
|
||||
rw-stream-sink = { version = "0.1.1", path = "../misc/rw-stream-sink" }
|
||||
libsecp256k1 = { version = "0.3.1", optional = true }
|
||||
sha2 = "0.8.0"
|
||||
@ -38,16 +38,16 @@ void = "1"
|
||||
zeroize = "1"
|
||||
|
||||
[target.'cfg(not(any(target_os = "emscripten", target_os = "unknown")))'.dependencies]
|
||||
ring = { version = "^0.16", features = ["alloc", "std"], default-features = false }
|
||||
untrusted = { version = "0.6" }
|
||||
ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false }
|
||||
untrusted = "0.7.0"
|
||||
|
||||
[dev-dependencies]
|
||||
libp2p-swarm = { version = "0.2.0", path = "../swarm" }
|
||||
libp2p-tcp = { version = "0.12.0", path = "../transports/tcp" }
|
||||
libp2p-mplex = { version = "0.12.0", path = "../muxers/mplex" }
|
||||
libp2p-secio = { version = "0.12.0", path = "../protocols/secio" }
|
||||
rand = "0.6"
|
||||
quickcheck = "0.8"
|
||||
rand = "0.7.2"
|
||||
quickcheck = "0.9.0"
|
||||
tokio = "0.1"
|
||||
wasm-timer = "0.1"
|
||||
assert_matches = "1.3"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
use ed25519_dalek as ed25519;
|
||||
use failure::Fail;
|
||||
use rand::RngCore;
|
||||
use super::error::DecodingError;
|
||||
use zeroize::Zeroize;
|
||||
use core::fmt;
|
||||
@ -32,7 +33,7 @@ pub struct Keypair(ed25519::Keypair);
|
||||
impl Keypair {
|
||||
/// Generate a new Ed25519 keypair.
|
||||
pub fn generate() -> Keypair {
|
||||
Keypair(ed25519::Keypair::generate(&mut rand::thread_rng()))
|
||||
Keypair::from(SecretKey::generate())
|
||||
}
|
||||
|
||||
/// Encode the keypair into a byte array by concatenating the bytes
|
||||
@ -94,9 +95,9 @@ impl From<Keypair> for SecretKey {
|
||||
/// Promote an Ed25519 secret key into a keypair.
|
||||
impl From<SecretKey> for Keypair {
|
||||
fn from(sk: SecretKey) -> Keypair {
|
||||
let secret = sk.0;
|
||||
let secret: ed25519::ExpandedSecretKey = (&sk.0).into();
|
||||
let public = ed25519::PublicKey::from(&secret);
|
||||
Keypair(ed25519::Keypair { secret, public })
|
||||
Keypair(ed25519::Keypair { secret: sk.0, public })
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +152,10 @@ impl fmt::Debug for SecretKey {
|
||||
impl SecretKey {
|
||||
/// Generate a new Ed25519 secret key.
|
||||
pub fn generate() -> SecretKey {
|
||||
SecretKey(ed25519::SecretKey::generate(&mut rand::thread_rng()))
|
||||
let mut bytes = [0u8; 32];
|
||||
rand::thread_rng().fill_bytes(&mut bytes);
|
||||
SecretKey(ed25519::SecretKey::from_bytes(&bytes)
|
||||
.expect("this returns `Err` only if the length is wrong; the length is correct; qed"))
|
||||
}
|
||||
|
||||
/// Create an Ed25519 secret key from a byte slice, zeroing the input on success.
|
||||
|
@ -10,7 +10,7 @@ version = "0.5.0"
|
||||
|
||||
[dependencies]
|
||||
arrayref = "0.3"
|
||||
bs58 = "0.2.0"
|
||||
bs58 = "0.3.0"
|
||||
byteorder = "1.3.1"
|
||||
bytes = "0.4.12"
|
||||
data-encoding = "2.1"
|
||||
@ -22,8 +22,8 @@ url = { version = "2.1.0", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
bincode = "1"
|
||||
bs58 = "0.2.0"
|
||||
bs58 = "0.3.0"
|
||||
data-encoding = "2"
|
||||
quickcheck = "0.8.1"
|
||||
rand = "0.6.5"
|
||||
quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
serde_json = "1.0"
|
||||
|
@ -11,14 +11,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
futures = { version = "0.1" }
|
||||
futures = "0.1"
|
||||
log = "0.4"
|
||||
smallvec = "0.6"
|
||||
tokio-io = "0.1"
|
||||
unsigned-varint = { version = "0.2.2" }
|
||||
unsigned-varint = "0.2.2"
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = "0.1"
|
||||
tokio-tcp = "0.1"
|
||||
quickcheck = "0.8"
|
||||
rand = "0.6"
|
||||
quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
|
@ -16,8 +16,8 @@ tokio-io = "0.1.12"
|
||||
flate2 = { version = "1.0", features = ["tokio"] }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.6"
|
||||
env_logger = "0.7.1"
|
||||
libp2p-tcp = { version = "0.12.0", path = "../../transports/tcp" }
|
||||
quickcheck = "0.8"
|
||||
quickcheck = "0.9.0"
|
||||
tokio = "0.1"
|
||||
log = "0.4"
|
||||
|
@ -10,7 +10,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
|
||||
categories = ["network-programming", "asynchronous"]
|
||||
|
||||
[dependencies]
|
||||
bs58 = "0.2.0"
|
||||
bs58 = "0.3.0"
|
||||
bytes = "0.4"
|
||||
cuckoofilter = "0.3.2"
|
||||
fnv = "1.0"
|
||||
|
@ -10,7 +10,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
|
||||
categories = ["network-programming", "asynchronous"]
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.4.7"
|
||||
arrayvec = "0.5.1"
|
||||
bytes = "0.4"
|
||||
either = "1.5"
|
||||
fnv = "1.0"
|
||||
@ -21,7 +21,7 @@ libp2p-swarm = { version = "0.2.0", path = "../../swarm" }
|
||||
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../../misc/multiaddr" }
|
||||
multihash = { package = "parity-multihash", version = "0.1.0", path = "../../misc/multihash" }
|
||||
protobuf = "2.8"
|
||||
rand = "0.6.0"
|
||||
rand = "0.7.2"
|
||||
sha2 = "0.8.0"
|
||||
smallvec = "0.6"
|
||||
tokio-codec = "0.1"
|
||||
@ -35,6 +35,6 @@ void = "1.0"
|
||||
libp2p-secio = { version = "0.12.0", path = "../secio" }
|
||||
libp2p-tcp = { version = "0.12.0", path = "../../transports/tcp" }
|
||||
libp2p-yamux = { version = "0.12.0", path = "../../muxers/yamux" }
|
||||
quickcheck = "0.8"
|
||||
rand = "0.6.0"
|
||||
quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
tokio = "0.1"
|
||||
|
@ -15,16 +15,16 @@ lazy_static = "1.2"
|
||||
libp2p-core = { version = "0.12.0", path = "../../core" }
|
||||
log = "0.4"
|
||||
protobuf = "2.8"
|
||||
rand = "^0.7"
|
||||
ring = { version = "^0.16", features = ["alloc"], default-features = false }
|
||||
rand = "^0.7.2"
|
||||
ring = { version = "0.16.9", features = ["alloc"], default-features = false }
|
||||
snow = { version = "0.6.1", features = ["ring-resolver"], default-features = false }
|
||||
tokio-io = "0.1"
|
||||
x25519-dalek = "0.5"
|
||||
zeroize = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.6"
|
||||
env_logger = "0.7.1"
|
||||
libp2p-tcp = { version = "0.12.0", path = "../../transports/tcp" }
|
||||
quickcheck = "0.8"
|
||||
quickcheck = "0.9.0"
|
||||
tokio = "0.1"
|
||||
sodiumoxide = "^0.2.5"
|
||||
|
@ -252,4 +252,3 @@ impl rand::RngCore for Rng {
|
||||
impl rand::CryptoRng for Rng {}
|
||||
|
||||
impl snow::types::Random for Rng {}
|
||||
|
||||
|
@ -16,7 +16,7 @@ libp2p-swarm = { version = "0.2.0", path = "../../swarm" }
|
||||
log = "0.4.1"
|
||||
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../../misc/multiaddr" }
|
||||
futures = "0.1"
|
||||
rand = "0.6"
|
||||
rand = "0.7.2"
|
||||
tokio-io = "0.1"
|
||||
wasm-timer = "0.1"
|
||||
void = "1.0"
|
||||
@ -25,6 +25,6 @@ void = "1.0"
|
||||
libp2p-tcp = { version = "0.12.0", path = "../../transports/tcp" }
|
||||
libp2p-secio = { version = "0.12.0", path = "../../protocols/secio" }
|
||||
libp2p-yamux = { version = "0.12.0", path = "../../muxers/yamux" }
|
||||
quickcheck = "0.8"
|
||||
quickcheck = "0.9.0"
|
||||
tokio = "0.1"
|
||||
tokio-tcp = "0.1"
|
||||
|
@ -10,11 +10,11 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
|
||||
categories = ["network-programming", "asynchronous"]
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4"
|
||||
futures = "0.1"
|
||||
futures = "0.1.29"
|
||||
libp2p-core = { version = "0.12.0", path = "../../core" }
|
||||
log = "0.4.6"
|
||||
void = "1"
|
||||
bytes = "0.4.12"
|
||||
log = "0.4.8"
|
||||
void = "1.0.2"
|
||||
tokio-io = "0.1.12"
|
||||
protobuf = "2.3"
|
||||
protobuf = "2.8.1"
|
||||
rw-stream-sink = { version = "0.1.1", path = "../../misc/rw-stream-sink" }
|
||||
|
@ -23,12 +23,13 @@ ctr = "0.3"
|
||||
lazy_static = "1.2.0"
|
||||
rw-stream-sink = { version = "0.1.1", path = "../../misc/rw-stream-sink" }
|
||||
tokio-io = "0.1.0"
|
||||
tokio-codec = "0.1.1"
|
||||
sha2 = "0.8.0"
|
||||
hmac = "0.7.0"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
ring = { version = "^0.16", features = ["alloc"], default-features = false }
|
||||
untrusted = { version = "0.6" }
|
||||
ring = { version = "0.16.9", features = ["alloc"], default-features = false }
|
||||
untrusted = "0.7.0"
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
js-sys = "0.3.10"
|
||||
@ -43,7 +44,7 @@ secp256k1 = []
|
||||
aes-all = ["aesni"]
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.2"
|
||||
criterion = "0.3.0"
|
||||
libp2p-tcp = { version = "0.12.0", path = "../../transports/tcp" }
|
||||
libp2p-mplex = { version = "0.12.0", path = "../../muxers/mplex" }
|
||||
tokio = "0.1"
|
||||
|
@ -37,8 +37,7 @@ use sha2::{Digest as ShaDigestTrait, Sha256};
|
||||
use std::cmp::{self, Ordering};
|
||||
use std::io::{Error as IoError, ErrorKind as IoErrorKind};
|
||||
use crate::structs_proto::{Exchange, Propose};
|
||||
use tokio_io::codec::length_delimited;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use tokio_io::{AsyncRead, AsyncWrite, codec::length_delimited};
|
||||
use crate::{KeyAgreement, SecioConfig};
|
||||
|
||||
// This struct contains the whole context of a handshake, and is filled progressively
|
||||
|
@ -19,6 +19,6 @@ void = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
libp2p-mplex = { version = "0.12.0", path = "../muxers/mplex" }
|
||||
quickcheck = "0.8"
|
||||
rand = "0.6"
|
||||
quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
|
||||
|
@ -20,7 +20,7 @@ tokio-io = "0.1.12"
|
||||
tokio-rustls = "0.10.1"
|
||||
soketto = { version = "0.2.3", features = ["deflate"] }
|
||||
url = "2.1.0"
|
||||
webpki-roots = "0.17.0"
|
||||
webpki-roots = "0.18.0"
|
||||
|
||||
[dev-dependencies]
|
||||
libp2p-tcp = { version = "0.12.0", path = "../tcp" }
|
||||
|
Reference in New Issue
Block a user