From f325961505c36ef131a33b786a4296cbe2797909 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 14 Jul 2023 15:47:19 +0200 Subject: [PATCH 01/19] feat: migrate to iroh 0.5 --- Cargo.lock | 2013 +++++++++++++++++++++++++++--------------- Cargo.toml | 9 +- src/imex/transfer.rs | 266 ++++-- src/qr.rs | 5 +- 4 files changed, 1489 insertions(+), 804 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27ea5bd483..d8507318ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,19 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "abao" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2daa0989489b05a455a9707adbbbc17443edf7bbc902ce499cd3b84148d68a40" -dependencies = [ - "arrayref", - "arrayvec", - "blake3", - "futures", - "tokio", -] - [[package]] name = "addr2line" version = "0.20.0" @@ -30,6 +17,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + [[package]] name = "aes" version = "0.8.3" @@ -131,9 +128,9 @@ checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" dependencies = [ "backtrace", ] @@ -281,13 +278,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -304,6 +301,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "atomic-waker" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" + +[[package]] +name = "attohttpc" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb8867f378f33f78a811a8eb9bf108ad99430d7aad43315dd9319c827ef6247" +dependencies = [ + "http", + "log", + "url", + "wildmatch", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -312,9 +327,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.19" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" dependencies = [ "async-trait", "axum-core", @@ -336,7 +351,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sha1", + "sha1 0.10.5", "sync_wrapper", "tokio", "tokio-tungstenite", @@ -362,6 +377,17 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom 0.2.10", + "instant", + "rand 0.8.5", +] + [[package]] name = "backtrace" version = "0.3.68" @@ -378,10 +404,27 @@ dependencies = [ ] [[package]] -name = "base16ct" -version = "0.1.1" +name = "bao-tree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375f3ee1fb90dfabed4754a4ebb0137553162655757cd2a91cdca88d8f7c7672" +dependencies = [ + "blake3", + "bytes", + "futures", + "iroh-io", + "positioned-io", + "range-collections", + "self_cell", + "smallvec", + "tokio", +] + +[[package]] +name = "base-x" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" @@ -420,13 +463,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "bincode" -version = "1.3.3" +name = "binary-merge" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] +checksum = "597bb81c80a54b6a4381b23faba8d7774b144c94cbd1d6fe3f1329bd776554ab" [[package]] name = "bitfield" @@ -457,16 +497,7 @@ dependencies = [ "cc", "cfg-if", "constant_time_eq", - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", + "digest", ] [[package]] @@ -497,6 +528,12 @@ dependencies = [ "cipher", ] +[[package]] +name = "bounded-integer" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78a6932c88f1d2c29533a3b8a5f5a2f84cc19c3339b431677c3160c5c2e6ca85" + [[package]] name = "brotli" version = "3.3.4" @@ -571,6 +608,9 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] [[package]] name = "camellia" @@ -649,6 +689,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + [[package]] name = "charset" version = "0.1.3" @@ -669,6 +720,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "time 0.1.45", "wasm-bindgen", "winapi", @@ -709,22 +761,23 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] name = "clap" -version = "4.3.19" +version = "4.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" dependencies = [ "anstyle", "clap_lex", @@ -800,12 +853,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "convert_case" version = "0.5.0" @@ -837,6 +884,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" + [[package]] name = "crc24" version = "0.1.6" @@ -943,18 +1005,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.2" @@ -974,18 +1024,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core 0.6.4", "typenum", ] [[package]] -name = "curve25519-dalek" -version = "3.2.0" +name = "crypto_box" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "20e2e9da0705c71ce86168d6e906af19123543130e4bff7149b55c0d4a729086" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "aead", + "chacha20", + "crypto_secretbox", + "curve25519-dalek", + "salsa20", + "serdect", + "zeroize", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "chacha20", + "cipher", + "generic-array", + "poly1305", + "salsa20", "subtle", "zeroize", ] @@ -999,7 +1068,7 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "platforms", "rustc_version", @@ -1015,7 +1084,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -1088,17 +1157,50 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "dashmap" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +dependencies = [ + "cfg-if", + "hashbrown 0.14.0", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +[[package]] +name = "data-encoding-macro" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + [[package]] name = "default-net" -version = "0.14.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4898b43aed56499fad6b294d15b3e76a51df68079bf492e5daae38ca084e003" +checksum = "ae47401ee27418babbf80e20de5ff240a19c850ec6000326342cdb198b341687" dependencies = [ "dlopen2", "libc", @@ -1108,7 +1210,7 @@ dependencies = [ "netlink-sys", "once_cell", "system-configuration", - "windows 0.32.0", + "windows", ] [[package]] @@ -1125,6 +1227,7 @@ dependencies = [ "backtrace", "base64 0.21.2", "brotli", + "bytes", "chrono", "criterion", "deltachat_derive", @@ -1167,7 +1270,7 @@ dependencies = [ "serde", "serde_json", "sha-1", - "sha2 0.10.7", + "sha2", "smallvec", "strum", "strum_macros", @@ -1248,7 +1351,7 @@ name = "deltachat_derive" version = "2.0.0" dependencies = [ "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -1269,18 +1372,6 @@ dependencies = [ "yerpc", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "der_derive", - "pem-rfc7468 0.6.0", - "zeroize", -] - [[package]] name = "der" version = "0.7.7" @@ -1288,7 +1379,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" dependencies = [ "const-oid", - "pem-rfc7468 0.7.0", + "der_derive", + "pem-rfc7468", "zeroize", ] @@ -1308,14 +1400,14 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef71ddb5b3a1f53dee24817c8f70dfa1cb29e804c18d88c228d4bc9c86ee3b9" +checksum = "114792ba6b7545d3f3dd693794aed3a312a67795cd577fcc725c148d84fabe32" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.25", ] [[package]] @@ -1350,16 +1442,24 @@ dependencies = [ ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "derive_more_preview" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4267ec2c86f47cc7ba8b6fa68072bfa742fb5aab0b87429096c79172b9d6f364" +dependencies = [ + "derive_more_preview-impl", +] + +[[package]] +name = "derive_more_preview-impl" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "10c89e23c2ccd1af6fae76cbe614c135e5640837f5e868f0995549f1762db62d" dependencies = [ - "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version", - "syn 1.0.109", + "syn 2.0.25", + "unicode-xid", ] [[package]] @@ -1377,22 +1477,13 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -1407,16 +1498,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1426,18 +1507,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", + "windows-sys", ] [[package]] @@ -1448,72 +1518,56 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] name = "dlopen2" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b121caccfc363e4d9a4589528f3bef7c71b83c6ed01c8dc68cbeeb7fd29ec698" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" dependencies = [ - "dlopen2_derive", "libc", "once_cell", "winapi", ] [[package]] -name = "dlopen2_derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a09ac8bb8c16a282264c379dffba707b9c998afc7506009137f3c6136888078" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dyn-clone" -version = "1.0.12" +name = "dtoa" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "519b83cd10f5f6e969625a409f735182bea5558cd8b64c655806ceaae36f1999" [[package]] -name = "ecdsa" -version = "0.14.8" +name = "duct" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "37ae3fc31835f74c2a7ceda3aeede378b0ae2e74c8f1c36559fcc9ae2a4e7d3e" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", + "libc", + "once_cell", + "os_pipe", + "shared_child", ] [[package]] -name = "ecdsa" -version = "0.16.8" +name = "dyn-clone" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" -dependencies = [ - "der 0.7.7", - "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", -] +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] -name = "ed25519" -version = "1.5.3" +name = "ecdsa" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" dependencies = [ - "serde", - "signature 1.6.4", + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -1522,23 +1576,9 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", + "pkcs8", "serde", - "serde_bytes", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -1547,10 +1587,11 @@ version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faa8e9049d5d72bfc12acbc05914731b5322f79b5e2f195e9f2d705fca22ab4c" dependencies = [ - "curve25519-dalek 4.0.0-rc.3", - "ed25519 2.2.1", + "curve25519-dalek", + "ed25519", + "rand_core 0.6.4", "serde", - "sha2 0.10.7", + "sha2", "zeroize", ] @@ -1568,28 +1609,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array", - "group 0.12.1", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", - "zeroize", -] +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "elliptic-curve" @@ -1597,17 +1619,17 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", - "digest 0.10.7", - "ff 0.13.0", + "base16ct", + "crypto-bigint", + "digest", + "ff", "generic-array", - "group 0.13.0", + "group", "hkdf", - "pem-rfc7468 0.7.0", - "pkcs8 0.10.2", + "pem-rfc7468", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "subtle", "zeroize", ] @@ -1748,7 +1770,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -1770,6 +1792,21 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" +dependencies = [ + "serde", +] + +[[package]] +name = "erased_set" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5aa24577083f8190ad401e376b55887c7cd9083ae95d83ceec5d28ea78125" + [[package]] name = "errno" version = "0.3.1" @@ -1778,7 +1815,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1860,20 +1897,14 @@ dependencies = [ ] [[package]] -name = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - -[[package]] -name = "fd-lock" -version = "3.0.13" +name = "fd-lock" +version = "3.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if", - "rustix", - "windows-sys 0.48.0", + "rustix 0.38.4", + "windows-sys", ] [[package]] @@ -1885,16 +1916,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "ff" version = "0.13.0" @@ -1920,7 +1941,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2034,7 +2055,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand 1.9.0", + "fastrand", "futures-core", "futures-io", "memchr", @@ -2051,7 +2072,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -2066,6 +2087,12 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + [[package]] name = "futures-util" version = "0.3.28" @@ -2136,14 +2163,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] -name = "group" -version = "0.12.1" +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "governor" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "c390a940a5d157878dd057c78680a33ce3415bcd05b4799509ea44210914b4d5" dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", + "cfg-if", + "dashmap", + "futures", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "quanta", + "rand 0.8.5", + "smallvec", ] [[package]] @@ -2152,7 +2192,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", "subtle", ] @@ -2243,16 +2283,31 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] +[[package]] +name = "hmac-sha1" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1333fad8d94b82cab989da428b0b36a3435db3870d85e971a1d6dc0a8576722" +dependencies = [ + "sha1 0.2.0", +] + +[[package]] +name = "hmac-sha256" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3688e69b38018fec1557254f64c8dc2cc8ec502890182f395dbb0aa997aa5735" + [[package]] name = "home" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2266,6 +2321,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "hostname-validator" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" + [[package]] name = "http" version = "0.2.9" @@ -2353,6 +2414,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -2377,7 +2452,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows", ] [[package]] @@ -2425,6 +2500,24 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "igd" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556b5a75cd4adb7c4ea21c64af1c48cefb2ce7d43dc4352c720a1fe47c21f355" +dependencies = [ + "attohttpc", + "bytes", + "futures", + "http", + "hyper", + "log", + "rand 0.8.5", + "tokio", + "url", + "xmltree", +] + [[package]] name = "image" version = "0.24.6" @@ -2479,6 +2572,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "inplace-vec-builder" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf64c2edc8226891a71f127587a2861b132d2b942310843814d5001d99a1d307" +dependencies = [ + "smallvec", +] + [[package]] name = "instant" version = "0.1.12" @@ -2488,6 +2590,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + [[package]] name = "ipconfig" version = "0.3.2" @@ -2496,7 +2609,7 @@ checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ "socket2 0.5.3", "widestring", - "windows-sys 0.48.0", + "windows-sys", "winreg 0.50.0", ] @@ -2509,43 +2622,152 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "iroh" version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4fb9858c8cd3dd924a5da5bc511363845a9bcfdfac066bb2ef8454eb6111546" dependencies = [ - "abao", "anyhow", - "base64 0.21.2", + "bao-tree", "blake3", "bytes", - "default-net", - "der 0.6.1", - "derive_more", - "dirs-next", - "ed25519-dalek 1.0.1", + "data-encoding", + "derive_more_preview", + "flume", "futures", "hex", + "iroh-bytes", + "iroh-io", + "iroh-net", "num_cpus", "portable-atomic", "postcard", "quic-rpc", "quinn", - "rand 0.7.3", + "range-collections", + "serde", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "walkdir", +] + +[[package]] +name = "iroh-bytes" +version = "0.4.1" +dependencies = [ + "anyhow", + "bao-tree", + "blake3", + "bytes", + "data-encoding", + "derive_more_preview", + "flume", + "futures", + "hex", + "iroh-io", + "multibase", + "num_cpus", + "once_cell", + "postcard", + "quinn", + "rand 0.8.5", + "range-collections", + "self_cell", + "serde", + "serde-error", + "smallvec", + "subtle", + "thiserror", + "tokio", + "tokio-util", + "tracing", + "tracing-futures", + "tracing-subscriber", +] + +[[package]] +name = "iroh-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d7af75c35274d15ec2347363e268fcebc2a5d1a975bc9d87384c5232b5cace" +dependencies = [ + "bytes", + "futures", + "pin-project", + "smallvec", + "tokio", +] + +[[package]] +name = "iroh-metrics" +version = "0.4.1" +dependencies = [ + "erased_set", + "hyper", + "once_cell", + "paste", + "prometheus-client", + "struct_iterable", + "tracing", +] + +[[package]] +name = "iroh-net" +version = "0.4.1" +dependencies = [ + "anyhow", + "backoff", + "bytes", + "crypto_box", + "curve25519-dalek", + "data-encoding", + "default-net", + "der", + "derive_more_preview", + "duct", + "ed25519-dalek", + "flume", + "futures", + "governor", + "hex", + "hostname", + "http", + "hyper", + "igd", + "iroh-metrics", + "libc", + "netlink-packet-route", + "once_cell", + "os_info", + "postcard", + "quinn", + "quinn-proto", + "quinn-udp", + "rand 0.8.5", "rcgen", + "reqwest", "ring", + "rtnetlink", "rustls", "serde", - "serde-error", + "serdect", + "socket2 0.5.3", "ssh-key", - "tempfile", + "stun-rs", + "surge-ping", "thiserror", + "time 0.3.23", "tokio", + "tokio-rustls", + "tokio-rustls-acme", "tokio-stream", "tokio-util", "tracing", - "tracing-futures", - "tracing-subscriber", - "walkdir", + "trust-dns-resolver", + "url", "webpki", + "webpki-roots 0.23.1", + "wg", + "wmi", "x509-parser", "zeroize", ] @@ -2557,8 +2779,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys 0.48.0", + "rustix 0.38.4", + "windows-sys", ] [[package]] @@ -2572,9 +2794,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jpeg-decoder" @@ -2672,6 +2894,12 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "linux-raw-sys" version = "0.4.3" @@ -2703,6 +2931,15 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + [[package]] name = "mailparse" version = "0.14.0" @@ -2726,7 +2963,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -2747,9 +2984,15 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.7", + "digest", ] +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + [[package]] name = "memalloc" version = "0.1.0" @@ -2801,7 +3044,18 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", ] [[package]] @@ -2839,21 +3093,20 @@ dependencies = [ [[package]] name = "netlink-packet-core" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5cf0b54effda4b91615c40ff0fd12d0d4c9a6e0f5116874f03941792ff535a" +checksum = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" dependencies = [ "anyhow", "byteorder", - "libc", "netlink-packet-utils", ] [[package]] name = "netlink-packet-route" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea993e32c77d87f01236c38f572ecb6c311d592e56a06262a007fd2a6e31253c" +checksum = "f6de2fe935f44cbdfcab77dce2150d68eda75be715cd42d4d6f52b0bd4dcc5b1" dependencies = [ "anyhow", "bitflags 1.3.2", @@ -2875,6 +3128,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "netlink-proto" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "842c6770fc4bb33dd902f41829c61ef872b8e38de1405aa0b938b27b8fba12c3" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", +] + [[package]] name = "netlink-sys" version = "0.8.5" @@ -2882,8 +3150,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", + "futures", "libc", "log", + "tokio", ] [[package]] @@ -2907,6 +3177,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + [[package]] name = "nom" version = "7.1.3" @@ -2917,6 +3199,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + [[package]] name = "ntapi" version = "0.4.1" @@ -2973,7 +3261,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -3010,9 +3298,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", "libm", @@ -3087,7 +3375,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -3136,21 +3424,20 @@ dependencies = [ ] [[package]] -name = "overload" -version = "0.1.1" +name = "os_pipe" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" +dependencies = [ + "libc", + "windows-sys", +] [[package]] -name = "p256" -version = "0.11.1" +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "p256" @@ -3158,21 +3445,10 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "primeorder", - "sha2 0.10.7", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", + "sha2", ] [[package]] @@ -3181,10 +3457,10 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" dependencies = [ - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "primeorder", - "sha2 0.10.7", + "sha2", ] [[package]] @@ -3213,31 +3489,23 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "pem" -version = "1.1.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", + "base64 0.21.2", + "serde", ] [[package]] @@ -3256,10 +3524,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] -name = "pgp" -version = "0.10.2" +name = "pest" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e1f8e085bfa9b85763fe3ddaacbe90a09cd847b3833129153a6cb063bbe132" +checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.25", +] + +[[package]] +name = "pest_meta" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pgp" +version = "0.10.1" +source = "git+https://github.com/rpgp/rpgp?branch=new-dalek#e84a95df572a2f789f047d6df7b9803321b7b52f" dependencies = [ "aes", "base64 0.21.2", @@ -3275,12 +3586,11 @@ dependencies = [ "chrono", "cipher", "crc24", - "curve25519-dalek 4.0.0-rc.3", "derive_builder", "des", - "digest 0.10.7", - "ed25519-dalek 2.0.0-rc.3", - "elliptic-curve 0.13.5", + "digest", + "ed25519-dalek", + "elliptic-curve", "flate2", "generic-array", "hex", @@ -3291,15 +3601,15 @@ dependencies = [ "num-bigint-dig", "num-derive", "num-traits", - "p256 0.13.2", - "p384 0.13.0", + "p256", + "p384", "rand 0.8.5", "ripemd", - "rsa 0.9.2", - "sha1", - "sha2 0.10.7", + "rsa", + "sha1 0.10.5", + "sha2", "sha3", - "signature 2.1.0", + "signature", "smallvec", "thiserror", "twofish", @@ -3324,7 +3634,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -3339,37 +3649,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff33bdbdfc54cc98a2eca766ebdec3e1b8fb7387523d5c9c9a2891da856f719" -dependencies = [ - "der 0.6.1", - "pkcs8 0.9.0", - "spki 0.6.0", - "zeroize", -] - [[package]] name = "pkcs1" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der 0.7.7", - "pkcs8 0.10.2", - "spki 0.7.2", -] - -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", + "der", + "pkcs8", + "spki", ] [[package]] @@ -3378,8 +3666,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -3422,6 +3710,48 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "pnet_base" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872e46346144ebf35219ccaa64b1dffacd9c6f188cd7d012bd6977a2a838f42e" +dependencies = [ + "no-std-net", +] + +[[package]] +name = "pnet_macros" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a780e80005c2e463ec25a6e9f928630049a10b43945fea83207207d4a7606f4" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", +] + +[[package]] +name = "pnet_macros_support" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d932134f32efd7834eb8b16d42418dac87086347d1bc7d142370ef078582bc" +dependencies = [ + "pnet_base", +] + +[[package]] +name = "pnet_packet" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bde678bbd85cb1c2d99dc9fc596e57f03aa725f84f3168b0eaf33eeccb41706" +dependencies = [ + "glob", + "pnet_base", + "pnet_macros", + "pnet_macros_support", +] + [[package]] name = "png" version = "0.17.9" @@ -3435,17 +3765,38 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + [[package]] name = "portable-atomic" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" +checksum = "d220334a184db82b31b83f5ff093e3315280fb2b6bbc032022b2304a509aab7a" + +[[package]] +name = "positioned-io" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b9485cf7f528baf34edd811ec8283a168864912e11d0b7d3e0510738761114" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "postcard" -version = "1.0.6" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ee729232311d3cd113749948b689627618133b1c5012b77342c1950b25eaeb" +checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00" dependencies = [ "cobs", "const_format", @@ -3470,6 +3821,40 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "precis-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65ec1da47f90d677a62a9cc338a71be0fa7af7a15dd0914879acd59d0b2e172c" +dependencies = [ + "precis-tools", + "ucd-parse", + "unicode-normalization", +] + +[[package]] +name = "precis-profiles" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053f4c98a1da64c07d41082f3c304e8958598a9562ba99f63065004f3307d49f" +dependencies = [ + "lazy_static", + "precis-core", + "precis-tools", + "unicode-normalization", +] + +[[package]] +name = "precis-tools" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317d05520f469febc928408153e5a65f3ffac1499674b0b65be15306bd322704" +dependencies = [ + "lazy_static", + "regex", + "ucd-parse", +] + [[package]] name = "pretty_assertions" version = "1.4.0" @@ -3496,7 +3881,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c2fcef82c0ec6eefcc179b978446c399b3cdf73c392c35604e399eee6df1ee3" dependencies = [ - "elliptic-curve 0.13.5", + "elliptic-curve", ] [[package]] @@ -3525,13 +3910,36 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus-client" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c99afa9a01501019ac3a14d71d9f94050346f55ca471ce90c799a15c58f61e2" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "proptest" version = "1.2.0" @@ -3555,21 +3963,34 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" +[[package]] +name = "quanta" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20afe714292d5e879d8b12740aa223c6a88f118af41870e8b6196e39a02238a8" +dependencies = [ + "crossbeam-utils", + "libc", + "mach", + "once_cell", + "raw-cpuid", + "wasi 0.10.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + [[package]] name = "quic-rpc" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d453504fc3e456160ae3b9ebe4d83c1f6477af167aa9b67e2d7bf11a096f179d" +checksum = "6d60c2fc2390baad4b9d41ae9957ae88c3095496f88e252ef50722df8b5b78d7" dependencies = [ - "bincode", + "educe", "flume", "futures", "pin-project", - "quinn", "serde", "tokio", - "tokio-serde", - "tokio-util", "tracing", ] @@ -3590,9 +4011,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445cbfe2382fa023c4f2f3c7e1c95c03dcc1df2bf23cebcb2b13e1402c4394d1" +checksum = "21252f1c0fc131f1b69182db8f34837e8a69737b8251dff75636a9be0518c324" dependencies = [ "bytes", "pin-project-lite", @@ -3603,13 +4024,13 @@ dependencies = [ "thiserror", "tokio", "tracing", - "webpki", ] [[package]] name = "quinn-proto" -version = "0.9.2" -source = "git+https://github.com/quinn-rs/quinn?branch=main#11b34a7b2652010cdbbd08b5dfa407832baff927" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85af4ed6ee5a89f26a26086e9089a6643650544c025158449a3626ebf72884b3" dependencies = [ "bytes", "rand 0.8.5", @@ -3621,30 +4042,40 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki", ] [[package]] name = "quinn-udp" -version = "0.3.2" -source = "git+https://github.com/quinn-rs/quinn?branch=main#11b34a7b2652010cdbbd08b5dfa407832baff927" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6df19e284d93757a9fb91d63672f7741b129246a669db09d1c0063071debc0c0" dependencies = [ + "bytes", "libc", - "quinn-proto", - "socket2 0.4.9", + "socket2 0.5.3", "tracing", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "quote" -version = "1.0.32" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] +[[package]] +name = "quoted-string-parser" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc75379cdb451d001f1cb667a9f74e8b355e9df84cc5193513cbe62b96fc5e9" +dependencies = [ + "pest", + "pest_derive", +] + [[package]] name = "quoted_printable" version = "0.4.8" @@ -3741,10 +4172,31 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "range-collections" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2151d0cda6f7cee2de547749cccca65dffbe1a292a1176fd914083acd21190ff" +dependencies = [ + "binary-merge", + "inplace-vec-builder", + "ref-cast", + "smallvec", +] + [[package]] name = "ratelimit" version = "1.0.0" +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "rayon" version = "1.7.0" @@ -3769,9 +4221,9 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +checksum = "4954fbc00dcd4d8282c987710e50ba513d351400dbdd00e803a05172a90d8976" dependencies = [ "pem", "ring", @@ -3808,14 +4260,35 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ref-cast" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1641819477c319ef452a075ac34a4be92eb9ba09f6841f62d594d50fdcf0bf6b" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + [[package]] name = "regex" -version = "1.8.4" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", + "regex-automata 0.3.3", "regex-syntax 0.7.4", ] @@ -3828,6 +4301,23 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f96ede7f386ba6e910092e7ccdc04176cface62abebea07ed6b46d870ed95ca2" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -3855,6 +4345,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -3864,16 +4355,20 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 0.22.6", "winreg 0.10.1", ] @@ -3887,17 +4382,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -3929,50 +4413,48 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] name = "rsa" -version = "0.7.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "094052d5470cbcef561cb848a7209968c9f12dfa6d668f4bca048ac5de51099c" +checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" dependencies = [ "byteorder", - "digest 0.10.7", + "const-oid", + "digest", "num-bigint-dig", "num-integer", "num-iter", "num-traits", - "pkcs1 0.4.1", - "pkcs8 0.9.0", + "pkcs1", + "pkcs8", "rand_core 0.6.4", - "signature 1.6.4", - "smallvec", + "sha2", + "signature", + "spki", "subtle", "zeroize", ] [[package]] -name = "rsa" -version = "0.9.2" +name = "rtnetlink" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab43bb47d23c1a631b4b680199a45255dce26fa9ab2fa902581f624ff13e6a8" +checksum = "6333af2adba73478936174a0ef3edf05fbfa058539c21d567344a53bb6d75cfd" dependencies = [ - "byteorder", - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-iter", - "num-traits", - "pkcs1 0.7.5", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "signature 2.1.0", - "spki 0.7.2", - "subtle", - "zeroize", + "futures", + "log", + "netlink-packet-core", + "netlink-packet-route", + "netlink-packet-utils", + "netlink-proto", + "netlink-sys", + "nix", + "thiserror", + "tokio", ] [[package]] @@ -4025,6 +4507,20 @@ dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "0.37.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +dependencies = [ + "bitflags 1.3.2", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys", +] + [[package]] name = "rustix" version = "0.38.4" @@ -4034,19 +4530,20 @@ dependencies = [ "bitflags 2.3.3", "errno", "libc", - "linux-raw-sys", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.3", + "windows-sys", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ + "log", "ring", + "rustls-webpki 0.101.1", "sct", - "webpki", ] [[package]] @@ -4070,11 +4567,31 @@ dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "rustyline" @@ -4101,9 +4618,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "safemem" @@ -4111,6 +4628,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + [[package]] name = "same-file" version = "1.0.6" @@ -4136,7 +4662,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -4165,9 +4691,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.2.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" @@ -4181,37 +4707,23 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - -[[package]] -name = "sec1" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" dependencies = [ - "base16ct 0.2.0", - "der 0.7.7", + "base16ct", + "der", "generic-array", - "pkcs8 0.10.2", + "pkcs8", "subtle", "zeroize", ] [[package]] name = "security-framework" -version = "2.9.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -4222,9 +4734,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -4238,18 +4750,18 @@ checksum = "4c309e515543e67811222dbc9e3dd7e1056279b782e1dacffe4242b718734fb6" [[package]] name = "semver" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.175" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] @@ -4263,24 +4775,15 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - [[package]] name = "serde_derive" -version = "1.0.175" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -4296,9 +4799,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" dependencies = [ "itoa", "ryu", @@ -4307,9 +4810,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "8acc4422959dd87a76cb117c191dcbffc20467f06c9100b76721dab370f24d3a" dependencies = [ "itoa", "serde", @@ -4336,6 +4839,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha-1" version = "0.10.1" @@ -4344,31 +4857,24 @@ checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" [[package]] -name = "sha2" -version = "0.9.9" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -4379,7 +4885,7 @@ checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4388,7 +4894,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] @@ -4402,22 +4908,22 @@ dependencies = [ ] [[package]] -name = "signal-hook-registry" -version = "1.4.1" +name = "shared_child" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" dependencies = [ "libc", + "winapi", ] [[package]] -name = "signature" -version = "1.6.4" +name = "signal-hook-registry" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "libc", ] [[package]] @@ -4426,7 +4932,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ - "digest 0.10.7", + "digest", "rand_core 0.6.4", ] @@ -4450,6 +4956,9 @@ name = "smallvec" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +dependencies = [ + "serde", +] [[package]] name = "smawk" @@ -4474,7 +4983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -4494,50 +5003,52 @@ dependencies = [ [[package]] name = "spki" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.6.1", + "der", ] [[package]] -name = "spki" -version = "0.7.2" +name = "ssh-cipher" +version = "0.1.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "c654ae3f0ee989c7ff306b33f644c776af891d30a082ba3e22f47c23a40b5d1a" dependencies = [ - "base64ct", - "der 0.7.7", + "cipher", + "ssh-encoding", ] [[package]] name = "ssh-encoding" -version = "0.1.0" +version = "0.2.0-pre.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19cfdc32e0199062113edf41f344fbf784b8205a94600233c84eb838f45191e1" +checksum = "fde709d55a07116c56152154338b23501571f14c5ab58f9d3d6acfe38ab6c4df" dependencies = [ "base64ct", - "pem-rfc7468 0.6.0", - "sha2 0.10.7", + "pem-rfc7468", + "sha2", ] [[package]] name = "ssh-key" -version = "0.5.1" +version = "0.6.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "288d8f5562af5a3be4bda308dd374b2c807b940ac370b5efa1c99311da91d9a1" +checksum = "110fff26e39d649d1764dbaf7dd7c38da89752219c6c53ed09809dc42fd431a2" dependencies = [ - "ed25519-dalek 1.0.1", - "p256 0.11.1", - "p384 0.11.2", + "ed25519-dalek", + "p256", + "p384", "rand_core 0.6.4", - "rsa 0.7.2", - "sec1 0.3.0", - "sha2 0.10.7", - "signature 1.6.4", + "rsa", + "sec1", + "sha2", + "signature", + "ssh-cipher", "ssh-encoding", + "subtle", "zeroize", ] @@ -4577,6 +5088,35 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "struct_iterable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "849a064c6470a650b72e41fa6c057879b68f804d113af92900f27574828e7712" +dependencies = [ + "struct_iterable_derive", + "struct_iterable_internal", +] + +[[package]] +name = "struct_iterable_derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb939ce88a43ea4e9d012f2f6b4cc789deb2db9d47bad697952a85d6978662c" +dependencies = [ + "erased-serde", + "proc-macro2", + "quote", + "struct_iterable_internal", + "syn 2.0.25", +] + +[[package]] +name = "struct_iterable_internal" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9426b2a0c03e6cc2ea8dbc0168dbbf943f88755e409fb91bcb8f6a268305f4a" + [[package]] name = "strum" version = "0.25.0" @@ -4593,7 +5133,29 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.27", + "syn 2.0.25", +] + +[[package]] +name = "stun-rs" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4e54b2dabc0934dd9c6916bc60c6b412082a5509b9fdffe361137c5d08667b0" +dependencies = [ + "bounded-integer", + "byteorder", + "crc", + "fallible-iterator", + "hmac-sha1", + "hmac-sha256", + "hostname-validator", + "lazy_static", + "md5", + "paste", + "precis-core", + "precis-profiles", + "quoted-string-parser", + "rand 0.8.5", ] [[package]] @@ -4602,6 +5164,22 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "surge-ping" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af341b2be485d647b5dc4cfb2da99efac35b5c95748a08fb7233480fedc5ead3" +dependencies = [ + "hex", + "parking_lot", + "pnet_packet", + "rand 0.8.5", + "socket2 0.5.3", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "syn" version = "1.0.109" @@ -4615,9 +5193,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -4685,15 +5263,16 @@ checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5" [[package]] name = "tempfile" -version = "3.7.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", - "fastrand 2.0.0", + "fastrand", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.48.0", + "rustix 0.37.23", + "windows-sys", ] [[package]] @@ -4732,22 +5311,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -4840,7 +5419,7 @@ dependencies = [ "signal-hook-registry", "socket2 0.4.9", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -4861,7 +5440,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -4875,18 +5454,39 @@ dependencies = [ ] [[package]] -name = "tokio-serde" -version = "0.8.0" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "bincode", - "bytes", - "educe", - "futures-core", - "futures-sink", - "pin-project", + "rustls", + "tokio", +] + +[[package]] +name = "tokio-rustls-acme" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550afe930502a9d56f2a753d5958a1fe98e6c698a617d5de8497616286323ea4" +dependencies = [ + "async-trait", + "base64 0.21.2", + "chrono", + "futures", + "log", + "pem", + "rcgen", + "reqwest", + "ring", + "rustls", "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-rustls", + "url", + "webpki-roots 0.23.1", + "x509-parser", ] [[package]] @@ -4898,18 +5498,19 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] name = "tokio-tar" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" +checksum = "a50188549787c32c1c3d9c8c71ad7e003ccf2f102489c5a96e385c84760477f4" dependencies = [ "filetime", "futures-core", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.2.16", "tokio", "tokio-stream", "xattr", @@ -4917,9 +5518,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.19.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" +checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", @@ -4936,6 +5537,8 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "futures-util", + "hashbrown 0.12.3", "pin-project-lite", "tokio", "tracing", @@ -4964,9 +5567,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" dependencies = [ "indexmap 2.0.0", "serde", @@ -5024,7 +5627,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] [[package]] @@ -5076,6 +5679,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "trust-dns-proto" version = "0.22.0" @@ -5129,18 +5742,18 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.19.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" +checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" dependencies = [ + "base64 0.13.1", "byteorder", "bytes", - "data-encoding", "http", "httparse", "log", "rand 0.8.5", - "sha1", + "sha1 0.10.5", "thiserror", "url", "utf-8", @@ -5185,6 +5798,21 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ucd-parse" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212c59636157b18c2f57eed2799e6606c52fc49c6a11685ffb0d08f06e55f428" +dependencies = [ + "regex-lite", +] + +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "unarray" version = "0.1.4" @@ -5199,9 +5827,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-linebreak" @@ -5240,6 +5868,16 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + [[package]] name = "untrusted" version = "0.7.1" @@ -5255,6 +5893,7 @@ dependencies = [ "form_urlencoded", "idna 0.4.0", "percent-encoding", + "serde", ] [[package]] @@ -5271,9 +5910,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ "getrandom 0.2.10", "serde", @@ -5361,7 +6000,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", "wasm-bindgen-shared", ] @@ -5395,7 +6034,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5426,12 +6065,41 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki", +] + +[[package]] +name = "webpki-roots" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki 0.100.1", +] + [[package]] name = "weezl" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +[[package]] +name = "wg" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f390449c16e0679435fc97a6b49d24e67f09dd05fea1de54db1b60902896d273" +dependencies = [ + "atomic-waker", + "parking_lot", + "triomphe", +] + [[package]] name = "whoami" version = "1.4.1" @@ -5448,6 +6116,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +[[package]] +name = "wildmatch" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f44b95f62d34113cf558c93511ac93027e03e9c29a60dd0fd70e6e025c7270a" + [[package]] name = "winapi" version = "0.3.9" @@ -5481,33 +6155,35 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.32.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbedf6db9096bc2364adce0ae0aa636dcd89f3c3f2cd67947062aaf0ca2a10ec" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_msvc 0.32.0", - "windows_i686_gnu 0.32.0", - "windows_i686_msvc 0.32.0", - "windows_x86_64_gnu 0.32.0", - "windows_x86_64_msvc 0.32.0", + "windows-implement", + "windows-interface", + "windows-targets", ] [[package]] -name = "windows" +name = "windows-implement" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" dependencies = [ - "windows-targets 0.48.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "windows-sys" -version = "0.45.0" +name = "windows-interface" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" dependencies = [ - "windows-targets 0.42.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -5516,22 +6192,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] @@ -5540,123 +6201,51 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -5688,7 +6277,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-sys", +] + +[[package]] +name = "wmi" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced703d10188571ce53582c2932ce640ed3c413cff7ee6e2d961f9abdb6a63d1" +dependencies = [ + "chrono", + "futures", + "log", + "serde", + "thiserror", + "windows", ] [[package]] @@ -5697,7 +6300,7 @@ version = "2.0.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7fae07da688e17059d5886712c933bb0520f15eff2e09cfa18e30968f4e63a" dependencies = [ - "curve25519-dalek 4.0.0-rc.3", + "curve25519-dalek", "rand_core 0.6.4", "serde", "zeroize", @@ -5705,12 +6308,11 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +checksum = "bab0c2f54ae1d92f4fcb99c0b7ccf0b1e3451cbd395e5f115ccbdbcb18d4f634" dependencies = [ "asn1-rs", - "base64 0.13.1", "data-encoding", "der-parser", "lazy_static", @@ -5723,13 +6325,28 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea263437ca03c1522846a4ddafbca2542d0ad5ed9b784909d4b27b76f62bc34a" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] +[[package]] +name = "xml-rs" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a56c84a8ccd4258aed21c92f70c0f6dea75356b6892ae27c24139da456f9336" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + [[package]] name = "yansi" version = "0.5.1" @@ -5774,7 +6391,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d6b8ce490e8719fe84d7d80ad4d58572b2ea9d7a83d156f6afd6ab3ad5cfb94" dependencies = [ - "convert_case 0.5.0", + "convert_case", "darling 0.14.4", "proc-macro2", "quote", @@ -5798,5 +6415,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.25", ] diff --git a/Cargo.toml b/Cargo.toml index 57efe378f3..596537b22d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,10 +25,6 @@ panic = 'abort' opt-level = "z" codegen-units = 1 -[patch.crates-io] -quinn-udp = { git = "https://github.com/quinn-rs/quinn", branch="main" } -quinn-proto = { git = "https://github.com/quinn-rs/quinn", branch="main" } - [dependencies] deltachat_derive = { path = "./deltachat_derive" } format-flowed = { path = "./format-flowed" } @@ -43,6 +39,7 @@ async_zip = { version = "0.0.12", default-features = false, features = ["deflate backtrace = "0.3" base64 = "0.21" brotli = { version = "3.3", default-features=false, features = ["std"] } +bytes = "1" chrono = { version = "0.4", default-features=false, features = ["clock", "std"] } email = { git = "https://github.com/deltachat/rust-email", branch = "master" } encoded-words = { git = "https://github.com/async-email/encoded-words", branch = "master" } @@ -53,7 +50,7 @@ futures-lite = "1.13.0" hex = "0.4.0" humansize = "2" image = { version = "0.24.6", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } -iroh = { version = "0.4.1", default-features = false } +iroh = { version = "0.4.1", default-features = false, path = "../../iroh/iroh", features = ["iroh-collection", "flat-db"] } kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } libc = "0.2" @@ -65,7 +62,7 @@ num-traits = "0.2" once_cell = "1.18.0" percent-encoding = "2.3" parking_lot = "0.12" -pgp = { version = "0.10", default-features = false } +pgp = { git = "https://github.com/rpgp/rpgp", branch = "new-dalek", version = "0.10", default-features = false } pretty_env_logger = { version = "0.5", optional = true } qrcodegen = "1.7.0" quick-xml = "0.29" diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index d9a7e8b91e..3068cbc904 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -27,19 +27,27 @@ use std::net::Ipv4Addr; use std::ops::Deref; use std::path::{Path, PathBuf}; use std::pin::Pin; +use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::Arc; use std::task::Poll; use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result}; use async_channel::Receiver; +use bytes::Bytes; +use futures::FutureExt; use futures_lite::StreamExt; -use iroh::blobs::Collection; -use iroh::get::DataStream; -use iroh::progress::ProgressEmitter; -use iroh::protocol::AuthToken; -use iroh::provider::{DataSource, Event, Provider, Ticket}; -use iroh::Hash; +use iroh::bytes::get::{fsm, Stats}; +use iroh::bytes::protocol::{AnyGetRequest, GetRequest, RequestToken}; +use iroh::bytes::provider::Event as ProviderEvent; +use iroh::collection::Collection; +use iroh::database::flat::DataSource; +use iroh::dial::Ticket; +use iroh::net::defaults::default_derp_map; +use iroh::net::tls::Keypair; +use iroh::node::{Event, Node as IrohNode, StaticTokenAuthHandler}; +use iroh::util::progress::ProgressEmitter; use tokio::fs::{self, File}; -use tokio::io::{self, AsyncWriteExt, BufWriter}; +use tokio::io::AsyncWriteExt; use tokio::sync::broadcast::error::RecvError; use tokio::sync::{broadcast, Mutex}; use tokio::task::{JoinHandle, JoinSet}; @@ -58,6 +66,8 @@ use super::{export_database, DBFILE_BACKUP_NAME}; const MAX_CONCURRENT_DIALS: u8 = 16; +type Node = IrohNode; + /// Provide or send a backup of this device. /// /// This creates a backup of the current device and starts a service which offers another @@ -154,9 +164,9 @@ impl BackupProvider { /// Creates the provider task. /// /// Having this as a function makes it easier to cancel it when needed. - async fn prepare_inner(context: &Context, dbfile: &Path) -> Result<(Provider, Ticket)> { + async fn prepare_inner(context: &Context, dbfile: &Path) -> Result<(Node, Ticket)> { // Generate the token up front: we also use it to encrypt the database. - let token = AuthToken::generate(); + let token = RequestToken::generate(); context.emit_event(SendProgress::Started.into()); export_database(context, dbfile, token.to_string()) .await @@ -176,19 +186,21 @@ impl BackupProvider { } // Start listening. - let (db, hash) = iroh::provider::create_collection(files).await?; + let (db, hash) = iroh::database::flat::create_collection(files).await?; context.emit_event(SendProgress::CollectionCreated.into()); - let provider = Provider::builder(db) + let auth_token_handler = StaticTokenAuthHandler::new(Some(token.clone())); + let provider = Node::builder(db) .bind_addr((Ipv4Addr::UNSPECIFIED, 0).into()) - .auth_token(token) - .spawn()?; + .custom_auth_handler(Arc::new(auth_token_handler)) + .spawn() + .await?; context.emit_event(SendProgress::ProviderListening.into()); info!(context, "Waiting for remote to connect"); - let ticket = provider.ticket(hash)?; + let ticket = provider.ticket(hash, Some(token)).await?; Ok((provider, ticket)) } - /// Supervises the iroh [`Provider`], terminating it when needed. + /// Supervises the iroh [`Node`], terminating it when needed. /// /// This will watch the provider and terminate it when: /// @@ -200,67 +212,80 @@ impl BackupProvider { /// we must cancel this operation. async fn watch_provider( context: &Context, - mut provider: Provider, + mut provider: Node, cancel_token: Receiver<()>, drop_token: CancellationToken, ) -> Result<()> { - let mut events = provider.subscribe(); - let mut total_size = 0; - let mut current_size = 0; + let total_size = Arc::new(AtomicU64::new(0)); + let current_size = Arc::new(AtomicU64::new(0)); + let (transfer_done, mut transfer_done_r) = tokio::sync::mpsc::channel(1); + + let ctx = context.clone(); + provider + .subscribe(move |event| { + let total_size = total_size.clone(); + let current_size = current_size.clone(); + let transfer_done = transfer_done.clone(); + let context = ctx.clone(); + async move { + match event { + Event::ByteProvide(event) => match event { + ProviderEvent::ClientConnected { .. } => { + context.emit_event(SendProgress::ClientConnected.into()); + } + ProviderEvent::GetRequestReceived { .. } => {} + ProviderEvent::TransferCollectionStarted { + total_blobs_size, .. + } => { + total_size + .store(total_blobs_size.unwrap_or_default(), Ordering::Relaxed); + context.emit_event( + SendProgress::TransferInProgress { + current_size: current_size.load(Ordering::Relaxed), + total_size: total_size.load(Ordering::Relaxed), + } + .into(), + ); + } + ProviderEvent::TransferBlobCompleted { size, .. } => { + current_size.fetch_add(size, Ordering::Relaxed); + context.emit_event( + SendProgress::TransferInProgress { + current_size: current_size.load(Ordering::Relaxed), + total_size: total_size.load(Ordering::Relaxed), + } + .into(), + ); + } + ProviderEvent::TransferCollectionCompleted { .. } => { + let total_size = total_size.load(Ordering::Relaxed); + context.emit_event( + SendProgress::TransferInProgress { + current_size: total_size, + total_size, + } + .into(), + ); + transfer_done.send(()).await.ok(); + } + ProviderEvent::TransferAborted { .. } => { + transfer_done.send(()).await.ok(); + } + ProviderEvent::CollectionAdded { .. } => {} + ProviderEvent::CustomGetRequestReceived { .. } => {} + }, + } + } + .boxed() + }) + .await?; + let res = loop { tokio::select! { biased; res = &mut provider => { break res.context("BackupProvider failed"); - }, - maybe_event = events.recv() => { - match maybe_event { - Ok(event) => { - match event { - Event::ClientConnected { ..} => { - context.emit_event(SendProgress::ClientConnected.into()); - } - Event::RequestReceived { .. } => { - } - Event::TransferCollectionStarted { total_blobs_size, .. } => { - total_size = total_blobs_size; - context.emit_event(SendProgress::TransferInProgress { - current_size, - total_size, - }.into()); - } - Event::TransferBlobCompleted { size, .. } => { - current_size += size; - context.emit_event(SendProgress::TransferInProgress { - current_size, - total_size, - }.into()); - } - Event::TransferCollectionCompleted { .. } => { - context.emit_event(SendProgress::TransferInProgress { - current_size: total_size, - total_size - }.into()); - provider.shutdown(); - } - Event::TransferAborted { .. } => { - provider.shutdown(); - break Err(anyhow!("BackupProvider transfer aborted")); - } - } - } - Err(broadcast::error::RecvError::Closed) => { - // We should never see this, provider.join() should complete - // first. - } - Err(broadcast::error::RecvError::Lagged(_)) => { - // We really shouldn't be lagging, if we did we may have missed - // a completion event. - provider.shutdown(); - break Err(anyhow!("Missed events from BackupProvider")); - } - } - }, + } _ = cancel_token.recv() => { provider.shutdown(); break Err(anyhow!("BackupProvider cancelled")); @@ -269,6 +294,10 @@ impl BackupProvider { provider.shutdown(); break Err(anyhow!("BackupProvider dropped")); } + _ = transfer_done_r.recv() => { + provider.shutdown(); + break Ok(()); + } } }; match &res { @@ -441,30 +470,11 @@ async fn get_backup_inner(context: &Context, qr: Qr) -> Result<()> { async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<()> { let progress = ProgressEmitter::new(0, ReceiveProgress::max_blob_progress()); spawn_progress_proxy(context.clone(), progress.subscribe()); - let on_connected = || { - context.emit_event(ReceiveProgress::Connected.into()); - async { Ok(()) } - }; - let on_collection = |collection: &Collection| { - context.emit_event(ReceiveProgress::CollectionReceived.into()); - progress.set_total(collection.total_blobs_size()); - async { Ok(()) } - }; + let jobs = Mutex::new(JoinSet::default()); - let on_blob = - |hash, reader, name| on_blob(context, &progress, &jobs, ticket, hash, reader, name); // Perform the transfer. - let keylog = false; // Do not enable rustls SSLKEYLOGFILE env var functionality - let stats = iroh::get::run_ticket( - ticket, - keylog, - MAX_CONCURRENT_DIALS, - on_connected, - on_collection, - on_blob, - ) - .await?; + let stats = run_get_request(context, &progress, &jobs, ticket.clone()).await?; let mut jobs = jobs.lock().await; while let Some(job) = jobs.join_next().await { @@ -479,6 +489,64 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() Ok(()) } +/// Run the get request +async fn run_get_request( + context: &Context, + progress: &ProgressEmitter, + jobs: &Mutex>, + ticket: Ticket, +) -> anyhow::Result { + let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map())); + let request = AnyGetRequest::Get(GetRequest::all(ticket.hash())); + let connection = iroh::dial::dial(opts).await?; + let initial = fsm::start(connection, request); + use fsm::*; + + let connected = initial.next().await?; + context.emit_event(ReceiveProgress::Connected.into()); + + // we assume that the request includes the entire collection + let (mut next, root, collection) = { + let ConnectedNext::StartRoot(sc) = connected.next().await? else { + bail!("request did not include collection"); + }; + + let (done, data) = sc.next().concatenate_into_vec().await?; + let data = Bytes::from(data); + let collection = Collection::from_bytes(&data)?; + + context.emit_event(ReceiveProgress::CollectionReceived.into()); + progress.set_total(collection.total_blobs_size()); + + (done.next(), data, collection) + }; + + // download all the children + let mut current_blob = 0; + let finishing = loop { + let start = match next { + EndBlobNext::MoreChildren(start) => start, + EndBlobNext::Closing(finishing) => break finishing, + }; + let child_offset = start.child_offset(); + let offset = child_offset + 1; + + // get the hash of the next blob, or finish if there are no more + let Some(blob) = collection.blobs().get(current_blob) else { + break start.finish(); + }; + + let start = start.next(blob.hash); + let done = on_blob(context, progress, jobs, &ticket, start, &blob.name).await?; + + current_blob += 1; + next = done.next(); + }; + let stats = finishing.next().await?; + + Ok(stats) +} + /// Get callback when a blob is received from the provider. /// /// This writes the blobs to the blobdir. If the blob is the database it will import it to @@ -488,10 +556,9 @@ async fn on_blob( progress: &ProgressEmitter, jobs: &Mutex>, ticket: &Ticket, - _hash: Hash, - mut reader: DataStream, - name: String, -) -> Result { + mut state: fsm::AtBlobHeader, + name: &str, +) -> Result { ensure!(!name.is_empty(), "Received a nameless blob"); let path = if name.starts_with("db/") { let context_dir = context @@ -510,15 +577,17 @@ async fn on_blob( context.get_blobdir().join(blobname) }; - let mut wrapped_reader = progress.wrap_async_read(&mut reader); let file = File::create(&path).await?; - let mut file = BufWriter::with_capacity(128 * 1024, file); - io::copy(&mut wrapped_reader, &mut file).await?; + // TODO: BufWriter doesn't implement AsyncSliceWriter :( + // let mut file = BufWriter::with_capacity(128 * 1024, file); + // TODO: ProgressEmitter doesn't support writers :( + // let mut wrapped_file = progress.wrap_async_write(&mut file); + let done = state.write_all(&mut file).await?; file.flush().await?; if name.starts_with("db/") { let context = context.clone(); - let token = ticket.token().to_string(); + let token = ticket.token().map(|t| t.to_string()).unwrap_or_default(); jobs.lock().await.spawn(async move { if let Err(err) = context.sql.import(&path, token).await { error!(context, "cannot import database: {:#?}", err); @@ -533,7 +602,8 @@ async fn on_blob( } }); } - Ok(reader) + + Ok(done) } /// Spawns a task proxying progress events. diff --git a/src/qr.rs b/src/qr.rs index e11b74f56c..cfa0caa068 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -5,6 +5,7 @@ use std::collections::BTreeMap; use anyhow::{anyhow, bail, ensure, Context as _, Result}; pub use dclogin_scheme::LoginOptions; +use iroh::dial::Ticket; use once_cell::sync::Lazy; use percent_encoding::percent_decode_str; use serde::Deserialize; @@ -113,7 +114,7 @@ pub enum Qr { /// information to connect to and authenticate a backup provider. /// /// The format is somewhat opaque, but `sendme` can deserialise this. - ticket: iroh::provider::Ticket, + ticket: Ticket, }, /// Ask the user if they want to use the given service for video chats. @@ -501,7 +502,7 @@ fn decode_backup(qr: &str) -> Result { let payload = qr .strip_prefix(DCBACKUP_SCHEME) .ok_or_else(|| anyhow!("invalid DCBACKUP scheme"))?; - let ticket: iroh::provider::Ticket = payload.parse().context("invalid DCBACKUP payload")?; + let ticket: Ticket = payload.parse().context("invalid DCBACKUP payload")?; Ok(Qr::Backup { ticket }) } From 6f35e52fd9cc718250e115cded4d79125f7c6f92 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 14 Jul 2023 15:54:09 +0200 Subject: [PATCH 02/19] use git dep for iroh --- Cargo.lock | 4 ++++ Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index d8507318ba..a3e4f06e84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2622,6 +2622,7 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "iroh" version = "0.4.1" +source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" dependencies = [ "anyhow", "bao-tree", @@ -2653,6 +2654,7 @@ dependencies = [ [[package]] name = "iroh-bytes" version = "0.4.1" +source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" dependencies = [ "anyhow", "bao-tree", @@ -2700,6 +2702,7 @@ dependencies = [ [[package]] name = "iroh-metrics" version = "0.4.1" +source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" dependencies = [ "erased_set", "hyper", @@ -2713,6 +2716,7 @@ dependencies = [ [[package]] name = "iroh-net" version = "0.4.1" +source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" dependencies = [ "anyhow", "backoff", diff --git a/Cargo.toml b/Cargo.toml index 596537b22d..925819336c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ futures-lite = "1.13.0" hex = "0.4.0" humansize = "2" image = { version = "0.24.6", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } -iroh = { version = "0.4.1", default-features = false, path = "../../iroh/iroh", features = ["iroh-collection", "flat-db"] } +iroh = { version = "0.4.1", default-features = false, git = "https://github.com/n0-computer/iroh", branch = "main", features = ["iroh-collection", "flat-db"] } kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } libc = "0.2" From db8c3352ee5022e51ab12da97df8ab357a6d81cf Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 14 Jul 2023 16:29:31 +0200 Subject: [PATCH 03/19] get compile --- Cargo.lock | 1 + Cargo.toml | 1 + src/imex/transfer.rs | 33 ++++++++++++++------------------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3e4f06e84..d8c1b4cfe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1242,6 +1242,7 @@ dependencies = [ "humansize", "image", "iroh", + "iroh-io", "kamadak-exif", "lettre_email", "libc", diff --git a/Cargo.toml b/Cargo.toml index 925819336c..d3ce22db23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,7 @@ hex = "0.4.0" humansize = "2" image = { version = "0.24.6", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } iroh = { version = "0.4.1", default-features = false, git = "https://github.com/n0-computer/iroh", branch = "main", features = ["iroh-collection", "flat-db"] } +iroh-io = "0.2.1" kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } libc = "0.2" diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 3068cbc904..fb550da799 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -46,10 +46,12 @@ use iroh::net::defaults::default_derp_map; use iroh::net::tls::Keypair; use iroh::node::{Event, Node as IrohNode, StaticTokenAuthHandler}; use iroh::util::progress::ProgressEmitter; -use tokio::fs::{self, File}; -use tokio::io::AsyncWriteExt; -use tokio::sync::broadcast::error::RecvError; -use tokio::sync::{broadcast, Mutex}; +use iroh_io::AsyncSliceWriter; +use tokio::fs; +use tokio::sync::{ + broadcast::{self, error::RecvError}, + Mutex, +}; use tokio::task::{JoinHandle, JoinSet}; use tokio_stream::wrappers::ReadDirStream; use tokio_util::sync::CancellationToken; @@ -64,8 +66,6 @@ use crate::{e2ee, EventType}; use super::{export_database, DBFILE_BACKUP_NAME}; -const MAX_CONCURRENT_DIALS: u8 = 16; - type Node = IrohNode; /// Provide or send a backup of this device. @@ -506,7 +506,7 @@ async fn run_get_request( context.emit_event(ReceiveProgress::Connected.into()); // we assume that the request includes the entire collection - let (mut next, root, collection) = { + let (mut next, _root, collection) = { let ConnectedNext::StartRoot(sc) = connected.next().await? else { bail!("request did not include collection"); }; @@ -522,24 +522,21 @@ async fn run_get_request( }; // download all the children - let mut current_blob = 0; + let mut blobs = collection.blobs().iter(); let finishing = loop { let start = match next { EndBlobNext::MoreChildren(start) => start, EndBlobNext::Closing(finishing) => break finishing, }; - let child_offset = start.child_offset(); - let offset = child_offset + 1; // get the hash of the next blob, or finish if there are no more - let Some(blob) = collection.blobs().get(current_blob) else { + let Some(blob) = blobs.next() else { break start.finish(); }; let start = start.next(blob.hash); - let done = on_blob(context, progress, jobs, &ticket, start, &blob.name).await?; + let done = on_blob(context, jobs, &ticket, start, &blob.name).await?; - current_blob += 1; next = done.next(); }; let stats = finishing.next().await?; @@ -553,10 +550,9 @@ async fn run_get_request( /// the database of the current [`Context`]. async fn on_blob( context: &Context, - progress: &ProgressEmitter, jobs: &Mutex>, ticket: &Ticket, - mut state: fsm::AtBlobHeader, + state: fsm::AtBlobHeader, name: &str, ) -> Result { ensure!(!name.is_empty(), "Received a nameless blob"); @@ -577,13 +573,12 @@ async fn on_blob( context.get_blobdir().join(blobname) }; - let file = File::create(&path).await?; - // TODO: BufWriter doesn't implement AsyncSliceWriter :( - // let mut file = BufWriter::with_capacity(128 * 1024, file); + let file_path = path.clone(); + let mut file = iroh_io::File::create(move || std::fs::File::create(&file_path)).await?; // TODO: ProgressEmitter doesn't support writers :( // let mut wrapped_file = progress.wrap_async_write(&mut file); let done = state.write_all(&mut file).await?; - file.flush().await?; + file.sync().await?; if name.starts_with("db/") { let context = context.clone(); From e24af97f3ef9e709a066343951ecabcafce3a1ba Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Fri, 14 Jul 2023 16:32:35 +0200 Subject: [PATCH 04/19] fix runtime --- src/imex/transfer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index fb550da799..ba8fa6aa56 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -39,6 +39,7 @@ use futures_lite::StreamExt; use iroh::bytes::get::{fsm, Stats}; use iroh::bytes::protocol::{AnyGetRequest, GetRequest, RequestToken}; use iroh::bytes::provider::Event as ProviderEvent; +use iroh::bytes::util::runtime; use iroh::collection::Collection; use iroh::database::flat::DataSource; use iroh::dial::Ticket; @@ -189,9 +190,11 @@ impl BackupProvider { let (db, hash) = iroh::database::flat::create_collection(files).await?; context.emit_event(SendProgress::CollectionCreated.into()); let auth_token_handler = StaticTokenAuthHandler::new(Some(token.clone())); + let rt = runtime::Handle::from_currrent(1)?; let provider = Node::builder(db) .bind_addr((Ipv4Addr::UNSPECIFIED, 0).into()) .custom_auth_handler(Arc::new(auth_token_handler)) + .runtime(&rt) .spawn() .await?; context.emit_event(SendProgress::ProviderListening.into()); From 8fff9ebe10420dd25ca8673e7614b317b8dbc590 Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Mon, 17 Jul 2023 12:23:36 +0300 Subject: [PATCH 05/19] add the token to the request --- src/imex/transfer.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index ba8fa6aa56..34018a394a 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -199,7 +199,7 @@ impl BackupProvider { .await?; context.emit_event(SendProgress::ProviderListening.into()); info!(context, "Waiting for remote to connect"); - let ticket = provider.ticket(hash, Some(token)).await?; + let ticket = provider.ticket(hash).await?.with_token(Some(token)); Ok((provider, ticket)) } @@ -500,7 +500,8 @@ async fn run_get_request( ticket: Ticket, ) -> anyhow::Result { let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map())); - let request = AnyGetRequest::Get(GetRequest::all(ticket.hash())); + let request = AnyGetRequest::Get(GetRequest::all(ticket.hash())) + .with_token(ticket.token().cloned()); let connection = iroh::dial::dial(opts).await?; let initial = fsm::start(connection, request); use fsm::*; From 7245be1b2b4439020527751d35519d2973214dfa Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Mon, 17 Jul 2023 12:33:32 +0300 Subject: [PATCH 06/19] fix: configure iroh collection parser we need to let the provider know that we want to support iroh collections --- Cargo.lock | 13 +++++++------ src/imex/transfer.rs | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8c1b4cfe4..0b32222785 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1198,9 +1198,9 @@ dependencies = [ [[package]] name = "default-net" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae47401ee27418babbf80e20de5ff240a19c850ec6000326342cdb198b341687" +checksum = "cfe553014b8511f63a1324f7cc9b91cf0117289321ad14b4781ef4fed005f30c" dependencies = [ "dlopen2", "libc", @@ -2623,7 +2623,7 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "iroh" version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" +source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" dependencies = [ "anyhow", "bao-tree", @@ -2649,13 +2649,14 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", + "url", "walkdir", ] [[package]] name = "iroh-bytes" version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" +source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" dependencies = [ "anyhow", "bao-tree", @@ -2703,7 +2704,7 @@ dependencies = [ [[package]] name = "iroh-metrics" version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" +source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" dependencies = [ "erased_set", "hyper", @@ -2717,7 +2718,7 @@ dependencies = [ [[package]] name = "iroh-net" version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#58d42ba7da1f3eca199f4952643d1de6ac812664" +source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" dependencies = [ "anyhow", "backoff", diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 34018a394a..f4e98c4eef 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -40,7 +40,7 @@ use iroh::bytes::get::{fsm, Stats}; use iroh::bytes::protocol::{AnyGetRequest, GetRequest, RequestToken}; use iroh::bytes::provider::Event as ProviderEvent; use iroh::bytes::util::runtime; -use iroh::collection::Collection; +use iroh::collection::{Collection, IrohCollectionParser}; use iroh::database::flat::DataSource; use iroh::dial::Ticket; use iroh::net::defaults::default_derp_map; @@ -194,6 +194,7 @@ impl BackupProvider { let provider = Node::builder(db) .bind_addr((Ipv4Addr::UNSPECIFIED, 0).into()) .custom_auth_handler(Arc::new(auth_token_handler)) + .collection_parser(IrohCollectionParser) .runtime(&rt) .spawn() .await?; @@ -500,8 +501,8 @@ async fn run_get_request( ticket: Ticket, ) -> anyhow::Result { let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map())); - let request = AnyGetRequest::Get(GetRequest::all(ticket.hash())) - .with_token(ticket.token().cloned()); + let request = + AnyGetRequest::Get(GetRequest::all(ticket.hash())).with_token(ticket.token().cloned()); let connection = iroh::dial::dial(opts).await?; let initial = fsm::start(connection, request); use fsm::*; From 1a8415410ee033f3050870c37c42662527e443aa Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:17:41 +0200 Subject: [PATCH 07/19] update to released iroh --- Cargo.lock | 84 +++++++++++++++++++++++++++++++++++++----------------- Cargo.toml | 2 +- 2 files changed, 59 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b32222785..45b0d144ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2171,9 +2171,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "governor" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c390a940a5d157878dd057c78680a33ce3415bcd05b4799509ea44210914b4d5" +checksum = "821239e5672ff23e2a7060901fa622950bbd80b649cdaadd78d1c1767ed14eb4" dependencies = [ "cfg-if", "dashmap", @@ -2622,8 +2622,9 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "iroh" -version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23563988ed2782c0d581c91eb08548e75372899b4e7d96aaeb016eb29bb3d72" dependencies = [ "anyhow", "bao-tree", @@ -2655,8 +2656,9 @@ dependencies = [ [[package]] name = "iroh-bytes" -version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd5a737cd35e3ce47abd53e4995f5b42e94c8b430101e6309340fca70ab3506" dependencies = [ "anyhow", "bao-tree", @@ -2703,8 +2705,9 @@ dependencies = [ [[package]] name = "iroh-metrics" -version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10c7a91729a395f63ff934cc68394044daa8b51f18340e90450d35144ea6b837" dependencies = [ "erased_set", "hyper", @@ -2717,8 +2720,9 @@ dependencies = [ [[package]] name = "iroh-net" -version = "0.4.1" -source = "git+https://github.com/n0-computer/iroh?branch=main#456f96305954a23299d02ed65b8838ba168232e1" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81d6cb57a59c8df3d1734091274fc54e943434f4dcac7c2feeec7769b6bc38" dependencies = [ "anyhow", "backoff", @@ -2742,6 +2746,7 @@ dependencies = [ "iroh-metrics", "libc", "netlink-packet-route", + "num_enum", "once_cell", "os_info", "postcard", @@ -2769,6 +2774,7 @@ dependencies = [ "tokio-util", "tracing", "trust-dns-resolver", + "ucd-parse", "url", "webpki", "webpki-roots 0.23.1", @@ -2938,10 +2944,10 @@ dependencies = [ ] [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" dependencies = [ "libc", ] @@ -3322,6 +3328,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.25", +] + [[package]] name = "object" version = "0.31.1" @@ -3890,6 +3917,16 @@ dependencies = [ "elliptic-curve", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3971,16 +4008,16 @@ checksum = "4339fc7a1021c9c1621d87f5e3505f2805c8c105420ba2f2a4df86814590c142" [[package]] name = "quanta" -version = "0.9.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20afe714292d5e879d8b12740aa223c6a88f118af41870e8b6196e39a02238a8" +checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" dependencies = [ "crossbeam-utils", "libc", - "mach", + "mach2", "once_cell", "raw-cpuid", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -4318,12 +4355,6 @@ dependencies = [ "regex-syntax 0.7.4", ] -[[package]] -name = "regex-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f96ede7f386ba6e910092e7ccdc04176cface62abebea07ed6b46d870ed95ca2" - [[package]] name = "regex-syntax" version = "0.6.29" @@ -5806,11 +5837,12 @@ dependencies = [ [[package]] name = "ucd-parse" -version = "0.1.12" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212c59636157b18c2f57eed2799e6606c52fc49c6a11685ffb0d08f06e55f428" +checksum = "fc2d0556a998f4c55500ce1730901ba32bafbe820068cbdc091421525d61253b" dependencies = [ - "regex-lite", + "once_cell", + "regex", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d3ce22db23..d3b16261b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ futures-lite = "1.13.0" hex = "0.4.0" humansize = "2" image = { version = "0.24.6", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } -iroh = { version = "0.4.1", default-features = false, git = "https://github.com/n0-computer/iroh", branch = "main", features = ["iroh-collection", "flat-db"] } +iroh = { version = "0.5.1", default-features = false, features = ["iroh-collection", "flat-db"] } iroh-io = "0.2.1" kamadak-exif = "0.5" lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" } From 61ca1b3d16cd58f7ab960abfa20a37edb5f86bf0 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:20:48 +0200 Subject: [PATCH 08/19] disable derp usage --- src/imex/transfer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index f4e98c4eef..32172dfa63 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -43,7 +43,6 @@ use iroh::bytes::util::runtime; use iroh::collection::{Collection, IrohCollectionParser}; use iroh::database::flat::DataSource; use iroh::dial::Ticket; -use iroh::net::defaults::default_derp_map; use iroh::net::tls::Keypair; use iroh::node::{Event, Node as IrohNode, StaticTokenAuthHandler}; use iroh::util::progress::ProgressEmitter; @@ -500,7 +499,10 @@ async fn run_get_request( jobs: &Mutex>, ticket: Ticket, ) -> anyhow::Result { - let opts = ticket.as_get_options(Keypair::generate(), Some(default_derp_map())); + // DERP usage for NAT traversal and relay are currently disabled. + let derp_map = None; + + let opts = ticket.as_get_options(Keypair::generate(), derp_map); let request = AnyGetRequest::Get(GetRequest::all(ticket.hash())).with_token(ticket.token().cloned()); let connection = iroh::dial::dial(opts).await?; From cbc4e043d1482c11ed4c28cab86063f1750a93ea Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:23:06 +0200 Subject: [PATCH 09/19] happy clippy --- src/imex/transfer.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 32172dfa63..5be590345f 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -507,14 +507,13 @@ async fn run_get_request( AnyGetRequest::Get(GetRequest::all(ticket.hash())).with_token(ticket.token().cloned()); let connection = iroh::dial::dial(opts).await?; let initial = fsm::start(connection, request); - use fsm::*; let connected = initial.next().await?; context.emit_event(ReceiveProgress::Connected.into()); // we assume that the request includes the entire collection let (mut next, _root, collection) = { - let ConnectedNext::StartRoot(sc) = connected.next().await? else { + let fsm::ConnectedNext::StartRoot(sc) = connected.next().await? else { bail!("request did not include collection"); }; @@ -532,8 +531,8 @@ async fn run_get_request( let mut blobs = collection.blobs().iter(); let finishing = loop { let start = match next { - EndBlobNext::MoreChildren(start) => start, - EndBlobNext::Closing(finishing) => break finishing, + fsm::EndBlobNext::MoreChildren(start) => start, + fsm::EndBlobNext::Closing(finishing) => break finishing, }; // get the hash of the next blob, or finish if there are no more From 67036adada1875c0aa2c0ef646b431a6de7bc93e Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:32:19 +0200 Subject: [PATCH 10/19] update deny.toml --- deny.toml | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/deny.toml b/deny.toml index 8f5b216497..40f3f534e8 100644 --- a/deny.toml +++ b/deny.toml @@ -11,51 +11,29 @@ ignore = [ # Please keep this list alphabetically sorted. skip = [ { name = "ahash", version = "0.7.6" }, - { name = "base16ct", version = "0.1.1" }, { name = "base64", version = "<0.21" }, { name = "bitflags", version = "1.3.2" }, - { name = "block-buffer", version = "<0.10" }, - { name = "convert_case", version = "0.4.0" }, - { name = "curve25519-dalek", version = "3.2.0" }, - { name = "darling_core", version = "<0.14" }, - { name = "darling_macro", version = "<0.14" }, - { name = "darling", version = "<0.14" }, - { name = "der", version = "0.6.1" }, - { name = "digest", version = "<0.10" }, - { name = "ed25519-dalek", version = "1.0.1" }, - { name = "ed25519", version = "1.5.3" }, - { name = "fastrand", version = "1.9.0" }, { name = "getrandom", version = "<0.2" }, { name = "hashbrown", version = "<0.14.0" }, { name = "idna", version = "<0.3" }, { name = "indexmap", version = "<2.0.0" }, - { name = "pem-rfc7468", version = "0.6.0" }, - { name = "pkcs8", version = "0.9.0" }, + { name = "linux-raw-sys", version = "0.3.8" }, { name = "quick-error", version = "<2.0" }, { name = "rand_chacha", version = "<0.3" }, { name = "rand_core", version = "<0.6" }, { name = "rand", version = "<0.8" }, { name = "redox_syscall", version = "0.2.16" }, + { name = "regex-automata", version = "<0.3.3" }, { name = "regex-syntax", version = "0.6.29" }, - { name = "sec1", version = "0.3.0" }, - { name = "sha2", version = "<0.10" }, - { name = "signature", version = "1.6.4" }, + { name = "rustix", version = "0.37.21" }, + { name = "rustls-webpki", version = "<0.101.1" }, { name = "socket2", version = "0.4.9" }, + { name = "sha1", version = "<0.10.5" }, { name = "spin", version = "<0.9.6" }, - { name = "spki", version = "0.6.0" }, { name = "syn", version = "1.0.109" }, { name = "time", version = "<0.3" }, { name = "wasi", version = "<0.11" }, - { name = "windows_aarch64_gnullvm", version = "<0.48" }, - { name = "windows_aarch64_msvc", version = "<0.48" }, - { name = "windows_i686_gnu", version = "<0.48" }, - { name = "windows_i686_msvc", version = "<0.48" }, - { name = "windows-sys", version = "<0.48" }, - { name = "windows-targets", version = "<0.48" }, - { name = "windows", version = "0.32.0" }, - { name = "windows_x86_64_gnullvm", version = "<0.48" }, - { name = "windows_x86_64_gnu", version = "<0.48" }, - { name = "windows_x86_64_msvc", version = "<0.48" }, + { name = "webpki-roots", version = "<0.23.1" }, { name = "winreg", version = "0.10.1" }, ] @@ -88,5 +66,4 @@ license-files = [ github = [ "async-email", "deltachat", - "quinn-rs", ] From cff7f50571198fed07477773780fbaea8a0c6983 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:33:39 +0200 Subject: [PATCH 11/19] fix doc comments --- src/imex/transfer.rs | 2 +- src/qr.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 5be590345f..f391d2adab 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -414,7 +414,7 @@ impl From for EventType { /// This is a long running operation which will only when completed. /// /// Using [`Qr`] as argument is a bit odd as it only accepts one specific variant of it. It -/// does avoid having [`iroh::provider::Ticket`] in the primary API however, without +/// does avoid having [`iroh::dial::Ticket`] in the primary API however, without /// having to revert to untyped bytes. pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> { ensure!( diff --git a/src/qr.rs b/src/qr.rs index cfa0caa068..82fab5e1f6 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -497,7 +497,7 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result { /// Decodes a [`DCBACKUP_SCHEME`] QR code. /// /// The format of this scheme is `DCBACKUP:`. The encoding is the -/// [`iroh::provider::Ticket`]'s `Display` impl. +/// [`iroh::dial::Ticket`]'s `Display` impl. fn decode_backup(qr: &str) -> Result { let payload = qr .strip_prefix(DCBACKUP_SCHEME) From fc3ca7fbc2504ed938f1b78cf3196ef9ff6b2bf4 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:38:45 +0200 Subject: [PATCH 12/19] update pgp ref --- Cargo.lock | 3 ++- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45b0d144ee..e5034e622e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3603,7 +3603,7 @@ dependencies = [ [[package]] name = "pgp" version = "0.10.1" -source = "git+https://github.com/rpgp/rpgp?branch=new-dalek#e84a95df572a2f789f047d6df7b9803321b7b52f" +source = "git+https://github.com/rpgp/rpgp?branch=master#93866d24673e4407f3c83873f83bf917c20feaba" dependencies = [ "aes", "base64 0.21.2", @@ -3619,6 +3619,7 @@ dependencies = [ "chrono", "cipher", "crc24", + "curve25519-dalek", "derive_builder", "des", "digest", diff --git a/Cargo.toml b/Cargo.toml index d3b16261b8..977a2360e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ num-traits = "0.2" once_cell = "1.18.0" percent-encoding = "2.3" parking_lot = "0.12" -pgp = { git = "https://github.com/rpgp/rpgp", branch = "new-dalek", version = "0.10", default-features = false } +pgp = { git = "https://github.com/rpgp/rpgp", branch = "master", version = "0.10", default-features = false } pretty_env_logger = { version = "0.5", optional = true } qrcodegen = "1.7.0" quick-xml = "0.29" From a84a055fa0594fd701112719731ff57c6abc4984 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 14:44:02 +0200 Subject: [PATCH 13/19] reduce duplicates --- Cargo.lock | 292 ++++++++++++++++++++++++----------------------------- deny.toml | 3 +- 2 files changed, 134 insertions(+), 161 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5034e622e..9090943cf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -128,9 +128,9 @@ checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" dependencies = [ "backtrace", ] @@ -278,13 +278,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.71" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -327,9 +327,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", @@ -405,9 +405,9 @@ dependencies = [ [[package]] name = "bao-tree" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375f3ee1fb90dfabed4754a4ebb0137553162655757cd2a91cdca88d8f7c7672" +checksum = "300ecc0fc879f191300741b6e7de87d3303e843f2d6e1ff9f33f2eadd3f857ec" dependencies = [ "blake3", "bytes", @@ -766,18 +766,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.11" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" dependencies = [ "anstyle", "clap_lex", @@ -1084,7 +1084,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1352,7 +1352,7 @@ name = "deltachat_derive" version = "2.0.0" dependencies = [ "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1408,7 +1408,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1459,7 +1459,7 @@ checksum = "10c89e23c2ccd1af6fae76cbe614c135e5640837f5e868f0995549f1762db62d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", "unicode-xid", ] @@ -1519,7 +1519,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1535,9 +1535,9 @@ dependencies = [ [[package]] name = "dtoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519b83cd10f5f6e969625a409f735182bea5558cd8b64c655806ceaae36f1999" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "duct" @@ -1553,15 +1553,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", "digest", @@ -1610,9 +1610,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1771,7 +1771,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1795,9 +1795,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" +checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" dependencies = [ "serde", ] @@ -1897,6 +1897,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fd-lock" version = "3.0.13" @@ -1904,7 +1910,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" dependencies = [ "cfg-if", - "rustix 0.38.4", + "rustix", "windows-sys", ] @@ -2056,7 +2062,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -2073,7 +2079,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -2591,17 +2597,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] - [[package]] name = "ipconfig" version = "0.3.2" @@ -2791,7 +2786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.4", + "rustix", "windows-sys", ] @@ -2806,9 +2801,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jpeg-decoder" @@ -2906,12 +2901,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.3" @@ -3273,7 +3262,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3310,9 +3299,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -3346,7 +3335,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3408,7 +3397,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3527,9 +3516,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pem" @@ -3558,9 +3547,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" dependencies = [ "thiserror", "ucd-trie", @@ -3568,9 +3557,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" dependencies = [ "pest", "pest_generator", @@ -3578,22 +3567,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] name = "pest_meta" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" dependencies = [ "once_cell", "pest", @@ -3668,7 +3657,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3812,9 +3801,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d220334a184db82b31b83f5ff093e3315280fb2b6bbc032022b2304a509aab7a" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" [[package]] name = "positioned-io" @@ -3828,9 +3817,9 @@ dependencies = [ [[package]] name = "postcard" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00" +checksum = "c9ee729232311d3cd113749948b689627618133b1c5012b77342c1950b25eaeb" dependencies = [ "cobs", "const_format", @@ -3954,9 +3943,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -4103,9 +4092,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -4306,22 +4295,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1641819477c319ef452a075ac34a4be92eb9ba09f6841f62d594d50fdcf0bf6b" +checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" +checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4479,9 +4468,9 @@ dependencies = [ [[package]] name = "rtnetlink" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6333af2adba73478936174a0ef3edf05fbfa058539c21d567344a53bb6d75cfd" +checksum = "7a552eb82d19f38c3beed3f786bd23aa434ceb9ac43ab44419ca6d67a7e186c0" dependencies = [ "futures", "log", @@ -4545,20 +4534,6 @@ dependencies = [ "nom", ] -[[package]] -name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys", -] - [[package]] name = "rustix" version = "0.38.4" @@ -4568,7 +4543,7 @@ dependencies = [ "bitflags 2.3.3", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys", ] @@ -4627,9 +4602,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rustyline" @@ -4656,9 +4631,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -4729,9 +4704,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -4745,9 +4720,9 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -4759,9 +4734,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -4772,9 +4747,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4788,18 +4763,18 @@ checksum = "4c309e515543e67811222dbc9e3dd7e1056279b782e1dacffe4242b718734fb6" [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.171" +version = "1.0.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" dependencies = [ "serde_derive", ] @@ -4815,13 +4790,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4837,9 +4812,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -4848,9 +4823,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc4422959dd87a76cb117c191dcbffc20467f06c9100b76721dab370f24d3a" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ "itoa", "serde", @@ -5146,7 +5121,7 @@ dependencies = [ "proc-macro2", "quote", "struct_iterable_internal", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -5171,7 +5146,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -5231,9 +5206,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" dependencies = [ "proc-macro2", "quote", @@ -5301,15 +5276,14 @@ checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" dependencies = [ - "autocfg", "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys", ] @@ -5349,22 +5323,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -5478,7 +5452,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -5541,14 +5515,14 @@ dependencies = [ [[package]] name = "tokio-tar" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50188549787c32c1c3d9c8c71ad7e003ccf2f102489c5a96e385c84760477f4" +checksum = "9d5714c010ca3e5c27114c1cdeb9d14641ace49874aa5626d7149e47aedace75" dependencies = [ "filetime", "futures-core", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "tokio", "tokio-stream", "xattr", @@ -5556,9 +5530,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" dependencies = [ "futures-util", "log", @@ -5605,9 +5579,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.13" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -5665,7 +5639,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -5780,13 +5754,13 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" +checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", @@ -5866,9 +5840,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-linebreak" @@ -5949,9 +5923,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", "serde", @@ -6039,7 +6013,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", "wasm-bindgen-shared", ] @@ -6073,7 +6047,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6364,18 +6338,18 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "ea263437ca03c1522846a4ddafbca2542d0ad5ed9b784909d4b27b76f62bc34a" dependencies = [ "libc", ] [[package]] name = "xml-rs" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a56c84a8ccd4258aed21c92f70c0f6dea75356b6892ae27c24139da456f9336" +checksum = "47430998a7b5d499ccee752b41567bc3afc57e1327dc855b1a2aa44ce29b5fa1" [[package]] name = "xmltree" @@ -6454,5 +6428,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] diff --git a/deny.toml b/deny.toml index 40f3f534e8..aef8d88ae3 100644 --- a/deny.toml +++ b/deny.toml @@ -13,11 +13,11 @@ skip = [ { name = "ahash", version = "0.7.6" }, { name = "base64", version = "<0.21" }, { name = "bitflags", version = "1.3.2" }, + { name = "fastrand", version = "<2.0.0" }, { name = "getrandom", version = "<0.2" }, { name = "hashbrown", version = "<0.14.0" }, { name = "idna", version = "<0.3" }, { name = "indexmap", version = "<2.0.0" }, - { name = "linux-raw-sys", version = "0.3.8" }, { name = "quick-error", version = "<2.0" }, { name = "rand_chacha", version = "<0.3" }, { name = "rand_core", version = "<0.6" }, @@ -25,7 +25,6 @@ skip = [ { name = "redox_syscall", version = "0.2.16" }, { name = "regex-automata", version = "<0.3.3" }, { name = "regex-syntax", version = "0.6.29" }, - { name = "rustix", version = "0.37.21" }, { name = "rustls-webpki", version = "<0.101.1" }, { name = "socket2", version = "0.4.9" }, { name = "sha1", version = "<0.10.5" }, From 5401dd911dd03e360e4cfa9fb6cc677cf004746c Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 18:10:20 +0200 Subject: [PATCH 14/19] update to release pgp --- Cargo.lock | 9 +++++---- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9090943cf6..d22efa5963 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,9 +871,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "a385f5d34e5eff161df2369056a3fd194fcabd8a64ce0eed02de09fcb3203434" [[package]] name = "cpufeatures" @@ -3591,8 +3591,9 @@ dependencies = [ [[package]] name = "pgp" -version = "0.10.1" -source = "git+https://github.com/rpgp/rpgp?branch=master#93866d24673e4407f3c83873f83bf917c20feaba" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27e1f8e085bfa9b85763fe3ddaacbe90a09cd847b3833129153a6cb063bbe132" dependencies = [ "aes", "base64 0.21.2", diff --git a/Cargo.toml b/Cargo.toml index 977a2360e7..02f92c6aae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ num-traits = "0.2" once_cell = "1.18.0" percent-encoding = "2.3" parking_lot = "0.12" -pgp = { git = "https://github.com/rpgp/rpgp", branch = "master", version = "0.10", default-features = false } +pgp = { version = "0.10.2", default-features = false } pretty_env_logger = { version = "0.5", optional = true } qrcodegen = "1.7.0" quick-xml = "0.29" From 81ada2c696d179804189706ad28bfdd04159f16d Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Mon, 24 Jul 2023 18:18:41 +0200 Subject: [PATCH 15/19] try to fix lifetime error --- Cargo.lock | 4 ++-- src/imex/transfer.rs | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d22efa5963..c5ebb5d4b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,9 +871,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a385f5d34e5eff161df2369056a3fd194fcabd8a64ce0eed02de09fcb3203434" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index f391d2adab..ed1b106e0d 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -474,10 +474,10 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() let progress = ProgressEmitter::new(0, ReceiveProgress::max_blob_progress()); spawn_progress_proxy(context.clone(), progress.subscribe()); - let jobs = Mutex::new(JoinSet::default()); + let jobs = Arc::new(Mutex::new(JoinSet::default())); // Perform the transfer. - let stats = run_get_request(context, &progress, &jobs, ticket.clone()).await?; + let stats = run_get_request(context, &progress, jobs.clone(), ticket.clone()).await?; let mut jobs = jobs.lock().await; while let Some(job) = jobs.join_next().await { @@ -496,7 +496,7 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() async fn run_get_request( context: &Context, progress: &ProgressEmitter, - jobs: &Mutex>, + jobs: Arc>>, ticket: Ticket, ) -> anyhow::Result { // DERP usage for NAT traversal and relay are currently disabled. @@ -511,6 +511,8 @@ async fn run_get_request( let connected = initial.next().await?; context.emit_event(ReceiveProgress::Connected.into()); + let rt = runtime::Handle::from_currrent(1)?; + // we assume that the request includes the entire collection let (mut next, _root, collection) = { let fsm::ConnectedNext::StartRoot(sc) = connected.next().await? else { @@ -541,7 +543,18 @@ async fn run_get_request( }; let start = start.next(blob.hash); - let done = on_blob(context, jobs, &ticket, start, &blob.name).await?; + + // `iroh_io` io needs to be done on a local spawn + let ticket = ticket.clone(); + let context = context.clone(); + let name = blob.name.clone(); + let jobs = jobs.clone(); + let done = rt + .local_pool() + .spawn_pinned(move || { + Box::pin(async move { on_blob(context, jobs, ticket, start, &name).await }) + }) + .await??; next = done.next(); }; @@ -555,9 +568,9 @@ async fn run_get_request( /// This writes the blobs to the blobdir. If the blob is the database it will import it to /// the database of the current [`Context`]. async fn on_blob( - context: &Context, - jobs: &Mutex>, - ticket: &Ticket, + context: Context, + jobs: Arc>>, + ticket: Ticket, state: fsm::AtBlobHeader, name: &str, ) -> Result { From e3f75f9f70dbdac26fb785745fc3f6629bbe3f79 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 25 Jul 2023 14:57:45 +0200 Subject: [PATCH 16/19] fix spawn scope --- src/imex/transfer.rs | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index ed1b106e0d..6c2662897b 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -543,18 +543,7 @@ async fn run_get_request( }; let start = start.next(blob.hash); - - // `iroh_io` io needs to be done on a local spawn - let ticket = ticket.clone(); - let context = context.clone(); - let name = blob.name.clone(); - let jobs = jobs.clone(); - let done = rt - .local_pool() - .spawn_pinned(move || { - Box::pin(async move { on_blob(context, jobs, ticket, start, &name).await }) - }) - .await??; + let done = on_blob(context, &rt, &jobs, &ticket, start, &blob.name).await?; next = done.next(); }; @@ -568,9 +557,10 @@ async fn run_get_request( /// This writes the blobs to the blobdir. If the blob is the database it will import it to /// the database of the current [`Context`]. async fn on_blob( - context: Context, - jobs: Arc>>, - ticket: Ticket, + context: &Context, + rt: &runtime::Handle, + jobs: &Arc>>, + ticket: &Ticket, state: fsm::AtBlobHeader, name: &str, ) -> Result { @@ -592,12 +582,23 @@ async fn on_blob( context.get_blobdir().join(blobname) }; + // `iroh_io` io needs to be done on a local spawn let file_path = path.clone(); - let mut file = iroh_io::File::create(move || std::fs::File::create(&file_path)).await?; - // TODO: ProgressEmitter doesn't support writers :( - // let mut wrapped_file = progress.wrap_async_write(&mut file); - let done = state.write_all(&mut file).await?; - file.sync().await?; + let done = rt + .local_pool() + .spawn_pinned(move || { + let file_path = file_path.clone(); + Box::pin(async move { + let mut file = + iroh_io::File::create(move || std::fs::File::create(&file_path)).await?; + // TODO: ProgressEmitter doesn't support writers :( + // let mut wrapped_file = progress.wrap_async_write(&mut file); + let done = state.write_all(&mut file).await?; + file.sync().await?; + anyhow::Ok(done) + }) + }) + .await??; if name.starts_with("db/") { let context = context.clone(); From b9e1e508260586b36b15a32b9139c44501a91770 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 25 Jul 2023 16:22:25 +0200 Subject: [PATCH 17/19] remove arc --- src/imex/transfer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 6c2662897b..bc2b1570e0 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -474,10 +474,10 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() let progress = ProgressEmitter::new(0, ReceiveProgress::max_blob_progress()); spawn_progress_proxy(context.clone(), progress.subscribe()); - let jobs = Arc::new(Mutex::new(JoinSet::default())); + let jobs = Mutex::new(JoinSet::default()); // Perform the transfer. - let stats = run_get_request(context, &progress, jobs.clone(), ticket.clone()).await?; + let stats = run_get_request(context, &progress, &jobs, ticket.clone()).await?; let mut jobs = jobs.lock().await; while let Some(job) = jobs.join_next().await { @@ -496,7 +496,7 @@ async fn transfer_from_provider(context: &Context, ticket: &Ticket) -> Result<() async fn run_get_request( context: &Context, progress: &ProgressEmitter, - jobs: Arc>>, + jobs: &Mutex>, ticket: Ticket, ) -> anyhow::Result { // DERP usage for NAT traversal and relay are currently disabled. @@ -559,7 +559,7 @@ async fn run_get_request( async fn on_blob( context: &Context, rt: &runtime::Handle, - jobs: &Arc>>, + jobs: &Mutex>, ticket: &Ticket, state: fsm::AtBlobHeader, name: &str, From b8e29898193326e6539ec4e14780da3e90e1187a Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 25 Jul 2023 19:39:19 +0200 Subject: [PATCH 18/19] fix deny.toml --- deny.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deny.toml b/deny.toml index aef8d88ae3..7f9169f6cb 100644 --- a/deny.toml +++ b/deny.toml @@ -13,6 +13,9 @@ skip = [ { name = "ahash", version = "0.7.6" }, { name = "base64", version = "<0.21" }, { name = "bitflags", version = "1.3.2" }, + { name = "darling", version = "<0.14.4" }, + { name = "darling_core", version = "<0.14.4" }, + { name = "darling_macro", version = "<0.14.4" }, { name = "fastrand", version = "<2.0.0" }, { name = "getrandom", version = "<0.2" }, { name = "hashbrown", version = "<0.14.0" }, From 438cf0d95355db230a5cd3ebc9b704af9d643b2a Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 25 Jul 2023 21:33:04 +0200 Subject: [PATCH 19/19] happy clippy --- src/imex/transfer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index bc2b1570e0..ec0b4ffa15 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -543,7 +543,7 @@ async fn run_get_request( }; let start = start.next(blob.hash); - let done = on_blob(context, &rt, &jobs, &ticket, start, &blob.name).await?; + let done = on_blob(context, &rt, jobs, &ticket, start, &blob.name).await?; next = done.next(); };