mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-25 15:51:34 +00:00
Update some dependenices; Remove some useless dependencies (#1387)
Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
committed by
Pierre Krieger
parent
655609dfe0
commit
af464e18c5
@ -32,7 +32,7 @@ libp2p-swarm = { version = "0.4.0-alpha.1", path = "swarm" }
|
|||||||
libp2p-uds = { version = "0.14.0-alpha.1", path = "transports/uds" }
|
libp2p-uds = { version = "0.14.0-alpha.1", path = "transports/uds" }
|
||||||
libp2p-wasm-ext = { version = "0.7.0-alpha.1", path = "transports/wasm-ext" }
|
libp2p-wasm-ext = { version = "0.7.0-alpha.1", path = "transports/wasm-ext" }
|
||||||
libp2p-yamux = { version = "0.14.0-alpha.1", path = "muxers/yamux" }
|
libp2p-yamux = { version = "0.14.0-alpha.1", path = "muxers/yamux" }
|
||||||
parking_lot = "0.9.0"
|
parking_lot = "0.10.0"
|
||||||
smallvec = "1.0"
|
smallvec = "1.0"
|
||||||
wasm-timer = "0.2.4"
|
wasm-timer = "0.2.4"
|
||||||
|
|
||||||
|
@ -12,9 +12,7 @@ categories = ["network-programming", "asynchronous"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
asn1_der = "0.6.1"
|
asn1_der = "0.6.1"
|
||||||
bs58 = "0.3.0"
|
bs58 = "0.3.0"
|
||||||
bytes = "0.5"
|
|
||||||
ed25519-dalek = "1.0.0-pre.3"
|
ed25519-dalek = "1.0.0-pre.3"
|
||||||
failure = "0.1"
|
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
futures = { version = "0.3.1", features = ["compat", "io-compat", "executor", "thread-pool"] }
|
futures = { version = "0.3.1", features = ["compat", "io-compat", "executor", "thread-pool"] }
|
||||||
futures-timer = "2"
|
futures-timer = "2"
|
||||||
@ -24,14 +22,14 @@ log = "0.4"
|
|||||||
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../misc/multiaddr" }
|
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../misc/multiaddr" }
|
||||||
multihash = { package = "parity-multihash", version = "0.2.1", path = "../misc/multihash" }
|
multihash = { package = "parity-multihash", version = "0.2.1", path = "../misc/multihash" }
|
||||||
multistream-select = { version = "0.7.0", path = "../misc/multistream-select" }
|
multistream-select = { version = "0.7.0", path = "../misc/multistream-select" }
|
||||||
parking_lot = "0.9.0"
|
parking_lot = "0.10.0"
|
||||||
pin-project = "0.4.6"
|
pin-project = "0.4.6"
|
||||||
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
||||||
quick-error = "1.2"
|
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
rw-stream-sink = { version = "0.2.0", path = "../misc/rw-stream-sink" }
|
rw-stream-sink = { version = "0.2.0", path = "../misc/rw-stream-sink" }
|
||||||
sha2 = "0.8.0"
|
sha2 = "0.8.0"
|
||||||
smallvec = "1.0"
|
smallvec = "1.0"
|
||||||
|
thiserror = "1.0"
|
||||||
unsigned-varint = "0.3"
|
unsigned-varint = "0.3"
|
||||||
void = "1"
|
void = "1"
|
||||||
zeroize = "1"
|
zeroize = "1"
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
//! Ed25519 keys.
|
//! Ed25519 keys.
|
||||||
|
|
||||||
use ed25519_dalek as ed25519;
|
use ed25519_dalek as ed25519;
|
||||||
use failure::Fail;
|
|
||||||
use rand::RngCore;
|
use rand::RngCore;
|
||||||
use super::error::DecodingError;
|
use super::error::DecodingError;
|
||||||
use zeroize::Zeroize;
|
use zeroize::Zeroize;
|
||||||
@ -48,7 +47,7 @@ impl Keypair {
|
|||||||
pub fn decode(kp: &mut [u8]) -> Result<Keypair, DecodingError> {
|
pub fn decode(kp: &mut [u8]) -> Result<Keypair, DecodingError> {
|
||||||
ed25519::Keypair::from_bytes(kp)
|
ed25519::Keypair::from_bytes(kp)
|
||||||
.map(|k| { kp.zeroize(); Keypair(k) })
|
.map(|k| { kp.zeroize(); Keypair(k) })
|
||||||
.map_err(|e| DecodingError::new("Ed25519 keypair").source(e.compat()))
|
.map_err(|e| DecodingError::new("Ed25519 keypair").source(e))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sign a message using the private key of this keypair.
|
/// Sign a message using the private key of this keypair.
|
||||||
@ -120,7 +119,7 @@ impl PublicKey {
|
|||||||
/// Decode a public key from a byte array as produced by `encode`.
|
/// Decode a public key from a byte array as produced by `encode`.
|
||||||
pub fn decode(k: &[u8]) -> Result<PublicKey, DecodingError> {
|
pub fn decode(k: &[u8]) -> Result<PublicKey, DecodingError> {
|
||||||
ed25519::PublicKey::from_bytes(k)
|
ed25519::PublicKey::from_bytes(k)
|
||||||
.map_err(|e| DecodingError::new("Ed25519 public key").source(e.compat()))
|
.map_err(|e| DecodingError::new("Ed25519 public key").source(e))
|
||||||
.map(PublicKey)
|
.map(PublicKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,7 +163,7 @@ impl SecretKey {
|
|||||||
pub fn from_bytes(mut sk_bytes: impl AsMut<[u8]>) -> Result<SecretKey, DecodingError> {
|
pub fn from_bytes(mut sk_bytes: impl AsMut<[u8]>) -> Result<SecretKey, DecodingError> {
|
||||||
let sk_bytes = sk_bytes.as_mut();
|
let sk_bytes = sk_bytes.as_mut();
|
||||||
let secret = ed25519::SecretKey::from_bytes(&*sk_bytes)
|
let secret = ed25519::SecretKey::from_bytes(&*sk_bytes)
|
||||||
.map_err(|e| DecodingError::new("Ed25519 secret key").source(e.compat()))?;
|
.map_err(|e| DecodingError::new("Ed25519 secret key").source(e))?;
|
||||||
sk_bytes.zeroize();
|
sk_bytes.zeroize();
|
||||||
Ok(SecretKey(secret))
|
Ok(SecretKey(secret))
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
use crate::PublicKey;
|
use crate::PublicKey;
|
||||||
use bs58;
|
use bs58;
|
||||||
use quick_error::quick_error;
|
use thiserror::Error;
|
||||||
use multihash;
|
use multihash;
|
||||||
use std::{convert::TryFrom, fmt, str::FromStr};
|
use std::{convert::TryFrom, fmt, str::FromStr};
|
||||||
|
|
||||||
@ -218,18 +218,12 @@ impl Into<multihash::Multihash> for PeerId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
quick_error! {
|
#[derive(Debug, Error)]
|
||||||
#[derive(Debug)]
|
pub enum ParseError {
|
||||||
pub enum ParseError {
|
#[error("base-58 decode error: {0}")]
|
||||||
B58(e: bs58::decode::Error) {
|
B58(#[from] bs58::decode::Error),
|
||||||
display("base-58 decode error: {}", e)
|
#[error("decoding multihash failed")]
|
||||||
cause(e)
|
MultiHash,
|
||||||
from()
|
|
||||||
}
|
|
||||||
MultiHash {
|
|
||||||
display("decoding multihash failed")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromStr for PeerId {
|
impl FromStr for PeerId {
|
||||||
|
@ -19,9 +19,8 @@ lazy_static = "1.2"
|
|||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../multiaddr" }
|
|
||||||
net2 = "0.2"
|
net2 = "0.2"
|
||||||
rand = "0.6"
|
rand = "0.7"
|
||||||
smallvec = "1.0"
|
smallvec = "1.0"
|
||||||
void = "1.0"
|
void = "1.0"
|
||||||
wasm-timer = "0.2.4"
|
wasm-timer = "0.2.4"
|
||||||
|
@ -23,8 +23,7 @@ use async_std::net::UdpSocket;
|
|||||||
use dns_parser::{Packet, RData};
|
use dns_parser::{Packet, RData};
|
||||||
use either::Either::{Left, Right};
|
use either::Either::{Left, Right};
|
||||||
use futures::{future, prelude::*};
|
use futures::{future, prelude::*};
|
||||||
use libp2p_core::{Multiaddr, PeerId};
|
use libp2p_core::{multiaddr::{Multiaddr, Protocol}, PeerId};
|
||||||
use multiaddr::Protocol;
|
|
||||||
use std::{fmt, io, net::Ipv4Addr, net::SocketAddr, str, time::{Duration, Instant}};
|
use std::{fmt, io, net::Ipv4Addr, net::SocketAddr, str, time::{Duration, Instant}};
|
||||||
use wasm_timer::Interval;
|
use wasm_timer::Interval;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
@ -550,11 +549,10 @@ impl fmt::Debug for MdnsPeer {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use futures::executor::block_on;
|
use futures::executor::block_on;
|
||||||
use libp2p_core::PeerId;
|
use libp2p_core::{PeerId, multiaddr::multihash::*};
|
||||||
use std::{io::{Error, ErrorKind}, time::Duration};
|
use std::{io::{Error, ErrorKind}, time::Duration};
|
||||||
use wasm_timer::ext::TryFutureExt;
|
use wasm_timer::ext::TryFutureExt;
|
||||||
use crate::service::{MdnsPacket, MdnsService};
|
use crate::service::{MdnsPacket, MdnsService};
|
||||||
use multiaddr::multihash::*;
|
|
||||||
|
|
||||||
fn discover(peer_id: PeerId) {
|
fn discover(peer_id: PeerId) {
|
||||||
block_on(async {
|
block_on(async {
|
||||||
|
@ -22,8 +22,6 @@ url = { version = "2.1.0", default-features = false }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
bs58 = "0.3.0"
|
|
||||||
data-encoding = "2"
|
|
||||||
quickcheck = "0.9.0"
|
quickcheck = "0.9.0"
|
||||||
rand = "0.7.2"
|
rand = "0.7.2"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
@ -16,7 +16,7 @@ futures = "0.3.1"
|
|||||||
futures_codec = "0.3.4"
|
futures_codec = "0.3.4"
|
||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
parking_lot = "0.9"
|
parking_lot = "0.10"
|
||||||
unsigned-varint = { version = "0.3", features = ["futures-codec"] }
|
unsigned-varint = { version = "0.3", features = ["futures-codec"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -13,6 +13,6 @@ categories = ["network-programming", "asynchronous"]
|
|||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
parking_lot = "0.9"
|
parking_lot = "0.10"
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
yamux = "0.4"
|
yamux = "0.4"
|
||||||
|
@ -16,7 +16,6 @@ flate2 = "1.0"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
async-std = "1.0"
|
async-std = "1.0"
|
||||||
env_logger = "0.7.1"
|
|
||||||
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
quickcheck = "0.9"
|
quickcheck = "0.9"
|
||||||
|
@ -11,7 +11,6 @@ categories = ["network-programming", "asynchronous"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bs58 = "0.3.0"
|
bs58 = "0.3.0"
|
||||||
bytes = "0.5"
|
|
||||||
cuckoofilter = "0.3.2"
|
cuckoofilter = "0.3.2"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
|
@ -10,21 +10,16 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
|
|||||||
categories = ["network-programming", "asynchronous"]
|
categories = ["network-programming", "asynchronous"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.5"
|
|
||||||
futures_codec = "0.3.4"
|
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
||||||
log = "0.4.1"
|
log = "0.4.1"
|
||||||
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../../misc/multiaddr" }
|
|
||||||
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
||||||
smallvec = "1.0"
|
smallvec = "1.0"
|
||||||
wasm-timer = "0.2"
|
wasm-timer = "0.2"
|
||||||
unsigned-varint = { version = "0.3", features = ["futures-codec"] }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
async-std = "1.0"
|
async-std = "1.0"
|
||||||
libp2p-mplex = { version = "0.14.0-alpha.1", path = "../../muxers/mplex" }
|
libp2p-mplex = { version = "0.14.0-alpha.1", path = "../../muxers/mplex" }
|
||||||
libp2p-secio = { version = "0.14.0-alpha.1", path = "../../protocols/secio" }
|
libp2p-secio = { version = "0.14.0-alpha.1", path = "../../protocols/secio" }
|
||||||
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
||||||
rand = "0.6"
|
|
||||||
|
@ -19,7 +19,6 @@ futures = "0.3.1"
|
|||||||
log = "0.4"
|
log = "0.4"
|
||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
||||||
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../../misc/multiaddr" }
|
|
||||||
multihash = { package = "parity-multihash", version = "0.2.1", path = "../../misc/multihash" }
|
multihash = { package = "parity-multihash", version = "0.2.1", path = "../../misc/multihash" }
|
||||||
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
protobuf = "=2.8.1" # note: see https://github.com/libp2p/rust-libp2p/issues/1363
|
||||||
rand = "0.7.2"
|
rand = "0.7.2"
|
||||||
@ -32,7 +31,5 @@ void = "1.0"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
libp2p-secio = { version = "0.14.0-alpha.1", path = "../secio" }
|
libp2p-secio = { version = "0.14.0-alpha.1", path = "../secio" }
|
||||||
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
|
||||||
libp2p-yamux = { version = "0.14.0-alpha.1", path = "../../muxers/yamux" }
|
libp2p-yamux = { version = "0.14.0-alpha.1", path = "../../muxers/yamux" }
|
||||||
quickcheck = "0.9.0"
|
quickcheck = "0.9.0"
|
||||||
rand = "0.7.2"
|
|
||||||
|
@ -8,7 +8,6 @@ repository = "https://github.com/libp2p/rust-libp2p"
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.5"
|
|
||||||
curve25519-dalek = "1"
|
curve25519-dalek = "1"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
lazy_static = "1.2"
|
lazy_static = "1.2"
|
||||||
@ -25,5 +24,4 @@ zeroize = "1"
|
|||||||
env_logger = "0.7.1"
|
env_logger = "0.7.1"
|
||||||
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
libp2p-tcp = { version = "0.14.0-alpha.1", path = "../../transports/tcp" }
|
||||||
quickcheck = "0.9.0"
|
quickcheck = "0.9.0"
|
||||||
tokio = "0.1"
|
|
||||||
sodiumoxide = "^0.2.5"
|
sodiumoxide = "^0.2.5"
|
||||||
|
@ -10,12 +10,10 @@ keywords = ["peer-to-peer", "libp2p", "networking"]
|
|||||||
categories = ["network-programming", "asynchronous"]
|
categories = ["network-programming", "asynchronous"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.5"
|
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
libp2p-core = { version = "0.14.0-alpha.1", path = "../../core" }
|
||||||
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
libp2p-swarm = { version = "0.4.0-alpha.1", path = "../../swarm" }
|
||||||
log = "0.4.1"
|
log = "0.4.1"
|
||||||
multiaddr = { package = "parity-multiaddr", version = "0.7.0", path = "../../misc/multiaddr" }
|
|
||||||
rand = "0.7.2"
|
rand = "0.7.2"
|
||||||
void = "1.0"
|
void = "1.0"
|
||||||
wasm-timer = "0.2"
|
wasm-timer = "0.2"
|
||||||
|
@ -24,4 +24,3 @@ void = "1.0.2"
|
|||||||
env_logger = "0.7.1"
|
env_logger = "0.7.1"
|
||||||
quickcheck = "0.9.0"
|
quickcheck = "0.9.0"
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
futures-timer = "2.0"
|
|
||||||
|
@ -28,7 +28,6 @@ twofish = "0.2.0"
|
|||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
ring = { version = "0.16.9", features = ["alloc"], default-features = false }
|
ring = { version = "0.16.9", features = ["alloc"], default-features = false }
|
||||||
untrusted = "0.7.0"
|
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
js-sys = "0.3.10"
|
js-sys = "0.3.10"
|
||||||
|
@ -11,7 +11,6 @@ categories = ["network-programming", "asynchronous"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = "1.0"
|
async-std = "1.0"
|
||||||
bytes = "0.5"
|
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
futures-timer = "2.0"
|
futures-timer = "2.0"
|
||||||
get_if_addrs = "0.5.3"
|
get_if_addrs = "0.5.3"
|
||||||
|
Reference in New Issue
Block a user