Update to libp2p-0.36 (#8420)

* Update to libp2p-0.36

* Some more Cargo.lock updates.
This commit is contained in:
Roman Borschel
2021-03-24 19:29:35 +01:00
committed by GitHub
parent 9a72134188
commit e1570b9ab4
15 changed files with 246 additions and 75 deletions
+226 -57
View File
@@ -329,6 +329,20 @@ dependencies = [
"wasm-bindgen-futures",
]
[[package]]
name = "async-std-resolver"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f665c56111e244fe38e7708ee10948a4356ad6a548997c21f5a63a0f4e0edc4d"
dependencies = [
"async-std",
"async-trait",
"futures-io",
"futures-util",
"pin-utils",
"trust-dns-resolver",
]
[[package]]
name = "async-task"
version = "4.0.3"
@@ -1464,6 +1478,18 @@ version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "enum-as-inner"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "enumflags2"
version = "0.6.4"
@@ -1912,9 +1938,9 @@ dependencies = [
[[package]]
name = "fs-swap"
version = "0.2.5"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5839fda247e24ca4919c87c71dd5ca658f1f39e4f06829f80e3f15c3bafcfc2c"
checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5"
dependencies = [
"lazy_static",
"libc",
@@ -2407,6 +2433,17 @@ dependencies = [
"memmap",
]
[[package]]
name = "hostname"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
dependencies = [
"libc",
"match_cfg",
"winapi 0.3.9",
]
[[package]]
name = "http"
version = "0.1.21"
@@ -2525,7 +2562,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project 1.0.5",
"socket2",
"socket2 0.3.19",
"tokio 0.2.25",
"tower-service",
"tracing",
@@ -2595,9 +2632,9 @@ dependencies = [
[[package]]
name = "if-watch"
version = "0.1.8"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b8538953a3f0d0d3868f0a706eb4273535e10d72acb5c82c1c23ae48835c85"
checksum = "6a6d52908d4ea4ab2bc22474ba149bf1011c8e2c3ebc1ff593ae28ac44f494b6"
dependencies = [
"async-io",
"futures 0.3.13",
@@ -2695,6 +2732,18 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f"
[[package]]
name = "ipconfig"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7"
dependencies = [
"socket2 0.3.19",
"widestring",
"winapi 0.3.9",
"winreg",
]
[[package]]
name = "ipnet"
version = "2.3.0"
@@ -3040,9 +3089,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
[[package]]
name = "libc"
version = "0.2.88"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a"
checksum = "ba4aede83fc3617411dc6993bc8c70919750c1c257c6ca6a502aed6e0e2394ae"
[[package]]
name = "libloading"
@@ -3062,9 +3111,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
[[package]]
name = "libp2p"
version = "0.35.1"
version = "0.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc225a49973cf9ab10d0cdd6a4b8f0cda299df9b760824bbb623f15f8f0c95a"
checksum = "fe5759b526f75102829c15e4d8566603b4bf502ed19b5f35920d98113873470d"
dependencies = [
"atomic",
"bytes 1.0.1",
@@ -3083,6 +3132,7 @@ dependencies = [
"libp2p-ping",
"libp2p-plaintext",
"libp2p-pnet",
"libp2p-relay",
"libp2p-request-response",
"libp2p-swarm",
"libp2p-swarm-derive",
@@ -3100,9 +3150,9 @@ dependencies = [
[[package]]
name = "libp2p-core"
version = "0.27.1"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a2d56aadc2c2bf22cd7797f86e56a65b5b3994a0136b65be3106938acae7a26"
checksum = "c1e1797734bbd4c453664fefb029628f77c356ffc5bce98f06b18a7db3ebb0f7"
dependencies = [
"asn1_der",
"bs58",
@@ -3134,9 +3184,9 @@ dependencies = [
[[package]]
name = "libp2p-deflate"
version = "0.27.1"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d42eed63305f0420736fa487f9acef720c4528bd7852a6a760f5ccde4813345"
checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08"
dependencies = [
"flate2",
"futures 0.3.13",
@@ -3145,20 +3195,23 @@ dependencies = [
[[package]]
name = "libp2p-dns"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5153b6db68fd4baa3b304e377db744dd8fea8ff4e4504509ee636abcde88d3e3"
checksum = "9712eb3e9f7dcc77cc5ca7d943b6a85ce4b1faaf91a67e003442412a26d6d6f8"
dependencies = [
"async-std-resolver",
"futures 0.3.13",
"libp2p-core",
"log",
"smallvec 1.6.1",
"trust-dns-resolver",
]
[[package]]
name = "libp2p-floodsub"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3c63dfa06581b24b1d12bf9815b43689a784424be217d6545c800c7c75a207f"
checksum = "897645f99e9b396df256a6aa8ba8c4bc019ac6b7c62556f624b5feea9acc82bb"
dependencies = [
"cuckoofilter",
"fnv",
@@ -3174,9 +3227,9 @@ dependencies = [
[[package]]
name = "libp2p-gossipsub"
version = "0.28.0"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "502dc5fcbfec4aa1c63ef3f7307ffe20e90c1a1387bf23ed0bec087f2dde58a1"
checksum = "794b0c85f5df1acbc1fc38414d37272594811193b6325c76d3931c3e3f5df8c0"
dependencies = [
"asynchronous-codec 0.6.0",
"base64 0.13.0",
@@ -3200,9 +3253,9 @@ dependencies = [
[[package]]
name = "libp2p-identify"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b40fb36a059b7a8cce1514bd8b546fa612e006c9937caa7f5950cb20021fe91e"
checksum = "f88ebc841d744979176ab4b8b294a3e655a7ba4ef26a905d073a52b49ed4dff5"
dependencies = [
"futures 0.3.13",
"libp2p-core",
@@ -3216,9 +3269,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
version = "0.28.1"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3da6c9acbcc05f93235d201d7d45ef4e8b88a45d8836f98becd8b4d443f066"
checksum = "bbb5b90b6bda749023a85f60b49ea74b387c25f17d8df541ae72a3c75dd52e63"
dependencies = [
"arrayvec 0.5.2",
"asynchronous-codec 0.6.0",
@@ -3242,9 +3295,9 @@ dependencies = [
[[package]]
name = "libp2p-mdns"
version = "0.28.1"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e9e6374814d1b118d97ccabdfc975c8910bd16dc38a8bc058eeb08bf2080fe1"
checksum = "be28ca13bb648d249a9baebd750ebc64ce7040ddd5f0ce1035ff1f4549fb596d"
dependencies = [
"async-io",
"data-encoding",
@@ -3255,17 +3308,17 @@ dependencies = [
"libp2p-core",
"libp2p-swarm",
"log",
"rand 0.7.3",
"rand 0.8.3",
"smallvec 1.6.1",
"socket2",
"socket2 0.4.0",
"void",
]
[[package]]
name = "libp2p-mplex"
version = "0.27.1"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "350ce8b3923594aedabd5d6e3f875d058435052a29c3f32df378bc70d10be464"
checksum = "85e9b544335d1ed30af71daa96edbefadef6f19c7a55f078b9fc92c87163105d"
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
@@ -3281,9 +3334,9 @@ dependencies = [
[[package]]
name = "libp2p-noise"
version = "0.29.0"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aca322b52a0c5136142a7c3971446fb1e9964923a526c9cc6ef3b7c94e57778"
checksum = "36db0f0db3b0433f5b9463f1c0cd9eadc0a3734a9170439ce501ff99733a88bd"
dependencies = [
"bytes 1.0.1",
"curve25519-dalek 3.0.2",
@@ -3303,9 +3356,9 @@ dependencies = [
[[package]]
name = "libp2p-ping"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f3813276d0708c8db0f500d8beda1bda9ad955723b9cb272c41f4727256f73c"
checksum = "dea10fc5209260915ea65b78f612d7ff78a29ab288e7aa3250796866af861c45"
dependencies = [
"futures 0.3.13",
"libp2p-core",
@@ -3318,9 +3371,9 @@ dependencies = [
[[package]]
name = "libp2p-plaintext"
version = "0.27.1"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d58defcadb646ae4b033e130b48d87410bf76394dc3335496cae99dac803e61"
checksum = "0c8c37b4d2a075b4be8442760a5f8c037180f0c8dd5b5734b9978ab868b3aa11"
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
@@ -3348,10 +3401,33 @@ dependencies = [
]
[[package]]
name = "libp2p-request-response"
version = "0.9.1"
name = "libp2p-relay"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10e5552827c33d8326502682da73a0ba4bfa40c1b55b216af3c303f32169dd89"
checksum = "3ff268be6a9d6f3c6cca3b81bbab597b15217f9ad8787c6c40fc548c1af7cd24"
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.0.1",
"futures 0.3.13",
"futures-timer 3.0.2",
"libp2p-core",
"libp2p-swarm",
"log",
"pin-project 1.0.5",
"prost",
"prost-build",
"rand 0.7.3",
"smallvec 1.6.1",
"unsigned-varint 0.7.0",
"void",
"wasm-timer",
]
[[package]]
name = "libp2p-request-response"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "725367dd2318c54c5ab1a6418592e5b01c63b0dedfbbfb8389220b2bcf691899"
dependencies = [
"async-trait",
"bytes 1.0.1",
@@ -3369,9 +3445,9 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
version = "0.27.2"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7955b973e1fd2bd61ffd43ce261c1223f61f4aacd5bae362a924993f9a25fd98"
checksum = "75c26980cadd7c25d89071cb23e1f7f5df4863128cc91d83c6ddc72338cecafa"
dependencies = [
"either",
"futures 0.3.13",
@@ -3395,9 +3471,9 @@ dependencies = [
[[package]]
name = "libp2p-tcp"
version = "0.27.1"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a5aef80e519a6cb8e2663605142f97baaaea1a252eecbf8756184765f7471b"
checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9"
dependencies = [
"async-io",
"futures 0.3.13",
@@ -3407,14 +3483,14 @@ dependencies = [
"libc",
"libp2p-core",
"log",
"socket2",
"socket2 0.4.0",
]
[[package]]
name = "libp2p-uds"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80ac51ce419f60be966e02103c17f67ff5dc4422ba83ba54d251d6c62a4ed487"
checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5"
dependencies = [
"async-std",
"futures 0.3.13",
@@ -3424,9 +3500,9 @@ dependencies = [
[[package]]
name = "libp2p-wasm-ext"
version = "0.27.0"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6149c46cb76935c80bc8be6ec6e3ebd5f5e1679765a255fb34331d54610f15dd"
checksum = "6df65fc13f6188edf7e6927b086330448b3ca27af86b49748c6d299d7c8d9040"
dependencies = [
"futures 0.3.13",
"js-sys",
@@ -3438,9 +3514,9 @@ dependencies = [
[[package]]
name = "libp2p-websocket"
version = "0.28.0"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3b1c6a3431045da8b925ed83384e4c5163e14b990572307fca9c507435d4d22"
checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74"
dependencies = [
"either",
"futures 0.3.13",
@@ -3456,9 +3532,9 @@ dependencies = [
[[package]]
name = "libp2p-yamux"
version = "0.30.1"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4819358c542a86ff95f6ae691efb4b94ddaf477079b01a686f5705b79bfc232a"
checksum = "96d6144cc94143fb0a8dd1e7c2fbcc32a2808168bcd1d69920635424d5993b7b"
dependencies = [
"futures 0.3.13",
"libp2p-core",
@@ -3586,6 +3662,15 @@ dependencies = [
"hashbrown",
]
[[package]]
name = "lru-cache"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
dependencies = [
"linked-hash-map",
]
[[package]]
name = "mach"
version = "0.3.2"
@@ -3601,6 +3686,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
[[package]]
name = "match_cfg"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
[[package]]
name = "matchers"
version = "0.0.1"
@@ -3705,9 +3796,9 @@ dependencies = [
[[package]]
name = "minicbor"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c2b2c73f9640fccab53947e2b3474d5071fcbc8f82cac51ddf6c8041a30a9ea"
checksum = "ea79ce4ab9f445ec6b71833a2290ac0a29c9dde0fa7cae4c481eecae021d9bd9"
dependencies = [
"minicbor-derive",
]
@@ -3805,7 +3896,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897"
dependencies = [
"socket2",
"socket2 0.3.19",
"winapi 0.3.9",
]
@@ -3911,7 +4002,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f"
dependencies = [
"libc",
"socket2",
"socket2 0.3.19",
]
[[package]]
@@ -5555,9 +5646,9 @@ dependencies = [
[[package]]
name = "parity-multiaddr"
version = "0.11.1"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2c6805f98667a3828afb2ec2c396a8d610497e8d546f5447188aae47c5a79ec"
checksum = "58341485071825827b7f03cf7efd1cb21e6a709bea778fb50227fd45d2f361b4"
dependencies = [
"arrayref",
"bs58",
@@ -6620,6 +6711,16 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "resolv-conf"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00"
dependencies = [
"hostname",
"quick-error 1.2.3",
]
[[package]]
name = "retain_mut"
version = "0.1.2"
@@ -8366,6 +8467,16 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "socket2"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "soketto"
version = "0.4.2"
@@ -10215,6 +10326,49 @@ dependencies = [
"keccak-hasher",
]
[[package]]
name = "trust-dns-proto"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d57e219ba600dd96c2f6d82eb79645068e14edbc5c7e27514af40436b88150c"
dependencies = [
"async-trait",
"cfg-if 1.0.0",
"data-encoding",
"enum-as-inner",
"futures-channel",
"futures-io",
"futures-util",
"idna 0.2.2",
"ipnet",
"lazy_static",
"log",
"rand 0.8.3",
"smallvec 1.6.1",
"thiserror",
"tinyvec",
"url 2.2.1",
]
[[package]]
name = "trust-dns-resolver"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0437eea3a6da51acc1e946545ff53d5b8fb2611ff1c3bed58522dde100536ae"
dependencies = [
"cfg-if 1.0.0",
"futures-util",
"ipconfig",
"lazy_static",
"log",
"lru-cache",
"parking_lot 0.11.1",
"resolv-conf",
"smallvec 1.6.1",
"thiserror",
"trust-dns-proto",
]
[[package]]
name = "try-lock"
version = "0.2.3"
@@ -10914,6 +11068,12 @@ dependencies = [
"thiserror",
]
[[package]]
name = "widestring"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c"
[[package]]
name = "winapi"
version = "0.2.8"
@@ -10957,6 +11117,15 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winreg"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
@@ -8,7 +8,7 @@ license = "Apache-2.0"
[dependencies]
futures-timer = "3.0.2"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
jsonrpc-core = "15.0.0"
serde = "1.0.106"
serde_json = "1.0.48"
+1 -1
View File
@@ -105,7 +105,7 @@ try-runtime-cli = { version = "0.9.0", optional = true, path = "../../../utils/f
wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.18", optional = true }
browser-utils = { package = "substrate-browser-utils", path = "../../../utils/browser", optional = true, version = "0.9.0"}
libp2p-wasm-ext = { version = "0.27", features = ["websocket"], optional = true }
libp2p-wasm-ext = { version = "0.28", features = ["websocket"], optional = true }
[target.'cfg(target_arch="x86_64")'.dependencies]
node-executor = { version = "2.0.0", path = "../executor", features = [ "wasmtime" ] }
@@ -23,7 +23,7 @@ derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.9"
futures-timer = "3.0.1"
libp2p = { version = "0.35.1", default-features = false, features = ["kad"] }
libp2p = { version = "0.36.0", default-features = false, features = ["kad"] }
log = "0.4.8"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.9.0"}
prost = "0.7"
+1 -1
View File
@@ -18,7 +18,7 @@ regex = "1.4.2"
tokio = { version = "0.2.21", features = [ "signal", "rt-core", "rt-threaded", "blocking" ] }
futures = "0.3.9"
fdlimit = "0.2.1"
libp2p = "0.35.1"
libp2p = "0.36.0"
parity-scale-codec = "2.0.0"
hex = "0.4.2"
rand = "0.7.3"
+1 -1
View File
@@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.9"
futures-timer = "3.0.1"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
log = "0.4.8"
lru = "0.6.5"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.9.0", path = "../../utils/prometheus" }
+3 -3
View File
@@ -63,17 +63,17 @@ wasm-timer = "0.2"
zeroize = "1.2.0"
[dependencies.libp2p]
version = "0.35.1"
version = "0.36.0"
[target.'cfg(target_os = "unknown")'.dependencies.libp2p]
version = "0.35.1"
version = "0.36.0"
default-features = false
features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "request-response", "tcp-async-io", "websocket", "yamux"]
[dev-dependencies]
assert_matches = "1.3"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
quickcheck = "1.0.3"
rand = "0.7.2"
sp-keyring = { version = "3.0.0", path = "../../primitives/keyring" }
+2 -2
View File
@@ -61,7 +61,7 @@ use libp2p::kad::handler::KademliaHandlerProto;
use libp2p::kad::QueryId;
use libp2p::kad::record::{self, store::{MemoryStore, RecordStore}};
#[cfg(not(target_os = "unknown"))]
use libp2p::mdns::{Mdns, MdnsEvent};
use libp2p::mdns::{Mdns, MdnsConfig, MdnsEvent};
use libp2p::multiaddr::Protocol;
use log::{debug, info, trace, warn};
use std::{cmp, collections::{HashMap, HashSet, VecDeque}, io, num::NonZeroUsize, time::Duration};
@@ -220,7 +220,7 @@ impl DiscoveryConfig {
discovery_only_if_under_num,
#[cfg(not(target_os = "unknown"))]
mdns: if enable_mdns {
MdnsWrapper::Instantiating(Mdns::new().boxed())
MdnsWrapper::Instantiating(Mdns::new(MdnsConfig::default()).boxed())
} else {
MdnsWrapper::Disabled
},
+3 -2
View File
@@ -63,10 +63,11 @@ pub fn build_transport(
let desktop_trans = tcp::TcpConfig::new().nodelay(true);
let desktop_trans = websocket::WsConfig::new(desktop_trans.clone())
.or_transport(desktop_trans);
OptionalTransport::some(if let Ok(dns) = dns::DnsConfig::new(desktop_trans.clone()) {
let dns_init = futures::executor::block_on(dns::DnsConfig::system(desktop_trans.clone()));
OptionalTransport::some(if let Ok(dns) = dns_init {
EitherTransport::Left(dns)
} else {
EitherTransport::Right(desktop_trans.map_err(dns::DnsErr::Underlying))
EitherTransport::Right(desktop_trans.map_err(dns::DnsErr::Transport))
})
} else {
OptionalTransport::none()
+1 -1
View File
@@ -20,7 +20,7 @@ parking_lot = "0.11.1"
futures = "0.3.9"
futures-timer = "3.0.1"
rand = "0.7.2"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
sc-consensus = { version = "0.9.0", path = "../../consensus/common" }
sc-client-api = { version = "3.0.0", path = "../../api" }
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.9"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
sp-utils = { version = "3.0.0", path = "../../primitives/utils"}
log = "0.4.8"
serde_json = "1.0.41"
+1 -1
View File
@@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"]
parking_lot = "0.11.1"
futures = "0.3.9"
wasm-timer = "0.2.5"
libp2p = { version = "0.35.1", default-features = false, features = ["dns", "tcp-async-io", "wasm-ext", "websocket"] }
libp2p = { version = "0.36.0", default-features = false, features = ["dns-async-std", "tcp-async-io", "wasm-ext", "websocket"] }
log = "0.4.8"
pin-project = "1.0.4"
rand = "0.7.2"
+2 -1
View File
@@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use futures::{
executor::block_on,
prelude::*,
ready,
task::{Context, Poll},
@@ -47,7 +48,7 @@ pub(crate) fn initialize_transport(
// an external transport on desktop and the fallback is used all the time.
#[cfg(not(target_os = "unknown"))]
let transport = transport.or_transport({
let inner = libp2p::dns::DnsConfig::new(libp2p::tcp::TcpConfig::new())?;
let inner = block_on(libp2p::dns::DnsConfig::system(libp2p::tcp::TcpConfig::new()))?;
libp2p::websocket::framed::WsConfig::new(inner).and_then(|connec, _| {
let connec = connec
.with(|item| {
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
thiserror = "1.0.21"
libp2p = { version = "0.35.1", default-features = false }
libp2p = { version = "0.36.0", default-features = false }
log = "0.4.8"
sp-core = { path= "../../core", version = "3.0.0"}
sp-inherents = { version = "3.0.0", path = "../../inherents" }
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
futures = { version = "0.3", features = ["compat"] }
futures01 = { package = "futures", version = "0.1.29" }
log = "0.4.8"
libp2p-wasm-ext = { version = "0.27", features = ["websocket"] }
libp2p-wasm-ext = { version = "0.28", features = ["websocket"] }
console_error_panic_hook = "0.1.6"
js-sys = "0.3.34"
wasm-bindgen = "0.2.57"