From f0c7f8a2029b8cc6ecc63e1e6f72a9e15b68e0ba Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Tue, 21 Apr 2026 09:14:21 +0000 Subject: [PATCH 1/6] P2Pool Status View with API + WebSocket integration --- Cargo.lock | 3370 ++++++++++++++--- Cargo.toml | 10 + config/pdm.toml | 5 + src/app.rs | 27 + src/components/mod.rs | 3 + src/components/p2pool_client.rs | 272 ++ src/components/p2pool_log_parser.rs | 134 + src/components/p2pool_status_view.rs | 180 +- src/components/p2pool_websockets.rs | 88 + src/config.rs | 29 + src/lib.rs | 1 + src/main.rs | 74 +- ..._ui__tests__bitcoin_screen_render.snap.new | 52 - ...__ui__tests__p2pool_screen_render.snap.new | 54 - ...i__tests__p2pool_status_screen_render.snap | 12 +- 15 files changed, 3755 insertions(+), 556 deletions(-) create mode 100644 config/pdm.toml create mode 100644 src/components/p2pool_client.rs create mode 100644 src/components/p2pool_log_parser.rs create mode 100644 src/components/p2pool_websockets.rs create mode 100644 src/config.rs delete mode 100644 src/snapshots/pdm__ui__tests__bitcoin_screen_render.snap.new delete mode 100644 src/snapshots/pdm__ui__tests__p2pool_screen_render.snap.new diff --git a/Cargo.lock b/Cargo.lock index a15efaa..965666f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,41 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + [[package]] name = "ahash" version = "0.7.8" @@ -28,6 +63,15 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" version = "1.0.100" @@ -40,12 +84,81 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "asn1_der" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4858a9d740c5007a9069007c3b4e91152d0506f13c1b31dd49051fd537656156" + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.2", + "slab", + "windows-sys 0.61.2", +] + [[package]] name = "async-trait" version = "0.1.89" @@ -58,12 +171,16 @@ dependencies = [ ] [[package]] -name = "atomic" -version = "0.6.1" +name = "asynchronous-codec" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" dependencies = [ - "bytemuck", + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", ] [[package]] @@ -72,12 +189,103 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http 0.2.12", + "log", + "url", +] + [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "base64 0.22.1", + "bytes", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.8.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "sync_wrapper", + "tokio", + "tokio-tungstenite 0.24.0", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base256emoji" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c" +dependencies = [ + "const-str", + "match-lookup", +] + [[package]] name = "base58ck" version = "0.1.0" @@ -100,6 +308,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "bech32" version = "0.11.1" @@ -107,20 +321,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] -name = "bit-set" -version = "0.5.3" +name = "bindgen" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bit-vec", + "bitflags 2.10.0", + "cexpr", + "clang-sys", + "itertools", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.111", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bitcoin" version = "0.32.8" @@ -175,10 +392,19 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoinconsensus" +version = "0.106.0+26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12cba9cce5043cdda968e07b9df6d05ec6b0b38aa27a9a40bb575cf3e521ae9" +dependencies = [ + "cc", +] + [[package]] name = "bitcoindrpc" -version = "0.10.6" -source = "git+https://github.com/p2poolv2/p2poolv2#f448917decf9e12529637ebd37715cb3327c572b" +version = "0.10.4" +source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" dependencies = [ "base64 0.22.1", "bitcoin", @@ -206,6 +432,27 @@ dependencies = [ "serde_core", ] +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -215,6 +462,39 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borsh" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" +dependencies = [ + "borsh-derive", + "bytes", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.20.2" @@ -222,10 +502,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] -name = "bytemuck" -version = "1.25.0" +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -233,6 +535,22 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + [[package]] name = "castaway" version = "0.2.4" @@ -249,9 +567,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "1.0.4" @@ -265,27 +604,96 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] -name = "compact_str" -version = "0.9.0" +name = "chacha20" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ - "castaway", "cfg-if", - "itoa", - "rustversion", - "ryu", - "static_assertions", + "cipher", + "cpufeatures", ] [[package]] -name = "config" -version = "0.13.4" +name = "chacha20poly1305" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "async-trait", - "json5", + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "compact_str" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "config" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +dependencies = [ + "async-trait", + "json5", "lazy_static", "nom", "pathdiff", @@ -329,6 +737,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const-random" version = "0.1.18" @@ -349,6 +763,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "const-str" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3" + [[package]] name = "convert_case" version = "0.6.0" @@ -402,6 +822,78 @@ dependencies = [ "libc", ] +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.10.0", + "crossterm_winapi", + "mio", + "parking_lot", + "rustix 0.38.44", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm" version = "0.29.0" @@ -435,6 +927,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -442,17 +946,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", + "rand_core 0.6.4", "typenum", ] [[package]] -name = "csscolorparser" -version = "0.6.2" +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "lab", - "phf", + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -477,6 +1008,7 @@ dependencies = [ "quote", "strsim", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -491,10 +1023,68 @@ dependencies = [ ] [[package]] -name = "deltae" -version = "0.3.2" +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" + +[[package]] +name = "data-encoding-macro" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8142a83c17aa9461d637e649271eae18bf2edd00e91f2e105df36c3c16355bdb" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" +dependencies = [ + "data-encoding", + "syn 2.0.111", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] [[package]] name = "deranged" @@ -525,6 +1115,7 @@ dependencies = [ "quote", "rustc_version", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -534,28 +1125,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", + "subtle", ] [[package]] -name = "directories" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" +name = "dircpy" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +checksum = "ebcbec2b9a580ddee352ac38523d2ecd4dcaad53532957034394556909e27f4b" dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.59.0", + "jwalk", + "log", + "walkdir", ] [[package]] @@ -567,6 +1150,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -593,12 +1177,75 @@ dependencies = [ "litrs", ] +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encode_unicode" version = "1.0.0" @@ -614,6 +1261,18 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "equivalent" version = "1.0.2" @@ -667,16 +1326,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "filedescriptor" -version = "0.8.3" +name = "ff" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ - "libc", - "thiserror 1.0.69", - "winapi", + "rand_core 0.6.4", + "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "find-msvc-tools" version = "0.1.7" @@ -737,6 +1401,37 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-bounded" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91f328e7fb845fc832912fb6a34f40cf6d1888c92f974d1893a54e97b5ff542e" +dependencies = [ + "futures-timer", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.32" @@ -744,6 +1439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -764,7 +1460,45 @@ dependencies = [ ] [[package]] -name = "futures-sink" +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "futures-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" +dependencies = [ + "futures-io", + "rustls", + "rustls-pki-types", +] + +[[package]] +name = "futures-sink" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" @@ -775,14 +1509,25 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ + "futures-channel", "futures-core", + "futures-io", + "futures-macro", + "futures-sink", "futures-task", + "memchr", "pin-project-lite", "slab", ] @@ -795,6 +1540,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -804,8 +1550,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -815,22 +1563,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 5.3.0", "wasip2", + "wasm-bindgen", ] [[package]] -name = "getrandom" -version = "0.4.2" +name = "ghash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", - "wasip2", - "wasip3", + "opaque-debug", + "polyval", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -844,7 +1627,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http", + "http 1.4.0", "indexmap", "slab", "tokio", @@ -902,6 +1685,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[package]] name = "hex" version = "0.4.3" @@ -923,6 +1712,81 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" +[[package]] +name = "hickory-proto" +version = "0.24.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.8.5", + "socket2 0.5.10", + "thiserror 1.0.69", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.4.0" @@ -933,6 +1797,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -940,7 +1815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.4.0", ] [[package]] @@ -951,17 +1826,53 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + [[package]] name = "httparse" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.8.1" @@ -972,10 +1883,11 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2", - "http", - "http-body", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", "httparse", + "httpdate", "itoa", "pin-project-lite", "pin-utils", @@ -990,14 +1902,15 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http", - "hyper", + "http 1.4.0", + "hyper 1.8.1", "hyper-util", "rustls", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -1008,7 +1921,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper", + "hyper 1.8.1", "hyper-util", "native-tls", "tokio", @@ -1026,14 +1939,14 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body", - "hyper", + "http 1.4.0", + "http-body 1.0.1", + "hyper 1.8.1", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.2", "system-configuration", "tokio", "tower-service", @@ -1041,6 +1954,30 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "icu_collections" version = "2.1.1" @@ -1155,6 +2092,58 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "if-addrs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0a05c691e1fae256cf7013d99dad472dc52d5543322761f83ec8d47eab40d2b" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "if-watch" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71c02a5161c313f0cbdbadc511611893584a10a7b6153cb554bdf83ddce99ec2" +dependencies = [ + "async-io", + "core-foundation 0.9.4", + "fnv", + "futures", + "if-addrs", + "ipnet", + "log", + "netlink-packet-core", + "netlink-packet-route", + "netlink-proto", + "netlink-sys", + "rtnetlink", + "system-configuration", + "tokio", + "windows", +] + +[[package]] +name = "igd-next" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064d90fec10d541084e7b39ead8875a5a80d9114a2b18791565253bae25f49e4" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http 0.2.12", + "hyper 0.14.32", + "log", + "rand 0.8.5", + "tokio", + "url", + "xmltree", +] + [[package]] name = "indexmap" version = "2.13.0" @@ -1176,6 +2165,15 @@ dependencies = [ "rustversion", ] +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + [[package]] name = "insta" version = "1.44.3" @@ -1200,6 +2198,28 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipconfig" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" +dependencies = [ + "socket2 0.6.2", + "widestring", + "windows-registry", + "windows-result", + "windows-sys 0.61.2", +] + [[package]] name = "ipnet" version = "2.12.0" @@ -1231,6 +2251,16 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + [[package]] name = "js-sys" version = "0.3.91" @@ -1253,21 +2283,28 @@ dependencies = [ ] [[package]] -name = "kasuari" -version = "0.4.12" +name = "jwalk" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +checksum = "2735847566356cd2179a2a38264839308f7079fa96e6bd5a42d740460e003c56" dependencies = [ - "hashbrown 0.16.1", - "portable-atomic", - "thiserror 2.0.18", + "crossbeam", + "rayon", ] [[package]] -name = "lab" -version = "0.11.0" +name = "k256" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] [[package]] name = "lazy_static" @@ -1288,29 +2325,452 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] -name = "libredox" -version = "0.1.15" +name = "libloading" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddbf48fd451246b1f8c2610bd3b4ac0cc6e149d89832867093ab69a17194f08" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ - "libc", + "cfg-if", + "windows-link", ] [[package]] -name = "line-clipping" -version = "0.3.5" +name = "libp2p" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4de44e98ddbf09375cbf4d17714d18f39195f4f4894e8524501726fd9a8a4a" +checksum = "681fb3f183edfbedd7a57d32ebe5dcdc0b9f94061185acf3c30249349cc6fc99" dependencies = [ - "bitflags 2.10.0", + "bytes", + "either", + "futures", + "futures-timer", + "getrandom 0.2.16", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-dns", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-mdns", + "libp2p-metrics", + "libp2p-noise", + "libp2p-ping", + "libp2p-quic", + "libp2p-request-response", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-upnp", + "libp2p-yamux", + "multiaddr", + "pin-project", + "rw-stream-sink", + "thiserror 1.0.69", ] [[package]] -name = "linked-hash-map" -version = "0.5.6" +name = "libp2p-allow-block-list" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - +checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7cd50a78ccfada14de94cbacd3ce4b0138157f376870f13d3a8422cd075b4fd" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-core" +version = "0.41.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a8920cbd8540059a01950c1e5c96ea8d89eb50c51cd366fc18bdf540a6e48f" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot", + "pin-project", + "quick-protobuf", + "rand 0.8.5", + "rw-stream-sink", + "smallvec", + "thiserror 1.0.69", + "tracing", + "unsigned-varint 0.8.0", + "void", + "web-time", +] + +[[package]] +name = "libp2p-dns" +version = "0.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d17cbcf7160ff35c3e8e560de4a068fe9d6cb777ea72840e48eb76ff9576c4b6" +dependencies = [ + "async-trait", + "futures", + "hickory-resolver", + "libp2p-core", + "libp2p-identity", + "parking_lot", + "smallvec", + "tracing", +] + +[[package]] +name = "libp2p-identify" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5d635ebea5ca0c3c3e77d414ae9b67eccf2a822be06091b9c1a0d13029a1e2f" +dependencies = [ + "asynchronous-codec", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "lru", + "quick-protobuf", + "quick-protobuf-codec", + "smallvec", + "thiserror 1.0.69", + "tracing", + "void", +] + +[[package]] +name = "libp2p-identity" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c7892c221730ba55f7196e98b0b8ba5e04b4155651736036628e9f73ed6fc3" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "hkdf", + "k256", + "multihash", + "quick-protobuf", + "rand 0.8.5", + "sha2", + "thiserror 2.0.18", + "tracing", + "zeroize", +] + +[[package]] +name = "libp2p-kad" +version = "0.45.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc5767727d062c4eac74dd812c998f0e488008e82cce9c33b463d38423f9ad2" +dependencies = [ + "arrayvec", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "quick-protobuf", + "quick-protobuf-codec", + "rand 0.8.5", + "sha2", + "smallvec", + "thiserror 1.0.69", + "tracing", + "uint", + "void", +] + +[[package]] +name = "libp2p-mdns" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49007d9a339b3e1d7eeebc4d67c05dbf23d300b7d091193ec2d3f26802d7faf2" +dependencies = [ + "data-encoding", + "futures", + "hickory-proto", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand 0.8.5", + "smallvec", + "socket2 0.5.10", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-metrics" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" +dependencies = [ + "futures", + "instant", + "libp2p-core", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-ping", + "libp2p-swarm", + "pin-project", + "prometheus-client", +] + +[[package]] +name = "libp2p-noise" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecd0545ce077f6ea5434bcb76e8d0fe942693b4380aaad0d34a358c2bd05793" +dependencies = [ + "asynchronous-codec", + "bytes", + "curve25519-dalek", + "futures", + "libp2p-core", + "libp2p-identity", + "multiaddr", + "multihash", + "once_cell", + "quick-protobuf", + "rand 0.8.5", + "sha2", + "snow", + "static_assertions", + "thiserror 1.0.69", + "tracing", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "libp2p-ping" +version = "0.44.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1de5a6cf64fba7f7e8f2102711c9c6c043a8e56b86db8cd306492c517da3fb3" +dependencies = [ + "either", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand 0.8.5", + "tracing", + "void", +] + +[[package]] +name = "libp2p-quic" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c67296ad4e092e23f92aea3d2bdb6f24eab79c0929ed816dfb460ea2f4567d2b" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-tls", + "parking_lot", + "quinn", + "rand 0.8.5", + "ring 0.17.14", + "rustls", + "socket2 0.5.10", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-request-response" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c314fe28368da5e3a262553fb0ad575c1c8934c461e10de10265551478163836" +dependencies = [ + "async-trait", + "futures", + "futures-bounded", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand 0.8.5", + "smallvec", + "tracing", + "void", +] + +[[package]] +name = "libp2p-swarm" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80cae6cb75f89dbca53862f9ebe0b9f463aa7b302762fcfaafb9e51dcc9b0f7e" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", + "lru", + "multistream-select", + "once_cell", + "rand 0.8.5", + "smallvec", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-swarm-derive" +version = "0.34.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5daceb9dd908417b6dfcfe8e94098bc4aac54500c282e78120b885dadc09b999" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "libp2p-tcp" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2460fc2748919adff99ecbc1aab296e4579e41f374fb164149bd2c9e529d4c" +dependencies = [ + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core", + "libp2p-identity", + "socket2 0.5.10", + "tokio", + "tracing", +] + +[[package]] +name = "libp2p-tls" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b7b831e55ce2aa6c354e6861a85fdd4dd0a2b97d5e276fabac0e4810a71776" +dependencies = [ + "futures", + "futures-rustls", + "libp2p-core", + "libp2p-identity", + "rcgen", + "ring 0.17.14", + "rustls", + "rustls-webpki 0.101.7", + "thiserror 1.0.69", + "x509-parser", + "yasna", +] + +[[package]] +name = "libp2p-upnp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccf04b0e3ff3de52d07d5fd6c3b061d0e7f908ffc683c32d9638caedce86fc8" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core", + "libp2p-swarm", + "tokio", + "tracing", + "void", +] + +[[package]] +name = "libp2p-yamux" +version = "0.45.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd5265f6b80f94d48a3963541aad183cc598a645755d2f1805a373e41e0716b" +dependencies = [ + "either", + "futures", + "libp2p-core", + "thiserror 1.0.69", + "tracing", + "yamux 0.12.1", + "yamux 0.13.10", +] + +[[package]] +name = "librocksdb-sys" +version = "0.17.3+10.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef2a00ee60fe526157c9023edab23943fae1ce2ab6f4abb2a807c1746835de9" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "libc", + "libz-sys", + "lz4-sys", + "zstd-sys", +] + +[[package]] +name = "libz-sys" +version = "1.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -1350,17 +2810,43 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.15.5", ] [[package]] -name = "mac_address" -version = "1.1.8" +name = "lru-cache" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "nix", - "winapi", + "linked-hash-map", +] + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "match-lookup" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -1372,6 +2858,12 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" version = "2.7.6" @@ -1399,6 +2891,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1417,6 +2919,61 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "multiaddr" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.8.0", + "url", +] + +[[package]] +name = "multibase" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8694bb4835f452b0e3bb06dbebb1d6fc5385b6ca1caf2e55fd165c042390ec77" +dependencies = [ + "base-x", + "base256emoji", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ace881e3f514092ce9efbcb8f413d0ad9763860b828981c2de51ddc666936c" +dependencies = [ + "no_std_io2", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint 0.7.2", +] + [[package]] name = "native-tls" version = "0.2.18" @@ -1434,19 +2991,81 @@ dependencies = [ "tempfile", ] +[[package]] +name = "netlink-packet-core" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3463cbb78394cb0141e2c926b93fc2197e473394b761986eca3b9da2c63ae0f4" +dependencies = [ + "paste", +] + +[[package]] +name = "netlink-packet-route" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ce3636fa715e988114552619582b530481fd5ef176a1e5c1bf024077c2c9445" +dependencies = [ + "bitflags 2.10.0", + "libc", + "log", + "netlink-packet-core", +] + +[[package]] +name = "netlink-proto" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65d130ee111430e47eed7896ea43ca693c387f097dd97376bffafbf25812128" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror 2.0.18", +] + +[[package]] +name = "netlink-sys" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6c30ed10fa69cc491d491b85cc971f6bdeb8e7367b7cde2ee6cc878d583fae" +dependencies = [ + "bytes", + "futures-util", + "libc", + "log", + "tokio", +] + [[package]] name = "nix" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags 2.10.0", "cfg-if", "cfg_aliases", "libc", - "memoffset", ] +[[package]] +name = "no_std_io2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a3564ce7035b1e4778d8cb6cacebb5d766b5e8fe5a75b9e441e33fb61a872c6" +dependencies = [ + "memchr", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "7.1.3" @@ -1463,7 +3082,17 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", ] [[package]] @@ -1473,14 +3102,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] -name = "num-derive" -version = "0.4.2" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", + "num-traits", ] [[package]] @@ -1493,12 +3120,12 @@ dependencies = [ ] [[package]] -name = "num_threads" -version = "0.1.7" +name = "oid-registry" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ - "libc", + "asn1-rs", ] [[package]] @@ -1507,6 +3134,12 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl" version = "0.10.75" @@ -1531,6 +3164,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -1586,10 +3220,32 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "p2poolv2_api" +version = "0.10.4" +source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +dependencies = [ + "axum", + "base64 0.22.1", + "bitcoin", + "chrono", + "hex", + "hmac", + "p2poolv2_lib", + "serde", + "serde_json", + "sha2", + "subtle", + "tokio", + "tower-http", + "tracing", + "tracing-subscriber", +] + [[package]] name = "p2poolv2_config" -version = "0.10.6" -source = "git+https://github.com/p2poolv2/p2poolv2#f448917decf9e12529637ebd37715cb3327c572b" +version = "0.10.4" +source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" dependencies = [ "bitcoin", "bitcoindrpc", @@ -1597,6 +3253,51 @@ dependencies = [ "serde", ] +[[package]] +name = "p2poolv2_lib" +version = "0.10.4" +source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bitcoin", + "bitcoinconsensus", + "bitcoindrpc", + "chrono", + "config 0.13.4", + "dashmap", + "futures", + "hex", + "hmac", + "libp2p", + "p2poolv2_config", + "rand 0.8.5", + "rocksdb", + "rust_decimal", + "rust_decimal_macros", + "serde", + "serde_json", + "sha2", + "tempfile", + "thiserror 2.0.18", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", + "tracing-appender", + "tracing-subscriber", + "uint", + "void", + "zmq", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.5" @@ -1631,19 +3332,34 @@ name = "pdm" version = "0.1.0" dependencies = [ "anyhow", + "base64 0.22.1", "bitcoin", + "chrono", "config 0.15.19", - "crossterm", - "directories", + "crossterm 0.29.0", + "futures-util", "insta", + "p2poolv2_api", "p2poolv2_config", "ratatui", + "reqwest", "serde", - "serial_test", + "serde_json", "tempfile", - "toml 0.8.23", - "toml_edit", - "unicode-width", + "tokio", + "tokio-tungstenite 0.23.1", + "toml_edit 0.22.27", + "url", +] + +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", ] [[package]] @@ -1683,126 +3399,265 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", +] + +[[package]] +name = "pest_meta" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +dependencies = [ + "pest", + "sha2", +] + +[[package]] +name = "pin-project" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +dependencies = [ + "pin-project-internal", ] [[package]] -name = "pest_meta" -version = "2.8.5" +name = "pin-project-internal" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "pest", - "sha2", + "zerocopy", ] [[package]] -name = "phf" -version = "0.11.3" +name = "proc-macro-crate" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "phf_macros", - "phf_shared", + "toml_edit 0.23.10+spec-1.0.0", ] [[package]] -name = "phf_codegen" -version = "0.11.3" +name = "proc-macro2" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ - "phf_generator", - "phf_shared", + "unicode-ident", ] [[package]] -name = "phf_generator" -version = "0.11.3" +name = "prometheus-client" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" dependencies = [ - "phf_shared", - "rand", + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", ] [[package]] -name = "phf_macros" -version = "0.11.3" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ - "phf_generator", - "phf_shared", "proc-macro2", "quote", "syn 2.0.111", ] [[package]] -name = "phf_shared" -version = "0.11.3" +name = "ptr_meta" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "siphasher", + "ptr_meta_derive", ] [[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" +name = "ptr_meta_derive" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "portable-atomic" -version = "1.13.1" +name = "quick-protobuf" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] [[package]] -name = "potential_utf" -version = "0.1.4" +name = "quick-protobuf-codec" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "15a0580ab32b169745d7a39db2ba969226ca16738931be152a3209b409de2474" dependencies = [ - "zerovec", + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror 1.0.69", + "unsigned-varint 0.8.0", ] [[package]] -name = "powerfmt" -version = "0.2.0" +name = "quinn" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "futures-io", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2 0.6.2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] [[package]] -name = "prettyplease" -version = "0.2.37" +name = "quinn-proto" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ - "proc-macro2", - "syn 2.0.111", + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.4", + "ring 0.17.14", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", ] [[package]] -name = "proc-macro2" -version = "1.0.103" +name = "quinn-udp" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ - "unicode-ident", + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.6.2", + "tracing", + "windows-sys 0.60.2", ] [[package]] @@ -1821,10 +3676,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] -name = "r-efi" -version = "6.0.0" +name = "radium" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" @@ -1832,7 +3687,39 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "rand_core", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", ] [[package]] @@ -1840,6 +3727,18 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] [[package]] name = "ratatui" @@ -1872,58 +3771,39 @@ dependencies = [ "thiserror 2.0.18", "unicode-segmentation", "unicode-truncate", - "unicode-width", -] - -[[package]] -name = "ratatui-crossterm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "577c9b9f652b4c121fb25c6a391dd06406d3b092ba68827e6d2f09550edc54b3" -dependencies = [ - "cfg-if", - "crossterm", - "instability", - "ratatui-core", + "unicode-width 0.2.0", ] [[package]] -name = "ratatui-macros" -version = "0.7.0" +name = "rayon" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f1342a13e83e4bb9d0b793d0ea762be633f9582048c892ae9041ef39c936f4" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ - "ratatui-core", - "ratatui-widgets", + "either", + "rayon-core", ] [[package]] -name = "ratatui-termwiz" -version = "0.1.0" +name = "rayon-core" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f76fe0bd0ed4295f0321b1676732e2454024c15a35d01904ddb315afd3d545c" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ - "ratatui-core", - "termwiz", + "crossbeam-deque", + "crossbeam-utils", ] [[package]] -name = "ratatui-widgets" -version = "0.3.0" +name = "rcgen" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" dependencies = [ - "bitflags 2.10.0", - "hashbrown 0.16.1", - "indoc", - "instability", - "itertools", - "line-clipping", - "ratatui-core", - "strum", + "pem", + "ring 0.16.20", "time", - "unicode-segmentation", - "unicode-width", + "yasna", ] [[package]] @@ -1935,17 +3815,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror 2.0.18", -] - [[package]] name = "regex" version = "1.12.3" @@ -1975,6 +3844,15 @@ version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + [[package]] name = "reqwest" version = "0.12.28" @@ -1985,11 +3863,11 @@ dependencies = [ "bytes", "encoding_rs", "futures-core", - "h2", - "http", - "http-body", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", "http-body-util", - "hyper", + "hyper 1.8.1", "hyper-rustls", "hyper-tls", "hyper-util", @@ -1999,6 +3877,8 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pki-types", "serde", "serde_json", @@ -2006,6 +3886,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-native-tls", + "tokio-rustls", "tower", "tower-http", "tower-service", @@ -2013,6 +3894,38 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", +] + +[[package]] +name = "resolv-conf" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[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", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] @@ -2025,10 +3938,49 @@ dependencies = [ "cfg-if", "getrandom 0.2.16", "libc", - "untrusted", + "untrusted 0.9.0", "windows-sys 0.52.0", ] +[[package]] +name = "rkyv" +version = "0.7.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rocksdb" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddb7af00d2b17dbd07d82c0063e25411959748ff03e8d4f96134c2ff41fce34f" +dependencies = [ + "libc", + "librocksdb-sys", +] + [[package]] name = "ron" version = "0.7.1" @@ -2055,32 +4007,106 @@ dependencies = [ ] [[package]] -name = "rust-ini" -version = "0.18.0" +name = "rtnetlink" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b960d5d873a75b5be9761b1e73b146f52dddcd27bac75263f40fba686d4d7b5" +dependencies = [ + "futures-channel", + "futures-util", + "log", + "netlink-packet-core", + "netlink-packet-route", + "netlink-proto", + "netlink-sys", + "nix", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "rust-ini" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap 0.4.3", +] + +[[package]] +name = "rust-ini" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7" +dependencies = [ + "cfg-if", + "ordered-multimap 0.7.3", +] + +[[package]] +name = "rust_decimal" +version = "1.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ce901f9a19d251159075a4c37af514c3b8ef99c22e02dd8c19161cf397ee94a" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand 0.8.5", + "rkyv", + "serde", + "serde_json", + "wasm-bindgen", + "zmij", +] + +[[package]] +name = "rust_decimal_macros" +version = "1.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74a5a6f027e892c7a035c6fddb50435a1fbf5a734ffc0c2a9fed4d0221440519" +dependencies = [ + "quote", + "syn 2.0.111", +] + +[[package]] +name = "rustc-hash" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "cfg-if", - "ordered-multimap 0.4.3", + "semver", ] [[package]] -name = "rust-ini" -version = "0.21.3" +name = "rusticata-macros" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "cfg-if", - "ordered-multimap 0.7.3", + "nom", ] [[package]] -name = "rustc_version" -version = "0.4.1" +name = "rustix" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "semver", + "bitflags 2.10.0", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", ] [[package]] @@ -2103,8 +4129,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "once_cell", + "ring 0.17.14", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.103.9", "subtle", "zeroize", ] @@ -2115,18 +4142,29 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ + "web-time", "zeroize", ] +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ - "ring", + "ring 0.17.14", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] @@ -2135,6 +4173,17 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.20" @@ -2142,12 +4191,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] -name = "scc" -version = "2.4.0" +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "sdd", + "winapi-util", ] [[package]] @@ -2166,10 +4215,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sdd" -version = "3.0.10" +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] [[package]] name = "secp256k1" @@ -2178,7 +4241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "bitcoin_hashes", - "rand", + "rand 0.8.5", "secp256k1-sys", "serde", ] @@ -2261,6 +4324,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -2276,6 +4340,17 @@ dependencies = [ "zmij", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + [[package]] name = "serde_spanned" version = "0.6.9" @@ -2307,29 +4382,14 @@ dependencies = [ ] [[package]] -name = "serial_test" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" -dependencies = [ - "futures-executor", - "futures-util", - "log", - "once_cell", - "parking_lot", - "scc", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "3.4.0" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", + "cfg-if", + "cpufeatures", + "digest", ] [[package]] @@ -2388,6 +4448,22 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "similar" version = "2.7.0" @@ -2412,6 +4488,33 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "snow" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" +dependencies = [ + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek", + "rand_core 0.6.4", + "ring 0.17.14", + "rustc_version", + "sha2", + "subtle", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.2" @@ -2422,6 +4525,22 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -2458,6 +4577,7 @@ dependencies = [ "heck", "proc-macro2", "quote", + "rustversion", "syn 2.0.111", ] @@ -2467,6 +4587,12 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + [[package]] name = "syn" version = "1.0.109" @@ -2507,6 +4633,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -2531,79 +4658,41 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.23.0" +name = "system-deps" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "fastrand", - "getrandom 0.3.4", - "once_cell", - "rustix", - "windows-sys 0.59.0", + "cfg-expr", + "heck", + "pkg-config", + "toml 0.8.23", + "version-compare", ] [[package]] -name = "terminfo" -version = "0.9.0" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" -dependencies = [ - "fnv", - "nom", - "phf", - "phf_codegen", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "termios" -version = "0.3.3" +name = "target-lexicon" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -dependencies = [ - "libc", -] +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] -name = "termwiz" -version = "0.23.3" +name = "tempfile" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "anyhow", - "base64 0.22.1", - "bitflags 2.10.0", - "fancy-regex", - "filedescriptor", - "finl_unicode", - "fixedbitset", - "hex", - "lazy_static", - "libc", - "log", - "memmem", - "nix", - "num-derive", - "num-traits", - "ordered-float", - "pest", - "pest_derive", - "phf", - "sha2", - "signal-hook", - "siphasher", - "terminfo", - "termios", - "thiserror 1.0.69", - "ucd-trie", - "unicode-segmentation", - "vtparse", - "wezterm-bidi", - "wezterm-blob-leases", - "wezterm-color-types", - "wezterm-dynamic", - "wezterm-input-types", - "winapi", + "fastrand", + "getrandom 0.3.4", + "once_cell", + "rustix 1.1.2", + "windows-sys 0.61.2", ] [[package]] @@ -2662,12 +4751,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", - "libc", + "itoa", "num-conv", - "num_threads", "powerfmt", "serde_core", "time-core", + "time-macros", ] [[package]] @@ -2676,6 +4765,16 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -2695,6 +4794,21 @@ dependencies = [ "zerovec", ] +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" version = "1.50.0" @@ -2707,7 +4821,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.2", "tokio-macros", "windows-sys 0.61.2", ] @@ -2721,6 +4835,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -2743,6 +4858,41 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.23.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.24.0", +] + [[package]] name = "tokio-util" version = "0.7.18" @@ -2774,7 +4924,7 @@ dependencies = [ "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", - "toml_edit", + "toml_edit 0.22.27", ] [[package]] @@ -2822,6 +4972,18 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.23.10+spec-1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +dependencies = [ + "indexmap", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow", +] + [[package]] name = "toml_parser" version = "1.0.6+spec-1.1.0" @@ -2848,8 +5010,10 @@ dependencies = [ "pin-project-lite", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -2860,14 +5024,24 @@ checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags 2.10.0", "bytes", + "futures-core", "futures-util", - "http", - "http-body", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "http-range-header", + "httpdate", "iri-string", + "mime", + "mime_guess", + "percent-encoding", "pin-project-lite", + "tokio", + "tokio-util", "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -2888,11 +5062,25 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" +dependencies = [ + "crossbeam-channel", + "symlink", + "thiserror 2.0.18", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.31" @@ -2902,6 +5090,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -2949,6 +5138,42 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.4.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror 1.0.69", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.4.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror 1.0.69", + "utf-8", +] + [[package]] name = "typeid" version = "1.0.3" @@ -2967,6 +5192,24 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[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.22" @@ -3000,7 +5243,35 @@ checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" @@ -3021,25 +5292,23 @@ dependencies = [ ] [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "utf-8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "utf8parse" -version = "0.2.2" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ - "atomic", - "getrandom 0.4.2", "js-sys", "wasm-bindgen", ] @@ -3056,6 +5325,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + [[package]] name = "version_check" version = "0.9.5" @@ -3063,12 +5338,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "vtparse" -version = "0.6.2" +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9b2acfb050df409c972a37d3b8e08cdea3bddb0c09db9d53137e504cfabed0" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ - "utf8parse", + "same-file", + "winapi-util", ] [[package]] @@ -3113,6 +5395,7 @@ dependencies = [ "cfg-if", "once_cell", "rustversion", + "serde", "wasm-bindgen-macro", "wasm-bindgen-shared", ] @@ -3151,6 +5434,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -3208,98 +5492,127 @@ dependencies = [ ] [[package]] -name = "wezterm-bidi" -version = "0.2.3" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0a6e355560527dd2d1cf7890652f4f09bb3433b6aadade4c9b5ed76de5f3ec" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ - "log", - "wezterm-dynamic", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "wezterm-blob-leases" -version = "0.1.1" +name = "webpki-roots" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" dependencies = [ - "getrandom 0.3.4", - "mac_address", - "sha2", - "thiserror 1.0.69", - "uuid", + "rustls-pki-types", ] [[package]] -name = "wezterm-color-types" -version = "0.3.0" +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + +[[package]] +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "csscolorparser", - "deltae", - "lazy_static", - "wezterm-dynamic", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "wezterm-dynamic" -version = "0.2.1" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2ab60e120fd6eaa68d9567f3226e876684639d22a4219b313ff69ec0ccd5ac" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "log", - "ordered-float", - "strsim", - "thiserror 1.0.69", - "wezterm-dynamic-derive", + "windows-sys 0.61.2", ] [[package]] -name = "wezterm-dynamic-derive" -version = "0.1.1" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c0cf2d539c645b448eaffec9ec494b8b19bd5077d9e58cb1ae7efece8d575b" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", ] [[package]] -name = "wezterm-input-types" -version = "0.1.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ - "bitflags 1.3.2", - "euclid", - "lazy_static", - "serde", - "wezterm-dynamic", + "windows-core", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "windows-core" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-future" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-implement" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] [[package]] name = "windows-link" @@ -3307,6 +5620,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.6.1" @@ -3405,6 +5728,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -3610,6 +5942,59 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror 1.0.69", + "time", +] + +[[package]] +name = "xml-rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + [[package]] name = "yaml-rust" version = "0.4.5" @@ -3630,6 +6015,46 @@ dependencies = [ "hashlink", ] +[[package]] +name = "yamux" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot", + "pin-project", + "rand 0.8.5", + "static_assertions", +] + +[[package]] +name = "yamux" +version = "0.13.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1991f6690292030e31b0144d73f5e8368936c58e45e7068254f7138b23b00672" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot", + "pin-project", + "rand 0.9.4", + "static_assertions", + "web-time", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + [[package]] name = "yoke" version = "0.8.1" @@ -3650,9 +6075,30 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", "synstructure", ] +[[package]] +name = "zerocopy" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "zerofrom" version = "0.1.6" @@ -3671,6 +6117,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", "synstructure", ] @@ -3679,6 +6126,30 @@ name = "zeroize" version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "zeromq-src" +version = "0.2.6+4.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc120b771270365d5ed0dfb4baf1005f2243ae1ae83703265cb3504070f4160b" +dependencies = [ + "cc", + "dircpy", +] [[package]] name = "zerotrie" @@ -3711,6 +6182,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.111", + "syn 2.0.111", ] [[package]] @@ -3718,3 +6190,35 @@ name = "zmij" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" + +[[package]] +name = "zmq" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd3091dd571fb84a9b3e5e5c6a807d186c411c812c8618786c3c30e5349234e7" +dependencies = [ + "bitflags 1.3.2", + "libc", + "zmq-sys", +] + +[[package]] +name = "zmq-sys" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e8351dc72494b4d7f5652a681c33634063bbad58046c1689e75270908fdc864" +dependencies = [ + "libc", + "system-deps", + "zeromq-src", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 7b690d0..468a729 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,18 @@ serde = { version = "1", features = ["derive"] } toml = "0.8" unicode-width = "0.2" p2poolv2_config = { git = "https://github.com/p2poolv2/p2poolv2", package = "p2poolv2_config" } +p2poolv2_api = { git = "https://github.com/p2poolv2/p2poolv2", package = "p2poolv2_api" } bitcoin = "0.32.5" toml_edit = "0.22" +reqwest = { version = "0.12", features = ["json", "rustls-tls"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0.135" +tokio = { version = "1.0", features = ["full"] } +tokio-tungstenite = "0.23" +futures-util = "0.3" +url = "2" +chrono = "0.4.44" +base64 = "0.22.1" [dev-dependencies] insta = "1.44.3" diff --git a/config/pdm.toml b/config/pdm.toml new file mode 100644 index 0000000..8d74355 --- /dev/null +++ b/config/pdm.toml @@ -0,0 +1,5 @@ +[api] +host = "127.0.0.1" +port = 46884 +auth_user = "p2pool" +auth_pass = "p2pool" diff --git a/src/app.rs b/src/app.rs index 8452e30..926587b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -5,9 +5,12 @@ use crate::bitcoin_config::ConfigEntry as BitcoinEntry; use crate::components::bitcoin_config_view::BitcoinConfigView; use crate::components::file_explorer::FileExplorer; +use crate::components::p2pool_client::{ChainInfo, PeerInfo, ShareInfo}; use crate::components::p2pool_config_view::P2PoolConfigView; use crate::components::settings_view::SettingsView; use crate::settings::Settings; +use crate::components::p2pool_log_parser::ParsedP2PoolState; +use crate::p2poolv2_config::P2PoolConfigEntry as P2PoolEntry; use p2poolv2_config::Config as P2PoolConfig; use std::path::PathBuf; @@ -31,6 +34,11 @@ pub const BITCOIN_STATUS_TABS: &[&str] = &["Chain Info", "System", "Logs", "Peer pub const MAX_BITCOIN_STATUS_TAB: usize = BITCOIN_STATUS_TABS.len() - 1; +/// Tab labels for the P2Pool Status view +pub const P2POOL_STATUS_TABS: &[&str] = &["Chain Info", "System", "Logs", "Peers", "Shares"]; + +pub const MAX_P2POOL_STATUS_TAB: usize = P2POOL_STATUS_TABS.len() - 1; + #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub enum CurrentScreen { Home, @@ -102,6 +110,13 @@ pub struct App { /// Cached result of `settings::config_dir()`, used to display the default /// settings storage path without repeated env-var lookups during rendering. pub config_dir: PathBuf, + pub p2pool_data: Vec, + pub p2pool_status_tab: usize, + pub chain_info: Option, + pub peers: Vec, + pub recent_shares: Vec, + pub p2pool_logs: Vec, + pub p2pool_state: ParsedP2PoolState, } impl App { @@ -123,6 +138,13 @@ impl App { settings: Settings::default(), home_dir: std::env::var("HOME").unwrap_or_default(), config_dir: crate::settings::config_dir().unwrap_or_default(), + p2pool_data: Vec::new(), + p2pool_status_tab: 0, + chain_info: None, + peers: Vec::new(), + recent_shares: Vec::new(), + p2pool_logs: Vec::new(), + p2pool_state: ParsedP2PoolState::new(), } } @@ -133,6 +155,11 @@ impl App { self.bitcoin_config_view.save_message = None; self.bitcoin_config_view.editing = false; self.bitcoin_config_view.edit_input.clear(); + } else if self.current_screen == CurrentScreen::P2PoolConfig { + self.p2pool_config_view.warning_message = None; + self.p2pool_config_view.save_message = None; + self.p2pool_config_view.editing = false; + self.p2pool_config_view.edit_input.clear(); } if self.current_screen == CurrentScreen::P2PoolConfig { self.p2pool_config_view.warning_message = None; diff --git a/src/components/mod.rs b/src/components/mod.rs index 65ecad5..e0336d3 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -8,8 +8,11 @@ pub mod file_explorer; pub mod home_view; pub mod ln_config_view; pub mod ln_status_view; +pub mod p2pool_client; pub mod p2pool_config_view; +pub mod p2pool_log_parser; pub mod p2pool_status_view; pub mod settings_view; +pub mod p2pool_websockets; pub mod shares_market_view; pub mod status_bar; diff --git a/src/components/p2pool_client.rs b/src/components/p2pool_client.rs new file mode 100644 index 0000000..334815d --- /dev/null +++ b/src/components/p2pool_client.rs @@ -0,0 +1,272 @@ +// SPDX-FileCopyrightText: 2024 PDM Authors +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use crate::config::load_api_config; +use reqwest::Client; +use serde::Deserialize; +use std::time::Duration; + +const REQUEST_TIMEOUT_SECONDS: u64 = 10; + +#[derive(Debug, Clone)] +pub struct P2PoolClient { + client: Client, + base_url: String, +} + +impl P2PoolClient { + pub fn new() -> Self { + let client = Client::builder() + .timeout(Duration::from_secs(REQUEST_TIMEOUT_SECONDS)) + .build() + .expect("failed to build reqwest client"); + + let base_url = load_api_config() + .expect("failed to load API config") + .base_url; + + Self { client, base_url } + } + + pub fn with_base_url(base_url: impl Into) -> Self { + let client = Client::builder() + .timeout(Duration::from_secs(REQUEST_TIMEOUT_SECONDS)) + .build() + .expect("failed to build reqwest client"); + + Self { + client, + base_url: base_url.into(), + } + } + + pub async fn fetch_health(&self) -> Result { + let url = format!("{}/health", self.base_url); + + let response = self.client.get(url).send().await?; + let text = response.text().await?; + + Ok(text) + } + + // ✏️ CHANGED: renamed from fetch_metrics_raw, added basic_auth param + pub async fn fetch_metrics(&self, basic_auth: Option<&str>) -> Result { + let url = format!("{}/metrics", self.base_url); + + let mut request = self.client.get(url); + if let Some(auth) = basic_auth { + request = request.header("Authorization", auth); + } + + let response = request.send().await?; + let text = response.text().await?; + + Ok(text) + } + + pub async fn fetch_chain_info(&self) -> Result { + let url = format!("{}/chain_info", self.base_url); + + let response = self.client.get(url).send().await?; + let data = response.json::().await?; + + Ok(data) + } + + pub async fn fetch_peers(&self) -> Result, reqwest::Error> { + let url = format!("{}/peers", self.base_url); + + let response = self.client.get(url).send().await?; + let data = response.json::>().await?; + + Ok(data) + } + + pub async fn fetch_shares( + &self, + to: Option, + num: Option, + ) -> Result { + let url = format!("{}/shares", self.base_url); + + let mut request = self.client.get(url); + + if let Some(to) = to { + request = request.query(&[("to", to)]); + } + + if let Some(num) = num { + request = request.query(&[("num", num)]); + } + + let response = request.send().await?; + let data = response.json::().await?; + + Ok(data) + } + + pub async fn fetch_candidates( + &self, + to: Option, + num: Option, + ) -> Result { + let url = format!("{}/candidates", self.base_url); + + let mut request = self.client.get(url); + + if let Some(to) = to { + request = request.query(&[("to", to)]); + } + + if let Some(num) = num { + request = request.query(&[("num", num)]); + } + + let response = request.send().await?; + let data = response.json::().await?; + + Ok(data) + } + + pub async fn fetch_share_by_height( + &self, + height: u64, + ) -> Result, reqwest::Error> { + let url = format!("{}/share", self.base_url); + + let response = self + .client + .get(url) + .query(&[("height", height)]) + .send() + .await?; + + let data = response.json::>().await?; + + Ok(data) + } + + pub async fn fetch_pplns_shares( + &self, + limit: Option, + ) -> Result { + let url = format!("{}/pplns_shares", self.base_url); + + let mut request = self.client.get(url); + + if let Some(limit) = limit { + request = request.query(&[("limit", limit)]); + } + + let response = request.send().await?; + let data = response.json::().await?; + + Ok(data) + } +} + +impl Default for P2PoolClient { + fn default() -> Self { + Self::new() + } +} + +#[derive(Debug, Clone, Deserialize)] +pub struct ChainInfo { + pub genesis_blockhash: Option, + pub chain_tip_height: Option, + pub total_work: String, + pub chain_tip_blockhash: Option, + pub top_candidate_height: Option, + pub top_candidate_blockhash: Option, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct PeerInfo { + pub peer_id: String, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct SharesResponse { + pub from_height: u64, + pub to_height: u64, + pub shares: Vec, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct ShareInfo { + pub blockhash: String, + pub prev_blockhash: String, + pub height: u64, + pub miner_address: String, + pub timestamp: u64, + pub bits: String, + pub uncles: Vec, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct UncleInfo { + pub blockhash: String, + pub prev_blockhash: String, + pub miner_address: String, + pub timestamp: u64, + pub height: u64, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct ShareDetail { + pub blockhash: String, + pub height: Option, + pub status: String, + pub parent: String, + pub uncles: Vec, + pub miner_address: String, + pub merkle_root: String, + pub bits: String, + pub time: String, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_client_creation() { + let client = P2PoolClient::new(); + + let expected = load_api_config().unwrap().base_url; + assert_eq!(client.base_url, expected); + } + + #[test] + fn test_custom_base_url() { + let client = P2PoolClient::with_base_url("http://localhost:9999"); + + assert_eq!(client.base_url, "http://localhost:9999"); + } + + #[test] + fn test_chain_info_model() { + let model = ChainInfo { + genesis_blockhash: Some("genesis".to_string()), + chain_tip_height: Some(100), + total_work: "abcd1234".to_string(), + chain_tip_blockhash: Some("tiphash".to_string()), + top_candidate_height: Some(101), + top_candidate_blockhash: Some("candidate".to_string()), + }; + + assert_eq!(model.chain_tip_height, Some(100)); + assert_eq!(model.top_candidate_height, Some(101)); + } + + #[test] + fn test_peer_model() { + let peer = PeerInfo { + peer_id: "12D3KooWExample".to_string(), + }; + + assert_eq!(peer.peer_id, "12D3KooWExample"); + } +} diff --git a/src/components/p2pool_log_parser.rs b/src/components/p2pool_log_parser.rs new file mode 100644 index 0000000..af71747 --- /dev/null +++ b/src/components/p2pool_log_parser.rs @@ -0,0 +1,134 @@ +// SPDX-FileCopyrightText: 2024 PDM Authors +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use serde::Deserialize; + +#[derive(Debug, Deserialize)] +struct WsMessage { + topic: String, + data: serde_json::Value, +} + +#[derive(Debug, Default, Clone)] +pub struct ParsedP2PoolState { + pub miner_connected: bool, + pub last_share_status: String, + pub last_block_status: String, + pub last_submit_time: String, + pub recent_logs: Vec, +} + +impl ParsedP2PoolState { + pub fn new() -> Self { + Self { + miner_connected: false, + last_share_status: "No shares yet".to_string(), + last_block_status: "No blocks submitted".to_string(), + last_submit_time: "-".to_string(), + recent_logs: Vec::new(), + } + } + + pub fn parse_log_line(&mut self, line: &str) { + let line = line.trim(); + if line.is_empty() { + return; + } + + self.recent_logs.push(line.to_string()); + if self.recent_logs.len() > 100 { + self.recent_logs.remove(0); + } + + // Lines from the WS are prefixed e.g. "[SHARE EVENT] {json}" + // Strip the prefix to get the raw JSON payload + let json_part = if let Some(pos) = line.find('{') { + &line[pos..] + } else { + return; + }; + + if let Ok(msg) = serde_json::from_str::(json_part) { + match msg.topic.as_str() { + "Share" => { + // A share arrived — miner must be connected + self.miner_connected = true; + self.last_share_status = "Share accepted".to_string(); + self.last_submit_time = msg + .data + .get("timestamp") + .and_then(|v| v.as_u64()) + .map(|ts| { + chrono::DateTime::from_timestamp(ts as i64, 0) + .map(|dt| dt.format("%H:%M:%S").to_string()) + .unwrap_or_else(|| ts.to_string()) + }) + .unwrap_or_else(|| chrono::Utc::now().format("%H:%M:%S").to_string()); + if let Some(height) = msg.data.get("height").and_then(|v| v.as_u64()) { + self.last_share_status = format!("Accepted at height {}", height); + } + } + "Peer" => { + // Peer events don't affect miner/share state + // but are already in recent_logs for the Logs tab + } + "Chain" => { + if msg.data.get("block_submitted").is_some() { + self.last_block_status = "Block submitted successfully".to_string(); + } + } + _ => {} + } + } + } + + /// Update miner connected state and share stats from /metrics response. + /// Called on each REST poll as a fallback since the WS only emits + /// share events (not miner connect/disconnect events). + pub fn parse_metrics(&mut self, metrics_text: &str) { + for line in metrics_text.lines() { + if line.starts_with('#') || line.is_empty() { + continue; + } + + // worker_last_share_at{...} — non-zero means a miner + // has submitted at least one share this session + if line.starts_with("worker_last_share_at") { + let val: f64 = line + .split_whitespace() + .last() + .and_then(|v| v.parse().ok()) + .unwrap_or(0.0); + if val > 0.0 { + self.miner_connected = true; + } + } + + if line.starts_with("shares_accepted_total") { + let count: u64 = line + .split_whitespace() + .last() + .and_then(|v| v.parse().ok()) + .unwrap_or(0); + if count > 0 { + self.last_share_status = format!("{} accepted", count); + } + } + + if line.starts_with("shares_rejected_total") { + let count: u64 = line + .split_whitespace() + .last() + .and_then(|v| v.parse().ok()) + .unwrap_or(0); + if count > 0 { + // Only update if we don't have a better status already + if self.last_share_status == "No shares yet" { + self.last_share_status = format!("{} rejected", count); + } + } + } + } + } +} diff --git a/src/components/p2pool_status_view.rs b/src/components/p2pool_status_view.rs index e4fab69..bdf3364 100644 --- a/src/components/p2pool_status_view.rs +++ b/src/components/p2pool_status_view.rs @@ -2,10 +2,10 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -use crate::app::App; +use crate::app::{App, P2POOL_STATUS_TABS}; use ratatui::{ prelude::*, - widgets::{Block, Borders, Paragraph}, + widgets::{Block, Borders, Cell, List, ListItem, Paragraph, Row, Table, Tabs, Wrap}, }; #[derive(Debug, Clone)] @@ -17,14 +17,180 @@ impl P2PoolStatusView { Self } - // P2Pool Status - pub fn render(f: &mut Frame, _app: &mut App, area: Rect) { - let p = Paragraph::new("P2Pool Status").block( + pub fn render(f: &mut Frame, app: &App, area: Rect) { + let outer = Layout::default() + .direction(Direction::Vertical) + .constraints([ + Constraint::Length(4), // Tabs bar + Constraint::Min(0), // Content area + ]) + .split(area); + + let tabs = Tabs::new(P2POOL_STATUS_TABS.to_vec()) + .block(Block::default().borders(Borders::ALL).title(" Info ")) + .select(app.p2pool_status_tab) + .highlight_style(Style::default().bg(Color::Gray).fg(Color::Black)); + + f.render_widget(tabs, outer[0]); + + match app.p2pool_status_tab { + 0 => Self::render_chain_info(f, app, outer[1]), + 1 => Self::render_system(f, app, outer[1]), + 2 => Self::render_logs(f, app, outer[1]), + 3 => Self::render_peers(f, app, outer[1]), + 4 => Self::render_shares(f, app, outer[1]), + _ => {} + } + } + + // CHAIN INFO TAB + fn render_chain_info(f: &mut Frame, app: &App, area: Rect) { + let text = if let Some(info) = &app.chain_info { + vec![ + Line::from(format!( + "Chain Tip Height : {}", + info.chain_tip_height.unwrap_or(0) + )), + Line::from(format!( + "Top Candidate Height : {:?}", + info.top_candidate_height + )), + Line::from(format!("Total Work : {}", info.total_work)), + Line::from(format!( + "Tip Blockhash : {}", + info.chain_tip_blockhash.as_deref().unwrap_or("-") + )), + ] + } else { + vec![Line::from("Loading chain info...")] + }; + + let paragraph = Paragraph::new(text) + .block(Block::default().borders(Borders::ALL).title(" Chain Info ")) + .wrap(Wrap { trim: true }); + + f.render_widget(paragraph, area); + } + + // SYSTEM TAB + fn render_system(f: &mut Frame, app: &App, area: Rect) { + let api_status = if app.chain_info.is_some() { + "Connected" + } else { + "Disconnected" + }; + + let miner_connected = if app.p2pool_state.miner_connected { + "Yes" + } else { + "No" + }; + + let text = format!( + "API Status : {}\n\ + Miner Connected : {}\n\ + Last Share : {}\n\ + Last Block : {}\n\ + Last Submit Time : {}", + api_status, + miner_connected, + app.p2pool_state.last_share_status, + app.p2pool_state.last_block_status, + app.p2pool_state.last_submit_time, + ); + + let paragraph = Paragraph::new(text) + .block(Block::default().borders(Borders::ALL).title(" System ")) + .wrap(Wrap { trim: true }); + + f.render_widget(paragraph, area); + } + + // LOGS TAB + fn render_logs(f: &mut Frame, app: &App, area: Rect) { + let text = if app.p2pool_state.recent_logs.is_empty() { + "Waiting for live daemon logs...".to_string() + } else { + app.p2pool_state.recent_logs.join("\n") + }; + + let paragraph = Paragraph::new(text) + .block(Block::default().borders(Borders::ALL).title(" Logs ")) + .wrap(Wrap { trim: true }); + + f.render_widget(paragraph, area); + } + + // PEERS TAB + fn render_peers(f: &mut Frame, app: &App, area: Rect) { + let rows: Vec = if app.peers.is_empty() { + vec![Row::new(vec![ + Cell::from("No peers connected"), + Cell::from("-"), + Cell::from("-"), + ])] + } else { + app.peers + .iter() + .map(|peer| { + Row::new(vec![ + Cell::from(peer.peer_id.clone()), + Cell::from("Active"), + Cell::from("-"), + ]) + }) + .collect() + }; + + let table = Table::new( + rows, + [ + Constraint::Percentage(60), + Constraint::Percentage(20), + Constraint::Percentage(20), + ], + ) + .header( + Row::new(vec![ + Cell::from("Peer ID"), + Cell::from("Status"), + Cell::from("Info"), + ]) + .style(Style::default().add_modifier(Modifier::BOLD)), + ) + .block(Block::default().borders(Borders::ALL).title(" Peers ")); + + f.render_widget(table, area); + } + + // SHARES TAB + fn render_shares(f: &mut Frame, app: &App, area: Rect) { + let mut items: Vec = vec![ + ListItem::new(format!( + "Latest Status: {}", + app.p2pool_state.last_share_status + )), + ListItem::new(""), + ]; + + if app.recent_shares.is_empty() { + items.push(ListItem::new("No accepted shares yet...")); + } else { + for share in &app.recent_shares { + items.push(ListItem::new(format!( + "Height: {} | Miner: {}", + share.height, share.miner_address + ))); + } + } + + let list = List::new(items).block( Block::default() .borders(Borders::ALL) - .title(" P2Pool Status "), + .title(" Recent Shares "), ); - f.render_widget(p, area); + + f.render_widget(list, area); } } diff --git a/src/components/p2pool_websockets.rs b/src/components/p2pool_websockets.rs new file mode 100644 index 0000000..bb7336b --- /dev/null +++ b/src/components/p2pool_websockets.rs @@ -0,0 +1,88 @@ +// SPDX-FileCopyrightText: 2024 PDM Authors +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use futures_util::{SinkExt, StreamExt}; +use tokio::sync::mpsc; +use tokio_tungstenite::{connect_async, tungstenite::Message}; + +use serde::Deserialize; + +#[derive(Debug, Deserialize)] +pub struct WsPeerEvent { + pub peer_id: String, +} + +#[derive(Debug, Deserialize)] +pub struct WsShareEvent { + pub height: u64, + pub miner_address: String, +} + +#[derive(Debug, Deserialize)] +pub struct WsMessage { + pub topic: String, + pub data: serde_json::Value, +} + +pub async fn connect_p2pool_websocket( + base_url: &str, + token: Option<&str>, + tx: mpsc::Sender, +) { + let ws_base = format!("{}/ws", base_url.replace("http", "ws")); + let ws_url = match token { + Some(t) => format!("{}?token={}", ws_base, t), + None => ws_base, + }; + + loop { + match connect_async(&ws_url).await { + Ok((ws_stream, _)) => { + let (mut write, mut read) = ws_stream.split(); + + // Subscribe to all available topics immediately after connecting + for topic in &["shares", "peers"] { + let msg = format!(r#"{{"action":"subscribe","topic":"{}"}}"#, topic); + if write.send(Message::Text(msg)).await.is_err() { + break; + } + } + + while let Some(message) = read.next().await { + match message { + Ok(msg) => { + if msg.is_text() { + if let Ok(text) = msg.to_text() { + let formatted = if let Ok(parsed) = + serde_json::from_str::(text) + { + match parsed.topic.as_str() { + "Peer" => format!("[PEER EVENT] {}", text), + "Share" => format!("[SHARE EVENT] {}", text), + "Chain" => format!("[CHAIN EVENT] {}", text), + _ => format!("[WS] {}", text), + } + } else { + format!("[RAW] {}", text) + }; + + if tx.send(formatted).await.is_err() { + // Receiver dropped — app is shutting down + return; + } + } + } + } + Err(_) => break, // Silent disconnect, reconnect below + } + } + } + Err(_) => { + // Node is down — wait and retry silently + } + } + + tokio::time::sleep(std::time::Duration::from_secs(3)).await; + } +} diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..527ea93 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: 2024 PDM Authors +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use anyhow::Result; +use config::{Config, File}; + +pub struct ApiConfig { + pub base_url: String, + pub auth_user: Option, + pub auth_pass: Option, +} + +pub fn load_api_config() -> Result { + let settings = Config::builder() + .add_source(File::with_name("config/pdm")) + .build()?; + + let host: String = settings.get("api.host")?; + let port: u16 = settings.get("api.port")?; + let auth_user: Option = settings.get("api.auth_user").ok(); + let auth_pass: Option = settings.get("api.auth_pass").ok(); + + Ok(ApiConfig { + base_url: format!("http://{}:{}", host, port), + auth_user, + auth_pass, + }) +} diff --git a/src/lib.rs b/src/lib.rs index 82d6883..2ec9158 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ pub mod app; pub mod bitcoin_config; pub mod components; +pub mod config; pub mod p2poolv2_config; pub mod settings; pub mod ui; diff --git a/src/main.rs b/src/main.rs index 0771b47..9ac9178 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,13 +16,20 @@ use pdm::ui; use std::ops::ControlFlow; use anyhow::Result; +use base64::{Engine, engine::general_purpose::STANDARD}; use crossterm::{ event::{self, Event, KeyCode, KeyEventKind, KeyModifiers}, execute, terminal::{EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode, enable_raw_mode}, }; +use pdm::app::MAX_P2POOL_STATUS_TAB; +use pdm::components::p2pool_client::P2PoolClient; +use pdm::components::p2pool_websockets::connect_p2pool_websocket; +use pdm::config::load_api_config; use ratatui::{Terminal, backend::Backend, backend::CrosstermBackend}; use std::io; +use tokio::runtime::Runtime; +use tokio::sync::mpsc; fn main() -> Result<()> { // Setup Terminal @@ -36,7 +43,10 @@ fn main() -> Result<()> { let mut app = App::new(); app.settings = load_settings(); bootstrap_from_settings(&mut app); - let res = run_app(&mut terminal, &mut app); + + // Tokio runtime for async P2Pool API calls + let rt = Runtime::new()?; + let res = rt.block_on(run_app(&mut terminal, &mut app)); // Restore Terminal disable_raw_mode()?; @@ -64,11 +74,49 @@ fn sidebar_nav(key: KeyCode, app: &mut App) -> AppAction { } } -fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> -where - ::Error: Send + Sync + 'static, -{ +async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> { + let api_config = load_api_config()?; + let client = P2PoolClient::with_base_url(api_config.base_url.clone()); + let (tx, mut rx) = mpsc::channel::(100); + + let token: Option = match (api_config.auth_user.as_ref(), api_config.auth_pass.as_ref()) + { + (Some(user), Some(pass)) => Some(STANDARD.encode(format!("{}:{}", user, pass))), + _ => None, + }; + let basic_auth: Option = token.as_ref().map(|t| format!("Basic {}", t)); + + let ws_base_url = api_config.base_url.clone(); + let ws_token = token.clone(); + + tokio::spawn(async move { + connect_p2pool_websocket(&ws_base_url, ws_token.as_deref(), tx).await; + }); + loop { + //chain info + if let Ok(chain_info) = client.fetch_chain_info().await { + app.chain_info = Some(chain_info); + } + + // Peers + if let Ok(peers) = client.fetch_peers().await { + app.peers = peers; + } + + // Recent shares (latest 10) + if let Ok(shares) = client.fetch_shares(None, Some(10)).await { + app.recent_shares = shares.shares; + } + + if let Ok(metrics_text) = client.fetch_metrics(basic_auth.as_deref()).await { + app.p2pool_state.parse_metrics(&metrics_text); + } + + while let Ok(log) = rx.try_recv() { + app.p2pool_state.parse_log_line(&log); + } + terminal.draw(|f| ui::ui(f, app))?; if let Event::Key(key) = event::read()? { @@ -94,6 +142,22 @@ where let action = match app.current_screen { CurrentScreen::FileExplorer => app.explorer.handle_input(key), + CurrentScreen::P2PoolStatus => match key.code { + KeyCode::Left => { + if app.p2pool_status_tab > 0 { + app.p2pool_status_tab -= 1; + } + AppAction::None + } + KeyCode::Right => { + if app.p2pool_status_tab < MAX_P2POOL_STATUS_TAB { + app.p2pool_status_tab += 1; + } + AppAction::None + } + k => sidebar_nav(k, app), + }, + CurrentScreen::BitcoinStatus => match key.code { KeyCode::Left => { if app.bitcoin_status_tab > 0 { diff --git a/src/snapshots/pdm__ui__tests__bitcoin_screen_render.snap.new b/src/snapshots/pdm__ui__tests__bitcoin_screen_render.snap.new deleted file mode 100644 index ea4c542..0000000 --- a/src/snapshots/pdm__ui__tests__bitcoin_screen_render.snap.new +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: src/ui.rs -assertion_line: 409 -expression: terminal.backend() ---- -TestBackend { - buffer: Buffer { - area: Rect { x: 0, y: 0, width: 80, height: 20 }, - content: [ - "┌ PDM ──────────────────┐┌ Bitcoin Config ─────────────────────────────────────┐", - "│Home ││Press [Enter] to select a bitcoin.conf file │", - "│Bitcoin Config ││ │", - "│Bitcoin Status ││ │", - "│P2Pool Config ││ │", - "│P2Pool Status ││ │", - "│LN Config ││ │", - "│LN Status ││ │", - "│Shares Market ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "└───────────────────────┘└─────────────────────────────────────────────────────┘", - " ↑↓ Navigate sidebar Enter Select q Quit ", - ], - styles: [ - x: 0, y: 0, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, - x: 1, y: 2, fg: Black, bg: Gray, underline: Reset, modifier: NONE, - x: 24, y: 2, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, - x: 0, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 4, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 23, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 30, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 39, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 42, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 49, y: 19, fg: Reset, bg: Black, underline: Reset, modifier: NONE, - ] - }, - scrollback: Buffer { - area: Rect { x: 0, y: 0, width: 80, height: 0 } - }, - cursor: false, - pos: ( - 0, - 0, - ), -} diff --git a/src/snapshots/pdm__ui__tests__p2pool_screen_render.snap.new b/src/snapshots/pdm__ui__tests__p2pool_screen_render.snap.new deleted file mode 100644 index cea0888..0000000 --- a/src/snapshots/pdm__ui__tests__p2pool_screen_render.snap.new +++ /dev/null @@ -1,54 +0,0 @@ ---- -source: src/ui.rs -assertion_line: 423 -expression: terminal.backend() ---- -TestBackend { - buffer: Buffer { - area: Rect { x: 0, y: 0, width: 80, height: 20 }, - content: [ - "┌ PDM ──────────────────┐┌ Info ───────────────────────────────────────────────┐", - "│Home ││ Chain Info │ System │ Logs │ Peers │", - "│Bitcoin Config ││ │", - "│Bitcoin Status │└─────────────────────────────────────────────────────┘", - "│P2Pool Config │┌─────────────────────────────────────────────────────┐", - "│P2Pool Status ││Chain Info │", - "│LN Config ││ │", - "│LN Status ││ │", - "│Shares Market ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "│ ││ │", - "└───────────────────────┘└─────────────────────────────────────────────────────┘", - " ↑↓ Navigate sidebar ←→ Switch tab q Quit ", - ], - styles: [ - x: 0, y: 0, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, - x: 27, y: 1, fg: Black, bg: Gray, underline: Reset, modifier: NONE, - x: 37, y: 1, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, - x: 1, y: 3, fg: Black, bg: Gray, underline: Reset, modifier: NONE, - x: 24, y: 3, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, - x: 0, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 4, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 23, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 27, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 40, y: 19, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, - x: 43, y: 19, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, - x: 50, y: 19, fg: Reset, bg: Black, underline: Reset, modifier: NONE, - ] - }, - scrollback: Buffer { - area: Rect { x: 0, y: 0, width: 80, height: 0 } - }, - cursor: false, - pos: ( - 0, - 0, - ), -} diff --git a/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap b/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap index 3c98693..639ec94 100644 --- a/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap +++ b/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap @@ -7,12 +7,12 @@ TestBackend { buffer: Buffer { area: Rect { x: 0, y: 0, width: 80, height: 24 }, content: [ - "┌ PDM ──────────────────┐┌ P2Pool Status ──────────────────────────────────────┐", - "│Home ││P2Pool Status │", + "┌ PDM ──────────────────┐┌ Info ───────────────────────────────────────────────┐", + "│Home ││ Chain Info │ System │ Logs │ Peers │ Shares │", "│Bitcoin Config ││ │", - "│Bitcoin Status ││ │", - "│P2Pool Config ││ │", - "│P2Pool Status ││ │", + "│Bitcoin Status │└─────────────────────────────────────────────────────┘", + "│P2Pool Config │┌ Chain Info ─────────────────────────────────────────┐", + "│P2Pool Status ││Loading chain info... │", "│LN Config ││ │", "│LN Status ││ │", "│Shares Market ││ │", @@ -34,6 +34,8 @@ TestBackend { ], styles: [ x: 0, y: 0, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, + x: 27, y: 1, fg: Black, bg: Gray, underline: Reset, modifier: NONE, + x: 37, y: 1, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 1, y: 5, fg: Black, bg: Gray, underline: Reset, modifier: NONE, x: 24, y: 5, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 0, y: 23, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, From b2aac14b08cd599baa5e0bf7119e3f96f4f2999e Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Tue, 21 Apr 2026 09:17:32 +0000 Subject: [PATCH 2/6] fixed comment --- src/components/p2pool_client.rs | 111 ++++++++++++++++---------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/src/components/p2pool_client.rs b/src/components/p2pool_client.rs index 334815d..5f36435 100644 --- a/src/components/p2pool_client.rs +++ b/src/components/p2pool_client.rs @@ -15,6 +15,61 @@ pub struct P2PoolClient { base_url: String, } +#[derive(Debug, Clone, Deserialize)] +pub struct ChainInfo { + pub genesis_blockhash: Option, + pub chain_tip_height: Option, + pub total_work: String, + pub chain_tip_blockhash: Option, + pub top_candidate_height: Option, + pub top_candidate_blockhash: Option, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct PeerInfo { + pub peer_id: String, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct SharesResponse { + pub from_height: u64, + pub to_height: u64, + pub shares: Vec, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct ShareInfo { + pub blockhash: String, + pub prev_blockhash: String, + pub height: u64, + pub miner_address: String, + pub timestamp: u64, + pub bits: String, + pub uncles: Vec, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct UncleInfo { + pub blockhash: String, + pub prev_blockhash: String, + pub miner_address: String, + pub timestamp: u64, + pub height: u64, +} + +#[derive(Debug, Clone, Deserialize)] +pub struct ShareDetail { + pub blockhash: String, + pub height: Option, + pub status: String, + pub parent: String, + pub uncles: Vec, + pub miner_address: String, + pub merkle_root: String, + pub bits: String, + pub time: String, +} + impl P2PoolClient { pub fn new() -> Self { let client = Client::builder() @@ -50,7 +105,6 @@ impl P2PoolClient { Ok(text) } - // ✏️ CHANGED: renamed from fetch_metrics_raw, added basic_auth param pub async fn fetch_metrics(&self, basic_auth: Option<&str>) -> Result { let url = format!("{}/metrics", self.base_url); @@ -172,61 +226,6 @@ impl Default for P2PoolClient { } } -#[derive(Debug, Clone, Deserialize)] -pub struct ChainInfo { - pub genesis_blockhash: Option, - pub chain_tip_height: Option, - pub total_work: String, - pub chain_tip_blockhash: Option, - pub top_candidate_height: Option, - pub top_candidate_blockhash: Option, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct PeerInfo { - pub peer_id: String, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct SharesResponse { - pub from_height: u64, - pub to_height: u64, - pub shares: Vec, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct ShareInfo { - pub blockhash: String, - pub prev_blockhash: String, - pub height: u64, - pub miner_address: String, - pub timestamp: u64, - pub bits: String, - pub uncles: Vec, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct UncleInfo { - pub blockhash: String, - pub prev_blockhash: String, - pub miner_address: String, - pub timestamp: u64, - pub height: u64, -} - -#[derive(Debug, Clone, Deserialize)] -pub struct ShareDetail { - pub blockhash: String, - pub height: Option, - pub status: String, - pub parent: String, - pub uncles: Vec, - pub miner_address: String, - pub merkle_root: String, - pub bits: String, - pub time: String, -} - #[cfg(test)] mod tests { use super::*; From 39c8057c3a5b435b5079ee328ef216d9d42a454d Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Tue, 28 Apr 2026 18:02:41 +0000 Subject: [PATCH 3/6] resolve changes after rebase --- Cargo.lock | 1276 +++++++++++++++++++++++++++++++++++---------------- Cargo.toml | 1 - src/app.rs | 5 - src/main.rs | 5 +- 4 files changed, 876 insertions(+), 411 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 965666f..bc8e082 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,7 +43,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "version_check", ] @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arraydeque" @@ -120,7 +120,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", "synstructure", ] @@ -132,7 +132,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -154,7 +154,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.2", + "rustix", "slab", "windows-sys 0.61.2", ] @@ -167,7 +167,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -183,6 +183,15 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -220,7 +229,7 @@ dependencies = [ "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-util", "itoa", "matchit", @@ -326,18 +335,33 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "cexpr", "clang-sys", - "itertools", + "itertools 0.13.0", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.111", + "syn 2.0.117", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", ] +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin" version = "0.32.8" @@ -373,9 +397,9 @@ checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" [[package]] name = "bitcoin-units" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +checksum = "346568ebaab2918487cea76dd55dae13c27bb618cdb737c952e69eb2017c4118" dependencies = [ "bitcoin-internals", "serde", @@ -403,8 +427,8 @@ dependencies = [ [[package]] name = "bitcoindrpc" -version = "0.10.4" -source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +version = "0.10.6" +source = "git+https://github.com/p2poolv2/p2poolv2#401327233d7708119468508a00580d5ee0f32025" dependencies = [ "base64 0.22.1", "bitcoin", @@ -425,9 +449,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" dependencies = [ "serde_core", ] @@ -483,7 +507,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -523,6 +547,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + [[package]] name = "byteorder" version = "1.5.0" @@ -545,12 +575,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "cassowary" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" - [[package]] name = "castaway" version = "0.2.4" @@ -562,9 +586,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.52" +version = "1.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" dependencies = [ "find-msvc-tools", "jobserver", @@ -707,34 +731,33 @@ dependencies = [ [[package]] name = "config" -version = "0.15.19" +version = "0.15.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30fa8254caad766fc03cb0ccae691e14bf3bd72bfff27f72802ce729551b3d6" +checksum = "8e68cfe19cd7d23ffde002c24ffa5cda73931913ef394d5eaaa32037dc940c0c" dependencies = [ "async-trait", "convert_case 0.6.0", "json5", "pathdiff", - "ron 0.12.0", + "ron 0.12.1", "rust-ini 0.21.3", "serde-untagged", "serde_core", "serde_json", - "toml 0.9.10+spec-1.1.0", - "winnow", + "toml 1.1.2+spec-1.1.0", + "winnow 1.0.2", "yaml-rust2", ] [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -758,7 +781,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "tiny-keccak", ] @@ -878,29 +901,13 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crossterm" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" -dependencies = [ - "bitflags 2.10.0", - "crossterm_winapi", - "mio", - "parking_lot", - "rustix 0.38.44", - "signal-hook", - "signal-hook-mio", - "winapi", -] - [[package]] name = "crossterm" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "crossterm_winapi", "derive_more", "document-features", @@ -950,6 +957,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "csscolorparser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +dependencies = [ + "lab", + "phf", +] + [[package]] name = "ctr" version = "0.9.2" @@ -983,14 +1000,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] name = "darling" -version = "0.20.11" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ "darling_core", "darling_macro", @@ -998,28 +1015,26 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" dependencies = [ - "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -1038,15 +1053,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "data-encoding-macro" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8142a83c17aa9461d637e649271eae18bf2edd00e91f2e105df36c3c16355bdb" +checksum = "3259c913752a86488b501ed8680446a5ed2d5aeac6e596cb23ba3800768ea32c" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -1054,14 +1069,20 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" +checksum = "ccc2776f0c61eca1ca32528f85548abd1a4be8fb53d1b21c013e4f18da1e7090" dependencies = [ "data-encoding", - "syn 2.0.111", + "syn 2.0.117", ] +[[package]] +name = "deltae" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4" + [[package]] name = "der" version = "0.7.10" @@ -1097,25 +1118,24 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ "convert_case 0.10.0", "proc-macro2", "quote", "rustc_version", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -1141,6 +1161,27 @@ dependencies = [ "walkdir", ] +[[package]] +name = "directories" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f5094c54661b38d03bd7e50df373292118db60b585c08a411c6d840017fe7d" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1149,8 +1190,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -1270,7 +1310,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -1281,9 +1321,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "erased-serde" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e8918065695684b2b0702da20382d5ae6065cf3327bc2d6436bd49a71ce9f3" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" dependencies = [ "serde", "serde_core", @@ -1297,7 +1337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1321,9 +1361,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "ff" @@ -1341,11 +1381,22 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "filedescriptor" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d" +dependencies = [ + "libc", + "thiserror 1.0.69", + "winapi", +] + [[package]] name = "find-msvc-tools" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "finl_unicode" @@ -1483,7 +1534,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -1545,9 +1596,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", @@ -1570,6 +1621,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + [[package]] name = "ghash" version = "0.5.1" @@ -1656,6 +1720,8 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ + "allocator-api2", + "equivalent", "foldhash 0.1.5", ] @@ -1670,6 +1736,12 @@ dependencies = [ "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + [[package]] name = "hashlink" version = "0.10.0" @@ -1728,7 +1800,7 @@ dependencies = [ "idna", "ipnet", "once_cell", - "rand 0.8.5", + "rand 0.8.6", "socket2 0.5.10", "thiserror 1.0.69", "tinyvec", @@ -1750,7 +1822,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot", - "rand 0.8.5", + "rand 0.8.6", "resolv-conf", "smallvec", "thiserror 1.0.69", @@ -1875,9 +1947,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" dependencies = [ "atomic-waker", "bytes", @@ -1890,7 +1962,6 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -1898,15 +1969,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ "http 1.4.0", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-util", "rustls", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -1921,7 +1991,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-util", "native-tls", "tokio", @@ -1941,12 +2011,12 @@ dependencies = [ "futures-util", "http 1.4.0", "http-body 1.0.1", - "hyper 1.8.1", + "hyper 1.9.0", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.2", + "socket2 0.6.3", "system-configuration", "tokio", "tower-service", @@ -1980,12 +2050,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -1993,9 +2064,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -2006,9 +2077,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -2020,15 +2091,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -2040,15 +2111,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -2084,9 +2155,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -2138,7 +2209,7 @@ dependencies = [ "http 0.2.12", "hyper 0.14.32", "log", - "rand 0.8.5", + "rand 0.8.6", "tokio", "url", "xmltree", @@ -2146,12 +2217,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.0", "serde", "serde_core", ] @@ -2176,26 +2247,27 @@ dependencies = [ [[package]] name = "insta" -version = "1.44.3" +version = "1.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c943d4415edd8153251b6f197de5eb1640e56d84e8d9159bea190421c73698" +checksum = "7b4a6248eb93a4401ed2f37dfe8ea592d3cf05b7cf4f8efa867b6895af7e094e" dependencies = [ "console", "once_cell", "similar", + "tempfile", ] [[package]] name = "instability" -version = "0.3.10" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6778b0196eefee7df739db78758e5cf9b37412268bfa5650bfeed028aed20d9c" +checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971" dependencies = [ "darling", "indoc", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -2213,7 +2285,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" dependencies = [ - "socket2 0.6.2", + "socket2 0.6.3", "widestring", "windows-registry", "windows-result", @@ -2228,14 +2300,23 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" dependencies = [ "memchr", "serde", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.14.0" @@ -2247,9 +2328,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jobserver" @@ -2263,10 +2344,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -2306,6 +2389,23 @@ dependencies = [ "signature", ] +[[package]] +name = "kasuari" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" +dependencies = [ + "hashbrown 0.16.1", + "portable-atomic", + "thiserror 2.0.18", +] + +[[package]] +name = "lab" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf36173d4167ed999940f804952e6b08197cae5ad5d572eb4db150ce8ad5d58f" + [[package]] name = "lazy_static" version = "1.5.0" @@ -2320,9 +2420,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.178" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libloading" @@ -2344,7 +2444,7 @@ dependencies = [ "either", "futures", "futures-timer", - "getrandom 0.2.16", + "getrandom 0.2.17", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -2411,7 +2511,7 @@ dependencies = [ "parking_lot", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand 0.8.6", "rw-stream-sink", "smallvec", "thiserror 1.0.69", @@ -2451,7 +2551,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "lru", + "lru 0.12.5", "quick-protobuf", "quick-protobuf-codec", "smallvec", @@ -2473,7 +2573,7 @@ dependencies = [ "k256", "multihash", "quick-protobuf", - "rand 0.8.5", + "rand 0.8.6", "sha2", "thiserror 2.0.18", "tracing", @@ -2500,7 +2600,7 @@ dependencies = [ "libp2p-swarm", "quick-protobuf", "quick-protobuf-codec", - "rand 0.8.5", + "rand 0.8.6", "sha2", "smallvec", "thiserror 1.0.69", @@ -2522,7 +2622,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand 0.8.6", "smallvec", "socket2 0.5.10", "tokio", @@ -2564,7 +2664,7 @@ dependencies = [ "multihash", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand 0.8.6", "sha2", "snow", "static_assertions", @@ -2587,7 +2687,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand 0.8.6", "tracing", "void", ] @@ -2607,7 +2707,7 @@ dependencies = [ "libp2p-tls", "parking_lot", "quinn", - "rand 0.8.5", + "rand 0.8.6", "ring 0.17.14", "rustls", "socket2 0.5.10", @@ -2630,7 +2730,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand 0.8.6", "smallvec", "tracing", "void", @@ -2650,10 +2750,10 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", - "lru", + "lru 0.12.5", "multistream-select", "once_cell", - "rand 0.8.5", + "rand 0.8.6", "smallvec", "tokio", "tracing", @@ -2669,7 +2769,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -2739,6 +2839,15 @@ dependencies = [ "yamux 0.13.10", ] +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "libc", +] + [[package]] name = "librocksdb-sys" version = "0.17.3+10.4.2" @@ -2765,6 +2874,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "line-clipping" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f50e8f47623268b5407192d26876c4d7f89d686ca130fdc53bced4814cd29f8" +dependencies = [ + "bitflags 2.11.1", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2773,15 +2891,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "litrs" @@ -2806,13 +2924,22 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lru" -version = "0.16.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ "hashbrown 0.15.5", ] +[[package]] +name = "lru" +version = "0.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" +dependencies = [ + "hashbrown 0.16.1", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -2838,6 +2965,16 @@ dependencies = [ "libc", ] +[[package]] +name = "mac_address" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0aeb26bf5e836cc1c341c8106051b573f1766dfa05aa87f0b98be5e51b02303" +dependencies = [ + "nix 0.29.0", + "winapi", +] + [[package]] name = "match-lookup" version = "0.1.2" @@ -2846,7 +2983,7 @@ checksum = "757aee279b8bdbb9f9e676796fd459e4207a1f986e87886700abf589f5abf771" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -2866,9 +3003,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmem" @@ -2909,9 +3046,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", @@ -2952,11 +3089,10 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ace881e3f514092ce9efbcb8f413d0ad9763860b828981c2de51ddc666936c" +checksum = "577c63b00ad74d57e8c9aa870b5fccebf2fd64a308a5aee9f1bb88e4aea19447" dependencies = [ - "no_std_io2", "unsigned-varint 0.8.0", ] @@ -3006,7 +3142,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ce3636fa715e988114552619582b530481fd5ef176a1e5c1bf024077c2c9445" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "libc", "log", "netlink-packet-core", @@ -3041,23 +3177,27 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "libc", + "memoffset", ] [[package]] -name = "no_std_io2" -version = "0.8.1" +name = "nix" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3564ce7035b1e4778d8cb6cacebb5d766b5e8fe5a75b9e441e33fb61a872c6" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "memchr", + "bitflags 2.11.1", + "cfg-if", + "cfg_aliases", + "libc", ] [[package]] @@ -3101,6 +3241,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -3119,6 +3270,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "oid-registry" version = "0.7.1" @@ -3130,9 +3290,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "opaque-debug" @@ -3142,11 +3302,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.75" +version = "0.10.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "cfg-if", "foreign-types", "libc", @@ -3163,8 +3323,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -3175,9 +3334,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.111" +version = "0.9.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" dependencies = [ "cc", "libc", @@ -3222,8 +3381,8 @@ dependencies = [ [[package]] name = "p2poolv2_api" -version = "0.10.4" -source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +version = "0.10.6" +source = "git+https://github.com/p2poolv2/p2poolv2#401327233d7708119468508a00580d5ee0f32025" dependencies = [ "axum", "base64 0.22.1", @@ -3244,8 +3403,8 @@ dependencies = [ [[package]] name = "p2poolv2_config" -version = "0.10.4" -source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +version = "0.10.6" +source = "git+https://github.com/p2poolv2/p2poolv2#401327233d7708119468508a00580d5ee0f32025" dependencies = [ "bitcoin", "bitcoindrpc", @@ -3255,8 +3414,8 @@ dependencies = [ [[package]] name = "p2poolv2_lib" -version = "0.10.4" -source = "git+https://github.com/p2poolv2/p2poolv2#8f0716b1fe896e8773072d613c10cd69182a7baf" +version = "0.10.6" +source = "git+https://github.com/p2poolv2/p2poolv2#401327233d7708119468508a00580d5ee0f32025" dependencies = [ "async-trait", "base64 0.22.1", @@ -3271,7 +3430,7 @@ dependencies = [ "hmac", "libp2p", "p2poolv2_config", - "rand 0.8.5", + "rand 0.8.6", "rocksdb", "rust_decimal", "rust_decimal_macros", @@ -3321,6 +3480,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pathdiff" version = "0.2.3" @@ -3335,8 +3500,9 @@ dependencies = [ "base64 0.22.1", "bitcoin", "chrono", - "config 0.15.19", - "crossterm 0.29.0", + "config 0.15.22", + "crossterm", + "directories", "futures-util", "insta", "p2poolv2_api", @@ -3345,10 +3511,13 @@ dependencies = [ "reqwest", "serde", "serde_json", + "serial_test", "tempfile", "tokio", "tokio-tungstenite 0.23.1", + "toml 0.8.23", "toml_edit 0.22.27", + "unicode-width", "url", ] @@ -3370,9 +3539,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" dependencies = [ "memchr", "ucd-trie", @@ -3380,9 +3549,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" dependencies = [ "pest", "pest_generator", @@ -3390,28 +3559,79 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] name = "pest_meta" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ "pest", "sha2", ] +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.6", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.11" @@ -3429,7 +3649,7 @@ checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -3438,12 +3658,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkcs8" version = "0.10.2" @@ -3456,9 +3670,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "polling" @@ -3470,7 +3684,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.2", + "rustix", "windows-sys 0.61.2", ] @@ -3497,11 +3711,17 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -3521,20 +3741,30 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.23.10+spec-1.0.0", + "toml_edit 0.25.11+spec-1.1.0", ] [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -3559,7 +3789,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -3618,7 +3848,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.2", + "socket2 0.6.3", "thiserror 2.0.18", "tokio", "tracing", @@ -3655,16 +3885,16 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.2", + "socket2 0.6.3", "tracing", "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.42" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -3675,6 +3905,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "radium" version = "0.7.0" @@ -3683,9 +3919,9 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -3728,7 +3964,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] @@ -3760,18 +3996,69 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "compact_str", "hashbrown 0.16.1", "indoc", - "itertools", + "itertools 0.14.0", "kasuari", - "lru", + "lru 0.16.4", "strum", "thiserror 2.0.18", "unicode-segmentation", "unicode-truncate", - "unicode-width 0.2.0", + "unicode-width", +] + +[[package]] +name = "ratatui-crossterm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "577c9b9f652b4c121fb25c6a391dd06406d3b092ba68827e6d2f09550edc54b3" +dependencies = [ + "cfg-if", + "crossterm", + "instability", + "ratatui-core", +] + +[[package]] +name = "ratatui-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f1342a13e83e4bb9d0b793d0ea762be633f9582048c892ae9041ef39c936f4" +dependencies = [ + "ratatui-core", + "ratatui-widgets", +] + +[[package]] +name = "ratatui-termwiz" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f76fe0bd0ed4295f0321b1676732e2454024c15a35d01904ddb315afd3d545c" +dependencies = [ + "ratatui-core", + "termwiz", +] + +[[package]] +name = "ratatui-widgets" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.16.1", + "indoc", + "instability", + "itertools 0.14.0", + "line-clipping", + "ratatui-core", + "strum", + "time", + "unicode-segmentation", + "unicode-width", ] [[package]] @@ -3812,7 +4099,18 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.18", ] [[package]] @@ -3867,7 +4165,7 @@ dependencies = [ "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-rustls", "hyper-tls", "hyper-util", @@ -3936,7 +4234,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", @@ -3994,11 +4292,11 @@ dependencies = [ [[package]] name = "ron" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" +checksum = "4147b952f3f819eca0e99527022f7d6a8d05f111aeb0a62960c74eb283bec8fc" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "once_cell", "serde", "serde_derive", @@ -4019,7 +4317,7 @@ dependencies = [ "netlink-packet-route", "netlink-proto", "netlink-sys", - "nix", + "nix 0.30.1", "thiserror 1.0.69", "tokio", ] @@ -4054,7 +4352,7 @@ dependencies = [ "borsh", "bytes", "num-traits", - "rand 0.8.5", + "rand 0.8.6", "rkyv", "serde", "serde_json", @@ -4069,7 +4367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74a5a6f027e892c7a035c6fddb50435a1fbf5a734ffc0c2a9fed4d0221440519" dependencies = [ "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4098,49 +4396,36 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.37" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "once_cell", "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.103.9", + "rustls-webpki 0.103.13", "subtle", "zeroize", ] [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "web-time", "zeroize", @@ -4158,9 +4443,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring 0.17.14", "rustls-pki-types", @@ -4186,9 +4471,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -4199,11 +4484,20 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scc" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] @@ -4214,6 +4508,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sdd" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" + [[package]] name = "seahash" version = "4.1.0" @@ -4241,7 +4541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand 0.8.6", "secp256k1-sys", "serde", ] @@ -4257,11 +4557,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17b898a6d6948c3a8ee4372c17cb384f90d2e6e912ef00895b14fd7ab54ec38" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -4280,9 +4580,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" @@ -4323,8 +4623,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4362,9 +4661,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -4381,6 +4680,32 @@ dependencies = [ "serde", ] +[[package]] +name = "serial_test" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" +dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "sha1" version = "0.10.6" @@ -4441,10 +4766,11 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -4517,12 +4843,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -4577,8 +4903,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "rustversion", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4606,9 +4931,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -4632,8 +4957,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4642,7 +4966,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4684,17 +5008,80 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.23.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.2", "once_cell", - "rustix 1.1.2", + "rustix", "windows-sys 0.61.2", ] +[[package]] +name = "terminfo" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ea810f0692f9f51b382fff5893887bb4580f5fa246fde546e0b13e7fcee662" +dependencies = [ + "fnv", + "nom", + "phf", + "phf_codegen", +] + +[[package]] +name = "termios" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" +dependencies = [ + "libc", +] + +[[package]] +name = "termwiz" +version = "0.23.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4676b37242ccbd1aabf56edb093a4827dc49086c0ffd764a5705899e0f35f8f7" +dependencies = [ + "anyhow", + "base64 0.22.1", + "bitflags 2.11.1", + "fancy-regex", + "filedescriptor", + "finl_unicode", + "fixedbitset", + "hex", + "lazy_static", + "libc", + "log", + "memmem", + "nix 0.29.0", + "num-derive", + "num-traits", + "ordered-float", + "pest", + "pest_derive", + "phf", + "sha2", + "signal-hook", + "siphasher", + "terminfo", + "termios", + "thiserror 1.0.69", + "ucd-trie", + "unicode-segmentation", + "vtparse", + "wezterm-bidi", + "wezterm-blob-leases", + "wezterm-color-types", + "wezterm-dynamic", + "wezterm-input-types", + "winapi", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -4721,7 +5108,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4732,7 +5119,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4752,7 +5139,9 @@ checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde_core", "time-core", @@ -4786,9 +5175,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -4811,9 +5200,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -4821,21 +5210,20 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.2", + "socket2 0.6.3", "tokio-macros", "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -4929,15 +5317,15 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.10+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "serde_core", - "serde_spanned 1.0.4", - "toml_datetime 0.7.5+spec-1.1.0", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.2", ] [[package]] @@ -4951,9 +5339,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] @@ -4969,28 +5357,28 @@ dependencies = [ "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", - "winnow", + "winnow 0.7.15", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ "indexmap", - "toml_datetime 0.7.5+spec-1.1.0", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.2", ] [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow", + "winnow 1.0.2", ] [[package]] @@ -5022,7 +5410,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "bytes", "futures-core", "futures-util", @@ -5089,8 +5477,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -5116,9 +5503,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -5150,7 +5537,7 @@ dependencies = [ "http 1.4.0", "httparse", "log", - "rand 0.8.5", + "rand 0.8.6", "sha1", "thiserror 1.0.69", "utf-8", @@ -5168,7 +5555,7 @@ dependencies = [ "http 1.4.0", "httparse", "log", - "rand 0.8.5", + "rand 0.8.6", "sha1", "thiserror 1.0.69", "utf-8", @@ -5182,9 +5569,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "ucd-trie" @@ -5212,15 +5599,15 @@ checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-truncate" @@ -5228,22 +5615,22 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" dependencies = [ - "itertools", + "itertools 0.14.0", "unicode-segmentation", "unicode-width", ] [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" @@ -5303,12 +5690,20 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +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 = [ + "atomic", + "getrandom 0.4.2", "js-sys", "wasm-bindgen", ] @@ -5343,6 +5738,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "vtparse" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9b2acfb050df409c972a37d3b8e08cdea3bddb0c09db9d53137e504cfabed0" +dependencies = [ + "utf8parse", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -5370,11 +5774,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen 0.46.0", + "wit-bindgen 0.57.1", ] [[package]] @@ -5388,9 +5792,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" dependencies = [ "cfg-if", "once_cell", @@ -5402,23 +5806,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.64" +version = "0.4.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5426,23 +5826,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" dependencies = [ "unicode-ident", ] @@ -5475,7 +5874,7 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.1", "hashbrown 0.15.5", "indexmap", "semver", @@ -5483,9 +5882,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" dependencies = [ "js-sys", "wasm-bindgen", @@ -5503,13 +5902,85 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" dependencies = [ "rustls-pki-types", ] +[[package]] +name = "wezterm-bidi" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0a6e355560527dd2d1cf7890652f4f09bb3433b6aadade4c9b5ed76de5f3ec" +dependencies = [ + "log", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-blob-leases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7" +dependencies = [ + "getrandom 0.3.4", + "mac_address", + "sha2", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "wezterm-color-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296" +dependencies = [ + "csscolorparser", + "deltae", + "lazy_static", + "wezterm-dynamic", +] + +[[package]] +name = "wezterm-dynamic" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2ab60e120fd6eaa68d9567f3226e876684639d22a4219b313ff69ec0ccd5ac" +dependencies = [ + "log", + "ordered-float", + "strsim", + "thiserror 1.0.69", + "wezterm-dynamic-derive", +] + +[[package]] +name = "wezterm-dynamic-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c0cf2d539c645b448eaffec9ec494b8b19bd5077d9e58cb1ae7efece8d575b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "wezterm-input-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e" +dependencies = [ + "bitflags 1.3.2", + "euclid", + "lazy_static", + "serde", + "wezterm-dynamic", +] + [[package]] name = "widestring" version = "1.2.1" @@ -5600,7 +6071,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -5611,7 +6082,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -5668,15 +6139,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" @@ -5835,18 +6297,21 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] [[package]] -name = "wit-bindgen" -version = "0.46.0" +name = "winnow" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +dependencies = [ + "memchr", +] [[package]] name = "wit-bindgen" @@ -5857,6 +6322,12 @@ dependencies = [ "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "wit-bindgen-core" version = "0.51.0" @@ -5878,7 +6349,7 @@ dependencies = [ "heck", "indexmap", "prettyplease", - "syn 2.0.111", + "syn 2.0.117", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -5894,7 +6365,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -5906,7 +6377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.10.0", + "bitflags 2.11.1", "indexmap", "log", "serde", @@ -5938,9 +6409,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "wyz" @@ -6026,7 +6497,7 @@ dependencies = [ "nohash-hasher", "parking_lot", "pin-project", - "rand 0.8.5", + "rand 0.8.6", "static_assertions", ] @@ -6057,9 +6528,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -6068,14 +6539,13 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", "synstructure", ] @@ -6096,28 +6566,27 @@ checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", "synstructure", ] @@ -6138,7 +6607,7 @@ checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] @@ -6153,9 +6622,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -6164,9 +6633,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -6175,21 +6644,20 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", - "syn 2.0.111", + "syn 2.0.117", ] [[package]] name = "zmij" -version = "1.0.12" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zmq" diff --git a/Cargo.toml b/Cargo.toml index 468a729..24a7008 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ p2poolv2_api = { git = "https://github.com/p2poolv2/p2poolv2", package = "p2pool bitcoin = "0.32.5" toml_edit = "0.22" reqwest = { version = "0.12", features = ["json", "rustls-tls"] } -serde = { version = "1.0", features = ["derive"] } serde_json = "1.0.135" tokio = { version = "1.0", features = ["full"] } tokio-tungstenite = "0.23" diff --git a/src/app.rs b/src/app.rs index 926587b..aeff463 100644 --- a/src/app.rs +++ b/src/app.rs @@ -155,11 +155,6 @@ impl App { self.bitcoin_config_view.save_message = None; self.bitcoin_config_view.editing = false; self.bitcoin_config_view.edit_input.clear(); - } else if self.current_screen == CurrentScreen::P2PoolConfig { - self.p2pool_config_view.warning_message = None; - self.p2pool_config_view.save_message = None; - self.p2pool_config_view.editing = false; - self.p2pool_config_view.edit_input.clear(); } if self.current_screen == CurrentScreen::P2PoolConfig { self.p2pool_config_view.warning_message = None; diff --git a/src/main.rs b/src/main.rs index 9ac9178..ce08335 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,10 @@ fn sidebar_nav(key: KeyCode, app: &mut App) -> AppAction { } } -async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> { +async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> +where + B::Error: Send + Sync + 'static, +{ let api_config = load_api_config()?; let client = P2PoolClient::with_base_url(api_config.base_url.clone()); let (tx, mut rx) = mpsc::channel::(100); From deaebbbd7bb42f700720aa5dd72757f91f66e25a Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Tue, 28 Apr 2026 18:04:19 +0000 Subject: [PATCH 4/6] fmt --- src/app.rs | 4 ++-- src/components/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index aeff463..ce8bd28 100644 --- a/src/app.rs +++ b/src/app.rs @@ -7,10 +7,10 @@ use crate::components::bitcoin_config_view::BitcoinConfigView; use crate::components::file_explorer::FileExplorer; use crate::components::p2pool_client::{ChainInfo, PeerInfo, ShareInfo}; use crate::components::p2pool_config_view::P2PoolConfigView; -use crate::components::settings_view::SettingsView; -use crate::settings::Settings; use crate::components::p2pool_log_parser::ParsedP2PoolState; +use crate::components::settings_view::SettingsView; use crate::p2poolv2_config::P2PoolConfigEntry as P2PoolEntry; +use crate::settings::Settings; use p2poolv2_config::Config as P2PoolConfig; use std::path::PathBuf; diff --git a/src/components/mod.rs b/src/components/mod.rs index e0336d3..34628e5 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -12,7 +12,7 @@ pub mod p2pool_client; pub mod p2pool_config_view; pub mod p2pool_log_parser; pub mod p2pool_status_view; -pub mod settings_view; pub mod p2pool_websockets; +pub mod settings_view; pub mod shares_market_view; pub mod status_bar; From 7c7a1bf40687b14778071f2e35ce4cbd0f7e05c3 Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Thu, 30 Apr 2026 09:13:08 +0000 Subject: [PATCH 5/6] WIP: saving progress --- src/components/difficulty.rs | 79 +++++++ src/components/mod.rs | 1 + src/components/p2pool_log_parser.rs | 325 +++++++++++++++++++-------- src/components/p2pool_status_view.rs | 298 ++++++++++++++++++++---- src/main.rs | 158 +++++++++++-- 5 files changed, 705 insertions(+), 156 deletions(-) create mode 100644 src/components/difficulty.rs diff --git a/src/components/difficulty.rs b/src/components/difficulty.rs new file mode 100644 index 0000000..1ab1cb2 --- /dev/null +++ b/src/components/difficulty.rs @@ -0,0 +1,79 @@ +// SPDX-FileCopyrightText: 2024 PDM Authors +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +pub fn difficulty_from_bits(bits_str: &str) -> String { + let bits = match u32::from_str_radix(bits_str.trim_start_matches("0x"), 16) { + Ok(v) => v, + Err(_) => return "?".to_string(), + }; + + let exponent = (bits >> 24) as i32; + let mantissa = (bits & 0x007f_ffff) as f64; + + let shift = 8.0 * (exponent as f64 - 3.0); + + // Guard against absurdly large/small shifts + if shift >= 1024.0 || mantissa == 0.0 { + return "0".to_string(); + } + + let target = mantissa * 2f64.powf(shift); + if target == 0.0 { + return "0".to_string(); + } + + // diff1_target = 0xffff << 208 (same constant as the JS dashboard) + // Using f64: precision is fine for a display string. + let diff1 = 65535.0_f64 * 2f64.powf(208.0); + let difficulty = diff1 / target; + + format_difficulty(difficulty) +} + +fn format_difficulty(value: f64) -> String { + const SUFFIXES: &[&str] = &["", "K", "M", "G", "T", "P", "E"]; + + if value < 10_000.0 { + return format!("{:.0}", value); + } + + let mut scaled = value; + let mut tier = 0usize; + + while scaled >= 1_000.0 && tier < SUFFIXES.len() - 1 { + scaled /= 1_000.0; + tier += 1; + } + + if scaled >= 100.0 { + format!("{:.0}{}", scaled, SUFFIXES[tier]) + } else if scaled >= 10.0 { + format!("{:.1}{}", scaled, SUFFIXES[tier]) + } else { + format!("{:.2}{}", scaled, SUFFIXES[tier]) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn difficulty_1d00ffff_is_1() { + // Genesis block bits — difficulty 1 + let d = difficulty_from_bits("1d00ffff"); + assert_eq!(d, "1"); + } + + #[test] + fn bad_bits_returns_question_mark() { + assert_eq!(difficulty_from_bits("nothex"), "?"); + } + + #[test] + fn zero_mantissa_returns_zero() { + // exponent=0x1d, mantissa=0 → target = 0 → "0" + assert_eq!(difficulty_from_bits("1d000000"), "0"); + } +} diff --git a/src/components/mod.rs b/src/components/mod.rs index 34628e5..a4eca26 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -4,6 +4,7 @@ pub mod bitcoin_config_view; pub mod bitcoin_status_view; +pub mod difficulty; pub mod file_explorer; pub mod home_view; pub mod ln_config_view; diff --git a/src/components/p2pool_log_parser.rs b/src/components/p2pool_log_parser.rs index af71747..c7d6c2d 100644 --- a/src/components/p2pool_log_parser.rs +++ b/src/components/p2pool_log_parser.rs @@ -2,133 +2,272 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -use serde::Deserialize; - -#[derive(Debug, Deserialize)] -struct WsMessage { - topic: String, - data: serde_json::Value, -} - #[derive(Debug, Default, Clone)] pub struct ParsedP2PoolState { - pub miner_connected: bool, + /// Total accepted shares (from metrics shares_accepted_total) + pub shares_accepted: u64, + /// Total rejected shares (from metrics shares_rejected_total) + pub shares_rejected: u64, + /// Current pool difficulty (from metrics pool_difficulty) + pub pool_difficulty: f64, + /// Best share difficulty this session (from metrics best_share) + pub best_share: f64, + + /// Per-worker stats parsed from worker_* metric lines. + /// Keyed by worker address. + pub workers: Vec, + + /// Human-readable status of the last share event (from WS or metrics) pub last_share_status: String, - pub last_block_status: String, + /// Timestamp string of last share (from WS Share event) pub last_submit_time: String, + + /// Recent WS event log lines for the Logs tab pub recent_logs: Vec, } +#[derive(Debug, Default, Clone)] +pub struct WorkerStat { + pub address: String, + /// worker_shares_valid_total + pub shares_valid: u64, + /// worker_last_share_at (Unix timestamp) + pub last_share_at: u64, + /// worker_best_share + pub best_share: f64, +} + impl ParsedP2PoolState { pub fn new() -> Self { Self { - miner_connected: false, + shares_accepted: 0, + shares_rejected: 0, + pool_difficulty: 0.0, + best_share: 0.0, + workers: Vec::new(), last_share_status: "No shares yet".to_string(), - last_block_status: "No blocks submitted".to_string(), last_submit_time: "-".to_string(), recent_logs: Vec::new(), } } - pub fn parse_log_line(&mut self, line: &str) { + /// Parse Prometheus text from GET /metrics. + /// Called on every REST poll tick. + pub fn parse_metrics(&mut self, text: &str) { + // Rebuild worker list from scratch on each poll + let mut workers: std::collections::HashMap = + std::collections::HashMap::new(); + + for line in text.lines() { + if line.starts_with('#') || line.is_empty() { + continue; + } + + // shares_accepted_total + if line.starts_with("shares_accepted_total") { + self.shares_accepted = last_word_as(line).unwrap_or(0); + if self.shares_accepted > 0 && self.last_share_status == "No shares yet" { + self.last_share_status = format!("{} accepted", self.shares_accepted); + } + continue; + } + + // shares_rejected_total + if line.starts_with("shares_rejected_total") { + self.shares_rejected = last_word_as(line).unwrap_or(0); + continue; + } + + // pool_difficulty + if line.starts_with("pool_difficulty") { + self.pool_difficulty = last_word_as(line).unwrap_or(0.0); + continue; + } + + // best_share (space avoids matching best_share_ever) + if line.starts_with("best_share ") { + self.best_share = last_word_as(line).unwrap_or(0.0); + continue; + } + + // worker_shares_valid_total{address="tb1q..."} + if line.starts_with("worker_shares_valid_total{") { + if let Some((addr, val)) = parse_worker_line(line) { + workers.entry(addr).or_default().shares_valid = val.parse().unwrap_or(0); + } + continue; + } + + // worker_last_share_at{address="tb1q..."} + if line.starts_with("worker_last_share_at{") { + if let Some((addr, val)) = parse_worker_line(line) { + let ts: u64 = val.parse().unwrap_or(0); + let w = workers.entry(addr).or_default(); + w.last_share_at = ts; + // Use the most recent worker timestamp as last_submit_time + if ts > 0 && self.last_submit_time == "-" { + self.last_submit_time = chrono::DateTime::from_timestamp(ts as i64, 0) + .map(|dt| dt.format("%H:%M:%S UTC").to_string()) + .unwrap_or_else(|| ts.to_string()); + } + } + continue; + } + + // worker_best_share{address="tb1q..."} + if line.starts_with("worker_best_share{") { + if let Some((addr, val)) = parse_worker_line(line) { + workers.entry(addr).or_default().best_share = val.parse().unwrap_or(0.0); + } + continue; + } + } + + // Flush worker address into struct and collect + self.workers = workers + .into_iter() + .map(|(addr, mut w)| { + w.address = addr; + w + }) + .collect(); + + // Sort by most recent activity + self.workers + .sort_by(|a, b| b.last_share_at.cmp(&a.last_share_at)); + } + + /// Feed a WS event line forwarded by connect_p2pool_websocket. + /// Format: "[SHARE EVENT] {\"topic\":\"Share\",\"data\":{...}}" + /// "[PEER EVENT] {\"topic\":\"Peer\",\"data\":{...}}" + pub fn parse_ws_event(&mut self, line: &str) { let line = line.trim(); if line.is_empty() { return; } self.recent_logs.push(line.to_string()); - if self.recent_logs.len() > 100 { - self.recent_logs.remove(0); + if self.recent_logs.len() > 200 { + self.recent_logs.drain(..self.recent_logs.len() - 200); } - // Lines from the WS are prefixed e.g. "[SHARE EVENT] {json}" - // Strip the prefix to get the raw JSON payload - let json_part = if let Some(pos) = line.find('{') { - &line[pos..] - } else { - return; + let pos = match line.find('{') { + Some(p) => p, + None => return, }; - if let Ok(msg) = serde_json::from_str::(json_part) { - match msg.topic.as_str() { - "Share" => { - // A share arrived — miner must be connected - self.miner_connected = true; - self.last_share_status = "Share accepted".to_string(); - self.last_submit_time = msg - .data - .get("timestamp") - .and_then(|v| v.as_u64()) - .map(|ts| { - chrono::DateTime::from_timestamp(ts as i64, 0) - .map(|dt| dt.format("%H:%M:%S").to_string()) - .unwrap_or_else(|| ts.to_string()) - }) - .unwrap_or_else(|| chrono::Utc::now().format("%H:%M:%S").to_string()); - if let Some(height) = msg.data.get("height").and_then(|v| v.as_u64()) { - self.last_share_status = format!("Accepted at height {}", height); - } - } - "Peer" => { - // Peer events don't affect miner/share state - // but are already in recent_logs for the Logs tab - } - "Chain" => { - if msg.data.get("block_submitted").is_some() { - self.last_block_status = "Block submitted successfully".to_string(); + let v: serde_json::Value = match serde_json::from_str(&line[pos..]) { + Ok(v) => v, + Err(_) => return, + }; + + match v.get("topic").and_then(|t| t.as_str()) { + Some("Share") => { + if let Some(data) = v.get("data") { + let height = data.get("height").and_then(|h| h.as_u64()); + let ts = data.get("timestamp").and_then(|t| t.as_u64()); + + self.last_share_status = match height { + Some(h) => format!("Accepted at height {h}"), + None => "Share accepted".to_string(), + }; + + if let Some(t) = ts { + self.last_submit_time = chrono::DateTime::from_timestamp(t as i64, 0) + .map(|dt| dt.format("%H:%M:%S UTC").to_string()) + .unwrap_or_else(|| t.to_string()); } } - _ => {} } + Some("Peer") => {} + + _ => {} } } - /// Update miner connected state and share stats from /metrics response. - /// Called on each REST poll as a fallback since the WS only emits - /// share events (not miner connect/disconnect events). - pub fn parse_metrics(&mut self, metrics_text: &str) { - for line in metrics_text.lines() { - if line.starts_with('#') || line.is_empty() { - continue; - } + /// True if any worker has submitted at least one share. + /// This is the closest approximation to "miner active" the API exposes. + pub fn any_worker_active(&self) -> bool { + self.workers + .iter() + .any(|w| w.shares_valid > 0 || w.last_share_at > 0) + } +} - // worker_last_share_at{...} — non-zero means a miner - // has submitted at least one share this session - if line.starts_with("worker_last_share_at") { - let val: f64 = line - .split_whitespace() - .last() - .and_then(|v| v.parse().ok()) - .unwrap_or(0.0); - if val > 0.0 { - self.miner_connected = true; - } - } +fn last_word_as(line: &str) -> Option { + line.split_whitespace().last()?.parse().ok() +} - if line.starts_with("shares_accepted_total") { - let count: u64 = line - .split_whitespace() - .last() - .and_then(|v| v.parse().ok()) - .unwrap_or(0); - if count > 0 { - self.last_share_status = format!("{} accepted", count); - } - } +/// Parse `metric_name{address="tb1q..."} value` → (address, value_str) +fn parse_worker_line(line: &str) -> Option<(String, String)> { + let addr_start = line.find("address=\"")? + "address=\"".len(); + let addr_end = line[addr_start..].find('"')? + addr_start; + let addr = line[addr_start..addr_end].to_string(); + let value = line.split_whitespace().last()?.to_string(); + Some((addr, value)) +} - if line.starts_with("shares_rejected_total") { - let count: u64 = line - .split_whitespace() - .last() - .and_then(|v| v.parse().ok()) - .unwrap_or(0); - if count > 0 { - // Only update if we don't have a better status already - if self.last_share_status == "No shares yet" { - self.last_share_status = format!("{} rejected", count); - } - } - } - } +#[cfg(test)] +mod tests { + use super::*; + + const METRICS: &str = r#" +shares_accepted_total 7 +shares_rejected_total 2 +pool_difficulty 10000 +best_share 99999 +worker_shares_valid_total{address="tb1qabc"} 7 +worker_last_share_at{address="tb1qabc"} 1777530500 +worker_best_share{address="tb1qabc"} 99999 +"#; + + #[test] + fn parses_pool_counters() { + let mut s = ParsedP2PoolState::new(); + s.parse_metrics(METRICS); + assert_eq!(s.shares_accepted, 7); + assert_eq!(s.shares_rejected, 2); + assert_eq!(s.pool_difficulty, 10000.0); + assert_eq!(s.best_share, 99999.0); + } + + #[test] + fn parses_worker_stats() { + let mut s = ParsedP2PoolState::new(); + s.parse_metrics(METRICS); + assert_eq!(s.workers.len(), 1); + assert_eq!(s.workers[0].address, "tb1qabc"); + assert_eq!(s.workers[0].shares_valid, 7); + assert_eq!(s.workers[0].last_share_at, 1777530500); + assert_eq!(s.workers[0].best_share, 99999.0); + } + + #[test] + fn any_worker_active_true_when_shares_submitted() { + let mut s = ParsedP2PoolState::new(); + s.parse_metrics(METRICS); + assert!(s.any_worker_active()); + } + + #[test] + fn any_worker_active_false_when_no_workers() { + let s = ParsedP2PoolState::new(); + assert!(!s.any_worker_active()); + } + + #[test] + fn ws_share_event_updates_status() { + let mut s = ParsedP2PoolState::new(); + s.parse_ws_event(r#"[SHARE EVENT] {"topic":"Share","data":{"height":42,"timestamp":1777530500,"blockhash":"abc","prev_blockhash":"def","miner_address":"tb1q","bits":"1d00ffff","uncles":[]}}"#); + assert_eq!(s.last_share_status, "Accepted at height 42"); + assert_ne!(s.last_submit_time, "-"); + } + + #[test] + fn ws_status_not_overwritten_by_metrics() { + let mut s = ParsedP2PoolState::new(); + s.last_share_status = "Accepted at height 99".to_string(); + s.parse_metrics("shares_accepted_total 3\n"); + assert_eq!(s.last_share_status, "Accepted at height 99"); } } diff --git a/src/components/p2pool_status_view.rs b/src/components/p2pool_status_view.rs index bdf3364..a887e5e 100644 --- a/src/components/p2pool_status_view.rs +++ b/src/components/p2pool_status_view.rs @@ -3,6 +3,8 @@ // SPDX-License-Identifier: AGPL-3.0-or-later use crate::app::{App, P2POOL_STATUS_TABS}; +use crate::components::difficulty::difficulty_from_bits; +use crate::components::p2pool_client::{ShareInfo, UncleInfo}; use ratatui::{ prelude::*, widgets::{Block, Borders, Cell, List, ListItem, Paragraph, Row, Table, Tabs, Wrap}, @@ -62,7 +64,10 @@ impl P2PoolStatusView { )), ] } else { - vec![Line::from("Loading chain info...")] + vec![Line::from(Span::styled( + "Loading chain info...", + Style::default().fg(Color::DarkGray), + ))] }; let paragraph = Paragraph::new(text) @@ -73,37 +78,134 @@ impl P2PoolStatusView { } // SYSTEM TAB + // ── Drop-in replacement for render_system in p2pool_status_view.rs ────────── + fn render_system(f: &mut Frame, app: &App, area: Rect) { - let api_status = if app.chain_info.is_some() { - "Connected" + let state = &app.p2pool_state; + let api_ok = app.chain_info.is_some(); + + let label = |s: &'static str| Span::styled(s, Style::default().fg(Color::Cyan)); + let value = |s: String| Span::raw(s); + + let api_span = if api_ok { + Span::styled("Connected", Style::default().fg(Color::Green)) } else { - "Disconnected" + Span::styled("Unreachable", Style::default().fg(Color::Red)) }; - let miner_connected = if app.p2pool_state.miner_connected { - "Yes" + // "Miner Connected" is not exposed — show worker activity instead + let worker_span = if state.any_worker_active() { + Span::styled( + format!("{} worker(s) active", state.workers.len()), + Style::default().fg(Color::Green), + ) } else { - "No" + Span::styled( + "No worker activity yet", + Style::default().fg(Color::DarkGray), + ) }; - let text = format!( - "API Status : {}\n\ - Miner Connected : {}\n\ - Last Share : {}\n\ - Last Block : {}\n\ - Last Submit Time : {}", - api_status, - miner_connected, - app.p2pool_state.last_share_status, - app.p2pool_state.last_block_status, - app.p2pool_state.last_submit_time, + let mut lines = vec![ + Line::from(vec![label("API Status : "), api_span]), + Line::from(vec![label("Worker Activity : "), worker_span]), + Line::from(vec![ + label("Shares Accepted : "), + value(state.shares_accepted.to_string()), + ]), + Line::from(vec![ + label("Shares Rejected : "), + value(state.shares_rejected.to_string()), + ]), + Line::from(vec![ + label("Pool Difficulty : "), + value(Self::format_difficulty_f64(state.pool_difficulty)), + ]), + Line::from(vec![ + label("Best Share : "), + value(Self::format_difficulty_f64(state.best_share)), + ]), + Line::from(vec![ + label("Last Share : "), + value(state.last_share_status.clone()), + ]), + Line::from(vec![ + label("Last Submit Time : "), + value(state.last_submit_time.clone()), + ]), + ]; + + // Per-worker breakdown (only shown when workers exist) + if !state.workers.is_empty() { + lines.push(Line::from("")); + lines.push(Line::from(Span::styled( + "Workers", + Style::default() + .fg(Color::Yellow) + .add_modifier(Modifier::BOLD), + ))); + + for w in &state.workers { + let ts = if w.last_share_at > 0 { + chrono::DateTime::from_timestamp(w.last_share_at as i64, 0) + .map(|dt| dt.format("%H:%M:%S UTC").to_string()) + .unwrap_or_else(|| w.last_share_at.to_string()) + } else { + "-".to_string() + }; + + lines.push(Line::from(vec![ + Span::styled(" ", Style::default()), + Span::styled( + Self::truncate_addr(&w.address, 20), + Style::default().fg(Color::White), + ), + Span::styled( + format!(" shares:{}", w.shares_valid), + Style::default().fg(Color::Green), + ), + Span::styled( + format!(" last:{}", ts), + Style::default().fg(Color::DarkGray), + ), + ])); + } + } + + f.render_widget( + Paragraph::new(lines) + .block(Block::default().borders(Borders::ALL).title(" System ")) + .wrap(Wrap { trim: true }), + area, ); + } - let paragraph = Paragraph::new(text) - .block(Block::default().borders(Borders::ALL).title(" System ")) - .wrap(Wrap { trim: true }); + fn format_difficulty_f64(value: f64) -> String { + if value <= 0.0 { + return "0".to_string(); + } + const SUFFIXES: &[&str] = &["", "K", "M", "G", "T", "P"]; + let mut scaled = value; + let mut tier = 0; + while scaled >= 1_000.0 && tier < SUFFIXES.len() - 1 { + scaled /= 1_000.0; + tier += 1; + } + if scaled >= 100.0 { + format!("{:.0}{}", scaled, SUFFIXES[tier]) + } else if scaled >= 10.0 { + format!("{:.1}{}", scaled, SUFFIXES[tier]) + } else { + format!("{:.2}{}", scaled, SUFFIXES[tier]) + } + } - f.render_widget(paragraph, area); + fn truncate_addr(s: &str, max: usize) -> String { + if s.len() <= max { + s.to_string() + } else { + format!("{}…", &s[..max]) + } } // LOGS TAB @@ -125,7 +227,10 @@ impl P2PoolStatusView { fn render_peers(f: &mut Frame, app: &App, area: Rect) { let rows: Vec = if app.peers.is_empty() { vec![Row::new(vec![ - Cell::from("No peers connected"), + Cell::from(Span::styled( + "No peers connected", + Style::default().fg(Color::DarkGray), + )), Cell::from("-"), Cell::from("-"), ])] @@ -135,7 +240,7 @@ impl P2PoolStatusView { .map(|peer| { Row::new(vec![ Cell::from(peer.peer_id.clone()), - Cell::from("Active"), + Cell::from(Span::styled("Active", Style::default().fg(Color::Green))), Cell::from("-"), ]) }) @@ -165,32 +270,121 @@ impl P2PoolStatusView { // SHARES TAB fn render_shares(f: &mut Frame, app: &App, area: Rect) { - let mut items: Vec = vec![ - ListItem::new(format!( - "Latest Status: {}", - app.p2pool_state.last_share_status - )), - ListItem::new(""), - ]; + // Split: status line on top, table below + let chunks = Layout::default() + .direction(Direction::Vertical) + .constraints([Constraint::Length(2), Constraint::Min(0)]) + .split(area); - if app.recent_shares.is_empty() { - items.push(ListItem::new("No accepted shares yet...")); - } else { - for share in &app.recent_shares { - items.push(ListItem::new(format!( - "Height: {} | Miner: {}", - share.height, share.miner_address - ))); + // Status line (mirrors "Latest Status" from the web Shares section) + let status_line = Line::from(vec![ + Span::styled("Latest Status: ", Style::default().fg(Color::Cyan)), + Span::raw(app.p2pool_state.last_share_status.clone()), + ]); + f.render_widget(Paragraph::new(vec![status_line]), chunks[0]); + + // Build flat row list: each share followed by its uncle rows (dimmed) + struct ShareRow<'a> { + height: String, + hash: String, + miner: String, + difficulty: String, + time: String, + uncles: String, + is_uncle: bool, + _phantom: std::marker::PhantomData<&'a ()>, + } + + let mut rows: Vec = Vec::new(); + + for share in &app.recent_shares { + rows.push(ShareRow { + height: share.height.to_string(), + hash: truncate(&share.blockhash, 10), + miner: truncate(&share.miner_address, 18), + difficulty: difficulty_from_bits(&share.bits), + time: format_ts(share.timestamp), + uncles: share.uncles.len().to_string(), + is_uncle: false, + _phantom: std::marker::PhantomData, + }); + + // Inline uncle rows — dimmed, indented miner column + for uncle in &share.uncles { + rows.push(ShareRow { + height: uncle.height.to_string(), + hash: truncate(&uncle.blockhash, 10), + miner: format!(" └ {}", truncate(&uncle.miner_address, 14)), + difficulty: "-".to_string(), + time: format_ts(uncle.timestamp), + uncles: "uncle".to_string(), + is_uncle: true, + _phantom: std::marker::PhantomData, + }); } } - let list = List::new(items).block( - Block::default() - .borders(Borders::ALL) - .title(" Recent Shares "), - ); + let header = Row::new(vec![ + Cell::from("Height").style(Style::default().add_modifier(Modifier::BOLD)), + Cell::from("Blockhash").style(Style::default().add_modifier(Modifier::BOLD)), + Cell::from("Miner").style(Style::default().add_modifier(Modifier::BOLD)), + Cell::from("Difficulty").style(Style::default().add_modifier(Modifier::BOLD)), + Cell::from("Time").style(Style::default().add_modifier(Modifier::BOLD)), + Cell::from("Uncles").style(Style::default().add_modifier(Modifier::BOLD)), + ]); + + let table_rows: Vec = if rows.is_empty() { + vec![Row::new(vec![ + Cell::from(Span::styled( + "No shares yet", + Style::default().fg(Color::DarkGray), + )), + Cell::from(""), + Cell::from(""), + Cell::from(""), + Cell::from(""), + Cell::from(""), + ])] + } else { + rows.iter() + .map(|r| { + let style = if r.is_uncle { + Style::default().fg(Color::DarkGray) // dimmed, like 0.55 opacity in CSS + } else { + Style::default() + }; + Row::new(vec![ + Cell::from(Span::styled(r.height.clone(), style)), + Cell::from(Span::styled(r.hash.clone(), style)), + Cell::from(Span::styled(r.miner.clone(), style)), + Cell::from(Span::styled(r.difficulty.clone(), style)), + Cell::from(Span::styled(r.time.clone(), style)), + Cell::from(Span::styled(r.uncles.clone(), style)), + ]) + }) + .collect() + }; - f.render_widget(list, area); + f.render_widget( + Table::new( + table_rows, + [ + Constraint::Length(9), // Height + Constraint::Length(12), // Hash + Constraint::Min(20), // Miner + Constraint::Length(12), // Difficulty + Constraint::Length(21), // Time + Constraint::Length(7), // Uncles + ], + ) + .header(header) + .block( + Block::default() + .borders(Borders::ALL) + .title(" Recent Shares "), + ), + chunks[1], + ); } } @@ -199,3 +393,17 @@ impl Default for P2PoolStatusView { Self::new() } } + +fn truncate(s: &str, max: usize) -> String { + if s.len() <= max { + s.to_string() + } else { + format!("{}…", &s[..max]) + } +} + +fn format_ts(timestamp: u64) -> String { + chrono::DateTime::from_timestamp(timestamp as i64, 0) + .map(|dt| dt.format("%Y-%m-%d %H:%M").to_string()) + .unwrap_or_else(|| timestamp.to_string()) +} diff --git a/src/main.rs b/src/main.rs index ce08335..ea40473 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,7 @@ use pdm::components::p2pool_websockets::connect_p2pool_websocket; use pdm::config::load_api_config; use ratatui::{Terminal, backend::Backend, backend::CrosstermBackend}; use std::io; +use std::time::{Duration, Instant}; use tokio::runtime::Runtime; use tokio::sync::mpsc; @@ -73,14 +74,15 @@ fn sidebar_nav(key: KeyCode, app: &mut App) -> AppAction { _ => AppAction::None, } } - +const REST_POLL_INTERVAL: Duration = Duration::from_secs(5); +const KEY_POLL_TIMEOUT: Duration = Duration::from_millis(100); async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> where B::Error: Send + Sync + 'static, { let api_config = load_api_config()?; let client = P2PoolClient::with_base_url(api_config.base_url.clone()); - let (tx, mut rx) = mpsc::channel::(100); + let (tx, mut rx) = mpsc::channel::(256); let token: Option = match (api_config.auth_user.as_ref(), api_config.auth_pass.as_ref()) { @@ -95,32 +97,58 @@ where tokio::spawn(async move { connect_p2pool_websocket(&ws_base_url, ws_token.as_deref(), tx).await; }); + let mut last_rest_poll = Instant::now() + .checked_sub(REST_POLL_INTERVAL) + .unwrap_or_else(Instant::now); loop { - //chain info - if let Ok(chain_info) = client.fetch_chain_info().await { - app.chain_info = Some(chain_info); - } - - // Peers - if let Ok(peers) = client.fetch_peers().await { - app.peers = peers; - } + if last_rest_poll.elapsed() >= REST_POLL_INTERVAL { + //chain info + if let Ok(info) = client.fetch_chain_info().await { + app.chain_info = Some(info); + } + // Peers + if let Ok(peers) = client.fetch_peers().await { + app.peers = peers; + } - // Recent shares (latest 10) - if let Ok(shares) = client.fetch_shares(None, Some(10)).await { - app.recent_shares = shares.shares; - } + // Recent shares (latest 10) + if let Ok(shares) = client.fetch_shares(None, Some(10)).await { + // Only update from REST if WS hasn't added newer shares + let rest_tip = shares.shares.first().map(|s| s.height); + let ws_tip = app.recent_shares.first().map(|s| s.height); + if rest_tip >= ws_tip { + app.recent_shares = shares.shares; + } + } - if let Ok(metrics_text) = client.fetch_metrics(basic_auth.as_deref()).await { - app.p2pool_state.parse_metrics(&metrics_text); + if let Ok(metrics_text) = client.fetch_metrics(basic_auth.as_deref()).await { + app.p2pool_state.parse_metrics(&metrics_text); + } + last_rest_poll = Instant::now(); } while let Ok(log) = rx.try_recv() { - app.p2pool_state.parse_log_line(&log); + app.p2pool_state.parse_ws_event(&log); + + if log.starts_with("[SHARE EVENT]") { + if let Some(pos) = log.find('{') { + if let Ok(msg) = serde_json::from_str::(&log[pos..]) { + if let Some(data) = msg.get("data") { + prepend_ws_share(data, app); + } + } + } + } + if log.starts_with("[PEER EVENT]") { + handle_ws_peer(&log, app); + } } terminal.draw(|f| ui::ui(f, app))?; + if !event::poll(KEY_POLL_TIMEOUT)? { + continue; // no key ready — go back to top for next WS drain + redraw + } if let Event::Key(key) = event::read()? { if key.kind != KeyEventKind::Press { @@ -259,6 +287,100 @@ where } } +fn prepend_ws_share(data: &serde_json::Value, app: &mut App) { + use pdm::components::p2pool_client::{ShareInfo, UncleInfo}; + + fn s(v: &serde_json::Value, k: &str) -> String { + v.get(k).and_then(|x| x.as_str()).unwrap_or("").to_string() + } + + let height = data.get("height").and_then(|v| v.as_u64()).unwrap_or(0); + let blockhash = s(data, "blockhash"); + + // Don't prepend a duplicate (WS can re-deliver) + if app.recent_shares.first().map(|r| r.height) == Some(height) { + return; + } + + let share = ShareInfo { + blockhash: blockhash.clone(), + prev_blockhash: s(data, "prev_blockhash"), + height, + miner_address: s(data, "miner_address"), + timestamp: data.get("timestamp").and_then(|v| v.as_u64()).unwrap_or(0), + bits: s(data, "bits"), + uncles: data + .get("uncles") + .and_then(|v| v.as_array()) + .map(|arr| { + arr.iter() + .filter_map(|u| { + let hash = u.as_str().map(String::from).or_else(|| { + u.get("blockhash") + .and_then(|v| v.as_str()) + .map(String::from) + })?; + Some(UncleInfo { + blockhash: hash, + prev_blockhash: s(u, "prev_blockhash"), + miner_address: s(u, "miner_address"), + timestamp: u.get("timestamp").and_then(|v| v.as_u64()).unwrap_or(0), + height: u.get("height").and_then(|v| v.as_u64()).unwrap_or(0), + }) + }) + .collect() + }) + .unwrap_or_default(), + }; + + if let Some(ref mut info) = app.chain_info { + info.chain_tip_height = Some(height); + info.chain_tip_blockhash = Some(blockhash); + } + + app.recent_shares.insert(0, share); + if app.recent_shares.len() > 1_000 { + app.recent_shares.truncate(1_000); + } +} +fn handle_ws_peer(line: &str, app: &mut App) { + use pdm::components::p2pool_client::PeerInfo; + + let pos = match line.find('{') { + Some(p) => p, + None => return, + }; + let v: serde_json::Value = match serde_json::from_str(&line[pos..]) { + Ok(v) => v, + Err(_) => return, + }; + + let data = match v.get("data") { + Some(d) => d, + None => return, + }; + + let peer_id = match data.get("peer_id").and_then(|p| p.as_str()) { + Some(id) => id.to_string(), + None => return, + }; + + let status = data.get("status").and_then(|s| s.as_str()).unwrap_or(""); + + match status { + "Connected" => { + // Add if not already present + if !app.peers.iter().any(|p| p.peer_id == peer_id) { + app.peers.push(PeerInfo { peer_id }); + } + } + "Disconnected" => { + app.peers.retain(|p| p.peer_id != peer_id); + } + _ => {} + } +} + /// Pre-populate app state from `app.settings`. Called once at startup after /// settings have been loaded into `app.settings = load_settings()`. fn bootstrap_from_settings(app: &mut App) { From 9796edfba4dbcdd76421a2757ef388372a61bad9 Mon Sep 17 00:00:00 2001 From: Raunak Kumar Date: Fri, 1 May 2026 10:38:19 +0000 Subject: [PATCH 6/6] WIP: Testing --- src/app.rs | 2 + src/components/p2pool_client.rs | 41 +++++++++++++--- src/components/p2pool_log_parser.rs | 11 +++++ src/components/p2pool_status_view.rs | 33 +++++++++---- src/components/p2pool_websockets.rs | 1 + src/main.rs | 48 ++++++++++++++++--- ...i__tests__p2pool_status_screen_render.snap | 3 +- 7 files changed, 115 insertions(+), 24 deletions(-) diff --git a/src/app.rs b/src/app.rs index ce8bd28..0c22d6d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -117,6 +117,7 @@ pub struct App { pub recent_shares: Vec, pub p2pool_logs: Vec, pub p2pool_state: ParsedP2PoolState, + pub api_status: Option, } impl App { @@ -145,6 +146,7 @@ impl App { recent_shares: Vec::new(), p2pool_logs: Vec::new(), p2pool_state: ParsedP2PoolState::new(), + api_status: None, } } diff --git a/src/components/p2pool_client.rs b/src/components/p2pool_client.rs index 5f36435..e0e0120 100644 --- a/src/components/p2pool_client.rs +++ b/src/components/p2pool_client.rs @@ -28,6 +28,7 @@ pub struct ChainInfo { #[derive(Debug, Clone, Deserialize)] pub struct PeerInfo { pub peer_id: String, + pub status: String, } #[derive(Debug, Clone, Deserialize)] @@ -96,10 +97,15 @@ impl P2PoolClient { } } - pub async fn fetch_health(&self) -> Result { + pub async fn fetch_health(&self, basic_auth: Option<&str>) -> Result { let url = format!("{}/health", self.base_url); - let response = self.client.get(url).send().await?; + let mut request = self.client.get(url); + if let Some(auth) = basic_auth { + request = request.header("Authorization", auth); + } + + let response = request.send().await?; let text = response.text().await?; Ok(text) @@ -119,19 +125,35 @@ impl P2PoolClient { Ok(text) } - pub async fn fetch_chain_info(&self) -> Result { + pub async fn fetch_chain_info( + &self, + basic_auth: Option<&str>, + ) -> Result { let url = format!("{}/chain_info", self.base_url); - let response = self.client.get(url).send().await?; + let mut request = self.client.get(url); + if let Some(auth) = basic_auth { + request = request.header("Authorization", auth); + } + + let response = request.send().await?; let data = response.json::().await?; Ok(data) } - pub async fn fetch_peers(&self) -> Result, reqwest::Error> { + pub async fn fetch_peers( + &self, + basic_auth: Option<&str>, + ) -> Result, reqwest::Error> { let url = format!("{}/peers", self.base_url); - let response = self.client.get(url).send().await?; + let mut request = self.client.get(url); + if let Some(auth) = basic_auth { + request = request.header("Authorization", auth); + } + + let response = request.send().await?; let data = response.json::>().await?; Ok(data) @@ -141,6 +163,7 @@ impl P2PoolClient { &self, to: Option, num: Option, + basic_auth: Option<&str>, ) -> Result { let url = format!("{}/shares", self.base_url); @@ -154,6 +177,10 @@ impl P2PoolClient { request = request.query(&[("num", num)]); } + if let Some(auth) = basic_auth { + request = request.header("Authorization", auth); + } + let response = request.send().await?; let data = response.json::().await?; @@ -264,8 +291,10 @@ mod tests { fn test_peer_model() { let peer = PeerInfo { peer_id: "12D3KooWExample".to_string(), + status: "Active".to_string(), }; assert_eq!(peer.peer_id, "12D3KooWExample"); + assert_eq!(peer.status, "Active"); } } diff --git a/src/components/p2pool_log_parser.rs b/src/components/p2pool_log_parser.rs index c7d6c2d..37c5732 100644 --- a/src/components/p2pool_log_parser.rs +++ b/src/components/p2pool_log_parser.rs @@ -12,6 +12,8 @@ pub struct ParsedP2PoolState { pub pool_difficulty: f64, /// Best share difficulty this session (from metrics best_share) pub best_share: f64, + /// Best share ever (from metrics best_share_ever) + pub best_share_ever: f64, /// Per-worker stats parsed from worker_* metric lines. /// Keyed by worker address. @@ -44,6 +46,7 @@ impl ParsedP2PoolState { shares_rejected: 0, pool_difficulty: 0.0, best_share: 0.0, + best_share_ever: 0.0, workers: Vec::new(), last_share_status: "No shares yet".to_string(), last_submit_time: "-".to_string(), @@ -90,6 +93,12 @@ impl ParsedP2PoolState { continue; } + // best_share_ever + if line.starts_with("best_share_ever") { + self.best_share_ever = last_word_as(line).unwrap_or(0.0); + continue; + } + // worker_shares_valid_total{address="tb1q..."} if line.starts_with("worker_shares_valid_total{") { if let Some((addr, val)) = parse_worker_line(line) { @@ -216,6 +225,7 @@ shares_accepted_total 7 shares_rejected_total 2 pool_difficulty 10000 best_share 99999 +best_share_ever 199999 worker_shares_valid_total{address="tb1qabc"} 7 worker_last_share_at{address="tb1qabc"} 1777530500 worker_best_share{address="tb1qabc"} 99999 @@ -229,6 +239,7 @@ worker_best_share{address="tb1qabc"} 99999 assert_eq!(s.shares_rejected, 2); assert_eq!(s.pool_difficulty, 10000.0); assert_eq!(s.best_share, 99999.0); + assert_eq!(s.best_share_ever, 199999.0); } #[test] diff --git a/src/components/p2pool_status_view.rs b/src/components/p2pool_status_view.rs index a887e5e..fc013fd 100644 --- a/src/components/p2pool_status_view.rs +++ b/src/components/p2pool_status_view.rs @@ -45,23 +45,30 @@ impl P2PoolStatusView { } } - // CHAIN INFO TAB fn render_chain_info(f: &mut Frame, app: &App, area: Rect) { let text = if let Some(info) = &app.chain_info { vec![ Line::from(format!( - "Chain Tip Height : {}", + "Genesis Blockhash : {}", + info.genesis_blockhash.as_deref().unwrap_or("-") + )), + Line::from(format!( + "Chain Tip Height : {}", info.chain_tip_height.unwrap_or(0) )), Line::from(format!( - "Top Candidate Height : {:?}", + "Chain Tip Blockhash : {}", + info.chain_tip_blockhash.as_deref().unwrap_or("-") + )), + Line::from(format!( + "Top Candidate Height : {:?}", info.top_candidate_height )), - Line::from(format!("Total Work : {}", info.total_work)), Line::from(format!( - "Tip Blockhash : {}", - info.chain_tip_blockhash.as_deref().unwrap_or("-") + "Top Candidate Blockhash: {}", + info.top_candidate_blockhash.as_deref().unwrap_or("-") )), + Line::from(format!("Total Work : {}", info.total_work)), ] } else { vec![Line::from(Span::styled( @@ -78,11 +85,13 @@ impl P2PoolStatusView { } // SYSTEM TAB - // ── Drop-in replacement for render_system in p2pool_status_view.rs ────────── - fn render_system(f: &mut Frame, app: &App, area: Rect) { let state = &app.p2pool_state; - let api_ok = app.chain_info.is_some(); + let api_ok = app + .api_status + .as_ref() + .map(|s| s.trim() == "OK") + .unwrap_or(false); let label = |s: &'static str| Span::styled(s, Style::default().fg(Color::Cyan)); let value = |s: String| Span::raw(s); @@ -125,6 +134,10 @@ impl P2PoolStatusView { label("Best Share : "), value(Self::format_difficulty_f64(state.best_share)), ]), + Line::from(vec![ + label("Best Share Ever : "), + value(Self::format_difficulty_f64(state.best_share_ever)), + ]), Line::from(vec![ label("Last Share : "), value(state.last_share_status.clone()), @@ -240,7 +253,7 @@ impl P2PoolStatusView { .map(|peer| { Row::new(vec![ Cell::from(peer.peer_id.clone()), - Cell::from(Span::styled("Active", Style::default().fg(Color::Green))), + Cell::from(peer.status.clone()), Cell::from("-"), ]) }) diff --git a/src/components/p2pool_websockets.rs b/src/components/p2pool_websockets.rs index bb7336b..c6e9ba3 100644 --- a/src/components/p2pool_websockets.rs +++ b/src/components/p2pool_websockets.rs @@ -11,6 +11,7 @@ use serde::Deserialize; #[derive(Debug, Deserialize)] pub struct WsPeerEvent { pub peer_id: String, + pub status: String, } #[derive(Debug, Deserialize)] diff --git a/src/main.rs b/src/main.rs index ea40473..3602cf6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,6 +17,7 @@ use std::ops::ControlFlow; use anyhow::Result; use base64::{Engine, engine::general_purpose::STANDARD}; +use chrono; use crossterm::{ event::{self, Event, KeyCode, KeyEventKind, KeyModifiers}, execute, @@ -32,6 +33,9 @@ use std::time::{Duration, Instant}; use tokio::runtime::Runtime; use tokio::sync::mpsc; +const REST_POLL_INTERVAL: Duration = Duration::from_secs(5); +const KEY_POLL_TIMEOUT: Duration = Duration::from_millis(100); + fn main() -> Result<()> { // Setup Terminal enable_raw_mode()?; @@ -74,8 +78,11 @@ fn sidebar_nav(key: KeyCode, app: &mut App) -> AppAction { _ => AppAction::None, } } -const REST_POLL_INTERVAL: Duration = Duration::from_secs(5); -const KEY_POLL_TIMEOUT: Duration = Duration::from_millis(100); +fn format_ts(timestamp: u64) -> String { + chrono::DateTime::from_timestamp(timestamp as i64, 0) + .map(|dt| dt.format("%H:%M:%S UTC").to_string()) + .unwrap_or_else(|| timestamp.to_string()) +} async fn run_app(terminal: &mut Terminal, app: &mut App) -> Result<()> where B::Error: Send + Sync + 'static, @@ -103,17 +110,41 @@ where loop { if last_rest_poll.elapsed() >= REST_POLL_INTERVAL { + // API health + if let Ok(health) = client.fetch_health(basic_auth.as_deref()).await { + app.api_status = Some(health); + } //chain info - if let Ok(info) = client.fetch_chain_info().await { + if let Ok(info) = client.fetch_chain_info(basic_auth.as_deref()).await { app.chain_info = Some(info); } // Peers - if let Ok(peers) = client.fetch_peers().await { + if let Ok(peers) = client.fetch_peers(basic_auth.as_deref()).await { app.peers = peers; } - // Recent shares (latest 10) - if let Ok(shares) = client.fetch_shares(None, Some(10)).await { + // Last share + if let Ok(last_share_resp) = client + .fetch_shares(None, Some(1), basic_auth.as_deref()) + .await + { + if let Some(last_share) = last_share_resp.shares.first() { + // Update last share status if not already set by WS + if app.p2pool_state.last_share_status == "No shares yet" + || !app.p2pool_state.last_share_status.starts_with("Accepted") + { + app.p2pool_state.last_share_status = + format!("Accepted at height {}", last_share.height); + app.p2pool_state.last_submit_time = format_ts(last_share.timestamp); + } + } + } + + // Recent shares (latest 100) + if let Ok(shares) = client + .fetch_shares(None, Some(100), basic_auth.as_deref()) + .await + { // Only update from REST if WS hasn't added newer shares let rest_tip = shares.shares.first().map(|s| s.height); let ws_tip = app.recent_shares.first().map(|s| s.height); @@ -371,7 +402,10 @@ fn handle_ws_peer(line: &str, app: &mut App) { "Connected" => { // Add if not already present if !app.peers.iter().any(|p| p.peer_id == peer_id) { - app.peers.push(PeerInfo { peer_id }); + app.peers.push(PeerInfo { + peer_id, + status: status.to_string(), + }); } } "Disconnected" => { diff --git a/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap b/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap index 639ec94..f98bf3e 100644 --- a/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap +++ b/src/snapshots/pdm__ui__tests__p2pool_status_screen_render.snap @@ -1,6 +1,5 @@ --- source: src/ui.rs -assertion_line: 190 expression: terminal.backend() --- TestBackend { @@ -38,6 +37,8 @@ TestBackend { x: 37, y: 1, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 1, y: 5, fg: Black, bg: Gray, underline: Reset, modifier: NONE, x: 24, y: 5, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, + x: 26, y: 5, fg: DarkGray, bg: Reset, underline: Reset, modifier: NONE, + x: 47, y: 5, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 0, y: 23, fg: White, bg: DarkGray, underline: Reset, modifier: NONE, x: 4, y: 23, fg: DarkGray, bg: Black, underline: Reset, modifier: NONE, x: 23, y: 23, fg: White, bg: DarkGray, underline: Reset, modifier: NONE,