diff --git a/Cargo.lock b/Cargo.lock index 77a4ea3d2..9372ff02b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,15 +17,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array", -] - [[package]] name = "aead" version = "0.5.2" @@ -36,18 +27,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug", -] - [[package]] name = "aes" version = "0.8.4" @@ -55,22 +34,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr", - "ghash", - "subtle", + "cipher", + "cpufeatures 0.2.17", ] [[package]] @@ -215,9 +180,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -231,25 +196,25 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.117", + "synstructure", ] [[package]] name = "asn1-rs-impl" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] @@ -286,15 +251,10 @@ dependencies = [ ] [[package]] -name = "atty" -version = "0.2.14" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -304,26 +264,23 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.6.20" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ - "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", "http", "http-body", - "hyper", + "http-body-util", "itoa", "matchit", "memchr", "mime", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", + "serde_core", "sync_wrapper", "tower", "tower-layer", @@ -332,17 +289,18 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ - "async-trait", "bytes", - "futures-util", + "futures-core", "http", "http-body", + "http-body-util", "mime", - "rustversion", + "pin-project-lite", + "sync_wrapper", "tower-layer", "tower-service", ] @@ -368,8 +326,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f" dependencies = [ - "bitcoin-internals 0.3.0", - "bitcoin_hashes 0.14.1", + "bitcoin-internals", + "bitcoin_hashes", ] [[package]] @@ -415,18 +373,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bech32" -version = "0.10.0-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea" - [[package]] name = "bech32" version = "0.11.1" @@ -439,9 +385,9 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90dbd31c98227229239363921e60fcf5e558e43ec69094d46fc4996f08d1d5bc" dependencies = [ - "bitcoin_hashes 0.14.1", - "rand", - "rand_core", + "bitcoin_hashes", + "rand 0.8.6", + "rand_core 0.6.4", "serde", "unicode-normalization", ] @@ -452,21 +398,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitcoin" -version = "0.31.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69197dee21fe23b45f5239bf88086efaa0cb8679f3e704906eb818e8ea169c14" -dependencies = [ - "bech32 0.10.0-beta", - "bitcoin-internals 0.2.1", - "bitcoin_hashes 0.13.1", - "hex-conservative 0.1.2", - "hex_lit", - "secp256k1 0.28.2", - "serde", -] - [[package]] name = "bitcoin" version = "0.32.9" @@ -475,15 +406,15 @@ checksum = "9cf93e61f2dbc3e3c41234ca26a65e2c0b0975c52e0f069ab9893ebbede584d3" dependencies = [ "base58ck", "base64 0.21.7", - "bech32 0.11.1", - "bitcoin-internals 0.3.0", + "bech32", + "bitcoin-internals", "bitcoin-io", "bitcoin-units", - "bitcoin_hashes 0.14.1", + "bitcoin_hashes", "bitcoinconsensus", - "hex-conservative 0.2.2", + "hex-conservative", "hex_lit", - "secp256k1 0.29.1", + "secp256k1", "serde", ] @@ -498,15 +429,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "bitcoin-internals" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "994dc6fcc13751c85370b7de118e672b193b9b65167bf09e258f124c97fb9685" -dependencies = [ - "serde", -] - [[package]] name = "bitcoin-internals" version = "0.3.0" @@ -528,7 +450,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6386f1296021ac5d1a5ed9869595940fa7696dfe868198b1b71ec2c82db59343" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", "hex", "log", ] @@ -539,17 +461,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346568ebaab2918487cea76dd55dae13c27bb618cdb737c952e69eb2017c4118" dependencies = [ - "bitcoin-internals 0.3.0", - "serde", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446819536d8121575eeb7e89efdbadb3f055e87e4bb66c6679a6d5cc2f4b64fd" -dependencies = [ - "hex-conservative 0.1.2", + "bitcoin-internals", "serde", ] @@ -560,7 +472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26ec84b80c482df901772e931a9a681e26a1b9ee2302edeff23cb30328745c8b" dependencies = [ "bitcoin-io", - "hex-conservative 0.2.2", + "hex-conservative", "serde", ] @@ -707,7 +619,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -739,8 +651,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.4.4", - "cpufeatures", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", ] [[package]] @@ -749,9 +672,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", - "chacha20", - "cipher 0.4.4", + "aead", + "chacha20 0.9.1", + "cipher", "poly1305", "zeroize", ] @@ -776,15 +699,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa622bd314835eb026b776af471344d0dba94705c937900656a31d0407e53689" -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" @@ -849,30 +763,33 @@ dependencies = [ [[package]] name = "cln-grpc" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a50be955808d07d6f33f05bb11ce5a3875d92b4d1fff5623f9458feb5164c" +checksum = "69b7edcedcc92344cac1aa910cfff455ca818168b5bf9175f3a7b8b0d3a20dfc" dependencies = [ "anyhow", - "bitcoin 0.31.3", + "bitcoin", + "cfg-if", "cln-rpc", "futures-core", "hex", "log", "prost", "serde", + "serde_json", "tokio", "tokio-stream", "tokio-util", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", ] [[package]] name = "cln-plugin" -version = "0.1.9" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b096d2f2a7c58c6faaff1b64281a4c30ff078ec3ca746975fb76ac1a6d6e1f" +checksum = "b9a4bb9c7335040d49c51900305b91155303539e9f54839bb194e915277bf882" dependencies = [ "anyhow", "bytes", @@ -889,12 +806,12 @@ dependencies = [ [[package]] name = "cln-rpc" -version = "0.4.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4436e58f1fccb1faf69df9ac436ae9304b5c200c7d92e6c4229826bdd0a8d0d" +checksum = "5d9f5e26f0a2713ea1393eb3117c148295fa4c5f7db529713b20323ca7cc37aa" dependencies = [ "anyhow", - "bitcoin 0.31.3", + "bitcoin", "bytes", "futures-util", "hex", @@ -926,16 +843,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -951,6 +858,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -1000,7 +916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "typenum", ] @@ -1014,15 +930,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "ctr" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" -dependencies = [ - "cipher 0.3.0", -] - [[package]] name = "ctrlc" version = "3.5.2" @@ -1086,9 +993,9 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" dependencies = [ "asn1-rs", "displaydoc", @@ -1194,15 +1101,6 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "env_filter" version = "1.0.1" @@ -1213,26 +1111,13 @@ dependencies = [ "regex", ] -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ - "humantime 2.3.0", + "humantime", "is-terminal", "log", "regex", @@ -1292,9 +1177,9 @@ checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" -version = "0.4.2" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "float-cmp" @@ -1474,8 +1359,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1485,20 +1372,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", + "rand_core 0.10.1", "wasip2", "wasip3", -] - -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug", - "polyval", + "wasm-bindgen", ] [[package]] @@ -1530,12 +1410,11 @@ dependencies = [ name = "gl-client" version = "0.6.0" dependencies = [ - "aes 0.8.4", + "aes", "anyhow", - "async-stream", "async-trait", - "base64 0.21.7", - "bech32 0.9.1", + "base64 0.22.1", + "bech32", "bytes", "cbc", "chacha20poly1305", @@ -1545,22 +1424,22 @@ dependencies = [ "hex", "http", "http-body", + "http-body-util", "log", "mockall", "picky", - "picky-asn1-der 0.4.1", - "picky-asn1-x509 0.15.4", + "picky-asn1-x509", "pin-project", "prost", "prost-derive", "psbt-v2", - "rand", + "rand 0.8.6", "rcgen", "reqwest", - "ring 0.16.20", + "ring", "runeauth", - "rustls-pemfile 1.0.4", - "secp256k1 0.26.0", + "rustls-pemfile", + "secp256k1", "serde", "serde_json", "sha256", @@ -1570,10 +1449,10 @@ dependencies = [ "tokio", "tokio-stream", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tower", "url", - "uuid", "vls-core", "vls-persist", "vls-protocol", @@ -1587,7 +1466,7 @@ version = "0.3.0" dependencies = [ "anyhow", "bytes", - "env_logger 0.10.2", + "env_logger 0.11.10", "gl-client", "hex", "log", @@ -1609,7 +1488,7 @@ dependencies = [ "bip39", "gl-client", "hex", - "rand", + "rand 0.8.6", "runeauth", "tokio", ] @@ -1620,23 +1499,22 @@ version = "0.3.1" dependencies = [ "anyhow", "async-stream", - "base64 0.21.7", + "base64 0.22.1", "bytes", "clightningrpc", "cln-grpc", "cln-plugin", "cln-rpc", - "env_logger 0.7.1", "futures", "gl-client", "gl-util", "governor", "hex", - "hyper", + "http", + "http-body-util", "lazy_static", "linemux", "log", - "nix", "prost", "serde", "serde_json", @@ -1646,7 +1524,8 @@ dependencies = [ "tokio-stream", "tokio-util", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tower", "vls-protocol", ] @@ -1657,7 +1536,7 @@ version = "0.4.0" dependencies = [ "anyhow", "bip39", - "bitcoin 0.32.9", + "bitcoin", "gl-client", "hex", "lightning-invoice", @@ -1710,13 +1589,15 @@ version = "0.3.1" dependencies = [ "anyhow", "byteorder", - "env_logger 0.10.2", + "env_logger 0.11.10", + "hyper-util", "libc", "log", "prost", "tokio", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tower", "which", ] @@ -1766,29 +1647,23 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.27" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", - "indexmap 2.14.0", + "indexmap", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.13.2" @@ -1819,15 +1694,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.5.2" @@ -1840,12 +1706,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-conservative" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" - [[package]] name = "hex-conservative" version = "0.2.2" @@ -1872,23 +1732,34 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", - "fnv", "itoa", ] [[package]] name = "http-body" -version = "0.4.6" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" dependencies = [ "bytes", + "futures-core", "http", + "http-body", "pin-project-lite", ] @@ -1904,15 +1775,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - [[package]] name = "humantime" version = "2.3.0" @@ -1921,14 +1783,14 @@ checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hyper" -version = "0.14.32" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" dependencies = [ + "atomic-waker", "bytes", "futures-channel", "futures-core", - "futures-util", "h2", "http", "http-body", @@ -1936,37 +1798,61 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.10", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "futures-util", "http", "hyper", - "rustls 0.21.12", + "hyper-util", + "rustls", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "tower-service", + "webpki-roots", ] [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", "hyper", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", + "socket2", "tokio", - "tokio-io-timeout", + "tower-service", + "tracing", ] [[package]] @@ -2108,16 +1994,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.14.0" @@ -2187,7 +2063,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ - "hermit-abi 0.5.2", + "hermit-abi", "libc", "windows-sys 0.61.2", ] @@ -2264,7 +2140,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" dependencies = [ - "cpufeatures", + "cpufeatures 0.2.17", ] [[package]] @@ -2293,7 +2169,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.9.8", + "spin", ] [[package]] @@ -2339,8 +2215,8 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ffe63f56b10d214be1ade8698ee80af82d981237cae3e581e7a631f5f4959f3" dependencies = [ - "bech32 0.11.1", - "bitcoin 0.32.9", + "bech32", + "bitcoin", "dnssec-prover", "hashbrown 0.13.2", "libm", @@ -2356,8 +2232,8 @@ version = "0.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11209f386879b97198b2bfc9e9c1e5d42870825c6bd4376f17f95357244d6600" dependencies = [ - "bech32 0.11.1", - "bitcoin 0.32.9", + "bech32", + "bitcoin", "lightning-types", ] @@ -2367,7 +2243,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2cd84d4e71472035903e43caded8ecc123066ce466329ccd5ae537a8d5488c7" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", ] [[package]] @@ -2415,6 +2291,12 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "matchers" version = "0.2.0" @@ -2426,9 +2308,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" @@ -2463,8 +2345,8 @@ version = "12.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8343cc1ef1408bd9bdbf69f7aef47017dfab7e6349ec26fddf62e0e9fb5a4cf" dependencies = [ - "bech32 0.11.1", - "bitcoin 0.32.9", + "bech32", + "bitcoin", ] [[package]] @@ -2678,7 +2560,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.6", "serde", "smallvec", "zeroize", @@ -2755,9 +2637,9 @@ dependencies = [ [[package]] name = "oid-registry" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ "asn1-rs", ] @@ -2845,15 +2727,6 @@ dependencies = [ "regex", ] -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "pem" version = "3.0.6" @@ -2872,12 +2745,13 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.6.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", - "indexmap 2.14.0", + "hashbrown 0.15.5", + "indexmap", ] [[package]] @@ -2886,19 +2760,16 @@ version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6b25b296bb2a45678748f61c51f5a548ea56b25b0ad4966183709b386eaecf" dependencies = [ - "aes-gcm", "base64 0.13.1", "digest 0.9.0", - "http", "num-bigint-dig", "oid", - "picky-asn1 0.3.3", - "picky-asn1-der 0.2.5", - "picky-asn1-x509 0.6.2", - "rand", + "picky-asn1", + "picky-asn1-der", + "picky-asn1-x509", + "rand 0.8.6", "rsa", "serde", - "serde_json", "sha-1", "sha2 0.9.9", "sha3", @@ -2916,57 +2787,13 @@ dependencies = [ "serde_bytes", ] -[[package]] -name = "picky-asn1" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295eea0f33c16be21e2a98b908fdd4d73c04dd48c8480991b76dbcf0cb58b212" -dependencies = [ - "oid", - "serde", - "serde_bytes", -] - -[[package]] -name = "picky-asn1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff038f9360b934342fb3c0a1d6e82c438a2624b51c3c6e3e6d7cf252b6f3ee3" -dependencies = [ - "oid", - "serde", - "serde_bytes", -] - [[package]] name = "picky-asn1-der" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbbd5390ab967396cc7473e6e0848684aec7166e657c6088604e07b54a73dbe" dependencies = [ - "picky-asn1 0.3.3", - "serde", - "serde_bytes", -] - -[[package]] -name = "picky-asn1-der" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" -dependencies = [ - "picky-asn1 0.8.0", - "serde", - "serde_bytes", -] - -[[package]] -name = "picky-asn1-der" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d413165e4bf7f808b9a27cbaba657657a2921f0965db833f488c4d4be96dcd2e" -dependencies = [ - "picky-asn1 0.10.1", + "picky-asn1", "serde", "serde_bytes", ] @@ -2980,21 +2807,8 @@ dependencies = [ "base64 0.13.1", "num-bigint-dig", "oid", - "picky-asn1 0.3.3", - "picky-asn1-der 0.2.5", - "serde", -] - -[[package]] -name = "picky-asn1-x509" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d4117bd1b1dc5646359ee7243c50c5000c0920ea2d1fb120335a2f4c684b8" -dependencies = [ - "base64 0.22.1", - "oid", - "picky-asn1 0.10.1", - "picky-asn1-der 0.5.6", + "picky-asn1", + "picky-asn1-der", "serde", ] @@ -3036,21 +2850,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cpufeatures", + "cpufeatures 0.2.17", "opaque-debug", - "universal-hash 0.5.1", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash 0.4.0", + "universal-hash", ] [[package]] @@ -3152,9 +2954,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", @@ -3162,20 +2964,20 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.6" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" dependencies = [ - "bytes", "heck", "itertools 0.12.1", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", "syn 2.0.117", "tempfile", @@ -3183,9 +2985,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", "itertools 0.12.1", @@ -3196,9 +2998,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.6" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" dependencies = [ "prost", ] @@ -3209,10 +3011,30 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e075616cae99e29d70960a6374c2757dff4dd6b646dd0398ce1012666231c7aa" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", "miniscript", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags 2.11.1", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab1ad36992cead65f02aa399a373a42730922f1525d988172634fdefdecb8a60" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "pyo3" version = "0.18.3" @@ -3275,10 +3097,60 @@ dependencies = [ ] [[package]] -name = "quick-error" -version = "1.2.3" +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83" +dependencies = [ + "bytes", + "getrandom 0.4.2", + "lru-slab", + "rand 0.10.2", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] [[package]] name = "quote" @@ -3303,7 +3175,18 @@ checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20 0.10.2", + "getrandom 0.4.2", + "rand_core 0.10.1", ] [[package]] @@ -3313,7 +3196,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -3325,14 +3208,30 @@ dependencies = [ "getrandom 0.2.17", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "rcgen" -version = "0.10.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" dependencies = [ - "pem 1.1.1", - "ring 0.16.20", + "pem 3.0.6", + "ring", + "rustls-pki-types", "time", "x509-parser", "yasna", @@ -3398,58 +3297,40 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", - "encoding_rs", "futures-core", - "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", - "ipnet", + "hyper-util", "js-sys", "log", - "mime", - "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "quinn", + "rustls", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", ] [[package]] @@ -3462,7 +3343,7 @@ dependencies = [ "cfg-if", "getrandom 0.2.17", "libc", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -3480,7 +3361,7 @@ dependencies = [ "num-iter", "num-traits", "pem 0.8.3", - "rand", + "rand 0.8.6", "simple_asn1", "subtle", "zeroize", @@ -3497,7 +3378,7 @@ dependencies = [ "crypto", "env_logger 0.10.2", "hex", - "indexmap 2.14.0", + "indexmap", "sha2 0.10.9", "thiserror 1.0.69", ] @@ -3551,39 +3432,19 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "6725596c3f2c3a0aef021139e145d4eafe314a6623e4680ca83852b2c67ab2ba" dependencies = [ "log", - "ring 0.17.14", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring 0.17.14", + "once_cell", + "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "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-pemfile" version = "2.2.0" @@ -3599,28 +3460,19 @@ version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ + "web-time", "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.103.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" dependencies = [ - "ring 0.17.14", - "untrusted 0.9.0", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring 0.17.14", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -3670,66 +3522,18 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.14", - "untrusted 0.9.0", -] - -[[package]] -name = "secp256k1" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" -dependencies = [ - "secp256k1-sys 0.8.2", -] - -[[package]] -name = "secp256k1" -version = "0.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" -dependencies = [ - "bitcoin_hashes 0.13.1", - "secp256k1-sys 0.9.2", - "serde", -] - [[package]] name = "secp256k1" version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ - "bitcoin_hashes 0.14.1", - "rand", - "secp256k1-sys 0.10.1", + "bitcoin_hashes", + "rand 0.8.6", + "secp256k1-sys", "serde", ] -[[package]] -name = "secp256k1-sys" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4473013577ec77b4ee3668179ef1186df3146e2cf2d927bd200974c6fe60fd99" -dependencies = [ - "cc", -] - -[[package]] -name = "secp256k1-sys" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" -dependencies = [ - "cc", -] - [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -3765,7 +3569,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8db02c046447759ef62beeede660c4b7abae023a961bd5a8935aa7d4207edd1a" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", "bitcoin-consensus-derive", "chunked-buffer", "hex", @@ -3862,7 +3666,7 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.9.0", "opaque-debug", ] @@ -3875,7 +3679,7 @@ checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.9.0", "opaque-debug", ] @@ -3887,7 +3691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest 0.10.7", ] @@ -3947,7 +3751,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -4002,16 +3806,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.3" @@ -4022,12 +3816,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -4092,20 +3880,11 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "synstructure" -version = "0.12.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", + "futures-core", ] [[package]] @@ -4119,27 +3898,6 @@ dependencies = [ "syn 2.0.117", ] -[[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", -] - -[[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", -] - [[package]] name = "target-lexicon" version = "0.12.16" @@ -4300,21 +4058,11 @@ dependencies = [ "parking_lot 0.12.5", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.3", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.7.0" @@ -4328,22 +4076,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "b0c85f2c3ef0b1cd58b36682f4b17aaa995f0e5db534d85692b4903abce21f67" dependencies = [ - "rustls 0.21.12", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", + "rustls", "tokio", ] @@ -4383,27 +4120,27 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost", - "rustls-pemfile 2.2.0", - "rustls-pki-types", + "socket2", + "sync_wrapper", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls", "tokio-stream", "tower", "tower-layer", @@ -4413,30 +4150,55 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" dependencies = [ "prettyplease", "proc-macro2", "prost-build", + "prost-types", "quote", "syn 2.0.117", + "tempfile", + "tonic-build", ] [[package]] name = "tower" -version = "0.4.13" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", - "indexmap 1.9.3", - "pin-project", + "indexmap", "pin-project-lite", - "rand", "slab", + "sync_wrapper", "tokio", "tokio-util", "tower-layer", @@ -4444,6 +4206,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.11.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -4530,7 +4310,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a947ef834df674b09aa786d18133904e9b388b8e7b29eb565a505aa949078a" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", "bytes", "log", "serde", @@ -4543,6 +4323,12 @@ version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + [[package]] name = "unicode-ident" version = "1.0.24" @@ -4608,7 +4394,7 @@ dependencies = [ "glob", "goblin", "heck", - "indexmap 2.14.0", + "indexmap", "once_cell", "serde", "tempfile", @@ -4650,7 +4436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09acd2ce09c777dd65ee97c251d33c8a972afc04873f1e3b21eb3492ade16933" dependencies = [ "anyhow", - "indexmap 2.14.0", + "indexmap", "proc-macro2", "quote", "syn 2.0.117", @@ -4693,7 +4479,7 @@ checksum = "dd76b3ac8a2d964ca9fce7df21c755afb4c77b054a85ad7a029ad179cc5abb8a" dependencies = [ "anyhow", "heck", - "indexmap 2.14.0", + "indexmap", "tempfile", "uniffi_internal_macros", ] @@ -4716,16 +4502,6 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c" -[[package]] -name = "universal-hash" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" -dependencies = [ - "generic-array", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -4736,12 +4512,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -4772,17 +4542,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" -dependencies = [ - "js-sys", - "serde_core", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.1" @@ -4801,7 +4560,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7a66fafe84eddfc3e6bd6ea189211668500b726be9111e66261cf6a4332c25" dependencies = [ - "bitcoin 0.32.9", + "bitcoin", "hex", ] @@ -4814,7 +4573,7 @@ dependencies = [ "ahash", "anyhow", "backtrace", - "bitcoin 0.32.9", + "bitcoin", "bitcoin-consensus-derive", "bitcoin-push-decoder", "bolt-derive", @@ -5007,7 +4766,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.14.0", + "indexmap", "wasm-encoder", "wasmparser", ] @@ -5020,7 +4779,7 @@ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags 2.11.1", "hashbrown 0.15.5", - "indexmap 2.14.0", + "indexmap", "semver", ] @@ -5034,11 +4793,24 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki-roots" -version = "0.25.4" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "weedle2" @@ -5317,16 +5089,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen" version = "0.51.0" @@ -5361,7 +5123,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck", - "indexmap 2.14.0", + "indexmap", "prettyplease", "syn 2.0.117", "wasm-metadata", @@ -5392,7 +5154,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags 2.11.1", - "indexmap 2.14.0", + "indexmap", "log", "serde", "serde_derive", @@ -5411,7 +5173,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.14.0", + "indexmap", "log", "semver", "serde", @@ -5439,7 +5201,7 @@ dependencies = [ "der", "hex", "pem 3.0.6", - "ring 0.17.14", + "ring", "signature", "spki", "thiserror 1.0.69", @@ -5448,18 +5210,17 @@ dependencies = [ [[package]] name = "x509-parser" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" dependencies = [ "asn1-rs", - "base64 0.13.1", "data-encoding", "der-parser", "lazy_static", "nom", "oid-registry", - "ring 0.16.20", + "ring", "rusticata-macros", "thiserror 1.0.69", "time", @@ -5494,7 +5255,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.117", - "synstructure 0.13.2", + "synstructure", ] [[package]] @@ -5535,7 +5296,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.117", - "synstructure 0.13.2", + "synstructure", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 5aef094ee..4f8357623 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,11 +27,14 @@ members = [ [workspace.dependencies] anyhow = "1" -env_logger = "0.10" -cln-grpc = "0.4" -cln-rpc = "0.4" -cln-plugin = "0.4" -tonic = "0.11" +env_logger = "0.11" +hex = "0.4" +log = "0.4" +once_cell = "1" +cln-grpc = "0.7" +cln-rpc = "0.7" +cln-plugin = "0.7" +tonic = { version = "0.14", features = ["tls-ring", "transport"] } vls-core = "^0.14" vls-persist = "^0.14" diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml index 88a9128f4..be2c0d67b 100644 --- a/examples/rust/Cargo.toml +++ b/examples/rust/Cargo.toml @@ -8,7 +8,7 @@ gl-client = { path = "../../libs/gl-client" } rand = "0.8" bip39 = { version = "2", features = ["rand_core"] } tokio = { version = "1.29.1", features = ["rt", "macros"] } -hex = "0.4.3" +hex = { workspace = true } runeauth = "0.1" anyhow.workspace = true diff --git a/libs/gl-cli/Cargo.toml b/libs/gl-cli/Cargo.toml index df9c2ff9f..0d7f00173 100644 --- a/libs/gl-cli/Cargo.toml +++ b/libs/gl-cli/Cargo.toml @@ -27,7 +27,7 @@ dirs = "6.0" env_logger = "0.11" futures = "0.3" gl-client = { version = "0.6", path = "../gl-client", features = ["backup"] } -hex = "0.4" +hex = { workspace = true } serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2.0.11" diff --git a/libs/gl-cli/src/json_hex.rs b/libs/gl-cli/src/json_hex.rs index 0360ca019..356aa713e 100644 --- a/libs/gl-cli/src/json_hex.rs +++ b/libs/gl-cli/src/json_hex.rs @@ -22,9 +22,7 @@ impl ToJsonHex for cln::GetinfoResponse { "lightning_dir": self.lightning_dir.clone(), "fees_collected_msat": self.fees_collected_msat.clone().map_or(0, |amt| amt.msat), }); - if let Some(alias) = &self.alias { - j["alias"] = json!(alias); - } + j["alias"] = json!(&self.alias); if let Some(feat) = &self.our_features { j["our_features"] = json!({ "init": hex::encode(&feat.init), @@ -51,9 +49,7 @@ impl ToJsonHex for cln::InvoiceResponse { "payment_secret": hex::encode(&self.payment_secret), "expires_at": self.expires_at, }); - if let Some(x) = self.created_index { - j["created_index"] = json!(x); - } + j["created_index"] = json!(self.created_index); if let Some(x) = &self.warning_capacity { j["warning_capacity"] = json!(x); } @@ -189,11 +185,11 @@ impl ToJsonHex for cln::CloseResponse { let mut j = json!({ "item_type": self.item_type, }); - if let Some(x) = &self.tx { - j["tx"] = json!(hex::encode(x)); + if !self.txs.is_empty() { + j["txs"] = json!(self.txs.iter().map(hex::encode).collect::>()); } - if let Some(x) = &self.txid { - j["txid"] = json!(hex::encode(x)); + if !self.txids.is_empty() { + j["txids"] = json!(self.txids.iter().map(hex::encode).collect::>()); } j @@ -263,9 +259,7 @@ impl ToJsonHex for cln::ListfundsChannels { "connected": self.connected, "state": self.state, }); - if let Some(x) = &self.channel_id { - j["channel_id"] = json!(hex::encode(x)); - } + j["channel_id"] = json!(hex::encode(&self.channel_id)); if let Some(x) = &self.short_channel_id { j["short_channel_id"] = json!(x); } diff --git a/libs/gl-client-py/Cargo.toml b/libs/gl-client-py/Cargo.toml index 11776bb44..edfb83ac7 100644 --- a/libs/gl-client-py/Cargo.toml +++ b/libs/gl-client-py/Cargo.toml @@ -18,10 +18,10 @@ env_logger = { workspace = true } gl-client = { path = "../gl-client", default-features = false, features = [ "export", ] } -hex = "*" -log = "*" -once_cell = "*" -prost = "0.12" +hex = { workspace = true } +log = { workspace = true } +once_cell = { workspace = true } +prost = "0.14" pyo3 = { version = "0.18", features = [ "extension-module", "serde", @@ -29,7 +29,7 @@ pyo3 = { version = "0.18", features = [ ] } runeauth = "0.1" tokio = { version = "1", features = ["full"] } -tonic = { version = "0.11", features = ["tls", "transport"] } +tonic = { version = "0.14", features = ["tls-ring", "transport"] } serde_json = "^1.0" thiserror = "1" diff --git a/libs/gl-client-py/Makefile b/libs/gl-client-py/Makefile index d277e1e71..37af36578 100644 --- a/libs/gl-client-py/Makefile +++ b/libs/gl-client-py/Makefile @@ -19,7 +19,7 @@ PROTODIR=${REPO}/libs/proto # pyproject.toml. PROTOC_TOOLCHAIN = \ uv run --no-project \ - --with grpcio-tools==1.78.0 \ + --with grpcio-tools==1.81.1 \ --with mypy-protobuf==5.0.0 \ python -m grpc_tools.protoc diff --git a/libs/gl-client-py/glclient/greenlight_pb2.py b/libs/gl-client-py/glclient/greenlight_pb2.py index d729b43ed..750d2c0ec 100644 --- a/libs/gl-client-py/glclient/greenlight_pb2.py +++ b/libs/gl-client-py/glclient/greenlight_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: glclient/greenlight.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 6.33.5 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 31, - 1, + 33, + 5, '', 'glclient/greenlight.proto' ) diff --git a/libs/gl-client-py/glclient/greenlight_pb2_grpc.py b/libs/gl-client-py/glclient/greenlight_pb2_grpc.py index b95e8c9e0..d1d0917af 100644 --- a/libs/gl-client-py/glclient/greenlight_pb2_grpc.py +++ b/libs/gl-client-py/glclient/greenlight_pb2_grpc.py @@ -5,7 +5,7 @@ from glclient import greenlight_pb2 as glclient_dot_greenlight__pb2 -GRPC_GENERATED_VERSION = '1.78.0' +GRPC_GENERATED_VERSION = '1.81.1' GRPC_VERSION = grpc.__version__ _version_not_supported = False @@ -25,7 +25,7 @@ ) -class NodeStub(object): +class NodeStub: """The node service represents your node running on greenlight's infrastructure. You can use the exposed RPC methods to interact with your node. The URI used to connect to the node depends on @@ -96,7 +96,7 @@ def __init__(self, channel): _registered_method=True) -class NodeServicer(object): +class NodeServicer: """The node service represents your node running on greenlight's infrastructure. You can use the exposed RPC methods to interact with your node. The URI used to connect to the node depends on @@ -258,7 +258,7 @@ def add_NodeServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class Node(object): +class Node: """The node service represents your node running on greenlight's infrastructure. You can use the exposed RPC methods to interact with your node. The URI used to connect to the node depends on @@ -520,7 +520,7 @@ def TrampolinePay(request, _registered_method=True) -class HsmStub(object): +class HsmStub: """Missing associated documentation comment in .proto file.""" def __init__(self, channel): @@ -541,7 +541,7 @@ def __init__(self, channel): _registered_method=True) -class HsmServicer(object): +class HsmServicer: """Missing associated documentation comment in .proto file.""" def Request(self, request, context): @@ -577,7 +577,7 @@ def add_HsmServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class Hsm(object): +class Hsm: """Missing associated documentation comment in .proto file.""" @staticmethod diff --git a/libs/gl-client-py/glclient/scheduler_pb2.py b/libs/gl-client-py/glclient/scheduler_pb2.py index e2280a7b8..72c25774e 100644 --- a/libs/gl-client-py/glclient/scheduler_pb2.py +++ b/libs/gl-client-py/glclient/scheduler_pb2.py @@ -2,7 +2,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: glclient/scheduler.proto -# Protobuf Python Version: 6.31.1 +# Protobuf Python Version: 6.33.5 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -12,8 +12,8 @@ _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 6, - 31, - 1, + 33, + 5, '', 'glclient/scheduler.proto' ) diff --git a/libs/gl-client-py/glclient/scheduler_pb2_grpc.py b/libs/gl-client-py/glclient/scheduler_pb2_grpc.py index 48a0f2f12..938c2ea77 100644 --- a/libs/gl-client-py/glclient/scheduler_pb2_grpc.py +++ b/libs/gl-client-py/glclient/scheduler_pb2_grpc.py @@ -6,7 +6,7 @@ from glclient import greenlight_pb2 as glclient_dot_greenlight__pb2 from glclient import scheduler_pb2 as glclient_dot_scheduler__pb2 -GRPC_GENERATED_VERSION = '1.78.0' +GRPC_GENERATED_VERSION = '1.81.1' GRPC_VERSION = grpc.__version__ _version_not_supported = False @@ -26,7 +26,7 @@ ) -class SchedulerStub(object): +class SchedulerStub: """The scheduler service is the endpoint which allows users to register a new node with greenlight, recover access to an existing node if the owner lost its credentials, schedule the node to be run @@ -142,7 +142,7 @@ def __init__(self, channel): _registered_method=True) -class SchedulerServicer(object): +class SchedulerServicer: """The scheduler service is the endpoint which allows users to register a new node with greenlight, recover access to an existing node if the owner lost its credentials, schedule the node to be run @@ -468,7 +468,7 @@ def add_SchedulerServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class Scheduler(object): +class Scheduler: """The scheduler service is the endpoint which allows users to register a new node with greenlight, recover access to an existing node if the owner lost its credentials, schedule the node to be run @@ -885,7 +885,7 @@ def SignerRequestsStream(request_iterator, _registered_method=True) -class DebugStub(object): +class DebugStub: """A service to collect debugging information from clients. """ @@ -902,7 +902,7 @@ def __init__(self, channel): _registered_method=True) -class DebugServicer(object): +class DebugServicer: """A service to collect debugging information from clients. """ @@ -935,7 +935,7 @@ def add_DebugServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class Debug(object): +class Debug: """A service to collect debugging information from clients. """ @@ -967,7 +967,7 @@ def ReportSignerRejection(request, _registered_method=True) -class PairingStub(object): +class PairingStub: """A service to pair signer-less clients with an existing signer. """ @@ -994,7 +994,7 @@ def __init__(self, channel): _registered_method=True) -class PairingServicer(object): +class PairingServicer: """A service to pair signer-less clients with an existing signer. """ @@ -1051,7 +1051,7 @@ def add_PairingServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class Pairing(object): +class Pairing: """A service to pair signer-less clients with an existing signer. """ diff --git a/libs/gl-client-py/pyproject.toml b/libs/gl-client-py/pyproject.toml index ac67a08f3..33dbb9b82 100644 --- a/libs/gl-client-py/pyproject.toml +++ b/libs/gl-client-py/pyproject.toml @@ -4,8 +4,12 @@ version = "0.3.4" description = "" readme = "README.md" requires-python = ">=3.8,<4" +# The checked-in stubs assert protobuf >= 6.33.5 and grpcio >= 1.81.1 at +# import time; bump these together with the regenerated protos and the +# grpcio-tools pin in Makefile's PROTOC_TOOLCHAIN. dependencies = [ - "protobuf>=6,<7", + "protobuf>=6.33.5,<7", + "grpcio>=1.81.1", "pyln-grpc-proto>=0.1", ] authors = [ @@ -22,12 +26,12 @@ module-name = "glclient" [dependency-groups] dev = [ "gl-testing", - "grpcio>=1.67", + "grpcio>=1.81.1", "maturin>=1", "mypy>=1.14.1", "mypy-protobuf>=3.6.0", "patchelf>=0.17.2.2", - "protobuf>=6,<7", + "protobuf>=6.33.5,<7", "pyln-grpc-proto>=0.1.2", "python-kacl>=0.6.7", "types-protobuf>=5.29.1.20241207", diff --git a/libs/gl-client/Cargo.toml b/libs/gl-client/Cargo.toml index ecfd2a876..a37449ace 100644 --- a/libs/gl-client/Cargo.toml +++ b/libs/gl-client/Cargo.toml @@ -19,23 +19,28 @@ experimental-splicing = [] [dependencies] aes = "0.8" -anyhow = "1.0.82" -async-stream = "0.3.5" -base64 = "^0.21" -bech32 = "0.9.1" +anyhow = { workspace = true } +base64 = "0.22" +bech32 = "0.11" cbc = { version = "0.1", features = ["alloc"] } bytes = "1.2.1" chrono = "0.4.31" -hex = "0.4.3" -http = "0.2" -http-body = "^0.4" -log = "^0.4" -picky = "6" -picky-asn1-x509 = "0.15" -picky-asn1-der = "0.4" +hex = { workspace = true } +http = "1" +http-body = "1" +http-body-util = "0.1" +log = { workspace = true } +# Only the x509 bits are used (Pem, Csr). The default features also pull in +# jose and picky's http_trait_impl, the latter dragging http 0.2 into a tree +# that is otherwise entirely on http 1. +picky = { version = "6", default-features = false, features = ["x509"] } +# Must track the version picky itself uses, otherwise the whole picky-asn1 +# stack gets compiled two extra times just to bridge between the majors. +picky-asn1-x509 = "0.6" pin-project = "1.1.5" -prost = "0.12" -prost-derive = "0.12" +prost = "0.14" +tonic-prost = "0.14" +prost-derive = "0.14" psbt-v2 = { version = "0.3.0", default-features = false, features = ["std"] } # `rustls-tls-webpki-roots` compiles Mozilla's CA bundle into the # binary. Identical TLS behaviour on every platform — Android, iOS, @@ -50,22 +55,21 @@ psbt-v2 = { version = "0.3.0", default-features = false, features = ["std"] } # either webpki-roots (CA updates follow OS) or native-roots (no # discovery breakage). Requires reqwest >= 0.12, which we don't have # on this 0.11 line. -reqwest = { version = "^0.11", features = [ +reqwest = { version = "^0.12", features = [ "json", "rustls-tls-webpki-roots", ], default-features = false } -ring = "~0.16.20" +ring = "0.17" runeauth = "0.1" -rustls-pemfile = "1.0.4" -sha256 = "1.5.0" +rustls-pemfile = "2.0.0" tokio = { version = "1", features = ["full"] } tokio-stream = "0.1" -tonic = { workspace = true, features = ["tls", "transport"] } -tower = { version = "0.4" } +tonic = { workspace = true } +tower = { version = "0.5" } tempfile = "3.10.1" url = "2.5.0" serde = { version = "1", features = ["derive"] } -rcgen = { version = "0.10.0", features = ["pem", "x509-parser"] } +rcgen = { version = "0.13.0", features = ["pem", "x509-parser"] } vls-core = { workspace = true } vls-persist = { workspace = true } vls-protocol-signer = { workspace = true } @@ -74,15 +78,18 @@ serde_json = "^1.0" thiserror = "1" cln-grpc = { workspace = true } chacha20poly1305 = { version = "0.10.1", optional = true } -uuid = { version = "1.8.0", features = ["serde"] } -secp256k1 = { version = "0.26.0", optional = true } +secp256k1 = { version = "0.29", optional = true } +sha256 = "1.5.0" mockall = "0.11.4" -futures = "0.3.30" async-trait = "0.1.80" rand = "0.8.5" time = { version = "0.3", features = ["macros"] } x509-certificate = "0.23.1" +[dev-dependencies] +# Only used from #[cfg(test)] code. +futures = "0.3.30" + [build-dependencies] -tonic-build = "0.11" +tonic-prost-build = "0.14" serde = { version = "1", features = ["derive"] } diff --git a/libs/gl-client/build.rs b/libs/gl-client/build.rs index 12fa073e0..6f5fd9d3b 100644 --- a/libs/gl-client/build.rs +++ b/libs/gl-client/build.rs @@ -61,12 +61,12 @@ fn main() { println!("cargo:rerun-if-env-changed=GL_CUSTOM_NOBODY_CERT"); println!("cargo:rerun-if-env-changed=GL_CUSTOM_NOBODY_KEY"); - let builder = tonic_build::configure(); + let builder = tonic_prost_build::configure(); builder .type_attribute(".", "#[derive(serde::Serialize,serde::Deserialize)]") .protoc_arg("--experimental_allow_proto3_optional") - .compile( + .compile_protos( &[ ".resources/proto/glclient/greenlight.proto", ".resources/proto/glclient/scheduler.proto", diff --git a/libs/gl-client/src/lnurl/pay/mod.rs b/libs/gl-client/src/lnurl/pay/mod.rs index 8ece34da4..d83621047 100644 --- a/libs/gl-client/src/lnurl/pay/mod.rs +++ b/libs/gl-client/src/lnurl/pay/mod.rs @@ -357,7 +357,13 @@ mod tests { let lnurl = "LNURL1111111111111111111111111111111111111111111111111111111111111111111"; let result = resolve_lnurl_to_invoice(&mock_http_client, lnurl, 100000, None).await; - assert!(result.unwrap_err().to_string().contains("Failed to decode lnurl: invalid length")); + // Assert on our own wrapper text rather than bech32's wording, which + // changes between releases (0.9 said "invalid length", 0.11 reports a + // checksum failure for this input). + assert!(result + .unwrap_err() + .to_string() + .contains("Failed to decode lnurl")); } #[tokio::test] diff --git a/libs/gl-client/src/lnurl/utils.rs b/libs/gl-client/src/lnurl/utils.rs index 744b6949e..a4fb295d3 100644 --- a/libs/gl-client/src/lnurl/utils.rs +++ b/libs/gl-client/src/lnurl/utils.rs @@ -1,19 +1,16 @@ use std::str::FromStr; use anyhow::{anyhow, Result}; -use bech32::{FromBase32, ToBase32}; +use bech32::Hrp; use crate::lightning_invoice::Bolt11Invoice; /// Decode an LNURL bech32 string into the underlying URL (LUD-01). pub fn parse_lnurl(lnurl: &str) -> Result { - let (_hrp, data, _variant) = + let (_hrp, data) = bech32::decode(lnurl).map_err(|e| anyhow!("Failed to decode lnurl: {}", e))?; - let vec = Vec::::from_base32(&data) - .map_err(|e| anyhow!("Failed to base32 decode data: {}", e))?; - - let url = String::from_utf8(vec).map_err(|e| anyhow!("Failed to convert to utf-8: {}", e))?; + let url = String::from_utf8(data).map_err(|e| anyhow!("Failed to convert to utf-8: {}", e))?; Ok(url) } @@ -21,8 +18,8 @@ pub fn parse_lnurl(lnurl: &str) -> Result { /// /// Returns uppercase by convention (for QR code compatibility). pub fn lnurl_encode(url: &str) -> Result { - let data = url.as_bytes().to_base32(); - bech32::encode("lnurl", data, bech32::Variant::Bech32) + let hrp = Hrp::parse("lnurl").map_err(|e| anyhow!("Failed to parse hrp: {}", e))?; + bech32::encode::(hrp, url.as_bytes()) .map(|s| s.to_uppercase()) .map_err(|e| anyhow!("Failed to encode lnurl: {}", e)) } diff --git a/libs/gl-client/src/node/generic.rs b/libs/gl-client/src/node/generic.rs index 4dd8bf6ed..940b5d70b 100644 --- a/libs/gl-client/src/node/generic.rs +++ b/libs/gl-client/src/node/generic.rs @@ -30,7 +30,7 @@ pub struct GenericClient { impl GenericClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::ResponseBody: http_body::Body + Send + 'static, T::Error: Into, T::ResponseBody: Body + Send + 'static, @@ -69,7 +69,7 @@ where pub fn max_decoding_message_size(mut self, limit: usize) -> Self where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, { self.inner = self.inner.max_decoding_message_size(limit); self diff --git a/libs/gl-client/src/node/mod.rs b/libs/gl-client/src/node/mod.rs index 24cb05241..1a71e3bbd 100644 --- a/libs/gl-client/src/node/mod.rs +++ b/libs/gl-client/src/node/mod.rs @@ -170,14 +170,13 @@ pub use generic::GenericClient; mod stasher { use bytes::Bytes; - use http::HeaderMap; - use http_body::Body; + use http_body::{Body, Frame}; use pin_project::pin_project; use std::{ pin::Pin, task::{Context, Poll}, }; - use tonic::body::BoxBody; + use tonic::body::Body as TonicBody; use tonic::Status; #[pin_project] @@ -200,24 +199,17 @@ mod stasher { self.value.is_none() } - fn poll_data( + fn poll_frame( self: Pin<&mut Self>, _cx: &mut Context<'_>, - ) -> Poll>> { - Poll::Ready(self.project().value.take().map(Ok)) - } - - fn poll_trailers( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll, Status>> { - Poll::Ready(Ok(None)) + ) -> Poll, Self::Error>>> { + Poll::Ready(self.project().value.take().map(|v| Ok(Frame::data(v)))) } } - impl From for BoxBody { - fn from(v: StashBody) -> BoxBody { - BoxBody::new(v) + impl From for TonicBody { + fn from(v: StashBody) -> TonicBody { + TonicBody::new(v) } } } diff --git a/libs/gl-client/src/node/service.rs b/libs/gl-client/src/node/service.rs index 3243cb232..e57b1eed1 100644 --- a/libs/gl-client/src/node/service.rs +++ b/libs/gl-client/src/node/service.rs @@ -5,8 +5,7 @@ use rustls_pemfile as pemfile; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; -use tonic::body::BoxBody; -use tonic::transport::Body; +use tonic::body::Body; use tonic::transport::Channel; use tower::{Layer, Service}; @@ -27,19 +26,23 @@ impl AuthLayer { // when we need it. let key = { let mut key = std::io::Cursor::new(&pem[..]); - match pemfile::pkcs8_private_keys(&mut key) { - Ok(v) => v, - Err(e) => { - return Err(anyhow!( - "Could not decode PEM string into PKCS#8 format: {}", - e - )) - } - } - .remove(0) + let der = pemfile::pkcs8_private_keys(&mut key) + .next() + .ok_or_else(|| { + anyhow!("Could not decode PEM string into PKCS#8 format: no key found") + })? + .map_err(|e| { + anyhow!("Could not decode PEM string into PKCS#8 format: {}", e) + })?; + der.secret_pkcs8_der().to_vec() }; - match EcdsaKeyPair::from_pkcs8(&signature::ECDSA_P256_SHA256_FIXED_SIGNING, key.as_ref()) { + let rng = rand::SystemRandom::new(); + match EcdsaKeyPair::from_pkcs8( + &signature::ECDSA_P256_SHA256_FIXED_SIGNING, + key.as_ref(), + &rng, + ) { Ok(_) => trace!("Successfully decoded keypair from PEM string"), Err(e) => return Err(anyhow!("Could not decide keypair from PEM string: {}", e)), }; @@ -67,7 +70,7 @@ pub struct AuthService { inner: Channel, rune: String, } -impl Service> for AuthService { +impl Service> for AuthService { type Response = Response; type Error = Box; #[allow(clippy::type_complexity)] @@ -76,7 +79,7 @@ impl Service> for AuthService { fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { self.inner.poll_ready(cx).map_err(Into::into) } - fn call(&mut self, request: Request) -> Self::Future { + fn call(&mut self, request: Request) -> Self::Future { use base64::Engine; let engine = base64::engine::general_purpose::STANDARD_NO_PAD; @@ -86,9 +89,11 @@ impl Service> for AuthService { let clone = self.inner.clone(); let mut inner = std::mem::replace(&mut self.inner, clone); + let rng = rand::SystemRandom::new(); let keypair = EcdsaKeyPair::from_pkcs8( &signature::ECDSA_P256_SHA256_FIXED_SIGNING, self.key.as_ref(), + &rng, ) .unwrap(); @@ -97,7 +102,7 @@ impl Service> for AuthService { Box::pin(async move { use bytes::BufMut; use std::convert::TryInto; - use tonic::codegen::Body; + use http_body_util::BodyExt; // Returns UTC on all platforms, no need to handle // timezones. @@ -105,9 +110,12 @@ impl Service> for AuthService { .duration_since(std::time::SystemTime::UNIX_EPOCH)? .as_millis(); - let (mut parts, mut body) = request.into_parts(); + let (mut parts, body) = request.into_parts(); - let data = body.data().await.unwrap().unwrap(); + // http-body 1.0 drops `data()`; collect the whole body rather + // than just the first frame, which is also what the signature + // below is meant to cover. + let data = body.collect().await?.to_bytes(); // Copy used to create the signature (payload + associated data) let mut buf = data.to_vec(); diff --git a/libs/gl-client/src/pairing/attestation_device.rs b/libs/gl-client/src/pairing/attestation_device.rs index ab19b6a35..78b711c8b 100644 --- a/libs/gl-client/src/pairing/attestation_device.rs +++ b/libs/gl-client/src/pairing/attestation_device.rs @@ -126,14 +126,20 @@ impl Client // Sign data. let key = { let mut key = std::io::Cursor::new(&tls_key); - pemfile::pkcs8_private_keys(&mut key) + let key_item = pemfile::pkcs8_private_keys(&mut key) + .next() + .ok_or_else(|| std::io::Error::new(std::io::ErrorKind::InvalidData, "no pkcs8 private key")); + key_item + .map_err(into_approve_pairing_error)? .map_err(into_approve_pairing_error)? - .remove(0) }; - let kp = - EcdsaKeyPair::from_pkcs8(&signature::ECDSA_P256_SHA256_FIXED_SIGNING, key.as_ref()) - .map_err(into_approve_pairing_error)?; let rng = rand::SystemRandom::new(); + let kp = EcdsaKeyPair::from_pkcs8( + &signature::ECDSA_P256_SHA256_FIXED_SIGNING, + key.secret_pkcs8_der(), + &rng, + ) + .map_err(into_approve_pairing_error)?; let sig = kp .sign(&rng, &buf) .map_err(into_approve_pairing_error)? @@ -162,14 +168,14 @@ impl Client let mut crs = std::io::Cursor::new(&data.csr); let pem = Pem::read_from(&mut crs).map_err(into_verify_pairing_data_error)?; let csr = Csr::from_pem(&pem).map_err(into_verify_pairing_data_error)?; - let sub_pk_der = csr - .public_key() - .to_der() - .map_err(into_verify_pairing_data_error)?; - let sub_pk_info: SubjectPublicKeyInfo = - picky_asn1_der::from_bytes(&sub_pk_der).map_err(into_verify_pairing_data_error)?; + // picky's PublicKey is a thin wrapper around SubjectPublicKeyInfo, so + // borrow it directly. This used to serialise to DER and parse it back + // with picky-asn1-der, which was only necessary because the direct + // picky-asn1-x509 dependency was a different major than the one picky + // itself uses. + let sub_pk_info: &SubjectPublicKeyInfo = csr.public_key().as_ref(); - if let PublicKey::Ec(bs) = sub_pk_info.subject_public_key { + if let PublicKey::Ec(bs) = &sub_pk_info.subject_public_key { let pk = hex::encode(bs.0.payload_view()); if pk == data.device_id @@ -226,14 +232,19 @@ pub mod tests { #[test] fn test_verify_pairing_data() { let kp = tls::generate_ecdsa_key_pair(); - let device_cert = tls::generate_self_signed_device_cert( + let (device_cert, key_pair) = tls::generate_self_signed_device_cert( &hex::encode("00"), "my-device", vec!["localhost".into()], Some(kp), ); - let csr = device_cert.serialize_request_pem().unwrap(); - let pk = hex::encode(device_cert.get_key_pair().public_key_raw()); + let csr = device_cert + .params() + .serialize_request(&key_pair) + .unwrap() + .pem() + .unwrap(); + let pk = hex::encode(key_pair.public_key_raw()); // Check with public key as session id. let pd = GetPairingDataResponse { diff --git a/libs/gl-client/src/pairing/mod.rs b/libs/gl-client/src/pairing/mod.rs index e0005ac06..371f8bce4 100644 --- a/libs/gl-client/src/pairing/mod.rs +++ b/libs/gl-client/src/pairing/mod.rs @@ -9,7 +9,7 @@ pub enum Error { #[error(transparent)] TransportError(#[from] tonic::transport::Error), #[error(transparent)] - X509Error(#[from] rcgen::RcgenError), + X509Error(#[from] rcgen::Error), #[error("could not build client: {0}")] BuildClientError(String), #[error(transparent)] diff --git a/libs/gl-client/src/pairing/new_device.rs b/libs/gl-client/src/pairing/new_device.rs index bb5777db0..5c4dab2b2 100644 --- a/libs/gl-client/src/pairing/new_device.rs +++ b/libs/gl-client/src/pairing/new_device.rs @@ -70,14 +70,18 @@ impl Client { let kp = tls::generate_ecdsa_key_pair(); // Generate csr. - let device_cert = tls::generate_self_signed_device_cert( + let (device_cert, key_pair) = tls::generate_self_signed_device_cert( &hex::encode("00"), // We don't know the node id yet, this is to be filled out by the attestation device. name, vec!["localhost".into()], Some(kp), ); - let device_id = hex::encode(device_cert.get_key_pair().public_key_raw()); - let csr = device_cert.serialize_request_pem()?; + let device_id = hex::encode(key_pair.public_key_raw()); + let csr = device_cert.params().serialize_request(&key_pair)?.pem()?; + + // The private key never leaves the device, so pre-serialize it for + // the worker that injects it into the pairing response. + let private_key_pem = key_pair.serialize_pem(); // Restrictions should always contain the pubkey field to bind them to // the private key of the device. @@ -117,7 +121,7 @@ impl Client { let _ = match request.await { Ok(r) => { let mut res = r.into_inner(); - res.device_key = device_cert.serialize_private_key_pem(); + res.device_key = private_key_pem; let creds = Device::with( res.device_cert.clone().into_bytes(), res.device_key.clone().into_bytes(), diff --git a/libs/gl-client/src/scheduler.rs b/libs/gl-client/src/scheduler.rs index 19375f8d1..72d9f7aba 100644 --- a/libs/gl-client/src/scheduler.rs +++ b/libs/gl-client/src/scheduler.rs @@ -188,13 +188,13 @@ impl Scheduler { log::trace!("Got a challenge: {}", hex::encode(&challenge.challenge)); let signature = signer.sign_challenge(challenge.challenge.clone())?; - let device_cert = tls::generate_self_signed_device_cert( + let (device_cert, key_pair) = tls::generate_self_signed_device_cert( &hex::encode(signer.node_id()), "default", vec!["localhost".into()], None, ); - let device_csr = device_cert.serialize_request_pem()?; + let device_csr = device_cert.params().serialize_request(&key_pair)?.pem()?; debug!("Requesting registration with csr:\n{}", device_csr); let startupmsgs = signer @@ -230,10 +230,10 @@ impl Scheduler { // We intercept the response and replace the private key with the // private key of the device_cert. This private key has been generated // on and has never left the client device. - res.device_key = device_cert.serialize_private_key_pem(); + res.device_key = key_pair.serialize_pem(); } - let public_key = device_cert.get_key_pair().public_key_raw(); + let public_key = key_pair.public_key_raw(); debug!( "Asking signer to create a rune for public key {}", hex::encode(public_key) @@ -297,13 +297,13 @@ impl Scheduler { let signature = signer.sign_challenge(challenge.challenge.clone())?; let name = format!("recovered-{}", hex::encode(&challenge.challenge[0..8])); - let device_cert = tls::generate_self_signed_device_cert( + let (device_cert, key_pair) = tls::generate_self_signed_device_cert( &hex::encode(signer.node_id()), &name, vec!["localhost".into()], None, ); - let device_csr = device_cert.serialize_request_pem()?; + let device_csr = device_cert.params().serialize_request(&key_pair)?.pem()?; debug!("Requesting recovery with csr:\n{}", device_csr); let mut res = self @@ -327,10 +327,10 @@ impl Scheduler { // We intercept the response and replace the private key with the // private key of the device_cert. This private key has been generated // on and has never left the client device. - res.device_key = device_cert.serialize_private_key_pem(); + res.device_key = key_pair.serialize_pem(); } - let public_key = device_cert.get_key_pair().public_key_raw(); + let public_key = key_pair.public_key_raw(); debug!( "Asking signer to create a rune for public key {}", hex::encode(public_key) diff --git a/libs/gl-client/src/tls.rs b/libs/gl-client/src/tls.rs index c2887b62a..767ec8421 100644 --- a/libs/gl-client/src/tls.rs +++ b/libs/gl-client/src/tls.rs @@ -160,27 +160,39 @@ pub fn generate_self_signed_device_cert( device: &str, subject_alt_names: Vec, key_pair: Option, -) -> rcgen::Certificate { +) -> (rcgen::Certificate, rcgen::KeyPair) { // Configure the certificate. - let mut params = cert_params_from_template(subject_alt_names); + let mut params = cert_params_from_template(subject_alt_names) + .expect("subject alt names must be valid"); // Is a leaf certificate only so it is not allowed to sign child - // certificates. - params.is_ca = rcgen::IsCa::ExplicitNoCa; + // certificates. This must stay `NoCa` rather than `ExplicitNoCa`: + // these params are turned into a CSR by the registration and pairing + // flows, and since rcgen 0.13 `serialize_request` rejects any + // basicConstraints in a CSR with `UnsupportedInCsr`. + params.is_ca = rcgen::IsCa::NoCa; params.distinguished_name.push( rcgen::DnType::CommonName, format!("/users/{}/{}", node_id, device), ); // Start from an empty key pair. - params.key_pair = key_pair; - params.alg = &rcgen::PKCS_ECDSA_P256_SHA256; + let key_pair = key_pair.unwrap_or_else(generate_ecdsa_key_pair); - rcgen::Certificate::from_params(params).unwrap() + // Since rcgen 0.13 the certificate no longer retains the key pair, so it + // is returned alongside the certificate for CSR generation and key + // serialization. + let cert = params + .self_signed(&key_pair) + .expect("creating self-signed device certificate"); + + (cert, key_pair) } -fn cert_params_from_template(subject_alt_names: Vec) -> rcgen::CertificateParams { - let mut params = rcgen::CertificateParams::new(subject_alt_names); +fn cert_params_from_template( + subject_alt_names: Vec, +) -> Result { + let mut params = rcgen::CertificateParams::new(subject_alt_names)?; // Certificate can be used to issue unlimited sub certificates for devices. params @@ -200,11 +212,11 @@ fn cert_params_from_template(subject_alt_names: Vec) -> rcgen::Certifica "CertificateAuthority", ); - params + Ok(params) } pub fn generate_ecdsa_key_pair() -> rcgen::KeyPair { - rcgen::KeyPair::generate(&rcgen::PKCS_ECDSA_P256_SHA256).unwrap() + rcgen::KeyPair::generate().unwrap() } #[cfg(test)] @@ -215,27 +227,26 @@ pub mod tests { #[test] fn test_generate_self_signed_device_cert() { - let device_cert = + let (device_cert, key_pair) = generate_self_signed_device_cert("mynodeid", "device", vec!["localhost".into()], None); assert!(device_cert - .serialize_pem() - .unwrap() + .pem() .starts_with("-----BEGIN CERTIFICATE-----")); - assert!(device_cert - .serialize_private_key_pem() + assert!(key_pair + .serialize_pem() .starts_with("-----BEGIN PRIVATE KEY-----")); } #[test] fn test_generate_self_signed_device_cert_from_pem() { let kp = generate_ecdsa_key_pair(); - let keys = KeyPair::from_der(kp.serialized_der()).unwrap(); - let cert = generate_self_signed_device_cert( + let keys = KeyPair::from_pem(&kp.serialize_pem()).unwrap(); + let (_, key) = generate_self_signed_device_cert( "mynodeid", "device", vec!["localhost".into()], Some(keys), ); - assert!(kp.serialize_pem() == cert.get_key_pair().serialize_pem()); + assert!(kp.serialize_pem() == key.serialize_pem()); } } diff --git a/libs/gl-plugin/Cargo.toml b/libs/gl-plugin/Cargo.toml index f1173ddcd..059cd4189 100644 --- a/libs/gl-plugin/Cargo.toml +++ b/libs/gl-plugin/Cargo.toml @@ -12,26 +12,26 @@ name = "gl-plugin" path = "src/bin/plugin.rs" [dependencies] -anyhow = "1" +anyhow = { workspace = true } async-stream = "0.3" -base64 = "0.21.7" +base64 = "0.22" bytes = { version = "1", features = ["serde"] } clightningrpc = "0.2" cln-grpc = { workspace = true, features = ["server"] } -cln-plugin = "^0.1" +cln-plugin = { workspace = true } cln-rpc = { workspace = true } -env_logger = "^0.7.1" futures = "0.3" gl-client = { version = "^0.6.0", path = "../gl-client" } gl-util = { version = "0.1", path = "../gl-util" } governor = { version = "0.5", default-features = false, features = ["std"] } -hex = "0.4" -hyper = "0.14.28" +hex = { workspace = true } +http = "1" +http-body-util = "0.1" lazy_static = "^1.4.0" linemux = "0.2" -log = "0.4" -nix = "^0" -prost = "0.12" +log = { workspace = true } +prost = "0.14" +tonic-prost = "0.14" serde = { version = "1.0", features = ["derive"] } serde_json = "1" sled = "0.34" @@ -39,9 +39,9 @@ thiserror = "1" tokio = { version = "1", features = ["full"] } tokio-stream = { version = "0.1", features = ["net"] } tokio-util = { version = "0.7", features = ["codec"] } -tonic = { version = "0.11", features = ["tls", "transport"] } -tower = { version = "0.4" } +tonic = { version = "0.14", features = ["tls-ring", "transport"] } +tower = { version = "0.5" } vls-protocol = { workspace = true } [build-dependencies] -tonic-build = "0.11" +tonic-prost-build = "0.14" diff --git a/libs/gl-plugin/build.rs b/libs/gl-plugin/build.rs index fb4af8c11..44abba117 100644 --- a/libs/gl-plugin/build.rs +++ b/libs/gl-plugin/build.rs @@ -1,12 +1,12 @@ fn main() { - tonic_build::configure() + tonic_prost_build::configure() .build_client(true) .build_server(true) .type_attribute( "TrampolinePayRequest", "#[derive(serde::Serialize, serde::Deserialize)]", ) - .compile( + .compile_protos( &[".resources/proto/glclient/greenlight.proto"], &[".resources/proto/glclient"], ) diff --git a/libs/gl-plugin/src/awaitables.rs b/libs/gl-plugin/src/awaitables.rs index 54738226d..50104e37c 100644 --- a/libs/gl-plugin/src/awaitables.rs +++ b/libs/gl-plugin/src/awaitables.rs @@ -309,7 +309,11 @@ async fn billboard( let mut rpc = connect(rpc_path).await?; if *version >= *"v23.05gl1" { Ok(rpc - .call_typed(&ListpeerchannelsRequest { id: Some(peer_id) }) + .call_typed(&ListpeerchannelsRequest { + channel_id: None, + id: Some(peer_id), + short_channel_id: None, + }) .await .map_err(|e| Error::Rpc(e))? .channels @@ -360,7 +364,11 @@ async fn spendable_msat( let mut rpc = connect(rpc_path).await?; if *version >= *"v23.05gl1" { Ok(rpc - .call_typed(&ListpeerchannelsRequest { id: Some(peer_id) }) + .call_typed(&ListpeerchannelsRequest { + channel_id: None, + id: Some(peer_id), + short_channel_id: None, + }) .await .map_err(|e| Error::Rpc(e))? .channels diff --git a/libs/gl-plugin/src/node/mod.rs b/libs/gl-plugin/src/node/mod.rs index f1722f954..89bb4e2af 100644 --- a/libs/gl-plugin/src/node/mod.rs +++ b/libs/gl-plugin/src/node/mod.rs @@ -265,7 +265,7 @@ impl Node for PluginNodeServer { return Ok(Response::new(pb::LspInvoiceResponse { bolt11: res.bolt11, - created_index: res.created_index.unwrap_or(0) as u32, + created_index: res.created_index as u32, expires_at: res.expires_at as u32, payment_hash: >::borrow( &res.payment_hash, @@ -1014,7 +1014,11 @@ impl PluginNodeServer { use cln_rpc::primitives::ChannelState; let res = rpc - .call_typed(&cln_rpc::model::requests::ListpeerchannelsRequest { id: None }) + .call_typed(&cln_rpc::model::requests::ListpeerchannelsRequest { + channel_id: None, + id: None, + short_channel_id: None, + }) .await?; let total: u64 = res @@ -1113,9 +1117,9 @@ pub struct SignatureContextService { ctx: crate::context::Context, } -impl Service> for SignatureContextService +impl Service> for SignatureContextService where - S: Service, Response = hyper::Response> + S: Service, Response = http::Response> + Clone + Send + 'static, @@ -1133,7 +1137,8 @@ where self.inner.poll_ready(cx).map_err(Into::into) } - fn call(&mut self, request: hyper::Request) -> Self::Future { + fn call(&mut self, request: http::Request) -> Self::Future { + use http_body_util::BodyExt; // This is necessary because tonic internally uses `tower::buffer::Buffer`. // See https://github.com/tower-rs/tower/issues/547#issuecomment-767629149 // for details on why this is necessary @@ -1176,8 +1181,15 @@ where // Now that we know we'll be adding this to the // context we can start buffering the request. let mut buf = Vec::new(); - while let Some(chunk) = body.data().await { - let chunk = chunk.unwrap(); + // http-body 1.0 exposes frames rather than data chunks; skip + // trailer frames and keep the incremental size check. + while let Some(frame) = body.frame().await { + let Ok(chunk) = frame.map(|f| f.into_data()) else { + break; + }; + let Ok(chunk) = chunk else { + continue; + }; // We check on the MAX_MESSAGE_SIZE to avoid an unlimited sized // message buffer if buf.len() + chunk.len() > MAX_MESSAGE_SIZE { @@ -1186,7 +1198,7 @@ where tonic::Code::InvalidArgument, format!("payload too large"), ) - .to_http()); + .into_http()); } buf.put(chunk); } @@ -1210,8 +1222,8 @@ where reqctx.add_request(req.clone()).await; - let body: hyper::Body = buf.into(); - let request = hyper::Request::from_parts(parts, body); + let body = tonic::body::Body::new(http_body_util::Full::new(bytes::Bytes::from(buf))); + let request = http::Request::from_parts(parts, body); let res = inner.call(request).await; // Defer cleanup into a separate task, otherwise we'd @@ -1225,7 +1237,7 @@ where } else { // No point in buffering the request, we're not going // to add it to the `HsmRequestContext` - let request = hyper::Request::from_parts(parts, body); + let request = http::Request::from_parts(parts, body); inner.call(request).await.map_err(Into::into) } }) diff --git a/libs/gl-plugin/src/node/rpcwait.rs b/libs/gl-plugin/src/node/rpcwait.rs index 83444ea16..22c94042d 100644 --- a/libs/gl-plugin/src/node/rpcwait.rs +++ b/libs/gl-plugin/src/node/rpcwait.rs @@ -18,9 +18,9 @@ impl RpcWaitService { } } -impl Service> for RpcWaitService +impl Service> for RpcWaitService where - S: Service, Response = hyper::Response> + S: Service, Response = http::Response> + Clone + Send + 'static, @@ -37,7 +37,7 @@ where self.inner.poll_ready(cx) } - fn call(&mut self, request: hyper::Request) -> Self::Future { + fn call(&mut self, request: http::Request) -> Self::Future { // This is necessary because tonic internally uses `tower::buffer::Buffer`. // See https://github.com/tower-rs/tower/issues/547#issuecomment-767629149 // for details on why this is necessary diff --git a/libs/gl-plugin/src/node/wrapper.rs b/libs/gl-plugin/src/node/wrapper.rs index 771256ee7..c8386505f 100644 --- a/libs/gl-plugin/src/node/wrapper.rs +++ b/libs/gl-plugin/src/node/wrapper.rs @@ -166,13 +166,6 @@ impl Node for WrappedNodeServer { self.inner.list_funds(r).await } - async fn decode_pay( - &self, - r: Request, - ) -> Result, Status> { - self.inner.decode_pay(r).await - } - async fn decode( &self, r: Request, @@ -180,6 +173,90 @@ impl Node for WrappedNodeServer { self.inner.decode(r).await } + async fn fetch_bip353( + &self, + r: Request, + ) -> Result, Status> { + self.inner.fetch_bip353(r).await + } + + async fn cancel_recurring_invoice( + &self, + r: Request, + ) -> Result, Status> { + self.inner.cancel_recurring_invoice(r).await + } + + async fn askrene_bias_node( + &self, + r: Request, + ) -> Result, Status> { + self.inner.askrene_bias_node(r).await + } + + async fn sign_message_with_key( + &self, + r: Request, + ) -> Result, Status> { + self.inner.sign_message_with_key(r).await + } + + async fn list_channel_moves( + &self, + r: Request, + ) -> Result, Status> { + self.inner.list_channel_moves(r).await + } + + async fn list_chain_moves( + &self, + r: Request, + ) -> Result, Status> { + self.inner.list_chain_moves(r).await + } + + async fn list_network_events( + &self, + r: Request, + ) -> Result, Status> { + self.inner.list_network_events(r).await + } + + async fn del_network_event( + &self, + r: Request, + ) -> Result, Status> { + self.inner.del_network_event(r).await + } + + async fn clnrest_register_path( + &self, + r: Request, + ) -> Result, Status> { + self.inner.clnrest_register_path(r).await + } + + async fn list_currency_rates( + &self, + r: Request, + ) -> Result, Status> { + self.inner.list_currency_rates(r).await + } + + async fn currency_convert( + &self, + r: Request, + ) -> Result, Status> { + self.inner.currency_convert(r).await + } + + async fn currency_rate( + &self, + r: Request, + ) -> Result, Status> { + self.inner.currency_rate(r).await + } + async fn sign_invoice( &self, r: Request, @@ -1280,6 +1357,243 @@ impl Node for WrappedNodeServer { // TODO: Implement this once `cln_grpc::server::NotificationStream is public unimplemented!(); } + + async fn splice_in( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.splice_in(request).await + } + + async fn splice_out( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.splice_out(request).await + } + + async fn bkpr_report( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.bkpr_report(request).await + } + + async fn ask_rene_remove_channel_update( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.ask_rene_remove_channel_update(request).await + } + + async fn send_amount( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.send_amount(request).await + } + + async fn create_proof( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.create_proof(request).await + } + + async fn xkeysend( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.xkeysend(request).await + } + + async fn graceful( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + self.inner.graceful(request).await + } + + type SubscribeBalanceSnapshotStream = + ReceiverStream>; + async fn subscribe_balance_snapshot( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeCoinMovementStream = + ReceiverStream>; + async fn subscribe_coin_movement( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeDeprecatedOneshotStream = + ReceiverStream>; + async fn subscribe_deprecated_oneshot( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeDisconnectStream = + ReceiverStream>; + async fn subscribe_disconnect( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeForwardEventStream = + ReceiverStream>; + async fn subscribe_forward_event( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeInvoiceCreationStream = + ReceiverStream>; + async fn subscribe_invoice_creation( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeInvoicePaymentStream = + ReceiverStream>; + async fn subscribe_invoice_payment( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeLogStream = + ReceiverStream>; + async fn subscribe_log( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeOnionMessageForwardFailStream = + ReceiverStream>; + async fn subscribe_onion_message_forward_fail( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeOpenChannelPeerSigsStream = + ReceiverStream>; + async fn subscribe_open_channel_peer_sigs( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribePluginStartedStream = + ReceiverStream>; + async fn subscribe_plugin_started( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribePluginStoppedStream = + ReceiverStream>; + async fn subscribe_plugin_stopped( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeSendPayFailureStream = + ReceiverStream>; + async fn subscribe_send_pay_failure( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeSendPaySuccessStream = + ReceiverStream>; + async fn subscribe_send_pay_success( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeShutdownStream = + ReceiverStream>; + async fn subscribe_shutdown( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribeWarningStream = + ReceiverStream>; + async fn subscribe_warning( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribePayPartEndStream = + ReceiverStream>; + async fn subscribe_pay_part_end( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + + type SubscribePayPartStartStream = + ReceiverStream>; + async fn subscribe_pay_part_start( + &self, + _request: tonic::Request, + ) -> Result, tonic::Status> { + // TODO: Implement this once `cln_grpc::server::NotificationStream is public + unimplemented!(); + } + } fn internal_status(error: impl std::fmt::Display) -> Status { @@ -1368,7 +1682,14 @@ impl WrappedNodeServer { async fn old_splice_state(&self, channel_id: &[u8]) -> Result { let response = self .inner - .list_peer_channels(Request::new(pb::ListpeerchannelsRequest { id: None })) + .list_peer_channels(Request::new(pb::ListpeerchannelsRequest { + id: None, + // New server-side filters in cln 0.7. Left unset: this call + // lists every channel and filters by channel_id below, and a + // dependency bump is not the place to change that. + channel_id: None, + short_channel_id: None, + })) .await?; let channel = response .into_inner() @@ -1406,7 +1727,11 @@ impl WrappedNodeServer { // `short_channel_id`, whereas we're supposed to use the remote alias if // the channel is unannounced. This patches the issue in GL, and should // work transparently once we fix `listincoming`. - let req = cln_rpc::model::requests::ListpeerchannelsRequest { id: None }; + let req = cln_rpc::model::requests::ListpeerchannelsRequest { + channel_id: None, + id: None, + short_channel_id: None, + }; let res = rpc.call_typed(&req).await?; let active_channels: HashMap< cln_rpc::primitives::ShortChannelId, diff --git a/libs/gl-plugin/src/pb.rs b/libs/gl-plugin/src/pb.rs index 55969a95c..af9e0a913 100644 --- a/libs/gl-plugin/src/pb.rs +++ b/libs/gl-plugin/src/pb.rs @@ -73,7 +73,7 @@ impl From for cln_grpc::pb::InvoiceResponse { warning_deadends: None, warning_offline: None, warning_private_unused: None, - created_index: None, + created_index: 0, } } } diff --git a/libs/gl-plugin/src/tramp.rs b/libs/gl-plugin/src/tramp.rs index 486a32443..d64684975 100644 --- a/libs/gl-plugin/src/tramp.rs +++ b/libs/gl-plugin/src/tramp.rs @@ -395,7 +395,11 @@ pub async fn trampolinepay( debug!("overpay={}, total_amt={}", overpay as u64, amount_msat); let channels: Vec = rpc - .call_typed(&cln_rpc::model::requests::ListpeerchannelsRequest { id: Some(node_id) }) + .call_typed(&cln_rpc::model::requests::ListpeerchannelsRequest { + channel_id: None, + id: Some(node_id), + short_channel_id: None, + }) .await? .channels .into_iter() @@ -605,11 +609,18 @@ async fn do_pay( payment_metadata: String, max_delay: Option, ) -> Result { + // cln-rpc 0.7 made every SendpayRoute field optional and added the + // newer `*_out` / `short_channel_id_dir` hop representation alongside + // the legacy one. We keep describing the hop the legacy way. let route = cln_rpc::model::requests::SendpayRoute { - amount_msat: cln_rpc::primitives::Amount::from_msat(part_amt), - id: node_id.clone(), - delay: max_delay.unwrap_or(MAX_DELAY_DEFAULT), - channel: scid, + amount_msat: Some(cln_rpc::primitives::Amount::from_msat(part_amt)), + id: Some(node_id.clone()), + delay: Some(max_delay.unwrap_or(MAX_DELAY_DEFAULT)), + channel: Some(scid), + amount_out_msat: None, + cltv_out: None, + node_id_out: None, + short_channel_id_dir: None, }; debug!( diff --git a/libs/gl-sdk-cli/Cargo.toml b/libs/gl-sdk-cli/Cargo.toml index e37a7efdf..a334d294f 100644 --- a/libs/gl-sdk-cli/Cargo.toml +++ b/libs/gl-sdk-cli/Cargo.toml @@ -17,7 +17,7 @@ bip39 = { version = "2.2", features = ["rand"] } clap = { version = "4.5", features = ["derive"] } dirs = "6.0" env_logger = "0.11" -hex = "0.4" +hex = { workspace = true } serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2.0" diff --git a/libs/gl-sdk-napi/Cargo.toml b/libs/gl-sdk-napi/Cargo.toml index 0b90ac42c..4b6aa275a 100644 --- a/libs/gl-sdk-napi/Cargo.toml +++ b/libs/gl-sdk-napi/Cargo.toml @@ -22,8 +22,8 @@ glsdk = { version = "0.4.0", path = "../gl-sdk", package = "gl-sdk" } tokio = { version = "1", features = ["full"] } serde = { version = "1", features = ["derive"] } serde_json = "1" -anyhow = "1" -hex = "0.4" +anyhow = { workspace = true } +hex = { workspace = true } [build-dependencies] napi-build = "2" diff --git a/libs/gl-sdk/Cargo.toml b/libs/gl-sdk/Cargo.toml index 3051dff5f..2cd64ef9d 100644 --- a/libs/gl-sdk/Cargo.toml +++ b/libs/gl-sdk/Cargo.toml @@ -14,14 +14,14 @@ crate-type = ["cdylib", "staticlib", "rlib"] name = "glsdk" [dependencies] -anyhow = "1" +anyhow = { workspace = true } bip39 = "2.2.0" bitcoin = { version = "0.32", features = ["base64"] } gl-client = { version = "0.6.0", path = "../gl-client" } -hex = "0.4" -log = "0.4" +hex = { workspace = true } +log = { workspace = true } lightning-invoice = "0.33" -once_cell = "1.21.3" +once_cell = { workspace = true } serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2.0.17" diff --git a/libs/gl-sdk/src/node.rs b/libs/gl-sdk/src/node.rs index e97f522b1..2f7063202 100644 --- a/libs/gl-sdk/src/node.rs +++ b/libs/gl-sdk/src/node.rs @@ -470,7 +470,11 @@ impl Node { }; tokio::join!( c_funds.list_funds(clnpb::ListfundsRequest { spent: None }), - c_channels.list_peer_channels(clnpb::ListpeerchannelsRequest { id: None }), + c_channels.list_peer_channels(clnpb::ListpeerchannelsRequest { + channel_id: None, + id: None, + short_channel_id: None, + }), c_probe.fund_psbt(probe_req), ) }); @@ -638,7 +642,11 @@ impl Node { self.check_connected()?; let mut cln_client = exec(self.get_cln_client())?.clone(); - let req = clnpb::ListpeerchannelsRequest { id: None }; + let req = clnpb::ListpeerchannelsRequest { + channel_id: None, + id: None, + short_channel_id: None, + }; let res = exec(cln_client.list_peer_channels(req)) .map_err(|e| Error::rpc(e.to_string()))? @@ -676,7 +684,11 @@ impl Node { let mut c_funds = cln_client.clone(); tokio::join!( c_info.getinfo(clnpb::GetinfoRequest {}), - c_channels.list_peer_channels(clnpb::ListpeerchannelsRequest { id: None }), + c_channels.list_peer_channels(clnpb::ListpeerchannelsRequest { + channel_id: None, + id: None, + short_channel_id: None, + }), c_funds.list_funds(clnpb::ListfundsRequest { spent: None }), ) }); @@ -1779,7 +1791,7 @@ impl From for GetInfoResponse { fn from(other: clnpb::GetinfoResponse) -> Self { Self { id: hex::encode(&other.id), - alias: other.alias, + alias: Some(other.alias), color: hex::encode(&other.color), num_peers: other.num_peers, num_pending_channels: other.num_pending_channels, @@ -1829,7 +1841,7 @@ impl From for Peer { Self { id: hex::encode(&other.id), connected: other.connected, - num_channels: other.num_channels, + num_channels: Some(other.num_channels), netaddr: other.netaddr, remote_addr: other.remote_addr, features: other.features, @@ -2099,7 +2111,11 @@ impl From for FundChannel { connected: other.connected, state, short_channel_id: other.short_channel_id, - channel_id: other.channel_id.as_deref().map(hex::encode), + channel_id: if other.channel_id.is_empty() { + None + } else { + Some(hex::encode(&other.channel_id)) + }, } } } @@ -2789,8 +2805,7 @@ mod tests { mutual_close: None, unilateral_close: None, unilateral_anchor_close: None, - delayed_to_us: None, - htlc_resolution: None, + splice: None, penalty: None, estimates: estimates .into_iter() @@ -2800,7 +2815,7 @@ mod tests { smoothed_feerate: feerate, }) .collect(), - floor: None, + floor: 0, } } diff --git a/libs/gl-signerproxy/Cargo.toml b/libs/gl-signerproxy/Cargo.toml index f38900150..99669edf4 100644 --- a/libs/gl-signerproxy/Cargo.toml +++ b/libs/gl-signerproxy/Cargo.toml @@ -15,16 +15,18 @@ name = "gl-signerproxy" path = "src/bin/signerproxy.rs" [build-dependencies] -tonic-build = "0.11" +tonic-prost-build = "0.14" [dependencies] anyhow = { workspace = true } env_logger = { workspace = true } tokio = { version = "1", features = ["rt", "net", "io-util"] } -tonic = { version = "0.11", features = ["tls", "transport"] } -prost = "0.12" -log = "*" -tower = "0.4" +tonic = { version = "0.14", features = ["tls-ring", "transport"] } +prost = "0.14" +tonic-prost = "0.14" +log = { workspace = true } +tower = { version = "0.5", features = ["util"] } +hyper-util = { version = "0.1", features = ["tokio"] } which = "4.4.2" libc = "0.2" byteorder = "1.5.0" diff --git a/libs/gl-signerproxy/build.rs b/libs/gl-signerproxy/build.rs index 398b8a653..89c6daef3 100644 --- a/libs/gl-signerproxy/build.rs +++ b/libs/gl-signerproxy/build.rs @@ -1,7 +1,7 @@ fn main() { - tonic_build::configure() + tonic_prost_build::configure() .build_client(true) - .compile( + .compile_protos( &[".resources/proto/glclient/greenlight.proto"], &[".resources/proto/glclient"], ) diff --git a/libs/gl-signerproxy/src/hsmproxy.rs b/libs/gl-signerproxy/src/hsmproxy.rs index 53d110fa7..677b4b7eb 100644 --- a/libs/gl-signerproxy/src/hsmproxy.rs +++ b/libs/gl-signerproxy/src/hsmproxy.rs @@ -12,6 +12,7 @@ use std::sync::atomic; use std::sync::Arc; use tokio::net::UnixStream; use tonic::transport::{Endpoint, Uri}; +use hyper_util::rt::TokioIo; use tower::service_fn; use which::which; @@ -133,7 +134,13 @@ async fn grpc_connect() -> Result { path.push(&sock_path); let path = path.to_str().unwrap().to_string(); info!("Connecting to hsmserver at {}", path); - tokio::net::UnixStream::connect(path) + // hyper 1.0 no longer implements its IO traits for tokio's + // types directly, so the stream has to be wrapped. + async move { + Ok::<_, std::io::Error>(TokioIo::new( + tokio::net::UnixStream::connect(path).await?, + )) + } })) .await .context("could not connect to the socket file")?; diff --git a/libs/gl-testing/Makefile b/libs/gl-testing/Makefile index 4b51d3739..e74cbad40 100644 --- a/libs/gl-testing/Makefile +++ b/libs/gl-testing/Makefile @@ -27,7 +27,7 @@ check-testing-py: # grpcio-tools version in step with that one. TESTPROTOC_TOOLCHAIN = \ uv run --no-project \ - --with grpcio-tools==1.78.0 \ + --with grpcio-tools==1.81.1 \ --with purerpc \ python -m grpc_tools.protoc @@ -36,6 +36,8 @@ testgrpc: ${REPO_ROOT}/libs/proto/glclient/scheduler.proto mv ${TESTINGDIR}/gltesting/glclient/scheduler_grpc.py ${TESTINGDIR}/gltesting/scheduler_grpc.py rm -rf ${TESTINGDIR}/gltesting/glclient +# Uses the same pinned, isolated toolchain as testgrpc so the checked-in +# stubs do not depend on the ambient venv. protoc: - uv run python3 -m grpc_tools.protoc -I. --python_out=. --pyi_out=. --purerpc_out=. --grpc_python_out=. gltesting/test.proto + cd ${TESTINGDIR}; ${TESTPROTOC_TOOLCHAIN} -I. --python_out=. --pyi_out=. --purerpc_out=. --grpc_python_out=. gltesting/test.proto diff --git a/libs/gl-testing/gltesting/test_pb2.py b/libs/gl-testing/gltesting/test_pb2.py index efa688191..01a66b52a 100644 --- a/libs/gl-testing/gltesting/test_pb2.py +++ b/libs/gl-testing/gltesting/test_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: gltesting/test.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 6.33.5 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 33, + 5, + '', + 'gltesting/test.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gltesting.test_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_HELLOREQUEST']._serialized_start=35 _globals['_HELLOREQUEST']._serialized_end=63 _globals['_HELLOREPLY']._serialized_start=65 diff --git a/libs/gl-testing/gltesting/test_pb2_grpc.py b/libs/gl-testing/gltesting/test_pb2_grpc.py index 395457cd5..15423a8cf 100644 --- a/libs/gl-testing/gltesting/test_pb2_grpc.py +++ b/libs/gl-testing/gltesting/test_pb2_grpc.py @@ -1,11 +1,31 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from gltesting import test_pb2 as gltesting_dot_test__pb2 +GRPC_GENERATED_VERSION = '1.81.1' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False -class GreeterStub(object): +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in gltesting/test_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class GreeterStub: """Missing associated documentation comment in .proto file.""" def __init__(self, channel): @@ -18,10 +38,10 @@ def __init__(self, channel): '/gltesting.Greeter/SayHello', request_serializer=gltesting_dot_test__pb2.HelloRequest.SerializeToString, response_deserializer=gltesting_dot_test__pb2.HelloReply.FromString, - ) + _registered_method=True) -class GreeterServicer(object): +class GreeterServicer: """Missing associated documentation comment in .proto file.""" def SayHello(self, request, context): @@ -42,10 +62,11 @@ def add_GreeterServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'gltesting.Greeter', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('gltesting.Greeter', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. -class Greeter(object): +class Greeter: """Missing associated documentation comment in .proto file.""" @staticmethod @@ -59,8 +80,18 @@ def SayHello(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/gltesting.Greeter/SayHello', + return grpc.experimental.unary_unary( + request, + target, + '/gltesting.Greeter/SayHello', gltesting_dot_test__pb2.HelloRequest.SerializeToString, gltesting_dot_test__pb2.HelloReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/libs/gl-testing/pyproject.toml b/libs/gl-testing/pyproject.toml index 8e3c4ff0a..b22a67f17 100644 --- a/libs/gl-testing/pyproject.toml +++ b/libs/gl-testing/pyproject.toml @@ -7,12 +7,12 @@ requires-python = ">=3.8" dependencies = [ "flaky>=3.8.1", "gl-client", - "grpcio-tools>=1.66", - "grpcio>=1.66.0", + "grpcio-tools>=1.81.1", + "grpcio>=1.81.1", "httpx[http2]==0.27.2", "purerpc>=0.8.0", - "pyln-client==24.2", - "pyln-testing==24.2", + "pyln-client>=26.6.6", + "pyln-testing>=26.6.6", "pytest-timeout>=2.3.1", "pytest-xdist>=3.6.1", "rich>=13.9.3", diff --git a/libs/gl-util/Cargo.toml b/libs/gl-util/Cargo.toml index 6ba86d782..ffe6ad88c 100644 --- a/libs/gl-util/Cargo.toml +++ b/libs/gl-util/Cargo.toml @@ -13,4 +13,4 @@ bytes = "1.10" cln-rpc = { workspace = true } serde = { version = "1.0", features = ["derive"] } serde_json = "1" -tonic = "0.11" +tonic = "0.14"