Upgrade deps + extended instance data

This commit is contained in:
Oscar Beaumont 2024-01-23 13:12:40 +08:00 committed by Brendan Allan
parent 87958f730a
commit 1857742b08
10 changed files with 261 additions and 227 deletions

383
Cargo.lock generated
View file

@ -281,20 +281,39 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
dependencies = [
"async-lock",
"async-lock 2.8.0",
"autocfg",
"cfg-if",
"concurrent-queue",
"futures-lite",
"futures-lite 1.13.0",
"log",
"parking",
"polling",
"polling 2.8.0",
"rustix 0.37.27",
"slab",
"socket2 0.4.10",
"waker-fn",
]
[[package]]
name = "async-io"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744"
dependencies = [
"async-lock 3.3.0",
"cfg-if",
"concurrent-queue",
"futures-io",
"futures-lite 2.2.0",
"parking",
"polling 3.3.2",
"rustix 0.38.28",
"slab",
"tracing",
"windows-sys 0.52.0",
]
[[package]]
name = "async-lock"
version = "2.8.0"
@ -304,6 +323,17 @@ dependencies = [
"event-listener 2.5.3",
]
[[package]]
name = "async-lock"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b"
dependencies = [
"event-listener 4.0.1",
"event-listener-strategy",
"pin-project-lite",
]
[[package]]
name = "async-recursion"
version = "1.0.5"
@ -364,9 +394,9 @@ dependencies = [
[[package]]
name = "asynchronous-codec"
version = "0.6.2"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568"
checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233"
dependencies = [
"bytes",
"futures-sink",
@ -2319,18 +2349,6 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
[[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"
@ -2455,7 +2473,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "279d3efcc55e19917fff7ab3ddd6c14afb6a90881a0078465196fe2f99d08c56"
dependencies = [
"bit_field",
"flume",
"flume 0.10.14",
"half",
"lebe",
"miniz_oxide",
@ -2609,6 +2627,18 @@ dependencies = [
"spin 0.9.8",
]
[[package]]
name = "flume"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
"futures-core",
"futures-sink",
"nanorand",
"spin 0.9.8",
]
[[package]]
name = "fnv"
version = "1.0.7"
@ -2714,6 +2744,16 @@ dependencies = [
"futures-util",
]
[[package]]
name = "futures-bounded"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1e2774cc104e198ef3d3e1ff4ab40f86fa3245d6cb6a3a46174f21463cee173"
dependencies = [
"futures-timer",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.29"
@ -2739,9 +2779,9 @@ dependencies = [
[[package]]
name = "futures-core"
version = "0.3.29"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
[[package]]
name = "futures-executor"
@ -2776,6 +2816,16 @@ dependencies = [
"waker-fn",
]
[[package]]
name = "futures-lite"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba"
dependencies = [
"futures-core",
"pin-project-lite",
]
[[package]]
name = "futures-locks"
version = "0.7.1"
@ -3311,6 +3361,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 0.4.0",
"ipnet",
"once_cell",
"rand 0.8.5",
"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 0.12.1",
"rand 0.8.5",
"resolv-conf",
"smallvec 1.11.2",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "hkdf"
version = "0.11.0"
@ -3539,17 +3635,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[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"
@ -3570,16 +3655,6 @@ dependencies = [
"unicode-normalization",
]
[[package]]
name = "if-addrs"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "if-addrs"
version = "0.10.2"
@ -3592,14 +3667,14 @@ dependencies = [
[[package]]
name = "if-watch"
version = "3.1.0"
source = "git+https://github.com/oscartbeaumont/if-watch.git?rev=f732786057e57250e863a9ea0b1874e4cc9907c2#f732786057e57250e863a9ea0b1874e4cc9907c2"
version = "3.2.0"
source = "git+https://github.com/oscartbeaumont/if-watch.git?rev=a92c17d3f85c1c6fb0afeeaf6c2b24d0b147e8c3#a92c17d3f85c1c6fb0afeeaf6c2b24d0b147e8c3"
dependencies = [
"async-io",
"async-io 2.3.0",
"core-foundation",
"fnv",
"futures",
"if-addrs 0.7.0",
"if-addrs",
"ipnet",
"log",
"rtnetlink",
@ -4121,9 +4196,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "libp2p"
version = "0.52.4"
version = "0.53.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94495eb319a85b70a68b85e2389a95bb3555c71c49025b78c691a854a7e6464"
checksum = "681fb3f183edfbedd7a57d32ebe5dcdc0b9f94061185acf3c30249349cc6fc99"
dependencies = [
"bytes",
"either",
@ -4151,9 +4226,9 @@ dependencies = [
[[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",
@ -4163,9 +4238,9 @@ dependencies = [
[[package]]
name = "libp2p-connection-limits"
version = "0.2.1"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f5107ad45cb20b2f6c3628c7b6014b996fcb13a88053f4569c872c6e30abf58"
checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd"
dependencies = [
"libp2p-core",
"libp2p-identity",
@ -4175,9 +4250,9 @@ dependencies = [
[[package]]
name = "libp2p-core"
version = "0.40.1"
version = "0.41.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd44289ab25e4c9230d9246c475a22241e301b23e8f4061d3bdef304a1a99713"
checksum = "8130a8269e65a2554d55131c770bdf4bcd94d2b8d4efb24ca23699be65066c05"
dependencies = [
"either",
"fnv",
@ -4185,7 +4260,6 @@ dependencies = [
"futures-timer",
"instant",
"libp2p-identity",
"log",
"multiaddr",
"multihash",
"multistream-select",
@ -4198,31 +4272,32 @@ dependencies = [
"serde",
"smallvec 1.11.2",
"thiserror",
"unsigned-varint",
"tracing",
"unsigned-varint 0.8.0",
"void",
]
[[package]]
name = "libp2p-dns"
version = "0.40.1"
version = "0.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6a18db73084b4da2871438f6239fef35190b05023de7656e877c18a00541a3b"
checksum = "d17cbcf7160ff35c3e8e560de4a068fe9d6cb777ea72840e48eb76ff9576c4b6"
dependencies = [
"async-trait",
"futures",
"hickory-resolver",
"libp2p-core",
"libp2p-identity",
"log",
"parking_lot 0.12.1",
"smallvec 1.11.2",
"trust-dns-resolver",
"tracing",
]
[[package]]
name = "libp2p-gossipsub"
version = "0.45.2"
version = "0.46.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1f9624e2a843b655f1c1b8262b8d5de6f309413fca4d66f01bb0662429f84dc"
checksum = "d665144a616dadebdc5fff186b1233488cdcd8bfb1223218ff084b6d052c94f7"
dependencies = [
"asynchronous-codec",
"base64 0.21.5",
@ -4238,7 +4313,6 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"libp2p-swarm",
"log",
"prometheus-client",
"quick-protobuf",
"quick-protobuf-codec",
@ -4247,7 +4321,7 @@ dependencies = [
"serde",
"sha2 0.10.8",
"smallvec 1.11.2",
"unsigned-varint",
"tracing",
"void",
]
@ -4272,9 +4346,9 @@ dependencies = [
[[package]]
name = "libp2p-kad"
version = "0.44.6"
version = "0.45.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16ea178dabba6dde6ffc260a8e0452ccdc8f79becf544946692fff9d412fc29d"
checksum = "5cc5767727d062c4eac74dd812c998f0e488008e82cce9c33b463d38423f9ad2"
dependencies = [
"arrayvec",
"asynchronous-codec",
@ -4282,12 +4356,12 @@ dependencies = [
"either",
"fnv",
"futures",
"futures-bounded",
"futures-timer",
"instant",
"libp2p-core",
"libp2p-identity",
"libp2p-swarm",
"log",
"quick-protobuf",
"quick-protobuf-codec",
"rand 0.8.5",
@ -4295,37 +4369,37 @@ dependencies = [
"sha2 0.10.8",
"smallvec 1.11.2",
"thiserror",
"tracing",
"uint",
"unsigned-varint",
"void",
]
[[package]]
name = "libp2p-mdns"
version = "0.44.0"
version = "0.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42a2567c305232f5ef54185e9604579a894fd0674819402bb0ac0246da82f52a"
checksum = "49007d9a339b3e1d7eeebc4d67c05dbf23d300b7d091193ec2d3f26802d7faf2"
dependencies = [
"data-encoding",
"futures",
"hickory-proto",
"if-watch",
"libp2p-core",
"libp2p-identity",
"libp2p-swarm",
"log",
"rand 0.8.5",
"smallvec 1.11.2",
"socket2 0.5.5",
"tokio",
"trust-dns-proto 0.22.0",
"tracing",
"void",
]
[[package]]
name = "libp2p-quic"
version = "0.9.3"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "130d451d83f21b81eb7b35b360bc7972aeafb15177784adc56528db082e6b927"
checksum = "a0375cdfee57b47b313ef1f0fdb625b78aed770d33a40cf1c294a371ff5e6666"
dependencies = [
"bytes",
"futures",
@ -4334,7 +4408,6 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"libp2p-tls",
"log",
"parking_lot 0.12.1",
"quinn",
"rand 0.8.5",
@ -4343,13 +4416,14 @@ dependencies = [
"socket2 0.5.5",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "libp2p-swarm"
version = "0.43.7"
version = "0.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "580189e0074af847df90e75ef54f3f30059aedda37ea5a1659e8b9fca05c0141"
checksum = "e92532fc3c4fb292ae30c371815c9b10103718777726ea5497abc268a4761866"
dependencies = [
"either",
"fnv",
@ -4358,20 +4432,20 @@ dependencies = [
"instant",
"libp2p-core",
"libp2p-identity",
"log",
"multistream-select",
"once_cell",
"rand 0.8.5",
"smallvec 1.11.2",
"tokio",
"tracing",
"void",
]
[[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",
@ -4379,16 +4453,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",
@ -4405,17 +4479,17 @@ dependencies = [
[[package]]
name = "libp2p-upnp"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82775a47b34f10f787ad3e2a22e2c1541e6ebef4fe9f28f3ac553921554c94c1"
checksum = "963eb8a174f828f6a51927999a9ab5e45dfa9aa2aa5fed99aa65f79de6229464"
dependencies = [
"futures",
"futures-timer",
"igd-next",
"libp2p-core",
"libp2p-swarm",
"log",
"tokio",
"tracing",
"void",
]
@ -4655,14 +4729,14 @@ dependencies = [
[[package]]
name = "mdns-sd"
version = "0.9.3"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c97183f9949c1f97921e4dda6bc059dfc30a6da5e4460a4f5218847dbe2ae1f"
checksum = "2c460fa7decb7ea827682546b0584736acb45bcb2ced0d0dd6030c6d529e012e"
dependencies = [
"flume",
"if-addrs 0.10.2",
"flume 0.11.0",
"if-addrs",
"log",
"polling",
"polling 2.8.0",
"socket2 0.4.10",
]
@ -4885,7 +4959,7 @@ dependencies = [
"percent-encoding",
"serde",
"static_assertions",
"unsigned-varint",
"unsigned-varint 0.7.2",
"url",
]
@ -4908,7 +4982,7 @@ checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492"
dependencies = [
"core2",
"serde",
"unsigned-varint",
"unsigned-varint 0.7.2",
]
[[package]]
@ -4922,7 +4996,7 @@ dependencies = [
"log",
"pin-project",
"smallvec 1.11.2",
"unsigned-varint",
"unsigned-varint 0.7.2",
]
[[package]]
@ -5753,11 +5827,12 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "pem"
version = "1.1.1"
version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8"
checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310"
dependencies = [
"base64 0.13.1",
"base64 0.21.5",
"serde",
]
[[package]]
@ -6074,6 +6149,20 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "polling"
version = "3.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41"
dependencies = [
"cfg-if",
"concurrent-queue",
"pin-project-lite",
"rustix 0.38.28",
"tracing",
"windows-sys 0.52.0",
]
[[package]]
name = "poly1305"
version = "0.8.0"
@ -6329,9 +6418,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 1.0.10",
@ -6535,15 +6624,15 @@ dependencies = [
[[package]]
name = "quick-protobuf-codec"
version = "0.2.0"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ededb1cd78531627244d51dd0c7139fbe736c7d57af0092a76f0ffb2f56e98"
checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474"
dependencies = [
"asynchronous-codec",
"bytes",
"quick-protobuf",
"thiserror",
"unsigned-varint",
"unsigned-varint 0.8.0",
]
[[package]]
@ -6780,9 +6869,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",
@ -7765,7 +7854,7 @@ version = "0.1.0"
dependencies = [
"base64 0.21.5",
"ed25519-dalek",
"flume",
"flume 0.11.0",
"futures-core",
"if-watch",
"libp2p",
@ -9564,78 +9653,6 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3"
[[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 0.8.5",
"smallvec 1.11.2",
"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 0.8.5",
"smallvec 1.11.2",
"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 0.12.1",
"rand 0.8.5",
"resolv-conf",
"smallvec 1.11.2",
"thiserror",
"tokio",
"tracing",
"trust-dns-proto 0.23.2",
]
[[package]]
name = "try-lock"
version = "0.2.5"
@ -9819,10 +9836,12 @@ name = "unsigned-varint"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105"
dependencies = [
"asynchronous-codec",
"bytes",
]
[[package]]
name = "unsigned-varint"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06"
[[package]]
name = "untrusted"
@ -10888,7 +10907,7 @@ version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cbeb2291cd7267a94489b71376eda33496c1b9881adf6b36f26cc2779f3fc49"
dependencies = [
"async-io",
"async-io 1.13.0",
"byteorder",
"derivative",
"enumflags2 0.6.4",
@ -10897,7 +10916,7 @@ dependencies = [
"nb-connect",
"nix 0.22.3",
"once_cell",
"polling",
"polling 2.8.0",
"scoped-tls",
"serde",
"serde_repr",

View file

@ -85,7 +85,7 @@ webp = "0.2.6"
[patch.crates-io]
# Proper IOS Support
if-watch = { git = "https://github.com/oscartbeaumont/if-watch.git", rev = "f732786057e57250e863a9ea0b1874e4cc9907c2" }
if-watch = { git = "https://github.com/oscartbeaumont/if-watch.git", rev = "a92c17d3f85c1c6fb0afeeaf6c2b24d0b147e8c3" }
# Beta features
rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" }

View file

@ -44,7 +44,7 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
}
mod library {
use crate::cloud;
use crate::{cloud, node::Platform};
use super::*;
@ -67,12 +67,16 @@ mod library {
.procedure("create", {
R.with2(library())
.mutation(|(node, library), _: ()| async move {
let node_config = node.config.get().await;
sd_cloud_api::library::create(
node.cloud_api_config().await,
library.id,
&library.config().await.name,
library.instance_uuid,
library.identity.to_remote_identity(),
node_config.id,
&node_config.name,
Platform::current().into(),
)
.await?;
@ -110,11 +114,15 @@ mod library {
)
.await?;
let node_config = node.config.get().await;
let instances = sd_cloud_api::library::join(
node.cloud_api_config().await,
library_id,
library.instance_uuid,
library.identity.to_remote_identity(),
node_config.id,
&node_config.name,
Platform::current().into(),
)
.await?;

View file

@ -54,3 +54,9 @@ impl TryFrom<u8> for Platform {
Ok(s)
}
}
impl From<Platform> for u8 {
fn from(platform: Platform) -> Self {
platform as u8
}
}

View file

@ -192,6 +192,9 @@ pub mod library {
name: &str,
instance_uuid: Uuid,
instance_identity: RemoteIdentity,
node_id: Uuid,
node_name: &str,
node_platform: u8,
) -> Result<(), Error> {
let Some(auth_token) = config.auth_token else {
return Err(Error("Authentication required".to_string()));
@ -206,7 +209,10 @@ pub mod library {
.json(&json!({
"name":name,
"instanceUuid": instance_uuid,
"instanceIdentity": instance_identity
"instanceIdentity": instance_identity,
"nodeId": node_id,
"nodeName": node_name,
"nodePlatform": node_platform
}))
.with_auth(auth_token)
.send()
@ -231,6 +237,9 @@ pub mod library {
library_id: Uuid,
instance_uuid: Uuid,
instance_identity: RemoteIdentity,
node_id: Uuid,
node_name: &str,
node_platform: u8,
) -> Result<Vec<Instance>, Error> {
let Some(auth_token) = config.auth_token else {
return Err(Error("Authentication required".to_string()));
@ -242,7 +251,12 @@ pub mod library {
"{}/api/v1/libraries/{library_id}/instances/{instance_uuid}",
config.api_url
))
.json(&json!({ "instanceIdentity": instance_identity }))
.json(&json!({
"instanceIdentity": instance_identity,
"nodeId": node_id,
"nodeName": node_name,
"nodePlatform": node_platform
}))
.with_auth(auth_token)
.send()
.await

View file

@ -33,18 +33,18 @@ tokio-util = { workspace = true, features = ["compat"] }
tracing = { workspace = true }
uuid = { workspace = true }
ed25519-dalek = { version = "2.0.0", features = [] }
flume = "0.10.0" # Must match version used by `mdns-sd`
futures-core = "0.3.29"
if-watch = { version = "=3.1.0", features = [
ed25519-dalek = { version = "2.1.0", features = [] }
flume = "=0.11.0" # Must match version used by `mdns-sd`
futures-core = "0.3.30"
if-watch = { version = "=3.2.0", features = [
"tokio",
] } # Override the features of if-watch which is used by libp2p-quic
libp2p = { version = "0.52.4", features = ["tokio", "serde"] }
libp2p-quic = { version = "0.9.3", features = ["tokio"] }
mdns-sd = "0.9.3"
libp2p = { version = "0.53.2", features = ["tokio", "serde"] }
libp2p-quic = { version = "0.10.2", features = ["tokio"] }
mdns-sd = "0.10.3"
rand_core = { version = "0.6.4" }
streamunordered = "0.5.3"
zeroize = { version = "1.7.0", features = ["derive"]}
zeroize = { version = "1.7.0", features = ["derive"] }
[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread"] }

View file

@ -330,9 +330,14 @@ impl Mdns {
// TODO: Without this mDNS is not sending it goodbye packets without a timeout. Try and remove this cause it makes shutdown slow.
sleep(Duration::from_millis(100));
self.mdns_daemon.shutdown().unwrap_or_else(|err| {
error!("error shutting down mdns daemon: {err}");
});
match self.mdns_daemon.shutdown() {
Ok(chan) => {
let _ = chan.recv();
}
Err(err) => {
error!("error shutting down mdns daemon: {err}");
}
}
}
}

View file

@ -299,6 +299,7 @@ impl ManagerStream {
}
SwarmEvent::ListenerError { listener_id, error } => warn!("listener '{:?}' reported a non-fatal error: {}", listener_id, error),
SwarmEvent::Dialing { .. } => {},
_ => {}
}
}
}

View file

@ -8,8 +8,8 @@ use libp2p::{
core::{ConnectedPoint, Endpoint},
swarm::{
derive_prelude::{ConnectionEstablished, ConnectionId, FromSwarm},
ConnectionClosed, ConnectionDenied, NetworkBehaviour, PollParameters, THandler,
THandlerInEvent, THandlerOutEvent, ToSwarm,
ConnectionClosed, ConnectionDenied, NetworkBehaviour, THandler, THandlerInEvent,
THandlerOutEvent, ToSwarm,
},
Multiaddr,
};
@ -83,7 +83,7 @@ impl NetworkBehaviour for SpaceTime {
Ok(SpaceTimeConnection::new(peer_id, self.manager.clone()))
}
fn on_swarm_event(&mut self, event: FromSwarm<Self::ConnectionHandler>) {
fn on_swarm_event(&mut self, event: FromSwarm) {
match event {
FromSwarm::ConnectionEstablished(ConnectionEstablished {
peer_id,
@ -160,15 +160,7 @@ impl NetworkBehaviour for SpaceTime {
// }
}
}
FromSwarm::ListenFailure(_)
| FromSwarm::NewListener(_)
| FromSwarm::NewListenAddr(_)
| FromSwarm::ExpiredListenAddr(_)
| FromSwarm::ListenerError(_)
| FromSwarm::ListenerClosed(_)
| FromSwarm::NewExternalAddrCandidate(_)
| FromSwarm::ExternalAddrConfirmed(_)
| FromSwarm::ExternalAddrExpired(_) => {}
_ => {}
}
}
@ -181,11 +173,7 @@ impl NetworkBehaviour for SpaceTime {
self.pending_events.push_back(ToSwarm::GenerateEvent(event));
}
fn poll(
&mut self,
_: &mut Context<'_>,
_: &mut impl PollParameters,
) -> Poll<ToSwarm<Self::ToSwarm, THandlerInEvent<Self>>> {
fn poll(&mut self, _: &mut Context<'_>) -> Poll<ToSwarm<Self::ToSwarm, THandlerInEvent<Self>>> {
if let Some(ev) = self.pending_events.pop_front() {
return Poll::Ready(ev);
} else if self.pending_events.capacity() > EMPTY_QUEUE_SHRINK_THRESHOLD {

View file

@ -2,15 +2,13 @@ use libp2p::{
swarm::{
handler::{
ConnectionEvent, ConnectionHandler, ConnectionHandlerEvent, FullyNegotiatedInbound,
KeepAlive,
},
StreamUpgradeError, SubstreamProtocol,
SubstreamProtocol,
},
PeerId,
};
use std::{
collections::VecDeque,
io,
sync::Arc,
task::{Context, Poll},
time::Duration,
@ -33,7 +31,7 @@ pub struct SpaceTimeConnection {
OutboundProtocol,
<Self as ConnectionHandler>::OutboundOpenInfo,
<Self as ConnectionHandler>::ToBehaviour,
StreamUpgradeError<io::Error>,
// StreamUpgradeError<io::Error>,
>,
>,
}
@ -51,7 +49,6 @@ impl SpaceTimeConnection {
impl ConnectionHandler for SpaceTimeConnection {
type FromBehaviour = OutboundRequest;
type ToBehaviour = ManagerStreamAction2;
type Error = StreamUpgradeError<io::Error>;
type InboundProtocol = InboundProtocol;
type OutboundProtocol = OutboundProtocol;
type OutboundOpenInfo = ();
@ -87,20 +84,15 @@ impl ConnectionHandler for SpaceTimeConnection {
});
}
fn connection_keep_alive(&self) -> KeepAlive {
KeepAlive::Yes // TODO: Make this work how the old one did with storing it on `self` and updating on events
fn connection_keep_alive(&self) -> bool {
true // TODO: Make this work how the old one did with storing it on `self` and updating on events
}
fn poll(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<
ConnectionHandlerEvent<
Self::OutboundProtocol,
Self::OutboundOpenInfo,
Self::ToBehaviour,
StreamUpgradeError<io::Error>,
>,
ConnectionHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::ToBehaviour>,
> {
if let Some(event) = self.pending_events.pop_front() {
return Poll::Ready(event);
@ -142,6 +134,7 @@ impl ConnectionHandler for SpaceTimeConnection {
}
ConnectionEvent::LocalProtocolsChange(_) => {}
ConnectionEvent::RemoteProtocolsChange(_) => {}
_ => {}
}
}
}