Bump libp2p to address inconsistency in mesh peer tracking (#2493)

## Issue Addressed

- Resolves #2457
- Resolves #2443

## Proposed Changes

Target the (presently unreleased) head of `libp2p/rust-libp2p:master` in order to obtain the fix from https://github.com/libp2p/rust-libp2p/pull/2175.

Additionally:

- `libsecp256k1` needed to be upgraded to satisfy the new version of `libp2p`.
- There were also a handful of minor changes to `eth2_libp2p` to suit some interface changes.
- Two `cargo audit --ignore` flags were remove due to libp2p upgrades.

## Additional Info
 
 NA
This commit is contained in:
Paul Hauner 2021-08-12 01:59:20 +00:00
parent 33ff51a096
commit 4af6fcfafd
7 changed files with 116 additions and 94 deletions

185
Cargo.lock generated
View File

@ -1548,7 +1548,7 @@ dependencies = [
"hex", "hex",
"hkdf", "hkdf",
"lazy_static", "lazy_static",
"libp2p-core 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.29.0",
"lru", "lru",
"lru_time_cache", "lru_time_cache",
"parking_lot", "parking_lot",
@ -1830,7 +1830,7 @@ dependencies = [
"futures", "futures",
"futures-util", "futures-util",
"hex", "hex",
"libsecp256k1", "libsecp256k1 0.6.0",
"procinfo", "procinfo",
"proto_array", "proto_array",
"psutil", "psutil",
@ -3325,14 +3325,14 @@ dependencies = [
[[package]] [[package]]
name = "libp2p" name = "libp2p"
version = "0.39.1" version = "0.40.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"atomic", "atomic",
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
"lazy_static", "lazy_static",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-deflate", "libp2p-deflate",
"libp2p-dns", "libp2p-dns",
"libp2p-floodsub", "libp2p-floodsub",
@ -3375,7 +3375,7 @@ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
"lazy_static", "lazy_static",
"libsecp256k1", "libsecp256k1 0.5.0",
"log", "log",
"multiaddr", "multiaddr",
"multihash", "multihash",
@ -3397,8 +3397,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-core" name = "libp2p-core"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"asn1_der", "asn1_der",
"bs58", "bs58",
@ -3408,11 +3408,11 @@ dependencies = [
"futures", "futures",
"futures-timer", "futures-timer",
"lazy_static", "lazy_static",
"libsecp256k1", "libsecp256k1 0.6.0",
"log", "log",
"multiaddr", "multiaddr",
"multihash", "multihash",
"multistream-select 0.10.3", "multistream-select 0.10.4",
"parking_lot", "parking_lot",
"pin-project 1.0.7", "pin-project 1.0.7",
"prost", "prost",
@ -3430,22 +3430,22 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-deflate" name = "libp2p-deflate"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"flate2", "flate2",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
] ]
[[package]] [[package]]
name = "libp2p-dns" name = "libp2p-dns"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"async-std-resolver", "async-std-resolver",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"smallvec", "smallvec",
"trust-dns-resolver", "trust-dns-resolver",
@ -3453,13 +3453,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-floodsub" name = "libp2p-floodsub"
version = "0.30.0" version = "0.31.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"cuckoofilter", "cuckoofilter",
"fnv", "fnv",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"prost", "prost",
@ -3470,8 +3470,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-gossipsub" name = "libp2p-gossipsub"
version = "0.32.0" version = "0.33.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"asynchronous-codec", "asynchronous-codec",
"base64 0.13.0", "base64 0.13.0",
@ -3480,7 +3480,7 @@ dependencies = [
"fnv", "fnv",
"futures", "futures",
"hex_fmt", "hex_fmt",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"prost", "prost",
@ -3495,11 +3495,11 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-identify" name = "libp2p-identify"
version = "0.30.0" version = "0.31.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"prost", "prost",
@ -3510,8 +3510,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-kad" name = "libp2p-kad"
version = "0.31.0" version = "0.32.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"arrayvec 0.5.2", "arrayvec 0.5.2",
"asynchronous-codec", "asynchronous-codec",
@ -3519,7 +3519,7 @@ dependencies = [
"either", "either",
"fnv", "fnv",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"prost", "prost",
@ -3535,8 +3535,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-mdns" name = "libp2p-mdns"
version = "0.31.0" version = "0.32.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"async-io", "async-io",
"data-encoding", "data-encoding",
@ -3544,7 +3544,7 @@ dependencies = [
"futures", "futures",
"if-watch", "if-watch",
"lazy_static", "lazy_static",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"rand 0.8.4", "rand 0.8.4",
@ -3555,13 +3555,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-mplex" name = "libp2p-mplex"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"asynchronous-codec", "asynchronous-codec",
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"nohash-hasher", "nohash-hasher",
"parking_lot", "parking_lot",
@ -3572,14 +3572,14 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-noise" name = "libp2p-noise"
version = "0.32.0" version = "0.33.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"bytes 1.0.1", "bytes 1.0.1",
"curve25519-dalek", "curve25519-dalek",
"futures", "futures",
"lazy_static", "lazy_static",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"prost", "prost",
"prost-build", "prost-build",
@ -3593,11 +3593,11 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-ping" name = "libp2p-ping"
version = "0.30.0" version = "0.31.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"rand 0.7.3", "rand 0.7.3",
@ -3607,13 +3607,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-plaintext" name = "libp2p-plaintext"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"asynchronous-codec", "asynchronous-codec",
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"prost", "prost",
"prost-build", "prost-build",
@ -3624,7 +3624,7 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-pnet" name = "libp2p-pnet"
version = "0.21.0" version = "0.21.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"futures", "futures",
"log", "log",
@ -3636,14 +3636,14 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-relay" name = "libp2p-relay"
version = "0.3.0" version = "0.4.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"asynchronous-codec", "asynchronous-codec",
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
"futures-timer", "futures-timer",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"pin-project 1.0.7", "pin-project 1.0.7",
@ -3658,13 +3658,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-request-response" name = "libp2p-request-response"
version = "0.12.0" version = "0.13.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"libp2p-swarm", "libp2p-swarm",
"log", "log",
"lru", "lru",
@ -3677,12 +3677,12 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-swarm" name = "libp2p-swarm"
version = "0.30.0" version = "0.31.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"either", "either",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"rand 0.7.3", "rand 0.7.3",
"smallvec", "smallvec",
@ -3693,7 +3693,7 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-swarm-derive" name = "libp2p-swarm-derive"
version = "0.24.0" version = "0.24.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"quote", "quote",
"syn", "syn",
@ -3701,8 +3701,8 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-tcp" name = "libp2p-tcp"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"async-io", "async-io",
"futures", "futures",
@ -3711,7 +3711,7 @@ dependencies = [
"if-watch", "if-watch",
"ipnet", "ipnet",
"libc", "libc",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"socket2 0.4.0", "socket2 0.4.0",
"tokio 1.8.1", "tokio 1.8.1",
@ -3719,23 +3719,23 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-uds" name = "libp2p-uds"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"async-std", "async-std",
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
] ]
[[package]] [[package]]
name = "libp2p-wasm-ext" name = "libp2p-wasm-ext"
version = "0.29.0" version = "0.30.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"futures", "futures",
"js-sys", "js-sys",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"parity-send-wrapper", "parity-send-wrapper",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-futures", "wasm-bindgen-futures",
@ -3743,13 +3743,13 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-websocket" name = "libp2p-websocket"
version = "0.30.0" version = "0.31.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"either", "either",
"futures", "futures",
"futures-rustls", "futures-rustls",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"log", "log",
"quicksink", "quicksink",
"rw-stream-sink", "rw-stream-sink",
@ -3760,11 +3760,11 @@ dependencies = [
[[package]] [[package]]
name = "libp2p-yamux" name = "libp2p-yamux"
version = "0.33.0" version = "0.34.0"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"futures", "futures",
"libp2p-core 0.29.0 (git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a)", "libp2p-core 0.30.0",
"parking_lot", "parking_lot",
"thiserror", "thiserror",
"yamux", "yamux",
@ -3790,10 +3790,29 @@ dependencies = [
] ]
[[package]] [[package]]
name = "libsecp256k1-core" name = "libsecp256k1"
version = "0.2.1" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee11012b293ea30093c129173cac4335513064094619f4639a25b310fd33c11" checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73"
dependencies = [
"arrayref",
"base64 0.12.3",
"digest",
"hmac-drbg",
"libsecp256k1-core",
"libsecp256k1-gen-ecmult",
"libsecp256k1-gen-genmult",
"rand 0.7.3",
"serde",
"sha2",
"typenum",
]
[[package]]
name = "libsecp256k1-core"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80"
dependencies = [ dependencies = [
"crunchy", "crunchy",
"digest", "digest",
@ -3802,18 +3821,18 @@ dependencies = [
[[package]] [[package]]
name = "libsecp256k1-gen-ecmult" name = "libsecp256k1-gen-ecmult"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32239626ffbb6a095b83b37a02ceb3672b2443a87a000a884fc3c4d16925c9c0" checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3"
dependencies = [ dependencies = [
"libsecp256k1-core", "libsecp256k1-core",
] ]
[[package]] [[package]]
name = "libsecp256k1-gen-genmult" name = "libsecp256k1-gen-genmult"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76acb433e21d10f5f9892b1962c2856c58c7f39a9e4bd68ac82b9436a0ffd5b9" checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d"
dependencies = [ dependencies = [
"libsecp256k1-core", "libsecp256k1-core",
] ]
@ -4096,18 +4115,18 @@ dependencies = [
[[package]] [[package]]
name = "minicbor" name = "minicbor"
version = "0.8.1" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" checksum = "4f1f5b98cb843034ca9ca7fd9cbfdd579c674d58fdc4a6015948be5559b52446"
dependencies = [ dependencies = [
"minicbor-derive", "minicbor-derive",
] ]
[[package]] [[package]]
name = "minicbor-derive" name = "minicbor-derive"
version = "0.6.3" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2b9e8883d58e34b18facd16c4564a77ea50fce028ad3d0ee6753440e37acc8" checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4252,8 +4271,8 @@ dependencies = [
[[package]] [[package]]
name = "multistream-select" name = "multistream-select"
version = "0.10.3" version = "0.10.4"
source = "git+https://github.com/sigp/rust-libp2p?rev=75fd53ec5407a58ae1ff600fd1c68ea49079364a#75fd53ec5407a58ae1ff600fd1c68ea49079364a" source = "git+https://github.com/libp2p/rust-libp2p?rev=ce23cbe76a0382b6fcb0e49f1b2612df86f6465d#ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
dependencies = [ dependencies = [
"bytes 1.0.1", "bytes 1.0.1",
"futures", "futures",
@ -7315,7 +7334,7 @@ dependencies = [
"itertools 0.10.1", "itertools 0.10.1",
"lazy_static", "lazy_static",
"libc", "libc",
"libsecp256k1", "libsecp256k1 0.5.0",
"lighthouse_metrics", "lighthouse_metrics",
"lighthouse_version", "lighthouse_version",
"lockfile", "lockfile",

View File

@ -151,7 +151,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
cargo audit --ignore RUSTSEC-2021-0073 --ignore RUSTSEC-2021-0076 cargo audit
# Runs `cargo udeps` to check for unused dependencies # Runs `cargo udeps` to check for unused dependencies
udeps: udeps:

View File

@ -42,13 +42,15 @@ regex = "1.3.9"
strum = { version = "0.20", features = ["derive"] } strum = { version = "0.20", features = ["derive"] }
superstruct = "0.2.0" superstruct = "0.2.0"
# TODO: remove the rev-reference and go back to release versions once there is a release that
# includes the following PR:
#
# https://github.com/libp2p/rust-libp2p/pull/2175
[dependencies.libp2p] [dependencies.libp2p]
#version = "0.39.1" #version = "0.39.1"
#default-features = false #default-features = false
# TODO: Update once https://github.com/libp2p/rust-libp2p/pull/2103 and git = "https://github.com/libp2p/rust-libp2p"
# https://github.com/libp2p/rust-libp2p/pull/2137 are merged upstream. rev = "ce23cbe76a0382b6fcb0e49f1b2612df86f6465d"
git = "https://github.com/sigp/rust-libp2p"
rev = "75fd53ec5407a58ae1ff600fd1c68ea49079364a"
features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio"] features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns-tokio", "tcp-tokio"]
[dev-dependencies] [dev-dependencies]

View File

@ -203,7 +203,7 @@ impl CombinedKeyPublicExt for CombinedPublicKey {
libp2p::core::identity::secp256k1::PublicKey::decode(&pk_bytes) libp2p::core::identity::secp256k1::PublicKey::decode(&pk_bytes)
.expect("valid public key"), .expect("valid public key"),
); );
PeerId::from_public_key(libp2p_pk) PeerId::from_public_key(&libp2p_pk)
} }
Self::Ed25519(pk) => { Self::Ed25519(pk) => {
let pk_bytes = pk.to_bytes(); let pk_bytes = pk.to_bytes();
@ -211,7 +211,7 @@ impl CombinedKeyPublicExt for CombinedPublicKey {
libp2p::core::identity::ed25519::PublicKey::decode(&pk_bytes) libp2p::core::identity::ed25519::PublicKey::decode(&pk_bytes)
.expect("valid public key"), .expect("valid public key"),
); );
PeerId::from_public_key(libp2p_pk) PeerId::from_public_key(&libp2p_pk)
} }
} }
} }
@ -283,7 +283,7 @@ mod tests {
let libp2p_sk = libp2p::identity::secp256k1::SecretKey::from_bytes(sk_bytes).unwrap(); let libp2p_sk = libp2p::identity::secp256k1::SecretKey::from_bytes(sk_bytes).unwrap();
let secp256k1_kp: libp2p::identity::secp256k1::Keypair = libp2p_sk.into(); let secp256k1_kp: libp2p::identity::secp256k1::Keypair = libp2p_sk.into();
let libp2p_kp = Keypair::Secp256k1(secp256k1_kp); let libp2p_kp = Keypair::Secp256k1(secp256k1_kp);
let peer_id = libp2p_kp.public().into_peer_id(); let peer_id = libp2p_kp.public().to_peer_id();
let enr = discv5::enr::EnrBuilder::new("v4") let enr = discv5::enr::EnrBuilder::new("v4")
.build(&secret_key) .build(&secret_key)
@ -304,7 +304,7 @@ mod tests {
let libp2p_sk = libp2p::identity::ed25519::SecretKey::from_bytes(sk_bytes).unwrap(); let libp2p_sk = libp2p::identity::ed25519::SecretKey::from_bytes(sk_bytes).unwrap();
let ed25519_kp: libp2p::identity::ed25519::Keypair = libp2p_sk.into(); let ed25519_kp: libp2p::identity::ed25519::Keypair = libp2p_sk.into();
let libp2p_kp = Keypair::Ed25519(ed25519_kp); let libp2p_kp = Keypair::Ed25519(ed25519_kp);
let peer_id = libp2p_kp.public().into_peer_id(); let peer_id = libp2p_kp.public().to_peer_id();
let enr = discv5::enr::EnrBuilder::new("v4").build(&keypair).unwrap(); let enr = discv5::enr::EnrBuilder::new("v4").build(&keypair).unwrap();
let node_id = peer_id_to_node_id(&peer_id).unwrap(); let node_id = peer_id_to_node_id(&peer_id).unwrap();

View File

@ -59,6 +59,7 @@ type InboundProcessingOutput<TSpec> = (
type HandlerEvent<T> = Result<RPCReceived<T>, HandlerErr>; type HandlerEvent<T> = Result<RPCReceived<T>, HandlerErr>;
/// An error encountered by the handler. /// An error encountered by the handler.
#[derive(Debug)]
pub enum HandlerErr { pub enum HandlerErr {
/// An error occurred for this peer's request. This can occur during protocol negotiation, /// An error occurred for this peer's request. This can occur during protocol negotiation,
/// message passing, or if the handler identifies that we are sending an error response to the peer. /// message passing, or if the handler identifies that we are sending an error response to the peer.

View File

@ -143,7 +143,7 @@ impl<TSpec: EthSpec> Service<TSpec> {
.with_max_established_outgoing(Some( .with_max_established_outgoing(Some(
(config.target_peers as f32 * (1.0 + PEER_EXCESS_FACTOR)) as u32, (config.target_peers as f32 * (1.0 + PEER_EXCESS_FACTOR)) as u32,
)) ))
.with_max_established_total(Some( .with_max_established(Some(
(config.target_peers as f32 * (1.0 + PEER_EXCESS_FACTOR)) as u32, (config.target_peers as f32 * (1.0 + PEER_EXCESS_FACTOR)) as u32,
)) ))
.with_max_established_per_peer(Some(MAX_CONNECTIONS_PER_PEER)); .with_max_established_per_peer(Some(MAX_CONNECTIONS_PER_PEER));

View File

@ -17,7 +17,7 @@ proto_array = { path = "../../consensus/proto_array", optional = true }
serde_utils = { path = "../../consensus/serde_utils" } serde_utils = { path = "../../consensus/serde_utils" }
zeroize = { version = "1.1.1", features = ["zeroize_derive"] } zeroize = { version = "1.1.1", features = ["zeroize_derive"] }
eth2_keystore = { path = "../../crypto/eth2_keystore" } eth2_keystore = { path = "../../crypto/eth2_keystore" }
libsecp256k1 = "0.5.0" libsecp256k1 = "0.6.0"
ring = "0.16.19" ring = "0.16.19"
bytes = "1.0.1" bytes = "1.0.1"
account_utils = { path = "../../common/account_utils" } account_utils = { path = "../../common/account_utils" }