From eb102506d222b36f5101acdd7fda39cacb502241 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Sat, 15 Jun 2024 05:50:50 +0000 Subject: [PATCH 1/2] chore: wip --- .devcontainer/devcontainer.json | 21 + Cargo.lock | 6291 ++++++++++++----- Cargo.toml | 105 +- LICENSE | 689 +- bin/bee-rs/Cargo.toml | 1 + bin/swarm-wasm-lib/Cargo.toml | 2 +- bin/waku-swarm-relay/Cargo.toml | 6 +- bin/wasm-playground/src/lib.rs | 17 +- crates/logging/Cargo.toml | 4 +- crates/manifest/Cargo.toml | 4 +- crates/p2p/Cargo.toml | 24 + crates/p2p/src/main.rs | 211 + crates/postage/src/stamp.rs | 5 +- crates/protocols/cursors/Cargo.toml | 8 + crates/protocols/cursors/src/lib.rs | 14 + crates/protocols/handshake/Cargo.toml | 15 + crates/protocols/handshake/build.rs | 5 + .../protocols/handshake/src/handshake.proto | 30 + crates/protocols/handshake/src/lib.rs | 23 + crates/protocols/kad/Cargo.toml | 8 + crates/protocols/kad/src/lib.rs | 14 + crates/protocols/pseudosettle/Cargo.toml | 8 + crates/protocols/pseudosettle/src/lib.rs | 14 + crates/protocols/pullsync/Cargo.toml | 8 + crates/protocols/pullsync/src/lib.rs | 14 + crates/protocols/pushsync/Cargo.toml | 8 + crates/protocols/pushsync/src/lib.rs | 14 + crates/protocols/retrieval/Cargo.toml | 8 + crates/protocols/retrieval/src/lib.rs | 14 + crates/protocols/status/Cargo.toml | 8 + crates/protocols/status/src/lib.rs | 14 + crates/protocols/swap/Cargo.toml | 8 + crates/protocols/swap/src/lib.rs | 14 + crates/swarm/Cargo.toml | 14 + crates/swarm/src/distance.rs | 109 + crates/swarm/src/lib.rs | 185 + crates/swarm/src/overlay.rs | 114 + crates/swarm/src/proximity.rs | 216 + 38 files changed, 6513 insertions(+), 1754 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 crates/p2p/Cargo.toml create mode 100644 crates/p2p/src/main.rs create mode 100644 crates/protocols/cursors/Cargo.toml create mode 100644 crates/protocols/cursors/src/lib.rs create mode 100644 crates/protocols/handshake/Cargo.toml create mode 100644 crates/protocols/handshake/build.rs create mode 100644 crates/protocols/handshake/src/handshake.proto create mode 100644 crates/protocols/handshake/src/lib.rs create mode 100644 crates/protocols/kad/Cargo.toml create mode 100644 crates/protocols/kad/src/lib.rs create mode 100644 crates/protocols/pseudosettle/Cargo.toml create mode 100644 crates/protocols/pseudosettle/src/lib.rs create mode 100644 crates/protocols/pullsync/Cargo.toml create mode 100644 crates/protocols/pullsync/src/lib.rs create mode 100644 crates/protocols/pushsync/Cargo.toml create mode 100644 crates/protocols/pushsync/src/lib.rs create mode 100644 crates/protocols/retrieval/Cargo.toml create mode 100644 crates/protocols/retrieval/src/lib.rs create mode 100644 crates/protocols/status/Cargo.toml create mode 100644 crates/protocols/status/src/lib.rs create mode 100644 crates/protocols/swap/Cargo.toml create mode 100644 crates/protocols/swap/src/lib.rs create mode 100644 crates/swarm/Cargo.toml create mode 100644 crates/swarm/src/distance.rs create mode 100644 crates/swarm/src/lib.rs create mode 100644 crates/swarm/src/overlay.rs create mode 100644 crates/swarm/src/proximity.rs diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ab07664 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,21 @@ +{ + "name": "Rust Development Container", + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "ghcr.io/devcontainers/features/rust:1": { + "version": "nightly-2024-06-07" + }, + "ghcr.io/nlordell/features/foundry": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer" + ] + } + }, + "runArgs": [ + "--network=host" + ] +} + diff --git a/Cargo.lock b/Cargo.lock index b4a1a61..3ec391c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -29,9 +29,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -54,1742 +54,3655 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", "version_check", ] +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "allocator-api2" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +name = "alloy" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-node-bindings", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-rpc-types-trace", + "alloy-serde", + "alloy-signer", + "alloy-signer-aws", + "alloy-signer-ledger", + "alloy-signer-trezor", + "alloy-signer-wallet", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "reqwest 0.12.4", +] + +[[package]] +name = "alloy-chains" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fd095a9d70f4b1c5c102c84a4c782867a5c6416dbf6dcd42a63e7c7a89d3c8" dependencies = [ - "libc", + "num_enum", + "strum", ] [[package]] -name = "anstream" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "serde", ] [[package]] -name = "anstyle" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] [[package]] -name = "anstyle-parse" -version = "0.2.1" +name = "alloy-core" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "31b8b8d8c4e84449ce8f310ed48e09ce38b8290b163e3d0df68ea445a9ccce3a" dependencies = [ - "utf8parse", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", ] [[package]] -name = "anstyle-query" -version = "1.0.0" +name = "alloy-dyn-abi" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "efd2404399cb1b50572758e66e9b4bf088e5a3df9007be7126456c7e50af935f" dependencies = [ - "windows-sys 0.48.0", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.13", ] [[package]] -name = "anstyle-wincon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "anstyle", - "windows-sys 0.48.0", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2", ] [[package]] -name = "anyhow" -version = "1.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-recursion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.22", + "alloy-primitives", + "alloy-serde", + "serde", + "serde_json", ] [[package]] -name = "async-trait" -version = "0.1.68" +name = "alloy-json-abi" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "7c3abf6446a292e19853aaca43590eeb48bf435dfd2c74200259e8f4872f6ce3" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.22", + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", ] [[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "futures", - "pharos", - "rustc_version", + "alloy-primitives", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", ] [[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +name = "alloy-node-bindings" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-genesis", + "alloy-primitives", + "k256", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", ] [[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.67" +name = "alloy-primitives" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "5277af0cbcc483ee6ad2c1e818090b5928d27f04fd6580680f31c1cf8068bcc2" dependencies = [ - "addr2line", - "cc", + "alloy-rlp", + "bytes", "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", ] [[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.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" - -[[package]] -name = "bee-rs" +name = "alloy-provider" version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-node-bindings", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-rpc-types-anvil", + "alloy-rpc-types-trace", + "alloy-signer-wallet", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru 0.12.3", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] [[package]] -name = "bee_api" +name = "alloy-pubsub" version = "0.1.0" -source = "git+https://github.com/rndlabs/bee-api-rs.git#49ef4190f3bf3e0111a31c1277e8a3c4fb2e87f9" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "hex", - "reqwest", + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", "serde", + "serde_json", "tokio", + "tokio-stream", + "tower", + "tracing", ] [[package]] -name = "bincode" -version = "1.3.3" +name = "alloy-rlp" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" dependencies = [ - "serde", + "alloy-rlp-derive", + "arrayvec", + "bytes", ] [[package]] -name = "bindgen" -version = "0.64.0" +name = "alloy-rlp-derive" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241" dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", "proc-macro2", "quote", - "regex", - "rustc-hash", - "shlex", - "syn 1.0.109", - "which", + "syn 2.0.66", ] [[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest 0.12.4", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] [[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-genesis", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", ] [[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +name = "alloy-rpc-types-anvil" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "funty", - "radium 0.7.0", - "tap", - "wyz", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +name = "alloy-rpc-types-trace" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "generic-array", + "alloy-primitives", + "alloy-rpc-types", + "alloy-serde", + "serde", + "serde_json", ] [[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "generic-array", + "alloy-primitives", + "serde", + "serde_json", ] [[package]] -name = "bmt" +name = "alloy-signer" version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "hex", - "tiny-keccak", + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", ] [[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +name = "alloy-signer-aws" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "sha2 0.9.9", + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "aws-sdk-kms", + "k256", + "spki", + "thiserror", + "tracing", ] [[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +name = "alloy-signer-ledger" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "coins-ledger", + "futures-util", + "semver 1.0.23", + "thiserror", + "tracing", +] [[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +name = "alloy-signer-trezor" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "semver 1.0.23", + "thiserror", + "tracing", + "trezor-client", +] [[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +name = "alloy-signer-wallet" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "coins-bip32", + "coins-bip39", + "elliptic-curve", + "eth-keystore", + "k256", + "rand", + "thiserror", + "yubihsm", +] [[package]] -name = "bytes" -version = "1.4.0" +name = "alloy-sol-macro" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "30708a79919b082f2692423c8cc72fc250477e4a2ecb0d4a7244cd3cdb299965" dependencies = [ - "serde", + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "cc" -version = "1.0.79" +name = "alloy-sol-macro-expander" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "1c7a679ac01774ab7e00a567a918d4231ae692c5c8cedaf4e16956c3116d7896" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.2.6", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.66", + "syn-solidity", + "tiny-keccak", +] [[package]] -name = "cexpr" -version = "0.6.0" +name = "alloy-sol-macro-input" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +checksum = "356da0c2228aa6675a5faaa08a3e4061b967f924753983d72b9a18d9a3fad44e" dependencies = [ - "nom", + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.66", + "syn-solidity", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "alloy-sol-type-parser" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "81fd4783b0a5840479013e9ce960d2eb7b3be381f722e0fe3d1f7c3bb6bd4ebd" +dependencies = [ + "winnow 0.6.13", +] [[package]] -name = "chrono" -version = "0.4.26" +name = "alloy-sol-types" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "6eb5e6234c0b62514992589fe1578f64d418dbc8ef5cd1ab2d7f2f568f599698" dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", "serde", - "time 0.1.45", - "wasm-bindgen", - "winapi", ] [[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "crypto-common", - "inout", + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", ] [[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "glob", - "libc", - "libloading", + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.4", + "serde_json", + "tower", + "tracing", + "url", ] [[package]] -name = "clap" -version = "4.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba77a07e4489fb41bd90e8d4201c3eb246b3c2c9ea2ba0bddd6c1d1df87db7d" +name = "alloy-transport-ipc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" dependencies = [ - "clap_builder", - "clap_derive", - "once_cell", + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", ] [[package]] -name = "clap_builder" -version = "4.3.9" +name = "alloy-transport-ws" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http 0.2.12", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9b4a88bb4bc35d3d6f65a21b0f0bafe9c894fa00978de242c555ec28bea1c0" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "anstream", - "anstyle", - "bitflags", - "clap_lex", - "strsim", + "libc", ] [[package]] -name = "clap_derive" -version = "4.3.2" +name = "anstream" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.22", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", ] [[package]] -name = "clap_lex" -version = "0.5.0" +name = "anstyle" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] -name = "coins-bip32" -version = "0.8.3" +name = "anstyle-parse" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ - "bincode", - "bs58", - "coins-core", - "digest 0.10.7", - "getrandom", - "hmac", - "k256 0.13.1", - "lazy_static", - "serde", - "sha2 0.10.7", - "thiserror", + "utf8parse", ] [[package]] -name = "coins-bip39" -version = "0.8.6" +name = "anstyle-query" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ - "bitvec 0.17.4", - "coins-bip32", - "getrandom", - "hmac", - "once_cell", - "pbkdf2 0.12.1", - "rand", - "sha2 0.10.7", - "thiserror", + "windows-sys 0.52.0", ] [[package]] -name = "coins-core" -version = "0.8.3" +name = "anstyle-wincon" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ - "base64 0.21.2", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2 0.10.7", - "sha3", - "thiserror", + "anstyle", + "windows-sys 0.52.0", ] [[package]] -name = "colorchoice" -version = "1.0.0" +name = "anyhow" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] -name = "console_error_panic_hook" -version = "0.1.7" +name = "ark-ff" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ - "cfg-if", - "wasm-bindgen", + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", ] [[package]] -name = "const-oid" -version = "0.9.2" +name = "ark-ff" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] [[package]] -name = "const_format" -version = "0.2.31" +name = "ark-ff-asm" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ - "const_format_proc_macros", + "quote", + "syn 1.0.109", ] [[package]] -name = "const_format_proc_macros" -version = "0.2.31" +name = "ark-ff-asm" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "proc-macro2", "quote", - "unicode-xid", + "syn 1.0.109", ] [[package]] -name = "convert_case" -version = "0.6.0" +name = "ark-ff-macros" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "unicode-segmentation", + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", ] [[package]] -name = "core-foundation" -version = "0.9.3" +name = "ark-ff-macros" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "core-foundation-sys", - "libc", + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "core-foundation-sys" -version = "0.8.4" +name = "ark-serialize" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] [[package]] -name = "core2" -version = "0.4.0" +name = "ark-serialize" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "memchr", + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", ] [[package]] -name = "cpufeatures" -version = "0.2.8" +name = "ark-std" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ - "libc", + "num-traits", + "rand", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] [[package]] -name = "crypto-bigint" -version = "0.4.9" +name = "arrayref" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] -name = "crypto-common" -version = "0.1.6" +name = "arrayvec" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "rand_core", - "typenum", -] +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] -name = "ctr" -version = "0.9.2" +name = "asn1-rs" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" dependencies = [ - "cipher", + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", ] [[package]] -name = "darling" -version = "0.20.1" +name = "asn1-rs-derive" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" dependencies = [ - "darling_core", - "darling_macro", + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", ] [[package]] -name = "darling_core" -version = "0.20.1" +name = "asn1-rs-impl" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ - "fnv", - "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] -name = "darling_macro" -version = "0.20.1" +name = "async-io" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" dependencies = [ - "darling_core", - "quote", - "syn 2.0.22", + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "data-encoding-macro" -version = "0.1.13" +name = "async-lock" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "data-encoding", - "data-encoding-macro-internal", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] [[package]] -name = "data-encoding-macro-internal" -version = "0.1.11" +name = "async-recursion" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ - "data-encoding", - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "der" -version = "0.6.1" +name = "async-stream" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ - "const-oid", - "zeroize", + "async-stream-impl", + "futures-core", + "pin-project-lite", ] [[package]] -name = "der" -version = "0.7.6" +name = "async-stream-impl" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "const-oid", - "zeroize", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "async-trait" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] -name = "digest" -version = "0.9.0" +name = "async_io_stream" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ - "generic-array", + "futures", + "pharos", + "rustc_version 0.4.0", ] [[package]] -name = "digest" -version = "0.10.7" +name = "asynchronous-codec" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] -name = "ecdsa" -version = "0.14.8" +name = "attohttpc" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", + "http 0.2.12", + "log", + "url", ] [[package]] -name = "ecdsa" -version = "0.16.7" +name = "atty" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "der 0.7.6", - "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "hermit-abi 0.1.19", + "libc", + "winapi", ] [[package]] -name = "either" -version = "1.8.1" +name = "auto_impl" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] [[package]] -name = "elliptic-curve" -version = "0.12.3" +name = "autocfg" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array", - "group 0.12.1", - "pkcs8 0.9.0", - "rand_core", - "sec1 0.3.0", - "subtle", - "zeroize", -] +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "elliptic-curve" -version = "0.13.5" +name = "aws-credential-types" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", - "digest 0.10.7", - "ff 0.13.0", - "generic-array", - "group 0.13.0", - "pkcs8 0.10.2", - "rand_core", - "sec1 0.7.2", - "subtle", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", "zeroize", ] [[package]] -name = "encoding_rs" -version = "0.8.32" +name = "aws-runtime" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "75588e7ee5e8496eed939adac2035a6dbab9f7eb2acdd9ab2d31856dab6f3955" dependencies = [ - "cfg-if", + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid 1.8.0", ] [[package]] -name = "enr" -version = "0.7.0" +name = "aws-sdk-kms" +version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492a7e5fc2504d5fdce8e124d3e263b244a68b283cac67a69eda0cd43e0aebad" +checksum = "da951fb0dd1a02728a91c58af8464098766f1a0600af932dd3f8361b23e1bfc9" dependencies = [ - "base64 0.13.1", - "bs58", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes", - "hex", - "k256 0.11.6", - "log", - "rand", - "rlp", - "secp256k1 0.24.3", - "serde", - "sha3", - "zeroize", + "http 0.2.12", + "once_cell", + "regex-lite", + "tracing", ] [[package]] -name = "enr" -version = "0.8.1" +name = "aws-sigv4" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" +checksum = "58b56f1cbe6fd4d0c2573df72868f20ab1c125ca9c9dbce17927a463433a2e57" dependencies = [ - "base64 0.13.1", + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes", + "form_urlencoded", "hex", - "k256 0.13.1", - "log", - "rand", - "rlp", - "serde", - "sha3", - "zeroize", + "hmac", + "http 0.2.12", + "http 1.1.0", + "once_cell", + "percent-encoding", + "sha2", + "time", + "tracing", ] [[package]] -name = "errno" -version = "0.3.1" +name = "aws-smithy-async" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", + "futures-util", + "pin-project-lite", + "tokio", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "aws-smithy-http" +version = "0.60.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "4a7de001a1b9a25601016d8057ea16e31a45fdca3751304c8edf4ad72e706c08" dependencies = [ - "cc", - "libc", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", ] [[package]] -name = "eth-keystore" -version = "0.5.0" +name = "aws-smithy-json" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2 0.10.7", - "sha3", - "thiserror", - "uuid", + "aws-smithy-types", ] [[package]] -name = "ethabi" -version = "18.0.0" +name = "aws-smithy-runtime" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +checksum = "d0d3965f6417a92a6d1009c5958a67042f57e46342afb37ca58f9ad26744ec73" dependencies = [ - "ethereum-types", - "hex", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http-body 0.4.6", + "http-body 1.0.0", "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", ] [[package]] -name = "ethbloom" -version = "0.13.0" +name = "aws-smithy-runtime-api" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +checksum = "4179bd8a1c943e1aceb46c5b9fc014a561bd6c35a2153e816ba29076ee49d245" dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.1.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", ] [[package]] -name = "ethereum-types" -version = "0.14.1" +name = "aws-smithy-types" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +checksum = "5b6764ba7e1c5ede1c9f9e4046645534f06c2581402461c559b481a420330a83" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", + "base64-simd", + "bytes", + "bytes-utils", + "http 0.2.12", + "http 1.1.0", + "http-body 0.4.6", + "http-body 1.0.0", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", ] [[package]] -name = "ethers-contract" -version = "2.0.7" +name = "aws-types" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e066a0d9cfc70c454672bf16bb433b0243427420076dc5b2f49c448fb5a10628" +checksum = "6f734808d43702a67e57d478a12e227d4d038d0b90c9005a78c87890d3805922" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "http 0.2.12", + "rustc_version 0.4.0", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[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 = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bee-rs" +version = "0.1.0" +dependencies = [ + "alloy-primitives", +] + +[[package]] +name = "bee_api" +version = "0.1.0" +source = "git+https://github.com/rndlabs/bee-api-rs.git#49ef4190f3bf3e0111a31c1277e8a3c4fb2e87f9" dependencies = [ - "ethers-core", - "ethers-providers", - "futures-util", "hex", - "once_cell", - "pin-project", + "reqwest 0.11.27", "serde", - "serde_json", - "thiserror", + "tokio", ] [[package]] -name = "ethers-core" -version = "2.0.7" +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + +[[package]] +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" +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 = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[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 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve 0.13.5", - "ethabi", "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bmt" +version = "0.1.0" +dependencies = [ "hex", - "k256 0.13.1", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror", "tiny-keccak", - "unicode-xid", ] [[package]] -name = "ethers-providers" -version = "2.0.7" +name = "bs58" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.2", "bytes", - "enr 0.8.1", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", + "either", +] + +[[package]] +name = "c-kzg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +dependencies = [ + "blst", + "cc", + "glob", "hex", - "http", - "instant", + "libc", + "serde", +] + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + +[[package]] +name = "cc" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.5", +] + +[[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 = "clap" +version = "4.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9689a29b593160de5bc4aacab7b5d54fb52231de70122626c178e6a368994c7" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e5387378c84f6faa26890ebf9f0a92989f8873d4d380467bcd0d8d8620424df" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "cmac" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" +dependencies = [ + "cipher", + "dbl", + "digest 0.10.7", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + +[[package]] +name = "coins-ledger" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e076e6e5d9708f0b90afe2dbe5a8ba406b5c794347661e6e44618388c7e3a31" +dependencies = [ + "async-trait", + "byteorder", + "cfg-if", + "getrandom", + "hex", + "hidapi-rusb", + "js-sys", + "log", + "nix 0.26.4", + "once_cell", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[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 = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "const-hex" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[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", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "cursors" +version = "0.1.0" + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version 0.4.0", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.66", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + +[[package]] +name = "dbl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" +dependencies = [ + "generic-array", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "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.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core", + "serde", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[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 0.10.7", + "ff", + "generic-array", + "group", + "pem-rfc7468", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +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.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +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.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "futures-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" +dependencies = [ + "futures-io", + "rustls 0.23.9", + "rustls-pki-types", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[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.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "handshake" +version = "0.1.0" +dependencies = [ + "libp2p", + "libp2p-stream", + "prost", + "prost-build", + "prost-types", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", + "rand", + "socket2", "thiserror", + "tinyvec", "tokio", "tracing", - "tracing-futures", "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", ] [[package]] -name = "ethers-signers" -version = "2.0.7" +name = "hickory-resolver" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c4b7e15f212fa7cc2e1251868320221d4ff77a3d48068e69f47ce1c491df2d" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "elliptic-curve 0.13.5", - "eth-keystore", - "ethers-core", - "hex", + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", "rand", - "sha2 0.10.7", + "resolv-conf", + "smallvec", "thiserror", + "tokio", "tracing", ] [[package]] -name = "fastrand" -version = "1.9.0" +name = "hidapi-rusb" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "efdc2ec354929a6e8f3c6b6923a4d97427ec2f764cfee8cd4bfe890946cdf08b" dependencies = [ - "instant", + "cc", + "libc", + "pkg-config", + "rusb", ] [[package]] -name = "ff" +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 = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "rand_core", - "subtle", + "digest 0.10.7", ] [[package]] -name = "ff" -version = "0.13.0" +name = "hostname" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ - "rand_core", - "subtle", + "libc", + "match_cfg", + "winapi", ] [[package]] -name = "fixed-hash" -version = "0.8.0" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] [[package]] -name = "foreign-types" -version = "0.3.2" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "foreign-types-shared", + "bytes", + "http 0.2.12", + "pin-project-lite", ] [[package]] -name = "foreign-types-shared" -version = "0.1.1" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] [[package]] -name = "form_urlencoded" -version = "1.2.0" +name = "http-body-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ - "percent-encoding", + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", ] [[package]] -name = "funty" -version = "2.0.0" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "futures" -version = "0.3.28" +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ + "bytes", "futures-channel", "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] -name = "futures-channel" -version = "0.3.28" +name = "hyper" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ - "futures-core", - "futures-sink", + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", ] [[package]] -name = "futures-core" -version = "0.3.28" +name = "hyper-rustls" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.29", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] [[package]] -name = "futures-executor" -version = "0.3.28" +name = "hyper-rustls" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ - "futures-core", - "futures-task", "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.22.4", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", ] [[package]] -name = "futures-io" -version = "0.3.28" +name = "hyper-tls" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.29", + "native-tls", + "tokio", + "tokio-native-tls", +] [[package]] -name = "futures-macro" -version = "0.3.28" +name = "hyper-tls" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.22", + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] -name = "futures-sink" -version = "0.3.28" +name = "hyper-util" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] [[package]] -name = "futures-task" -version = "0.3.28" +name = "iana-time-zone" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", +] [[package]] -name = "futures-timer" -version = "3.0.2" +name = "iana-time-zone-haiku" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", + "cc", ] [[package]] -name = "futures-util" -version = "0.3.28" +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "idna" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "byteorder", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "if-addrs" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ - "typenum", - "version_check", - "zeroize", + "libc", + "windows-sys 0.48.0", ] [[package]] -name = "getrandom" -version = "0.2.10" +name = "if-watch" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" +dependencies = [ + "async-io", + "core-foundation", + "fnv", + "futures", + "if-addrs", + "ipnet", + "log", + "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.29", + "log", + "rand", + "tokio", + "url", + "xmltree", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", + "parity-scale-codec", ] [[package]] -name = "ghash" -version = "0.5.0" +name = "impl-rlp" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" dependencies = [ - "opaque-debug", - "polyval", + "rlp", ] [[package]] -name = "gimli" -version = "0.27.3" +name = "impl-serde" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] [[package]] -name = "glob" -version = "0.3.1" +name = "impl-trait-for-tuples" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "gloo-timers" -version = "0.2.6" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", + "autocfg", + "hashbrown 0.12.3", + "serde", ] [[package]] -name = "group" -version = "0.12.1" +name = "indexmap" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "ff 0.12.1", - "rand_core", - "subtle", + "equivalent", + "hashbrown 0.14.5", + "serde", ] [[package]] -name = "group" -version = "0.13.0" +name = "inout" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "ff 0.13.0", - "rand_core", - "subtle", + "block-padding", + "generic-array", ] [[package]] -name = "h2" -version = "0.3.20" +name = "interprocess" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "13f2533e1f1a70bec71ea7a85d1c0a4dab141c314035ce76e51a19a2f48be708" dependencies = [ - "bytes", - "fnv", + "doctest-file", "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", + "libc", + "recvmsg", "tokio", - "tokio-util", - "tracing", + "widestring", + "windows-sys 0.52.0", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "ipconfig" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "ahash", + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg 0.50.0", ] [[package]] -name = "hashers" -version = "1.0.1" +name = "ipnet" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "heck" -version = "0.4.1" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "libc", + "either", ] [[package]] -name = "hermit-abi" -version = "0.2.6" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ - "libc", + "either", ] [[package]] -name = "hermit-abi" -version = "0.3.1" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] -name = "hex" -version = "0.4.3" +name = "js-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] [[package]] -name = "hmac" -version = "0.12.1" +name = "k256" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ - "digest 0.10.7", + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", ] [[package]] -name = "http" -version = "0.2.9" +name = "kad" +version = "0.1.0" + +[[package]] +name = "keccak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ - "bytes", - "fnv", - "itoa", + "cpufeatures", ] [[package]] -name = "http-body" -version = "0.4.5" +name = "keccak-asm" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "digest 0.10.7", + "sha3-asm", ] [[package]] -name = "httparse" -version = "1.8.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "httpdate" -version = "1.0.2" +name = "libc" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] -name = "hyper" -version = "0.14.27" +name = "libm" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libp2p" +version = "0.54.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", + "either", + "futures", + "futures-timer", + "getrandom", + "libp2p-allow-block-list", + "libp2p-autonat", + "libp2p-connection-limits", + "libp2p-core", + "libp2p-dns", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-mdns", + "libp2p-metrics", + "libp2p-noise", + "libp2p-ping", + "libp2p-quic", + "libp2p-swarm", + "libp2p-tcp", + "libp2p-upnp", + "libp2p-yamux", + "multiaddr", + "pin-project", + "rw-stream-sink", + "thiserror", ] [[package]] -name = "hyper-rustls" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" +name = "libp2p-allow-block-list" +version = "0.3.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +name = "libp2p-autonat" +version = "0.12.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", + "async-trait", + "asynchronous-codec", + "futures", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-request-response", + "libp2p-swarm", + "quick-protobuf", + "quick-protobuf-codec", + "rand", + "tracing", + "web-time", ] [[package]] -name = "iana-time-zone" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +name = "libp2p-connection-limits" +version = "0.3.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +name = "libp2p-core" +version = "0.41.3" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "cc", + "either", + "fnv", + "futures", + "futures-timer", + "libp2p-identity", + "multiaddr", + "multihash", + "multistream-select", + "once_cell", + "parking_lot", + "pin-project", + "quick-protobuf", + "rand", + "rw-stream-sink", + "smallvec", + "thiserror", + "tracing", + "unsigned-varint 0.8.0", + "void", + "web-time", ] [[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +name = "libp2p-dns" +version = "0.41.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "async-trait", + "futures", + "hickory-resolver", + "libp2p-core", + "libp2p-identity", + "parking_lot", + "smallvec", + "tracing", ] [[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +name = "libp2p-identify" +version = "0.44.2" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "parity-scale-codec", + "asynchronous-codec", + "either", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "lru 0.12.3", + "quick-protobuf", + "quick-protobuf-codec", + "smallvec", + "thiserror", + "tracing", + "void", ] [[package]] -name = "impl-rlp" -version = "0.3.0" +name = "libp2p-identity" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ - "rlp", + "bs58", + "ed25519-dalek", + "hkdf", + "multihash", + "p256", + "quick-protobuf", + "rand", + "sec1", + "sha2", + "thiserror", + "tracing", + "void", + "zeroize", ] [[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +name = "libp2p-kad" +version = "0.46.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "serde", + "arrayvec", + "asynchronous-codec", + "bytes", + "either", + "fnv", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "quick-protobuf", + "quick-protobuf-codec", + "rand", + "sha2", + "smallvec", + "thiserror", + "tracing", + "uint", + "void", + "web-time", ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +name = "libp2p-mdns" +version = "0.45.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "data-encoding", + "futures", + "hickory-proto", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand", + "smallvec", + "socket2", + "tokio", + "tracing", + "void", ] [[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +name = "libp2p-metrics" +version = "0.14.2" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "autocfg", - "hashbrown", - "serde", + "futures", + "libp2p-core", + "libp2p-identify", + "libp2p-identity", + "libp2p-kad", + "libp2p-ping", + "libp2p-swarm", + "pin-project", + "prometheus-client", + "web-time", ] [[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +name = "libp2p-noise" +version = "0.44.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "generic-array", + "asynchronous-codec", + "bytes", + "curve25519-dalek", + "futures", + "libp2p-core", + "libp2p-identity", + "multiaddr", + "multihash", + "once_cell", + "quick-protobuf", + "rand", + "sha2", + "snow", + "static_assertions", + "thiserror", + "tracing", + "x25519-dalek", + "zeroize", ] [[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +name = "libp2p-ping" +version = "0.44.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "cfg-if", + "either", + "futures", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand", + "tracing", + "void", + "web-time", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +name = "libp2p-quic" +version = "0.10.3" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", + "bytes", + "futures", + "futures-timer", + "if-watch", + "libp2p-core", + "libp2p-identity", + "libp2p-tls", + "parking_lot", + "quinn", + "rand", + "ring 0.17.8", + "rustls 0.23.9", + "socket2", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +name = "libp2p-request-response" +version = "0.26.3" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" +dependencies = [ + "async-trait", + "futures", + "futures-bounded", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand", + "smallvec", + "tracing", + "void", + "web-time", +] [[package]] -name = "is-terminal" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +name = "libp2p-stream" +version = "0.1.0-alpha.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.48.0", + "futures", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "rand", + "tracing", + "void", ] [[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +name = "libp2p-swarm" +version = "0.44.2" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ "either", + "fnv", + "futures", + "futures-timer", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm-derive", + "lru 0.12.3", + "multistream-select", + "once_cell", + "rand", + "smallvec", + "tokio", + "tracing", + "void", + "web-time", ] [[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "js-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +name = "libp2p-swarm-derive" +version = "0.34.2" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "wasm-bindgen", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +name = "libp2p-tcp" +version = "0.41.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", + "futures", + "futures-timer", + "if-watch", + "libc", + "libp2p-core", + "libp2p-identity", + "socket2", + "tokio", + "tracing", ] [[package]] -name = "k256" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +name = "libp2p-tls" +version = "0.4.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "cfg-if", - "ecdsa 0.16.7", - "elliptic-curve 0.13.5", - "once_cell", - "sha2 0.10.7", - "signature 2.1.0", + "futures", + "futures-rustls", + "libp2p-core", + "libp2p-identity", + "rcgen", + "ring 0.17.8", + "rustls 0.23.9", + "rustls-webpki 0.101.7", + "thiserror", + "x509-parser", + "yasna", ] [[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +name = "libp2p-upnp" +version = "0.2.2" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "cpufeatures", + "futures", + "futures-timer", + "igd-next", + "libp2p-core", + "libp2p-swarm", + "tokio", + "tracing", + "void", ] [[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +name = "libp2p-yamux" +version = "0.45.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" +dependencies = [ + "either", + "futures", + "libp2p-core", + "thiserror", + "tracing", + "yamux 0.12.1", + "yamux 0.13.3", +] [[package]] -name = "libc" -version = "0.2.147" +name = "libusb1-sys" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "da050ade7ac4ff1ba5379af847a10a10a8e284181e060105bf8d86960ce9ce0f" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] -name = "libloading" -version = "0.7.4" +name = "linked-hash-map" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1797,9 +3710,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "logging" @@ -1807,7 +3720,7 @@ version = "0.1.0" dependencies = [ "atty", "clap", - "time 0.3.22", + "time", "tracing", "tracing-subscriber", ] @@ -1818,7 +3731,25 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "lru" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", ] [[package]] @@ -1831,9 +3762,9 @@ dependencies = [ "const_format", "futures", "hex", - "lru", + "lru 0.7.8", "rand", - "reqwest", + "reqwest 0.12.4", "serde", "serde_json", "serde_with", @@ -1843,20 +3774,35 @@ dependencies = [ "tokio", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] [[package]] name = "mime" @@ -1872,40 +3818,40 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] [[package]] name = "multiaddr" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" dependencies = [ "arrayref", "byteorder", "data-encoding", - "log", + "libp2p-identity", "multibase", "multihash", "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] @@ -1922,36 +3868,39 @@ dependencies = [ [[package]] name = "multihash" -version = "0.17.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" dependencies = [ "core2", - "multihash-derive", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] -name = "multihash-derive" -version = "0.8.1" +name = "multimap" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" dependencies = [ - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", + "bytes", + "futures", + "pin-project", + "smallvec", + "tracing", + "unsigned-varint 0.8.0", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1963,6 +3912,102 @@ dependencies = [ "tempfile", ] +[[package]] +name = "netlink-packet-core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" +dependencies = [ + "anyhow", + "byteorder", + "libc", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-route" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" +dependencies = [ + "anyhow", + "bitflags 1.3.2", + "byteorder", + "libc", + "netlink-packet-core", + "netlink-packet-utils", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +dependencies = [ + "anyhow", + "byteorder", + "paste", + "thiserror", +] + +[[package]] +name = "netlink-proto" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror", + "tokio", +] + +[[package]] +name = "netlink-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" +dependencies = [ + "bytes", + "futures", + "libc", + "log", + "tokio", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset", + "pin-utils", +] + +[[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" @@ -1983,66 +4028,101 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "num_enum" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] name = "object" -version = "0.30.4" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open-fastrlp" @@ -2071,11 +4151,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -2092,7 +4172,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] @@ -2103,9 +4183,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -2113,20 +4193,70 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p2p" +version = "0.1.0" +dependencies = [ + "alloy", + "anyhow", + "futures", + "handshake", + "libp2p", + "libp2p-stream", + "prost", + "prost-build", + "prost-types", + "rand", + "swarm", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "parity-scale-codec" -version = "3.6.1" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", - "bitvec 1.0.1", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", @@ -2135,9 +4265,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.1" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2145,11 +4275,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2157,17 +4293,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.5", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.11.0" @@ -2179,25 +4321,59 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac", ] [[package]] -name = "peeking_take_while" -version = "0.1.2" +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "petgraph" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] [[package]] name = "pharos" @@ -2206,34 +4382,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version", + "rustc_version 0.4.0", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2243,35 +4419,57 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.6.1", - "spki 0.6.0", + "der", + "spki", ] [[package]] -name = "pkcs8" -version = "0.10.2" +name = "pkg-config" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "platforms" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" + +[[package]] +name = "polling" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ - "der 0.7.6", - "spki 0.7.2", + "cfg-if", + "concurrent-queue", + "hermit-abi 0.3.9", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "pkg-config" -version = "0.3.27" +name = "poly1305" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -2298,17 +4496,42 @@ dependencies = [ "tracing", ] +[[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.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.66", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -2320,12 +4543,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -2353,52 +4575,226 @@ dependencies = [ ] [[package]] -name = "proc-macro2" -version = "1.0.63" +name = "proc-macro2" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prometheus-client" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" +dependencies = [ + "dtoa", + "itoa", + "parking_lot", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.3", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck 0.5.0", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.66", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost", +] + +[[package]] +name = "protobuf" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65f4a8ec18723a734e5dc09c173e0abf9690432da5340285d536edcb4dac190" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-support" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6872f4d4f4b98303239a2b5838f5bbbb77b01ffc892d627957f37a22d7cfe69c" +dependencies = [ + "thiserror", +] + +[[package]] +name = "pseudosettle" +version = "0.1.0" + +[[package]] +name = "pullsync" +version = "0.1.0" + +[[package]] +name = "pushsync" +version = "0.1.0" + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + +[[package]] +name = "quick-protobuf-codec" +version = "0.3.1" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "quinn" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" dependencies = [ - "unicode-ident", + "bytes", + "futures-io", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.23.9", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "prost" -version = "0.11.9" +name = "quinn-proto" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" dependencies = [ "bytes", - "prost-derive", + "rand", + "ring 0.17.8", + "rustc-hash", + "rustls 0.23.9", + "slab", + "thiserror", + "tinyvec", + "tracing", ] [[package]] -name = "prost-derive" -version = "0.11.9" +name = "quinn-udp" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - [[package]] name = "radium" version = "0.7.0" @@ -2435,24 +4831,52 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rcgen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "bitflags", + "bitflags 2.5.0", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -2464,6 +4888,23 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.6.29" @@ -2472,27 +4913,27 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.2", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.29", + "hyper-rustls 0.24.2", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -2501,34 +4942,86 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", - "winreg", + "webpki-roots 0.25.4", + "winreg 0.50.0", ] [[package]] -name = "rfc6979" -version = "0.3.1" +name = "reqwest" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ - "crypto-bigint 0.4.9", - "hmac", - "zeroize", + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls 0.26.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.22.4", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.25.0", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.26.2", + "winreg 0.52.0", +] + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", ] +[[package]] +name = "retrieval" +version = "0.1.0" + [[package]] name = "rfc6979" version = "0.4.0" @@ -2548,12 +5041,27 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -2585,11 +5093,66 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "rtnetlink" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +dependencies = [ + "futures", + "log", + "netlink-packet-route", + "netlink-proto", + "nix 0.24.3", + "thiserror", + "tokio", +] + +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rusb" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab9f9ff05b63a786553a4c02943b74b34a988448671001e9a27e2f0565cc05a4" +dependencies = [ + "libc", + "libusb1-sys", +] + [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -2603,221 +5166,263 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.23", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", ] [[package]] name = "rustix" -version = "0.37.20" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags", + "bitflags 2.5.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.2" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring", - "rustls-webpki", + "ring 0.17.8", + "rustls-webpki 0.101.7", "sct", ] [[package]] -name = "rustls-pemfile" -version = "1.0.3" +name = "rustls" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ - "base64 0.21.2", + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.4", + "subtle", + "zeroize", ] [[package]] -name = "rustls-webpki" -version = "0.100.1" +name = "rustls" +version = "0.23.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "a218f0f6d05669de4eabfb24f31ce802035c952429d037507b4a4a39f0e60c5b" dependencies = [ - "ring", - "untrusted", + "once_cell", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.4", + "subtle", + "zeroize", ] [[package]] -name = "rustversion" -version = "1.0.12" +name = "rustls-pemfile" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] [[package]] -name = "ryu" -version = "1.0.13" +name = "rustls-pemfile" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] [[package]] -name = "salsa20" -version = "0.10.2" +name = "rustls-pki-types" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] -name = "scale-info" -version = "2.8.0" +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] -name = "scale-info-derive" -version = "2.8.0" +name = "rustls-webpki" +version = "0.102.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "ring 0.17.8", + "rustls-pki-types", + "untrusted 0.9.0", ] [[package]] -name = "schannel" -version = "0.1.21" +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ - "windows-sys 0.42.0", + "fnv", + "quick-error", + "tempfile", + "wait-timeout", ] [[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +name = "rw-stream-sink" +version = "0.4.0" +source = "git+https://github.com/libp2p/rust-libp2p#3b61e57d0e72d371ccdfc134bd71cb3aa20addee" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] [[package]] -name = "scopeguard" -version = "1.1.0" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] -name = "scrypt" -version = "0.10.0" +name = "salsa20" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2 0.10.7", + "cipher", ] [[package]] -name = "sct" -version = "0.7.0" +name = "scale-info" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ - "ring", - "untrusted", + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", ] [[package]] -name = "sec1" -version = "0.3.0" +name = "scale-info-derive" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "sec1" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" -dependencies = [ - "base16ct 0.2.0", - "der 0.7.6", - "generic-array", - "pkcs8 0.10.2", - "subtle", - "zeroize", +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", ] [[package]] -name = "secp256k1" -version = "0.24.3" +name = "scoped-tls" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" -dependencies = [ - "secp256k1-sys 0.6.1", -] +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] -name = "secp256k1" -version = "0.26.0" +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ - "rand", - "secp256k1-sys 0.8.1", - "serde", + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", ] [[package]] -name = "secp256k1-sys" -version = "0.6.1" +name = "sct" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "cc", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] -name = "secp256k1-sys" -version = "0.8.1" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "cc", + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] [[package]] name = "security-framework" -version = "2.9.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -2826,9 +5431,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -2836,15 +5441,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] [[package]] -name = "send_wrapper" -version = "0.4.0" +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "send_wrapper" @@ -2854,29 +5471,29 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -2897,50 +5514,50 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.0.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" dependencies = [ - "base64 0.21.2", + "base64 0.22.1", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.2.6", "serde", + "serde_derive", "serde_json", "serde_with_macros", - "time 0.3.22", + "time", ] [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest 0.10.7", ] [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2958,83 +5575,95 @@ dependencies = [ ] [[package]] -name = "sharded-slab" -version = "0.1.4" +name = "sha3-asm" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" dependencies = [ - "lazy_static", + "cc", + "cfg-if", ] [[package]] -name = "shlex" -version = "1.1.0" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core", + "signature_derive", ] [[package]] -name = "signature" +name = "signature_derive" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "ab0381d1913eeaf4c7bc4094016c9a8de6c1120663afe32a90ff268ad7f80486" dependencies = [ - "digest 0.10.7", - "rand_core", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] -name = "smart-default" -version = "0.6.0" +name = "snow" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek", + "rand_core", + "ring 0.17.8", + "rustc_version 0.4.0", + "sha2", + "subtle", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3044,50 +5673,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "spki" -version = "0.6.0" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.6", -] - -[[package]] -name = "sscanf" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c713ebd15ce561dd4a13ed62bc2a0368e16806fc30dcaf66ecf1256b2a3fdde6" -dependencies = [ - "const_format", - "lazy_static", - "regex", - "sscanf_macro", -] - -[[package]] -name = "sscanf_macro" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84955aa74a157e5834d58a07be11af7f0ab923f0194a0bb2ea6b3db8b5d1611d" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "regex-syntax 0.6.29", - "strsim", - "syn 2.0.22", - "unicode-width", + "der", ] [[package]] @@ -3096,32 +5694,36 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "status" +version = "0.1.0" + [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.24.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn 2.0.66", ] [[package]] @@ -3130,6 +5732,21 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "swap" +version = "0.1.0" + +[[package]] +name = "swarm" +version = "0.1.0" +dependencies = [ + "alloy", + "libp2p", + "once_cell", + "thiserror", + "tokio", +] + [[package]] name = "swarm-tools" version = "0.1.0" @@ -3162,25 +5779,63 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.22" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fe08d08d84f2c0a77f1e7c46518789d745c2e87a2721791ed7c3c9bc78df28" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" -version = "0.12.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", + "syn 2.0.66", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -3191,16 +5846,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "autocfg", "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3227,52 +5880,53 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", ] [[package]] -name = "time" -version = "0.1.45" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "num_cpus", ] [[package]] name = "time" -version = "0.3.22" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -3280,16 +5934,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -3319,11 +5974,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374442f06ee49c3a28a8fc9f01a2596fed7559c6b99b31279c3261778e77d84f" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -3339,13 +5993,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] @@ -3364,33 +6018,100 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", "tokio", + "tokio-rustls 0.24.1", + "tungstenite", + "webpki-roots 0.25.4", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] -name = "toml" -version = "0.5.11" +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "serde", + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", ] +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3399,11 +6120,11 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3411,43 +6132,33 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -3463,9 +6174,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -3476,7 +6187,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.22", + "time", "tracing", "tracing-core", "tracing-log", @@ -3495,16 +6206,56 @@ dependencies = [ ] [[package]] -name = "try-lock" -version = "0.2.4" +name = "trezor-client" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f62c95b37f6c769bd65a0d0beb8b2b003e72998003b896a616a6777c645c05ed" +dependencies = [ + "byteorder", + "hex", + "protobuf", + "rusb", + "thiserror", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] -name = "typenum" -version = "1.16.0" +name = "ucd-trie" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -3518,39 +6269,33 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unicode-xid" version = "0.2.4" @@ -3569,9 +6314,15 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.1" +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 = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" [[package]] name = "untrusted" @@ -3579,22 +6330,34 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", ] +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -3606,6 +6369,15 @@ dependencies = [ "serde", ] +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "serde", +] + [[package]] name = "valuable" version = "0.1.0" @@ -3625,60 +6397,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "waku-bindings" -version = "0.1.1" -source = "git+https://github.com/waku-org/waku-rust-bindings#a4bfddece72f2633a343011bc6464c3fc9c16833" -dependencies = [ - "aes-gcm", - "base64 0.21.2", - "enr 0.7.0", - "hex", - "multiaddr", - "once_cell", - "rand", - "secp256k1 0.26.0", - "serde", - "serde_json", - "smart-default", - "sscanf", - "url", - "waku-sys", -] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "waku-swarm-relay" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "clap", - "dotenv", - "ethers-contract", - "ethers-core", - "ethers-signers", - "hex", - "logging", - "num-traits", - "once_cell", - "prost", - "rand", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "url", - "waku-bindings", -] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] -name = "waku-sys" -version = "0.1.0" -source = "git+https://github.com/waku-org/waku-rust-bindings#a4bfddece72f2633a343011bc6464c3fc9c16833" +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ - "bindgen", + "libc", ] [[package]] @@ -3690,12 +6426,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3704,9 +6434,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3714,24 +6444,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3741,9 +6471,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3751,28 +6481,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-bindgen-test" -version = "0.3.37" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6e302a7ea94f83a6d09e78e7dc7d9ca7b186bc2829c24a22d0753efd680671" +checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" dependencies = [ "console_error_panic_hook", "js-sys", @@ -3784,12 +6514,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.37" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb993dd8c836930ed130e020e77d9b2e65dd0fbab1b67c790b0f5d80b11a575" +checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", + "syn 2.0.66", ] [[package]] @@ -3814,44 +6545,45 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki" -version = "0.22.0" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ - "ring", - "untrusted", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] -name = "which" -version = "4.4.0" +name = "webpki-roots" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3" dependencies = [ - "either", - "libc", - "once_cell", + "rustls-pki-types", ] +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "winapi" version = "0.3.9" @@ -3876,26 +6608,30 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.48.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-targets", + "windows-core 0.51.1", + "windows-targets 0.48.5", ] [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.52.5", ] [[package]] @@ -3904,115 +6640,175 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -4026,8 +6822,8 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version", - "send_wrapper 0.6.0", + "rustc_version 0.4.0", + "send_wrapper", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -4043,8 +6839,157 @@ 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", + "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", + "time", +] + +[[package]] +name = "xml-rs" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + +[[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", + "static_assertions", +] + +[[package]] +name = "yamux" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31b5e376a8b012bee9c423acdbb835fc34d45001cfa3106236a624e4b738028" +dependencies = [ + "futures", + "log", + "nohash-hasher", + "parking_lot", + "pin-project", + "rand", + "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 = "yubihsm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467a4c054be41ff657a6823246b0194cd727fadc3c539b265d7bc125ac6d4884" +dependencies = [ + "aes", + "bitflags 2.5.0", + "cbc", + "cmac", + "ecdsa", + "ed25519", + "hmac", + "k256", + "log", + "p256", + "p384", + "pbkdf2 0.12.2", + "rand_core", + "rusb", + "serde", + "serde_json", + "sha2", + "signature", + "subtle", + "thiserror", + "time", + "uuid 1.8.0", + "zeroize", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "zeroize" -version = "1.6.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] diff --git a/Cargo.toml b/Cargo.toml index 95e12eb..0cc0bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,15 +4,15 @@ members = [ "crates/manifest", "crates/postage", "crates/logging", - "bin/waku-swarm-relay", + # "bin/waku-swarm-relay", "bin/swarm-tools", "bin/bee-rs", "bin/wasm-playground", - "bin/swarm-wasm-lib", + "bin/swarm-wasm-lib", "crates/p2p", "crates/swarm", "crates/protocols/handshake", "crates/protocols/pushsync", "crates/protocols/pullsync", "crates/protocols/cursors", "crates/protocols/kad", "crates/protocols/pseudosettle", "crates/protocols/retrieval", "crates/protocols/swap", "crates/protocols/status", ] default-members = [ "bin/bee-rs", - "bin/waku-swarm-relay", + # "bin/waku-swarm-relay", ] # Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021 @@ -41,42 +41,87 @@ incremental = false tiny-keccak = { version = "2.0.2", features = ["keccak"] } ## eth -ethers-core = { version = "2.0.7", default-features = false } -ethers-providers = { version = "2.0.7", default-features = false } -ethers-signers = { version = "2.0.7", default-features = false } -ethers-middleware = { version = "2.0.7", default-features = false } -ethers-contract = { version = "2.0.7", default-features = false } +ethers-core = { version = "2.0.14", default-features = false } +ethers-providers = { version = "2.0.14", default-features = false } +ethers-signers = { version = "2.0.14", default-features = false } +ethers-middleware = { version = "2.0.14", default-features = false } +ethers-contract = { version = "2.0.14", default-features = false } ## misc -tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", features = ["env-filter", "ansi", "fmt", "std", "json", "time"] } -thiserror = "1.0.32" -serde_json = "1.0.82" -serde = { version = "1.0.140", features = ["derive"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["env-filter", "ansi", "fmt", "std", "json", "time"] } +thiserror = "1.0.61" +serde_json = "1.0.117" +serde = { version = "1.0.203", features = ["derive"] } rand = "0.8.5" hex = "0.4.3" ## tokio -tokio-stream = "0.1.14" -tokio = { version = "1.28.1", default-features = false, features = ["macros", "rt"] } -tokio-util = { version = "0.7.8", features = ["codec"] } +tokio-stream = "0.1.15" +tokio = { version = "1.38.0", default-features = false, features = ["macros", "rt", "rt-multi-thread"] } +tokio-util = { version = "0.7.11", features = ["codec"] } ## async -async-trait = "0.1.57" -futures = "0.3.21" +async-trait = "0.1.80" +futures = "0.3.30" ## wasm -wasm-bindgen = "0.2.87" -wasm-bindgen-futures = "0.4.37" -wasm-bindgen-test = "0.3.37" -js-sys = "0.3.64" +wasm-bindgen = "0.2.92" +wasm-bindgen-futures = "0.4.42" +wasm-bindgen-test = "0.3.42" +js-sys = "0.3.69" -clap = { version = "4.3.0", features = ["derive", "env"] } -chrono = "0.4.23" +## protobufs / libp2p +libp2p = { version = "0.54.0", git = "https://github.com/libp2p/rust-libp2p", features = [ + "tokio", + "autonat", + "dns", + "kad", + "tcp", + "ping", + "noise", + "yamux", + "ecdsa", + "identify", + "macros" +] } +libp2p-stream = { git = "https://github.com/libp2p/rust-libp2p" } +prost = "0.12.6" +prost-types = "0.12.6" + +## alloy +alloy = { git = "https://github.com/alloy-rs/alloy", rev = "f6ebef2", features = [ + "consensus", + "contract", + "eips", + "kzg", + "network", + "node-bindings", + "provider-http", + "provider-ipc", + "provider-ws", + "providers", + "rpc-client-ipc", + "rpc-client-ws", + "rpc-client", + "rpc-types-eth", + "rpc-types-trace", + "rpc-types", + "signer-aws", + "signer-keystore", + "signer-ledger", + "signer-mnemonic", + "signer-trezor", + "signer-wallet", + "signer-yubihsm", + "signers", +] } + +clap = { version = "4.5.6", features = ["derive", "env"] } +chrono = "0.4.38" dotenv = "0.15.0" -serde_with = { version = "3.0.0", features = ["hex"] } -reqwest = { version = "0.11.11", features = ["json", "rustls-tls"] } -async-recursion = "1.0.0" -anyhow = "1.0.71" -prost = "0.11.6" -once_cell = "1.17.1" \ No newline at end of file +serde_with = { version = "3.8.1", features = ["hex"] } +reqwest = { version = "0.12.4", features = ["json", "rustls-tls"] } +async-recursion = "1.1.1" +anyhow = "1.0.86" +once_cell = "1.19.0" diff --git a/LICENSE b/LICENSE index 7e5b705..bae94e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,28 +1,661 @@ -BSD 3-Clause License - -Copyright (c) 2023, rndlabs - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/bin/bee-rs/Cargo.toml b/bin/bee-rs/Cargo.toml index 82b641e..b0b4e02 100644 --- a/bin/bee-rs/Cargo.toml +++ b/bin/bee-rs/Cargo.toml @@ -8,3 +8,4 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +alloy-primitives = "0.7.5" diff --git a/bin/swarm-wasm-lib/Cargo.toml b/bin/swarm-wasm-lib/Cargo.toml index b7d7120..b2d6102 100644 --- a/bin/swarm-wasm-lib/Cargo.toml +++ b/bin/swarm-wasm-lib/Cargo.toml @@ -16,7 +16,7 @@ wasm-bindgen-futures = { workspace = true } bmt = { path = "../../crates/bmt" } postage = { path = "../../crates/postage" } js-sys = { workspace = true } -web-sys = { version = "0.3.64", features = ['console'] } +web-sys = { version = "0.3.69", features = ['console'] } hex = { workspace = true } # The `console_error_panic_hook` crate provides better debugging of panics by diff --git a/bin/waku-swarm-relay/Cargo.toml b/bin/waku-swarm-relay/Cargo.toml index 45060e1..68be6ad 100644 --- a/bin/waku-swarm-relay/Cargo.toml +++ b/bin/waku-swarm-relay/Cargo.toml @@ -22,12 +22,12 @@ tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } ethers-core = { workspace = true } ethers-contract = { workspace = true } ethers-signers = { workspace = true } -url = "2.3.1" +url = "2.5.0" anyhow = { workspace = true } thiserror = { workspace = true } waku-bindings = { git = "https://github.com/waku-org/waku-rust-bindings" } reqwest = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true} -num-traits = "0.2.15" -logging = { path = "../../crates/logging" } \ No newline at end of file +num-traits = "0.2.19" +logging = { path = "../../crates/logging" } diff --git a/bin/wasm-playground/src/lib.rs b/bin/wasm-playground/src/lib.rs index 6bc9a0f..74deffb 100644 --- a/bin/wasm-playground/src/lib.rs +++ b/bin/wasm-playground/src/lib.rs @@ -7,8 +7,8 @@ use rand::RngCore; use tracing::{debug, error, info, trace, warn}; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; -use web_sys::HtmlTextAreaElement; use web_sys::window; +use web_sys::HtmlTextAreaElement; use web_sys::{Event, HtmlButtonElement, HtmlDivElement, HtmlInputElement}; #[wasm_bindgen(start)] @@ -70,9 +70,7 @@ fn main() -> Result<(), JsValue> { // Create a label for the batch id let batch_id_label = document.create_element("label").unwrap(); batch_id_label.set_text_content(Some("Batch id:")); - batch_id_container - .append_child(&batch_id_label) - .unwrap(); + batch_id_container.append_child(&batch_id_label).unwrap(); // Create an input field for the batch id let batch_id_input = document @@ -90,9 +88,7 @@ fn main() -> Result<(), JsValue> { .dyn_into::() .unwrap(); batch_id_generate.set_inner_text("Generate"); - batch_id_container - .append_child(&batch_id_generate) - .unwrap(); + batch_id_container.append_child(&batch_id_generate).unwrap(); // Create a new div element to put in two fields: // - the index of the bucket @@ -213,7 +209,7 @@ fn main() -> Result<(), JsValue> { let output_label = document.create_element("label").unwrap(); output_label.set_text_content(Some("Output:")); output_container.append_child(&output_label).unwrap(); - + // Create a text area for the output let output = document .create_element("textarea") @@ -279,8 +275,7 @@ fn main() -> Result<(), JsValue> { batch_id_input_clone.set_value(hex::encode(batch_id).as_str()); }) as Box); - batch_id_generate - .set_onclick(Some(batch_id_closure.as_ref().unchecked_ref())); + batch_id_generate.set_onclick(Some(batch_id_closure.as_ref().unchecked_ref())); batch_id_closure.forget(); // the closure that runs when the "Calculate" button is clicked @@ -349,7 +344,7 @@ fn main() -> Result<(), JsValue> { wallet.address(), batch_depth, bucket_depth, - false + false, ); // Now that we have the batch, we can put Postman Pat to work! 📬 diff --git a/crates/logging/Cargo.toml b/crates/logging/Cargo.toml index 419cdb5..ae48b30 100644 --- a/crates/logging/Cargo.toml +++ b/crates/logging/Cargo.toml @@ -10,6 +10,6 @@ repository.workspace = true [dependencies] atty = "0.2.14" clap = { workspace = true } -time = { version = "0.3.21", features = ["macros"] } +time = { version = "0.3.36", features = ["macros"] } tracing = { workspace = true } -tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt", "time"] } +tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt", "time"] } diff --git a/crates/manifest/Cargo.toml b/crates/manifest/Cargo.toml index 393408c..f9f4f77 100644 --- a/crates/manifest/Cargo.toml +++ b/crates/manifest/Cargo.toml @@ -10,7 +10,7 @@ serde = { workspace = true } serde_json = { workspace = true } serde_with = { workspace = true } hex = { workspace = true } -const_format = "0.2.26" +const_format = "0.2.32" rand = { workspace = true } tokio = { workspace = true } reqwest = { workspace = true } @@ -24,4 +24,4 @@ thiserror = { workspace = true } lru = "0.7.8" [dev-dependencies] -test-case = "2.2.1" \ No newline at end of file +test-case = "2.2.2" diff --git a/crates/p2p/Cargo.toml b/crates/p2p/Cargo.toml new file mode 100644 index 0000000..49d5d93 --- /dev/null +++ b/crates/p2p/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "p2p" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] +alloy.workspace = true +anyhow.workspace = true +futures.workspace = true +libp2p.workspace = true +libp2p-stream.workspace = true +prost.workspace = true +prost-types.workspace = true +rand.workspace = true +tokio.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +handshake = { path = "../protocols/handshake" } +swarm = { path = "../swarm" } + +[build-dependencies] +prost-build = "0.12.6" diff --git a/crates/p2p/src/main.rs b/crates/p2p/src/main.rs new file mode 100644 index 0000000..82a43cd --- /dev/null +++ b/crates/p2p/src/main.rs @@ -0,0 +1,211 @@ +use std::{default, io, time::Duration, vec}; + +use alloy::{hex, primitives::FixedBytes, signers::{wallet::LocalWallet, Signature}}; +use anyhow::Result; +use futures::{AsyncReadExt, AsyncWriteExt, StreamExt}; +use handshake::swarm::handshake::BzzAddress; +use libp2p::{ + autonat, identify, identity, multiaddr::Protocol, noise, ping, swarm::{NetworkBehaviour, SwarmEvent}, tcp, yamux, Multiaddr, PeerId, Stream, StreamProtocol +}; +use libp2p_stream as stream; +use rand::RngCore; +use swarm::NodeAddress; +use tracing::level_filters::LevelFilter; +use tracing_subscriber::EnvFilter; +use prost::{bytes::buf, Message}; + +#[tokio::main] +async fn main() -> Result<()> { + tracing_subscriber::fmt() + .with_env_filter( + EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env()?, + ) + .init(); + + let mut swarm = libp2p::SwarmBuilder::with_new_identity() + .with_tokio() + .with_tcp( + tcp::Config::default().nodelay(true), + noise::Config::new, + yamux::Config::default, + )? + .with_dns()? + .with_behaviour(|key| Behaviour::new(key.public()))? + .with_swarm_config(|c| c.with_idle_connection_timeout(Duration::from_secs(10))) + .build(); + + swarm.listen_on("/ip4/0.0.0.0/tcp/2634".parse()?)?; + + // let peer = "/ip4/139.84.229.70/tcp/1634/p2p/QmRa6rSrUWJ7s68MNmV94bo2KAa9pYcp6YbFLMHZ3r7n2M".parse::()?; + // let peer = "/ip4/142.132.214.211/tcp/3400/p2p/QmXr7inNU2nekBxoYkPwos39ipiSZNizKPQSYkVchrXt3M".parse::()?; + let peer = "/ip4/127.0.0.1/tcp/1634/p2p/QmcmeGcwx3YTBmBTQ5MdGh1SJfCpue7v5fqVuE8iUv9JYb".parse::()?; + + swarm.dial(peer.clone())?; + + tokio::spawn(connection_handler(peer.clone(), swarm.behaviour().handshake.new_control(), "/ip4/0.0.0.0/tcp/2634".parse()?)); + + let mut incoming_streams = swarm + .behaviour() + .handshake + .new_control() + .accept(StreamProtocol::new("/swarm/handshake/11.0.0/handshake")) + .unwrap(); + + tokio::spawn(async move { + while let Some((peer, stream)) = incoming_streams.next().await { + match echo(stream).await { + Ok(_) => println!("Echoed to {peer:?}"), + Err(e) => eprintln!("Error echoing to {peer:?}: {e}"), + } + } + }); + + // Poll the swarm to make progress. + loop { + match swarm.select_next_some().await { + SwarmEvent::NewListenAddr { address, .. } => println!("Listening on {address:?}"), + SwarmEvent::Behaviour(BehaviourEvent::Identify(event)) => match event { + identify::Event::Received { peer_id, info } => { + println!("Identified {peer_id:?} as {info:?}"); + } + identify::Event::Sent { peer_id, .. } => { + println!("Sent identify info to {peer_id:?}"); + } + _ => {} + }, + // SwarmEvent::Behaviour(BehaviourEvent::AutoNat(event)) => println!("AutoNAT: {event:?}"), + SwarmEvent::Behaviour(BehaviourEvent::Ping(event)) => match event { + ping::Event { + connection: _, + peer, + result, + } => println!("Ping from {peer:?} in {result:?}"), + }, + _ => {} + } + } +} + +const HANDSHAKE_PROTOCOL: StreamProtocol = StreamProtocol::new("/swarm/handshake/11.0.0/handshake"); + +/// A very simple, `async fn`-based connection handler for our custom echo protocol. +async fn connection_handler(ma: Multiaddr, mut control: stream::Control, own_underlay: Multiaddr) -> Result<()> { + let Protocol::P2p(peer_id) = ma.clone().pop().expect("peer address must have a p2p component") else { + return Err(anyhow::anyhow!("peer address must have a p2p component")); + }; + let stream = match control.open_stream(peer_id, HANDSHAKE_PROTOCOL).await { + Ok(stream) => stream, + Err(error @ stream::OpenStreamError::UnsupportedProtocol(_)) => { + tracing::info!(%peer_id, %error); + return Err(error.into()); + } + Err(error) => { + // Other errors may be temporary. + // In production, something like an exponential backoff / circuit-breaker may be more appropriate. + tracing::debug!(%peer_id, %error); + return Err(error.into()); + } + }; + + if let Err(e) = send(stream, ma.clone(), own_underlay).await { + tracing::warn!(%peer_id, "Echo protocol failed: {e}"); + return Err(e.into()); + } + + tracing::info!(%peer_id, "Echo complete!"); + Ok(()) +} + +async fn send(mut stream: Stream, ma: Multiaddr, own_underlay: Multiaddr) -> io::Result<()> { + let syn = handshake::swarm::handshake::Syn { + observed_underlay: ma.to_vec(), + }; + + // let mut buf = vec![0; syn.encode_length_delimited_to_vec()]; + // syn.encode(&mut buf).unwrap(); + // println!("{:?}", hex::encode(buf.as_slice())); + stream.write_all(&syn.encode_length_delimited_to_vec()).await?; + stream.flush().await?; + + // wait for syn-ack + + let mut b = vec![0u8; 4096]; + let recv_amt = stream.read(b.as_mut_slice()).await?; + println!("{:?}", recv_amt); + let syn_ack = handshake::swarm::handshake::SynAck::decode_length_delimited(b.as_slice()).unwrap(); + + println!("{:?}", syn_ack); + + let wallet = LocalWallet::random(); + let nonce = FixedBytes::<32>::default(); + let (address, signature) = NodeAddress::new(wallet, 1, nonce.clone(), own_underlay).await; + + let ack = handshake::swarm::handshake::Ack { + address: Some(BzzAddress { + underlay: address.underlay().to_vec(), + signature: signature.as_bytes().to_vec(), + overlay: address.overlay().to_vec(), + }), + network_id: 1, + full_node: false, + nonce: nonce.to_vec(), + welcome_message: "hello from rust!!!".to_string(), + }; + + stream.write_all(&ack.encode_length_delimited_to_vec()).await?; + stream.flush().await?; + + stream.close().await?; + + Ok(()) +} + +#[derive(NetworkBehaviour)] +struct Behaviour { + identify: identify::Behaviour, + // auto_nat: autonat::Behaviour, + ping: ping::Behaviour, + handshake: stream::Behaviour, +} + +impl Behaviour { + fn new(key: identity::PublicKey) -> Self { + Self { + identify: identify::Behaviour::new(identify::Config::new( + "/ipfs/id/1.0.0".to_string(), + key.clone(), + )), + // auto_nat: autonat::Behaviour::new( + // key.to_peer_id(), + // autonat::Config { + // retry_interval: Duration::from_secs(10), + // refresh_interval: Duration::from_secs(30), + // boot_delay: Duration::from_secs(5), + // throttle_server_period: Duration::ZERO, + // only_global_ips: false, + // ..Default::default() + // }, + // ), + ping: ping::Behaviour::default(), + handshake: stream::Behaviour::new(), + } + } +} + +async fn echo(mut stream: Stream) -> io::Result { + let mut total = 0; + + let mut buf = [0u8; 100]; + + loop { + let read = stream.read(&mut buf).await?; + if read == 0 { + return Ok(total); + } + + total += read; + stream.write_all(&buf[..read]).await?; + } +} diff --git a/crates/postage/src/stamp.rs b/crates/postage/src/stamp.rs index 763d618..4a72d91 100644 --- a/crates/postage/src/stamp.rs +++ b/crates/postage/src/stamp.rs @@ -1,10 +1,7 @@ use std::{future::Future, pin::Pin}; use crate::{batch::BatchId, pat::BucketSeeker}; -use ethers_core::{ - abi::Address, - types::Signature, -}; +use ethers_core::{abi::Address, types::Signature}; use thiserror::Error; use tiny_keccak::{Hasher, Keccak}; use tracing::error; diff --git a/crates/protocols/cursors/Cargo.toml b/crates/protocols/cursors/Cargo.toml new file mode 100644 index 0000000..7d526d0 --- /dev/null +++ b/crates/protocols/cursors/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "cursors" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/cursors/src/lib.rs b/crates/protocols/cursors/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/cursors/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/handshake/Cargo.toml b/crates/protocols/handshake/Cargo.toml new file mode 100644 index 0000000..ab40ac2 --- /dev/null +++ b/crates/protocols/handshake/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "handshake" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] +prost.workspace = true +prost-types.workspace = true +libp2p.workspace = true +libp2p-stream.workspace = true + +[build-dependencies] +prost-build = "0.12.6" diff --git a/crates/protocols/handshake/build.rs b/crates/protocols/handshake/build.rs new file mode 100644 index 0000000..c7201f3 --- /dev/null +++ b/crates/protocols/handshake/build.rs @@ -0,0 +1,5 @@ +use std::io::Result; +fn main() -> Result<()> { + prost_build::compile_protos(&["src/handshake.proto"], &["src/"])?; + Ok(()) +} diff --git a/crates/protocols/handshake/src/handshake.proto b/crates/protocols/handshake/src/handshake.proto new file mode 100644 index 0000000..e48d596 --- /dev/null +++ b/crates/protocols/handshake/src/handshake.proto @@ -0,0 +1,30 @@ +// Copyright 2020 The Swarm Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +syntax = "proto3"; + +package swarm.handshake; + +message Syn { + bytes ObservedUnderlay = 1; +} + +message Ack { + BzzAddress Address = 1; + uint64 NetworkID = 2; + bool FullNode = 3; + bytes Nonce = 4; + string WelcomeMessage = 99; +} + +message SynAck { + Syn Syn = 1; + Ack Ack = 2; +} + +message BzzAddress { + bytes Underlay = 1; + bytes Signature = 2; + bytes Overlay = 3; +} diff --git a/crates/protocols/handshake/src/lib.rs b/crates/protocols/handshake/src/lib.rs new file mode 100644 index 0000000..a41ad55 --- /dev/null +++ b/crates/protocols/handshake/src/lib.rs @@ -0,0 +1,23 @@ +pub mod swarm { + pub mod handshake { + include!(concat!(env!("OUT_DIR"), "/swarm.handshake.rs")); + } +} + +use libp2p::StreamProtocol; +use swarm::handshake; + +const HANDSHAKE_PROTOCOL: StreamProtocol = StreamProtocol::new("/swarm/handshake/11.0.0/handshake"); + + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/kad/Cargo.toml b/crates/protocols/kad/Cargo.toml new file mode 100644 index 0000000..2f17144 --- /dev/null +++ b/crates/protocols/kad/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "kad" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/kad/src/lib.rs b/crates/protocols/kad/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/kad/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/pseudosettle/Cargo.toml b/crates/protocols/pseudosettle/Cargo.toml new file mode 100644 index 0000000..7c43863 --- /dev/null +++ b/crates/protocols/pseudosettle/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pseudosettle" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/pseudosettle/src/lib.rs b/crates/protocols/pseudosettle/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/pseudosettle/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/pullsync/Cargo.toml b/crates/protocols/pullsync/Cargo.toml new file mode 100644 index 0000000..bbee75c --- /dev/null +++ b/crates/protocols/pullsync/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pullsync" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/pullsync/src/lib.rs b/crates/protocols/pullsync/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/pullsync/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/pushsync/Cargo.toml b/crates/protocols/pushsync/Cargo.toml new file mode 100644 index 0000000..7d4cebb --- /dev/null +++ b/crates/protocols/pushsync/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pushsync" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/pushsync/src/lib.rs b/crates/protocols/pushsync/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/pushsync/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/retrieval/Cargo.toml b/crates/protocols/retrieval/Cargo.toml new file mode 100644 index 0000000..97ad0f4 --- /dev/null +++ b/crates/protocols/retrieval/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "retrieval" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/retrieval/src/lib.rs b/crates/protocols/retrieval/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/retrieval/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/status/Cargo.toml b/crates/protocols/status/Cargo.toml new file mode 100644 index 0000000..349eb8b --- /dev/null +++ b/crates/protocols/status/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "status" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/status/src/lib.rs b/crates/protocols/status/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/status/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/protocols/swap/Cargo.toml b/crates/protocols/swap/Cargo.toml new file mode 100644 index 0000000..0bebe1e --- /dev/null +++ b/crates/protocols/swap/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "swap" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] diff --git a/crates/protocols/swap/src/lib.rs b/crates/protocols/swap/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/protocols/swap/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/swarm/Cargo.toml b/crates/swarm/Cargo.toml new file mode 100644 index 0000000..1617521 --- /dev/null +++ b/crates/swarm/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "swarm" +version.workspace = true +edition.workspace = true +homepage.workspace = true +repository.workspace = true + +[dependencies] +alloy.workspace = true +libp2p.workspace = true + +once_cell.workspace = true +thiserror.workspace = true +tokio.workspace = true \ No newline at end of file diff --git a/crates/swarm/src/distance.rs b/crates/swarm/src/distance.rs new file mode 100644 index 0000000..ed45003 --- /dev/null +++ b/crates/swarm/src/distance.rs @@ -0,0 +1,109 @@ +use alloy::primitives::{FixedBytes, U256}; + +use crate::{DistAddr, HASH_SIZE}; + +pub trait Distance { + fn length(&self, y: &DistAddr) -> U256; + fn raw(&self, y: &DistAddr) -> FixedBytes; + fn distance_cmp(&self, x: &DistAddr, y: &DistAddr) -> std::cmp::Ordering; +} + +impl Distance for DistAddr { + // Measure the length of the distance between addresses `x` and `y` in Swarm space. + fn length(&self, y: &DistAddr) -> U256 { + U256::from_be_slice(self.raw(y).as_ref()) + } + + // Determine the bytes distance between addresses `x` and `y`. + fn raw(&self, y: &DistAddr) -> FixedBytes { + FixedBytes::from_slice( + self.0 + .iter() + .zip(y.0.iter()) + .map(|(a, b)| a ^ b) + .collect::>() + .as_slice(), + ) + } + + // Compares the distances of `x` and `y` to `self` in terms of the distance metric defined in Swarm space. + fn distance_cmp(&self, x: &DistAddr, y: &DistAddr) -> std::cmp::Ordering { + for i in 0..HASH_SIZE { + let dx = x[i] ^ self[i]; + let dy = y[i] ^ self[i]; + if dx == dy { + continue; + } else if dx < dy { + return std::cmp::Ordering::Greater; + } + return std::cmp::Ordering::Less; + } + + std::cmp::Ordering::Equal + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::cmp::Ordering; + + fn parse_hex_address(s: &str) -> DistAddr { + s.parse().unwrap() + } + + fn cmp_test_case(a: &DistAddr, x: &DistAddr, y: &DistAddr, expected: Ordering) { + assert_eq!(a.distance_cmp(x, y), expected); + } + + #[test] + fn test_distance_raw() { + let x = + parse_hex_address("9100000000000000000000000000000000000000000000000000000000000000"); + let y = + parse_hex_address("8200000000000000000000000000000000000000000000000000000000000000"); + let expected_result = + "8593944123082061379093159043613555660984881674403010612303492563087302590464"; + + let raw_distance = x.raw(&y); + let raw_distance_u256 = U256::from_be_slice(&raw_distance.to_vec()); + + assert_eq!(raw_distance_u256.to_string(), expected_result); + } + + #[test] + fn test_distance_cmp_greater() { + let a = + parse_hex_address("9100000000000000000000000000000000000000000000000000000000000000"); + let x = + parse_hex_address("8200000000000000000000000000000000000000000000000000000000000000"); + let y = + parse_hex_address("1200000000000000000000000000000000000000000000000000000000000000"); + + cmp_test_case(&a, &x, &y, Ordering::Greater); + } + + #[test] + fn test_distance_cmp_less() { + let a = + parse_hex_address("9100000000000000000000000000000000000000000000000000000000000000"); + let x = + parse_hex_address("1200000000000000000000000000000000000000000000000000000000000000"); + let y = + parse_hex_address("8200000000000000000000000000000000000000000000000000000000000000"); + + cmp_test_case(&a, &x, &y, Ordering::Less); + } + + #[test] + fn test_distance_cmp_equal() { + let a = + parse_hex_address("9100000000000000000000000000000000000000000000000000000000000000"); + let x = + parse_hex_address("1200000000000000000000000000000000000000000000000000000000000000"); + let y = + parse_hex_address("1200000000000000000000000000000000000000000000000000000000000000"); + + cmp_test_case(&a, &x, &y, Ordering::Equal); + } +} diff --git a/crates/swarm/src/lib.rs b/crates/swarm/src/lib.rs new file mode 100644 index 0000000..3a31cb1 --- /dev/null +++ b/crates/swarm/src/lib.rs @@ -0,0 +1,185 @@ +use alloy::{ + hex, primitives::{Address, FixedBytes}, signers::{wallet::LocalWallet, Signature, Signer} +}; +use libp2p::Multiaddr; +use once_cell::sync::Lazy; +use overlay::{Nonce, Overlay, OverlayAddress}; +use thiserror::Error; + +mod distance; +mod overlay; +mod proximity; + +// const STAMP_INDEX_SIZE: u8 = 8; +// const STAMP_TIMESTAMP_SIZE: u8 = 8; +// const SPAN_SIZE: u16 = 8; +// const SECTION_SIZE: u16 = 32; +// const BRANCHES: u16 = 128; +// const ENCRYPTED_BRANCHES: u16 = BRANCHES / 2; +// const BMT_BRANCHES: u8 = 128; +// const CHUNK_SIZE: u16 = SECTION_SIZE * BRANCHES; +const HASH_SIZE: usize = 32; +const MAX_PO: u8 = 31; +const EXTENDED_PO: u8 = MAX_PO + 5; +// const MAX_BINS: u8 = MAX_PO + 1; +// const CHUNK_WITH_SPAN_SIZE: u16 = CHUNK_SIZE + SPAN_SIZE; +// const SOC_SIGNATURE_SIZE: u16 = 65; +// const SOC_MIN_CHUNK_SIZE: u16 = HASH_SIZE + SOC_SIGNATURE_SIZE + SPAN_SIZE; +// const SOC_MAX_CHUNK_SIZE: u16 = SOC_MIN_CHUNK_SIZE + CHUNK_SIZE; + +// NodeAddress represents the culminated address of a node in Swarm space. +// It consists of: +// - underlay(s) (physical) addresses +// - overlay (topological) address +// - signature +// - nonce + +// It consists of a peers underlay (physical) address, overlay (topology) address and signature. +// The signature is used to verify the `Overlay/Underlay` pair, as it is based on `underlay|networkid`, +// signed with the private key of the chain address. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct NodeAddress { + underlay: Multiaddr, + overlay: DistAddr, + chain: Address, +} + +#[derive(Debug, Error)] +pub enum NodeAddressError { + #[error("signature length mismatch")] + SignatureLengthMismatch, + #[error("overlay mismatch")] + OverlayMismatch, + #[error("signature mismatch")] + SignatureMismatch, + #[error("underlay decode failed")] + UnderlayDecodeFailed, +} + +impl NodeAddress { + pub async fn new( + signer: LocalWallet, + network_id: u64, + nonce: Nonce, + underlay: Multiaddr, + ) -> (Self, Signature) { + let underlay_binary = underlay.to_vec(); + + let overlay = signer.overlay(network_id, Some(nonce)); + let message = generate_sign_data(underlay_binary.as_slice(), &overlay, network_id); + let signature = signer.sign_message(&message).await; + + match signature { + Ok(signature) => ( + Self { + underlay, + overlay, + chain: signer.address(), + }, + signature, + ), + Err(_) => panic!("signature error"), + } + } + + pub fn parse( + underlay: &[u8], + overlay: &[u8], + signature: &[u8], + nonce: &[u8], + validate_overlay: bool, + network_id: u64, + ) -> Result { + let overlay = OverlayAddress::from_slice(overlay); + let message = generate_sign_data( + underlay, + &OverlayAddress::from_slice(overlay.as_slice()), + network_id, + ); + let signature = Signature::try_from(signature) + .map_err(|_| NodeAddressError::SignatureLengthMismatch)?; + let chain = signature + .recover_address_from_msg(message) + .map_err(|_| NodeAddressError::SignatureMismatch)?; + + if validate_overlay { + let recovered_overlay = chain.overlay(network_id, Some(Nonce::from_slice(nonce))); + + if overlay != recovered_overlay { + return Err(NodeAddressError::OverlayMismatch); + } + } + + let underlay = Multiaddr::try_from(Vec::from(underlay)) + .map_err(|_| NodeAddressError::UnderlayDecodeFailed)?; + + Ok(Self { + underlay, + overlay, + chain, + }) + } + + pub fn underlay(&self) -> &Multiaddr { + &self.underlay + } + + pub fn overlay(&self) -> &DistAddr { + &self.overlay + } + + pub fn chain(&self) -> &Address { + &self.chain + } +} + +fn generate_sign_data(underlay: &[u8], overlay: &OverlayAddress, network_id: u64) -> Vec { + let mut data = Vec::with_capacity(underlay.len() + HASH_SIZE + 8 + 14); + data.extend_from_slice("bee-handshake-".as_bytes()); + data.extend_from_slice(underlay); + data.extend_from_slice(overlay.as_slice()); + data.extend_from_slice(&network_id.to_be_bytes()); + + data +} + +// A distance address represents an address in Swarm space in the domain of nodes, or chunks, whereby +// the consumer needs to be aware of their topological distance between distance addresses. +type DistAddr = FixedBytes; + +pub static REPLICAS_OWNER: Lazy
= Lazy::new(|| { + Address::parse_checksummed("0xDC5b20847F43d67928F49Cd4f85D696b5A7617B5", None).unwrap() +}); +pub const ZERO_ADDRESS: DistAddr = DistAddr::new([0; 32]); + +#[cfg(test)] +mod tests { + use alloy::{ + primitives::{bytes, FixedBytes}, + signers::wallet::LocalWallet, + }; + + use super::*; + + #[tokio::test] + async fn test_node_address() { + let multiaddr: Multiaddr = "/ip4/127.0.0.1/tcp/1634/p2p/16Uiu2HAkx8ULY8cTXhdVAcMmLcH9AsTKz6uBQ7DPLKRjMLgBVYkA".parse().unwrap(); + let nonce = FixedBytes::<32>::left_padding_from(&bytes!("02")); + let network_id: u64 = 3; + let wallet = LocalWallet::random(); + + let overlay = wallet.overlay(network_id, Some(nonce)); + let (node_address, signature) = NodeAddress::new(wallet, network_id, nonce, multiaddr.clone()).await; + + let node_address2 = NodeAddress::parse( + multiaddr.to_vec().as_slice(), + overlay.as_slice(), + signature.as_bytes().as_slice(), + nonce.as_slice(), + true, + network_id, + ); + + assert_eq!(node_address, node_address2.unwrap()); + } +} diff --git a/crates/swarm/src/overlay.rs b/crates/swarm/src/overlay.rs new file mode 100644 index 0000000..65fbcc1 --- /dev/null +++ b/crates/swarm/src/overlay.rs @@ -0,0 +1,114 @@ +use alloy::{ + primitives::{keccak256, Address, FixedBytes}, + signers::wallet::LocalWallet, +}; + +use crate::{DistAddr, HASH_SIZE}; + +pub type OverlayAddress = DistAddr; +pub(crate) type Nonce = FixedBytes; + +pub trait Overlay { + fn overlay(&self, network_id: u64, nonce: Option) -> OverlayAddress; +} + +impl Overlay for LocalWallet { + // Generates the overlay address for the signer. + fn overlay(&self, network_id: u64, nonce: Option) -> OverlayAddress { + calc_overlay(self.address(), network_id, nonce) + } +} + +impl Overlay for Address { + // Generates the overlay address for the address. + fn overlay(&self, network_id: u64, nonce: Option) -> OverlayAddress { + calc_overlay(*self, network_id, nonce) + } +} + +fn calc_overlay(address: Address, network_id: u64, nonce: Option) -> OverlayAddress { + let mut data = [0u8; 20 + 8 + 32]; + data[..20].copy_from_slice(address.0.as_slice()); + data[20..28].copy_from_slice(&network_id.to_le_bytes()); + if let Some(nonce) = nonce { + data[28..60].copy_from_slice(nonce.as_slice()); + } + + keccak256(data) +} + +#[cfg(test)] +mod tests { + use alloy::{ + primitives::{bytes, FixedBytes}, + signers::wallet::LocalWallet, + }; + + use super::*; + + #[test] + fn test_new_ethereum_address() { + let signer: LocalWallet = + "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae" + .parse() + .unwrap(); + assert_eq!( + signer.address(), + "0x2f63cbeb054ce76050827e42dd75268f6b9d87c5" + .parse::
() + .unwrap(), + "address mismatch" + ); + assert_eq!( + signer.overlay(1, None), + "0x9b109ce1ec1a7134e3ef27146e56a8b5566b8397f993fa40bc4c66f36043392f" + .parse::() + .unwrap(), + "overlay mismatch" + ); + } + + #[test] + fn test_new_overlay_from_ethereum_address() { + let test_cases = vec![ + ( + "1815cac638d1525b47f848daf02b7953e4edd15c", + 1, + bytes!("01"), + "0xa38f7a814d4b249ae9d3821e9b898019c78ac9abe248fff171782c32a3849a17", + ), + ( + "1815cac638d1525b47f848daf02b7953e4edd15c", + 1, + bytes!("02"), + "0xc63c10b1728dfc463c64c264f71a621fe640196979375840be42dc496b702610", + ), + ( + "d26bc1715e933bd5f8fad16310042f13abc16159", + 2, + bytes!("01"), + "0x9f421f9149b8e31e238cfbdc6e5e833bacf1e42f77f60874d49291292858968e", + ), + ( + "ac485e3c63dcf9b4cda9f007628bb0b6fed1c063", + 1, + bytes!("00"), + "0xfe3a6d582c577404fb19df64a44e00d3a3b71230a8464c0dd34af3f0791b45f2", + ), + ]; + + for (addr, network_id, nonce, expected_address) in test_cases { + let nonce = FixedBytes::<32>::left_padding_from(&nonce); + let addr: Address = addr.parse().unwrap(); + + let got_address: OverlayAddress = addr.overlay(network_id, Some(nonce)); + let expected_address: OverlayAddress = expected_address.parse().unwrap(); + + assert_eq!( + got_address, expected_address, + "Expected {:x?}, but got {:x?}", + expected_address, got_address + ); + } + } +} diff --git a/crates/swarm/src/proximity.rs b/crates/swarm/src/proximity.rs new file mode 100644 index 0000000..dc3c0f9 --- /dev/null +++ b/crates/swarm/src/proximity.rs @@ -0,0 +1,216 @@ +use crate::{DistAddr, EXTENDED_PO, MAX_PO}; + +pub trait Proximity { + fn proximity(&self, other: &DistAddr) -> u8; + fn extended_proximity(&self, y: &DistAddr) -> u8; +} + +impl Proximity for DistAddr { + fn proximity(&self, other: &DistAddr) -> u8 { + proximity_impl(self, other, MAX_PO) + } + + fn extended_proximity(&self, other: &DistAddr) -> u8 { + proximity_impl(self, other, EXTENDED_PO) + } +} + +// Proximity returns the proximity order of the MSB distance between x and y +// +// The distance metric MSB(x, y) of two equal length byte sequences x an y is the +// value of the binary integer cast of the x^y, ie., x and y bitwise xor-ed. +// the binary cast is big endian: most significant bit first (=MSB). +// +// Proximity(x, y) is a discrete logarithmic scaling of the MSB distance. +// It is defined as the reverse rank of the integer part of the base 2 +// logarithm of the distance. +// It is calculated by counting the number of common leading zeros in the (MSB) +// binary representation of the x^y. +// +// (0 farthest, 255 closest, 256 self) +fn proximity_impl(one: &DistAddr, other: &DistAddr, max_po: u8) -> u8 { + let b = (max_po / 8 + 1).min(one.len() as u8).min(other.len() as u8); + for i in 0..b { + let oxo = one[i as usize] ^ other[i as usize]; + for j in 0..8 { + if (oxo >> (7 - j)) & 0x01 != 0 { + return i * 8 + j; + } + } + } + max_po +} + +#[cfg(test)] +mod tests { + use alloy::primitives::FixedBytes; + + use crate::HASH_SIZE; + + use super::*; + + #[test] + fn test_proximity() { + let limit_po = |po: u8| -> u8 { + if po > MAX_PO { + MAX_PO + } else { + po + } + }; + + let base: DistAddr = FixedBytes::from_slice(&[0; HASH_SIZE]); + let test_cases = vec![ + (vec![0b00000000, 0b00000000, 0b00000000, 0b00000000], MAX_PO), + ( + vec![0b10000000, 0b00000000, 0b00000000, 0b00000000], + limit_po(0), + ), + ( + vec![0b01000000, 0b00000000, 0b00000000, 0b00000000], + limit_po(1), + ), + ( + vec![0b00100000, 0b00000000, 0b00000000, 0b00000000], + limit_po(2), + ), + ( + vec![0b00010000, 0b00000000, 0b00000000, 0b00000000], + limit_po(3), + ), + ( + vec![0b00001000, 0b00000000, 0b00000000, 0b00000000], + limit_po(4), + ), + ( + vec![0b00000100, 0b00000000, 0b00000000, 0b00000000], + limit_po(5), + ), + ( + vec![0b00000010, 0b00000000, 0b00000000, 0b00000000], + limit_po(6), + ), + ( + vec![0b00000001, 0b00000000, 0b00000000, 0b00000000], + limit_po(7), + ), + ( + vec![0b00000000, 0b10000000, 0b00000000, 0b00000000], + limit_po(8), + ), + ( + vec![0b00000000, 0b01000000, 0b00000000, 0b00000000], + limit_po(9), + ), + ( + vec![0b00000000, 0b00100000, 0b00000000, 0b00000000], + limit_po(10), + ), + ( + vec![0b00000000, 0b00010000, 0b00000000, 0b00000000], + limit_po(11), + ), + ( + vec![0b00000000, 0b00001000, 0b00000000, 0b00000000], + limit_po(12), + ), + ( + vec![0b00000000, 0b00000100, 0b00000000, 0b00000000], + limit_po(13), + ), + ( + vec![0b00000000, 0b00000010, 0b00000000, 0b00000000], + limit_po(14), + ), + ( + vec![0b00000000, 0b00000001, 0b00000000, 0b00000000], + limit_po(15), + ), + ( + vec![0b00000000, 0b00000000, 0b10000000, 0b00000000], + limit_po(16), + ), + ( + vec![0b00000000, 0b00000000, 0b01000000, 0b00000000], + limit_po(17), + ), + ( + vec![0b00000000, 0b00000000, 0b00100000, 0b00000000], + limit_po(18), + ), + ( + vec![0b00000000, 0b00000000, 0b00010000, 0b00000000], + limit_po(19), + ), + ( + vec![0b00000000, 0b00000000, 0b00001000, 0b00000000], + limit_po(20), + ), + ( + vec![0b00000000, 0b00000000, 0b00000100, 0b00000000], + limit_po(21), + ), + ( + vec![0b00000000, 0b00000000, 0b00000010, 0b00000000], + limit_po(22), + ), + ( + vec![0b00000000, 0b00000000, 0b00000001, 0b00000000], + limit_po(23), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b10000000], + limit_po(24), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b01000000], + limit_po(25), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00100000], + limit_po(26), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00010000], + limit_po(27), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00001000], + limit_po(28), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00000100], + limit_po(29), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00000010], + limit_po(30), + ), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00000001], + limit_po(31), + ), + (vec![], limit_po(31)), + (vec![0b00000001], limit_po(7)), + (vec![0b00000000], limit_po(31)), + ( + vec![0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000001], + limit_po(31), + ), + ]; + + for (addr, expected_po) in test_cases { + let addr = DistAddr::right_padding_from(addr.as_slice()); + assert_eq!( + base.proximity(&addr), + expected_po, + "base.proximity(&addr) failed" + ); + assert_eq!( + addr.proximity(&base), + expected_po, + "addr.proximity(&base) failed" + ); + } + } +} From 5cffda421d7df754d9ad6cf9d5967b9f0beaa075 Mon Sep 17 00:00:00 2001 From: mfw78 Date: Mon, 17 Jun 2024 05:27:57 +0000 Subject: [PATCH 2/2] chore: wip --- .vscode/settings.json | 3 + Cargo.lock | 2875 +++++++---------- Cargo.toml | 136 +- bin/bee-rs/Cargo.toml | 11 - bin/bee-rs/src/main.rs | 3 - bin/beers/Cargo.toml | 43 + bin/beers/src/cli/mod.rs | 296 ++ bin/beers/src/commands/mod.rs | 3 + bin/beers/src/commands/node/mod.rs | 367 +++ bin/beers/src/lib.rs | 49 + bin/beers/src/main.rs | 29 + bin/beers/src/sigsegv_handler.rs | 153 + bin/swarm-wasm-lib/Cargo.toml | 5 +- bin/waku-swarm-relay/Cargo.toml | 5 +- bin/wasm-playground/Cargo.toml | 13 +- bin/wasm-playground/src/lib.rs | 3 +- crates/bmt/Cargo.lock | 32 - crates/bmt/Cargo.toml | 10 - crates/cli/Cargo.toml | 22 + crates/cli/src/lib.rs | 210 ++ crates/logging/Cargo.toml | 15 - crates/logging/src/lib.rs | 79 - crates/manifest/Cargo.toml | 27 - crates/metrics/Cargo.toml | 27 + crates/metrics/metrics-derive/Cargo.toml | 26 + crates/metrics/metrics-derive/src/expand.rs | 436 +++ crates/metrics/metrics-derive/src/lib.rs | 137 + crates/metrics/metrics-derive/src/metric.rs | 59 + .../metrics/metrics-derive/src/with_attrs.rs | 17 + .../tests/compile-fail/metric_attr.rs | 62 + .../tests/compile-fail/metric_attr.stderr | 48 + .../tests/compile-fail/metrics_attr.rs | 56 + .../tests/compile-fail/metrics_attr.stderr | 81 + .../metrics/metrics-derive/tests/metrics.rs | 348 ++ .../metrics/metrics-derive/tests/trybuild.rs | 5 + crates/metrics/src/common/mod.rs | 1 + crates/metrics/src/common/mpsc.rs | 330 ++ crates/metrics/src/lib.rs | 22 + crates/{ => net}/p2p/Cargo.toml | 13 +- .../{p2p/src/main.rs => net/p2p/src/lib.rs} | 55 +- crates/net/p2p/src/main.rs | 7 + crates/{ => net}/protocols/cursors/Cargo.toml | 0 crates/{ => net}/protocols/cursors/src/lib.rs | 0 .../{ => net}/protocols/handshake/Cargo.toml | 0 crates/{ => net}/protocols/handshake/build.rs | 0 .../protocols/handshake/src/handshake.proto | 0 .../{ => net}/protocols/handshake/src/lib.rs | 12 +- crates/{ => net}/protocols/kad/Cargo.toml | 0 crates/{ => net}/protocols/kad/src/lib.rs | 0 .../protocols/pseudosettle/Cargo.toml | 0 .../protocols/pseudosettle/src/lib.rs | 0 .../{ => net}/protocols/pullsync/Cargo.toml | 0 .../{ => net}/protocols/pullsync/src/lib.rs | 0 .../{ => net}/protocols/pushsync/Cargo.toml | 0 .../{ => net}/protocols/pushsync/src/lib.rs | 0 .../{ => net}/protocols/retrieval/Cargo.toml | 0 .../{ => net}/protocols/retrieval/src/lib.rs | 0 crates/{ => net}/protocols/status/Cargo.toml | 0 crates/{ => net}/protocols/status/src/lib.rs | 0 crates/{ => net}/protocols/swap/Cargo.toml | 0 crates/{ => net}/protocols/swap/src/lib.rs | 0 crates/node-core/Cargo.toml | 69 + crates/node-core/build.rs | 24 + crates/node-core/src/args/datadir_args.rs | 53 + crates/node-core/src/args/log.rs | 189 ++ crates/node-core/src/args/mod.rs | 11 + crates/node-core/src/args/utils.rs | 88 + crates/node-core/src/cli/config.rs | 67 + crates/node-core/src/cli/mod.rs | 3 + crates/node-core/src/dirs.rs | 374 +++ crates/node-core/src/exit.rs | 87 + crates/node-core/src/lib.rs | 19 + crates/node-core/src/metrics/mod.rs | 4 + .../src/metrics/prometheus_exporter.rs | 317 ++ .../node-core/src/metrics/version_metrics.rs | 18 + crates/node-core/src/node_config.rs | 20 + crates/node-core/src/utils.rs | 7 + crates/node-core/src/version.rs | 135 + crates/node/api/Cargo.toml | 16 + crates/node/api/src/lib.rs | 28 + crates/node/api/src/node.rs | 121 + crates/node/api/src/primitives.rs | 8 + crates/node/builder/Cargo.toml | 31 + crates/node/builder/src/builder/mod.rs | 608 ++++ crates/node/builder/src/builder/states.rs | 247 ++ crates/node/builder/src/components/builder.rs | 384 +++ .../node/builder/src/components/consensus.rs | 32 + crates/node/builder/src/components/execute.rs | 41 + crates/node/builder/src/components/mod.rs | 143 + crates/node/builder/src/components/network.rs | 32 + crates/node/builder/src/components/payload.rs | 34 + crates/node/builder/src/components/pool.rs | 33 + crates/node/builder/src/exex.rs | 65 + crates/node/builder/src/handle.rs | 29 + crates/node/builder/src/hooks.rs | 120 + crates/node/builder/src/launch/common.rs | 594 ++++ crates/node/builder/src/launch/exex.rs | 122 + crates/node/builder/src/launch/mod.rs | 458 +++ crates/node/builder/src/lib.rs | 50 + crates/node/builder/src/node.rs | 115 + crates/node/builder/src/rpc.rs | 326 ++ crates/node/builder/src/setup.rs | 132 + crates/node/events/Cargo.toml | 14 + crates/node/events/src/lib.rs | 14 + crates/postage/Cargo.toml | 21 - crates/primitives/Cargo.toml | 41 + .../{bmt => primitives}/docs/bmt-hashing.png | Bin crates/{bmt => primitives}/docs/file-bmt.png | Bin .../docs/inclusion-proof.png | Bin crates/{ => primitives/src}/bmt/README.md | 0 .../{bmt/src => primitives/src/bmt}/chunk.rs | 22 +- .../{bmt/src => primitives/src/bmt}/file.rs | 59 +- .../src/lib.rs => primitives/src/bmt/mod.rs} | 13 - .../{bmt/src => primitives/src/bmt}/span.rs | 0 .../src/distaddr.rs} | 8 +- crates/primitives/src/lib.rs | 48 + .../{ => primitives/src}/manifest/README.md | 0 .../src/manifest}/marshal.rs | 3 +- .../lib.rs => primitives/src/manifest/mod.rs} | 1 - .../src => primitives/src/manifest}/node.rs | 3 +- .../src/manifest}/persist.rs | 87 +- .../src/manifest}/persist_other.rs | 0 .../src/manifest}/stringer.rs | 2 + .../src => primitives/src/manifest}/walker.rs | 5 - .../src/lib.rs => primitives/src/nodeaddr.rs} | 40 +- crates/{swarm => primitives}/src/overlay.rs | 14 +- .../src => primitives/src/postage}/batch.rs | 8 +- .../lib.rs => primitives/src/postage/mod.rs} | 0 .../src => primitives/src/postage}/pat.rs | 40 +- .../src => primitives/src/postage}/stamp.rs | 69 +- crates/{swarm => primitives}/src/proximity.rs | 6 +- crates/primitives/src/swarm.rs | 382 +++ crates/{bmt => primitives}/test-files/bos.pdf | Bin .../test-files/carrier-chunk-blob | Bin .../test-files/carrier-chunk-blob-2 | Bin crates/swarm/Cargo.toml | 14 - crates/tasks/Cargo.toml | 38 + crates/tasks/src/lib.rs | 775 +++++ crates/tasks/src/metrics.rs | 54 + crates/tasks/src/pool.rs | 173 + crates/tasks/src/shutdown.rs | 158 + crates/tracing/Cargo.toml | 29 + crates/tracing/src/formatter.rs | 92 + crates/tracing/src/layers.rs | 208 ++ crates/tracing/src/lib.rs | 242 ++ crates/tracing/src/test_tracer.rs | 25 + 146 files changed, 11915 insertions(+), 2178 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 bin/bee-rs/Cargo.toml delete mode 100644 bin/bee-rs/src/main.rs create mode 100644 bin/beers/Cargo.toml create mode 100644 bin/beers/src/cli/mod.rs create mode 100644 bin/beers/src/commands/mod.rs create mode 100644 bin/beers/src/commands/node/mod.rs create mode 100644 bin/beers/src/lib.rs create mode 100644 bin/beers/src/main.rs create mode 100644 bin/beers/src/sigsegv_handler.rs delete mode 100644 crates/bmt/Cargo.lock delete mode 100644 crates/bmt/Cargo.toml create mode 100644 crates/cli/Cargo.toml create mode 100644 crates/cli/src/lib.rs delete mode 100644 crates/logging/Cargo.toml delete mode 100644 crates/logging/src/lib.rs delete mode 100644 crates/manifest/Cargo.toml create mode 100644 crates/metrics/Cargo.toml create mode 100644 crates/metrics/metrics-derive/Cargo.toml create mode 100644 crates/metrics/metrics-derive/src/expand.rs create mode 100644 crates/metrics/metrics-derive/src/lib.rs create mode 100644 crates/metrics/metrics-derive/src/metric.rs create mode 100644 crates/metrics/metrics-derive/src/with_attrs.rs create mode 100644 crates/metrics/metrics-derive/tests/compile-fail/metric_attr.rs create mode 100644 crates/metrics/metrics-derive/tests/compile-fail/metric_attr.stderr create mode 100644 crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.rs create mode 100644 crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.stderr create mode 100644 crates/metrics/metrics-derive/tests/metrics.rs create mode 100644 crates/metrics/metrics-derive/tests/trybuild.rs create mode 100644 crates/metrics/src/common/mod.rs create mode 100644 crates/metrics/src/common/mpsc.rs create mode 100644 crates/metrics/src/lib.rs rename crates/{ => net}/p2p/Cargo.toml (70%) rename crates/{p2p/src/main.rs => net/p2p/src/lib.rs} (84%) create mode 100644 crates/net/p2p/src/main.rs rename crates/{ => net}/protocols/cursors/Cargo.toml (100%) rename crates/{ => net}/protocols/cursors/src/lib.rs (100%) rename crates/{ => net}/protocols/handshake/Cargo.toml (100%) rename crates/{ => net}/protocols/handshake/build.rs (100%) rename crates/{ => net}/protocols/handshake/src/handshake.proto (100%) rename crates/{ => net}/protocols/handshake/src/lib.rs (67%) rename crates/{ => net}/protocols/kad/Cargo.toml (100%) rename crates/{ => net}/protocols/kad/src/lib.rs (100%) rename crates/{ => net}/protocols/pseudosettle/Cargo.toml (100%) rename crates/{ => net}/protocols/pseudosettle/src/lib.rs (100%) rename crates/{ => net}/protocols/pullsync/Cargo.toml (100%) rename crates/{ => net}/protocols/pullsync/src/lib.rs (100%) rename crates/{ => net}/protocols/pushsync/Cargo.toml (100%) rename crates/{ => net}/protocols/pushsync/src/lib.rs (100%) rename crates/{ => net}/protocols/retrieval/Cargo.toml (100%) rename crates/{ => net}/protocols/retrieval/src/lib.rs (100%) rename crates/{ => net}/protocols/status/Cargo.toml (100%) rename crates/{ => net}/protocols/status/src/lib.rs (100%) rename crates/{ => net}/protocols/swap/Cargo.toml (100%) rename crates/{ => net}/protocols/swap/src/lib.rs (100%) create mode 100644 crates/node-core/Cargo.toml create mode 100644 crates/node-core/build.rs create mode 100644 crates/node-core/src/args/datadir_args.rs create mode 100644 crates/node-core/src/args/log.rs create mode 100644 crates/node-core/src/args/mod.rs create mode 100644 crates/node-core/src/args/utils.rs create mode 100644 crates/node-core/src/cli/config.rs create mode 100644 crates/node-core/src/cli/mod.rs create mode 100644 crates/node-core/src/dirs.rs create mode 100644 crates/node-core/src/exit.rs create mode 100644 crates/node-core/src/lib.rs create mode 100644 crates/node-core/src/metrics/mod.rs create mode 100644 crates/node-core/src/metrics/prometheus_exporter.rs create mode 100644 crates/node-core/src/metrics/version_metrics.rs create mode 100644 crates/node-core/src/node_config.rs create mode 100644 crates/node-core/src/utils.rs create mode 100644 crates/node-core/src/version.rs create mode 100644 crates/node/api/Cargo.toml create mode 100644 crates/node/api/src/lib.rs create mode 100644 crates/node/api/src/node.rs create mode 100644 crates/node/api/src/primitives.rs create mode 100644 crates/node/builder/Cargo.toml create mode 100644 crates/node/builder/src/builder/mod.rs create mode 100644 crates/node/builder/src/builder/states.rs create mode 100644 crates/node/builder/src/components/builder.rs create mode 100644 crates/node/builder/src/components/consensus.rs create mode 100644 crates/node/builder/src/components/execute.rs create mode 100644 crates/node/builder/src/components/mod.rs create mode 100644 crates/node/builder/src/components/network.rs create mode 100644 crates/node/builder/src/components/payload.rs create mode 100644 crates/node/builder/src/components/pool.rs create mode 100644 crates/node/builder/src/exex.rs create mode 100644 crates/node/builder/src/handle.rs create mode 100644 crates/node/builder/src/hooks.rs create mode 100644 crates/node/builder/src/launch/common.rs create mode 100644 crates/node/builder/src/launch/exex.rs create mode 100644 crates/node/builder/src/launch/mod.rs create mode 100644 crates/node/builder/src/lib.rs create mode 100644 crates/node/builder/src/node.rs create mode 100644 crates/node/builder/src/rpc.rs create mode 100644 crates/node/builder/src/setup.rs create mode 100644 crates/node/events/Cargo.toml create mode 100644 crates/node/events/src/lib.rs delete mode 100644 crates/postage/Cargo.toml create mode 100644 crates/primitives/Cargo.toml rename crates/{bmt => primitives}/docs/bmt-hashing.png (100%) rename crates/{bmt => primitives}/docs/file-bmt.png (100%) rename crates/{bmt => primitives}/docs/inclusion-proof.png (100%) rename crates/{ => primitives/src}/bmt/README.md (100%) rename crates/{bmt/src => primitives/src/bmt}/chunk.rs (94%) rename crates/{bmt/src => primitives/src/bmt}/file.rs (94%) rename crates/{bmt/src/lib.rs => primitives/src/bmt/mod.rs} (52%) rename crates/{bmt/src => primitives/src/bmt}/span.rs (100%) rename crates/{swarm/src/distance.rs => primitives/src/distaddr.rs} (92%) create mode 100644 crates/primitives/src/lib.rs rename crates/{ => primitives/src}/manifest/README.md (100%) rename crates/{manifest/src => primitives/src/manifest}/marshal.rs (99%) rename crates/{manifest/src/lib.rs => primitives/src/manifest/mod.rs} (99%) rename crates/{manifest/src => primitives/src/manifest}/node.rs (99%) rename crates/{manifest/src => primitives/src/manifest}/persist.rs (78%) rename crates/{manifest/src => primitives/src/manifest}/persist_other.rs (100%) rename crates/{manifest/src => primitives/src/manifest}/stringer.rs (99%) rename crates/{manifest/src => primitives/src/manifest}/walker.rs (80%) rename crates/{swarm/src/lib.rs => primitives/src/nodeaddr.rs} (79%) rename crates/{swarm => primitives}/src/overlay.rs (93%) rename crates/{postage/src => primitives/src/postage}/batch.rs (94%) rename crates/{postage/src/lib.rs => primitives/src/postage/mod.rs} (100%) rename crates/{postage/src => primitives/src/postage}/pat.rs (82%) rename crates/{postage/src => primitives/src/postage}/stamp.rs (79%) rename crates/{swarm => primitives}/src/proximity.rs (97%) create mode 100644 crates/primitives/src/swarm.rs rename crates/{bmt => primitives}/test-files/bos.pdf (100%) rename crates/{bmt => primitives}/test-files/carrier-chunk-blob (100%) rename crates/{bmt => primitives}/test-files/carrier-chunk-blob-2 (100%) delete mode 100644 crates/swarm/Cargo.toml create mode 100644 crates/tasks/Cargo.toml create mode 100644 crates/tasks/src/lib.rs create mode 100644 crates/tasks/src/metrics.rs create mode 100644 crates/tasks/src/pool.rs create mode 100644 crates/tasks/src/shutdown.rs create mode 100644 crates/tracing/Cargo.toml create mode 100644 crates/tracing/src/formatter.rs create mode 100644 crates/tracing/src/layers.rs create mode 100644 crates/tracing/src/lib.rs create mode 100644 crates/tracing/src/test_tracer.rs diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..22a5c94 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.cargo.features": [] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 3ec391c..f8e9c19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,17 +52,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -90,50 +79,10 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "alloy" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-consensus", - "alloy-contract", - "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-network", - "alloy-node-bindings", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-rpc-types-trace", - "alloy-serde", - "alloy-signer", - "alloy-signer-aws", - "alloy-signer-ledger", - "alloy-signer-trezor", - "alloy-signer-wallet", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", - "reqwest 0.12.4", -] - -[[package]] -name = "alloy-chains" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fd095a9d70f4b1c5c102c84a4c782867a5c6416dbf6dcd42a63e7c7a89d3c8" -dependencies = [ - "num_enum", - "strum", -] - [[package]] name = "alloy-consensus" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -143,64 +92,15 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-contract" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network", - "alloy-primitives", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-types", - "alloy-sol-types", - "alloy-transport", - "futures", - "futures-util", - "thiserror", -] - -[[package]] -name = "alloy-core" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b8b8d8c4e84449ce8f310ed48e09ce38b8290b163e3d0df68ea445a9ccce3a" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-types", -] - -[[package]] -name = "alloy-dyn-abi" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd2404399cb1b50572758e66e9b4bf088e5a3df9007be7126456c7e50af935f" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", - "const-hex", - "itoa", - "serde", - "serde_json", - "winnow 0.6.13", -] - [[package]] name = "alloy-eips" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", - "derive_more", "once_cell", "serde", "sha2", @@ -209,7 +109,7 @@ dependencies = [ [[package]] name = "alloy-genesis" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-primitives", "alloy-serde", @@ -217,22 +117,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-json-abi" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3abf6446a292e19853aaca43590eeb48bf435dfd2c74200259e8f4872f6ce3" -dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", - "serde", - "serde_json", -] - [[package]] name = "alloy-json-rpc" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-primitives", "serde", @@ -244,13 +132,13 @@ dependencies = [ [[package]] name = "alloy-network" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-primitives", - "alloy-rpc-types", + "alloy-rpc-types-eth", "alloy-signer", "alloy-sol-types", "async-trait", @@ -259,32 +147,18 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-node-bindings" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-genesis", - "alloy-primitives", - "k256", - "serde_json", - "tempfile", - "thiserror", - "tracing", - "url", -] - [[package]] name = "alloy-primitives" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277af0cbcc483ee6ad2c1e818090b5928d27f04fd6580680f31c1cf8068bcc2" +checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", "derive_more", + "getrandom", "hex-literal", "itoa", "k256", @@ -296,62 +170,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "alloy-provider" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-node-bindings", - "alloy-primitives", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-rpc-types-anvil", - "alloy-rpc-types-trace", - "alloy-signer-wallet", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", - "async-stream", - "async-trait", - "auto_impl", - "dashmap", - "futures", - "futures-utils-wasm", - "lru 0.12.3", - "pin-project", - "reqwest 0.12.4", - "serde", - "serde_json", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "alloy-pubsub" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", - "bimap", - "futures", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", -] - [[package]] name = "alloy-rlp" version = "0.3.5" @@ -375,33 +193,9 @@ dependencies = [ ] [[package]] -name = "alloy-rpc-client" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", - "futures", - "pin-project", - "reqwest 0.12.4", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-rpc-types" +name = "alloy-rpc-types-eth" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -410,38 +204,16 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.12.1", + "itertools 0.13.0", "serde", "serde_json", "thiserror", ] -[[package]] -name = "alloy-rpc-types-anvil" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-primitives", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-rpc-types-trace" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-primitives", - "alloy-rpc-types", - "alloy-serde", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-primitives", "serde", @@ -451,7 +223,7 @@ dependencies = [ [[package]] name = "alloy-signer" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-primitives", "async-trait", @@ -461,81 +233,26 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-signer-aws" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "aws-sdk-kms", - "k256", - "spki", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-signer-ledger" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "coins-ledger", - "futures-util", - "semver 1.0.23", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-signer-trezor" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "semver 1.0.23", - "thiserror", - "tracing", - "trezor-client", -] - [[package]] name = "alloy-signer-wallet" version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" +source = "git+https://github.com/alloy-rs/alloy?rev=00d81d7#00d81d7882a0bee4720d6d6a1db4c8f164ebb9d0" dependencies = [ "alloy-consensus", "alloy-network", "alloy-primitives", "alloy-signer", "async-trait", - "coins-bip32", - "coins-bip39", - "elliptic-curve", - "eth-keystore", "k256", "rand", "thiserror", - "yubihsm", ] [[package]] name = "alloy-sol-macro" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30708a79919b082f2692423c8cc72fc250477e4a2ecb0d4a7244cd3cdb299965" +checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -547,11 +264,10 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a679ac01774ab7e00a567a918d4231ae692c5c8cedaf4e16956c3116d7896" +checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" dependencies = [ - "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", @@ -566,107 +282,28 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356da0c2228aa6675a5faaa08a3e4061b967f924753983d72b9a18d9a3fad44e" +checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" dependencies = [ - "alloy-json-abi", "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "serde_json", "syn 2.0.66", "syn-solidity", ] -[[package]] -name = "alloy-sol-type-parser" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fd4783b0a5840479013e9ce960d2eb7b3be381f722e0fe3d1f7c3bb6bd4ebd" -dependencies = [ - "winnow 0.6.13", -] - [[package]] name = "alloy-sol-types" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eb5e6234c0b62514992589fe1578f64d418dbc8ef5cd1ab2d7f2f568f599698" +checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" dependencies = [ - "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", - "serde", -] - -[[package]] -name = "alloy-transport" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-json-rpc", - "base64 0.22.1", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "url", - "wasm-bindgen-futures", -] - -[[package]] -name = "alloy-transport-http" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest 0.12.4", - "serde_json", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-transport-ipc" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-json-rpc", - "alloy-pubsub", - "alloy-transport", - "bytes", - "futures", - "interprocess", - "pin-project", - "serde_json", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "alloy-transport-ws" -version = "0.1.0" -source = "git+https://github.com/alloy-rs/alloy?rev=f6ebef2#f6ebef272c5bd2783bae3fe7ef6ebc1dc3cee015" -dependencies = [ - "alloy-pubsub", - "alloy-transport", - "futures", - "http 0.2.12", - "serde_json", - "tokio", - "tokio-tungstenite", - "tracing", - "ws_stream_wasm", ] [[package]] @@ -944,17 +581,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -988,17 +614,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.0", -] - [[package]] name = "asynchronous-codec" version = "0.7.0" @@ -1029,17 +644,6 @@ dependencies = [ "url", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "auto_impl" version = "1.2.0" @@ -1058,200 +662,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "aws-credential-types" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "zeroize", -] - -[[package]] -name = "aws-runtime" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75588e7ee5e8496eed939adac2035a6dbab9f7eb2acdd9ab2d31856dab6f3955" -dependencies = [ - "aws-credential-types", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid 1.8.0", -] - -[[package]] -name = "aws-sdk-kms" -version = "1.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da951fb0dd1a02728a91c58af8464098766f1a0600af932dd3f8361b23e1bfc9" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sigv4" -version = "1.2.1" +name = "axum" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b56f1cbe6fd4d0c2573df72868f20ab1c125ca9c9dbce17927a463433a2e57" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ - "aws-credential-types", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", + "async-trait", + "axum-core", + "bitflags 1.3.2", "bytes", - "form_urlencoded", - "hex", - "hmac", - "http 0.2.12", - "http 1.1.0", - "once_cell", - "percent-encoding", - "sha2", - "time", - "tracing", -] - -[[package]] -name = "aws-smithy-async" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" -dependencies = [ "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "aws-smithy-http" -version = "0.60.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7de001a1b9a25601016d8057ea16e31a45fdca3751304c8edf4ad72e706c08" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", "http 0.2.12", "http-body 0.4.6", - "once_cell", + "hyper 0.14.29", + "itoa", + "matchit", + "memchr", + "mime", "percent-encoding", "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-json" -version = "0.60.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" -dependencies = [ - "aws-smithy-types", -] - -[[package]] -name = "aws-smithy-runtime" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d3965f6417a92a6d1009c5958a67042f57e46342afb37ca58f9ad26744ec73" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "http-body 1.0.0", - "once_cell", - "pin-project-lite", - "pin-utils", - "tokio", - "tracing", -] - -[[package]] -name = "aws-smithy-runtime-api" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4179bd8a1c943e1aceb46c5b9fc014a561bd6c35a2153e816ba29076ee49d245" -dependencies = [ - "aws-smithy-async", - "aws-smithy-types", - "bytes", - "http 0.2.12", - "http 1.1.0", - "pin-project-lite", - "tokio", - "tracing", - "zeroize", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", ] [[package]] -name = "aws-smithy-types" -version = "1.1.10" +name = "axum-core" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6764ba7e1c5ede1c9f9e4046645534f06c2581402461c559b481a420330a83" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ - "base64-simd", + "async-trait", "bytes", - "bytes-utils", + "futures-util", "http 0.2.12", - "http 1.1.0", "http-body 0.4.6", - "http-body 1.0.0", - "http-body-util", - "itoa", - "num-integer", - "pin-project-lite", - "pin-utils", - "ryu", - "serde", - "time", -] - -[[package]] -name = "aws-types" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f734808d43702a67e57d478a12e227d4d038d0b90c9005a78c87890d3805922" -dependencies = [ - "aws-credential-types", - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "http 0.2.12", - "rustc_version 0.4.0", - "tracing", + "mime", + "rustversion", + "tower-layer", + "tower-service", ] [[package]] @@ -1294,50 +746,222 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "base64-simd" -version = "0.8.0" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bee_api" +version = "0.1.0" +source = "git+https://github.com/rndlabs/bee-api-rs.git#49ef4190f3bf3e0111a31c1277e8a3c4fb2e87f9" dependencies = [ - "outref", - "vsimd", + "hex", + "reqwest", + "serde", + "tokio", ] [[package]] -name = "base64ct" -version = "1.6.0" +name = "beef" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" +dependencies = [ + "serde", +] [[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +name = "beers" +version = "0.1.0" +dependencies = [ + "beers-cli-runner", + "beers-node-core", + "beers-p2p", + "beers-tasks", + "beers-tracing", + "clap", + "eyre", + "futures", + "libc", + "metrics-process", + "rayon", + "tokio", + "tracing", +] [[package]] -name = "bee-rs" +name = "beers-cli-runner" +version = "0.1.0" +dependencies = [ + "beers-tasks", + "tokio", + "tracing", +] + +[[package]] +name = "beers-metrics" +version = "0.1.0" +dependencies = [ + "beers-metrics-derive", + "futures", + "metrics", + "tokio", + "tokio-util", +] + +[[package]] +name = "beers-metrics-derive" +version = "0.1.0" +dependencies = [ + "metrics", + "once_cell", + "proc-macro2", + "quote", + "regex", + "serial_test", + "syn 2.0.66", + "trybuild", +] + +[[package]] +name = "beers-node-api" +version = "0.1.0" +dependencies = [ + "beers-tasks", +] + +[[package]] +name = "beers-node-core" version = "0.1.0" dependencies = [ "alloy-primitives", + "beers-metrics", + "beers-primitives", + "beers-tasks", + "beers-tracing", + "clap", + "const-str", + "dirs-next", + "eyre", + "futures", + "http 1.1.0", + "humantime", + "jsonrpsee", + "metrics", + "metrics-exporter-prometheus", + "metrics-process", + "metrics-util", + "once_cell", + "procfs", + "proptest", + "secp256k1", + "shellexpand", + "thiserror", + "tokio", + "tower", + "tracing", + "vergen", ] [[package]] -name = "bee_api" +name = "beers-p2p" version = "0.1.0" -source = "git+https://github.com/rndlabs/bee-api-rs.git#49ef4190f3bf3e0111a31c1277e8a3c4fb2e87f9" dependencies = [ - "hex", - "reqwest 0.11.27", + "alloy-primitives", + "alloy-signer", + "alloy-signer-wallet", + "anyhow", + "beers-primitives", + "eyre", + "futures", + "handshake", + "libp2p", + "libp2p-stream", + "prost", + "prost-build", + "prost-types", + "rand", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "beers-primitives" +version = "0.1.0" +dependencies = [ + "alloy-primitives", + "alloy-signer", + "alloy-signer-wallet", + "bee_api", + "libp2p", + "num_enum", + "once_cell", "serde", + "serde_json", + "strum", + "test-case", + "thiserror", "tokio", + "tracing", ] [[package]] -name = "bimap" -version = "0.6.3" +name = "beers-tasks" +version = "0.1.0" +dependencies = [ + "beers-metrics", + "dyn-clone", + "futures-util", + "metrics", + "pin-project", + "rayon", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + +[[package]] +name = "beers-tracing" +version = "0.1.0" +dependencies = [ + "clap", + "eyre", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry_sdk", + "rolling-file", + "tonic", + "tracing", + "tracing-appender", + "tracing-file", + "tracing-journald", + "tracing-logfmt", + "tracing-opentelemetry", + "tracing-subscriber", +] + +[[package]] +name = "bindgen" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.5.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.66", +] [[package]] name = "bit-set" @@ -1396,15 +1020,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - [[package]] name = "blst" version = "0.3.12" @@ -1417,24 +1032,28 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bmt" -version = "0.1.0" -dependencies = [ - "hex", - "tiny-keccak", -] - [[package]] name = "bs58" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ - "sha2", "tinyvec", ] +[[package]] +name = "builder" +version = "0.1.0" +dependencies = [ + "beers-node-core", + "beers-tasks", + "beers-tracing", + "eyre", + "futures", + "tokio", + "tokio-stream", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -1462,16 +1081,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bytes-utils" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" -dependencies = [ - "bytes", - "either", -] - [[package]] name = "c-kzg" version = "1.0.2" @@ -1487,12 +1096,35 @@ dependencies = [ ] [[package]] -name = "cbc" -version = "0.1.2" +name = "camino" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" dependencies = [ - "cipher", + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", ] [[package]] @@ -1501,6 +1133,15 @@ version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -1541,7 +1182,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-targets 0.52.5", ] @@ -1557,6 +1197,17 @@ dependencies = [ "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 = "clap" version = "4.5.6" @@ -1592,96 +1243,10 @@ dependencies = [ ] [[package]] -name = "clap_lex" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" - -[[package]] -name = "cmac" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" -dependencies = [ - "cipher", - "dbl", - "digest 0.10.7", -] - -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", -] - -[[package]] -name = "coins-ledger" -version = "0.10.1" +name = "clap_lex" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e076e6e5d9708f0b90afe2dbe5a8ba406b5c794347661e6e44618388c7e3a31" -dependencies = [ - "async-trait", - "byteorder", - "cfg-if", - "getrandom", - "hex", - "hidapi-rusb", - "js-sys", - "log", - "nix 0.26.4", - "once_cell", - "thiserror", - "tokio", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", -] +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" @@ -1728,24 +1293,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "const_format" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.32" +name = "const-str" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] +checksum = "3618cccc083bb987a415d85c02ca6c9994ea5b44731ec28b9ecf09658655fba9" [[package]] name = "convert_case" @@ -1787,6 +1338,43 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +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-utils" version = "0.8.20" @@ -1863,54 +1451,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "darling" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.66", -] - -[[package]] -name = "darling_macro" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "data-encoding" version = "2.6.0" @@ -1937,15 +1477,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "dbl" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" -dependencies = [ - "generic-array", -] - [[package]] name = "der" version = "0.7.9" @@ -1978,7 +1509,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", - "serde", ] [[package]] @@ -2026,6 +1556,48 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.4" @@ -2037,12 +1609,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "doctest-file" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" - [[package]] name = "dtoa" version = "1.0.9" @@ -2055,6 +1621,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.16.9" @@ -2129,6 +1701,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -2157,122 +1735,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid 0.8.2", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-signers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand", - "sha2", - "thiserror", - "tracing", -] - [[package]] name = "event-listener" version = "5.3.1" @@ -2294,6 +1756,20 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "events" +version = "0.1.0" + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fastrand" version = "2.1.0" @@ -2345,6 +1821,16 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2532,10 +2018,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -2625,9 +2109,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" @@ -2635,7 +2116,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] @@ -2651,15 +2132,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -2718,25 +2190,13 @@ dependencies = [ "ipconfig", "lru-cache", "once_cell", - "parking_lot", - "rand", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "hidapi-rusb" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdc2ec354929a6e8f3c6b6923a4d97427ec2f764cfee8cd4bfe890946cdf08b" -dependencies = [ - "cc", - "libc", - "pkg-config", - "rusb", + "parking_lot", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", ] [[package]] @@ -2836,6 +2296,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.29" @@ -2873,11 +2339,11 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", "tokio", - "want", ] [[package]] @@ -2891,24 +2357,19 @@ dependencies = [ "hyper 0.14.29", "rustls 0.21.12", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", ] [[package]] -name = "hyper-rustls" -version = "0.26.0" +name = "hyper-timeout" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.3.1", - "hyper-util", - "rustls 0.22.4", - "rustls-pki-types", + "hyper 0.14.29", + "pin-project-lite", "tokio", - "tokio-rustls 0.25.0", - "tower-service", + "tokio-io-timeout", ] [[package]] @@ -2924,22 +2385,6 @@ dependencies = [ "tokio-native-tls", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.3.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.5" @@ -2947,17 +2392,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" dependencies = [ "bytes", - "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", "hyper 1.3.1", "pin-project-lite", - "socket2", "tokio", "tower", "tower-service", - "tracing", ] [[package]] @@ -2983,12 +2425,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.4.0" @@ -3035,7 +2471,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.51.1", ] [[package]] @@ -3066,24 +2502,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3095,6 +2513,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.3" @@ -3103,7 +2527,6 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", ] [[package]] @@ -3114,7 +2537,6 @@ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.5", - "serde", ] [[package]] @@ -3123,25 +2545,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding", "generic-array", ] -[[package]] -name = "interprocess" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2533e1f1a70bec71ea7a85d1c0a4dab141c314035ce76e51a19a2f48be708" -dependencies = [ - "doctest-file", - "futures-core", - "libc", - "recvmsg", - "tokio", - "widestring", - "windows-sys 0.52.0", -] - [[package]] name = "ipconfig" version = "0.3.2" @@ -3151,7 +2557,7 @@ dependencies = [ "socket2", "widestring", "windows-sys 0.48.0", - "winreg 0.50.0", + "winreg", ] [[package]] @@ -3184,6 +2590,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -3199,6 +2614,84 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "jsonrpsee" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a130d27083a4001b7b2d72a19f08786299550f76c9bd5307498dce2c2b20fa" +dependencies = [ + "jsonrpsee-core", + "jsonrpsee-server", + "jsonrpsee-types", + "tokio", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21545a9445fbd582840ff5160a9a3e12b8e6da582151cdb07bde9a1970ba3a24" +dependencies = [ + "anyhow", + "async-trait", + "beef", + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "jsonrpsee-types", + "parking_lot", + "rand", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "810f63eff0f78fa8d413d678c0e55b702e2ea61d4587774c0db4ea2fc554ef92" +dependencies = [ + "anyhow", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project", + "route-recognizer", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f511b714bca46f9a3e97c0e0eb21d2c112e83e444d2db535b5ec7093f5836d73" +dependencies = [ + "beef", + "http 1.1.0", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "k256" version = "0.13.3" @@ -3210,22 +2703,12 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", - "signature", ] [[package]] name = "kad" version = "0.1.0" -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - [[package]] name = "keccak-asm" version = "0.1.1" @@ -3242,12 +2725,28 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +[[package]] +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.5", +] + [[package]] name = "libm" version = "0.2.8" @@ -3384,7 +2883,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "lru 0.12.3", + "lru", "quick-protobuf", "quick-protobuf-codec", "smallvec", @@ -3589,7 +3088,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", - "lru 0.12.3", + "lru", "multistream-select", "once_cell", "rand", @@ -3675,15 +3174,24 @@ dependencies = [ ] [[package]] -name = "libusb1-sys" -version = "0.7.0" +name = "libproc" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da050ade7ac4ff1ba5379af847a10a10a8e284181e060105bf8d86960ce9ce0f" +checksum = "ae9ea4b75e1a81675429dafe43441df1caea70081e82246a8cccf514884a88bb" dependencies = [ - "cc", + "bindgen", + "errno", + "libc", +] + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", "libc", - "pkg-config", - "vcpkg", ] [[package]] @@ -3714,26 +3222,6 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -[[package]] -name = "logging" -version = "0.1.0" -dependencies = [ - "atty", - "clap", - "time", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown 0.12.3", -] - [[package]] name = "lru" version = "0.12.3" @@ -3753,25 +3241,12 @@ dependencies = [ ] [[package]] -name = "manifest" -version = "0.1.0" +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ - "async-recursion", - "async-trait", - "bee_api", - "const_format", - "futures", - "hex", - "lru 0.7.8", - "rand", - "reqwest 0.12.4", - "serde", - "serde_json", - "serde_with", - "test-case", - "thiserror", - "tiny-keccak", - "tokio", + "libc", ] [[package]] @@ -3789,6 +3264,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[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.2" @@ -3796,12 +3277,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] -name = "memoffset" -version = "0.7.1" +name = "metrics" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" dependencies = [ - "autocfg", + "ahash", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d58e362dc7206e9456ddbcdbd53c71ba441020e62104703075a69151e38d85f" +dependencies = [ + "base64 0.22.1", + "indexmap 2.2.6", + "metrics", + "metrics-util", + "quanta", + "thiserror", +] + +[[package]] +name = "metrics-process" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d8f5027620bf43b86e2c8144beea1e4323aec39241f5eae59dee54f79c6a29" +dependencies = [ + "libproc", + "mach2", + "metrics", + "once_cell", + "procfs", + "rlimit", + "windows 0.56.0", +] + +[[package]] +name = "metrics-util" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b07a5eb561b8cbc16be2d216faf7757f9baf3bfb94dbb0fae3df8387a5bb47f" +dependencies = [ + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.14.5", + "indexmap 2.2.6", + "metrics", + "num_cpus", + "ordered-float", + "quanta", + "radix_trie", + "sketches-ddsketch", ] [[package]] @@ -3979,27 +3509,23 @@ dependencies = [ ] [[package]] -name = "nix" -version = "0.24.3" +name = "nibble_vec" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", + "smallvec", ] [[package]] name = "nix" -version = "0.26.4" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", - "pin-utils", ] [[package]] @@ -4069,7 +3595,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", ] @@ -4088,12 +3614,20 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.66", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + [[package]] name = "object" version = "0.35.0" @@ -4124,31 +3658,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.64" @@ -4194,54 +3703,97 @@ dependencies = [ ] [[package]] -name = "outref" -version = "0.5.1" +name = "opentelemetry" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" +checksum = "1b69a91d4893e713e06f724597ad630f1fa76057a5e1026c0ca67054a9032a76" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", +] [[package]] -name = "overload" -version = "0.1.1" +name = "opentelemetry-otlp" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "a94c69209c05319cdf7460c6d4c055ed102be242a0a6245835d7bc42c6ec7f54" +dependencies = [ + "async-trait", + "futures-core", + "http 0.2.12", + "opentelemetry", + "opentelemetry-proto", + "opentelemetry_sdk", + "prost", + "thiserror", + "tokio", + "tonic", +] [[package]] -name = "p256" -version = "0.13.2" +name = "opentelemetry-proto" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +checksum = "984806e6cf27f2b49282e2a05e288f30594f3dbc74eb7a6e99422bc48ed78162" dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2", + "opentelemetry", + "opentelemetry_sdk", + "prost", + "tonic", ] [[package]] -name = "p2p" -version = "0.1.0" +name = "opentelemetry_sdk" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae312d58eaa90a82d2e627fd86e075cf5230b3f11794e2ed74199ebbe572d4fd" dependencies = [ - "alloy", - "anyhow", - "futures", - "handshake", - "libp2p", - "libp2p-stream", - "prost", - "prost-build", - "prost-types", + "async-trait", + "futures-channel", + "futures-executor", + "futures-util", + "glob", + "lazy_static", + "once_cell", + "opentelemetry", + "ordered-float", + "percent-encoding", "rand", - "swarm", + "thiserror", "tokio", - "tracing", - "tracing-subscriber", + "tokio-stream", ] [[package]] -name = "p384" -version = "0.13.0" +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-float" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" +dependencies = [ + "num-traits", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ "ecdsa", "elliptic-curve", @@ -4310,25 +3862,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - [[package]] name = "pem" version = "3.0.4" @@ -4375,16 +3908,6 @@ dependencies = [ "indexmap 2.2.6", ] -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.0", -] - [[package]] name = "pin-project" version = "1.1.5" @@ -4447,7 +3970,7 @@ checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.3.9", + "hermit-abi", "pin-project-lite", "rustix", "tracing", @@ -4478,23 +4001,10 @@ dependencies = [ ] [[package]] -name = "postage" -version = "0.1.0" -dependencies = [ - "bmt", - "chrono", - "ethers-core", - "ethers-signers", - "hex", - "lazy_static", - "once_cell", - "serde", - "serde_json", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", -] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "powerfmt" @@ -4535,9 +4045,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -4547,7 +4054,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit", + "toml_edit 0.21.1", ] [[package]] @@ -4583,6 +4090,32 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "procfs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +dependencies = [ + "bitflags 2.5.0", + "chrono", + "flate2", + "hex", + "lazy_static", + "procfs-core", + "rustix", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.5.0", + "chrono", + "hex", +] + [[package]] name = "prometheus-client" version = "0.22.2" @@ -4679,26 +4212,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protobuf" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65f4a8ec18723a734e5dc09c173e0abf9690432da5340285d536edcb4dac190" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror", -] - -[[package]] -name = "protobuf-support" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6872f4d4f4b98303239a2b5838f5bbbb77b01ffc892d627957f37a22d7cfe69c" -dependencies = [ - "thiserror", -] - [[package]] name = "pseudosettle" version = "0.1.0" @@ -4711,6 +4224,21 @@ version = "0.1.0" name = "pushsync" version = "0.1.0" +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -4801,6 +4329,16 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + [[package]] name = "rand" version = "0.8.5" @@ -4840,6 +4378,35 @@ dependencies = [ "rand_core", ] +[[package]] +name = "raw-cpuid" +version = "11.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "rcgen" version = "0.11.3" @@ -4852,12 +4419,6 @@ dependencies = [ "yasna", ] -[[package]] -name = "recvmsg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" - [[package]] name = "redox_syscall" version = "0.5.1" @@ -4867,6 +4428,17 @@ dependencies = [ "bitflags 2.5.0", ] +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + [[package]] name = "regex" version = "1.10.4" @@ -4899,12 +4471,6 @@ dependencies = [ "regex-syntax 0.8.3", ] -[[package]] -name = "regex-lite" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" - [[package]] name = "regex-syntax" version = "0.6.29" @@ -4929,57 +4495,11 @@ dependencies = [ "futures-core", "futures-util", "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", - "hyper-rustls 0.24.2", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.3.1", - "hyper-rustls 0.26.0", - "hyper-tls 0.6.0", - "hyper-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.29", + "hyper-rustls", + "hyper-tls", "ipnet", "js-sys", "log", @@ -4988,9 +4508,8 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", - "rustls-pemfile 2.1.2", - "rustls-pki-types", + "rustls 0.21.12", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -4998,14 +4517,14 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls 0.25.0", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.2", - "winreg 0.52.0", + "webpki-roots", + "winreg", ] [[package]] @@ -5063,12 +4582,12 @@ dependencies = [ ] [[package]] -name = "ripemd" -version = "0.1.3" +name = "rlimit" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +checksum = "3560f70f30a0f16d11d01ed078a07740fe6b489667abc7c7b029155d9f21c3d8" dependencies = [ - "digest 0.10.7", + "libc", ] [[package]] @@ -5078,21 +4597,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] [[package]] -name = "rlp-derive" -version = "0.1.0" +name = "rolling-file" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +checksum = "8395b4f860856b740f20a296ea2cd4d823e81a2658cf05ef61be22916026a906" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "chrono", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rtnetlink" version = "0.10.1" @@ -5103,7 +4625,7 @@ dependencies = [ "log", "netlink-packet-route", "netlink-proto", - "nix 0.24.3", + "nix", "thiserror", "tokio", ] @@ -5138,16 +4660,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" -[[package]] -name = "rusb" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9f9ff05b63a786553a4c02943b74b34a988448671001e9a27e2f0565cc05a4" -dependencies = [ - "libc", - "libusb1-sys", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -5218,20 +4730,6 @@ dependencies = [ "sct", ] -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-pki-types", - "rustls-webpki 0.102.4", - "subtle", - "zeroize", -] - [[package]] name = "rustls" version = "0.23.9" @@ -5255,16 +4753,6 @@ dependencies = [ "base64 0.21.7", ] -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.7.0" @@ -5327,36 +4815,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - -[[package]] -name = "scale-info" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.3" +name = "scc" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "76ad2bbb0ae5100a07b7a6f2ed7ab5fd0045551a4c507989b7a620046ea3efdc" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "sdd", ] [[package]] @@ -5368,30 +4832,12 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - [[package]] name = "sct" version = "0.7.1" @@ -5402,6 +4848,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sdd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d" + [[package]] name = "sec1" version = "0.7.3" @@ -5416,6 +4868,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" +dependencies = [ + "rand", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" +dependencies = [ + "cc", +] + [[package]] name = "security-framework" version = "2.11.0" @@ -5453,6 +4924,9 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "semver-parser" @@ -5463,12 +4937,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "serde" version = "1.0.203" @@ -5500,6 +4968,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5513,30 +4990,25 @@ dependencies = [ ] [[package]] -name = "serde_with" -version = "3.8.1" +name = "serial_test" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "4b4b487fe2acf240a021cf57c6b2b4903b1e78ca0ecd862a71b71d2a51fed77d" dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.2.6", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros", - "time", + "futures", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", ] [[package]] -name = "serde_with_macros" -version = "3.8.1" +name = "serial_test_derive" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ - "darling", "proc-macro2", "quote", "syn 2.0.66", @@ -5564,16 +5036,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - [[package]] name = "sha3-asm" version = "0.1.1" @@ -5593,6 +5055,21 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shellexpand" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da03fa3b94cc19e3ebfc88c4229c49d8f08cdbd1228870a45f0ffdf84988e14b" +dependencies = [ + "dirs", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -5610,19 +5087,13 @@ checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core", - "signature_derive", ] [[package]] -name = "signature_derive" -version = "2.1.0" +name = "sketches-ddsketch" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0381d1913eeaf4c7bc4094016c9a8de6c1120663afe32a90ff268ad7f80486" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" [[package]] name = "slab" @@ -5666,6 +5137,22 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "soketto" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures", + "http 1.1.0", + "httparse", + "log", + "rand", + "sha1", +] + [[package]] name = "spin" version = "0.5.2" @@ -5736,36 +5223,10 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" name = "swap" version = "0.1.0" -[[package]] -name = "swarm" -version = "0.1.0" -dependencies = [ - "alloy", - "libp2p", - "once_cell", - "thiserror", - "tokio", -] - [[package]] name = "swarm-tools" version = "0.1.0" -[[package]] -name = "swarm-wasm-lib" -version = "0.1.0" -dependencies = [ - "bmt", - "console_error_panic_hook", - "hex", - "js-sys", - "postage", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", -] - [[package]] name = "syn" version = "1.0.109" @@ -5790,9 +5251,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fe08d08d84f2c0a77f1e7c46518789d745c2e87a2721791ed7c3c9bc78df28" +checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" dependencies = [ "paste", "proc-macro2", @@ -5856,26 +5317,46 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "test-case" -version = "2.2.2" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d6cf5a7dffb3f9dceec8e6b8ca528d9bd71d36c9f074defb548ce161f598c0" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" dependencies = [ "test-case-macros", ] [[package]] -name = "test-case-macros" -version = "2.2.2" +name = "test-case-core" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45b7bf6e19353ddd832745c8fcf77a17a93171df7151187f26623f2b75b5b26" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ "cfg-if", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.66", +] + +[[package]] +name = "test-case-macros" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "test-case-core", ] [[package]] @@ -5925,7 +5406,9 @@ checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "libc", "num-conv", + "num_threads", "powerfmt", "serde", "time-core", @@ -5991,6 +5474,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.3.0" @@ -6022,17 +5515,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.15" @@ -6045,21 +5527,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls 0.21.12", - "tokio", - "tokio-rustls 0.24.1", - "tungstenite", - "webpki-roots 0.25.4", -] - [[package]] name = "tokio-util" version = "0.7.11" @@ -6068,26 +5535,82 @@ checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "pin-project-lite", "tokio", ] +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.14", +] + [[package]] name = "toml_datetime" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.13", +] [[package]] -name = "toml_edit" -version = "0.21.1" +name = "tonic" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", + "async-stream", + "async-trait", + "axum", + "base64 0.21.7", + "bytes", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.29", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", ] [[package]] @@ -6098,9 +5621,13 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "indexmap 1.9.3", "pin-project", "pin-project-lite", + "rand", + "slab", "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -6130,6 +5657,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.27" @@ -6151,6 +5690,33 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-file" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0915d9bd7c03b85adcdc270dad2f5668e7e708e87e97f1b264c2b00926a0cfa6" + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-journald" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba316a74e8fc3c3896a850dba2375928a9fa171b085ecddfc7c054d39970f3fd" +dependencies = [ + "libc", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -6162,6 +5728,36 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-logfmt" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22b8e455f6caa5212a102ec530bf86b8dc5a4c536299bffd84b238fed9119be7" +dependencies = [ + "time", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f68803492bf28ab40aeccaecc7021096bd256baf7ca77c3d425d89b35a7be4e4" +dependencies = [ + "js-sys", + "once_cell", + "opentelemetry", + "opentelemetry_sdk", + "smallvec", + "tracing", + "tracing-core", + "tracing-log", + "tracing-subscriber", + "web-time", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -6205,20 +5801,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "trezor-client" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f62c95b37f6c769bd65a0d0beb8b2b003e72998003b896a616a6777c645c05ed" -dependencies = [ - "byteorder", - "hex", - "protobuf", - "rusb", - "thiserror", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -6226,23 +5808,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "tungstenite" -version = "0.20.1" +name = "trybuild" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "33a5f13f11071020bb12de7a16b925d2d58636175c20c11dc5f96cb64bb6c9b3" dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand", - "rustls 0.21.12", - "sha1", - "thiserror", - "url", - "utf-8", + "glob", + "serde", + "serde_derive", + "serde_json", + "termcolor", + "toml", ] [[package]] @@ -6296,12 +5872,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "universal-hash" version = "0.5.1" @@ -6347,37 +5917,12 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "uuid" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" -dependencies = [ - "serde", -] - [[package]] name = "valuable" version = "0.1.0" @@ -6390,6 +5935,20 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "vergen" +version = "8.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +dependencies = [ + "anyhow", + "cargo_metadata", + "cfg-if", + "regex", + "rustversion", + "time", +] + [[package]] name = "version_check" version = "0.9.4" @@ -6402,12 +5961,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "vsimd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" - [[package]] name = "wait-timeout" version = "0.2.0" @@ -6498,40 +6051,15 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" -[[package]] -name = "wasm-bindgen-test" -version = "0.3.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" -dependencies = [ - "console_error_panic_hook", - "js-sys", - "scoped-tls", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "wasm-playground" version = "0.1.0" dependencies = [ - "bmt", + "alloy-primitives", + "alloy-signer-wallet", + "beers-primitives", "console_error_panic_hook", - "ethers-signers", "hex", - "postage", "rand", "serde", "serde_json", @@ -6569,15 +6097,6 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" -[[package]] -name = "webpki-roots" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "widestring" version = "1.1.0" @@ -6600,6 +6119,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -6616,6 +6144,16 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.5", +] + [[package]] name = "windows-core" version = "0.51.1" @@ -6634,6 +6172,49 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -6801,35 +6382,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.0", - "send_wrapper", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wyz" version = "0.5.1" @@ -6923,37 +6475,6 @@ dependencies = [ "time", ] -[[package]] -name = "yubihsm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467a4c054be41ff657a6823246b0194cd727fadc3c539b265d7bc125ac6d4884" -dependencies = [ - "aes", - "bitflags 2.5.0", - "cbc", - "cmac", - "ecdsa", - "ed25519", - "hmac", - "k256", - "log", - "p256", - "p384", - "pbkdf2 0.12.2", - "rand_core", - "rusb", - "serde", - "serde_json", - "sha2", - "signature", - "subtle", - "thiserror", - "time", - "uuid 1.8.0", - "zeroize", -] - [[package]] name = "zerocopy" version = "0.7.34" diff --git a/Cargo.toml b/Cargo.toml index 0cc0bc3..7fb9c84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,45 @@ +[workspace.package] +version = "0.1.0" +edition = "2021" +rust-version = "1.80" +license = "AGPL-3.0" +homepage = "https://rndlabs.github.io/bee-rs" +repository = "https://github.com/rndlabs/bee-rs" +exclude = ["./github/"] + +[workspace.lints] + [workspace] members = [ - "crates/bmt", - "crates/manifest", - "crates/postage", - "crates/logging", + # "crates/manifest", + # "crates/postage", # "bin/waku-swarm-relay", "bin/swarm-tools", - "bin/bee-rs", + "bin/beers", "bin/wasm-playground", - "bin/swarm-wasm-lib", "crates/p2p", "crates/swarm", "crates/protocols/handshake", "crates/protocols/pushsync", "crates/protocols/pullsync", "crates/protocols/cursors", "crates/protocols/kad", "crates/protocols/pseudosettle", "crates/protocols/retrieval", "crates/protocols/swap", "crates/protocols/status", + # "bin/swarm-wasm-lib", + "crates/net/p2p", + "crates/net/protocols/handshake", + "crates/net/protocols/pushsync", + "crates/net/protocols/pullsync", + "crates/net/protocols/cursors", + "crates/net/protocols/kad", + "crates/net/protocols/pseudosettle", + "crates/net/protocols/retrieval", + "crates/net/protocols/swap", + "crates/net/protocols/status", + "crates/tracing", + "crates/node-core", + "crates/cli", + "crates/tasks", + "crates/metrics", + "crates/node/builder", + "crates/node/api", + "crates/node/events", + "crates/primitives", ] default-members = [ - "bin/bee-rs", + "bin/beers", # "bin/waku-swarm-relay", ] @@ -19,12 +47,6 @@ default-members = [ # https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html resolver = "2" -[workspace.package] -version = "0.1.0" -edition = "2021" -homepage = "https://rndlabs.github.io/bee-rs" -repository = "https://github.com/rndlabs/bee-rs" - # Like release, but with full debug symbols. Use for e.g. `perf`. [profile.debug-fast] inherits = "release" @@ -37,24 +59,32 @@ codegen-units = 1 incremental = false [workspace.dependencies] +# beers +beers-cli-runner = { path = "crates/cli" } +beers-node-core = { path = "crates/node-core" } +beers-primitives = { path = "crates/primitives" } +beers-tasks = { path = "crates/tasks"} +beers-tracing = { path = "crates/tracing" } +beers-metrics = { path = "crates/metrics" } +beers-metrics-derive = { path = "crates/metrics/metrics-derive" } +beers-p2p = { path = "crates/net/p2p"} + ## crypto tiny-keccak = { version = "2.0.2", features = ["keccak"] } -## eth -ethers-core = { version = "2.0.14", default-features = false } -ethers-providers = { version = "2.0.14", default-features = false } -ethers-signers = { version = "2.0.14", default-features = false } -ethers-middleware = { version = "2.0.14", default-features = false } -ethers-contract = { version = "2.0.14", default-features = false } - ## misc tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter", "ansi", "fmt", "std", "json", "time"] } +tracing-appender = "0.2" +eyre = "0.6" thiserror = "1.0.61" serde_json = "1.0.117" serde = { version = "1.0.203", features = ["derive"] } rand = "0.8.5" hex = "0.4.3" +humantime = "2.1" +humantime-serde = "1.1" + ## tokio tokio-stream = "0.1.15" @@ -64,6 +94,10 @@ tokio-util = { version = "0.7.11", features = ["codec"] } ## async async-trait = "0.1.80" futures = "0.3.30" +pin-project = "1.0.12" +futures-util = "0.3.30" +tower = "0.4" +tower-http = "0.5" ## wasm wasm-bindgen = "0.2.92" @@ -90,32 +124,9 @@ prost = "0.12.6" prost-types = "0.12.6" ## alloy -alloy = { git = "https://github.com/alloy-rs/alloy", rev = "f6ebef2", features = [ - "consensus", - "contract", - "eips", - "kzg", - "network", - "node-bindings", - "provider-http", - "provider-ipc", - "provider-ws", - "providers", - "rpc-client-ipc", - "rpc-client-ws", - "rpc-client", - "rpc-types-eth", - "rpc-types-trace", - "rpc-types", - "signer-aws", - "signer-keystore", - "signer-ledger", - "signer-mnemonic", - "signer-trezor", - "signer-wallet", - "signer-yubihsm", - "signers", -] } +alloy-primitives = "0.7.6" +alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } +alloy-signer-wallet = { git = "https://github.com/alloy-rs/alloy", rev = "00d81d7", default-features = false } clap = { version = "4.5.6", features = ["derive", "env"] } chrono = "0.4.38" @@ -125,3 +136,36 @@ reqwest = { version = "0.12.4", features = ["json", "rustls-tls"] } async-recursion = "1.1.1" anyhow = "1.0.86" once_cell = "1.19.0" +syn = "2.0" +dyn-clone = "1.0.17" +rayon = "1.7" + +# metrics +metrics = "0.22.0" +metrics-exporter-prometheus = { version = "0.14.0", default-features = false } +metrics-util = "0.16.0" +metrics-process = "2.0.0" + +# proc-macros +proc-macro2 = "1.0" +quote = "1.0" + +# misc-testing +proptest = "1.4" +proptest-derive = "0.4" +serial_test = "3" + +# rpc +jsonrpsee = "0.23" +jsonrpsee-core = "0.23" +jsonrpsee-types = "0.23" +jsonrpsee-http-client = "0.23" + +# http +http = "1.0" + +# crypto +secp256k1 = { version = "0.28", default-features = false, features = [ + "global-context", + "recovery", +] } diff --git a/bin/bee-rs/Cargo.toml b/bin/bee-rs/Cargo.toml deleted file mode 100644 index b0b4e02..0000000 --- a/bin/bee-rs/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "bee-rs" -version.workspace = true -edition.workspace = true -homepage.workspace = true -repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -alloy-primitives = "0.7.5" diff --git a/bin/bee-rs/src/main.rs b/bin/bee-rs/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/bin/bee-rs/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/bin/beers/Cargo.toml b/bin/beers/Cargo.toml new file mode 100644 index 0000000..74d95fe --- /dev/null +++ b/bin/beers/Cargo.toml @@ -0,0 +1,43 @@ +[package] +name = "beers" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +description = "A rusty bee node implementation" +default-run = "beers" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +## beers +beers-cli-runner = { workspace = true } +beers-node-core = { workspace = true } +beers-tasks = { workspace = true } +beers-tracing = { workspace = true } +beers-p2p = { workspace = true } + +# tracing +tracing.workspace = true + +# metrics +metrics-process.workspace = true + +# async +tokio = { workspace = true, features = [ + "sync", + "macros", + "time", + "rt-multi-thread", +] } +futures.workspace = true + +# misc +eyre.workspace = true +clap = { workspace = true, features = ["derive", "env"] } +rayon.workspace = true + +[target.'cfg(unix)'.dependencies] +libc = "0.2" diff --git a/bin/beers/src/cli/mod.rs b/bin/beers/src/cli/mod.rs new file mode 100644 index 0000000..33f4632 --- /dev/null +++ b/bin/beers/src/cli/mod.rs @@ -0,0 +1,296 @@ +//! CLI definition and entrypoint to executable + +use crate::{ + args::{ + // utils::{chain_help, genesis_value_parser, SUPPORTED_CHAINS}, + LogArgs, + }, + commands::{ + // config_cmd, db, debug_cmd, dump_genesis, import, init_cmd, init_state, + node, + // p2p, recover, stage, test_vectors, + }, + version::{LONG_VERSION, SHORT_VERSION}, +}; +use clap::{value_parser, Parser, Subcommand}; +use beers_cli_runner::CliRunner; +// use reth_db::DatabaseEnv; +// use reth_node_builder::{NodeBuilder, WithLaunchContext}; +// use reth_primitives::ChainSpec; +use beers_tracing::FileWorkerGuard; +use std::{ffi::OsString, fmt, future::Future, sync::Arc}; +use tracing::info; + +/// Re-export of the `reth_node_core` types specifically in the `cli` module. +/// +/// This is re-exported because the types in `reth_node_core::cli` originally existed in +/// `reth::cli` but were moved to the `reth_node_core` crate. This re-export avoids a breaking +/// change. +pub use crate::core::cli::*; + +/// The main reth cli interface. +/// +/// This is the entrypoint to the executable. +#[derive(Debug, Parser)] +#[command(author, version = SHORT_VERSION, long_version = LONG_VERSION, about = "Beers", long_about = None)] +pub struct Cli { + /// The command to run + #[command(subcommand)] + command: Commands, + + /// The chain this node is running. + /// + /// Possible values are either a built-in chain or the path to a chain specification file. + // #[arg( + // long, + // value_name = "CHAIN_OR_PATH", + // long_help = chain_help(), + // default_value = SUPPORTED_CHAINS[0], + // value_parser = genesis_value_parser, + // global = true, + // )] + // chain: Arc, + + /// Add a new instance of a node. + /// + /// Configures the ports of the node to avoid conflicts with the defaults. + /// This is useful for running multiple nodes on the same machine. + /// + /// Max number of instances is 200. It is chosen in a way so that it's not possible to have + /// port numbers that conflict with each other. + /// + /// Changes to the following port numbers: + /// - `DISCOVERY_PORT`: default + `instance` - 1 + /// - `AUTH_PORT`: default + `instance` * 100 - 100 + /// - `HTTP_RPC_PORT`: default - `instance` + 1 + /// - `WS_RPC_PORT`: default + `instance` * 2 - 2 + // #[arg(long, value_name = "INSTANCE", global = true, default_value_t = 1, value_parser = value_parser!(u16).range(..=200))] + // instance: u16, + + #[command(flatten)] + logs: LogArgs, +} + +impl Cli { + /// Parsers only the default CLI arguments + pub fn parse_args() -> Self { + Self::parse() + } + + /// Parsers only the default CLI arguments from the given iterator + pub fn try_parse_args_from(itr: I) -> Result + where + I: IntoIterator, + T: Into + Clone, + { + Self::try_parse_from(itr) + } + + /// Execute the configured cli command. + /// + /// This accepts a closure that is used to launch the node via the + /// [`NodeCommand`](node::NodeCommand). + /// + /// + /// # Example + /// + /// ```no_run + /// use reth::cli::Cli; + /// use reth_node_ethereum::EthereumNode; + /// + /// Cli::parse_args() + /// .run(|builder, _| async move { + /// let handle = builder.launch_node(EthereumNode::default()).await?; + /// + /// handle.wait_for_node_exit().await + /// }) + /// .unwrap(); + /// ``` + /// + /// # Example + /// + /// Parse additional CLI arguments for the node command and use it to configure the node. + /// + /// ```no_run + /// use clap::Parser; + /// use reth::cli::Cli; + /// + /// #[derive(Debug, Parser)] + /// pub struct MyArgs { + /// pub enable: bool, + /// } + /// + /// Cli::parse() + /// .run(|builder, my_args: MyArgs| async move { + /// // launch the node + /// + /// Ok(()) + /// }) + /// .unwrap(); + /// ```` + // pub fn run(mut self, launcher: L) -> eyre::Result<()> + pub fn run(self) -> eyre::Result<()> + where + { + // add network name to logs dir + // self.logs.log_file_directory = "beers/logs/".to_string(); + // self.logs.log_file_directory.join(self.chain.chain.to_string()); + + let _guard = self.init_tracing()?; + info!(target: "beers::cli", "Initialized tracing, debug log directory: {}", "beers/logs/".to_string()); + + let runner = CliRunner::default(); + match self.command { + Commands::Node(command) => { + // runner.run_command_until_exit(|ctx| command.execute(ctx, launcher)) + return Result::Ok(()); + } + // Commands::Init(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // Commands::InitState(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // Commands::Import(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // #[cfg(feature = "optimism")] + // Commands::ImportOp(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // #[cfg(feature = "optimism")] + // Commands::ImportReceiptsOp(command) => { + // runner.run_blocking_until_ctrl_c(command.execute()) + // } + // Commands::DumpGenesis(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // Commands::Db(command) => runner.run_blocking_until_ctrl_c(command.execute()), + // Commands::Stage(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)), + // Commands::P2P(command) => runner.run_until_ctrl_c(command.execute()), + // Commands::TestVectors(command) => runner.run_until_ctrl_c(command.execute()), + // Commands::Config(command) => runner.run_until_ctrl_c(command.execute()), + // Commands::Debug(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)), + // Commands::Recover(command) => runner.run_command_until_exit(|ctx| command.execute(ctx)), + } + } + + /// Initializes tracing with the configured options. + /// + /// If file logging is enabled, this function returns a guard that must be kept alive to ensure + /// that all logs are flushed to disk. + pub fn init_tracing(&self) -> eyre::Result> { + let guard = self.logs.init_tracing()?; + Ok(guard) + } +} + +/// Commands to be executed +#[derive(Debug, Subcommand)] +pub enum Commands { + /// Start the node + #[command(name = "node")] + Node(node::NodeCommand), + // /// Initialize the database from a genesis file. + // #[command(name = "init")] + // Init(init_cmd::InitCommand), + // /// Initialize the database from a state dump file. + // #[command(name = "init-state")] + // InitState(init_state::InitStateCommand), + // /// This syncs RLP encoded blocks from a file. + // #[command(name = "import")] + // Import(import::ImportCommand), + // /// This syncs RLP encoded OP blocks below Bedrock from a file, without executing. + // #[cfg(feature = "optimism")] + // #[command(name = "import-op")] + // ImportOp(crate::commands::import_op::ImportOpCommand), + // /// This imports RLP encoded receipts from a file. + // #[cfg(feature = "optimism")] + // #[command(name = "import-receipts-op")] + // ImportReceiptsOp(crate::commands::import_receipts_op::ImportReceiptsOpCommand), + // /// Dumps genesis block JSON configuration to stdout. + // DumpGenesis(dump_genesis::DumpGenesisCommand), + // /// Database debugging utilities + // #[command(name = "db")] + // Db(db::Command), + // /// Manipulate individual stages. + // #[command(name = "stage")] + // Stage(stage::Command), + // /// P2P Debugging utilities + // #[command(name = "p2p")] + // P2P(p2p::Command), + // /// Generate Test Vectors + // #[command(name = "test-vectors")] + // TestVectors(test_vectors::Command), + // /// Write config to stdout + // #[command(name = "config")] + // Config(config_cmd::Command), + // /// Various debug routines + // #[command(name = "debug")] + // Debug(debug_cmd::Command), + // /// Scripts for node recovery + // #[command(name = "recover")] + // Recover(recover::Command), +} + +// #[cfg(test)] +// mod tests { +// use super::*; +// use crate::args::ColorMode; +// use clap::CommandFactory; + +// #[test] +// fn parse_color_mode() { +// let reth = Cli::try_parse_args_from(["reth", "node", "--color", "always"]).unwrap(); +// assert_eq!(reth.logs.color, ColorMode::Always); +// } + +// /// Tests that the help message is parsed correctly. This ensures that clap args are configured +// /// correctly and no conflicts are introduced via attributes that would result in a panic at +// /// runtime +// #[test] +// fn test_parse_help_all_subcommands() { +// let reth = Cli::::command(); +// for sub_command in reth.get_subcommands() { +// let err = Cli::try_parse_args_from(["reth", sub_command.get_name(), "--help"]) +// .err() +// .unwrap_or_else(|| { +// panic!("Failed to parse help message {}", sub_command.get_name()) +// }); + +// // --help is treated as error, but +// // > Not a true "error" as it means --help or similar was used. The help message will be sent to stdout. +// assert_eq!(err.kind(), clap::error::ErrorKind::DisplayHelp); +// } +// } + +// /// Tests that the log directory is parsed correctly. It's always tied to the specific chain's +// /// name +// #[test] +// fn parse_logs_path() { +// let mut reth = Cli::try_parse_args_from(["reth", "node"]).unwrap(); +// reth.logs.log_file_directory = +// reth.logs.log_file_directory.join(reth.chain.chain.to_string()); +// let log_dir = reth.logs.log_file_directory; +// let end = format!("reth/logs/{}", SUPPORTED_CHAINS[0]); +// assert!(log_dir.as_ref().ends_with(end), "{log_dir:?}"); + +// let mut iter = SUPPORTED_CHAINS.iter(); +// iter.next(); +// for chain in iter { +// let mut reth = Cli::try_parse_args_from(["reth", "node", "--chain", chain]).unwrap(); +// reth.logs.log_file_directory = +// reth.logs.log_file_directory.join(reth.chain.chain.to_string()); +// let log_dir = reth.logs.log_file_directory; +// let end = format!("reth/logs/{chain}"); +// assert!(log_dir.as_ref().ends_with(end), "{log_dir:?}"); +// } +// } + +// #[test] +// fn parse_env_filter_directives() { +// let temp_dir = tempfile::tempdir().unwrap(); + +// std::env::set_var("RUST_LOG", "info,evm=debug"); +// let reth = Cli::try_parse_args_from([ +// "reth", +// "init", +// "--datadir", +// temp_dir.path().to_str().unwrap(), +// "--log.file.filter", +// "debug,net=trace", +// ]) +// .unwrap(); +// assert!(reth.run(|_, _| async move { Ok(()) }).is_ok()); +// } +// } diff --git a/bin/beers/src/commands/mod.rs b/bin/beers/src/commands/mod.rs new file mode 100644 index 0000000..ebeb243 --- /dev/null +++ b/bin/beers/src/commands/mod.rs @@ -0,0 +1,3 @@ +//! This contains all of the `beers` commands + +pub mod node; \ No newline at end of file diff --git a/bin/beers/src/commands/node/mod.rs b/bin/beers/src/commands/node/mod.rs new file mode 100644 index 0000000..ded491a --- /dev/null +++ b/bin/beers/src/commands/node/mod.rs @@ -0,0 +1,367 @@ +//! Main node command for launching a node + +use crate::args::{DatadirArgs, utils::parse_socket_address}; + // DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, NetworkArgs, PayloadBuilderArgs, PruningArgs, + // RpcServerArgs, TxPoolArgs, +// }; +use clap::{value_parser, Args, Parser}; +use beers_cli_runner::CliContext; +// use reth_db::{init_db, DatabaseEnv}; +// use reth_node_builder::{NodeBuilder, WithLaunchContext}; +use beers_node_core::{node_config::NodeConfig, version}; +// use reth_primitives::ChainSpec; +use std::{ffi::OsString, fmt, future::Future, net::SocketAddr, path::PathBuf, sync::Arc}; + +/// Start the node +#[derive(Debug, Parser)] +pub struct NodeCommand { + /// The path to the configuration file to use. + #[arg(long, value_name = "FILE", verbatim_doc_comment)] + pub config: Option, + + // /// The chain this node is running. + // /// + // /// Possible values are either a built-in chain or the path to a chain specification file. + // #[arg( + // long, + // value_name = "CHAIN_OR_PATH", + // long_help = chain_help(), + // default_value = SUPPORTED_CHAINS[0], + // default_value_if("dev", "true", "dev"), + // value_parser = genesis_value_parser, + // required = false, + // )] + // pub chain: Arc, + + /// Enable Prometheus metrics. + /// + /// The metrics will be served at the given interface and port. + #[arg(long, value_name = "SOCKET", value_parser = parse_socket_address, help_heading = "Metrics")] + pub metrics: Option, + + // Add a new instance of a node. + // + // Configures the ports of the node to avoid conflicts with the defaults. + // This is useful for running multiple nodes on the same machine. + // + // Max number of instances is 200. It is chosen in a way so that it's not possible to have + // port numbers that conflict with each other. + // + // Changes to the following port numbers: + // - `DISCOVERY_PORT`: default + `instance` - 1 + // - `AUTH_PORT`: default + `instance` * 100 - 100 + // - `HTTP_RPC_PORT`: default - `instance` + 1 + // - `WS_RPC_PORT`: default + `instance` * 2 - 2 + // #[arg(long, value_name = "INSTANCE", global = true, default_value_t = 1, value_parser = value_parser!(u16).range(..=200))] + // pub instance: u16, + + // Sets all ports to unused, allowing the OS to choose random unused ports when sockets are + // bound. + // Mutually exclusive with `--instance`. + // #[arg(long, conflicts_with = "instance", global = true)] + // pub with_unused_ports: bool, + + /// All datadir related arguments + #[command(flatten)] + pub datadir: DatadirArgs, + + // /// All networking related arguments + // #[command(flatten)] + // pub network: NetworkArgs, + + // /// All rpc related arguments + // #[command(flatten)] + // pub rpc: RpcServerArgs, + + // /// All txpool related arguments with --txpool prefix + // #[command(flatten)] + // pub txpool: TxPoolArgs, + + // /// All payload builder related arguments + // #[command(flatten)] + // pub builder: PayloadBuilderArgs, + + // /// All debug related arguments with --debug prefix + // #[command(flatten)] + // pub debug: DebugArgs, + + // /// All database related arguments + // #[command(flatten)] + // pub db: DatabaseArgs, + + // /// All dev related arguments with --dev prefix + // #[command(flatten)] + // pub dev: DevArgs, + + // /// All pruning related arguments + // #[command(flatten)] + // pub pruning: PruningArgs, + + // /// Additional cli arguments + // #[command(flatten, next_help_heading = "Extension")] + // pub ext: Ext, +} + +impl NodeCommand { + /// Parsers only the default CLI arguments + pub fn parse_args() -> Self { + Self::parse() + } + + /// Parsers only the default [`NodeCommand`] arguments from the given iterator + pub fn try_parse_args_from(itr: I) -> Result + where + I: IntoIterator, + T: Into + Clone, + { + Self::try_parse_from(itr) + } + + /// Launches the node + /// + /// This transforms the node command into a node config and launches the node using the given + /// closure. + pub async fn execute(self, ctx: CliContext, launcher: L) -> eyre::Result<()> + where + // L: FnOnce(WithLaunchContext>>) -> Fut, + L: FnOnce() -> Fut + Future>, + Fut: Future>, + { + tracing::info!(target: "reth::cli", version = ?version::SHORT_VERSION, "Starting reth"); + + // let Self { + // datadir, + // config, + // chain, + // metrics, + // instance, + // with_unused_ports, + // network, + // rpc, + // txpool, + // builder, + // debug, + // db, + // dev, + // pruning, + // ext, + // } = self; + + // // set up node config + let mut node_config = NodeConfig {}; + + // Register the prometheus recorder before creating the database, + // because database init needs it to register metrics. + let _ = node_config.install_prometheus_recorder()?; + + // let data_dir = node_config.datadir(); + // let db_path = data_dir.db(); + + // tracing::info!(target: "beers::cli", path = ?db_path, "Opening database"); + // let database = Arc::new(init_db(db_path.clone(), self.db.database_args())?.with_metrics()); + + // if with_unused_ports { + // node_config = node_config.with_unused_ports(); + // } + + // let builder = NodeBuilder::new(node_config) + // .with_database(database) + // .with_launch_context(ctx.task_executor); + + // launcher(builder).await + launcher.await + } +} + +#[cfg(test)] +mod tests { + // use super::*; + // use reth_discv4::DEFAULT_DISCOVERY_PORT; + // use std::{ + // net::{IpAddr, Ipv4Addr}, + // path::Path, + // }; + + // #[test] + // fn parse_help_node_command() { + // let err = NodeCommand::try_parse_args_from(["reth", "--help"]).unwrap_err(); + // assert_eq!(err.kind(), clap::error::ErrorKind::DisplayHelp); + // } + + // #[test] + // fn parse_common_node_command_chain_args() { + // for chain in SUPPORTED_CHAINS { + // let args: NodeCommand = NodeCommand::::parse_from(["reth", "--chain", chain]); + // assert_eq!(args.chain.chain, chain.parse::().unwrap()); + // } + // } + + // #[test] + // fn parse_discovery_addr() { + // let cmd = + // NodeCommand::try_parse_args_from(["reth", "--discovery.addr", "127.0.0.1"]).unwrap(); + // assert_eq!(cmd.network.discovery.addr, IpAddr::V4(Ipv4Addr::LOCALHOST)); + // } + + // #[test] + // fn parse_addr() { + // let cmd = NodeCommand::try_parse_args_from([ + // "reth", + // "--discovery.addr", + // "127.0.0.1", + // "--addr", + // "127.0.0.1", + // ]) + // .unwrap(); + // assert_eq!(cmd.network.discovery.addr, IpAddr::V4(Ipv4Addr::LOCALHOST)); + // assert_eq!(cmd.network.addr, IpAddr::V4(Ipv4Addr::LOCALHOST)); + // } + + // #[test] + // fn parse_discovery_port() { + // let cmd = NodeCommand::try_parse_args_from(["reth", "--discovery.port", "300"]).unwrap(); + // assert_eq!(cmd.network.discovery.port, 300); + // } + + // #[test] + // fn parse_port() { + // let cmd = + // NodeCommand::try_parse_args_from(["reth", "--discovery.port", "300", "--port", "99"]) + // .unwrap(); + // assert_eq!(cmd.network.discovery.port, 300); + // assert_eq!(cmd.network.port, 99); + // } + + // #[test] + // fn parse_metrics_port() { + // let cmd = NodeCommand::try_parse_args_from(["reth", "--metrics", "9001"]).unwrap(); + // assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001))); + + // let cmd = NodeCommand::try_parse_args_from(["reth", "--metrics", ":9001"]).unwrap(); + // assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001))); + + // let cmd = + // NodeCommand::try_parse_args_from(["reth", "--metrics", "localhost:9001"]).unwrap(); + // assert_eq!(cmd.metrics, Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 9001))); + // } + + // #[test] + // fn parse_config_path() { + // let cmd = + // NodeCommand::try_parse_args_from(["reth", "--config", "my/path/to/reth.toml"]).unwrap(); + // // always store reth.toml in the data dir, not the chain specific data dir + // let data_dir = cmd.datadir.resolve_datadir(cmd.chain.chain); + // let config_path = cmd.config.unwrap_or_else(|| data_dir.config()); + // assert_eq!(config_path, Path::new("my/path/to/reth.toml")); + + // let cmd = NodeCommand::try_parse_args_from(["reth"]).unwrap(); + + // // always store reth.toml in the data dir, not the chain specific data dir + // let data_dir = cmd.datadir.resolve_datadir(cmd.chain.chain); + // let config_path = cmd.config.clone().unwrap_or_else(|| data_dir.config()); + // let end = format!("{}/reth.toml", SUPPORTED_CHAINS[0]); + // assert!(config_path.ends_with(end), "{:?}", cmd.config); + // } + + // #[test] + // fn parse_db_path() { + // let cmd = NodeCommand::try_parse_args_from(["reth"]).unwrap(); + // let data_dir = cmd.datadir.resolve_datadir(cmd.chain.chain); + + // let db_path = data_dir.db(); + // let end = format!("reth/{}/db", SUPPORTED_CHAINS[0]); + // assert!(db_path.ends_with(end), "{:?}", cmd.config); + + // let cmd = + // NodeCommand::try_parse_args_from(["reth", "--datadir", "my/custom/path"]).unwrap(); + // let data_dir = cmd.datadir.resolve_datadir(cmd.chain.chain); + + // let db_path = data_dir.db(); + // assert_eq!(db_path, Path::new("my/custom/path/db")); + // } + + // #[test] + // #[cfg(not(feature = "optimism"))] // dev mode not yet supported in op-reth + // fn parse_dev() { + // let cmd = NodeCommand::::parse_from(["reth", "--dev"]); + // let chain = reth_primitives::DEV.clone(); + // assert_eq!(cmd.chain.chain, chain.chain); + // assert_eq!(cmd.chain.genesis_hash, chain.genesis_hash); + // assert_eq!( + // cmd.chain.paris_block_and_final_difficulty, + // chain.paris_block_and_final_difficulty + // ); + // assert_eq!(cmd.chain.hardforks, chain.hardforks); + + // assert!(cmd.rpc.http); + // assert!(cmd.network.discovery.disable_discovery); + + // assert!(cmd.dev.dev); + // } + + // #[test] + // fn parse_instance() { + // let mut cmd = NodeCommand::::parse_from(["reth"]); + // cmd.rpc.adjust_instance_ports(cmd.instance); + // cmd.network.port = DEFAULT_DISCOVERY_PORT + cmd.instance - 1; + // // check rpc port numbers + // assert_eq!(cmd.rpc.auth_port, 8551); + // assert_eq!(cmd.rpc.http_port, 8545); + // assert_eq!(cmd.rpc.ws_port, 8546); + // // check network listening port number + // assert_eq!(cmd.network.port, 30303); + + // let mut cmd = NodeCommand::::parse_from(["reth", "--instance", "2"]); + // cmd.rpc.adjust_instance_ports(cmd.instance); + // cmd.network.port = DEFAULT_DISCOVERY_PORT + cmd.instance - 1; + // // check rpc port numbers + // assert_eq!(cmd.rpc.auth_port, 8651); + // assert_eq!(cmd.rpc.http_port, 8544); + // assert_eq!(cmd.rpc.ws_port, 8548); + // // check network listening port number + // assert_eq!(cmd.network.port, 30304); + + // let mut cmd = NodeCommand::::parse_from(["reth", "--instance", "3"]); + // cmd.rpc.adjust_instance_ports(cmd.instance); + // cmd.network.port = DEFAULT_DISCOVERY_PORT + cmd.instance - 1; + // // check rpc port numbers + // assert_eq!(cmd.rpc.auth_port, 8751); + // assert_eq!(cmd.rpc.http_port, 8543); + // assert_eq!(cmd.rpc.ws_port, 8550); + // // check network listening port number + // assert_eq!(cmd.network.port, 30305); + // } + + // #[test] + // fn parse_with_unused_ports() { + // let cmd = NodeCommand::::parse_from(["reth", "--with-unused-ports"]); + // assert!(cmd.with_unused_ports); + // } + + // #[test] + // fn with_unused_ports_conflicts_with_instance() { + // let err = + // NodeCommand::try_parse_args_from(["reth", "--with-unused-ports", "--instance", "2"]) + // .unwrap_err(); + // assert_eq!(err.kind(), clap::error::ErrorKind::ArgumentConflict); + // } + + // #[test] + // fn with_unused_ports_check_zero() { + // let mut cmd = NodeCommand::::parse_from(["reth"]); + // cmd.rpc = cmd.rpc.with_unused_ports(); + // cmd.network = cmd.network.with_unused_ports(); + + // // make sure the rpc ports are zero + // assert_eq!(cmd.rpc.auth_port, 0); + // assert_eq!(cmd.rpc.http_port, 0); + // assert_eq!(cmd.rpc.ws_port, 0); + + // // make sure the network ports are zero + // assert_eq!(cmd.network.port, 0); + // assert_eq!(cmd.network.discovery.port, 0); + + // // make sure the ipc path is not the default + // assert_ne!(cmd.rpc.ipcpath, String::from("/tmp/reth.ipc")); + // } +} diff --git a/bin/beers/src/lib.rs b/bin/beers/src/lib.rs new file mode 100644 index 0000000..2f3c700 --- /dev/null +++ b/bin/beers/src/lib.rs @@ -0,0 +1,49 @@ +pub mod cli; +pub mod commands; + +/// Re-exported from `beers_node_core`. +pub mod core { + pub use beers_node_core::*; +} + +/// Re-exported from `beers_node_core`. +pub mod prometheus_exporter { + pub use beers_node_core::prometheus_exporter::*; +} + +/// Re-export of the `beers_node_core` types specifically in the `args` module. +pub mod args { + pub use beers_node_core::args::*; +} + +/// Re-exported from `beers_node_core`. +pub mod version { + pub use beers_node_core::version::*; +} + +// Re-exported from `beers_node_builder` +// pub mod builder { +// pub use beers_node_builder::*; +// } + + +/// Re-exported from `reth_tasks`. +pub mod tasks { + pub use beers_tasks::*; +} + +// re-export for convenience +#[doc(inline)] +pub use beers_cli_runner::{tokio_runtime, CliContext, CliRunner}; + +#[cfg(all(unix, any(target_env = "gnu", target_os = "macos")))] +pub mod sigsegv_handler; + +/// Signal handler to extract a backtrace from stack overflow. +/// +/// This is a no-op because this platform doesn't support our signal handler's requirements. +#[cfg(not(all(unix, any(target_env = "gnu", target_os = "macos"))))] +pub mod sigsegv_handler { + /// No-op function. + pub fn install() {} +} diff --git a/bin/beers/src/main.rs b/bin/beers/src/main.rs new file mode 100644 index 0000000..295b717 --- /dev/null +++ b/bin/beers/src/main.rs @@ -0,0 +1,29 @@ +#![allow(missing_docs)] + +use beers_p2p::run; + +fn main() { + use beers::cli::Cli; + // use bee_node::BeeNode; + + beers::sigsegv_handler::install(); + + // Enable backtraces unless a RUST_BACKTRACE value has already been explicitly set. + if std::env::var_os("RUST_BACKTRACE").is_none() { + std::env::set_var("RUST_BACKTRACE", "1"); + } + + // if let Err(err) = Cli::parse_args().run(|builder, _| async { + // // let handle = builder.launch_node(BeersNode::default()).await?; + // // handle.node_exit_future.await + // }) { + // eprintln!("Error: {}", err); + // std::process::exit(1); + // } + // let launcher = || ; + + if let Err(err) = Cli::parse_args().run() { + eprintln!("Error: {}", err); + std::process::exit(1); + } +} diff --git a/bin/beers/src/sigsegv_handler.rs b/bin/beers/src/sigsegv_handler.rs new file mode 100644 index 0000000..5fe3d78 --- /dev/null +++ b/bin/beers/src/sigsegv_handler.rs @@ -0,0 +1,153 @@ +//! Signal handler to extract a backtrace from stack overflow. +//! +//! Implementation modified from [`rustc`](https://github.com/rust-lang/rust/blob/3dee9775a8c94e701a08f7b2df2c444f353d8699/compiler/rustc_driver_impl/src/signal_handler.rs). + +use std::{ + alloc::{alloc, Layout}, + fmt, mem, ptr, +}; + +extern "C" { + fn backtrace_symbols_fd(buffer: *const *mut libc::c_void, size: libc::c_int, fd: libc::c_int); +} + +fn backtrace_stderr(buffer: &[*mut libc::c_void]) { + let size = buffer.len().try_into().unwrap_or_default(); + unsafe { backtrace_symbols_fd(buffer.as_ptr(), size, libc::STDERR_FILENO) }; +} + +/// Unbuffered, unsynchronized writer to stderr. +/// +/// Only acceptable because everything will end soon anyways. +struct RawStderr(()); + +impl fmt::Write for RawStderr { + fn write_str(&mut self, s: &str) -> Result<(), fmt::Error> { + let ret = unsafe { libc::write(libc::STDERR_FILENO, s.as_ptr().cast(), s.len()) }; + if ret == -1 { + Err(fmt::Error) + } else { + Ok(()) + } + } +} + +/// We don't really care how many bytes we actually get out. SIGSEGV comes for our head. +/// Splash stderr with letters of our own blood to warn our friends about the monster. +macro_rules! raw_errln { + ($tokens:tt) => { + let _ = ::core::fmt::Write::write_fmt(&mut RawStderr(()), format_args!($tokens)); + let _ = ::core::fmt::Write::write_char(&mut RawStderr(()), '\n'); + }; +} + +/// Signal handler installed for SIGSEGV +extern "C" fn print_stack_trace(_: libc::c_int) { + const MAX_FRAMES: usize = 256; + // Reserve data segment so we don't have to malloc in a signal handler, which might fail + // in incredibly undesirable and unexpected ways due to e.g. the allocator deadlocking + static mut STACK_TRACE: [*mut libc::c_void; MAX_FRAMES] = [ptr::null_mut(); MAX_FRAMES]; + let stack = unsafe { + // Collect return addresses + let depth = libc::backtrace(STACK_TRACE.as_mut_ptr(), MAX_FRAMES as i32); + if depth == 0 { + return + } + &STACK_TRACE.as_slice()[0..(depth as _)] + }; + + // Just a stack trace is cryptic. Explain what we're doing. + raw_errln!("error: beers interrupted by SIGSEGV, printing backtrace\n"); + let mut written = 1; + let mut consumed = 0; + // Begin elaborating return addrs into symbols and writing them directly to stderr + // Most backtraces are stack overflow, most stack overflows are from recursion + // Check for cycles before writing 250 lines of the same ~5 symbols + let cycled = |(runner, walker)| runner == walker; + let mut cyclic = false; + if let Some(period) = stack.iter().skip(1).step_by(2).zip(stack).position(cycled) { + let period = period.saturating_add(1); // avoid "what if wrapped?" branches + let Some(offset) = stack.iter().skip(period).zip(stack).position(cycled) else { + // impossible. + return + }; + + // Count matching trace slices, else we could miscount "biphasic cycles" + // with the same period + loop entry but a different inner loop + let next_cycle = stack[offset..].chunks_exact(period).skip(1); + let cycles = 1 + next_cycle + .zip(stack[offset..].chunks_exact(period)) + .filter(|(next, prev)| next == prev) + .count(); + backtrace_stderr(&stack[..offset]); + written += offset; + consumed += offset; + if cycles > 1 { + raw_errln!("\n### cycle encountered after {offset} frames with period {period}"); + backtrace_stderr(&stack[consumed..consumed + period]); + raw_errln!("### recursed {cycles} times\n"); + written += period + 4; + consumed += period * cycles; + cyclic = true; + }; + } + let rem = &stack[consumed..]; + backtrace_stderr(rem); + raw_errln!(""); + written += rem.len() + 1; + + let random_depth = || 8 * 16; // chosen by random diceroll (2d20) + if cyclic || stack.len() > random_depth() { + // technically speculation, but assert it with confidence anyway. + // We only arrived in this signal handler because bad things happened + // and this message is for explaining it's not the programmer's fault + raw_errln!("note: beers unexpectedly overflowed its stack! this is a bug"); + written += 1; + } + if stack.len() == MAX_FRAMES { + raw_errln!("note: maximum backtrace depth reached, frames may have been lost"); + written += 1; + } + raw_errln!("note: we would appreciate a report at https://github.com/rndlabs/bee-rs"); + written += 1; + if written > 24 { + // We probably just scrolled the earlier "we got SIGSEGV" message off the terminal + raw_errln!("note: backtrace dumped due to SIGSEGV! resuming signal"); + } +} + +/// Installs a SIGSEGV handler. +/// +/// When SIGSEGV is delivered to the process, print a stack trace and then exit. +pub fn install() { + unsafe { + let alt_stack_size: usize = min_sigstack_size() + 64 * 1024; + let mut alt_stack: libc::stack_t = mem::zeroed(); + alt_stack.ss_sp = alloc(Layout::from_size_align(alt_stack_size, 1).unwrap()).cast(); + alt_stack.ss_size = alt_stack_size; + libc::sigaltstack(&alt_stack, ptr::null_mut()); + + let mut sa: libc::sigaction = mem::zeroed(); + sa.sa_sigaction = print_stack_trace as libc::sighandler_t; + sa.sa_flags = libc::SA_NODEFER | libc::SA_RESETHAND | libc::SA_ONSTACK; + libc::sigemptyset(&mut sa.sa_mask); + libc::sigaction(libc::SIGSEGV, &sa, ptr::null_mut()); + } +} + +/// Modern kernels on modern hardware can have dynamic signal stack sizes. +#[cfg(any(target_os = "linux", target_os = "android"))] +fn min_sigstack_size() -> usize { + const AT_MINSIGSTKSZ: core::ffi::c_ulong = 51; + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval. + // This transparently supports older kernels which don't provide AT_MINSIGSTKSZ + libc::MINSIGSTKSZ.max(dynamic_sigstksz as _) +} + +/// Not all OS support hardware where this is needed. +#[cfg(not(any(target_os = "linux", target_os = "android")))] +const fn min_sigstack_size() -> usize { + libc::MINSIGSTKSZ +} diff --git a/bin/swarm-wasm-lib/Cargo.toml b/bin/swarm-wasm-lib/Cargo.toml index b2d6102..5caa035 100644 --- a/bin/swarm-wasm-lib/Cargo.toml +++ b/bin/swarm-wasm-lib/Cargo.toml @@ -11,10 +11,11 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook"] [dependencies] +## beers +beers-primitives.workspace = true + wasm-bindgen = { workspace = true } wasm-bindgen-futures = { workspace = true } -bmt = { path = "../../crates/bmt" } -postage = { path = "../../crates/postage" } js-sys = { workspace = true } web-sys = { version = "0.3.69", features = ['console'] } hex = { workspace = true } diff --git a/bin/waku-swarm-relay/Cargo.toml b/bin/waku-swarm-relay/Cargo.toml index 68be6ad..60e7975 100644 --- a/bin/waku-swarm-relay/Cargo.toml +++ b/bin/waku-swarm-relay/Cargo.toml @@ -9,6 +9,8 @@ edition = "2021" path = "src/main.rs" [dependencies] +## beers +beers-tracing.workspace = true once_cell = { workspace = true } dotenv = { workspace = true } clap = { workspace = true } @@ -22,7 +24,7 @@ tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } ethers-core = { workspace = true } ethers-contract = { workspace = true } ethers-signers = { workspace = true } -url = "2.5.0" +url = "2.5.1" anyhow = { workspace = true } thiserror = { workspace = true } waku-bindings = { git = "https://github.com/waku-org/waku-rust-bindings" } @@ -30,4 +32,3 @@ reqwest = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true} num-traits = "0.2.19" -logging = { path = "../../crates/logging" } diff --git a/bin/wasm-playground/Cargo.toml b/bin/wasm-playground/Cargo.toml index 6bd9ba2..103b360 100644 --- a/bin/wasm-playground/Cargo.toml +++ b/bin/wasm-playground/Cargo.toml @@ -9,11 +9,12 @@ rust-version = "1.56" crate-type = ["cdylib"] [dependencies] -wasm-bindgen = "0.2.87" -wasm-bindgen-futures = "0.4.37" -bmt = { path = "../../crates/bmt" } -postage = { path = "../../crates/postage" } -ethers-signers = { workspace = true } +## beers +beers-primitives = { workspace = true } +wasm-bindgen = "0.2.92" +wasm-bindgen-futures = "0.4.42" +alloy-signer-wallet.workspace = true +alloy-primitives.workspace = true hex = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } @@ -24,7 +25,7 @@ tracing = { workspace = true } tracing-subscriber = { workspace = true } [dependencies.web-sys] -version = "0.3.64" +version = "0.3.69" features = [ 'Document', 'Element', diff --git a/bin/wasm-playground/src/lib.rs b/bin/wasm-playground/src/lib.rs index 74deffb..c8ce6d4 100644 --- a/bin/wasm-playground/src/lib.rs +++ b/bin/wasm-playground/src/lib.rs @@ -1,7 +1,6 @@ use std::convert::TryInto; -use ethers_signers::LocalWallet; -use ethers_signers::Signer; +use alloy_signer_wallet::LocalWallet; use postage::batch; use rand::RngCore; use tracing::{debug, error, info, trace, warn}; diff --git a/crates/bmt/Cargo.lock b/crates/bmt/Cargo.lock deleted file mode 100644 index 81815cc..0000000 --- a/crates/bmt/Cargo.lock +++ /dev/null @@ -1,32 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "bmt" -version = "0.1.0" -dependencies = [ - "hex", - "tiny-keccak", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] diff --git a/crates/bmt/Cargo.toml b/crates/bmt/Cargo.toml deleted file mode 100644 index 4adefe0..0000000 --- a/crates/bmt/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "bmt" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tiny-keccak = { workspace = true } -hex = { workspace = true } \ No newline at end of file diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml new file mode 100644 index 0000000..1401d1e --- /dev/null +++ b/crates/cli/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "beers-cli-runner" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +exclude.workspace = true + +[dependencies] +# beers +beers-tasks.workspace = true + +# async +tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal"] } + +# misc +tracing.workspace = true + +[lints] +workspace = true diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs new file mode 100644 index 0000000..f5a6e0f --- /dev/null +++ b/crates/cli/src/lib.rs @@ -0,0 +1,210 @@ +//! A tokio based CLI runner. + +#![doc( + issue_tracker_base_url = "https://github.com/rndlabs/beers/issues/" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + +//! Entrypoint for running commands. + +use beers_tasks::{TaskExecutor, TaskManager}; +use std::{future::Future, pin::pin, sync::mpsc, time::Duration}; +use tracing::{debug, error, trace}; + +/// Executes CLI commands. +/// +/// Provides utilities for running a cli command to completion. +#[derive(Clone, Debug, Default)] +#[non_exhaustive] +pub struct CliRunner; + +// === impl CliRunner === + +impl CliRunner { + /// Executes the given _async_ command on the tokio runtime until the command future resolves or + /// until the process receives a `SIGINT` or `SIGTERM` signal. + /// + /// Tasks spawned by the command via the [`TaskExecutor`] are shut down and an attempt is made + /// to drive their shutdown to completion after the command has finished. + pub fn run_command_until_exit( + self, + command: impl FnOnce(CliContext) -> F, + ) -> Result<(), E> + where + F: Future>, + E: Send + Sync + From + From + 'static, + { + let AsyncCliRunner { context, mut task_manager, tokio_runtime } = AsyncCliRunner::new()?; + + // Executes the command until it finished or ctrl-c was fired + let command_res = tokio_runtime.block_on(run_to_completion_or_panic( + &mut task_manager, + run_until_ctrl_c(command(context)), + )); + + if command_res.is_err() { + error!(target: "beers::cli", "shutting down due to error"); + } else { + debug!(target: "beers::cli", "shutting down gracefully"); + // after the command has finished or exit signal was received we shutdown the task + // manager which fires the shutdown signal to all tasks spawned via the task + // executor and awaiting on tasks spawned with graceful shutdown + task_manager.graceful_shutdown_with_timeout(Duration::from_secs(5)); + } + + // `drop(tokio_runtime)` would block the current thread until its pools + // (including blocking pool) are shutdown. Since we want to exit as soon as possible, drop + // it on a separate thread and wait for up to 5 seconds for this operation to + // complete. + let (tx, rx) = mpsc::channel(); + std::thread::Builder::new() + .name("tokio-runtime-shutdown".to_string()) + .spawn(move || { + drop(tokio_runtime); + let _ = tx.send(()); + }) + .unwrap(); + + let _ = rx.recv_timeout(Duration::from_secs(5)).inspect_err(|err| { + debug!(target: "beers::cli", %err, "tokio runtime shutdown timed out"); + }); + + command_res + } + + /// Executes a regular future until completion or until external signal received. + pub fn run_until_ctrl_c(self, fut: F) -> Result<(), E> + where + F: Future>, + E: Send + Sync + From + 'static, + { + let tokio_runtime = tokio_runtime()?; + tokio_runtime.block_on(run_until_ctrl_c(fut))?; + Ok(()) + } + + /// Executes a regular future as a spawned blocking task until completion or until external + /// signal received. + /// + /// See [`Runtime::spawn_blocking`](tokio::runtime::Runtime::spawn_blocking) . + pub fn run_blocking_until_ctrl_c(self, fut: F) -> Result<(), E> + where + F: Future> + Send + 'static, + E: Send + Sync + From + 'static, + { + let tokio_runtime = tokio_runtime()?; + let handle = tokio_runtime.handle().clone(); + let fut = tokio_runtime.handle().spawn_blocking(move || handle.block_on(fut)); + tokio_runtime + .block_on(run_until_ctrl_c(async move { fut.await.expect("Failed to join task") }))?; + + // drop the tokio runtime on a separate thread because drop blocks until its pools + // (including blocking pool) are shutdown. In other words `drop(tokio_runtime)` would block + // the current thread but we want to exit right away. + std::thread::Builder::new() + .name("tokio-runtime-shutdown".to_string()) + .spawn(move || drop(tokio_runtime)) + .unwrap(); + + Ok(()) + } +} + +/// [`CliRunner`] configuration when executing commands asynchronously +struct AsyncCliRunner { + context: CliContext, + task_manager: TaskManager, + tokio_runtime: tokio::runtime::Runtime, +} + +// === impl AsyncCliRunner === + +impl AsyncCliRunner { + /// Attempts to create a tokio Runtime and additional context required to execute commands + /// asynchronously. + fn new() -> Result { + let tokio_runtime = tokio_runtime()?; + let task_manager = TaskManager::new(tokio_runtime.handle().clone()); + let task_executor = task_manager.executor(); + Ok(Self { context: CliContext { task_executor }, task_manager, tokio_runtime }) + } +} + +/// Additional context provided by the [`CliRunner`] when executing commands +#[derive(Debug)] +pub struct CliContext { + /// Used to execute/spawn tasks + pub task_executor: TaskExecutor, +} + +/// Creates a new default tokio multi-thread [Runtime](tokio::runtime::Runtime) with all features +/// enabled +pub fn tokio_runtime() -> Result { + tokio::runtime::Builder::new_multi_thread().enable_all().build() +} + +/// Runs the given future to completion or until a critical task panicked. +/// +/// Returns the error if a task panicked, or the given future returned an error. +async fn run_to_completion_or_panic(tasks: &mut TaskManager, fut: F) -> Result<(), E> +where + F: Future>, + E: Send + Sync + From + 'static, +{ + { + let fut = pin!(fut); + tokio::select! { + err = tasks => { + return Err(err.into()) + }, + res = fut => res?, + } + } + Ok(()) +} + +/// Runs the future to completion or until: +/// - `ctrl-c` is received. +/// - `SIGTERM` is received (unix only). +async fn run_until_ctrl_c(fut: F) -> Result<(), E> +where + F: Future>, + E: Send + Sync + 'static + From, +{ + let ctrl_c = tokio::signal::ctrl_c(); + + #[cfg(unix)] + { + let mut stream = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?; + let sigterm = stream.recv(); + let sigterm = pin!(sigterm); + let ctrl_c = pin!(ctrl_c); + let fut = pin!(fut); + + tokio::select! { + _ = ctrl_c => { + trace!(target: "beers::cli", "Received ctrl-c"); + }, + _ = sigterm => { + trace!(target: "beers::cli", "Received SIGTERM"); + }, + res = fut => res?, + } + } + + #[cfg(not(unix))] + { + let ctrl_c = pin!(ctrl_c); + let fut = pin!(fut); + + tokio::select! { + _ = ctrl_c => { + trace!(target: "reth::cli", "Received ctrl-c"); + }, + res = fut => res?, + } + } + + Ok(()) +} diff --git a/crates/logging/Cargo.toml b/crates/logging/Cargo.toml deleted file mode 100644 index ae48b30..0000000 --- a/crates/logging/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "logging" -version.workspace = true -edition.workspace = true -homepage.workspace = true -repository.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -atty = "0.2.14" -clap = { workspace = true } -time = { version = "0.3.36", features = ["macros"] } -tracing = { workspace = true } -tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt", "time"] } diff --git a/crates/logging/src/lib.rs b/crates/logging/src/lib.rs deleted file mode 100644 index 887f51a..0000000 --- a/crates/logging/src/lib.rs +++ /dev/null @@ -1,79 +0,0 @@ -use { - std::{panic::PanicInfo, sync::Once}, - time::macros::format_description, - tracing::level_filters::LevelFilter, - tracing_subscriber::fmt::{time::UtcTime, writer::MakeWriterExt as _}, -}; - -/// Initializes tracing setup that is shared between the binaries. -/// `env_filter` has similar syntax to env_logger. It is documented at -/// https://docs.rs/tracing-subscriber/0.2.15/tracing_subscriber/filter/struct.EnvFilter.html -pub fn initialize(env_filter: &str, stderr_threshold: LevelFilter) { - set_tracing_subscriber(env_filter, stderr_threshold); - std::panic::set_hook(Box::new(tracing_panic_hook)); -} - -/// Like [`initialize`], but can be called multiple times in a row. Later calls -/// are ignored. -/// -/// Useful for tests. -pub fn initialize_reentrant(env_filter: &str) { - // The tracing subscriber below is global object so initializing it again in the - // same process by a different thread would fail. - static ONCE: Once = Once::new(); - ONCE.call_once(|| set_tracing_subscriber(env_filter, LevelFilter::ERROR)); -} - -fn set_tracing_subscriber(env_filter: &str, stderr_threshold: LevelFilter) { - // This is what kibana uses to separate multi line log messages. - let subscriber_builder = tracing_subscriber::fmt::fmt() - .with_timer(UtcTime::new(format_description!( - "[year]-[month]-[day]T[hour]:[minute]:[second].[subsecond digits:3]Z" - ))) - .with_env_filter(env_filter) - .with_ansi(atty::is(atty::Stream::Stdout)); - match stderr_threshold.into_level() { - Some(threshold) => subscriber_builder - .with_writer( - std::io::stderr - .with_max_level(threshold) - .or_else(std::io::stdout), - ) - .init(), - None => subscriber_builder.init(), - } -} - -/// Panic hook that prints roughly the same message as the default panic hook -/// but uses tracing:error instead of stderr. -/// -/// Useful when we want panic messages to have the proper log format for Kibana. -fn tracing_panic_hook(panic: &PanicInfo) { - let thread = std::thread::current(); - let name = thread.name().unwrap_or(""); - let backtrace = std::backtrace::Backtrace::force_capture(); - tracing::error!("thread '{name}' {panic}\nstack backtrace:\n{backtrace}"); -} - -#[macro_export] -macro_rules! logging_args_with_default_filter { - ($struct_name:ident ,$default_filter:literal) => { - #[derive(clap::Parser)] - pub struct $struct_name { - #[clap(long, env, default_value = $default_filter)] - pub log_filter: String, - - #[clap(long, env, default_value = "error")] - pub log_stderr_threshold: LevelFilter, - } - }; -} - -logging_args_with_default_filter!(LoggingArguments, "warn,waku_bridge=trace"); - -#[derive(clap::Parser)] -#[group(skip)] -pub struct Arguments { - #[clap(flatten)] - pub logging: LoggingArguments, -} diff --git a/crates/manifest/Cargo.toml b/crates/manifest/Cargo.toml deleted file mode 100644 index f9f4f77..0000000 --- a/crates/manifest/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "manifest" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -serde = { workspace = true } -serde_json = { workspace = true } -serde_with = { workspace = true } -hex = { workspace = true } -const_format = "0.2.32" -rand = { workspace = true } -tokio = { workspace = true } -reqwest = { workspace = true } -futures = { workspace = true } -async-recursion = { workspace = true } -tiny-keccak = { workspace = true } -async-trait = { workspace = true } -# bee_api = { path = "../bee_api" } -bee_api = { git = "https://github.com/rndlabs/bee-api-rs.git" } -thiserror = { workspace = true } -lru = "0.7.8" - -[dev-dependencies] -test-case = "2.2.2" diff --git a/crates/metrics/Cargo.toml b/crates/metrics/Cargo.toml new file mode 100644 index 0000000..d1a5c21 --- /dev/null +++ b/crates/metrics/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "beers-metrics" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +description = "beers metrics utilities" + +[lints] +workspace = true + +[dependencies] +# beers +beers-metrics-derive.workspace = true + +# metrics +metrics.workspace = true + +# async +tokio = { workspace = true, features = ["full"], optional = true } +futures = { workspace = true, optional = true } +tokio-util = { workspace = true, optional = true } + +[features] +common = ["tokio", "futures", "tokio-util"] diff --git a/crates/metrics/metrics-derive/Cargo.toml b/crates/metrics/metrics-derive/Cargo.toml new file mode 100644 index 0000000..13053c6 --- /dev/null +++ b/crates/metrics/metrics-derive/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "beers-metrics-derive" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[lib] +proc-macro = true + +[dependencies] +proc-macro2.workspace = true +syn = { workspace = true, features = ["extra-traits"] } +quote.workspace = true +regex = "1.6.0" +once_cell.workspace = true + +[dev-dependencies] +metrics.workspace = true +serial_test.workspace = true +trybuild = "1.0" diff --git a/crates/metrics/metrics-derive/src/expand.rs b/crates/metrics/metrics-derive/src/expand.rs new file mode 100644 index 0000000..ac0efd4 --- /dev/null +++ b/crates/metrics/metrics-derive/src/expand.rs @@ -0,0 +1,436 @@ +use once_cell::sync::Lazy; +use quote::{quote, ToTokens}; +use regex::Regex; +use syn::{ + punctuated::Punctuated, Attribute, Data, DeriveInput, Error, Expr, Field, Lit, LitBool, LitStr, + Meta, MetaNameValue, Result, Token, +}; + +use crate::{metric::Metric, with_attrs::WithAttrs}; + +/// Metric name regex according to Prometheus data model +/// +/// See +static METRIC_NAME_RE: Lazy = + Lazy::new(|| Regex::new(r"^[a-zA-Z_:.][a-zA-Z0-9_:.]*$").unwrap()); + +/// Supported metrics separators +const SUPPORTED_SEPARATORS: &[&str] = &[".", "_", ":"]; + +enum MetricField<'a> { + Included(Metric<'a>), + Skipped(&'a Field), +} + +impl<'a> MetricField<'a> { + const fn field(&self) -> &'a Field { + match self { + MetricField::Included(Metric { field, .. }) | MetricField::Skipped(field) => field, + } + } +} + +pub(crate) fn derive(node: &DeriveInput) -> Result { + let ty = &node.ident; + let vis = &node.vis; + let ident_name = ty.to_string(); + + let metrics_attr = parse_metrics_attr(node)?; + let metric_fields = parse_metric_fields(node)?; + + let describe_doc = quote! { + /// Describe all exposed metrics. Internally calls `describe_*` macros from + /// the metrics crate according to the metric type. + /// + /// See + }; + let register_and_describe = match &metrics_attr.scope { + MetricsScope::Static(scope) => { + let (defaults, labeled_defaults, describes): (Vec<_>, Vec<_>, Vec<_>) = metric_fields + .iter() + .map(|metric| { + let field_name = &metric.field().ident; + match metric { + MetricField::Included(metric) => { + let metric_name = format!( + "{}{}{}", + scope.value(), + metrics_attr.separator(), + metric.name() + ); + let registrar = metric.register_stmt()?; + let describe = metric.describe_stmt()?; + let description = &metric.description; + Ok(( + quote! { + #field_name: #registrar(#metric_name), + }, + quote! { + #field_name: #registrar(#metric_name, labels.clone()), + }, + Some(quote! { + #describe(#metric_name, #description); + }), + )) + } + MetricField::Skipped(_) => Ok(( + quote! { + #field_name: Default::default(), + }, + quote! { + #field_name: Default::default(), + }, + None, + )), + } + }) + .collect::>>()? + .into_iter() + .fold((vec![], vec![], vec![]), |mut acc, x| { + acc.0.push(x.0); + acc.1.push(x.1); + if let Some(describe) = x.2 { + acc.2.push(describe); + } + acc + }); + + quote! { + impl Default for #ty { + fn default() -> Self { + #ty::describe(); + + Self { + #(#defaults)* + } + } + } + + impl #ty { + /// Create new instance of metrics with provided labels. + #vis fn new_with_labels(labels: impl metrics::IntoLabels + Clone) -> Self { + Self { + #(#labeled_defaults)* + } + } + + #describe_doc + #vis fn describe() { + #(#describes)* + } + } + } + } + MetricsScope::Dynamic => { + let (defaults, labeled_defaults, describes): (Vec<_>, Vec<_>, Vec<_>) = metric_fields + .iter() + .map(|metric| { + let field_name = &metric.field().ident; + match metric { + MetricField::Included(metric) => { + let name = metric.name(); + let separator = metrics_attr.separator(); + let metric_name = quote! { + format!("{}{}{}", scope, #separator, #name) + }; + + let registrar = metric.register_stmt()?; + let describe = metric.describe_stmt()?; + let description = &metric.description; + + Ok(( + quote! { + #field_name: #registrar(#metric_name), + }, + quote! { + #field_name: #registrar(#metric_name, labels.clone()), + }, + Some(quote! { + #describe(#metric_name, #description); + }), + )) + } + MetricField::Skipped(_) => Ok(( + quote! { + #field_name: Default::default(), + }, + quote! { + #field_name: Default::default(), + }, + None, + )), + } + }) + .collect::>>()? + .into_iter() + .fold((vec![], vec![], vec![]), |mut acc, x| { + acc.0.push(x.0); + acc.1.push(x.1); + if let Some(describe) = x.2 { + acc.2.push(describe); + } + acc + }); + + quote! { + impl #ty { + /// Create new instance of metrics with provided scope. + #vis fn new(scope: &str) -> Self { + #ty::describe(scope); + + Self { + #(#defaults)* + } + } + + /// Create new instance of metrics with provided labels. + #vis fn new_with_labels(scope: &str, labels: impl metrics::IntoLabels + Clone) -> Self { + Self { + #(#labeled_defaults)* + } + } + + #describe_doc + #vis fn describe(scope: &str) { + #(#describes)* + } + } + } + } + }; + Ok(quote! { + #register_and_describe + + impl std::fmt::Debug for #ty { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct(#ident_name).finish() + } + } + }) +} + +pub(crate) struct MetricsAttr { + pub(crate) scope: MetricsScope, + pub(crate) separator: Option, +} + +impl MetricsAttr { + const DEFAULT_SEPARATOR: &'static str = "."; + + fn separator(&self) -> String { + match &self.separator { + Some(sep) => sep.value(), + None => Self::DEFAULT_SEPARATOR.to_owned(), + } + } +} + +pub(crate) enum MetricsScope { + Static(LitStr), + Dynamic, +} + +fn parse_metrics_attr(node: &DeriveInput) -> Result { + let metrics_attr = parse_single_required_attr(node, "metrics")?; + let parsed = + metrics_attr.parse_args_with(Punctuated::::parse_terminated)?; + let (mut scope, mut separator, mut dynamic) = (None, None, None); + for kv in parsed { + let lit = match kv.value { + Expr::Lit(ref expr) => &expr.lit, + _ => continue, + }; + if kv.path.is_ident("scope") { + if scope.is_some() { + return Err(Error::new_spanned(kv, "Duplicate `scope` value provided.")) + } + let scope_lit = parse_str_lit(lit)?; + validate_metric_name(&scope_lit)?; + scope = Some(scope_lit); + } else if kv.path.is_ident("separator") { + if separator.is_some() { + return Err(Error::new_spanned(kv, "Duplicate `separator` value provided.")) + } + let separator_lit = parse_str_lit(lit)?; + if !SUPPORTED_SEPARATORS.contains(&&*separator_lit.value()) { + return Err(Error::new_spanned( + kv, + format!( + "Unsupported `separator` value. Supported: {}.", + SUPPORTED_SEPARATORS + .iter() + .map(|sep| format!("`{sep}`")) + .collect::>() + .join(", ") + ), + )) + } + separator = Some(separator_lit); + } else if kv.path.is_ident("dynamic") { + if dynamic.is_some() { + return Err(Error::new_spanned(kv, "Duplicate `dynamic` flag provided.")) + } + dynamic = Some(parse_bool_lit(lit)?.value); + } else { + return Err(Error::new_spanned(kv, "Unsupported attribute entry.")) + } + } + + let scope = match (scope, dynamic) { + (Some(scope), None) | (Some(scope), Some(false)) => MetricsScope::Static(scope), + (None, Some(true)) => MetricsScope::Dynamic, + (Some(_), Some(_)) => { + return Err(Error::new_spanned(node, "`scope = ..` conflicts with `dynamic = true`.")) + } + _ => { + return Err(Error::new_spanned( + node, + "Either `scope = ..` or `dynamic = true` must be set.", + )) + } + }; + + Ok(MetricsAttr { scope, separator }) +} + +fn parse_metric_fields(node: &DeriveInput) -> Result>> { + let Data::Struct(ref data) = node.data else { + return Err(Error::new_spanned(node, "Only structs are supported.")) + }; + + let mut metrics = Vec::with_capacity(data.fields.len()); + for field in &data.fields { + let (mut describe, mut rename, mut skip) = (None, None, false); + if let Some(metric_attr) = parse_single_attr(field, "metric")? { + let parsed = + metric_attr.parse_args_with(Punctuated::::parse_terminated)?; + for meta in parsed { + match meta { + Meta::Path(path) if path.is_ident("skip") => skip = true, + Meta::NameValue(kv) => { + let lit = match kv.value { + Expr::Lit(ref expr) => &expr.lit, + _ => continue, + }; + if kv.path.is_ident("describe") { + if describe.is_some() { + return Err(Error::new_spanned( + kv, + "Duplicate `describe` value provided.", + )) + } + describe = Some(parse_str_lit(lit)?); + } else if kv.path.is_ident("rename") { + if rename.is_some() { + return Err(Error::new_spanned( + kv, + "Duplicate `rename` value provided.", + )) + } + let rename_lit = parse_str_lit(lit)?; + validate_metric_name(&rename_lit)?; + rename = Some(rename_lit) + } else { + return Err(Error::new_spanned(kv, "Unsupported attribute entry.")) + } + } + _ => return Err(Error::new_spanned(meta, "Unsupported attribute entry.")), + } + } + } + + if skip { + metrics.push(MetricField::Skipped(field)); + continue + } + + let description = match describe { + Some(lit_str) => lit_str.value(), + // Parse docs only if `describe` attribute was not provided + None => match parse_docs_to_string(field)? { + Some(docs_str) => docs_str, + None => { + return Err(Error::new_spanned( + field, + "Either doc comment or `describe = ..` must be set.", + )) + } + }, + }; + + metrics.push(MetricField::Included(Metric::new(field, description, rename))); + } + + Ok(metrics) +} + +fn validate_metric_name(name: &LitStr) -> Result<()> { + if METRIC_NAME_RE.is_match(&name.value()) { + Ok(()) + } else { + Err(Error::new_spanned(name, format!("Value must match regex {}", METRIC_NAME_RE.as_str()))) + } +} + +fn parse_single_attr<'a, T: WithAttrs + ToTokens>( + token: &'a T, + ident: &str, +) -> Result> { + let mut attr_iter = token.attrs().iter().filter(|a| a.path().is_ident(ident)); + if let Some(attr) = attr_iter.next() { + if let Some(next_attr) = attr_iter.next() { + Err(Error::new_spanned( + next_attr, + format!("Duplicate `#[{ident}(..)]` attribute provided."), + )) + } else { + Ok(Some(attr)) + } + } else { + Ok(None) + } +} + +fn parse_single_required_attr<'a, T: WithAttrs + ToTokens>( + token: &'a T, + ident: &str, +) -> Result<&'a Attribute> { + if let Some(attr) = parse_single_attr(token, ident)? { + Ok(attr) + } else { + Err(Error::new_spanned(token, format!("`#[{ident}(..)]` attribute must be provided."))) + } +} + +fn parse_docs_to_string(token: &T) -> Result> { + let mut doc_str = None; + for attr in token.attrs() { + if let syn::Meta::NameValue(ref meta) = attr.meta { + if let Expr::Lit(ref lit) = meta.value { + if let Lit::Str(ref doc) = lit.lit { + let doc_value = doc.value().trim().to_string(); + doc_str = Some( + doc_str + .map(|prev_doc_value| format!("{prev_doc_value} {doc_value}")) + .unwrap_or(doc_value), + ); + } + } + } + } + Ok(doc_str) +} + +fn parse_str_lit(lit: &Lit) -> Result { + match lit { + Lit::Str(lit_str) => Ok(lit_str.to_owned()), + _ => Err(Error::new_spanned(lit, "Value **must** be a string literal.")), + } +} + +fn parse_bool_lit(lit: &Lit) -> Result { + match lit { + Lit::Bool(lit_bool) => Ok(lit_bool.to_owned()), + _ => Err(Error::new_spanned(lit, "Value **must** be a string literal.")), + } +} diff --git a/crates/metrics/metrics-derive/src/lib.rs b/crates/metrics/metrics-derive/src/lib.rs new file mode 100644 index 0000000..9dd4c73 --- /dev/null +++ b/crates/metrics/metrics-derive/src/lib.rs @@ -0,0 +1,137 @@ +//! This crate provides [Metrics] derive macro + +#![doc( + issue_tracker_base_url = "https://github.com/rndlabs/beers/issues/" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + +use proc_macro::TokenStream; +use syn::{parse_macro_input, DeriveInput}; + +mod expand; +mod metric; +mod with_attrs; + +/// The [Metrics] derive macro instruments all of the struct fields and +/// creates a [Default] implementation for the struct registering all of +/// the metrics. +/// +/// Additionally, it creates a `describe` method on the struct, which +/// internally calls the describe statements for all metric fields. +/// +/// Sample usage: +/// ``` +/// use metrics::{Counter, Gauge, Histogram}; +/// use beers_metrics_derive::Metrics; +/// +/// #[derive(Metrics)] +/// #[metrics(scope = "metrics_custom")] +/// pub struct CustomMetrics { +/// /// A gauge with doc comment description. +/// gauge: Gauge, +/// #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] +/// gauge2: Gauge, +/// /// Some doc comment +/// #[metric(describe = "Metric attribute description will be preferred over doc comment.")] +/// counter: Counter, +/// /// A renamed histogram. +/// #[metric(rename = "histogram")] +/// histo: Histogram, +/// } +/// ``` +/// +/// The example above will be expanded to: +/// ``` +/// pub struct CustomMetrics { +/// /// A gauge with doc comment description. +/// gauge: metrics::Gauge, +/// gauge2: metrics::Gauge, +/// /// Some doc comment +/// counter: metrics::Counter, +/// /// A renamed histogram. +/// histo: metrics::Histogram, +/// } +/// +/// impl Default for CustomMetrics { +/// fn default() -> Self { +/// Self { +/// gauge: metrics::gauge!("metrics_custom_gauge"), +/// gauge2: metrics::gauge!("metrics_custom_second_gauge"), +/// counter: metrics::counter!("metrics_custom_counter"), +/// histo: metrics::histogram!("metrics_custom_histogram"), +/// } +/// } +/// } +/// +/// impl CustomMetrics { +/// /// Describe all exposed metrics +/// pub fn describe() { +/// metrics::describe_gauge!( +/// "metrics_custom_gauge", +/// "A gauge with doc comment description." +/// ); +/// metrics::describe_gauge!( +/// "metrics_custom_second_gauge", +/// "A gauge with metric attribute description." +/// ); +/// metrics::describe_counter!( +/// "metrics_custom_counter", +/// "Metric attribute description will be preferred over doc comment." +/// ); +/// metrics::describe_histogram!("metrics_custom_histogram", "A renamed histogram."); +/// } +/// } +/// +/// impl std::fmt::Debug for CustomMetrics { +/// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +/// f.debug_struct("CustomMetrics").finish() +/// } +/// } +/// ``` +/// +/// Similarly, you can derive metrics with "dynamic" scope, +/// meaning their scope can be set at the time of instantiation. +/// For example: +/// ``` +/// use beers_metrics_derive::Metrics; +/// +/// #[derive(Metrics)] +/// #[metrics(dynamic = true)] +/// pub struct DynamicScopeMetrics { +/// /// A gauge with doc comment description. +/// gauge: metrics::Gauge, +/// } +/// ``` +/// +/// The example with dynamic scope will expand to +/// ``` +/// pub struct DynamicScopeMetrics { +/// /// A gauge with doc comment description. +/// gauge: metrics::Gauge, +/// } +/// +/// impl DynamicScopeMetrics { +/// pub fn new(scope: &str) -> Self { +/// Self { gauge: metrics::gauge!(format!("{}{}{}", scope, "_", "gauge")) } +/// } +/// +/// pub fn describe(scope: &str) { +/// metrics::describe_gauge!( +/// format!("{}{}{}", scope, "_", "gauge"), +/// "A gauge with doc comment description." +/// ); +/// } +/// } +/// +/// impl std::fmt::Debug for DynamicScopeMetrics { +/// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +/// f.debug_struct("DynamicScopeMetrics").finish() +/// } +/// } +/// ``` +#[proc_macro_derive(Metrics, attributes(metrics, metric))] +pub fn derive_metrics(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as DeriveInput); + expand::derive(&input).unwrap_or_else(|err| err.to_compile_error()).into() +} diff --git a/crates/metrics/metrics-derive/src/metric.rs b/crates/metrics/metrics-derive/src/metric.rs new file mode 100644 index 0000000..e8dfb24 --- /dev/null +++ b/crates/metrics/metrics-derive/src/metric.rs @@ -0,0 +1,59 @@ +use quote::quote; +use syn::{Error, Field, LitStr, Result, Type}; + +const COUNTER_TY: &str = "Counter"; +const HISTOGRAM_TY: &str = "Histogram"; +const GAUGE_TY: &str = "Gauge"; + +pub(crate) struct Metric<'a> { + pub(crate) field: &'a Field, + pub(crate) description: String, + rename: Option, +} + +impl<'a> Metric<'a> { + pub(crate) const fn new(field: &'a Field, description: String, rename: Option) -> Self { + Self { field, description, rename } + } + + pub(crate) fn name(&self) -> String { + match self.rename.as_ref() { + Some(name) => name.value(), + None => self.field.ident.as_ref().map(ToString::to_string).unwrap_or_default(), + } + } + + pub(crate) fn register_stmt(&self) -> Result { + if let Type::Path(ref path_ty) = self.field.ty { + if let Some(last) = path_ty.path.segments.last() { + let registrar = match last.ident.to_string().as_str() { + COUNTER_TY => quote! { metrics::counter! }, + HISTOGRAM_TY => quote! { metrics::histogram! }, + GAUGE_TY => quote! { metrics::gauge! }, + _ => return Err(Error::new_spanned(path_ty, "Unsupported metric type")), + }; + + return Ok(quote! { #registrar }) + } + } + + Err(Error::new_spanned(&self.field.ty, "Unsupported metric type")) + } + + pub(crate) fn describe_stmt(&self) -> Result { + if let Type::Path(ref path_ty) = self.field.ty { + if let Some(last) = path_ty.path.segments.last() { + let descriptor = match last.ident.to_string().as_str() { + COUNTER_TY => quote! { metrics::describe_counter! }, + HISTOGRAM_TY => quote! { metrics::describe_histogram! }, + GAUGE_TY => quote! { metrics::describe_gauge! }, + _ => return Err(Error::new_spanned(path_ty, "Unsupported metric type")), + }; + + return Ok(quote! { #descriptor }) + } + } + + Err(Error::new_spanned(&self.field.ty, "Unsupported metric type")) + } +} diff --git a/crates/metrics/metrics-derive/src/with_attrs.rs b/crates/metrics/metrics-derive/src/with_attrs.rs new file mode 100644 index 0000000..9095d99 --- /dev/null +++ b/crates/metrics/metrics-derive/src/with_attrs.rs @@ -0,0 +1,17 @@ +use syn::{Attribute, DeriveInput, Field}; + +pub(crate) trait WithAttrs { + fn attrs(&self) -> &[Attribute]; +} + +impl WithAttrs for DeriveInput { + fn attrs(&self) -> &[Attribute] { + &self.attrs + } +} + +impl WithAttrs for Field { + fn attrs(&self) -> &[Attribute] { + &self.attrs + } +} diff --git a/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.rs b/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.rs new file mode 100644 index 0000000..8c8ff4b --- /dev/null +++ b/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.rs @@ -0,0 +1,62 @@ +extern crate metrics; +extern crate beers_metrics_derive; + +use metrics::Gauge; +use beers_metrics_derive::Metrics; + +fn main() {} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics { + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics2 { + #[metric()] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics3 { + #[metric(random = "value")] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics4 { + #[metric(describe = 123)] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics5 { + #[metric(rename = 123)] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics6 { + #[metric(describe = "", describe = "")] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics7 { + #[metric(rename = "_gauge", rename = "_gauge")] + gauge: Gauge, +} + +#[derive(Metrics)] +#[metrics(scope = "some_scope")] +struct CustomMetrics8 { + #[metric(describe = "")] + gauge: String, +} diff --git a/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.stderr b/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.stderr new file mode 100644 index 0000000..96659e4 --- /dev/null +++ b/crates/metrics/metrics-derive/tests/compile-fail/metric_attr.stderr @@ -0,0 +1,48 @@ +error: Either doc comment or `describe = ..` must be set. + --> tests/compile-fail/metric_attr.rs:12:5 + | +12 | gauge: Gauge, + | ^^^^^^^^^^^^ + +error: Either doc comment or `describe = ..` must be set. + --> tests/compile-fail/metric_attr.rs:18:5 + | +18 | / #[metric()] +19 | | gauge: Gauge, + | |________________^ + +error: Unsupported attribute entry. + --> tests/compile-fail/metric_attr.rs:25:14 + | +25 | #[metric(random = "value")] + | ^^^^^^^^^^^^^^^^ + +error: Value **must** be a string literal. + --> tests/compile-fail/metric_attr.rs:32:25 + | +32 | #[metric(describe = 123)] + | ^^^ + +error: Value **must** be a string literal. + --> tests/compile-fail/metric_attr.rs:39:23 + | +39 | #[metric(rename = 123)] + | ^^^ + +error: Duplicate `describe` value provided. + --> tests/compile-fail/metric_attr.rs:46:29 + | +46 | #[metric(describe = "", describe = "")] + | ^^^^^^^^^^^^^ + +error: Duplicate `rename` value provided. + --> tests/compile-fail/metric_attr.rs:53:33 + | +53 | #[metric(rename = "_gauge", rename = "_gauge")] + | ^^^^^^^^^^^^^^^^^ + +error: Unsupported metric type + --> tests/compile-fail/metric_attr.rs:61:12 + | +61 | gauge: String, + | ^^^^^^ diff --git a/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.rs b/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.rs new file mode 100644 index 0000000..cdaeadb --- /dev/null +++ b/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.rs @@ -0,0 +1,56 @@ +extern crate beers_metrics_derive; +use beers_metrics_derive::Metrics; + +fn main() {} + +#[derive(Metrics)] +struct CustomMetrics; + +#[derive(Metrics)] +#[metrics()] +#[metrics()] +struct CustomMetrics2; + +#[derive(Metrics)] +#[metrics()] +struct CustomMetrics3; + +#[derive(Metrics)] +#[metrics(scope = value)] +struct CustomMetrics4; + +#[derive(Metrics)] +#[metrics(scope = 123)] +struct CustomMetrics5; + +#[derive(Metrics)] +#[metrics(scope = "some-scope")] +struct CustomMetrics6; + +#[derive(Metrics)] +#[metrics(scope = "some_scope", scope = "another_scope")] +struct CustomMetrics7; + +#[derive(Metrics)] +#[metrics(separator = value)] +struct CustomMetrics8; + +#[derive(Metrics)] +#[metrics(separator = 123)] +struct CustomMetrics9; + +#[derive(Metrics)] +#[metrics(separator = "x")] +struct CustomMetrics10; + +#[derive(Metrics)] +#[metrics(separator = "_", separator = ":")] +struct CustomMetrics11; + +#[derive(Metrics)] +#[metrics(random = "value")] +struct CustomMetrics12; + +#[derive(Metrics)] +#[metrics(scope = "scope", dynamic = true)] +struct CustomMetrics13; diff --git a/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.stderr b/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.stderr new file mode 100644 index 0000000..5121258 --- /dev/null +++ b/crates/metrics/metrics-derive/tests/compile-fail/metrics_attr.stderr @@ -0,0 +1,81 @@ +error: `#[metrics(..)]` attribute must be provided. + --> tests/compile-fail/metrics_attr.rs:7:1 + | +7 | struct CustomMetrics; + | ^^^^^^^^^^^^^^^^^^^^^ + +error: Duplicate `#[metrics(..)]` attribute provided. + --> tests/compile-fail/metrics_attr.rs:11:1 + | +11 | #[metrics()] + | ^^^^^^^^^^^^ + +error: Either `scope = ..` or `dynamic = true` must be set. + --> tests/compile-fail/metrics_attr.rs:15:1 + | +15 | / #[metrics()] +16 | | struct CustomMetrics3; + | |______________________^ + +error: Either `scope = ..` or `dynamic = true` must be set. + --> tests/compile-fail/metrics_attr.rs:19:1 + | +19 | / #[metrics(scope = value)] +20 | | struct CustomMetrics4; + | |______________________^ + +error: Value **must** be a string literal. + --> tests/compile-fail/metrics_attr.rs:23:19 + | +23 | #[metrics(scope = 123)] + | ^^^ + +error: Value must match regex ^[a-zA-Z_:.][a-zA-Z0-9_:.]*$ + --> tests/compile-fail/metrics_attr.rs:27:19 + | +27 | #[metrics(scope = "some-scope")] + | ^^^^^^^^^^^^ + +error: Duplicate `scope` value provided. + --> tests/compile-fail/metrics_attr.rs:31:33 + | +31 | #[metrics(scope = "some_scope", scope = "another_scope")] + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: Either `scope = ..` or `dynamic = true` must be set. + --> tests/compile-fail/metrics_attr.rs:35:1 + | +35 | / #[metrics(separator = value)] +36 | | struct CustomMetrics8; + | |______________________^ + +error: Value **must** be a string literal. + --> tests/compile-fail/metrics_attr.rs:39:23 + | +39 | #[metrics(separator = 123)] + | ^^^ + +error: Unsupported `separator` value. Supported: `.`, `_`, `:`. + --> tests/compile-fail/metrics_attr.rs:43:11 + | +43 | #[metrics(separator = "x")] + | ^^^^^^^^^^^^^^^ + +error: Duplicate `separator` value provided. + --> tests/compile-fail/metrics_attr.rs:47:28 + | +47 | #[metrics(separator = "_", separator = ":")] + | ^^^^^^^^^^^^^^^ + +error: Unsupported attribute entry. + --> tests/compile-fail/metrics_attr.rs:51:11 + | +51 | #[metrics(random = "value")] + | ^^^^^^^^^^^^^^^^ + +error: `scope = ..` conflicts with `dynamic = true`. + --> tests/compile-fail/metrics_attr.rs:55:1 + | +55 | / #[metrics(scope = "scope", dynamic = true)] +56 | | struct CustomMetrics13; + | |_______________________^ diff --git a/crates/metrics/metrics-derive/tests/metrics.rs b/crates/metrics/metrics-derive/tests/metrics.rs new file mode 100644 index 0000000..89f981c --- /dev/null +++ b/crates/metrics/metrics-derive/tests/metrics.rs @@ -0,0 +1,348 @@ +use metrics::{ + Counter, Gauge, Histogram, Key, KeyName, Label, Metadata, Recorder, SharedString, Unit, +}; +use once_cell::sync::Lazy; +use beers_metrics_derive::Metrics; +use serial_test::serial; +use std::{collections::HashMap, sync::Mutex}; + +#[allow(dead_code)] +#[derive(Metrics)] +#[metrics(scope = "metrics_custom")] +struct CustomMetrics { + #[metric(skip)] + skipped_field_a: u8, + /// A gauge with doc comment description. + gauge: Gauge, + #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] + gauge2: Gauge, + #[metric(skip)] + skipped_field_b: u16, + /// Some doc comment + #[metric(describe = "Metric attribute description will be preferred over doc comment.")] + counter: Counter, + #[metric(skip)] + skipped_field_c: u32, + #[metric(skip)] + skipped_field_d: u64, + /// A renamed histogram. + #[metric(rename = "histogram")] + histo: Histogram, + #[metric(skip)] + skipped_field_e: u128, +} + +#[allow(dead_code)] +#[derive(Metrics)] +#[metrics(dynamic = true)] +struct DynamicScopeMetrics { + #[metric(skip)] + skipped_field_a: u8, + /// A gauge with doc comment description. + gauge: Gauge, + #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] + gauge2: Gauge, + #[metric(skip)] + skipped_field_b: u16, + /// Some doc comment + #[metric(describe = "Metric attribute description will be preferred over doc comment.")] + counter: Counter, + #[metric(skip)] + skipped_field_c: u32, + #[metric(skip)] + skipped_field_d: u64, + /// A renamed histogram. + #[metric(rename = "histogram")] + histo: Histogram, + #[metric(skip)] + skipped_field_e: u128, +} + +static RECORDER: Lazy = Lazy::new(TestRecorder::new); + +fn test_describe(scope: &str) { + assert_eq!(RECORDER.metrics_len(), 4); + + let gauge = RECORDER.get_metric(&format!("{scope}.gauge")); + assert!(gauge.is_some()); + assert_eq!( + gauge.unwrap(), + TestMetric { + ty: TestMetricTy::Gauge, + description: Some("A gauge with doc comment description.".to_owned()), + labels: None, + } + ); + + let second_gauge = RECORDER.get_metric(&format!("{scope}.second_gauge")); + assert!(second_gauge.is_some()); + assert_eq!( + second_gauge.unwrap(), + TestMetric { + ty: TestMetricTy::Gauge, + description: Some("A gauge with metric attribute description.".to_owned()), + labels: None, + } + ); + + let counter = RECORDER.get_metric(&format!("{scope}.counter")); + assert!(counter.is_some()); + assert_eq!( + counter.unwrap(), + TestMetric { + ty: TestMetricTy::Counter, + description: Some( + "Metric attribute description will be preferred over doc comment.".to_owned() + ), + labels: None, + } + ); + + let histogram = RECORDER.get_metric(&format!("{scope}.histogram")); + assert!(histogram.is_some()); + assert_eq!( + histogram.unwrap(), + TestMetric { + ty: TestMetricTy::Histogram, + description: Some("A renamed histogram.".to_owned()), + labels: None, + } + ); +} + +#[test] +#[serial] +fn describe_metrics() { + let _guard = RECORDER.enter(); + + CustomMetrics::describe(); + + test_describe("metrics_custom"); +} + +#[test] +#[serial] +fn describe_dynamic_metrics() { + let _guard = RECORDER.enter(); + + let scope = "local_scope"; + + DynamicScopeMetrics::describe(scope); + + test_describe(scope); +} + +fn test_register(scope: &str) { + assert_eq!(RECORDER.metrics_len(), 4); + + let gauge = RECORDER.get_metric(&format!("{scope}.gauge")); + assert!(gauge.is_some()); + assert_eq!( + gauge.unwrap(), + TestMetric { ty: TestMetricTy::Gauge, description: None, labels: None } + ); + + let second_gauge = RECORDER.get_metric(&format!("{scope}.second_gauge")); + assert!(second_gauge.is_some()); + assert_eq!( + second_gauge.unwrap(), + TestMetric { ty: TestMetricTy::Gauge, description: None, labels: None } + ); + + let counter = RECORDER.get_metric(&format!("{scope}.counter")); + assert!(counter.is_some()); + assert_eq!( + counter.unwrap(), + TestMetric { ty: TestMetricTy::Counter, description: None, labels: None } + ); + + let histogram = RECORDER.get_metric(&format!("{scope}.histogram")); + assert!(histogram.is_some()); + assert_eq!( + histogram.unwrap(), + TestMetric { ty: TestMetricTy::Histogram, description: None, labels: None } + ); +} + +#[test] +#[serial] +fn register_metrics() { + let _guard = RECORDER.enter(); + + let _metrics = CustomMetrics::default(); + + test_register("metrics_custom"); +} + +#[test] +#[serial] +fn register_dynamic_metrics() { + let _guard = RECORDER.enter(); + + let scope = "local_scope"; + + let _metrics = DynamicScopeMetrics::new(scope); + + test_register(scope); +} + +fn test_labels(scope: &str) { + let test_labels = vec![Label::new("key", "value")]; + + let gauge = RECORDER.get_metric(&format!("{scope}.gauge")); + assert!(gauge.is_some()); + let labels = gauge.unwrap().labels; + assert!(labels.is_some()); + assert_eq!(labels.unwrap(), test_labels,); + + let second_gauge = RECORDER.get_metric(&format!("{scope}.second_gauge")); + assert!(second_gauge.is_some()); + let labels = second_gauge.unwrap().labels; + assert!(labels.is_some()); + assert_eq!(labels.unwrap(), test_labels,); + + let counter = RECORDER.get_metric(&format!("{scope}.counter")); + assert!(counter.is_some()); + let labels = counter.unwrap().labels; + assert!(labels.is_some()); + assert_eq!(labels.unwrap(), test_labels,); + + let histogram = RECORDER.get_metric(&format!("{scope}.histogram")); + assert!(histogram.is_some()); + let labels = histogram.unwrap().labels; + assert!(labels.is_some()); + assert_eq!(labels.unwrap(), test_labels,); +} + +#[test] +#[serial] +fn label_metrics() { + let _guard = RECORDER.enter(); + + let _metrics = CustomMetrics::new_with_labels(&[("key", "value")]); + + test_labels("metrics_custom"); +} + +#[test] +#[serial] +fn dynamic_label_metrics() { + let _guard = RECORDER.enter(); + + let scope = "local_scope"; + + let _metrics = DynamicScopeMetrics::new_with_labels(scope, &[("key", "value")]); + + test_labels(scope); +} + +struct TestRecorder { + // Metrics map: key => Option + metrics: Mutex>, +} + +#[derive(PartialEq, Clone, Debug)] +enum TestMetricTy { + Counter, + Gauge, + Histogram, +} + +#[derive(PartialEq, Clone, Debug)] +struct TestMetric { + ty: TestMetricTy, + description: Option, + labels: Option>, +} + +impl TestRecorder { + fn new() -> Self { + Self { metrics: Mutex::new(HashMap::default()) } + } + + /// Sets this recorder as the global recorder for the duration of the returned guard. + #[must_use] + fn enter(&'static self) -> impl Drop { + struct Reset { + recorder: &'static TestRecorder, + } + impl Drop for Reset { + fn drop(&mut self) { + self.recorder.clear(); + } + } + + let _ = metrics::set_global_recorder(self); + Reset { recorder: self } + } + + fn metrics_len(&self) -> usize { + self.metrics.lock().expect("failed to lock metrics").len() + } + + fn get_metric(&self, key: &str) -> Option { + self.metrics.lock().expect("failed to lock metrics").get(key).cloned() + } + + fn record_metric( + &self, + key: &str, + ty: TestMetricTy, + description: Option, + labels: Option>, + ) { + self.metrics + .lock() + .expect("failed to lock metrics") + .insert(key.to_owned(), TestMetric { ty, description, labels }); + } + + fn clear(&self) { + self.metrics.lock().expect("failed to lock metrics").clear(); + } +} + +impl Recorder for &'static TestRecorder { + fn describe_counter(&self, key: KeyName, _unit: Option, description: SharedString) { + self.record_metric( + key.as_str(), + TestMetricTy::Counter, + Some(description.into_owned()), + None, + ) + } + + fn describe_gauge(&self, key: KeyName, _unit: Option, description: SharedString) { + self.record_metric(key.as_str(), TestMetricTy::Gauge, Some(description.into_owned()), None) + } + + fn describe_histogram(&self, key: KeyName, _unit: Option, description: SharedString) { + self.record_metric( + key.as_str(), + TestMetricTy::Histogram, + Some(description.into_owned()), + None, + ) + } + + fn register_counter(&self, key: &Key, _metadata: &Metadata<'_>) -> Counter { + let labels_vec: Vec