Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ffbe714
Bump most dependencies
Demi-Marie Sep 30, 2019
5c0992e
Bump all dependencies
Demi-Marie Oct 4, 2019
5dff4dc
Remove use of ed25519-dalek fork
Demi-Marie Oct 5, 2019
6e32774
Monomorphize more dependencies
Demi-Marie Oct 5, 2019
76d8ca4
Merge remote-tracking branch 'origin/master' into demi-upgrade-deps
Demi-Marie Oct 8, 2019
f616af8
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 9, 2019
0ef9609
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 11, 2019
238f049
Add compatibility hack for rand
Demi-Marie Oct 11, 2019
8634033
Use @tomaka’s idea for using a newer `rand`
Demi-Marie Oct 11, 2019
5ad3248
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 13, 2019
f24cb5b
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 21, 2019
8245362
Switch to Parity master
Demi-Marie Oct 21, 2019
8d0d451
Update some depenendencies again
Demi-Marie Oct 21, 2019
8806d2b
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 23, 2019
ea4540e
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 25, 2019
8631c2a
Remove unwraps and `#[allow(deprecated)]`.
Demi-Marie Oct 25, 2019
a039514
Remove spurious changes to dependencies
Demi-Marie Oct 25, 2019
9341abb
Remove some redundant Cargo.toml changes
Demi-Marie Oct 25, 2019
e8d4209
Replace a retry loop with an expect
Demi-Marie Oct 25, 2019
37fb824
Merge branch 'master' into demi-upgrade-deps
Demi-Marie Oct 28, 2019
0fe5c9a
Revert changes that don’t belong in this PR
Demi-Marie Oct 28, 2019
4d5d601
Merge branch 'master' into demi-upgrade-deps
tomaka Oct 31, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ default = ["secp256k1", "libp2p-websocket"]
secp256k1 = ["libp2p-core/secp256k1", "libp2p-secio/secp256k1"]

[dependencies]
bytes = "0.4"
futures = "0.1"
bytes = "0.4.12"
futures = "0.1.29"
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "misc/multiaddr" }
multihash = { package = "parity-multihash", version = "0.1.0", path = "misc/multihash" }
lazy_static = "1.2"
lazy_static = "1.4.0"
libp2p-mplex = { version = "0.12.0", path = "muxers/mplex" }
libp2p-identify = { version = "0.12.0", path = "protocols/identify" }
libp2p-kad = { version = "0.12.0", path = "protocols/kad" }
Expand All @@ -32,11 +32,11 @@ 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"
smallvec = "0.6"
tokio-codec = "0.1"
tokio-executor = "0.1"
tokio-io = "0.1"
parking_lot = "0.9.0"
smallvec = "0.6.10"
tokio-codec = "0.1.1"
tokio-executor = "0.1.8"
tokio-io = "0.1.12"
wasm-timer = "0.1"

[target.'cfg(not(any(target_os = "emscripten", target_os = "unknown")))'.dependencies]
Expand All @@ -48,9 +48,9 @@ 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"
tokio = "0.1"
tokio-stdin-stdout = "0.1"
env_logger = "0.7.1"
tokio = "0.1.22"
tokio-stdin-stdout = "0.1.5"

[workspace]
members = [
Expand Down
54 changes: 27 additions & 27 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,48 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
asn1_der = "0.6.1"
bs58 = "0.2.0"
bytes = "0.4"
ed25519-dalek = "1.0.0-pre.1"
failure = "0.1"
fnv = "1.0"
lazy_static = "1.2"
log = "0.4"
asn1_der = "0.6.3"
bs58 = "0.3.0"
bytes = "0.4.12"
ed25519-dalek = "1.0.0-pre.2"
failure = "0.1.6"
fnv = "1.0.6"
lazy_static = "1.4.0"
log = "0.4.8"
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../misc/multiaddr" }
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"
protobuf = "2.8"
quick-error = "1.2"
rand = "0.6"
futures = "0.1.29"
parking_lot = "0.9.0"
protobuf = "2.8.1"
quick-error = "1.2.2"
rand = "0.7.2"
rw-stream-sink = { version = "0.1.1", path = "../misc/rw-stream-sink" }
libsecp256k1 = { version = "0.3.1", optional = true }
libsecp256k1 = { version = "0.3.2", optional = true }
sha2 = "0.8.0"
smallvec = "0.6"
tokio-executor = "0.1.4"
tokio-io = "0.1"
smallvec = "0.6.10"
tokio-executor = "0.1.8"
tokio-io = "0.1.12"
wasm-timer = "0.1"
unsigned-varint = "0.2"
void = "1"
zeroize = "1"
unsigned-varint = "0.2.3"
void = "1.0.2"
zeroize = "1.0.0"

[target.'cfg(not(any(target_os = "emscripten", target_os = "unknown")))'.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"

[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"
tokio = "0.1"
rand = "0.7.2"
quickcheck = "0.9.0"
tokio = "0.1.22"
wasm-timer = "0.1"
assert_matches = "1.3"
tokio-mock-task = "0.1"
assert_matches = "1.3.0"
tokio-mock-task = "0.1.1"

[features]
default = ["secp256k1"]
Expand Down
11 changes: 7 additions & 4 deletions core/src/identity/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

use ed25519_dalek as ed25519;
use failure::Fail;
use rand::RngCore;
use super::error::DecodingError;
use zeroize::Zeroize;

Expand All @@ -31,7 +32,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
Expand Down Expand Up @@ -87,9 +88,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 })
}
}

Expand Down Expand Up @@ -138,7 +139,9 @@ impl Clone 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).unwrap())
}

/// Create an Ed25519 secret key from a byte slice, zeroing the input on success.
Expand Down
4 changes: 2 additions & 2 deletions core/src/identity/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl DecodingError {
}

impl fmt::Display for DecodingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Key decoding error: {}", self.msg)
}
}
Expand Down Expand Up @@ -71,7 +71,7 @@ impl SigningError {
}

impl fmt::Display for SigningError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Key signing error: {}", self.msg)
}
}
Expand Down
3 changes: 1 addition & 2 deletions core/src/identity/rsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use ring::rand::SystemRandom;
use ring::signature::{self, RsaKeyPair, RSA_PKCS1_SHA256, RSA_PKCS1_2048_8192_SHA256};
use ring::signature::KeyPair;
use std::sync::Arc;
use untrusted::Input;
use zeroize::Zeroize;

/// An RSA keypair.
Expand Down Expand Up @@ -216,7 +215,7 @@ mod tests {
struct SomeKeypair(Keypair);

impl fmt::Debug for SomeKeypair {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "SomeKeypair")
}
}
Expand Down
8 changes: 4 additions & 4 deletions core/src/nodes/tasks/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl<I, O, H, E, HE, T, C> fmt::Debug for Manager<I, O, H, E, HE, T, C>
where
T: fmt::Debug
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_map()
.entries(self.tasks.iter().map(|(id, task)| (id, &task.user_data)))
.finish()
Expand Down Expand Up @@ -285,7 +285,7 @@ impl<I, O, H, E, HE, T, C> Manager<I, O, H, E, HE, T, C> {
}

/// Provides an API similar to `Stream`, except that it cannot produce an error.
pub fn poll(&mut self) -> Async<Event<I, O, H, E, HE, T, C>> {
pub fn poll(&mut self) -> Async<Event<'_, I, O, H, E, HE, T, C>> {
for to_spawn in self.to_spawn.drain() {
// We try to use the default executor, but fall back to polling the task manually if
// no executor is available. This makes it possible to use the core in environments
Expand Down Expand Up @@ -486,7 +486,7 @@ impl<'a, E, T> TaskEntry<'a, E, T> {
}

impl<E, T: fmt::Debug> fmt::Debug for TaskEntry<'_, E, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("TaskEntry")
.field(&self.id())
.field(self.user_data())
Expand Down Expand Up @@ -558,7 +558,7 @@ impl<E, T> ClosedTask<E, T> {
}

impl<E, T: fmt::Debug> fmt::Debug for ClosedTask<E, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("ClosedTask")
.field(&self.id)
.field(&self.user_data)
Expand Down
6 changes: 1 addition & 5 deletions core/src/peer_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ use quick_error::quick_error;
use multihash;
use std::{convert::TryFrom, fmt, str::FromStr};

/// Public keys with byte-lengths smaller than `MAX_INLINE_KEY_LENGTH` will be
/// automatically used as the peer id using an identity multihash.
const MAX_INLINE_KEY_LENGTH: usize = 42;

/// Identifier of a peer of the network.
///
/// The data is a multihash of the public key of the peer.
Expand Down Expand Up @@ -219,7 +215,7 @@ impl Into<multihash::Multihash> for PeerId {
quick_error! {
#[derive(Debug)]
pub enum ParseError {
B58(e: bs58::decode::DecodeError) {
B58(e: bs58::decode::Error) {
display("base-58 decode error: {}", e)
cause(e)
from()
Expand Down
4 changes: 2 additions & 2 deletions core/src/transport/dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<TOut> Default for DummyTransport<TOut> {
}

impl<TOut> fmt::Debug for DummyTransport<TOut> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "DummyTransport")
}
}
Expand Down Expand Up @@ -72,7 +72,7 @@ impl<TOut> Transport for DummyTransport<TOut> {
pub struct DummyStream(());

impl fmt::Debug for DummyStream {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "DummyStream")
}
}
Expand Down
24 changes: 12 additions & 12 deletions misc/mdns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
data-encoding = "2.0"
dns-parser = "0.8"
futures = "0.1"
data-encoding = "2.1.2"
dns-parser = "0.8.0"
futures = "0.1.29"
libp2p-core = { version = "0.12.0", path = "../../core" }
libp2p-swarm = { version = "0.2.0", path = "../../swarm" }
log = "0.4"
log = "0.4.8"
multiaddr = { package = "parity-multiaddr", version = "0.5.0", path = "../multiaddr" }
net2 = "0.2"
rand = "0.6"
smallvec = "0.6"
tokio-io = "0.1"
tokio-reactor = "0.1"
net2 = "0.2.33"
rand = "0.6.5"
smallvec = "0.6.10"
tokio-io = "0.1.12"
tokio-reactor = "0.1.10"
wasm-timer = "0.1"
tokio-udp = "0.1"
void = "1.0"
tokio-udp = "0.1.5"
void = "1.0.2"

[dev-dependencies]
tokio = "0.1"
tokio = "0.1.22"
24 changes: 12 additions & 12 deletions misc/multiaddr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ license = "MIT"
version = "0.5.0"

[dependencies]
arrayref = "0.3"
bs58 = "0.2.0"
byteorder = "1.3.1"
arrayref = "0.3.5"
bs58 = "0.3.0"
byteorder = "1.3.2"
bytes = "0.4.12"
data-encoding = "2.1"
data-encoding = "2.1.2"
multihash = { package = "parity-multihash", version = "0.1.0", path = "../multihash" }
percent-encoding = "2.1.0"
serde = "1.0.70"
unsigned-varint = "0.2"
serde = "1.0.101"
unsigned-varint = "0.2.3"
url = { version = "2.1.0", default-features = false }

[dev-dependencies]
bincode = "1"
bs58 = "0.2.0"
data-encoding = "2"
quickcheck = "0.8.1"
rand = "0.6.5"
serde_json = "1.0"
bincode = "1.2.0"
bs58 = "0.3.0"
data-encoding = "2.1.2"
quickcheck = "0.9.0"
rand = "0.7.2"
serde_json = "1.0.41"
4 changes: 2 additions & 2 deletions misc/multiaddr/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ impl From<multihash::DecodeOwnedError> for Error {
}
}

impl From<bs58::decode::DecodeError> for Error {
fn from(err: bs58::decode::DecodeError) -> Error {
impl From<bs58::decode::Error> for Error {
fn from(err: bs58::decode::Error) -> Error {
Error::ParsingError(err.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion misc/multiaddr/src/from_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub enum FromUrlErr {
}

impl fmt::Display for FromUrlErr {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
FromUrlErr::BadUrl => write!(f, "Bad URL"),
FromUrlErr::UnsupportedScheme => write!(f, "Unrecognized URL scheme"),
Expand Down
2 changes: 1 addition & 1 deletion misc/multiaddr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Multiaddr {
/// updated `Protocol` at position `at` will be returned.
pub fn replace<'a, F>(&self, at: usize, by: F) -> Option<Multiaddr>
where
F: FnOnce(&Protocol) -> Option<Protocol<'a>>
F: FnOnce(&Protocol<'_>) -> Option<Protocol<'a>>
{
let mut address = Multiaddr::with_capacity(self.len());
let mut fun = Some(by);
Expand Down
2 changes: 1 addition & 1 deletion misc/multiaddr/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ fn append() {
assert_eq!(None, i.next())
}

fn replace_ip_addr(a: &Multiaddr, p: Protocol) -> Option<Multiaddr> {
fn replace_ip_addr(a: &Multiaddr, p: Protocol<'_>) -> Option<Multiaddr> {
a.replace(0, move |x| match x {
Protocol::Ip4(_) | Protocol::Ip6(_) => Some(p),
_ => None
Expand Down
12 changes: 6 additions & 6 deletions misc/multihash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ license = "MIT"
documentation = "https://docs.rs/parity-multihash/"

[dependencies]
blake2 = { version = "0.8", default-features = false }
blake2 = { version = "0.8.1", default-features = false }
bytes = "0.4.12"
rand = { version = "0.6", default-features = false, features = ["std"] }
sha-1 = { version = "0.8", default-features = false }
sha2 = { version = "0.8", default-features = false }
sha3 = { version = "0.8", default-features = false }
unsigned-varint = "0.2"
rand = { version = "0.6.5", default-features = false, features = ["std"] }
sha-1 = { version = "0.8.1", default-features = false }
sha2 = { version = "0.8.0", default-features = false }
sha3 = { version = "0.8.2", default-features = false }
unsigned-varint = "0.2.3"
Loading