From 76f95c757ea355d11a690a71893dc109d566f99d Mon Sep 17 00:00:00 2001 From: okjodom Date: Sun, 9 Nov 2025 06:50:32 +0300 Subject: [PATCH 1/3] feat: migrate to fm v 0.9.0 --- Cargo.lock | 844 ++++++++++++---------------------- Cargo.toml | 20 +- flake.lock | 116 ++--- flake.nix | 32 +- scripts/mprocs-nix-gateway.sh | 21 - 5 files changed, 381 insertions(+), 652 deletions(-) delete mode 100755 scripts/mprocs-nix-gateway.sh diff --git a/Cargo.lock b/Cargo.lock index c1d0d6b..69ed047 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,17 +167,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - [[package]] name = "async-channel" version = "2.5.0" @@ -203,60 +192,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "async-executor" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.5.0", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "windows-sys 0.60.2", -] - [[package]] name = "async-lock" version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ - "event-listener 5.4.1", + "event-listener", "event-listener-strategy", "pin-project-lite", ] @@ -272,32 +214,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "async-std" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers 0.3.0", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -320,12 +236,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.88" @@ -382,7 +292,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9" dependencies = [ "base64 0.22.1", - "http 1.3.1", + "http", "log", "url", ] @@ -404,6 +314,42 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "aws-lc-rs" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" +dependencies = [ + "aws-lc-sys 0.32.3", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff" +dependencies = [ + "bindgen 0.69.5", + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-lc-sys" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "107a4e9d9cab9963e04e84bb8dee0e25f2a987f9a8bad5ed054abd439caa8f8c" +dependencies = [ + "bindgen 0.72.1", + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "axum" version = "0.7.9" @@ -415,10 +361,10 @@ dependencies = [ "base64 0.22.1", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "itoa", "matchit", @@ -432,7 +378,7 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-tungstenite", "tower 0.5.2", @@ -450,13 +396,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -545,15 +491,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bindgen" version = "0.69.5" @@ -566,12 +503,15 @@ dependencies = [ "itertools 0.12.1", "lazy_static", "lazycell", + "log", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash 1.1.0", "shlex", "syn 2.0.104", + "which", ] [[package]] @@ -592,6 +532,26 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags 2.9.1", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.1", + "shlex", + "syn 2.0.104", +] + [[package]] name = "bip39" version = "2.2.0" @@ -732,19 +692,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel 2.5.0", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - [[package]] name = "bls12_381" version = "0.8.0" @@ -933,6 +880,15 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + [[package]] name = "cobs" version = "0.3.0" @@ -1302,6 +1258,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -1436,24 +1398,18 @@ dependencies = [ [[package]] name = "esplora-client" -version = "0.10.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23be31c97b2e505ac6af0d72a201caead71298a957639061a10314f6d4860cd7" +checksum = "a0af349d96a5d9ad77ba59f1437aa6f348b03c5865d4f7d6e7a662d60aedce39" dependencies = [ - "async-std", "bitcoin", "hex-conservative 0.2.1", "log", - "reqwest 0.11.27", + "reqwest", "serde", + "tokio", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.4.1" @@ -1471,7 +1427,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.1", + "event-listener", "pin-project-lite", ] @@ -1489,9 +1445,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fedimint-aead" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "480796eca121a005d7ad3b6a0f624d6d5f908701c542e97f838ec7ab3a09a0be" +checksum = "61d1d6797edbd21e27ecfc4d942a1b2629dfe564103cfba13031aa0ce483788a" dependencies = [ "anyhow", "argon2", @@ -1502,13 +1458,14 @@ dependencies = [ [[package]] name = "fedimint-api-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da73d99e318f996e2f60b8df2806e9aa88ae09d9046dae5a4a6a90fd3e91606" +checksum = "4744889ade9d6d503d6a67fc43f52824c2814411e178e4ec57b57a71b3b46700" dependencies = [ "anyhow", - "async-channel 2.5.0", + "async-channel", "async-trait", + "aws-lc-sys 0.30.0", "base64 0.22.1", "bitcoin", "fedimint-core", @@ -1529,7 +1486,7 @@ dependencies = [ "serde_json", "thiserror 2.0.14", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tracing", "url", "webpki-roots 1.0.2", @@ -1538,9 +1495,9 @@ dependencies = [ [[package]] name = "fedimint-bip39" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbe9c8a6619dd553eec45cc52f59993f534dc0afba50b83269a4c745f07d164f" +checksum = "6841e1b02c2164883130cd9981aba9289f4b3d77a3ab27d97eb036cd8bf7f64c" dependencies = [ "bip39", "fedimint-client", @@ -1551,9 +1508,9 @@ dependencies = [ [[package]] name = "fedimint-bitcoind" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad060bc8c49b8a3a3f683dae01269179f18940bf13e8f06afccb0a436a29e82" +checksum = "507261f94f1cd8a6110ec3f9b32adcbce5bd9e7a7e6f7146ef026df74ce3e0a9" dependencies = [ "anyhow", "async-trait", @@ -1566,18 +1523,18 @@ dependencies = [ [[package]] name = "fedimint-build" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f953ec0e651d3b06e6b46edc5512c6ed25990350625f4fa57467dd4410116be6" +checksum = "59994f9b2ad3684b9a965f866bc304a7f9943d168165bb7b9f132fb316b3535b" dependencies = [ "serde_json", ] [[package]] name = "fedimint-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0bcdfe39fbdced53b9fecfe9964ded303fe25d9d89a9f3abcfb1600a51b20c" +checksum = "b848f03710d969d26d323ad3300e05a372fe3c2fba02b825d07a291b8410f49d" dependencies = [ "anyhow", "async-stream", @@ -1592,11 +1549,11 @@ dependencies = [ "fedimint-eventlog", "fedimint-logging", "futures", - "reqwest 0.12.23", + "reqwest", "serde", "serde_json", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "tokio", "tokio-stream", "tracing", @@ -1604,9 +1561,9 @@ dependencies = [ [[package]] name = "fedimint-client-module" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa607edc62d83942a417cb246bcbb4e2694ba2d5854111490f54dce82b5722e" +checksum = "7b9a7e79e185682394a8124a93d85b7f986964f1128f0a08dd4822429f13f641" dependencies = [ "anyhow", "aquamarine", @@ -1622,11 +1579,11 @@ dependencies = [ "futures", "itertools 0.14.0", "rand 0.8.5", - "reqwest 0.12.23", + "reqwest", "serde", "serde_json", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "thiserror 2.0.14", "tokio", "tokio-stream", @@ -1635,20 +1592,20 @@ dependencies = [ [[package]] name = "fedimint-core" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909ea82345f5a17b660ad290f416347955f9981cdb08d3b6e16ca3e0eff5c371" +checksum = "2f5966690cb635004fd2a028595e05d7057b04db6864e077ddef808b9bbc4286" dependencies = [ "anyhow", - "async-channel 2.5.0", + "async-channel", "async-lock", "async-recursion", "async-trait", + "aws-lc-sys 0.30.0", "backon", "backtrace", "base64 0.22.1", "bech32", - "bincode", "bitcoin", "bitcoin-io", "bitcoin-units", @@ -1658,6 +1615,7 @@ dependencies = [ "fedimint-derive", "fedimint-logging", "fedimint-threshold-crypto", + "fedimint-util-error", "futures", "futures-util", "getrandom 0.3.3", @@ -1685,10 +1643,10 @@ dependencies = [ "serdect", "slotmap", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "thiserror 2.0.14", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", "tracing", "url", "wasm-bindgen-futures", @@ -1696,9 +1654,9 @@ dependencies = [ [[package]] name = "fedimint-db-locked" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50dc11505c6cde9fd2774a9d4c97a94516cfefbafc3b0e1ed7364240cd8fd6e" +checksum = "391ae6b3d12c7961bf073fbde06d9c2ca24c4c12b7d3c06892958b0ac7ba7d6c" dependencies = [ "anyhow", "async-trait", @@ -1710,9 +1668,9 @@ dependencies = [ [[package]] name = "fedimint-derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d6762f3a93b5647c3d7afb7f174d8428f319b664206bbe7974f35f25d80585" +checksum = "e91d07de55812c10e83a310db7bb0b5f3d11549df6a96e68e597687a7f0ee717" dependencies = [ "itertools 0.14.0", "proc-macro2", @@ -1722,9 +1680,9 @@ dependencies = [ [[package]] name = "fedimint-derive-secret" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d477a07316ae688ea86e67fdfa19a8b543213df3fc4c2844d8583146c4187c16" +checksum = "295ab09cfddfaf3fe691e5ccea4b90b17a0b58292d8877a8fda24cedc483f4ff" dependencies = [ "anyhow", "bitcoin_hashes 0.14.0", @@ -1736,9 +1694,9 @@ dependencies = [ [[package]] name = "fedimint-eventlog" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "807ca255d51fafa4728fef7b6af9e1c836e50d847742de5a23c3122624332175" +checksum = "e08d518013b334167ea4ea24fbd1dfd13ac4bbd6553cd64743cc32f140dc6e78" dependencies = [ "anyhow", "async-trait", @@ -1754,18 +1712,18 @@ dependencies = [ [[package]] name = "fedimint-hkdf" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583bc09a043e02e69871a80ceb7a18560af4a8596ca13c0bb28cf14ec076cc72" +checksum = "321c9cfaee9dba762cb0b1792ed9b356d23a254d826e3347eb504d064b2807f7" dependencies = [ "bitcoin_hashes 0.14.0", ] [[package]] name = "fedimint-ln-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125976089a8b368548c89cf55705d8bf9e9da7b385c260eefdf47ab8eacc9be6" +checksum = "f2f27e601e06fab0917d3fa41c9f0273880eae27034af966b68114502a875b94" dependencies = [ "anyhow", "aquamarine", @@ -1777,6 +1735,7 @@ dependencies = [ "fedimint-client-module", "fedimint-core", "fedimint-derive-secret", + "fedimint-eventlog", "fedimint-ln-common", "fedimint-logging", "futures", @@ -1784,11 +1743,11 @@ dependencies = [ "lightning-invoice", "lnurl-rs", "rand 0.8.5", - "reqwest 0.12.23", + "reqwest", "serde", "serde_json", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "thiserror 2.0.14", "tokio", "tracing", @@ -1796,9 +1755,9 @@ dependencies = [ [[package]] name = "fedimint-ln-common" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "627281cfc7effdc8753b240e75fd2c04a1994bcbd0363e932e60507036a2eb73" +checksum = "f811a2045546c009bdf75b4291d1f11e6146029c698086941f22b443a87b1a1d" dependencies = [ "anyhow", "bitcoin", @@ -1815,9 +1774,9 @@ dependencies = [ [[package]] name = "fedimint-logging" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096e63c5c5030392be911a7b58b8e90d2f39f3f11d98e9c98305b73e6d3eace3" +checksum = "17e3773f919a88ba2680a0ee9c28185168aea8fd7b5f8287cfa8617dabf24549" dependencies = [ "anyhow", "tracing-subscriber", @@ -1825,9 +1784,9 @@ dependencies = [ [[package]] name = "fedimint-mint-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f68fcef1bed6f55cbccef05da6fa1cb047e9ee52caa33accca423cc964414" +checksum = "a621eb1c761946dee960597a63f013b0ea445445642fab0093e8c8dd72b7e0b2" dependencies = [ "anyhow", "aquamarine", @@ -1855,7 +1814,7 @@ dependencies = [ "serde_json", "serdect", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "thiserror 2.0.14", "tokio", "tracing", @@ -1863,9 +1822,9 @@ dependencies = [ [[package]] name = "fedimint-mint-common" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904f1911be32e6abd4d7508ea0cc1f0a1883751166ec9f70d29de7ecd73de5ef" +checksum = "2455fc36461afaea9e6a177706768e3851d6fe274a296bb3e10bdc02bdc67acf" dependencies = [ "anyhow", "bitcoin_hashes 0.14.0", @@ -1878,9 +1837,9 @@ dependencies = [ [[package]] name = "fedimint-rocksdb" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7326bcc08a675502c862dbc286d0d92153150a3f22df7339ae64ea8f0d036207" +checksum = "8c89b671bf9a82be3d56f5efb1936d7d959fcd9f143515ba074d932c750dfcd3" dependencies = [ "anyhow", "async-trait", @@ -1895,9 +1854,9 @@ dependencies = [ [[package]] name = "fedimint-tbs" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f22d7d30286f37b7be8e11bb01e02601fb5fe230be80926c8e1f85d38b55a0" +checksum = "45d3b5c0f8aef13a9a3554affd253c346f79252db3191a706aeb7adfce71022f" dependencies = [ "bls12_381", "fedimint-core", @@ -1931,11 +1890,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "fedimint-util-error" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301357d5baa8c17884c06b31997d06b89b7768c45a8fa5ab0fdf56d8b37563c4" +dependencies = [ + "anyhow", +] + [[package]] name = "fedimint-wallet-client" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83b24c6bc904b25a8bdcffdd073874afbcc929223d702be90002e72c894329c" +checksum = "05a3a074d6cb292d8341b0ef9f0918f234c96ce366ade5fa7f140bc5b99ab20b" dependencies = [ "anyhow", "aquamarine", @@ -1956,16 +1924,16 @@ dependencies = [ "serde", "serde_json", "strum 0.27.2", - "strum_macros 0.26.4", + "strum_macros 0.27.2", "tokio", "tracing", ] [[package]] name = "fedimint-wallet-common" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d6d06e631717fff821f0b27b3bbf7a9f97faf86f193e384f4fac4229eaae89" +checksum = "edb88c7e8c731f9db4ea09fa8f20a8234245f385cd2b8a4c22537ecefe1510d2" dependencies = [ "anyhow", "bitcoin", @@ -2043,7 +2011,7 @@ dependencies = [ "metrics", "metrics-exporter-prometheus", "rand 0.8.5", - "reqwest 0.12.23", + "reqwest", "serde", "serde_json", "sha2", @@ -2098,10 +2066,16 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8640e34b88f7652208ce9e88b1a37a2ae95227d84abec377ccd3c5cfeb141ed4" dependencies = [ - "rustix", + "rustix 1.0.8", "windows-sys 0.59.0", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -2307,7 +2281,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 1.3.1", + "http", "js-sys", "pin-project", "serde", @@ -2366,25 +2340,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.10.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.12" @@ -2396,7 +2351,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.3.1", + "http", "indexmap 2.10.0", "slab", "tokio", @@ -2603,21 +2558,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad6880c8d4a9ebf39c6e8b77007ce223f646a4d21ce29d99f70cb16420545425" [[package]] -name = "hostname-validator" -version = "1.1.1" +name = "home" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] [[package]] -name = "http" -version = "0.2.12" +name = "hostname-validator" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] +checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" [[package]] name = "http" @@ -2630,17 +2583,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -2648,7 +2590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http", ] [[package]] @@ -2659,8 +2601,8 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -2676,30 +2618,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.10", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.6.0" @@ -2709,9 +2627,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -2721,33 +2639,19 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.32", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.6.0", + "http", + "hyper", "hyper-util", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tower-service", "webpki-roots 1.0.2", ] @@ -2763,9 +2667,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.3.1", - "http-body 1.0.1", - "hyper 1.6.0", + "http", + "http-body", + "hyper", "ipnet", "libc", "percent-encoding", @@ -2917,9 +2821,9 @@ dependencies = [ "attohttpc", "bytes", "futures", - "http 1.3.1", + "http", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "log", "rand 0.9.2", @@ -3108,7 +3012,7 @@ dependencies = [ "futures-util", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "igd-next", "instant", "iroh-base 0.35.0", @@ -3125,9 +3029,9 @@ dependencies = [ "portmapper 0.5.0", "rand 0.8.5", "rcgen", - "reqwest 0.12.23", + "reqwest", "ring", - "rustls 0.23.31", + "rustls", "rustls-webpki 0.102.8", "serde", "smallvec", @@ -3167,7 +3071,7 @@ dependencies = [ "futures-util", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "igd-next", "instant", "iroh-base 0.90.0", @@ -3186,9 +3090,9 @@ dependencies = [ "pkarr", "portmapper 0.6.1", "rand 0.8.5", - "reqwest 0.12.23", + "reqwest", "ring", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "rustls-webpki 0.103.4", "serde", @@ -3295,7 +3199,7 @@ dependencies = [ "iroh-quinn-udp", "pin-project-lite", "rustc-hash 2.1.1", - "rustls 0.23.31", + "rustls", "socket2 0.5.10", "thiserror 2.0.14", "tokio", @@ -3315,7 +3219,7 @@ dependencies = [ "iroh-quinn-udp", "pin-project-lite", "rustc-hash 2.1.1", - "rustls 0.23.31", + "rustls", "socket2 0.5.10", "thiserror 2.0.14", "tokio", @@ -3334,7 +3238,7 @@ dependencies = [ "rand 0.8.5", "ring", "rustc-hash 2.1.1", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.14", @@ -3370,9 +3274,9 @@ dependencies = [ "derive_more", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "iroh-base 0.35.0", "iroh-metrics 0.34.0", @@ -3385,8 +3289,8 @@ dependencies = [ "pkarr", "postcard", "rand 0.8.5", - "reqwest 0.12.23", - "rustls 0.23.31", + "reqwest", + "rustls", "rustls-webpki 0.102.8", "serde", "sha1", @@ -3394,7 +3298,7 @@ dependencies = [ "stun-rs", "thiserror 2.0.14", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-util", "tokio-websockets", "tracing", @@ -3416,9 +3320,9 @@ dependencies = [ "derive_more", "getrandom 0.3.3", "hickory-resolver", - "http 1.3.1", + "http", "http-body-util", - "hyper 1.6.0", + "hyper", "hyper-util", "iroh-base 0.90.0", "iroh-metrics 0.35.0", @@ -3433,8 +3337,8 @@ dependencies = [ "pkarr", "postcard", "rand 0.8.5", - "reqwest 0.12.23", - "rustls 0.23.31", + "reqwest", + "rustls", "rustls-pki-types", "rustls-webpki 0.103.4", "serde", @@ -3442,7 +3346,7 @@ dependencies = [ "snafu", "strum 0.26.3", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-util", "tokio-websockets", "tracing", @@ -3524,15 +3428,15 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http 1.3.1", + "http", "jsonrpsee-core", "pin-project", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "soketto", "thiserror 1.0.69", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-util", "tracing", "url", @@ -3565,7 +3469,7 @@ version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08a8e70baf945b6b5752fc8eb38c918a48f1234daf11355e07106d963f860089" dependencies = [ - "http 1.3.1", + "http", "serde", "serde_json", "thiserror 1.0.69", @@ -3588,7 +3492,7 @@ version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01b3323d890aa384f12148e8d2a1fd18eb66e9e7e825f9de4fa53bcc19b93eef" dependencies = [ - "http 1.3.1", + "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -3604,15 +3508,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -3712,6 +3607,12 @@ dependencies = [ "bitcoin", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -3743,7 +3644,7 @@ dependencies = [ "bitcoin", "cbc", "email_address", - "reqwest 0.12.23", + "reqwest", "serde", "serde_json", "url", @@ -3764,9 +3665,6 @@ name = "log" version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" -dependencies = [ - "value-bag", -] [[package]] name = "loom" @@ -3855,11 +3753,11 @@ dependencies = [ [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -4051,7 +3949,7 @@ dependencies = [ "netlink-packet-route 0.17.1", "netlink-sys", "once_cell", - "system-configuration 0.6.1", + "system-configuration", "windows-sys 0.52.0", ] @@ -4235,12 +4133,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "overload", - "winapi", + "windows-sys 0.60.2", ] [[package]] @@ -4349,12 +4246,6 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "pairing" version = "0.23.0" @@ -4549,17 +4440,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - [[package]] name = "pkarr" version = "3.10.0" @@ -4580,7 +4460,7 @@ dependencies = [ "lru 0.13.0", "mainline", "ntimestamp", - "reqwest 0.12.23", + "reqwest", "self_cell", "serde", "sha1_smol", @@ -4650,20 +4530,6 @@ dependencies = [ "pnet_macros_support", ] -[[package]] -name = "polling" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi 0.5.2", - "pin-project-lite", - "rustix", - "windows-sys 0.60.2", -] - [[package]] name = "poly1305" version = "0.8.0" @@ -4835,6 +4701,16 @@ dependencies = [ "ucd-parse", ] +[[package]] +name = "prettyplease" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" +dependencies = [ + "proc-macro2", + "syn 2.0.104", +] + [[package]] name = "proc-macro-crate" version = "3.3.0" @@ -4925,7 +4801,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", - "rustls 0.23.31", + "rustls", "socket2 0.5.10", "thiserror 2.0.14", "tokio", @@ -4945,7 +4821,7 @@ dependencies = [ "rand 0.9.2", "ring", "rustc-hash 2.1.1", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "slab", "thiserror 2.0.14", @@ -5126,17 +5002,8 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", + "regex-automata", + "regex-syntax", ] [[package]] @@ -5147,7 +5014,7 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] @@ -5156,60 +5023,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.27", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-rustls 0.24.1", - "tokio-socks", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg", -] - [[package]] name = "reqwest" version = "0.12.23" @@ -5221,12 +5040,12 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.6.0", - "hyper-rustls 0.27.7", + "hyper", + "hyper-rustls", "hyper-util", "js-sys", "log", @@ -5234,14 +5053,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.31", + "rustls", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-util", "tower 0.5.2", "tower-http 0.6.6", @@ -5322,27 +5141,28 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.8" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags 2.9.1", "errno", "libc", - "linux-raw-sys", - "windows-sys 0.60.2", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] -name = "rustls" -version = "0.21.12" +name = "rustix" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys 0.9.4", + "windows-sys 0.60.2", ] [[package]] @@ -5351,6 +5171,7 @@ version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -5360,15 +5181,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - [[package]] name = "rustls-pki-types" version = "1.12.0" @@ -5379,16 +5191,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -5406,6 +5208,7 @@ version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -5444,16 +5247,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "secp256k1" version = "0.29.1" @@ -5918,12 +5711,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -5944,17 +5731,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys 0.5.0", -] - [[package]] name = "system-configuration" version = "0.6.1" @@ -5963,17 +5739,7 @@ checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.9.1", "core-foundation", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -6007,7 +5773,7 @@ dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix", + "rustix 1.0.8", "windows-sys 0.59.0", ] @@ -6183,35 +5949,13 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.12", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.31", - "tokio", -] - -[[package]] -name = "tokio-socks" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" -dependencies = [ - "either", - "futures-util", - "thiserror 1.0.69", + "rustls", "tokio", ] @@ -6265,14 +6009,14 @@ dependencies = [ "futures-core", "futures-sink", "getrandom 0.3.3", - "http 1.3.1", + "http", "httparse", "rand 0.9.2", "ring", "rustls-pki-types", "simdutf8", "tokio", - "tokio-rustls 0.26.2", + "tokio-rustls", "tokio-util", ] @@ -6341,7 +6085,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -6357,8 +6101,8 @@ dependencies = [ "base64 0.21.7", "bitflags 2.9.1", "bytes", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", @@ -6376,8 +6120,8 @@ dependencies = [ "bitflags 2.9.1", "bytes", "futures-util", - "http 1.3.1", - "http-body 1.0.1", + "http", + "http-body", "iri-string", "pin-project-lite", "tower 0.5.2", @@ -6475,14 +6219,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "serde", "serde_json", "sharded-slab", @@ -6530,7 +6274,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.3.1", + "http", "httparse", "log", "rand 0.8.5", @@ -6651,12 +6395,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "value-bag" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" - [[package]] name = "vcpkg" version = "0.2.15" @@ -6797,12 +6535,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.11" @@ -6821,6 +6553,18 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + [[package]] name = "widestring" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index 4230bfd..2148a2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,16 +41,16 @@ sha2 = "0.10" async-trait = "0.1" # Fedimint dependencies (core) -fedimint-api-client = "0.8.0" -fedimint-client = "0.8.0" -fedimint-core = "0.8.0" -fedimint-wallet-client = "0.8.0" -fedimint-mint-client = "0.8.0" -fedimint-ln-client = "0.8.0" -fedimint-ln-common = "0.8.0" -fedimint-rocksdb = "0.8.0" -fedimint-bip39 = "0.8.0" -fedimint-derive-secret = "0.8.0" +fedimint-api-client = "0.9.0" +fedimint-client = "0.9.0" +fedimint-core = "0.9.0" +fedimint-wallet-client = "0.9.0" +fedimint-mint-client = "0.9.0" +fedimint-ln-client = "0.9.0" +fedimint-ln-common = "0.9.0" +fedimint-rocksdb = "0.9.0" +fedimint-bip39 = "0.9.0" +fedimint-derive-secret = "0.9.0" # API dependencies (only used by binary) axum = { version = "0.7.1", features = ["json", "ws"], optional = true } diff --git a/flake.lock b/flake.lock index c212e4f..2234506 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1748950236, - "narHash": "sha256-kNiGMrXi5Bq/aWoQmnpK0v+ufQA4FOInhbkY56iUndc=", + "lastModified": 1753275806, + "narHash": "sha256-E+Cu/AFVGwoQo4KPgcWmFS9zU7fJgXoK0o25EP3j48g=", "owner": "rustsec", "repo": "advisory-db", - "rev": "a1f651cba8bf224f52c5d55d8182b3bb0ebce49e", + "rev": "c62e71ad8c5256ffa3cafbb1a8c687db60869e98", "type": "github" }, "original": { @@ -93,23 +93,20 @@ "inputs": { "nix-bundle": "nix-bundle", "nix-utils": "nix-utils", - "nixpkgs": [ - "fedimint", - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1729104746, - "narHash": "sha256-7K+dlB8JPT/HD8wcnbb+BV3kFllnBQ6jpXtJX6wmDPk=", + "lastModified": 1753802540, + "narHash": "sha256-KqG6DtjZK10ZCsnAXou0a6T2CXABfeeRuN8A62o0Ilg=", "owner": "NixOS", "repo": "bundlers", - "rev": "ea1e72ad1dbb0864fd55b3ba52ed166cd190afa2", + "rev": "b0bc45a7626d94b4b3a17f8cc3c95e288625c8db", "type": "github" }, "original": { "owner": "NixOS", "repo": "bundlers", - "rev": "ea1e72ad1dbb0864fd55b3ba52ed166cd190afa2", + "rev": "b0bc45a7626d94b4b3a17f8cc3c95e288625c8db", "type": "github" } }, @@ -273,16 +270,16 @@ "nixpkgs-unstable": "nixpkgs-unstable" }, "locked": { - "lastModified": 1753989530, - "narHash": "sha256-NsaTn6spSRu587ZHsVu1RGXriOdZq9XgXehDHIfqFaY=", + "lastModified": 1761000606, + "narHash": "sha256-VVMi43KmloBkiHaRgFlRKT45qoRB/hCYJJjV1BTSc44=", "owner": "fedimint", "repo": "fedimint", - "rev": "7e586ec8211386a47c4b5ec503e349e831e86132", + "rev": "68b2c9b4a7e0faf123b470446c030459686667b5", "type": "github" }, "original": { "owner": "fedimint", - "ref": "v0.8.0", + "ref": "v0.9.0", "repo": "fedimint", "type": "github" } @@ -320,11 +317,11 @@ "rust-analyzer-src": "rust-analyzer-src_2" }, "locked": { - "lastModified": 1749192146, - "narHash": "sha256-ZEpmRS5m692wzUhRSdBgSojaWR0EU0lqT9x0Bsb+2xY=", + "lastModified": 1757659051, + "narHash": "sha256-pQfaow3cp1YJtV0JZiz8jC4Y8VQjT4CYZ3OAfFe41Zs=", "owner": "nix-community", "repo": "fenix", - "rev": "167c053888748278d52fba3c4bf3b8abaee72929", + "rev": "9479f6dd16e83add0ef0186662d65e7763b37ebe", "type": "github" }, "original": { @@ -580,16 +577,17 @@ "systems": "systems_8" }, "locked": { - "lastModified": 1749519225, + "lastModified": 1755720430, + "narHash": "sha256-oDgZKL9U5RExRgmoTAmy+H+wZaN2/mHBPitT5Hnv1ic=", "owner": "dpc", "repo": "flakebox", - "rev": "f96cbeafded56bc6f5c27fbd96e4fcc78b8a8861", + "rev": "2f15f65d60c198fe49d849d68c2a2c95dc771ae5", "type": "github" }, "original": { "owner": "dpc", "repo": "flakebox", - "rev": "f96cbeafded56bc6f5c27fbd96e4fcc78b8a8861", + "rev": "2f15f65d60c198fe49d849d68c2a2c95dc771ae5", "type": "github" } }, @@ -605,34 +603,39 @@ "systems": "systems_11" }, "locked": { - "lastModified": 1753696332, - "narHash": "sha256-ZnJhdVwp25e8BKivLbNIH6BRanQgnSz5qtVPxVNP01U=", - "owner": "rustshop", + "lastModified": 1755720430, + "narHash": "sha256-oDgZKL9U5RExRgmoTAmy+H+wZaN2/mHBPitT5Hnv1ic=", + "owner": "dpc", "repo": "flakebox", - "rev": "f90159e9c8e28a8a12e8d8673e37e80ef1a10c08", + "rev": "2f15f65d60c198fe49d849d68c2a2c95dc771ae5", "type": "github" }, "original": { - "owner": "rustshop", + "owner": "dpc", "repo": "flakebox", + "rev": "2f15f65d60c198fe49d849d68c2a2c95dc771ae5", "type": "github" } }, "nix-bundle": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "fedimint", + "bundlers", + "nixpkgs" + ], "utils": "utils" }, "locked": { "lastModified": 1729095141, "narHash": "sha256-2AXV3I8D/I3UkQY797j/fSKrIwbUpTVZ82s2O/ErtVM=", - "owner": "matthewbauer", + "owner": "nix-community", "repo": "nix-bundle", "rev": "4f6330b20767744a4c28788e3cdb05e02d096cd8", "type": "github" }, "original": { - "owner": "matthewbauer", + "owner": "nix-community", "repo": "nix-bundle", "type": "github" } @@ -640,14 +643,14 @@ "nix-utils": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1632973430, - "narHash": "sha256-9G8zo+0nfYAALV5umCyQR/2hVUFNH10JropBkyxZGGw=", + "lastModified": 1744222205, + "narHash": "sha256-di1eNHQdpvvyXv6i7Z+S79KF7cQyhTs7AdFHp7q1e3Q=", "owner": "juliosueiras-nix", "repo": "nix-utils", - "rev": "b44e1ffd726aa03056db9df469efb497d8b9871b", + "rev": "53282197ad090c8cf47c96e99bf6c6c3b2cdc7c0", "type": "github" }, "original": { @@ -658,27 +661,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1728492678, - "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", - "owner": "NixOS", + "lastModified": 1629252929, + "narHash": "sha256-Aj20gmGBs8TG7pyaQqgbsqAQ6cB+TVuL18Pk3DPBxcQ=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "rev": "3788c68def67ca7949e0864c27638d484389363d", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "nixos", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1753694789, + "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", "type": "github" }, "original": { @@ -690,15 +692,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1629252929, - "narHash": "sha256-Aj20gmGBs8TG7pyaQqgbsqAQ6cB+TVuL18Pk3DPBxcQ=", - "owner": "nixos", + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "3788c68def67ca7949e0864c27638d484389363d", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -721,10 +724,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1750622754, + "lastModified": 1758589230, + "narHash": "sha256-zMTCFGe8aVGTEr2RqUi/QzC1nOIQ0N1HRsbqB4f646k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", + "rev": "d1d883129b193f0b495d75c148c2c3a7d95789a0", "type": "github" }, "original": { @@ -736,16 +740,16 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1751274312, - "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -778,11 +782,11 @@ "rust-analyzer-src_2": { "flake": false, "locked": { - "lastModified": 1749133384, - "narHash": "sha256-nKbHae8x2v2IMg1Rd3e5OrRPk5lxAqcvPkIM3fYtB90=", + "lastModified": 1757362324, + "narHash": "sha256-/PAhxheUq4WBrW5i/JHzcCqK5fGWwLKdH6/Lu1tyS18=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "d5665e5ca79135a753f853b5a0e2f33f8f263a0b", + "rev": "9edc9cbe5d8e832b5864e09854fa94861697d2fd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 194d5da..96d049c 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,16 @@ description = "A fedimint client daemon for server side applications to hold, use, and manage Bitcoin and ecash"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flakebox = { - url = "github:rustshop/flakebox"; + url = "github:dpc/flakebox/2f15f65d60c198fe49d849d68c2a2c95dc771ae5"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils.url = "github:numtide/flake-utils"; - fedimint.url = "github:fedimint/fedimint?ref=v0.8.0"; + fedimint.url = "github:fedimint/fedimint?ref=v0.9.0"; }; outputs = @@ -43,22 +43,22 @@ "Cargo.lock" ".cargo" "src" + "tests" ]; }; # Build configuration commonArgs = { - buildInputs = - [ - # System libraries needed for dependencies - pkgs.zstd - pkgs.openssl - pkgs.protobuf - ] - # Add clang/llvm for cross-compilation support - ++ lib.optionals (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) [ - pkgs.llvmPackages.clang - ]; + buildInputs = [ + # System libraries needed for dependencies + pkgs.zstd + pkgs.openssl + pkgs.protobuf + ] + # Add clang/llvm for cross-compilation support + ++ lib.optionals (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) [ + pkgs.llvmPackages.clang + ]; nativeBuildInputs = [ pkgs.pkg-config pkgs.cmake @@ -79,8 +79,9 @@ "rust-analyzer" "rust-src" ]; - # Use stable Rust channel + # Use stable Rust channel with explicit version for Rust 1.88+ (required for if-let chains) channel = "stable"; + version = "1.91.0"; }; toolchainsStd = flakeboxLib.mkStdFenixToolchains toolchainArgs; @@ -120,6 +121,7 @@ (craneLib'.overrideArgs { pname = "fmcd"; src = rustSrc; + cargoLock = ./Cargo.lock; }).overrideArgs commonArgs; in diff --git a/scripts/mprocs-nix-gateway.sh b/scripts/mprocs-nix-gateway.sh deleted file mode 100755 index 8ed4743..0000000 --- a/scripts/mprocs-nix-gateway.sh +++ /dev/null @@ -1,21 +0,0 @@ -# shellcheck shell=bash - -set -eo pipefail - -eval "$(devimint env)" - -echo Waiting for devimint to start up fedimint and gateway - -STATUS="$(devimint wait)" -if [ "$STATUS" = "ERROR" ] -then - echo "fedimint didn't start correctly" - echo "See other panes for errors" - exit 1 -fi - -# Conigure UI env from devimint env -export REACT_APP_FM_GATEWAY_API=$FM_GATEWAY_API_ADDR -export REACT_APP_FM_GATEWAY_PASSWORD=$FM_GATEWAY_PASSWORD - -yarn dev:gateway-ui From 24026a5665dca0ab2a599295290bc01b9cea3cf6 Mon Sep 17 00:00:00 2001 From: okjodom Date: Sun, 9 Nov 2025 07:09:40 +0300 Subject: [PATCH 2/3] feat: implement autoselect from v0.9.0 --- Cargo.lock | 27 +++------ flake.lock | 43 +++++++++++++- flake.nix | 12 +++- src/bin/main.rs | 3 + src/core/mod.rs | 147 ++++++++++++++++++++++++++++++++++++++---------- 5 files changed, 178 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69ed047..d9704f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -500,7 +500,7 @@ dependencies = [ "bitflags 2.9.1", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.10.5", "lazy_static", "lazycell", "log", @@ -523,7 +523,7 @@ dependencies = [ "bitflags 2.9.1", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "proc-macro2", "quote", "regex", @@ -541,7 +541,7 @@ dependencies = [ "bitflags 2.9.1", "cexpr", "clang-sys", - "itertools 0.13.0", + "itertools 0.10.5", "log", "prettyplease", "proc-macro2", @@ -2674,7 +2674,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.0", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -2692,7 +2692,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core 0.59.0", ] [[package]] @@ -3374,15 +3374,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -3533,7 +3524,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.3", + "windows-targets 0.48.5", ] [[package]] @@ -5253,7 +5244,7 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ - "bitcoin_hashes 0.14.0", + "bitcoin_hashes 0.13.0", "rand 0.8.5", "secp256k1-sys", "serde", @@ -5522,7 +5513,7 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1961e2ef424c1424204d3a5d6975f934f56b6d50ff5732382d84ebf460e147f7" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.104", @@ -6593,7 +6584,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/flake.lock b/flake.lock index 2234506..a00d2ce 100644 --- a/flake.lock +++ b/flake.lock @@ -333,11 +333,32 @@ "fenix_3": { "inputs": { "nixpkgs": [ - "flakebox", "nixpkgs" ], "rust-analyzer-src": "rust-analyzer-src_3" }, + "locked": { + "lastModified": 1762584108, + "narHash": "sha256-wZUW7dlXMXaRdvNbaADqhF8gg9bAfFiMV+iyFQiDv+Y=", + "owner": "nix-community", + "repo": "fenix", + "rev": "32f3ad3b6c690061173e1ac16708874975ec6056", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_4": { + "inputs": { + "nixpkgs": [ + "flakebox", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src_4" + }, "locked": { "lastModified": 1749451322, "owner": "nix-community", @@ -595,7 +616,7 @@ "inputs": { "android-nixpkgs": "android-nixpkgs_3", "crane": "crane_3", - "fenix": "fenix_3", + "fenix": "fenix_4", "flake-utils": "flake-utils_10", "nixpkgs": [ "nixpkgs" @@ -757,6 +778,7 @@ "root": { "inputs": { "fedimint": "fedimint", + "fenix": "fenix_3", "flake-utils": "flake-utils_8", "flakebox": "flakebox_3", "nixpkgs": "nixpkgs_5" @@ -797,6 +819,23 @@ } }, "rust-analyzer-src_3": { + "flake": false, + "locked": { + "lastModified": 1762438844, + "narHash": "sha256-ApIKJf6CcMsV2nYBXhGF95BmZMO/QXPhgfSnkA/rVUo=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "4bf516ee5a960c1e2eee9fedd9b1c9e976a19c86", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_4": { "flake": false, "locked": { "lastModified": 1749419176, diff --git a/flake.nix b/flake.nix index 96d049c..4690bd9 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,11 @@ flake-utils.url = "github:numtide/flake-utils"; fedimint.url = "github:fedimint/fedimint?ref=v0.9.0"; + + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -21,6 +26,7 @@ flakebox, flake-utils, fedimint, + fenix, }: flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] ( system: @@ -79,9 +85,9 @@ "rust-analyzer" "rust-src" ]; - # Use stable Rust channel with explicit version for Rust 1.88+ (required for if-let chains) - channel = "stable"; - version = "1.91.0"; + # Use latest stable Rust channel + # fedimint v0.9.0 requires Rust >= 1.83 for stabilized if-let-guard + channel = "latest"; }; toolchainsStd = flakeboxLib.mkStdFenixToolchains toolchainArgs; diff --git a/src/bin/main.rs b/src/bin/main.rs index b9e8417..d0bd2b7 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -105,6 +105,9 @@ async fn main() -> Result<()> { tracing::info!("Starting FMCD with structured logging and observability"); + // Initialize crypto provider (required for v0.9.0) + fedimint_core::rustls::install_crypto_provider().await; + // Ensure data directory exists std::fs::create_dir_all(&cli.data_dir)?; diff --git a/src/core/mod.rs b/src/core/mod.rs index 206d15a..2873e5e 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -54,25 +54,39 @@ pub trait PaymentInfoResolver: Send + Sync { } /// Invoice creation request with essential fields +/// +/// The `gateway_id` field is optional. If not provided, the system will +/// automatically select the best available gateway using Fedimint's +/// `select_available_gateway()` API, which filters out offline gateways, +/// prioritizes vetted gateways, and selects the lowest-fee gateway. If +/// `gateway_id` is provided, the specific gateway will be used. #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LnInvoiceRequest { pub amount_msat: Amount, pub description: String, pub expiry_time: Option, - pub gateway_id: PublicKey, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gateway_id: Option, pub federation_id: FederationId, pub metadata: Option, } /// Lightning payment request +/// +/// The `gateway_id` field is optional. If not provided, the system will +/// automatically select the best available gateway using Fedimint's +/// `select_available_gateway()` API, which filters out offline gateways, +/// prioritizes vetted gateways, and selects the lowest-fee gateway. If +/// `gateway_id` is provided, the specific gateway will be used. #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct LnPayRequest { pub payment_info: String, pub amount_msat: Option, pub lnurl_comment: Option, - pub gateway_id: PublicKey, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub gateway_id: Option, pub federation_id: FederationId, } @@ -471,6 +485,15 @@ impl FmcdCore { } /// Create a lightning invoice + /// + /// This method creates a lightning invoice for the specified federation. + /// Gateway selection behavior: + /// - If `req.gateway_id` is provided, that specific gateway will be used + /// - If `req.gateway_id` is None, automatically selects the best available + /// gateway using Fedimint's `select_available_gateway()` API, which: + /// - Filters out offline gateways via health checks + /// - Prioritizes vetted gateways + /// - Selects the lowest-fee gateway among available options pub async fn create_invoice( &self, req: LnInvoiceRequest, @@ -495,20 +518,43 @@ impl FmcdCore { ) })?; - let gateway = lightning_module - .select_gateway(&req.gateway_id) - .await - .ok_or_else(|| { - error!( - gateway_id = %req.gateway_id, - federation_id = %req.federation_id, - "Failed to select gateway - gateway may be offline or not registered" - ); - AppError::new( - axum::http::StatusCode::BAD_REQUEST, - anyhow!("Failed to select gateway with ID {}. Gateway may be offline or not registered with this federation.", req.gateway_id), - ) - })?; + // Select gateway: use provided gateway_id or auto-select the best available + let gateway = match &req.gateway_id { + Some(gateway_id) => { + // Explicit gateway selection + lightning_module + .select_gateway(gateway_id) + .await + .ok_or_else(|| { + error!( + gateway_id = %gateway_id, + federation_id = %req.federation_id, + "Failed to select gateway - gateway may be offline or not registered" + ); + AppError::new( + axum::http::StatusCode::BAD_REQUEST, + anyhow!("Failed to select gateway with ID {}. Gateway may be offline or not registered with this federation.", gateway_id), + ) + })? + } + None => { + // Auto-select best available gateway (filters offline, prioritizes vetted, + // selects lowest fee) + lightning_module + .select_available_gateway() + .await + .ok_or_else(|| { + error!( + federation_id = %req.federation_id, + "No available gateways found for invoice creation" + ); + AppError::new( + axum::http::StatusCode::SERVICE_UNAVAILABLE, + anyhow!("No available gateways found. Please ensure at least one gateway is online and registered with this federation."), + ) + })? + } + }; info!( gateway_id = %gateway.gateway_id, @@ -975,6 +1021,14 @@ impl FmcdCore { } /// Pay a lightning invoice + /// + /// Gateway selection behavior: + /// - If `req.gateway_id` is provided, that specific gateway will be used + /// - If `req.gateway_id` is None, automatically selects the best available + /// gateway using Fedimint's `select_available_gateway()` API, which: + /// - Filters out offline gateways via health checks + /// - Prioritizes vetted gateways + /// - Selects the lowest-fee gateway among available options pub async fn pay_invoice( &self, req: LnPayRequest, @@ -984,6 +1038,15 @@ impl FmcdCore { } /// Pay a lightning invoice with optional payment info resolver + /// + /// The resolver is used to handle non-Bolt11 payment info (e.g., LNURL). + /// Gateway selection behavior: + /// - If `req.gateway_id` is provided, that specific gateway will be used + /// - If `req.gateway_id` is None, automatically selects the best available + /// gateway using Fedimint's `select_available_gateway()` API, which: + /// - Filters out offline gateways via health checks + /// - Prioritizes vetted gateways + /// - Selects the lowest-fee gateway among available options pub async fn pay_invoice_with_resolver( &self, mut req: LnPayRequest, @@ -1069,21 +1132,43 @@ impl FmcdCore { .with_context(context.clone()) })?; - // Select gateway - let gateway = lightning_module - .select_gateway(&req.gateway_id) - .await - .ok_or_else(|| { - let error_msg = format!("Gateway {} not available", req.gateway_id); - error!( - gateway_id = %req.gateway_id, - payment_id = %payment_tracker.payment_id(), - "Gateway not available" - ); - // Note: Can't update tracker in non-async error closure - AppError::with_category(ErrorCategory::GatewayError, error_msg) - .with_context(context.clone()) - })?; + // Select gateway: use provided gateway_id or auto-select the best available + let gateway = match &req.gateway_id { + Some(gateway_id) => { + // Explicit gateway selection + lightning_module + .select_gateway(gateway_id) + .await + .ok_or_else(|| { + let error_msg = format!("Gateway {} not available", gateway_id); + error!( + gateway_id = %gateway_id, + payment_id = %payment_tracker.payment_id(), + "Gateway not available" + ); + // Note: Can't update tracker in non-async error closure + AppError::with_category(ErrorCategory::GatewayError, error_msg) + .with_context(context.clone()) + })? + } + None => { + // Auto-select best available gateway (filters offline, prioritizes vetted, + // selects lowest fee) + lightning_module + .select_available_gateway() + .await + .ok_or_else(|| { + let error_msg = "No available gateways found".to_string(); + error!( + payment_id = %payment_tracker.payment_id(), + "No available gateways found for payment" + ); + // Note: Can't update tracker in non-async error closure + AppError::with_category(ErrorCategory::GatewayError, error_msg) + .with_context(context.clone()) + })? + } + }; // Create outgoing payment let OutgoingLightningPayment { From b017a3f86741d0bdd57933c0263380b8c08b0c8a Mon Sep 17 00:00:00 2001 From: okjodom Date: Sun, 9 Nov 2025 08:50:49 +0300 Subject: [PATCH 3/3] chore: v0.9.0 migration plan --- V0.9.0_MIGRATION_PLAN.md | 232 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 V0.9.0_MIGRATION_PLAN.md diff --git a/V0.9.0_MIGRATION_PLAN.md b/V0.9.0_MIGRATION_PLAN.md new file mode 100644 index 0000000..9f4b985 --- /dev/null +++ b/V0.9.0_MIGRATION_PLAN.md @@ -0,0 +1,232 @@ +# Fedimint v0.9.0 Migration Plan for fmcd + +## Executive Summary +This document outlines the migration plan for fmcd to fully leverage Fedimint v0.9.0 features. The codebase has already been updated to use v0.9.0 dependencies and implements gateway auto-selection, but several important features remain to be implemented. + +## Current Implementation Status + +### ✅ Completed +- **Dependencies**: All Fedimint crates updated to v0.9.0 +- **Gateway Auto-Selection**: Implemented in commit 1066e18 + - Invoice creation and payment support optional `gateway_id` + - Auto-selects best available gateway when not specified +- **LNURL Support**: Full implementation with Lightning Address support +- **Core Architecture**: Restructured as dual library/binary crate +- **Crypto Provider Initialization**: Implemented in `src/bin/main.rs:109` + - Required for v0.9.0 TLS connections + - Calls `fedimint_core::rustls::install_crypto_provider().await` + +### ❌ Not Yet Implemented +- Client RPC interface +- Enhanced gateway monitoring +- Event log trimming +- Config backup/recovery features +- Network performance optimizations + +## Priority Implementation Tasks + +### 🔴 Priority 1: Critical Breaking Changes (Immediate) + +#### 1.1 Crypto Provider Initialization ✅ COMPLETED +**Status**: ✅ IMPLEMENTED (2025-11-09) +**Urgency**: CRITICAL - Application won't work without this + +**Implementation**: +```rust +// In src/bin/main.rs:109 +fedimint_core::rustls::install_crypto_provider().await; +``` + +**Files modified**: +- ✅ `/home/okj/minmoto/fmcd/src/bin/main.rs` (line 109) +- ✅ `/home/okj/minmoto/fmcd/flake.nix` (updated to Rust 1.91.0+ for v0.9.0 compatibility) + +**Testing**: +- [ ] Verify TLS connections work in production +- [ ] Test federation joins with v0.9.0 +- [ ] Test gateway communications + +**Notes**: +- Function is async, requires `.await` +- Must be called before any TLS operations +- Nix flake updated to use latest stable Rust (required for fedimint v0.9.0 if-let-guard feature) + +--- + +### 🟡 Priority 2: Major Features (This Week) + +#### 2.1 Client RPC Interface +**Status**: NOT IMPLEMENTED +**Complexity**: High +**Time Estimate**: 2-3 days + +**Implementation Steps**: +1. Create new module: `src/api/rpc/mod.rs` +2. Implement JSON-RPC 2.0 server using existing core methods +3. Add RPC-specific types and error handling +4. Expose endpoints: + - Federation management (join, leave, list) + - Lightning operations (invoice, pay, list) + - Mint operations (issue, spend, balance) + - On-chain operations (deposit, withdraw) + +**Files to create**: +- `/home/okj/minmoto/fmcd/src/api/rpc/mod.rs` +- `/home/okj/minmoto/fmcd/src/api/rpc/handlers.rs` +- `/home/okj/minmoto/fmcd/src/api/rpc/types.rs` + +**Dependencies to add**: +```toml +jsonrpsee = { version = "0.20", features = ["server", "macros"] } +``` +--- + +### 🟢 Priority 3: Enhancements (Next Sprint) + +#### 3.1 Trimable Event Log +**Status**: NOT IMPLEMENTED +**Complexity**: Medium +**Time Estimate**: 1 day + +**Implementation Steps**: +1. Add configuration for max log size/age +2. Implement log rotation mechanism +3. Add trim operation to EventBus +4. Schedule periodic trim tasks + +**Files to modify**: +- `/home/okj/minmoto/fmcd/src/events/mod.rs` +- `/home/okj/minmoto/fmcd/src/config.rs` + +#### 3.2 Config Backup and Recovery +**Status**: NOT IMPLEMENTED +**Complexity**: Medium +**Time Estimate**: 1-2 days + +**Implementation Steps**: +1. Add backup endpoint to admin API +2. Implement config export/import functions +3. Add encryption for sensitive data +4. Support dynamic config switching + +**Files to modify**: +- `/home/okj/minmoto/fmcd/src/api/rest/admin/mod.rs` +- `/home/okj/minmoto/fmcd/src/config.rs` + +#### 3.3 Network Performance Optimizations +**Status**: NOT IMPLEMENTED +**Complexity**: Low-Medium +**Time Estimate**: 1 day + +**Implementation Steps**: +1. Implement connection pooling for WebSocket +2. Add Iroh connection reuse +3. Add configuration for DHT disable +4. Monitor and log connection types + +**Files to modify**: +- `/home/okj/minmoto/fmcd/src/core/multimint.rs` +- Network client initialization code + +--- + +## Implementation Schedule + +### Week 1 (Immediate) +- [x] Day 1: Crypto provider initialization (1 hour) ✅ COMPLETED 2025-11-09 +- [ ] Day 1-3: Client RPC interface implementation + +### Week 2 +- [ ] Day 1-2: Event log trimming +- [ ] Day 3-4: Config backup/recovery +- [ ] Day 5: Network optimizations + +### Week 3 +- [ ] Testing and bug fixes +- [ ] Documentation updates +- [ ] Performance benchmarking + +## Testing Strategy + +### Unit Tests +- Test crypto provider initialization +- Test RPC endpoint handlers +- Test gateway selection with new metrics +- Test event log trimming logic + +### Integration Tests +- Test full RPC workflow +- Test gateway failover scenarios +- Test config backup/restore +- Test connection reuse + +### Performance Tests +- Benchmark RPC vs REST API +- Measure connection reuse benefits +- Test event log performance with trimming + +## Migration Risks and Mitigations + +### Risk 1: Crypto Provider Breaking Change ✅ MITIGATED +**Impact**: HIGH - Application won't start +**Mitigation**: ✅ Implemented on 2025-11-09, requires production testing + +### Risk 2: RPC Interface Compatibility +**Impact**: MEDIUM - External integrations may break +**Mitigation**: Maintain REST API, document RPC differences + +### Risk 3: Gateway Selection Changes +**Impact**: LOW - Already implemented +**Mitigation**: Monitor gateway selection behavior + +## Success Criteria + +1. **Functional**: + - All v0.9.0 critical features implemented + - No regression in existing functionality + - All tests passing + +2. **Performance**: + - Connection establishment 20% faster + - Gateway selection < 100ms + - Event processing maintains < 10ms latency + +3. **Reliability**: + - Zero downtime during migration + - Graceful handling of gateway failures + - Successful config backup/restore + +## Documentation Updates Required + +1. Update README with v0.9.0 features +2. Document RPC API endpoints +3. Add gateway configuration guide +4. Update deployment documentation + +## Next Steps + +1. ~~**Immediate Action**: Implement crypto provider initialization~~ ✅ COMPLETED +2. **This Week**: Start RPC interface development +3. **Testing**: Production testing of crypto provider initialization +4. **Testing**: Set up v0.9.0 test environment +5. **Communication**: Update team on migration progress + +--- + +## Appendix: v0.9.0 Feature Reference + +### Complete v0.9.0 Feature List (from changelog) +- ✅ Gateway auto-selection +- ✅ Reduced default gateway fees +- ❌ Client RPC interface +- ❌ Config backup download +- ❌ Trimable event log +- ❌ Online e-cash validation +- ❌ WebSocket connection reuse +- ❌ Iroh connection optimizations +- ❌ DHT disable option + +### Breaking Changes Checklist +- [x] Crypto provider initialization ✅ COMPLETED 2025-11-09 +- [x] Gateway selection API changes (backward compatible) +- [x] Fee structure updates (handled by federation)