Upgrade libp2p to 0.46.1 (#11787)

* Update libp2p to 0.46.0

* Update libp2p to 0.46.1

* Fix telemetry initialization

* Fix tests
This commit is contained in:
Roman
2022-07-12 21:00:00 +04:00
committed by GitHub
parent 47b27c292f
commit 1902dc169d
19 changed files with 151 additions and 274 deletions
+122 -240
View File
@@ -3207,7 +3207,7 @@ dependencies = [
"http",
"jsonrpsee-core",
"jsonrpsee-types",
"pin-project 1.0.10",
"pin-project",
"rustls-native-certs",
"soketto",
"thiserror",
@@ -3461,9 +3461,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libp2p"
version = "0.45.1"
version = "0.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41726ee8f662563fafba2d2d484b14037cc8ecb8c953fbfc8439d4ce3a0a9029"
checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d"
dependencies = [
"bytes",
"futures",
@@ -3472,7 +3472,7 @@ dependencies = [
"instant",
"lazy_static",
"libp2p-autonat",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-deflate",
"libp2p-dns",
"libp2p-floodsub",
@@ -3498,69 +3498,35 @@ dependencies = [
"libp2p-yamux",
"multiaddr",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"pin-project",
"rand 0.7.3",
"smallvec",
]
[[package]]
name = "libp2p-autonat"
version = "0.4.0"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50de7c1d5c3f040fccb469e8a2d189e068b7627d760dd74ef914071c16bbe905"
checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9"
dependencies = [
"async-trait",
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-request-response",
"libp2p-swarm",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.8.4",
]
[[package]]
name = "libp2p-core"
version = "0.32.1"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db5b02602099fb75cb2d16f9ea860a320d6eb82ce41e95ab680912c454805cd5"
dependencies = [
"asn1_der",
"bs58",
"ed25519-dalek",
"either",
"fnv",
"futures",
"futures-timer",
"instant",
"lazy_static",
"log",
"multiaddr",
"multihash",
"multistream-select",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"prost 0.9.0",
"prost-build 0.9.0",
"rand 0.8.4",
"ring",
"rw-stream-sink 0.2.1",
"sha2 0.10.2",
"smallvec",
"thiserror",
"unsigned-varint",
"void",
"zeroize",
]
[[package]]
name = "libp2p-core"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42d46fca305dee6757022e2f5a4f6c023315084d0ed7441c3ab244e76666d979"
checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6"
dependencies = [
"asn1_der",
"bs58",
@@ -3577,12 +3543,12 @@ dependencies = [
"multihash",
"multistream-select",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"prost 0.10.3",
"prost-build 0.10.4",
"pin-project",
"prost",
"prost-build",
"rand 0.8.4",
"ring",
"rw-stream-sink 0.3.0",
"rw-stream-sink",
"sha2 0.10.2",
"smallvec",
"thiserror",
@@ -3593,24 +3559,24 @@ dependencies = [
[[package]]
name = "libp2p-deflate"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86adefc55ea4ed8201149f052fb441210727481dff1fb0b8318460206a79f5fb"
checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71"
dependencies = [
"flate2",
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
]
[[package]]
name = "libp2p-dns"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbb462ec3a51fab457b4b44ac295e8b0a4b04dc175127e615cf996b1f0f1a268"
checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5"
dependencies = [
"async-std-resolver",
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"parking_lot 0.12.0",
"smallvec",
@@ -3619,27 +3585,27 @@ dependencies = [
[[package]]
name = "libp2p-floodsub"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a505d0c6f851cbf2919535150198e530825def8bd3757477f13dc3a57f46cbcc"
checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231"
dependencies = [
"cuckoofilter",
"fnv",
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.7.3",
"smallvec",
]
[[package]]
name = "libp2p-gossipsub"
version = "0.38.0"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9be947d8cea8e6b469201314619395826896d2c051053c3723910ba98e68e04"
checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0"
dependencies = [
"asynchronous-codec",
"base64",
@@ -3649,12 +3615,12 @@ dependencies = [
"futures",
"hex_fmt",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"prometheus-client",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.7.3",
"regex",
"sha2 0.10.2",
@@ -3665,19 +3631,19 @@ dependencies = [
[[package]]
name = "libp2p-identify"
version = "0.36.1"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b84b53490442d086db1fa5375670c9666e79143dccadef3f7c74a4346899a984"
checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06"
dependencies = [
"asynchronous-codec",
"futures",
"futures-timer",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"lru",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"prost-codec",
"smallvec",
"thiserror",
@@ -3686,9 +3652,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
version = "0.37.1"
version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f6b5d4de90fcd35feb65ea6223fd78f3b747a64ca4b65e0813fbe66a27d56aa"
checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851"
dependencies = [
"arrayvec 0.7.2",
"asynchronous-codec",
@@ -3698,11 +3664,11 @@ dependencies = [
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.7.3",
"sha2 0.10.2",
"smallvec",
@@ -3714,9 +3680,9 @@ dependencies = [
[[package]]
name = "libp2p-mdns"
version = "0.37.0"
version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4783f8cf00c7b6c1ff0f1870b4fcf50b042b45533d2e13b6fb464caf447a6951"
checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2"
dependencies = [
"async-io",
"data-encoding",
@@ -3724,7 +3690,7 @@ dependencies = [
"futures",
"if-watch",
"lazy_static",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"rand 0.8.4",
@@ -3735,11 +3701,11 @@ dependencies = [
[[package]]
name = "libp2p-metrics"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc4357140141ba9739eee71b20aa735351c0fc642635b2bffc7f57a6b5c1090"
checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c"
dependencies = [
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-gossipsub",
"libp2p-identify",
"libp2p-kad",
@@ -3751,14 +3717,14 @@ dependencies = [
[[package]]
name = "libp2p-mplex"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ff9c893f2367631a711301d703c47432af898c9bb8253bea0e2c051a13f7640"
checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2"
dependencies = [
"asynchronous-codec",
"bytes",
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"nohash-hasher",
"parking_lot 0.12.0",
@@ -3769,18 +3735,18 @@ dependencies = [
[[package]]
name = "libp2p-noise"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf2cee1dad1c83325bbd182a8e94555778699cec8a9da00086efb7522c4c15ad"
checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f"
dependencies = [
"bytes",
"curve25519-dalek 3.0.2",
"futures",
"lazy_static",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.8.4",
"sha2 0.10.2",
"snow",
@@ -3791,14 +3757,14 @@ dependencies = [
[[package]]
name = "libp2p-ping"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d41516c82fe8dd148ec925eead0c5ec08a0628f7913597e93e126e4dfb4e0787"
checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925"
dependencies = [
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"rand 0.7.3",
@@ -3807,17 +3773,17 @@ dependencies = [
[[package]]
name = "libp2p-plaintext"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db007e737adc5d28b2e03223b0210164928ad742591127130796a72aa8eaf54f"
checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86"
dependencies = [
"asynchronous-codec",
"bytes",
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"unsigned-varint",
"void",
]
@@ -3830,7 +3796,7 @@ checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c"
dependencies = [
"futures",
"log",
"pin-project 1.0.10",
"pin-project",
"rand 0.7.3",
"salsa20",
"sha3 0.9.1",
@@ -3838,9 +3804,9 @@ dependencies = [
[[package]]
name = "libp2p-relay"
version = "0.9.1"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "624ead3406f64437a0d4567c31bd128a9a0b8226d5f16c074038f5d0fc32f650"
checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3"
dependencies = [
"asynchronous-codec",
"bytes",
@@ -3848,12 +3814,12 @@ dependencies = [
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"pin-project 1.0.10",
"prost 0.10.3",
"prost-build 0.10.4",
"pin-project",
"prost",
"prost-build",
"prost-codec",
"rand 0.8.4",
"smallvec",
@@ -3864,20 +3830,20 @@ dependencies = [
[[package]]
name = "libp2p-rendezvous"
version = "0.6.0"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c59967ea2db2c7560f641aa58ac05982d42131863fcd3dd6dcf0dd1daf81c60c"
checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e"
dependencies = [
"asynchronous-codec",
"bimap",
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"rand 0.8.4",
"sha2 0.10.2",
"thiserror",
@@ -3887,15 +3853,15 @@ dependencies = [
[[package]]
name = "libp2p-request-response"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b02e0acb725e5a757d77c96b95298fd73a7394fe82ba7b8bbeea510719cbe441"
checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843"
dependencies = [
"async-trait",
"bytes",
"futures",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"libp2p-swarm",
"log",
"rand 0.7.3",
@@ -3905,18 +3871,18 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
version = "0.36.1"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f4bb21c5abadbf00360c734f16bf87f1712ed4f23cd46148f625d2ddb867346"
checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114"
dependencies = [
"either",
"fnv",
"futures",
"futures-timer",
"instant",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"pin-project 1.0.10",
"pin-project",
"rand 0.7.3",
"smallvec",
"thiserror",
@@ -3925,9 +3891,9 @@ dependencies = [
[[package]]
name = "libp2p-swarm-derive"
version = "0.27.1"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf2fe8c80b43561355f4d51875273b5b6dfbac37952e8f64b1270769305c9d7"
checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76"
dependencies = [
"quote",
"syn",
@@ -3935,9 +3901,9 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4933e38ef21b50698aefc87799c24f2a365c9d3f6cf50471f3f6a0bc410892"
checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b"
dependencies = [
"async-io",
"futures",
@@ -3945,32 +3911,32 @@ dependencies = [
"if-watch",
"ipnet",
"libc",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"socket2 0.4.4",
]
[[package]]
name = "libp2p-uds"
version = "0.32.0"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24bdab114f7f2701757d6541266e1131b429bbae382008f207f2114ee4222dcb"
checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d"
dependencies = [
"async-std",
"futures",
"libp2p-core 0.32.1",
"libp2p-core",
"log",
]
[[package]]
name = "libp2p-wasm-ext"
version = "0.33.0"
version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f066f2b8b1a1d64793f05da2256e6842ecd0293d6735ca2e9bda89831a1bdc06"
checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a"
dependencies = [
"futures",
"js-sys",
"libp2p-core 0.33.0",
"libp2p-core",
"parity-send-wrapper",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -3978,18 +3944,18 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
version = "0.35.0"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39d398fbb29f432c4128fabdaac2ed155c3bcaf1b9bd40eeeb10a471eefacbf5"
checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818"
dependencies = [
"either",
"futures",
"futures-rustls",
"libp2p-core 0.33.0",
"libp2p-core",
"log",
"parking_lot 0.12.0",
"quicksink",
"rw-stream-sink 0.3.0",
"rw-stream-sink",
"soketto",
"url",
"webpki-roots",
@@ -3997,12 +3963,12 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
version = "0.37.0"
version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fe653639ad74877c759720febb0cbcbf4caa221adde4eed2d3126ce5c6f381f"
checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c"
dependencies = [
"futures",
"libp2p-core 0.33.0",
"libp2p-core",
"parking_lot 0.12.0",
"thiserror",
"yamux",
@@ -4462,7 +4428,7 @@ dependencies = [
"bytes",
"futures",
"log",
"pin-project 1.0.10",
"pin-project",
"smallvec",
"unsigned-varint",
]
@@ -6836,33 +6802,13 @@ dependencies = [
"indexmap",
]
[[package]]
name = "pin-project"
version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909"
dependencies = [
"pin-project-internal 0.4.29",
]
[[package]]
name = "pin-project"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e"
dependencies = [
"pin-project-internal 1.0.10",
]
[[package]]
name = "pin-project-internal"
version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a"
dependencies = [
"proc-macro2",
"quote",
"syn",
"pin-project-internal",
]
[[package]]
@@ -7114,16 +7060,6 @@ dependencies = [
"syn",
]
[[package]]
name = "prost"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001"
dependencies = [
"bytes",
"prost-derive 0.9.0",
]
[[package]]
name = "prost"
version = "0.10.3"
@@ -7131,27 +7067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f"
dependencies = [
"bytes",
"prost-derive 0.10.1",
]
[[package]]
name = "prost-build"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5"
dependencies = [
"bytes",
"heck 0.3.2",
"itertools",
"lazy_static",
"log",
"multimap",
"petgraph",
"prost 0.9.0",
"prost-types 0.9.0",
"regex",
"tempfile",
"which",
"prost-derive",
]
[[package]]
@@ -7169,8 +7085,8 @@ dependencies = [
"log",
"multimap",
"petgraph",
"prost 0.10.3",
"prost-types 0.10.1",
"prost",
"prost-types",
"regex",
"tempfile",
"which",
@@ -7184,24 +7100,11 @@ checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007"
dependencies = [
"asynchronous-codec",
"bytes",
"prost 0.10.3",
"prost",
"thiserror",
"unsigned-varint",
]
[[package]]
name = "prost-derive"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe"
dependencies = [
"anyhow",
"itertools",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "prost-derive"
version = "0.10.1"
@@ -7215,16 +7118,6 @@ dependencies = [
"syn",
]
[[package]]
name = "prost-types"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a"
dependencies = [
"bytes",
"prost 0.9.0",
]
[[package]]
name = "prost-types"
version = "0.10.1"
@@ -7232,7 +7125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68"
dependencies = [
"bytes",
"prost 0.10.3",
"prost",
]
[[package]]
@@ -7922,17 +7815,6 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
[[package]]
name = "rw-stream-sink"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
dependencies = [
"futures",
"pin-project 0.4.29",
"static_assertions",
]
[[package]]
name = "rw-stream-sink"
version = "0.3.0"
@@ -7940,7 +7822,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04"
dependencies = [
"futures",
"pin-project 1.0.10",
"pin-project",
"static_assertions",
]
@@ -7998,8 +7880,8 @@ dependencies = [
"libp2p",
"log",
"parity-scale-codec",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"quickcheck",
"rand 0.7.3",
"sc-client-api",
@@ -8651,9 +8533,9 @@ dependencies = [
"lru",
"parity-scale-codec",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"prost 0.10.3",
"prost-build 0.10.4",
"pin-project",
"prost",
"prost-build",
"rand 0.7.3",
"sc-block-builder",
"sc-client-api",
@@ -8691,7 +8573,7 @@ dependencies = [
"futures",
"libp2p",
"parity-scale-codec",
"prost-build 0.10.4",
"prost-build",
"sc-peerset",
"smallvec",
]
@@ -8723,8 +8605,8 @@ dependencies = [
"libp2p",
"log",
"parity-scale-codec",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"sc-client-api",
"sc-network-common",
"sc-peerset",
@@ -8746,8 +8628,8 @@ dependencies = [
"log",
"lru",
"parity-scale-codec",
"prost 0.10.3",
"prost-build 0.10.4",
"prost",
"prost-build",
"quickcheck",
"sc-block-builder",
"sc-client-api",
@@ -8954,7 +8836,7 @@ dependencies = [
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"pin-project",
"rand 0.7.3",
"sc-block-builder",
"sc-chain-spec",
@@ -9099,7 +8981,7 @@ dependencies = [
"libp2p",
"log",
"parking_lot 0.12.0",
"pin-project 1.0.10",
"pin-project",
"rand 0.7.3",
"serde",
"serde_json",
@@ -11189,7 +11071,7 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
"pin-project 1.0.10",
"pin-project",
"tracing",
]
@@ -22,7 +22,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
futures = "0.3.21"
futures-timer = "3.0.1"
ip_network = "0.4.1"
libp2p = { version = "0.45.1", default-features = false, features = ["kad"] }
libp2p = { version = "0.46.1", default-features = false, features = ["kad"] }
log = "0.4.17"
prost = "0.10"
rand = "0.7.2"
+1 -1
View File
@@ -18,7 +18,7 @@ clap = { version = "3.1.18", features = ["derive"] }
fdlimit = "0.2.1"
futures = "0.3.21"
hex = "0.4.2"
libp2p = "0.45.1"
libp2p = "0.46.1"
log = "0.4.17"
names = { version = "0.13.0", default-features = false }
parity-scale-codec = "3.0.0"
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
async-trait = "0.1.42"
futures = { version = "0.3.21", features = ["thread-pool"] }
futures-timer = "3.0.1"
libp2p = { version = "0.45.1", default-features = false }
libp2p = { version = "0.46.1", default-features = false }
log = "0.4.17"
parking_lot = "0.12.0"
serde = { version = "1.0", features = ["derive"] }
+1 -1
View File
@@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]
ahash = "0.7.6"
futures = "0.3.21"
futures-timer = "3.0.1"
libp2p = { version = "0.45.1", default-features = false }
libp2p = { version = "0.46.1", default-features = false }
log = "0.4.17"
lru = "0.7.5"
tracing = "0.1.29"
+1 -1
View File
@@ -29,7 +29,7 @@ futures = "0.3.21"
futures-timer = "3.0.2"
hex = "0.4.0"
ip_network = "0.4.1"
libp2p = "0.45.1"
libp2p = "0.46.1"
linked_hash_set = "0.1.3"
linked-hash-map = "0.5.4"
log = "0.4.17"
+1 -1
View File
@@ -21,6 +21,6 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
"derive",
] }
futures = "0.3.21"
libp2p = "0.45.1"
libp2p = "0.46.1"
smallvec = "1.8.0"
sc-peerset = { version = "4.0.0-dev", path = "../../peerset" }
+1 -1
View File
@@ -21,7 +21,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
"derive",
] }
futures = "0.3.21"
libp2p = "0.45.1"
libp2p = "0.46.1"
log = "0.4.16"
prost = "0.10"
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
+3 -3
View File
@@ -52,8 +52,8 @@ use futures_timer::Delay;
use ip_network::IpNetwork;
use libp2p::{
core::{
connection::{ConnectionId, ListenerId},
ConnectedPoint, Multiaddr, PeerId, PublicKey,
connection::ConnectionId, transport::ListenerId, ConnectedPoint, Multiaddr, PeerId,
PublicKey,
},
kad::{
handler::KademliaHandlerProto,
@@ -1030,7 +1030,7 @@ mod tests {
let noise_keys =
noise::Keypair::<noise::X25519Spec>::new().into_authentic(&keypair).unwrap();
let transport = MemoryTransport
let transport = MemoryTransport::new()
.upgrade(upgrade::Version::V1)
.authenticate(noise::NoiseConfig::xx(noise_keys).into_authenticated())
.multiplex(yamux::YamuxConfig::default())
+2 -3
View File
@@ -21,9 +21,8 @@ use fnv::FnvHashMap;
use futures::prelude::*;
use libp2p::{
core::{
connection::{ConnectionId, ListenerId},
either::EitherOutput,
ConnectedPoint, PeerId, PublicKey,
connection::ConnectionId, either::EitherOutput, transport::ListenerId, ConnectedPoint,
PeerId, PublicKey,
},
identify::{Identify, IdentifyConfig, IdentifyEvent, IdentifyInfo},
ping::{Ping, PingConfig, PingEvent, PingSuccess},
+1 -4
View File
@@ -27,10 +27,7 @@ use bytes::Bytes;
use codec::{Decode, DecodeAll, Encode};
use futures::{channel::oneshot, prelude::*};
use libp2p::{
core::{
connection::{ConnectionId, ListenerId},
ConnectedPoint,
},
core::{connection::ConnectionId, transport::ListenerId, ConnectedPoint},
request_response::OutboundFailure,
swarm::{
ConnectionHandler, IntoConnectionHandler, NetworkBehaviour, NetworkBehaviourAction,
@@ -23,8 +23,8 @@ use crate::protocol::notifications::{Notifications, NotificationsOut, ProtocolCo
use futures::prelude::*;
use libp2p::{
core::{
connection::{ConnectionId, ListenerId},
transport::MemoryTransport,
connection::ConnectionId,
transport::{ListenerId, MemoryTransport},
upgrade, ConnectedPoint,
},
identity, noise,
@@ -56,7 +56,7 @@ fn build_nodes() -> (Swarm<CustomProtoWithAddr>, Swarm<CustomProtoWithAddr>) {
let noise_keys =
noise::Keypair::<noise::X25519Spec>::new().into_authentic(&keypair).unwrap();
let transport = MemoryTransport
let transport = MemoryTransport::new()
.upgrade(upgrade::Version::V1)
.authenticate(noise::NoiseConfig::xx(noise_keys).into_authenticated())
.multiplex(yamux::YamuxConfig::default())
@@ -40,10 +40,7 @@ use futures::{
prelude::*,
};
use libp2p::{
core::{
connection::{ConnectionId, ListenerId},
ConnectedPoint, Multiaddr, PeerId,
},
core::{connection::ConnectionId, transport::ListenerId, ConnectedPoint, Multiaddr, PeerId},
request_response::{
handler::RequestResponseHandler, ProtocolSupport, RequestResponse, RequestResponseCodec,
RequestResponseConfig, RequestResponseEvent, RequestResponseMessage, ResponseChannel,
@@ -968,7 +965,7 @@ mod tests {
let noise_keys =
noise::Keypair::<noise::X25519Spec>::new().into_authentic(&keypair).unwrap();
let transport = MemoryTransport
let transport = MemoryTransport::new()
.upgrade(upgrade::Version::V1)
.authenticate(noise::NoiseConfig::xx(noise_keys).into_authenticated())
.multiplex(libp2p::yamux::YamuxConfig::default())
+5 -4
View File
@@ -54,16 +54,17 @@ pub fn build_transport(
) -> (Boxed<(PeerId, StreamMuxerBox)>, Arc<BandwidthSinks>) {
// Build the base layer of the transport.
let transport = if !memory_only {
let desktop_trans = tcp::TcpConfig::new().nodelay(true);
let tcp_config = tcp::GenTcpConfig::new().nodelay(true);
let desktop_trans = tcp::TcpTransport::new(tcp_config.clone());
let desktop_trans = websocket::WsConfig::new(desktop_trans)
.or_transport(tcp::TcpConfig::new().nodelay(true));
.or_transport(tcp::TcpTransport::new(tcp_config.clone()));
let dns_init = futures::executor::block_on(dns::DnsConfig::system(desktop_trans));
EitherTransport::Left(if let Ok(dns) = dns_init {
EitherTransport::Left(dns)
} else {
let desktop_trans = tcp::TcpConfig::new().nodelay(true);
let desktop_trans = tcp::TcpTransport::new(tcp_config.clone());
let desktop_trans = websocket::WsConfig::new(desktop_trans)
.or_transport(tcp::TcpConfig::new().nodelay(true));
.or_transport(tcp::TcpTransport::new(tcp_config));
EitherTransport::Right(desktop_trans.map_err(dns::DnsErr::Transport))
})
} else {
+1 -1
View File
@@ -23,7 +23,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
] }
either = "1.5.3"
futures = "0.3.21"
libp2p = "0.45.1"
libp2p = "0.46.1"
log = "0.4.17"
lru = "0.7.5"
prost = "0.10"
+1 -1
View File
@@ -17,7 +17,7 @@ async-std = "1.11.0"
async-trait = "0.1.50"
futures = "0.3.21"
futures-timer = "3.0.1"
libp2p = { version = "0.45.1", default-features = false }
libp2p = { version = "0.46.1", default-features = false }
log = "0.4.17"
parking_lot = "0.12.0"
rand = "0.7.2"
+1 -1
View File
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.21"
libp2p = { version = "0.45.1", default-features = false }
libp2p = { version = "0.46.1", default-features = false }
log = "0.4.17"
serde_json = "1.0.79"
wasm-timer = "0.2"
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
chrono = "0.4.19"
futures = "0.3.21"
libp2p = { version = "0.45.1", default-features = false, features = ["dns-async-std", "tcp-async-io", "wasm-ext", "websocket"] }
libp2p = { version = "0.46.1", default-features = false, features = ["dns-async-std", "tcp-async-io", "wasm-ext", "websocket"] }
log = "0.4.17"
parking_lot = "0.12.0"
pin-project = "1.0.10"
+2 -1
View File
@@ -31,7 +31,8 @@ const CONNECT_TIMEOUT: Duration = Duration::from_secs(20);
pub(crate) fn initialize_transport() -> Result<WsTrans, io::Error> {
let transport = {
let inner = block_on(libp2p::dns::DnsConfig::system(libp2p::tcp::TcpConfig::new()))?;
let tcp_transport = libp2p::tcp::TcpTransport::new(libp2p::tcp::GenTcpConfig::new());
let inner = block_on(libp2p::dns::DnsConfig::system(tcp_transport))?;
libp2p::websocket::framed::WsConfig::new(inner).and_then(|connec, _| {
let connec = connec
.with(|item| {