diff --git a/Cargo.lock b/Cargo.lock index 06b2b4290a84..2f0d2c8beeb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -588,7 +588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" dependencies = [ "fastrand", - "gloo-timers", + "gloo-timers 0.3.0", "tokio", ] @@ -619,6 +619,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base16ct" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6" + [[package]] name = "base256emoji" version = "1.0.2" @@ -661,7 +667,7 @@ checksum = "0271a107b5f600ee41bdafbb3c8ddf4afa52983d4b078917d89dbb920116e987" dependencies = [ "bellpepper-core", "byteorder", - "ff", + "ff 0.13.1", ] [[package]] @@ -672,7 +678,7 @@ checksum = "b2c9a1b2f748c59938bc72165ebdf34efffeecee9cfbe0bb7d6b01aea21cd523" dependencies = [ "blake2s_simd 1.0.5", "byteorder", - "ff", + "ff 0.13.1", "serde", "thiserror 1.0.69", ] @@ -692,8 +698,8 @@ dependencies = [ "digest 0.10.7", "ec-gpu", "ec-gpu-gen", - "ff", - "group", + "ff 0.13.1", + "group 0.13.0", "log", "memmap2 0.5.10", "pairing", @@ -882,8 +888,8 @@ checksum = "ecc7fce0356b52c2483bb6188cc8bdc11add526bce75d1a44e5e5d889a6ab008" dependencies = [ "blst", "blstrs", - "ff", - "group", + "ff 0.13.1", + "group 0.13.0", "pairing", "rand_core 0.6.4", "rayon", @@ -912,8 +918,8 @@ dependencies = [ "blst", "byte-slice-cast", "ec-gpu", - "ff", - "group", + "ff 0.13.1", + "group 0.13.0", "pairing", "rand_core 0.6.4", "serde", @@ -1192,7 +1198,7 @@ dependencies = [ "rand 0.10.2", "serde", "serde_bytes", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -1219,9 +1225,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" dependencies = [ "clap_builder", "clap_derive", @@ -1229,9 +1235,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" dependencies = [ "anstream", "anstyle", @@ -1241,18 +1247,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.9" +version = "4.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be2ad0423bdbbb0e25bc89add796f3559706d4a95e1bc98e4d9662a957b6a19" +checksum = "78ab9a1a7094014a0d0813f8e7c5a0058ad8fe6cf7475b9151364259f5a35d0f" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.6.4" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1262,9 +1268,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" [[package]] name = "cmake" @@ -1520,6 +1526,12 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpubits" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae" + [[package]] name = "cpufeatures" version = "0.2.17" @@ -1817,6 +1829,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a52aa3fcda4e6302a9f48734f234d35d4721b96f8fe07d073f07ce9df4f0271" +dependencies = [ + "cpubits", + "ctutils", + "getrandom 0.4.3", + "hybrid-array", + "num-traits", + "rand_core 0.10.1", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -1834,7 +1862,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ + "getrandom 0.4.3", "hybrid-array", + "rand_core 0.10.1", ] [[package]] @@ -1908,6 +1938,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" dependencies = [ "cmov", + "subtle", ] [[package]] @@ -1919,8 +1950,22 @@ dependencies = [ "cfg-if", "cpufeatures 0.2.17", "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", + "fiat-crypto 0.2.9", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "curve25519-dalek-derive", + "digest 0.11.3", + "fiat-crypto 0.3.0", "rustc_version", "subtle", "zeroize", @@ -2123,6 +2168,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid 0.9.6", + "zeroize", +] + +[[package]] +name = "der" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a878c850e9e421b20262e9b41f9c860e4785fa07541c266b62ff9d1ef998a80a" +dependencies = [ + "const-oid 0.10.2", "pem-rfc7468", "zeroize", ] @@ -2378,8 +2433,8 @@ dependencies = [ "crossbeam-channel", "ec-gpu", "execute", - "ff", - "group", + "ff 0.13.1", + "group 0.13.0", "hex", "log", "num_cpus", @@ -2396,34 +2451,47 @@ version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der", + "der 0.7.10", "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "ecdsa" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0" +dependencies = [ + "der 0.8.2", + "digest 0.11.3", + "elliptic-curve 0.14.1", + "rfc6979 0.6.0", + "signature 3.0.0", + "spki 0.8.0", + "zeroize", ] [[package]] name = "ed25519" -version = "2.2.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a" dependencies = [ - "pkcs8", - "signature", + "signature 3.0.0", ] [[package]] name = "ed25519-dalek" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ - "curve25519-dalek", + "curve25519-dalek 5.0.0", "ed25519", - "serde", - "sha2 0.10.9", + "sha2 0.11.0", "subtle", "zeroize", ] @@ -2443,16 +2511,36 @@ version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct", - "crypto-bigint", + "base16ct 0.2.0", + "crypto-bigint 0.5.5", "digest 0.10.7", - "ff", + "ff 0.13.1", "generic-array 0.14.7", - "group", - "pem-rfc7468", - "pkcs8", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d65aa39b3a5c1c9c1b745c9a019234bb7a21b77abcb4f4d266d706e2d577d65" +dependencies = [ + "base16ct 1.0.0", + "crypto-bigint 0.7.5", + "crypto-common 0.2.2", + "digest 0.11.3", + "ff 0.14.0", + "group 0.14.0", + "hybrid-array", + "pem-rfc7468", + "pkcs8 0.11.0", + "rand_core 0.10.1", + "sec1 0.8.1", "subtle", "zeroize", ] @@ -2475,18 +2563,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" -[[package]] -name = "enum-as-inner" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "enumflags2" version = "0.7.12" @@ -2730,12 +2806,28 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f686ab92a9fb0eaf188f6c6c87b89490baa6fdb0db4544ba4dc47f7942489f" +dependencies = [ + "rand_core 0.10.1", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "fiat-crypto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + [[package]] name = "fickle" version = "0.3.0" @@ -2932,7 +3024,7 @@ dependencies = [ "num-derive", "num-traits", "serde", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -3087,7 +3179,7 @@ dependencies = [ "serde_repr", "strum", "thiserror 2.0.20", - "unsigned-varint 0.8.0", + "unsigned-varint", "walkdir", ] @@ -3100,7 +3192,7 @@ dependencies = [ "anyhow", "bellperson", "blstrs", - "ff", + "ff 0.13.1", "generic-array 0.14.7", "hex", "lazy_static", @@ -3122,7 +3214,7 @@ dependencies = [ "bincode", "blake2b_simd", "blstrs", - "ff", + "ff 0.13.1", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -3347,7 +3439,7 @@ dependencies = [ "get-size2", "gethostname", "git-version", - "group", + "group 0.13.0", "hashbrown 0.17.1", "hashlink 0.11.1", "hex", @@ -3365,7 +3457,7 @@ dependencies = [ "itertools 0.15.0", "jsonrpsee", "jsonwebtoken", - "k256", + "k256 0.13.4", "keccak-hash", "kubert-prometheus-process", "lazy-regex", @@ -3397,7 +3489,8 @@ dependencies = [ "positioned-io", "predicates", "pretty_assertions", - "prometheus-client", + "prometheus-client 0.23.1", + "prometheus-client 0.25.1", "puruspe", "quick-protobuf", "quick-protobuf-codec", @@ -3457,7 +3550,7 @@ dependencies = [ "tracing-appender", "tracing-loki", "tracing-subscriber", - "unsigned-varint 0.8.0", + "unsigned-varint", "url", "uuid", "walkdir", @@ -3510,7 +3603,7 @@ dependencies = [ "blstrs", "byte-slice-cast", "byteorder", - "ff", + "ff 0.13.1", "thiserror 2.0.20", ] @@ -3623,9 +3716,9 @@ dependencies = [ [[package]] name = "futures-bounded" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" +checksum = "b604752cefc5aa3ab98992a107a8bd99465d2825c1584e0b60cb6957b21e19d7" dependencies = [ "futures-timer", "futures-util", @@ -3724,9 +3817,13 @@ checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" [[package]] name = "futures-timer" -version = "3.0.4" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers 0.2.6", + "send_wrapper", +] [[package]] name = "futures-util" @@ -3920,7 +4017,7 @@ dependencies = [ "fvm_ipld_encoding", "serde", "thiserror 2.0.20", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -4020,7 +4117,7 @@ dependencies = [ "filecoin-proofs-api", "fvm_ipld_blockstore", "fvm_ipld_encoding", - "k256", + "k256 0.13.4", "lazy_static", "log", "multihash", @@ -4032,7 +4129,7 @@ dependencies = [ "serde_repr", "serde_tuple", "thiserror 2.0.20", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -4051,7 +4148,7 @@ dependencies = [ "data-encoding-macro", "filecoin-proofs-api", "fvm_ipld_encoding", - "k256", + "k256 0.13.4", "lazy_static", "multihash", "num-bigint", @@ -4062,7 +4159,7 @@ dependencies = [ "serde", "serde_tuple", "thiserror 2.0.20", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -4081,7 +4178,7 @@ dependencies = [ "data-encoding-macro", "filecoin-proofs-api", "fvm_ipld_encoding", - "k256", + "k256 0.13.4", "num-bigint", "num-derive", "num-integer", @@ -4089,7 +4186,7 @@ dependencies = [ "quickcheck", "serde", "thiserror 2.0.20", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -4165,9 +4262,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 5.3.0", "wasip2", + "wasm-bindgen", ] [[package]] @@ -4279,6 +4378,18 @@ dependencies = [ "walkdir", ] +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "gloo-timers" version = "0.3.0" @@ -4297,13 +4408,24 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff", + "ff 0.13.1", "rand 0.8.8", "rand_core 0.6.4", "rand_xorshift", "subtle", ] +[[package]] +name = "group" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd1a1c7a5206c5b7a3f5a0d7ccd3ff85d0c8f5133d62a02680255b0004af5f4" +dependencies = [ + "ff 0.14.0", + "rand_core 0.10.1", + "subtle", +] + [[package]] name = "h2" version = "0.4.19" @@ -4349,15 +4471,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -4392,29 +4505,20 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "hashlink" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +checksum = "824e001ac4f3012dd16a264bec811403a67ca9deb6c102fc5049b32c4574b35f" dependencies = [ - "hashbrown 0.15.5", + "hashbrown 0.16.1", ] [[package]] name = "hashlink" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824e001ac4f3012dd16a264bec811403a67ca9deb6c102fc5049b32c4574b35f" +checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] @@ -4480,61 +4584,75 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" [[package]] -name = "hickory-proto" -version = "0.25.2" +name = "hickory-net" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +checksum = "c480823ed7c2c5d0f09c41020cb6b7c28029ce60ec42dc942158dcf22f8e0a4d" dependencies = [ "async-trait", "cfg-if", "data-encoding", - "enum-as-inner", "futures-channel", "futures-io", "futures-util", + "hickory-proto", + "idna", + "ipnet", + "jni 0.22.4", + "rand 0.10.2", + "thiserror 2.0.20", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-proto" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12b92608f679a6fa515dd1d15c1ff89443026e391200a2c840c7afcba482893d" +dependencies = [ + "data-encoding", "idna", "ipnet", + "jni 0.22.4", "once_cell", - "rand 0.9.5", + "prefix-trie", + "rand 0.10.2", "ring", - "socket2 0.5.10", "thiserror 2.0.20", "tinyvec", - "tokio", "tracing", "url", ] [[package]] name = "hickory-resolver" -version = "0.25.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +checksum = "3f3da5255c95d5a716857d54b5b8f4e8d67c3484d3beaaaae2ce25063b3ba981" dependencies = [ "cfg-if", "futures-util", + "hickory-net", "hickory-proto", "ipconfig", + "ipnet", + "jni 0.22.4", "moka", + "ndk-context", "once_cell", "parking_lot", - "rand 0.9.5", + "rand 0.10.2", "resolv-conf", "smallvec", + "system-configuration", "thiserror 2.0.20", "tokio", "tracing", ] -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac 0.12.1", -] - [[package]] name = "hkdf" version = "0.13.0" @@ -4631,7 +4749,9 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" dependencies = [ + "subtle", "typenum", + "zeroize", ] [[package]] @@ -4703,7 +4823,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.5", + "socket2", "tokio", "tower-service", "tracing", @@ -4884,11 +5004,10 @@ checksum = "cd62e6b5e86ea8eeeb8db1de02880a6abc01a397b2ebb64b5d74ac255318f5cb" [[package]] name = "igd-next" -version = "0.16.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516893339c97f6011282d5825ac94fc1c7aad5cad26bdc2d0cee068c0bf97f97" +checksum = "de7238d487a9aff61f81b5ab41c0a841532a115a398b5fa92a2fadd0885e2581" dependencies = [ - "async-trait", "attohttpc", "bytes", "futures", @@ -4897,7 +5016,7 @@ dependencies = [ "hyper", "hyper-util", "log", - "rand 0.9.5", + "rand 0.10.2", "tokio", "url", "xmltree", @@ -5063,7 +5182,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" dependencies = [ - "socket2 0.6.5", + "socket2", "widestring", "windows-registry", "windows-result", @@ -5087,6 +5206,9 @@ name = "ipnet" version = "2.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" +dependencies = [ + "serde", +] [[package]] name = "is-terminal" @@ -5296,12 +5418,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.105" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ - "cfg-if", - "futures-util", + "once_cell", "wasm-bindgen", ] @@ -5473,7 +5594,7 @@ dependencies = [ "pem", "serde", "serde_json", - "signature", + "signature 2.2.0", "simple_asn1", "zeroize", ] @@ -5485,11 +5606,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", - "ecdsa", - "elliptic-curve", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", "once_cell", "sha2 0.10.9", - "signature", + "signature 2.2.0", +] + +[[package]] +name = "k256" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f50113171a713f4a4231ef82eb26703607139b35dcb56241f0ceab2ae1f7d8" +dependencies = [ + "cpubits", + "ecdsa 0.17.0", + "elliptic-curve 0.14.1", + "primeorder", + "sha2 0.11.0", + "signature 3.0.0", + "wnaf", ] [[package]] @@ -5535,7 +5671,7 @@ checksum = "5b89e2a641a3f74c2e7366eb050282ac4a6194b63dae5294084215c457237e47" dependencies = [ "libc", "procfs", - "prometheus-client", + "prometheus-client 0.23.1", "tracing", ] @@ -5617,15 +5753,15 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libp2p" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce71348bf5838e46449ae240631117b487073d5f347c06d434caddcb91dceb5a" +checksum = "54f17d9972941cedec62309d4a8ff52c05beb20550d6f1f961625eda0aae1e37" dependencies = [ "bytes", "either", "futures", "futures-timer", - "getrandom 0.2.17", + "getrandom 0.4.3", "libp2p-allow-block-list", "libp2p-autonat", "libp2p-connection-limits", @@ -5653,9 +5789,9 @@ dependencies = [ [[package]] name = "libp2p-allow-block-list" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16ccf824ee859ca83df301e1c0205270206223fd4b1f2e512a693e1912a8f4a" +checksum = "3074eaa93c889a9f56e5e4ecbbb8a5213652b22af0a1d880504345f2bd8768c4" dependencies = [ "libp2p-core", "libp2p-identity", @@ -5664,11 +5800,10 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fab5e25c49a7d48dac83d95d8f3bac0a290d8a5df717012f6e34ce9886396c0b" +checksum = "651fcbe0470d52db88ace805e94fd074aa18537312d43cbb531f761fa6916b43" dependencies = [ - "async-trait", "asynchronous-codec", "either", "futures", @@ -5678,10 +5813,10 @@ dependencies = [ "libp2p-identity", "libp2p-request-response", "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.8", - "rand_core 0.6.4", + "prost 0.14.4", + "prost-codec", + "rand 0.10.2", + "rand_core 0.10.1", "thiserror 2.0.20", "tracing", "web-time", @@ -5689,9 +5824,9 @@ dependencies = [ [[package]] name = "libp2p-connection-limits" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18b8b607cf3bfa2f8c57db9c7d8569a315d5cc0a282e6bfd5ebfc0a9840b2a0" +checksum = "11b98b22c89fc70113a8988db523b0715e299c804e08da7eb20b8440b8249833" dependencies = [ "libp2p-core", "libp2p-identity", @@ -5700,9 +5835,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.43.2" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249128cd37a2199aff30a7675dffa51caf073b51aa612d2f544b19932b9aebca" +checksum = "c2b1a55b9d5e51389db344a609d8c2ff35eabd870a8400067d66d2b1b6f8df68" dependencies = [ "either", "fnv", @@ -5714,22 +5849,21 @@ dependencies = [ "multistream-select", "parking_lot", "pin-project", - "quick-protobuf", - "rand 0.8.8", + "prost 0.14.4", + "rand 0.10.2", "rw-stream-sink", "thiserror 2.0.20", "tracing", - "unsigned-varint 0.8.0", + "unsigned-varint", "web-time", ] [[package]] name = "libp2p-dns" -version = "0.44.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b770c1c8476736ca98c578cba4b505104ff8e842c2876b528925f9766379f9a" +checksum = "18694695e98ff9ce26ee245fdede7cd0b4186cb793b25da3258d9c053400a291" dependencies = [ - "async-trait", "futures", "hickory-resolver", "libp2p-core", @@ -5741,40 +5875,41 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.49.5" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3573f3d8e30bd62cda336df5c7c1041a1caa40a648376b8e1e274d585c0ed25c" +checksum = "1b625461b45e5b36facf07ff3585b831bcaf26cab8907ac8f47d1e8e999999e0" dependencies = [ "async-channel", "asynchronous-codec", - "base64 0.22.1", + "base64 0.23.1", "byteorder", "bytes", "either", "fnv", "futures", "futures-timer", - "getrandom 0.2.17", - "hashlink 0.9.1", + "getrandom 0.4.3", + "hashlink 0.12.2", "hex_fmt", "libp2p-core", "libp2p-identity", "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.8", + "prometheus-client 0.25.1", + "prost 0.14.4", + "prost-codec", + "rand 0.10.2", "regex", "serde", - "sha2 0.10.9", + "sha2 0.11.0", "tracing", "web-time", ] [[package]] name = "libp2p-identify" -version = "0.47.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ab792a8b68fdef443a62155b01970c81c3aadab5e659621b063ef252a8e65e8" +checksum = "b2dd130b2cbbcecb55e923c5ba4183e6b9af542b4251680017300c693a6e183c" dependencies = [ "asynchronous-codec", "either", @@ -5784,8 +5919,8 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", + "prost 0.14.4", + "prost-codec", "smallvec", "thiserror 2.0.20", "tracing", @@ -5793,23 +5928,22 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.14" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9525f3831544f7ae497bde79adf114ef127b0fbbb97edbbf692a80408636421c" +checksum = "3d77f16caa4f4d2667a1fad5bb1a3a4a4556967c1bff93525ebb2975847fa3de" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", - "hkdf 0.12.4", - "k256", + "hkdf", + "k256 0.14.0", "multihash", "p256", "prost 0.14.4", - "rand 0.8.8", + "rand 0.10.2", "ring", - "sec1", "serde", - "sha2 0.10.9", + "sha2 0.11.0", "thiserror 2.0.20", "tracing", "zeroize", @@ -5817,9 +5951,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d3fd632a5872ec804d37e7413ceea20588f69d027a0fa3c46f82574f4dee60" +checksum = "973caa45045e53f3cf1cf3d596888b82602b30640fd75485836c81aa66e7c38a" dependencies = [ "asynchronous-codec", "bytes", @@ -5831,11 +5965,11 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.8", + "prost 0.14.4", + "prost-codec", + "rand 0.10.2", "serde", - "sha2 0.10.9", + "sha2 0.11.0", "smallvec", "thiserror 2.0.20", "tracing", @@ -5845,9 +5979,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66872d0f1ffcded2788683f76931be1c52e27f343edb93bc6d0bcd8887be443" +checksum = "9e82fb6db53f8ba1642bc0695ee589f7bcc1ff9028a9d068a88ee0db5b94667f" dependencies = [ "futures", "hickory-proto", @@ -5855,18 +5989,18 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.8", + "rand 0.10.2", "smallvec", - "socket2 0.5.10", + "socket2", "tokio", "tracing", ] [[package]] name = "libp2p-metrics" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805a555148522cb3414493a5153451910cb1a146c53ffbf4385708349baf62b7" +checksum = "3106bb2e4116c9cfa6b87ece6632d9582606fe923aabde27a42a001f3061ff82" dependencies = [ "futures", "libp2p-core", @@ -5877,25 +6011,26 @@ dependencies = [ "libp2p-ping", "libp2p-swarm", "pin-project", - "prometheus-client", + "prometheus-client 0.25.1", "web-time", ] [[package]] name = "libp2p-noise" -version = "0.46.1" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc73eacbe6462a0eb92a6527cac6e63f02026e5407f8831bde8293f19217bfbf" +checksum = "7895a7bf90479291bff16ffddca81f539fc59d62c17b3cce17620cf75abaa6fd" dependencies = [ "asynchronous-codec", "bytes", "futures", + "getrandom 0.3.4", "libp2p-core", "libp2p-identity", "multiaddr", "multihash", - "quick-protobuf", - "rand 0.8.8", + "prost 0.14.4", + "rand 0.10.2", "snow", "static_assertions", "thiserror 2.0.20", @@ -5906,41 +6041,41 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.47.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74bb7fcdfd9fead4144a3859da0b49576f171a8c8c7c0bfc7c541921d25e60d3" +checksum = "1f4d4bdcf67cf2c71d092b9ffe851d1769e69b97091f37cffd1e596f3763ee9d" dependencies = [ "futures", "futures-timer", "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.8", + "rand 0.10.2", "tracing", "web-time", ] [[package]] name = "libp2p-plaintext" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e659439578fc6d305da8303834beb9d62f155f40e7f5b9d81c9f2b2c69d1926" +checksum = "a9aef7ae91f7a7bfde84587a875bbb25ad95321926a18c81c9628d5107492446" dependencies = [ "asynchronous-codec", "bytes", "futures", "libp2p-core", "libp2p-identity", - "quick-protobuf", - "quick-protobuf-codec", + "prost 0.14.4", + "prost-codec", "tracing", ] [[package]] name = "libp2p-quic" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcc597d70bf7f6f30cbe07081802c836184e48416e89e9ce73a0ba2c56a319e" +checksum = "4f78ca359466657b380e469fe8c04df2f4447d1430838e6c3cef4a1c51ccb2ee" dependencies = [ "futures", "futures-timer", @@ -5950,10 +6085,9 @@ dependencies = [ "libp2p-tls", "quinn", "quinn-proto", - "rand 0.8.8", + "rand 0.10.2", "ring", - "rustls", - "socket2 0.5.10", + "socket2", "thiserror 2.0.20", "tokio", "tracing", @@ -5961,59 +6095,60 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f1cca83488b90102abac7b67d5c36fc65bc02ed47620228af7ed002e6a1478" +checksum = "ca1d1f3a4d7b7080eb959098f276f57ecbc3102f7d3d46f109ccdaa00d2842d9" dependencies = [ - "async-trait", "futures", "futures-bounded", "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.8", + "rand 0.10.2", "smallvec", "tracing", ] [[package]] name = "libp2p-swarm" -version = "0.47.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce88c6c4bf746c8482480345ea3edfd08301f49e026889d1cbccfa1808a9ed9e" +checksum = "57ccbe1baeaef036ffde4b265871e11c64d29464036bba635378f356bcdca854" dependencies = [ "either", "fnv", "futures", "futures-timer", - "hashlink 0.10.0", + "getrandom 0.4.3", + "hashlink 0.12.2", "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", "multistream-select", - "rand 0.8.8", + "rand 0.10.2", "smallvec", "tokio", "tracing", + "wasm-bindgen-futures", "web-time", ] [[package]] name = "libp2p-swarm-derive" -version = "0.35.1" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd297cf53f0cb3dee4d2620bb319ae47ef27c702684309f682bdb7e55a18ae9c" +checksum = "fbfd25141698cdf6878f26a839f28caa54a7906fbb3e6d0988b9eeb34dea3103" dependencies = [ "heck 0.5.0", "quote", - "syn 2.0.119", + "syn 3.0.5", ] [[package]] name = "libp2p-swarm-test" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b149112570d507efe305838c7130835955a0b1147aa8051c1c3867a83175cf6" +checksum = "b677341429011c20218825ca9482f27891bec800b651e4693a8c87cb9a7b7324" dependencies = [ "async-trait", "futures", @@ -6029,25 +6164,25 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.44.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6585b9309699f58704ec9ab0bb102eca7a3777170fa91a8678d73ca9cafa93" +checksum = "e753c9e69fec40b3687e38a25e34fc5dfa9c6d0e29614c9b4d28ee7dc8c32a7a" dependencies = [ "futures", "futures-timer", "if-watch", "libc", "libp2p-core", - "socket2 0.6.5", + "socket2", "tokio", "tracing", ] [[package]] name = "libp2p-tls" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ff65a82e35375cbc31ebb99cacbbf28cb6c4fefe26bf13756ddcf708d40080" +checksum = "01dc85ad2bbc3506502f430a00dd913ec87f31e1894291cb9b923168babb6485" dependencies = [ "futures", "futures-rustls", @@ -6059,14 +6194,14 @@ dependencies = [ "rustls-webpki", "thiserror 2.0.20", "x509-parser", - "yasna", + "yasna 0.6.0", ] [[package]] name = "libp2p-upnp" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4757e65fe69399c1a243bbb90ec1ae5a2114b907467bf09f3575e899815bb8d3" +checksum = "298e2b41af943bc4e429f03a72b9991c1353a4c5bbb0a45ae06b393002965b70" dependencies = [ "futures", "futures-timer", @@ -6079,17 +6214,15 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.47.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f15df094914eb4af272acf9adaa9e287baa269943f32ea348ba29cfb9bfc60d8" +checksum = "308e4033fd1ac9312c827405d3bf568ae335a7d8248071dc7c75c8c0b64977f9" dependencies = [ - "either", "futures", "libp2p-core", "thiserror 2.0.20", "tracing", - "yamux 0.12.1", - "yamux 0.13.10", + "yamux", ] [[package]] @@ -6391,12 +6524,13 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.18.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +checksum = "d96879ec0057cf5f99543c5333f6818c1473081684ae7ad55da21b6ea65ba214" dependencies = [ "arrayref", "byteorder", + "bytes", "data-encoding", "libp2p-identity", "multibase", @@ -6404,7 +6538,7 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.8.0", + "unsigned-varint", "url", ] @@ -6431,7 +6565,7 @@ dependencies = [ "quickcheck", "rand 0.10.2", "serde", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -6486,16 +6620,16 @@ dependencies = [ [[package]] name = "multistream-select" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +checksum = "1365a5fcbeb5c688f3c849229d06692e27c9af0c16c3126bd1589b680aa39f88" dependencies = [ "bytes", "futures", - "log", "pin-project", "smallvec", - "unsigned-varint 0.7.2", + "tracing", + "unsigned-varint", ] [[package]] @@ -6538,6 +6672,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + [[package]] name = "neptune" version = "11.0.0" @@ -6549,7 +6689,7 @@ dependencies = [ "blake2s_simd 0.5.11", "blstrs", "byteorder", - "ff", + "ff 0.13.1", "generic-array 0.14.7", "itertools 0.8.2", "log", @@ -6872,14 +7012,15 @@ dependencies = [ [[package]] name = "p256" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +checksum = "d2c9239b2dbc807adbbe147e8cf72ea7450c3a0aabe62cb8e75ff4ec22e1f72a" dependencies = [ - "ecdsa", - "elliptic-curve", + "ecdsa 0.17.0", + "elliptic-curve 0.14.1", + "primefield", "primeorder", - "sha2 0.10.9", + "sha2 0.11.0", ] [[package]] @@ -6898,7 +7039,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group", + "group 0.13.0", ] [[package]] @@ -7043,8 +7184,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3437083215c505e867eea5478371feba43d7689d6d15ec0a209eb46fb0d4cda6" dependencies = [ "blake2b_simd", - "ff", - "group", + "ff 0.13.1", + "group 0.13.0", "hex", "lazy_static", "rand 0.8.8", @@ -7097,9 +7238,9 @@ dependencies = [ [[package]] name = "pem-rfc7468" -version = "0.7.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9" dependencies = [ "base64ct", ] @@ -7217,8 +7358,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.10", + "spki 0.7.3", +] + +[[package]] +name = "pkcs8" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451913da69c775a56034ea8d9003d27ee8948e12443eae7c038ba100a4f21cb7" +dependencies = [ + "der 0.8.2", + "spki 0.8.0", ] [[package]] @@ -7384,6 +7535,17 @@ dependencies = [ "termtree", ] +[[package]] +name = "prefix-trie" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf6e3177f0684016a5c209b00882e15f8bdd3f3bb48f0491df10cd102d0c6e7" +dependencies = [ + "either", + "ipnet", + "num-traits", +] + [[package]] name = "pretty_assertions" version = "1.4.1" @@ -7404,13 +7566,31 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "primefield" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c555a6e4eb7d4e158fcb028c835c3b8642206ddc279b5c6b202ef9a8bdb592f4" +dependencies = [ + "crypto-bigint 0.7.5", + "crypto-common 0.2.2", + "ff 0.14.0", + "rand_core 0.10.1", + "subtle", + "zeroize", +] + [[package]] name = "primeorder" -version = "0.13.6" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +checksum = "5c9f42978c78a00e3d68f69fc03e57a234debae69da4020a4fb588fcdcd07b06" dependencies = [ - "elliptic-curve", + "elliptic-curve 0.14.1", + "once_cell", + "primefield", + "serdect", + "wnaf", ] [[package]] @@ -7496,7 +7676,19 @@ dependencies = [ "dtoa", "itoa", "parking_lot", - "prometheus-client-derive-encode", + "prometheus-client-derive-encode 0.4.2", +] + +[[package]] +name = "prometheus-client" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1784dc11a05f5a8f57c4a62915686be140f24f70301290b997e317241fa9ffc2" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode 0.5.1", ] [[package]] @@ -7510,6 +7702,17 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "prometheus-client-derive-encode" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e34894696ff94f64a20c2c373a6440903e9c2789a303d68ec6e6f953f890e4" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] + [[package]] name = "prost" version = "0.13.5" @@ -7530,6 +7733,19 @@ dependencies = [ "prost-derive 0.14.4", ] +[[package]] +name = "prost-codec" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1da63327bb7a8c30a2227df7f43379d0a4731a2eb517b0f61416da6c2a3c739" +dependencies = [ + "asynchronous-codec", + "bytes", + "prost 0.14.4", + "thiserror 2.0.20", + "unsigned-varint", +] + [[package]] name = "prost-derive" version = "0.13.5" @@ -7656,7 +7872,7 @@ dependencies = [ "bytes", "quick-protobuf", "thiserror 1.0.69", - "unsigned-varint 0.8.0", + "unsigned-varint", ] [[package]] @@ -7707,7 +7923,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.5", + "socket2", "thiserror 2.0.20", "tokio", "tracing", @@ -7747,7 +7963,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2", "tracing", "windows-sys 0.61.2", ] @@ -7950,7 +8166,7 @@ dependencies = [ "ring", "rustls-pki-types", "time", - "yasna", + "yasna 0.5.2", ] [[package]] @@ -8148,6 +8364,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "rfc6979" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4a459cddafb3fe76b31fd8f1108007566c40301feb64dc7b54656eb7388172b" +dependencies = [ + "crypto-bigint 0.7.5", + "hmac 0.13.0", +] + [[package]] name = "ring" version = "0.17.14" @@ -8520,9 +8746,9 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "rw-stream-sink" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +checksum = "57736c2b47f266c94699b56dc7b4f0a5a669ee87e5ef62bc4a54d8e05945353d" dependencies = [ "futures", "pin-project", @@ -8622,10 +8848,24 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", + "base16ct 0.2.0", + "der 0.7.10", "generic-array 0.14.7", - "pkcs8", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56d437c2f19203ce5f7122e507831de96f3d2d4d3be5af44a0b0a09d8a80e4d" +dependencies = [ + "base16ct 1.0.0", + "ctutils", + "der 0.8.2", + "hybrid-array", "subtle", "zeroize", ] @@ -8663,6 +8903,12 @@ dependencies = [ "serde_core", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "serde" version = "1.0.229" @@ -8868,6 +9114,16 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serdect" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66cf8fedced2fcf12406bcb34223dffb92eaf34908ede12fed414c82b7f00b3e" +dependencies = [ + "base16ct 1.0.0", + "serde", +] + [[package]] name = "serial_test" version = "4.0.1" @@ -9018,6 +9274,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d567dcbaf0049cb8ac2608a76cd95ff9e4412e1899d389ee400918ca7537f5" +dependencies = [ + "digest 0.11.3", + "rand_core 0.10.1", +] + [[package]] name = "simba" version = "0.10.2" @@ -9128,31 +9394,21 @@ checksum = "199905e6153d6405f9728fe44daace35f8f837bbf830bb6e85fbd5828709a886" [[package]] name = "snow" -version = "0.9.6" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +checksum = "599b506ccc4aff8cf7844bc42cf783009a434c1e26c964432560fb6d6ad02d82" dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek", - "rand_core 0.6.4", + "curve25519-dalek 4.1.3", + "getrandom 0.3.4", "ring", "rustc_version", "sha2 0.10.9", "subtle", ] -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.5" @@ -9257,7 +9513,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der", + "der 0.7.10", +] + +[[package]] +name = "spki" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f" +dependencies = [ + "base64ct", + "der 0.8.2", ] [[package]] @@ -9385,7 +9651,7 @@ dependencies = [ "futures-core", "futures-util", "hex", - "hkdf 0.13.0", + "hkdf", "hmac 0.13.0", "itoa", "log", @@ -9479,7 +9745,7 @@ dependencies = [ "byteorder", "cbc", "config", - "ff", + "ff 0.13.1", "filecoin-hashers", "fr32", "fs2", @@ -9516,7 +9782,7 @@ dependencies = [ "chacha20 0.9.1", "crossbeam", "fdlimit", - "ff", + "ff 0.13.1", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -9552,7 +9818,7 @@ dependencies = [ "bellperson", "blstrs", "byteorder", - "ff", + "ff 0.13.1", "filecoin-hashers", "generic-array 0.14.7", "log", @@ -9571,7 +9837,7 @@ dependencies = [ "anyhow", "bellperson", "blstrs", - "ff", + "ff 0.13.1", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -10008,7 +10274,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.5", + "socket2", "tokio-macros", "tracing", "windows-sys 0.61.2", @@ -10208,7 +10474,7 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "socket2 0.6.5", + "socket2", "sync_wrapper", "tokio", "tokio-stream", @@ -10531,12 +10797,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" -[[package]] -name = "unsigned-varint" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" - [[package]] name = "unsigned-varint" version = "0.8.0" @@ -10659,9 +10919,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.128" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -10672,19 +10932,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.78" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef4c5d3d2cdf5c54f4231181768f5510842e350db025faf1f7163b1030ed928" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ + "cfg-if", + "futures-util", "js-sys", + "once_cell", "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.128" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10692,22 +10956,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.128" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.5", + "syn 2.0.119", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.128" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] @@ -10979,9 +11243,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.105" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbddc4a036f00ec4f18c83445bd3115cb306a91da554919a099d9222fe4a7f8" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -11032,9 +11296,9 @@ checksum = "626c4bac6755d76ffc12cb01b2eac751db1996b9e0041de9aa02c8c211ddc82c" [[package]] name = "wide" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf05ca94c9fba0c51316899caa1d1e74a064fc310a5efa7375e614343d415be" +checksum = "d920ac99c3c8edce110cb8d07dbb324d6d026011dce85b1e9355b70f0adacc4f" dependencies = [ "bytemuck", "safe_arch", @@ -11462,6 +11726,18 @@ version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "wnaf" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795ca18b3fdb5e62bf982199278341ddcf7ebf7d32e25e212ad05d496e95f6fa" +dependencies = [ + "ff 0.14.0", + "group 0.14.0", + "hybrid-array", + "primefield", +] + [[package]] name = "writeable" version = "0.6.4" @@ -11479,21 +11755,20 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +checksum = "e7e8131a03190127fb2263afc72b322ecadae46b6ff8c6f399ff5d02f5559af6" dependencies = [ - "curve25519-dalek", - "rand_core 0.6.4", - "serde", + "curve25519-dalek 5.0.0", + "rand_core 0.10.1", "zeroize", ] [[package]] name = "x509-parser" -version = "0.17.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" +checksum = "d43b0f71ce057da06bc0851b23ee24f3f86190b07203dd8f567d0b706a185202" dependencies = [ "asn1-rs", "data-encoding", @@ -11533,31 +11808,15 @@ dependencies = [ [[package]] name = "yamux" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" -dependencies = [ - "futures", - "log", - "nohash-hasher", - "parking_lot", - "pin-project", - "rand 0.8.8", - "static_assertions", -] - -[[package]] -name = "yamux" -version = "0.13.10" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1991f6690292030e31b0144d73f5e8368936c58e45e7068254f7138b23b00672" +checksum = "767113d8f66a81e461362462aa71d8d0108cbf3430d4442fb88a04e31be81165" dependencies = [ "futures", "log", "nohash-hasher", "parking_lot", "pin-project", - "rand 0.9.5", "static_assertions", "web-time", ] @@ -11577,6 +11836,12 @@ dependencies = [ "time", ] +[[package]] +name = "yasna" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282" + [[package]] name = "yastl" version = "0.1.2" diff --git a/Cargo.toml b/Cargo.toml index 3d9c7b27cd54..cacb0619aaa9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ flume = "0.12" futures = "0.3" get-size2 = { version = "0.10", features = ["derive", "bytes", "hashbrown"] } hashlink = "0.11" -libp2p = { version = "0.56", default-features = false } -libp2p-swarm-test = { version = "0.6", default-features = false, features = ["tokio"] } +libp2p = { version = "0.57", default-features = false } +libp2p-swarm-test = { version = "0.7", default-features = false, features = ["tokio"] } multihash-codetable = { version = "0.2", features = ["blake2b", "blake2s", "blake3", "sha2", "sha3", "strobe"] } rust2go = "0.4" serde = { version = "1", default-features = false, features = ["derive", "rc"] } @@ -114,7 +114,7 @@ git-version = "0.3" group = "0.13" hashbrown = "0.17" hashlink = { workspace = true } -hickory-resolver = { version = "0.25", default-features = false, features = ["system-config", "tokio"] } +hickory-resolver = { version = "0.26", default-features = false, features = ["system-config", "tokio"] } http = "1" human-repr = { version = "1", features = ["iec", "space"] } humantime = "2" @@ -176,7 +176,9 @@ pathfinding = "4" pin-project-lite = "0.2" positioned-io = "0.3" pretty_assertions = "1" -prometheus-client = "0.23" +prometheus-client = "0.25" +# Only for `kubert-prometheus-process`, which is still pinned to 0.23. Drop once it publishes a 0.25 build. +prometheus-client-023 = { package = "prometheus-client", version = "0.23" } puruspe = "0.4" quick-protobuf = "0.8" quick-protobuf-codec = "0.3" diff --git a/deny.toml b/deny.toml index 82d3ec91a25c..6e91be20b046 100644 --- a/deny.toml +++ b/deny.toml @@ -6,8 +6,6 @@ ignore = [ "RUSTSEC-2022-0061", # parity-wasm is deprecated "RUSTSEC-2024-0436", # paste is unmaintained "RUSTSEC-2025-0141", # bincode is unmaintained - "RUSTSEC-2026-0118", # hickory-*, waiting for libp2p to update and release - "RUSTSEC-2026-0119", # hickory-*, waiting for libp2p to update and release ] [licenses] diff --git a/src/chain_sync/metrics.rs b/src/chain_sync/metrics.rs index 4f6c715aa7f3..0348a44a3ab6 100644 --- a/src/chain_sync/metrics.rs +++ b/src/chain_sync/metrics.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0, MIT use prometheus_client::{ - encoding::{EncodeLabelKey, EncodeLabelSet, EncodeLabelValue, LabelSetEncoder}, + encoding::EncodeLabelSet, metrics::{counter::Counter, family::Family, histogram::Histogram}, }; use std::sync::LazyLock; @@ -55,25 +55,16 @@ pub static GOSSIP_BLOCK_REJECTED_TOTAL: LazyLock Result<(), std::fmt::Error> { - let mut label_encoder = encoder.encode_label(); - let mut label_key_encoder = label_encoder.encode_label_key()?; - EncodeLabelKey::encode(&"libp2p_message_kind", &mut label_key_encoder)?; - let mut label_value_encoder = label_key_encoder.encode_label_value()?; - EncodeLabelValue::encode(&self.0, &mut label_value_encoder)?; - label_value_encoder.finish() - } -} - pub mod values { use super::Libp2pMessageKindLabel; diff --git a/src/daemon/mod.rs b/src/daemon/mod.rs index 3d0e8c596f70..f7b2f360199a 100644 --- a/src/daemon/mod.rs +++ b/src/daemon/mod.rs @@ -816,7 +816,7 @@ pub(super) async fn start_services( rpc_stop_handle: jsonrpsee::server::StopHandle, ) -> anyhow::Result<()> { // Cleanup the collector prometheus metrics registry on start - crate::metrics::reset_collector_registry(); + crate::metrics::reset_collector_registries(); let mut services = JoinSet::new(); let network = config.chain(); let ctx = AppContext::init(opts, &config).await?; diff --git a/src/libp2p/behaviour.rs b/src/libp2p/behaviour.rs index df9c1c1cda31..6cd24fff3df2 100644 --- a/src/libp2p/behaviour.rs +++ b/src/libp2p/behaviour.rs @@ -100,6 +100,8 @@ pub(in crate::libp2p) fn build_gossipsub( let mut gs_config_builder = gossipsub::ConfigBuilder::default(); gs_config_builder.max_transmit_size(1 << 20); gs_config_builder.validation_mode(ValidationMode::Strict); + gs_config_builder.max_publish_messages(5000); + gs_config_builder.max_control_message_size(512 * 1024); gs_config_builder.message_id_fn(|msg: &gossipsub::Message| { let s = blake2b_256(&msg.data); MessageId::from(s) diff --git a/src/libp2p/discovery.rs b/src/libp2p/discovery.rs index 48e25991a26e..6b279582744c 100644 --- a/src/libp2p/discovery.rs +++ b/src/libp2p/discovery.rs @@ -10,6 +10,8 @@ use std::{ }; use ahash::{HashMap, HashMapExt, HashSet, HashSetExt}; +use anyhow::Context as _; +use hickory_resolver::proto::rr::RData; use libp2p::{ StreamProtocol, autonat, core::Multiaddr, @@ -455,11 +457,17 @@ impl NetworkBehaviour for DiscoveryBehaviour { } DerivedDiscoveryBehaviourEvent::Autonat(_) => {} DerivedDiscoveryBehaviourEvent::Upnp(ev) => match ev { - upnp::Event::NewExternalAddr(addr) => { - info!("UPnP NewExternalAddr: {addr}"); + upnp::Event::NewExternalAddr { + local_addr, + external_addr, + } => { + info!("UPnP NewExternalAddr: {local_addr} -> {external_addr}"); } - upnp::Event::ExpiredExternalAddr(addr) => { - info!("UPnP ExpiredExternalAddr: {addr}"); + upnp::Event::ExpiredExternalAddr { + local_addr, + external_addr, + } => { + info!("UPnP ExpiredExternalAddr: {local_addr} -> {external_addr}"); } upnp::Event::GatewayNotFound => { info!("UPnP GatewayNotFound"); @@ -550,25 +558,35 @@ impl NetworkBehaviour for DiscoveryBehaviour { // Note: The function is async because the sync API `hickory_resolver::Resolver` is a wrapper of // the async API and does not work inside another tokio runtime async fn resolve_libp2p_dnsaddr(name: &str) -> anyhow::Result> { - let resolver = hickory_resolver::TokioResolver::builder_tokio()?.build(); + let resolver = hickory_resolver::TokioResolver::builder_tokio() + .context("failed to read the system DNS configuration")? + .build() + .context("failed to build the DNS resolver")?; let name = ["_dnsaddr.", name].concat(); - let txts = resolver.txt_lookup(name).await?; + let lookup = resolver + .txt_lookup(name.as_str()) + .await + .with_context(|| format!("TXT lookup failed for {name}"))?; let mut pairs = vec![]; - for txt in txts { - if let Some(chars) = txt.txt_data().first() { - match parse_dnsaddr_txt(chars) { - Err(e) => { - // Skip over seemingly invalid entries. - tracing::debug!("Invalid TXT record: {:?}", e); - } - Ok(mut addr) => { - if let Some(Protocol::P2p(peer_id)) = addr.pop() { - pairs.push((peer_id, addr)) - } else { - tracing::debug!("Failed to parse peer id from {addr}") - } + for record in lookup.answers() { + let RData::TXT(txt) = &record.data else { + continue; + }; + // A TXT RDATA may be published as several character-strings. go-libp2p joins them, so + // Forest must too or the same zone yields a different bootstrap set on each node. + let chars = txt.txt_data.concat(); + match parse_dnsaddr_txt(&chars) { + Err(e) => { + // Skip over seemingly invalid entries. + tracing::warn!("Invalid TXT record: {e:?}"); + } + Ok(mut addr) => { + if let Some(Protocol::P2p(peer_id)) = addr.pop() { + pairs.push((peer_id, addr)) + } else { + tracing::warn!("Failed to parse peer id from {addr}") } } } @@ -576,7 +594,7 @@ async fn resolve_libp2p_dnsaddr(name: &str) -> anyhow::Result` of a `dnsaddr` `TXT` record. +/// Parses the value of a `dnsaddr` `TXT` record. fn parse_dnsaddr_txt(txt: &[u8]) -> io::Result { let s = str::from_utf8(txt).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?; match s.strip_prefix("dnsaddr=") { @@ -601,6 +619,36 @@ mod tests { use libp2p_swarm_test::SwarmExt as _; use std::str::FromStr as _; + const DNSADDR_TXT: &str = "dnsaddr=/dns/bootstrap.filecoin.chain.love/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt"; + + #[test] + fn parse_dnsaddr_txt_accepts_a_bootstrap_record() { + let addr = parse_dnsaddr_txt(DNSADDR_TXT.as_bytes()).unwrap(); + assert!(matches!(addr.iter().last(), Some(Protocol::P2p(_)))); + } + + #[test] + fn parse_dnsaddr_txt_rejects_non_dnsaddr_records() { + parse_dnsaddr_txt(b"v=spf1 -all").unwrap_err(); + parse_dnsaddr_txt(b"dnsaddr=not-a-multiaddr").unwrap_err(); + parse_dnsaddr_txt(&[0xff]).unwrap_err(); + } + + /// A zone may publish one value as several character-strings; they must be joined without a + /// separator before parsing, matching go-libp2p. + #[test] + fn multi_segment_txt_record_is_joined() { + let (head, tail) = DNSADDR_TXT.split_at(60); + let split = + hickory_resolver::proto::rr::rdata::TXT::new(vec![head.to_string(), tail.to_string()]); + + assert_eq!(split.txt_data.len(), 2); + assert_eq!( + parse_dnsaddr_txt(&split.txt_data.concat()).unwrap(), + parse_dnsaddr_txt(DNSADDR_TXT.as_bytes()).unwrap() + ); + } + #[tokio::test] async fn resolve_libp2p_dnsaddr_test() { async fn run() -> anyhow::Result<()> { diff --git a/src/libp2p/rpc/mod.rs b/src/libp2p/rpc/mod.rs index 9595fcccac60..53d47a7da13b 100644 --- a/src/libp2p/rpc/mod.rs +++ b/src/libp2p/rpc/mod.rs @@ -4,7 +4,6 @@ mod decoder; use std::{io, marker::PhantomData, time::Duration}; -use async_trait::async_trait; use decoder::DagCborDecodingReader; use futures::prelude::*; use libp2p::request_response::{self, OutboundFailure}; @@ -92,10 +91,9 @@ impl From for RequestResponseError { } } -#[async_trait] impl request_response::Codec for CborRequestResponse where - P: AsRef + Send + Clone, + P: AsRef + Send + Sync + Clone, RQ: Serialize + DeserializeOwned + Send + Sync, RS: Serialize + DeserializeOwned + Send + Sync, C: CodecConfig + Send + Sync, diff --git a/src/libp2p_bitswap/internals/codec.rs b/src/libp2p_bitswap/internals/codec.rs index 4412c8e529ba..21eba0d5c56b 100644 --- a/src/libp2p_bitswap/internals/codec.rs +++ b/src/libp2p_bitswap/internals/codec.rs @@ -3,7 +3,6 @@ use std::io; -use async_trait::async_trait; use asynchronous_codec::{FramedRead, FramedWrite}; use futures::{ SinkExt, StreamExt, @@ -32,7 +31,6 @@ fn codec() -> quick_protobuf_codec::Codec { #[derive(Default, Debug, Clone)] pub struct BitswapRequestResponseCodec; -#[async_trait] impl request_response::Codec for BitswapRequestResponseCodec { type Protocol = &'static str; type Request = BitswapMessages; diff --git a/src/metrics/mod.rs b/src/metrics/mod.rs index 989f146919ee..109ea9596b72 100644 --- a/src/metrics/mod.rs +++ b/src/metrics/mod.rs @@ -28,6 +28,11 @@ static DEFAULT_REGISTRY: LazyLock> static COLLECTOR_REGISTRY: LazyLock> = LazyLock::new(Default::default); +// Separate because `kubert-prometheus-process` is still on `prometheus-client` 0.23 while the rest +// of the tree is on 0.25. Both encode to the same text format, so the scrape output is unaffected. +static PROCESS_REGISTRY: LazyLock> = + LazyLock::new(Default::default); + pub fn default_registry<'a>() -> RwLockWriteGuard<'a, prometheus_client::registry::Registry> { DEFAULT_REGISTRY.write() } @@ -41,8 +46,21 @@ pub fn register_collector(collector: Box) { collector_registry().register_collector(collector) } -pub fn reset_collector_registry() { +fn register_process_metrics() { + if let Err(err) = kubert_prometheus_process::register( + PROCESS_REGISTRY.write().sub_registry_with_prefix("process"), + ) { + warn!("Failed to register process metrics: {err}"); + } +} + +/// Clears the collector and process registries, which are repopulated on each daemon run. +/// +/// [`DEFAULT_REGISTRY`] is deliberately left alone: its families are registered from `LazyLock` +/// statics, which only ever run once. +pub fn reset_collector_registries() { *collector_registry() = Default::default(); + *PROCESS_REGISTRY.write() = Default::default(); } pub static RPC_METHOD_FAILURE: LazyLock> = LazyLock::new(|| { @@ -89,12 +107,7 @@ pub async fn init_prometheus( where DB: DBStatistics + Send + Sync + 'static, { - // Add the process collector to the registry - if let Err(err) = kubert_prometheus_process::register( - collector_registry().sub_registry_with_prefix("process"), - ) { - warn!("Failed to register process metrics: {err}"); - } + register_process_metrics(); register_collector(Box::new( crate::utils::version::ForestVersionCollector::new(), @@ -119,7 +132,7 @@ where Ok(axum::serve(prometheus_listener, app.into_make_service()).await?) } -async fn collect_prometheus_metrics() -> impl IntoResponse { +fn encode_metrics() -> String { let mut metrics = String::new(); if let Err(e) = prometheus_client::encoding::text::encode_registry(&mut metrics, &DEFAULT_REGISTRY.read()) @@ -131,9 +144,20 @@ async fn collect_prometheus_metrics() -> impl IntoResponse { { warn!("failed to encode the collector metrics registry: {e}"); }; + if let Err(e) = prometheus_client_023::encoding::text::encode_registry( + &mut metrics, + &PROCESS_REGISTRY.read(), + ) { + warn!("failed to encode the process metrics registry: {e}"); + }; if let Err(e) = prometheus_client::encoding::text::encode_eof(&mut metrics) { warn!("failed to encode metrics eof {e}"); }; + metrics +} + +async fn collect_prometheus_metrics() -> impl IntoResponse { + let metrics = encode_metrics(); ( StatusCode::OK, [("content-type", "text/plain; charset=utf-8")], @@ -227,3 +251,40 @@ impl GaugeGuardExt for Gauge { GaugeGuard { gauge: self } } } + +#[cfg(test)] +mod tests { + use super::*; + use itertools::Itertools as _; + + /// `kubert-prometheus-process` registers into a registry from a different `prometheus-client` + /// version than the rest of the tree, so guard that its metrics still reach the scrape output. + #[test] + #[serial_test::serial] + fn process_metrics_are_scraped() { + *PROCESS_REGISTRY.write() = Default::default(); + register_process_metrics(); + + let scraped = encode_metrics(); + + assert!(scraped.contains("process_start_time_seconds")); + assert!(scraped.contains("process_uptime_seconds_total")); + assert_eq!(scraped.matches("# EOF").count(), 1); + assert!(scraped.ends_with("# EOF\n")); + + // A duplicate family makes the whole scrape unparseable, which the substring + // assertions above cannot see. + for prefix in ["# HELP ", "# TYPE "] { + let duplicates = scraped + .lines() + .filter_map(|l| l.strip_prefix(prefix)) + .filter_map(|declaration| declaration.split_whitespace().next()) + .duplicates() + .collect_vec(); + assert!( + duplicates.is_empty(), + "duplicate `{prefix}` names: {duplicates:?}" + ); + } + } +}