diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..4dbe0bb54e Binary files /dev/null and b/.DS_Store differ diff --git a/Cargo.lock b/Cargo.lock index 324b0cf432..4b5e1f475e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -301,7 +301,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -312,7 +312,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -328,6 +328,30 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http", + "log", + "url", +] + [[package]] name = "atty" version = "0.2.14" @@ -817,7 +841,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1107,13 +1131,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1250,7 +1274,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1316,18 +1340,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enum-as-inner" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "enum-as-inner" version = "0.6.0" @@ -1337,7 +1349,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1424,9 +1436,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" +checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" [[package]] name = "file-rotate" @@ -1529,9 +1541,9 @@ dependencies = [ [[package]] name = "futures-bounded" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b07bbbe7d7e78809544c6f718d875627addc73a7c3582447abc052cd3dc67e0" +checksum = "4a2b7bc3e71d5b3c6e1436bd600d88a7a9315b3589883018123646767ea2d522" dependencies = [ "futures-timer", "futures-util", @@ -1594,7 +1606,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1817,6 +1829,52 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +[[package]] +name = "hickory-proto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand", + "socket2 0.5.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.3" @@ -1962,17 +2020,6 @@ dependencies = [ "cc", ] -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -2012,6 +2059,25 @@ dependencies = [ "windows", ] +[[package]] +name = "igd-next" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e065e90a518ab5fedf79aa1e4b784e10f8e484a834f6bda85c42633a2cb7af" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http", + "hyper", + "log", + "rand", + "tokio", + "url", + "xmltree", +] + [[package]] name = "ignore" version = "0.4.20" @@ -2047,9 +2113,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.2", @@ -2076,7 +2142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c50453ec3a6555fad17b1cd1a80d16af5bc7cb35094f64e429fd46549018c6a3" dependencies = [ "ahash", - "indexmap 2.0.2", + "indexmap 2.1.0", "is-terminal", "itoa", "log", @@ -2172,9 +2238,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -2187,9 +2253,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libm" @@ -2199,11 +2265,12 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.52.3" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d07d1502a027366d55afe187621c2d7895dc111a3df13b35fed698049681d7" +checksum = "67c4d7fa0c6098ed39b90780715be07b70046ee64570371147bdc771503a5d3c" dependencies = [ "bytes", + "either", "futures", "futures-timer", "getrandom", @@ -2224,16 +2291,19 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "libp2p-tcp", + "libp2p-upnp", "libp2p-yamux", "multiaddr", "pin-project", + "rw-stream-sink", + "thiserror", ] [[package]] name = "libp2p-allow-block-list" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55b46558c5c0bf99d3e2a1a38fd54ff5476ca66dd1737b12466a1824dd219311" +checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" dependencies = [ "libp2p-core", "libp2p-identity", @@ -2243,11 +2313,12 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e907be08be5e4152317a79d310a6f501a1b5c02a81dcb065dc865475bbae9498" +checksum = "d95151726170e41b591735bf95c42b888fe4aa14f65216a9fbf0edcc04510586" dependencies = [ "async-trait", + "asynchronous-codec 0.6.2", "futures", "futures-timer", "instant", @@ -2255,16 +2326,17 @@ dependencies = [ "libp2p-identity", "libp2p-request-response", "libp2p-swarm", - "log", "quick-protobuf", + "quick-protobuf-codec", "rand", + "tracing", ] [[package]] name = "libp2p-connection-limits" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5107ad45cb20b2f6c3628c7b6014b996fcb13a88053f4569c872c6e30abf58" +checksum = "f2af4b1e1a1d6c5005a59b42287c0a526bcce94d8d688e2e9233b18eb843ceb4" dependencies = [ "libp2p-core", "libp2p-identity", @@ -2274,9 +2346,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd44289ab25e4c9230d9246c475a22241e301b23e8f4061d3bdef304a1a99713" +checksum = "8b8b63f1df89173dc6c582c07abfc072acf2792ce1787363ab266e0a18882fac" dependencies = [ "either", "fnv", @@ -2284,7 +2356,6 @@ dependencies = [ "futures-timer", "instant", "libp2p-identity", - "log", "multiaddr", "multihash", "multistream-select", @@ -2296,33 +2367,34 @@ dependencies = [ "rw-stream-sink", "smallvec", "thiserror", + "tracing", "unsigned-varint", "void", ] [[package]] name = "libp2p-dns" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a18db73084b4da2871438f6239fef35190b05023de7656e877c18a00541a3b" +checksum = "852f9ab7c3eba64b158a4d9ab00848b1d732fa9d3224aa0a75643756f98aa136" dependencies = [ "async-trait", "futures", + "hickory-resolver", "libp2p-core", "libp2p-identity", - "log", "parking_lot", "smallvec", - "trust-dns-resolver", + "tracing", ] [[package]] name = "libp2p-gossipsub" -version = "0.45.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d157562dba6017193e5285acf6b1054759e83540bfd79f75b69d6ce774c88da" +checksum = "201f0626acd8985fae7fdd318e86c954574b9eef2e5dec433936a19a0338393d" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "base64 0.21.5", "byteorder", "bytes", @@ -2336,7 +2408,6 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "log", "prometheus-client", "quick-protobuf", "quick-protobuf-codec", @@ -2344,17 +2415,18 @@ dependencies = [ "regex", "sha2", "smallvec", + "tracing", "unsigned-varint", "void", ] [[package]] name = "libp2p-identify" -version = "0.43.1" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a96638a0a176bec0a4bcaebc1afa8cf909b114477209d7456ade52c61cd9cd" +checksum = "0544703553921214556f7567278b4f00cdd5052d29b0555ab88290cbfe54d81c" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "either", "futures", "futures-bounded", @@ -2362,12 +2434,12 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "log", "lru", "quick-protobuf", "quick-protobuf-codec", "smallvec", "thiserror", + "tracing", "void", ] @@ -2391,12 +2463,12 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.44.6" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ea178dabba6dde6ffc260a8e0452ccdc8f79becf544946692fff9d412fc29d" +checksum = "91de4ab46f01286bf0a92d517b51b52b53b6f4d32a774a432ba1c49b39768043" dependencies = [ "arrayvec", - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "either", "fnv", @@ -2406,13 +2478,13 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "log", "quick-protobuf", "quick-protobuf-codec", "rand", "sha2", "smallvec", "thiserror", + "tracing", "uint", "unsigned-varint", "void", @@ -2420,30 +2492,30 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.44.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a2567c305232f5ef54185e9604579a894fd0674819402bb0ac0246da82f52a" +checksum = "68f273a551ee9d0a79695f75afaeafb1371459dec69c29555e8a73a35608e96a" dependencies = [ "data-encoding", "futures", + "hickory-proto", "if-watch", "libp2p-core", "libp2p-identity", "libp2p-swarm", - "log", "rand", "smallvec", "socket2 0.5.5", "tokio", - "trust-dns-proto 0.22.0", + "tracing", "void", ] [[package]] name = "libp2p-metrics" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239ba7d28f8d0b5d77760dc6619c05c7e88e74ec8fbbe97f856f20a56745e620" +checksum = "7ac3c92d46c061d3564b660c143356de966a9ab17eb6bfa8d6819daa2ae49b28" dependencies = [ "instant", "libp2p-core", @@ -2452,22 +2524,21 @@ dependencies = [ "libp2p-identity", "libp2p-kad", "libp2p-swarm", - "once_cell", "prometheus-client", ] [[package]] name = "libp2p-noise" -version = "0.43.2" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eeec39ad3ad0677551907dd304b2f13f17208ccebe333bef194076cd2e8921" +checksum = "8ecd0545ce077f6ea5434bcb76e8d0fe942693b4380aaad0d34a358c2bd05793" dependencies = [ + "asynchronous-codec 0.7.0", "bytes", "curve25519-dalek", "futures", "libp2p-core", "libp2p-identity", - "log", "multiaddr", "multihash", "once_cell", @@ -2477,15 +2548,16 @@ dependencies = [ "snow", "static_assertions", "thiserror", + "tracing", "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-quic" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130d451d83f21b81eb7b35b360bc7972aeafb15177784adc56528db082e6b927" +checksum = "3635a185249a123cbb57e97495245acbbb0a5daeb4d1a7ac9748ad7f685e631e" dependencies = [ "bytes", "futures", @@ -2494,7 +2566,6 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-tls", - "log", "parking_lot", "quinn", "rand", @@ -2503,33 +2574,36 @@ dependencies = [ "socket2 0.5.5", "thiserror", "tokio", + "tracing", ] [[package]] name = "libp2p-request-response" -version = "0.25.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e3b4d67870478db72bac87bfc260ee6641d0734e0e3e275798f089c3fecfd4" +checksum = "198a07e045ca23ad3cdb0f54ef3dfb5750056e63af06803d189b0393f865f461" dependencies = [ "async-trait", "cbor4ii", "futures", + "futures-bounded", + "futures-timer", "instant", "libp2p-core", "libp2p-identity", "libp2p-swarm", - "log", "rand", "serde", "smallvec", + "tracing", "void", ] [[package]] name = "libp2p-swarm" -version = "0.43.7" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "580189e0074af847df90e75ef54f3f30059aedda37ea5a1659e8b9fca05c0141" +checksum = "643ce11d87db56387631c9757b61b83435b434f94dc52ec267c1666e560e78b0" dependencies = [ "either", "fnv", @@ -2539,33 +2613,32 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", - "log", "multistream-select", "once_cell", "rand", "smallvec", "tokio", + "tracing", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d5ec2a3df00c7836d7696c136274c9c59705bac69133253696a6c932cd1d74" +checksum = "9b27d257436d01433a21da8da7688c83dba35826726161a328ff0989cd7af2dd" dependencies = [ "heck 0.4.1", - "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "libp2p-tcp" -version = "0.40.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b558dd40d1bcd1aaaed9de898e9ec6a436019ecc2420dd0016e712fbb61c5508" +checksum = "8b2460fc2748919adff99ecbc1aab296e4579e41f374fb164149bd2c9e529d4c" dependencies = [ "futures", "futures-timer", @@ -2573,16 +2646,16 @@ dependencies = [ "libc", "libp2p-core", "libp2p-identity", - "log", "socket2 0.5.5", "tokio", + "tracing", ] [[package]] name = "libp2p-tls" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8218d1d5482b122ccae396bbf38abdcb283ecc96fa54760e1dfd251f0546ac61" +checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" dependencies = [ "futures", "futures-rustls", @@ -2597,19 +2670,46 @@ dependencies = [ "yasna", ] +[[package]] +name = "libp2p-upnp" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963eb8a174f828f6a51927999a9ab5e45dfa9aa2aa5fed99aa65f79de6229464" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core", + "libp2p-swarm", + "tokio", + "tracing", + "void", +] + [[package]] name = "libp2p-yamux" -version = "0.44.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eedcb62824c4300efb9cfd4e2a6edaf3ca097b9e68b36dabe45a44469fd6a85" +checksum = "751f4778f71bc3db1ccf2451e7f4484463fec7f00c1ac2680e39c8368c23aae8" dependencies = [ "futures", "libp2p-core", - "log", "thiserror", + "tracing", "yamux", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2668,12 +2768,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -3217,7 +3311,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] @@ -3230,11 +3324,12 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pem" -version = "1.1.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" dependencies = [ - "base64 0.13.1", + "base64 0.21.5", + "serde", ] [[package]] @@ -3250,7 +3345,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.2", + "indexmap 2.1.0", ] [[package]] @@ -3270,7 +3365,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3297,9 +3392,9 @@ dependencies = [ [[package]] name = "platforms" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "plotters" @@ -3370,9 +3465,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" [[package]] name = "powerfmt" @@ -3476,17 +3571,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-warning" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "proc-macro2" version = "1.0.69" @@ -3498,9 +3582,9 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c99afa9a01501019ac3a14d71d9f94050346f55ca471ce90c799a15c58f61e2" +checksum = "510c4f1c9d81d556458f94c98f857748130ea9737bbd6053da497503b26ea63c" dependencies = [ "dtoa", "itoa", @@ -3516,7 +3600,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3533,7 +3617,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.7.5", "rusty-fork", "tempfile", "unarray", @@ -3636,7 +3720,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ededb1cd78531627244d51dd0c7139fbe736c7d57af0092a76f0ffb2f56e98" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "quick-protobuf", "thiserror", @@ -3787,9 +3871,9 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" dependencies = [ "pem", "ring 0.16.20", @@ -3797,15 +3881,6 @@ dependencies = [ "yasna", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -3817,36 +3892,36 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.9.6" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax", + "regex-syntax 0.8.2", ] [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.2", ] [[package]] @@ -3855,6 +3930,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + [[package]] name = "reqwest" version = "0.11.22" @@ -3907,9 +3988,9 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.36" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ec2d3e3fc7a92ced357df9cebd5a10b6fb2aa1ee797bf7e9ce2f17dffc8f59" +checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" dependencies = [ "bytemuck", ] @@ -4197,14 +4278,14 @@ checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -4238,7 +4319,7 @@ version = "0.9.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -4396,8 +4477,6 @@ dependencies = [ "itertools 0.11.0", "libp2p", "libp2p-identity", - "libp2p-metrics", - "libp2p-quic", "prometheus-client", "quickcheck", "rand", @@ -4672,7 +4751,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -4717,9 +4796,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -4793,7 +4872,7 @@ checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.4.1", + "redox_syscall", "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -4836,7 +4915,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -4974,7 +5053,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5160,7 +5239,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5247,78 +5326,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "trust-dns-proto" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner 0.5.1", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "rand", - "smallvec", - "socket2 0.4.10", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-proto" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner 0.6.0", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lru-cache", - "once_cell", - "parking_lot", - "rand", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", - "trust-dns-proto 0.23.2", -] - [[package]] name = "try-lock" version = "0.2.4" @@ -5410,7 +5417,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", ] @@ -5433,7 +5440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", ] @@ -5463,9 +5470,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vergen" -version = "8.2.5" +version = "8.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e7dc29b3c54a2ea67ef4f953d5ec0c4085035c0ae2d325be1c0d2144bd9f16" +checksum = "1290fd64cc4e7d3c9b07d7f333ce0ce0007253e32870e632624835cc80b83939" dependencies = [ "anyhow", "rustversion", @@ -5526,9 +5533,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -5536,24 +5543,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -5563,9 +5570,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5573,28 +5580,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -5864,6 +5871,21 @@ dependencies = [ "time", ] +[[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + [[package]] name = "xor_name" version = "5.0.0" @@ -5904,22 +5926,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.15" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ba595b9f2772fbee2312de30eeb80ec773b4cb2f1e8098db024afadda6c06f" +checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.15" +version = "0.7.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772666c41fb6dceaf520b564b962d738a8e1a83b41bd48945f50837aed78bb1d" +checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5939,5 +5961,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] diff --git a/metrics/Cargo.toml b/metrics/Cargo.toml index febf884a1f..571ee4aa8e 100644 --- a/metrics/Cargo.toml +++ b/metrics/Cargo.toml @@ -18,7 +18,7 @@ name="metrics" clap = { version = "4.2.1", features = ["cargo", "string"]} color-eyre = "~0.6.2" dirs-next = "~2.0.0" -regex = "~1.9.6" +regex = "1.10" serde = { version = "1.0.133", features = [ "derive"]} serde_yaml = "0.9.25" url = "2.4.1" diff --git a/sn_cli/Cargo.toml b/sn_cli/Cargo.toml index f5b1e0a8d6..38e38b2ff7 100644 --- a/sn_cli/Cargo.toml +++ b/sn_cli/Cargo.toml @@ -36,7 +36,7 @@ color-eyre = "~0.6" dirs-next = "~2.0.0" hex = "~0.4.3" indicatif = { version = "0.17.5", features = ["tokio"] } -libp2p = { version="0.52", features = ["identify", "kad"] } +libp2p = { version="0.53", features = ["identify", "kad"] } rayon = "1.8.0" reqwest = { version="0.11.18", default-features=false, features = ["rustls"] } sn_build_info = { path="../sn_build_info", version = "0.1.2" } diff --git a/sn_client/Cargo.toml b/sn_client/Cargo.toml index 728683d2ec..8c7cd8205f 100644 --- a/sn_client/Cargo.toml +++ b/sn_client/Cargo.toml @@ -25,8 +25,8 @@ futures = "~0.3.13" hex = "~0.4.3" indicatif = { version = "0.17.5", features = ["tokio"] } itertools = "~0.11.0" -libp2p = { version="0.52", features = ["identify"] } -prometheus-client = { version = "0.21.2", optional = true } +libp2p = { version="0.53" , features = ["identify"] } +prometheus-client = { version = "0.22", optional = true } rand = { version = "~0.8.5", features = ["small_rng"] } rayon = "1.8.0" self_encryption = "~0.28.5" diff --git a/sn_networking/Cargo.toml b/sn_networking/Cargo.toml index 0dedcf08ca..aa6ecd609f 100644 --- a/sn_networking/Cargo.toml +++ b/sn_networking/Cargo.toml @@ -13,8 +13,8 @@ version = "0.9.21" [features] default=[] local-discovery=["libp2p/mdns"] -quic=["libp2p-quic"] -open-metrics=["libp2p-metrics", "prometheus-client", "hyper", "sysinfo"] +quic=["libp2p/quic"] +open-metrics=["libp2p/metrics", "prometheus-client", "hyper", "sysinfo"] [dependencies] async-trait = "0.1" @@ -23,10 +23,8 @@ futures = "~0.3.13" hyper = { version = "0.14", features = ["server", "tcp", "http1"], optional = true} itertools = "~0.11.0" custom_debug = "~0.5.0" -libp2p = { version="0.52", features = ["tokio", "dns", "kad", "macros", "request-response", "cbor","identify", "autonat", "noise", "tcp", "yamux", "gossipsub"] } -libp2p-metrics = { version = "0.13.1", features = ["identify", "kad", "gossipsub"], optional = true } -libp2p-quic = { version = "0.9.2", features = ["tokio"], optional = true } -prometheus-client = { version = "0.21.2", optional = true } +libp2p = { version="0.53" , features = ["tokio", "dns", "kad", "macros", "request-response", "cbor","identify", "autonat", "noise", "tcp", "yamux", "gossipsub"] } +prometheus-client = { version = "0.22", optional = true } rand = { version = "~0.8.5", features = ["small_rng"] } rmp-serde = "1.1.1" serde = { version = "1.0.133", features = [ "derive", "rc" ]} diff --git a/sn_networking/src/driver.rs b/sn_networking/src/driver.rs index e8de974253..c451b98819 100644 --- a/sn_networking/src/driver.rs +++ b/sn_networking/src/driver.rs @@ -28,12 +28,14 @@ use futures::StreamExt; use libp2p::core::muxing::StreamMuxerBox; #[cfg(feature = "local-discovery")] use libp2p::mdns; +#[cfg(feature = "quic")] +use libp2p::quic; use libp2p::{ autonat, identity::Keypair, kad::{self, QueryId, Record, K_VALUE}, multiaddr::Protocol, - request_response::{self, Config as RequestResponseConfig, ProtocolSupport, RequestId}, + request_response::{self, Config as RequestResponseConfig, OutboundRequestId, ProtocolSupport}, swarm::{ behaviour::toggle::Toggle, dial_opts::{DialOpts, PeerCondition}, @@ -41,8 +43,6 @@ use libp2p::{ }, Multiaddr, PeerId, Transport, }; -#[cfg(feature = "quic")] -use libp2p_quic as quic; #[cfg(feature = "open-metrics")] use prometheus_client::registry::Registry; use sn_protocol::{ @@ -313,9 +313,8 @@ impl NetworkBuilder { // RequestResponse Behaviour let request_response = { - let mut cfg = RequestResponseConfig::default(); - let _ = - cfg.set_request_timeout(self.request_timeout.unwrap_or(REQUEST_TIMEOUT_DEFAULT_S)); + let cfg = RequestResponseConfig::default() + .with_request_timeout(self.request_timeout.unwrap_or(REQUEST_TIMEOUT_DEFAULT_S)); request_response::cbor::Behaviour::new( [( @@ -387,7 +386,7 @@ impl NetworkBuilder { .boxed(); #[cfg(feature = "quic")] - let mut transport = libp2p_quic::tokio::Transport::new(quic::Config::new(&self.keypair)) + let mut transport = libp2p::quic::tokio::Transport::new(quic::Config::new(&self.keypair)) .map(|(peer_id, muxer), _| (peer_id, StreamMuxerBox::new(muxer))) .boxed(); @@ -499,7 +498,8 @@ pub struct SwarmDriver { /// Trackers for underlying behaviour related events pub(crate) pending_get_closest_peers: PendingGetClosest, - pub(crate) pending_requests: HashMap>>>, + pub(crate) pending_requests: + HashMap>>>, pub(crate) pending_get_record: PendingGetRecord, /// A list of the most recent peers we have dialed ourselves. pub(crate) dialed_peers: CircularVec, diff --git a/sn_networking/src/error.rs b/sn_networking/src/error.rs index cf9758a953..516621d0bc 100644 --- a/sn_networking/src/error.rs +++ b/sn_networking/src/error.rs @@ -9,7 +9,7 @@ use libp2p::{ gossipsub::{PublishError, SubscriptionError}, kad::{self, Record}, - request_response::{OutboundFailure, RequestId}, + request_response::{OutboundFailure, OutboundRequestId}, swarm::DialError, PeerId, TransportError, }; @@ -42,7 +42,7 @@ pub enum Error { InternalMsgChannelDropped, #[error("Response received for a request not found in our local tracking map: {0}")] - ReceivedResponseDropped(RequestId), + ReceivedResponseDropped(OutboundRequestId), #[error("Outgoing response has been dropped due to a conn being closed or timeout: {0}")] OutgoingResponseDropped(Response), diff --git a/sn_networking/src/event.rs b/sn_networking/src/event.rs index a389879a5e..9459053608 100644 --- a/sn_networking/src/event.rs +++ b/sn_networking/src/event.rs @@ -18,6 +18,8 @@ use custom_debug::Debug as CustomDebug; use itertools::Itertools; #[cfg(feature = "local-discovery")] use libp2p::mdns; +#[cfg(feature = "open-metrics")] +use libp2p::metrics::Recorder; use libp2p::{ autonat::{self, NatStatus}, kad::{ @@ -29,8 +31,6 @@ use libp2p::{ swarm::SwarmEvent, Multiaddr, PeerId, }; -#[cfg(feature = "open-metrics")] -use libp2p_metrics::Recorder; use sn_protocol::{ messages::{Request, Response}, @@ -204,10 +204,7 @@ impl Debug for NetworkEvent { impl SwarmDriver { /// Handle `SwarmEvents` - pub(super) fn handle_swarm_events( - &mut self, - event: SwarmEvent, - ) -> Result<()> { + pub(super) fn handle_swarm_events(&mut self, event: SwarmEvent) -> Result<()> { // This does not record all the events. `SwarmEvent::Behaviour(_)` are skipped. Hence `.record()` has to be // called individually on each behaviour. #[cfg(feature = "open-metrics")] diff --git a/sn_networking/src/metrics.rs b/sn_networking/src/metrics.rs index b644cf8011..569002141c 100644 --- a/sn_networking/src/metrics.rs +++ b/sn_networking/src/metrics.rs @@ -6,7 +6,7 @@ // KIND, either express or implied. Please review the Licences for the specific language governing // permissions and limitations relating to use of the SAFE Network Software. -use libp2p_metrics::{Metrics as Libp2pMetrics, Recorder}; +use libp2p::metrics::{Metrics as Libp2pMetrics, Recorder}; use prometheus_client::{metrics::gauge::Gauge, registry::Registry}; use std::time::Duration; use sysinfo::{Pid, PidExt, ProcessExt, ProcessRefreshKind, System, SystemExt}; @@ -113,8 +113,8 @@ impl Recorder for NetworkMetrics { } } -impl Recorder> for NetworkMetrics { - fn record(&self, event: &libp2p::swarm::SwarmEvent) { +impl Recorder> for NetworkMetrics { + fn record(&self, event: &libp2p::swarm::SwarmEvent) { self.libp2p_metrics.record(event); } } diff --git a/sn_networking/src/record_store.rs b/sn_networking/src/record_store.rs index a24b25daca..4503019266 100644 --- a/sn_networking/src/record_store.rs +++ b/sn_networking/src/record_store.rs @@ -11,9 +11,8 @@ use crate::event::NetworkEvent; use libp2p::{ identity::PeerId, kad::{ - record::{Key, ProviderRecord, Record}, store::{Error, RecordStore, Result}, - KBucketDistance as Distance, KBucketKey, + KBucketDistance as Distance, KBucketKey, ProviderRecord, Record, RecordKey as Key, }, }; #[cfg(feature = "open-metrics")] diff --git a/sn_node/Cargo.toml b/sn_node/Cargo.toml index ed2e1b014e..62567b7ce2 100644 --- a/sn_node/Cargo.toml +++ b/sn_node/Cargo.toml @@ -47,8 +47,8 @@ futures = "~0.3.13" hex = "~0.4.3" itertools = "~0.11.0" lazy_static = "~1.4.0" -libp2p = { version="0.52", features = ["tokio", "dns", "kad", "macros", "autonat"] } -prometheus-client = { version = "0.21.2", optional = true } +libp2p = { version="0.53" , features = ["tokio", "dns", "kad", "macros", "autonat"] } +prometheus-client = { version = "0.22", optional = true } # watch out updating this, protoc compiler needs to be installed on all build systems # arm builds + musl are very problematic prost = { version = "0.9" } diff --git a/sn_peers_acquisition/Cargo.toml b/sn_peers_acquisition/Cargo.toml index 8e68e551cc..223b7a8008 100644 --- a/sn_peers_acquisition/Cargo.toml +++ b/sn_peers_acquisition/Cargo.toml @@ -18,7 +18,7 @@ network-contacts = ["reqwest", "tokio", "url"] [dependencies] clap = { version = "4.2.1", features = ["derive", "env"] } color-eyre = "~0.6" -libp2p = { version="0.52", features = [] } +libp2p = { version="0.53" , features = [] } reqwest = { version="0.11.18", default-features=false, features = ["rustls-tls"], optional = true } tokio = { version = "1.32.0", optional = true} tracing = { version = "~0.1.26" } diff --git a/sn_protocol/Cargo.toml b/sn_protocol/Cargo.toml index bbd5b2f4a4..1bfca18f86 100644 --- a/sn_protocol/Cargo.toml +++ b/sn_protocol/Cargo.toml @@ -15,7 +15,7 @@ bytes = { version = "1.0.1", features = ["serde"] } crdts = { version = "7.3", default-features = false, features = ["merkle"] } custom_debug = "~0.5.0" hex = "~0.4.3" -libp2p = { version="0.52", features = ["identify", "kad"] } +libp2p = { version="0.53" , features = ["identify", "kad"] } rmp-serde = "1.1.1" serde = { version = "1.0.133", features = [ "derive", "rc" ]} sha2 = "0.10.7" diff --git a/sn_testnet/Cargo.toml b/sn_testnet/Cargo.toml index 7af4e1a1a8..33ffbf08ea 100644 --- a/sn_testnet/Cargo.toml +++ b/sn_testnet/Cargo.toml @@ -29,11 +29,11 @@ color-eyre = "~0.6.0" eyre = "~0.6.5" clap = { version = "3.2.0", features = ["derive", "env"]} dirs-next = "2.0.0" -libp2p = { version="0.52" } +libp2p = "0.53" # watch out updating this, protoc compiler needs to be installed on all build systems # arm builds + musl are very problematic prost = { version = "0.9" } -regex = "~1.9.6" +regex = "1.10" tonic = { version = "0.6.2" } tracing = "~0.1.26" tracing-core = "~0.1.21"