Update to the latest libp2p (#2239)

Updates to the latest libp2p and ignores RUSTSEC-2020-0146 from cargo-audit


Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Age Manning 2021-03-02 05:59:49 +00:00
parent 5c285f652a
commit 1c507c588e
9 changed files with 526 additions and 434 deletions

934
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -136,8 +136,7 @@ arbitrary-fuzz:
# Runs cargo audit (Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database) # Runs cargo audit (Audit Cargo.lock files for crates with security vulnerabilities reported to the RustSec Advisory Database)
audit: audit:
cargo install --force cargo-audit cargo install --force cargo-audit
# TODO: we should address this --ignore. cargo audit --ignore RUSTSEC-2020-0146
cargo audit --ignore RUSTSEC-2016-0002 --ignore RUSTSEC-2020-0008 --ignore RUSTSEC-2017-0002 --ignore RUSTSEC-2021-0020
# Runs `cargo udeps` to check for unused dependencies # Runs `cargo udeps` to check for unused dependencies
udeps: udeps:

View File

@ -42,7 +42,7 @@ regex = "1.3.9"
strum = { version = "0.20", features = ["derive"] } strum = { version = "0.20", features = ["derive"] }
[dependencies.libp2p] [dependencies.libp2p]
version = "0.34.0" version = "0.35.1"
default-features = false default-features = false
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns", "tcp-tokio"] features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns", "tcp-tokio"]

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use criterion::Criterion; use criterion::Criterion;
use criterion::{black_box, criterion_group, criterion_main, Benchmark}; use criterion::{black_box, criterion_group, criterion_main, Benchmark};
use rayon::prelude::*; use rayon::prelude::*;

View File

@ -98,15 +98,18 @@ mod post {
// `Error::InvalidUrl`. // `Error::InvalidUrl`.
// The RemoteSignerHttpConsumer is created, but fails at `path_segments_mut()`. // The RemoteSignerHttpConsumer is created, but fails at `path_segments_mut()`.
testcase("localhost:abcd", "[InvalidUrl] Url { scheme: \"localhost\", host: None, port: None, path: \"abcd\", query: None, fragment: None }"); testcase(
testcase("localhost:", "[InvalidUrl] Url { scheme: \"localhost\", host: None, port: None, path: \"\", query: None, fragment: None }"); "localhost:abcd",
"[InvalidUrl] Url { scheme: \"localhost\", username: \"\", password: None, host: None, port: None, path: \"abcd\", query: None, fragment: None }",
);
testcase("localhost:", "[InvalidUrl] Url { scheme: \"localhost\", username: \"\", password: None, host: None, port: None, path: \"\", query: None, fragment: None }");
// `Reqwest::Error` of the `Builder` kind. // `Reqwest::Error` of the `Builder` kind.
// POST is not made. // POST is not made.
testcase( testcase(
"unix:/run/foo.socket", "unix:/run/foo.socket",
&format!( &format!(
"[Reqwest - Builder] Url {{ scheme: \"unix\", host: None, port: None, path: \"/run/foo.socket/sign/{}\", query: None, fragment: None }}", "[Reqwest - Builder] Url {{ scheme: \"unix\", username: \"\", password: None, host: None, port: None, path: \"/run/foo.socket/sign/{}\", query: None, fragment: None }}",
PUBLIC_KEY_1 PUBLIC_KEY_1
), ),
); );
@ -114,7 +117,7 @@ mod post {
testcase( testcase(
"http://127.0.0.1:0", "http://127.0.0.1:0",
&format!( &format!(
"[Reqwest - Request] Url {{ scheme: \"http\", host: Some(Ipv4(127.0.0.1)), port: Some(0), path: \"/sign/{}\", query: None, fragment: None }}", "[Reqwest - Request] Url {{ scheme: \"http\", username: \"\", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(0), path: \"/sign/{}\", query: None, fragment: None }}",
PUBLIC_KEY_1 PUBLIC_KEY_1
), ),
); );

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
extern crate env_logger; extern crate env_logger;
use criterion::Criterion; use criterion::Criterion;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use criterion::Criterion; use criterion::Criterion;
use criterion::{black_box, criterion_group, criterion_main, Benchmark}; use criterion::{black_box, criterion_group, criterion_main, Benchmark};
use swap_or_not_shuffle::{compute_shuffled_index, shuffle_list as fast_shuffle}; use swap_or_not_shuffle::{compute_shuffled_index, shuffle_list as fast_shuffle};

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use criterion::Criterion; use criterion::Criterion;
use criterion::{black_box, criterion_group, criterion_main, Benchmark}; use criterion::{black_box, criterion_group, criterion_main, Benchmark};
use lazy_static::lazy_static; use lazy_static::lazy_static;

View File

@ -1,3 +1,5 @@
#![allow(deprecated)]
use criterion::Criterion; use criterion::Criterion;
use criterion::{black_box, criterion_group, criterion_main, Benchmark}; use criterion::{black_box, criterion_group, criterion_main, Benchmark};
use rayon::prelude::*; use rayon::prelude::*;