diff --git a/Cargo.lock b/Cargo.lock index cb17991c..5a3c4b49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "once_cell", @@ -138,9 +138,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "alloy-chains" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1873637aa7f20369eae38b312cf7550c266d13ebc60f176fd5c82c5127810b" +checksum = "59a5f61137c31916542bb63cd70d0e0dd7a76f76b7f962f4337bc438612d45b2" dependencies = [ "num_enum", "serde", @@ -170,13 +170,12 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc0fac0fc16baf1f63f78b47c3d24718f3619b0714076f6a02957d808d52cbef" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" dependencies = [ "arrayvec", "bytes", - "smol_str 0.2.0", ] [[package]] @@ -188,11 +187,11 @@ dependencies = [ "const-hex", "dunce", "heck", - "indexmap 2.0.2", + "indexmap 2.1.0", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "syn-solidity", "tiny-keccak", ] @@ -226,9 +225,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -246,37 +245,37 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "ark-ff" @@ -308,7 +307,7 @@ dependencies = [ "ark-std 0.4.0", "derivative", "digest 0.10.7", - "itertools", + "itertools 0.10.5", "num-bigint", "num-traits", "paste", @@ -479,9 +478,9 @@ checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" [[package]] name = "async-io" -version = "2.2.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +checksum = "fb41eb19024a91746eba0773aa5e16036045bbf45733766661099e182ea6a744" dependencies = [ "async-lock", "cfg-if", @@ -498,9 +497,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener", "event-listener-strategy", @@ -515,7 +514,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -537,18 +536,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.76" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -715,9 +714,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -802,9 +801,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -930,9 +929,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -945,7 +944,21 @@ checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.21", + "serde", + "serde_json", + "thiserror", +] + +[[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.21", "serde", "serde_json", "thiserror", @@ -1002,9 +1015,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1012,7 +1025,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -1037,9 +1050,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -1048,9 +1061,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.12" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -1058,9 +1071,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -1077,7 +1090,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1102,7 +1115,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1143,7 +1156,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bech32", "bs58", "digest 0.10.7", @@ -1187,9 +1200,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -1214,9 +1227,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1224,9 +1237,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1239,9 +1252,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1278,36 +1291,28 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1317,9 +1322,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -1394,13 +1399,13 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1424,7 +1429,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1435,20 +1440,20 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-encoding-macro" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -1456,9 +1461,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" dependencies = [ "data-encoding", "syn 1.0.109", @@ -1500,9 +1505,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1624,7 +1629,7 @@ dependencies = [ "parking_lot 0.11.2", "rand 0.8.5", "rlp", - "smallvec 1.11.2", + "smallvec 1.13.1", "socket2 0.4.10", "tokio", "tracing", @@ -1641,7 +1646,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1664,9 +1669,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "ecdsa" -version = "0.16.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", "digest 0.10.7", @@ -1688,15 +1693,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", + "subtle", "zeroize", ] @@ -1720,9 +1726,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.6" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", @@ -1761,13 +1767,19 @@ 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 = "enr" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "hex", "k256", @@ -1785,7 +1797,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "ed25519-dalek", "hex", @@ -1807,7 +1819,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1820,18 +1832,18 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "enumn" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" +checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1852,14 +1864,14 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1876,12 +1888,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1975,13 +1987,13 @@ version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ba3fd516c15a9a587135229466dbbfc85796de55c5660afbbb1b1c78517d85c" dependencies = [ - "ethers-addressbook 2.0.10", - "ethers-contract 2.0.10", - "ethers-core 2.0.10", - "ethers-etherscan 2.0.10", - "ethers-middleware 2.0.10", - "ethers-providers 2.0.10", - "ethers-signers 2.0.10", + "ethers-addressbook 2.0.12", + "ethers-contract 2.0.11", + "ethers-core 2.0.12", + "ethers-etherscan 2.0.12", + "ethers-middleware 2.0.11", + "ethers-providers 2.0.11", + "ethers-signers 2.0.11", "ethers-solc 2.0.9", ] @@ -1998,11 +2010,11 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.10" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e9e8acd0ed348403cc73a670c24daba3226c40b98dc1a41903766b3ab6240a" +checksum = "9bf35eb7d2e2092ad41f584951e08ec7c077b142dba29c4f1b8f52d2efddc49c" dependencies = [ - "ethers-core 2.0.10", + "ethers-core 2.0.12", "once_cell", "serde", "serde_json", @@ -2029,15 +2041,15 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d79269278125006bb0552349c03593ffa9702112ca88bc7046cc669f148fb47c" +checksum = "0111ead599d17a7bff6985fd5756f39ca7033edc79a31b23026a8d5d64fa95cd" dependencies = [ "const-hex", - "ethers-contract-abigen 2.0.10", - "ethers-contract-derive 2.0.10", - "ethers-core 2.0.10", - "ethers-providers 2.0.10", + "ethers-contract-abigen 2.0.12", + "ethers-contract-derive 2.0.12", + "ethers-core 2.0.12", + "ethers-providers 2.0.11", "futures-util", "once_cell", "pin-project", @@ -2064,22 +2076,22 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.43", - "toml", + "syn 2.0.48", + "toml 0.7.8", "walkdir", ] [[package]] name = "ethers-contract-abigen" -version = "2.0.10" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95a43c939b2e4e2f3191c5ad4a1f279780b8a39139c9905b43a7433531e2ab" +checksum = "bbdfb952aafd385b31d316ed80d7b76215ce09743c172966d840e96924427e0c" dependencies = [ "Inflector", "const-hex", "dunce", - "ethers-core 2.0.10", - "ethers-etherscan 2.0.10", + "ethers-core 2.0.12", + "ethers-etherscan 2.0.12", "eyre", "prettyplease", "proc-macro2", @@ -2088,8 +2100,8 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.43", - "toml", + "syn 2.0.48", + "toml 0.8.2", "walkdir", ] @@ -2105,23 +2117,23 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "ethers-contract-derive" -version = "2.0.10" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9ce44906fc871b3ee8c69a695ca7ec7f70e50cb379c9b9cb5e532269e492f6" +checksum = "7465c814a2ecd0de0442160da13584205d1cdc08f4717a6511cad455bd5d7dc4" dependencies = [ "Inflector", "const-hex", - "ethers-contract-abigen 2.0.10", - "ethers-core 2.0.10", + "ethers-contract-abigen 2.0.12", + "ethers-core 2.0.12", "proc-macro2", "quote", "serde_json", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2131,7 +2143,7 @@ source = "git+https://github.com/Vid201/ethers-rs?branch=chore/ws#d9c2bafd0c462a dependencies = [ "arrayvec", "bytes", - "cargo_metadata", + "cargo_metadata 0.17.0", "chrono", "const-hex", "elliptic-curve", @@ -2146,7 +2158,7 @@ dependencies = [ "serde", "serde_json", "strum 0.25.0", - "syn 2.0.43", + "syn 2.0.48", "tempfile", "thiserror", "tiny-keccak", @@ -2155,13 +2167,11 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs#88095ba47eb6a3507f0db1767353b387b27a6e98" dependencies = [ "arrayvec", "bytes", - "cargo_metadata", "chrono", "const-hex", "elliptic-curve", @@ -2169,14 +2179,12 @@ dependencies = [ "generic-array", "k256", "num_enum", - "once_cell", "open-fastrlp", "rand 0.8.5", "rlp", "serde", "serde_json", "strum 0.25.0", - "syn 2.0.43", "tempfile", "thiserror", "tiny-keccak", @@ -2185,11 +2193,13 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs#40cc8cc54f7d36aa24147c937772600e5b119399" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918b1a9ba585ea61022647def2f27c29ba19f6d2a4a4c8f68a9ae97fd5769737" dependencies = [ "arrayvec", "bytes", + "cargo_metadata 0.18.1", "chrono", "const-hex", "elliptic-curve", @@ -2197,12 +2207,14 @@ dependencies = [ "generic-array", "k256", "num_enum", + "once_cell", "open-fastrlp", "rand 0.8.5", "rlp", "serde", "serde_json", "strum 0.25.0", + "syn 2.0.48", "tempfile", "thiserror", "tiny-keccak", @@ -2216,7 +2228,7 @@ source = "git+https://github.com/Vid201/ethers-rs?branch=chore/ws#d9c2bafd0c462a dependencies = [ "ethers-core 2.0.8", "reqwest", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -2225,13 +2237,14 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.10" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e53451ea4a8128fbce33966da71132cf9e1040dcfd2a2084fd7733ada7b2045" +checksum = "facabf8551b4d1a3c08cb935e7fca187804b6c2525cc0dafb8e5a6dd453a24de" dependencies = [ - "ethers-core 2.0.10", + "chrono", + "ethers-core 2.0.12", "reqwest", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -2302,17 +2315,16 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473f1ccd0c793871bbc248729fa8df7e6d2981d6226e4343e3bbaa9281074d5d" +checksum = "681ece6eb1d10f7cf4f873059a77c04ff1de4f35c63dd7bccde8f438374fcb93" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.10", - "ethers-core 2.0.10", - "ethers-etherscan 2.0.10", - "ethers-providers 2.0.10", - "ethers-signers 2.0.10", + "ethers-contract 2.0.11", + "ethers-core 2.0.12", + "ethers-providers 2.0.11", + "ethers-signers 2.0.11", "futures-channel", "futures-locks", "futures-util", @@ -2335,7 +2347,7 @@ dependencies = [ "async-recursion", "async-trait", "auto_impl", - "base64 0.21.5", + "base64 0.21.7", "bytes", "const-hex", "enr 0.9.1", @@ -2367,17 +2379,17 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5" +checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.5", + "base64 0.21.7", "bytes", "const-hex", "enr 0.9.1", - "ethers-core 2.0.10", + "ethers-core 2.0.12", "futures-core", "futures-timer", "futures-util", @@ -2422,9 +2434,9 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea44bec930f12292866166f9ddbea6aa76304850e4d8dcd66dc492b43d00ff1" +checksum = "0cb1b714e227bbd2d8c53528adb580b203009728b17d0d0e4119353aa9bc5532" dependencies = [ "async-trait", "coins-bip32", @@ -2432,7 +2444,7 @@ dependencies = [ "const-hex", "elliptic-curve", "eth-keystore", - "ethers-core 2.0.10", + "ethers-core 2.0.12", "rand 0.8.5", "sha2 0.10.8", "thiserror", @@ -2458,7 +2470,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "sha2 0.10.8", @@ -2483,7 +2495,7 @@ dependencies = [ "const-hex", "dirs", "dunce", - "ethers-core 2.0.10", + "ethers-core 2.0.12", "glob", "home", "md-5", @@ -2492,7 +2504,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "solang-parser", @@ -2507,9 +2519,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -2619,9 +2631,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a481586acf778f1b1455424c343f71124b048ffa5f4fc3f8f6ae9dc432dcb3c7" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "fixed-hash" @@ -2764,9 +2776,9 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "futures-core", "pin-project-lite", @@ -2790,7 +2802,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2876,9 +2888,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -2907,9 +2919,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git-version" @@ -2928,7 +2940,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2996,9 +3008,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -3006,7 +3018,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -3036,21 +3048,21 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "serde", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "allocator-api2", ] @@ -3069,7 +3081,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -3094,9 +3106,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -3165,7 +3177,7 @@ dependencies = [ "parking_lot 0.12.1", "rand 0.8.5", "resolv-conf", - "smallvec 1.11.2", + "smallvec 1.13.1", "thiserror", "tokio", "tracing", @@ -3173,9 +3185,9 @@ dependencies = [ [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -3212,11 +3224,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3232,9 +3244,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -3243,9 +3255,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -3278,9 +3290,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -3293,7 +3305,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -3343,16 +3355,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -3421,9 +3433,9 @@ dependencies = [ [[package]] name = "igd-next" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e065e90a518ab5fedf79aa1e4b784e10f8e484a834f6bda85c42633a2cb7af" +checksum = "064d90fec10d541084e7b39ead8875a5a80d9114a2b18791565253bae25f49e4" dependencies = [ "async-trait", "attohttpc", @@ -3495,12 +3507,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -3542,13 +3554,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3560,11 +3572,20 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -3577,9 +3598,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -3680,7 +3701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d94b7505034e2737e688e1153bf81e6f93ad296695c43958d6da2e4321f0a990" dependencies = [ "heck", - "proc-macro-crate 2.0.0", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -3767,7 +3788,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "pem 1.1.1", "ring 0.16.20", "serde", @@ -3777,9 +3798,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", @@ -3791,9 +3812,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3819,7 +3840,7 @@ dependencies = [ "diff", "ena", "is-terminal", - "itertools", + "itertools 0.10.5", "lalrpop-util", "petgraph", "regex", @@ -3850,18 +3871,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -3997,7 +4018,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "rw-stream-sink", - "smallvec 1.11.2", + "smallvec 1.13.1", "thiserror", "unsigned-varint 0.7.2", "void", @@ -4024,7 +4045,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "rw-stream-sink", - "smallvec 1.11.2", + "smallvec 1.13.1", "thiserror", "tracing", "unsigned-varint 0.8.0", @@ -4043,7 +4064,7 @@ dependencies = [ "libp2p-core 0.41.2", "libp2p-identity", "parking_lot 0.12.1", - "smallvec 1.11.2", + "smallvec 1.13.1", "tracing", ] @@ -4054,7 +4075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d665144a616dadebdc5fff186b1233488cdcd8bfb1223218ff084b6d052c94f7" dependencies = [ "asynchronous-codec 0.7.0", - "base64 0.21.5", + "base64 0.21.7", "byteorder", "bytes", "either", @@ -4073,7 +4094,7 @@ dependencies = [ "rand 0.8.5", "regex", "sha2 0.10.8", - "smallvec 1.11.2", + "smallvec 1.13.1", "tracing", "void", ] @@ -4095,7 +4116,7 @@ dependencies = [ "lru 0.12.1", "quick-protobuf", "quick-protobuf-codec", - "smallvec 1.11.2", + "smallvec 1.13.1", "thiserror", "tracing", "void", @@ -4135,7 +4156,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.44.1", "rand 0.8.5", - "smallvec 1.11.2", + "smallvec 1.13.1", "socket2 0.5.5", "tokio", "tracing", @@ -4173,7 +4194,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.12.1", "rand 0.8.5", - "smallvec 1.11.2", + "smallvec 1.13.1", "tracing", "unsigned-varint 0.7.2", ] @@ -4243,7 +4264,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm 0.44.1", "rand 0.8.5", - "smallvec 1.11.2", + "smallvec 1.13.1", "tracing", "void", ] @@ -4265,7 +4286,7 @@ dependencies = [ "multistream-select", "once_cell", "rand 0.8.5", - "smallvec 1.11.2", + "smallvec 1.13.1", "void", ] @@ -4286,7 +4307,7 @@ dependencies = [ "multistream-select", "once_cell", "rand 0.8.5", - "smallvec 1.11.2", + "smallvec 1.13.1", "tokio", "tracing", "void", @@ -4301,7 +4322,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4371,6 +4392,17 @@ dependencies = [ "yamux 0.13.1", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.2", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "libsecp256k1" version = "0.7.1" @@ -4427,9 +4459,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -4453,7 +4485,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.13.1", ] [[package]] @@ -4462,7 +4494,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -4513,18 +4545,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "metrics" @@ -4537,6 +4560,35 @@ dependencies = [ "portable-atomic 0.3.20", ] +[[package]] +name = "metrics" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77b9e10a211c839210fd7f99954bda26e5f8e26ec686ad68da6a32df7c80e782" +dependencies = [ + "ahash 0.8.7", + "portable-atomic 1.6.0", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a4c4718a371ddfb7806378f23617876eea8b82e5ff1324516bcd283249d9ea" +dependencies = [ + "base64 0.21.7", + "hyper", + "hyper-tls", + "indexmap 1.9.3", + "ipnet", + "metrics 0.22.0", + "metrics-util", + "quanta", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "metrics-macros" version = "0.6.0" @@ -4548,6 +4600,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "metrics-util" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2670b8badcc285d486261e2e9f1615b506baff91427b61bd336a472b65bbf5ed" +dependencies = [ + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.13.1", + "indexmap 1.9.3", + "metrics 0.22.0", + "num_cpus", + "ordered-float", + "quanta", + "radix_trie", + "sketches-ddsketch", +] + [[package]] name = "mime" version = "0.3.17" @@ -4571,9 +4642,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", @@ -4663,7 +4734,7 @@ dependencies = [ "futures", "log", "pin-project", - "smallvec 1.11.2", + "smallvec 1.13.1", "unsigned-varint 0.7.2", ] @@ -4757,6 +4828,15 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec 1.13.1", +] + [[package]] name = "nix" version = "0.24.3" @@ -4843,30 +4923,30 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -4882,9 +4962,9 @@ dependencies = [ [[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" @@ -4919,11 +4999,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "foreign-types", "libc", @@ -4940,7 +5020,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4951,9 +5031,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -4967,6 +5047,15 @@ 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" @@ -4995,9 +5084,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec", @@ -5010,11 +5099,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5057,7 +5146,7 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.16", - "smallvec 1.11.2", + "smallvec 1.13.1", "winapi", ] @@ -5070,7 +5159,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.4.1", - "smallvec 1.11.2", + "smallvec 1.13.1", "windows-targets 0.48.5", ] @@ -5140,7 +5229,7 @@ version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "serde", ] @@ -5152,9 +5241,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -5168,7 +5257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.2", + "indexmap 2.1.0", ] [[package]] @@ -5211,7 +5300,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5249,7 +5338,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5276,9 +5365,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "plain_hasher" @@ -5291,15 +5380,15 @@ dependencies = [ [[package]] name = "platforms" -version = "3.1.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polling" -version = "3.3.1" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if", "concurrent-queue", @@ -5391,12 +5480,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5425,11 +5514,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ - "toml_edit 0.20.7", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -5458,9 +5548,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -5485,24 +5575,24 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "proptest" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c003ac8c77cb07bb74f5f198bce836a689bcd5a42574612bf14d17bfd08c20e" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.1", + "bitflags 2.4.2", "lazy_static", "num-traits", "rand 0.8.5", "rand_chacha", "rand_xorshift", - "regex-syntax 0.7.5", + "regex-syntax 0.8.2", "rusty-fork", "tempfile", "unarray", @@ -5526,7 +5616,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.11.0", "log", "multimap", "once_cell", @@ -5535,7 +5625,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.43", + "syn 2.0.48", "tempfile", "which", ] @@ -5547,10 +5637,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5571,6 +5661,21 @@ dependencies = [ "autotools", ] +[[package]] +name = "quanta" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -5649,9 +5754,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -5662,6 +5767,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.4.6" @@ -5729,11 +5844,20 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "raw-cpuid" +version = "11.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" +dependencies = [ + "bitflags 2.4.2", +] + [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -5741,9 +5865,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -5790,24 +5914,24 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.4", "regex-syntax 0.8.2", ] @@ -5822,9 +5946,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick", "memchr", @@ -5860,11 +5984,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -5884,7 +6008,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls 0.21.10", - "rustls-pemfile 1.0.3", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", @@ -5897,7 +6021,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", "winreg", ] @@ -5929,7 +6053,7 @@ dependencies = [ "bytes", "futures", "heapless", - "metrics", + "metrics 0.20.1", "modular-bitfield", "page_size 0.4.2", "parity-scale-codec", @@ -5984,14 +6108,14 @@ dependencies = [ "bytes", "ethers-core 2.0.11", "futures", - "metrics", + "metrics 0.20.1", "pin-project", "reth-codecs", "reth-ecies", "reth-primitives", "reth-rlp", "serde", - "smol_str 0.1.24", + "smol_str", "snap", "thiserror", "tokio", @@ -6115,7 +6239,7 @@ dependencies = [ "ethereum-types", "reth-rlp-derive", "revm-primitives", - "smol_str 0.1.24", + "smol_str", ] [[package]] @@ -6125,7 +6249,7 @@ source = "git+https://github.com/paradigmxyz/reth.git?rev=aa6f2cb0610fb4fa0926b4 dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -6155,7 +6279,7 @@ dependencies = [ "derive_more", "enumn", "fixed-hash", - "hashbrown 0.13.2", + "hashbrown 0.13.1", "hex", "hex-literal 0.3.4", "primitive-types", @@ -6192,9 +6316,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom", @@ -6319,7 +6443,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] @@ -6333,15 +6457,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -6351,21 +6475,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.7", "rustls-webpki 0.101.7", "sct", ] [[package]] name = "rustls" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6b63262c9fcac8659abfaa96cac103d28166d3ff3eaf8f412e19f3ae9e5a48" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.7", "rustls-pki-types", - "rustls-webpki 0.102.0", + "rustls-webpki 0.102.1", "subtle", "zeroize", ] @@ -6377,7 +6501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.3", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -6397,11 +6521,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -6410,7 +6534,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "rustls-pki-types", ] @@ -6436,17 +6560,17 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] [[package]] name = "rustls-webpki" -version = "0.102.0" +version = "0.102.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2635c8bc2b88d367767c5de8ea1d8db9af3f6219eba28442242d9ab81d1b89" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "rustls-pki-types", "untrusted 0.9.0", ] @@ -6482,9 +6606,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "salsa20" @@ -6530,11 +6654,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -6561,7 +6685,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -6632,9 +6756,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] @@ -6662,9 +6786,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -6682,20 +6806,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.109" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -6704,9 +6828,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -6748,7 +6872,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -6839,9 +6963,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -6854,9 +6978,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -6867,6 +6991,7 @@ name = "silius" version = "0.3.0-alpha" dependencies = [ "alloy-chains", + "async-trait", "clap", "dirs", "discv5", @@ -6874,16 +6999,22 @@ dependencies = [ "expanded-pathbuf", "eyre", "log", + "metrics 0.22.0", + "metrics-exporter-prometheus", + "metrics-util", "parking_lot 0.12.1", "pin-utils", + "serde", "serde_json", "silius-bundler", "silius-contracts", "silius-grpc", "silius-mempool", + "silius-metrics", "silius-p2p", "silius-primitives", "silius-rpc", + "thiserror", "tokio", "tracing", "tracing-subscriber", @@ -6941,7 +7072,9 @@ dependencies = [ "expanded-pathbuf", "eyre", "futures", + "hyper", "libp2p-identity", + "metrics 0.22.0", "parking_lot 0.12.1", "prost", "prost-build", @@ -6950,11 +7083,13 @@ dependencies = [ "silius-bundler", "silius-contracts", "silius-mempool", + "silius-metrics", "silius-p2p", "silius-primitives", "tokio", "tonic", "tonic-build", + "tower", "tracing", ] @@ -6985,6 +7120,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "silius-metrics" +version = "0.3.0-alpha" +dependencies = [ + "async-trait", + "ethers 2.0.8", + "futures", + "hyper", + "jsonrpsee", + "metrics 0.22.0", + "metrics-exporter-prometheus", + "metrics-util", + "pin-project", + "serde", + "silius-mempool", + "silius-primitives", + "thiserror", + "tower", + "tracing", +] + [[package]] name = "silius-p2p" version = "0.3.0-alpha" @@ -7048,10 +7204,13 @@ dependencies = [ "hyper", "hyper-tls", "jsonrpsee", + "metrics 0.22.0", + "pin-project", "serde", "serde_json", "silius-grpc", "silius-mempool", + "silius-metrics", "silius-primitives", "tokio", "tonic", @@ -7093,6 +7252,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "sketches-ddsketch" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" + [[package]] name = "slab" version = "0.4.9" @@ -7113,9 +7278,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smol_str" @@ -7126,15 +7291,6 @@ dependencies = [ "serde", ] -[[package]] -name = "smol_str" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" -dependencies = [ - "serde", -] - [[package]] name = "snap" version = "1.1.1" @@ -7152,7 +7308,7 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek", "rand_core 0.6.4", - "ring 0.17.5", + "ring 0.17.7", "rustc_version 0.4.0", "sha2 0.10.8", "subtle", @@ -7200,7 +7356,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c792fe9fae2a2f716846f214ca10d5a1e21133e0bf36cef34bcc4a852467b21" dependencies = [ - "itertools", + "itertools 0.10.5", "lalrpop", "lalrpop-util", "phf", @@ -7225,9 +7381,9 @@ dependencies = [ [[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", @@ -7328,7 +7484,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7348,16 +7504,16 @@ dependencies = [ [[package]] name = "svm-rs" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597e3a746727984cb7ea2487b6a40726cad0dbe86628e7d429aa6b8c4c153db4" +checksum = "20689c7d03b6461b502d0b95d6c24874c7d24dea2688af80486a130a06af3b07" dependencies = [ "dirs", "fs2", "hex", "once_cell", "reqwest", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "sha2 0.10.8", @@ -7368,13 +7524,13 @@ dependencies = [ [[package]] name = "svm-rs-builds" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2271abd7d01895a3e5bfa4b578e32f09155002ce1ec239532e297f82aafad06b" +checksum = "aa64b5e8eecd3a8af7cfc311e29db31a268a62d5953233d3e8243ec77a71c4e3" dependencies = [ "build_const", "hex", - "semver 1.0.20", + "semver 1.0.21", "serde_json", "svm-rs", ] @@ -7392,9 +7548,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -7410,7 +7566,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7470,15 +7626,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.4.1", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7494,9 +7650,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -7519,27 +7675,27 @@ checksum = "7ba277e77219e9eea169e8508942db1bf5d8a41ff2db9b20aab5a5aadc9fa25d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "thiserror" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2cd5904763bad08ad5513ddbb12cf2ae273ca53fa9f68e843e236ec6dfccc09" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.53" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcf4a824cce0aeacd6f38ae6f24234c8e80d68632338ebaa1443b5df9e29e19" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7554,9 +7710,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa", @@ -7574,9 +7730,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -7642,7 +7798,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7671,7 +7827,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.1", + "rustls 0.22.2", "rustls-pki-types", "tokio", ] @@ -7746,11 +7902,23 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -7761,7 +7929,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", "serde", "serde_spanned", "toml_datetime", @@ -7770,11 +7938,13 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.2", + "indexmap 2.1.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -7788,7 +7958,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.5", + "base64 0.21.7", "bytes", "h2", "http", @@ -7816,7 +7986,7 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7845,7 +8015,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", @@ -7889,7 +8059,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -7934,7 +8104,7 @@ dependencies = [ "once_cell", "regex", "sharded-slab", - "smallvec 1.11.2", + "smallvec 1.13.1", "thread_local", "tracing", "tracing-core", @@ -7953,9 +8123,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -8031,9 +8201,9 @@ 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" @@ -8207,9 +8377,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -8217,24 +8387,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -8244,9 +8414,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8254,28 +8424,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -8287,7 +8457,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -8302,9 +8472,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "webpki-roots" @@ -8370,7 +8540,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -8383,6 +8553,15 @@ 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 = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -8517,9 +8696,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -8654,29 +8833,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.20" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.20" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -8689,7 +8868,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 06aae807..694bcd9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ silius-bundler = { version = "0.3.0-alpha", path = "crates/bundler", default-fea silius-contracts = { version = "0.3.0-alpha", path = "crates/contracts", default-features = false } silius-grpc = { version = "0.3.0-alpha", path = "crates/grpc", default-features = false } silius-mempool = { version = "0.3.0-alpha", path = "crates/mempool", default-features = false } +silius-metrics = { version = "0.3.0-alpha", path = "crates/metrics", default-features = false } silius-p2p = { version = "0.3.0-alpha", path = "crates/p2p", default-features = false } silius-primitives = { version = "0.3.0-alpha", path = "crates/primitives", default-features = false } silius-rpc = { version = "0.3.0-alpha", path = "crates/rpc", default-features = false } @@ -68,6 +69,8 @@ tokio = { version = "1.35", features = ["full"] } # misc expanded-pathbuf = "0.1.2" eyre = "0.6.11" +jsonrpsee = { version = "0.21.0", features = ["server", "macros", "client"] } +metrics = "0.22.0" lazy_static = "1.4.0" parking_lot = "0.12.1" serde = "1.0.193" diff --git a/bin/silius/Cargo.toml b/bin/silius/Cargo.toml index 0a4f73ea..f3f4ad53 100644 --- a/bin/silius/Cargo.toml +++ b/bin/silius/Cargo.toml @@ -17,6 +17,7 @@ silius-bundler = { workspace = true } silius-contracts = { workspace = true } silius-grpc = { workspace = true } silius-mempool = { workspace = true, features = ["mdbx"] } +silius-metrics = { workspace = true } silius-p2p = { workspace = true } silius-primitives = { workspace = true } silius-rpc = { workspace = true } @@ -37,10 +38,16 @@ pin-utils = "0.1.0" tokio = { workspace = true } # misc +async-trait = { workspace = true } dirs = "5.0.1" expanded-pathbuf = { workspace = true } eyre = { workspace = true } log = "0.4.20" +metrics = { workspace = true } +metrics-exporter-prometheus = "0.13.0" +metrics-util = "0.16.0" +serde = { workspace = true } serde_json = { workspace = true } +thiserror = { workspace = true } tracing = { workspace = true } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/bin/silius/src/bundler.rs b/bin/silius/src/bundler.rs index b2c1adc1..9eb445a6 100644 --- a/bin/silius/src/bundler.rs +++ b/bin/silius/src/bundler.rs @@ -1,6 +1,7 @@ use crate::{ cli::args::{ - BundlerAndUoPoolArgs, BundlerArgs, CreateWalletArgs, RpcArgs, StorageType, UoPoolArgs, + BundlerAndUoPoolArgs, BundlerArgs, CreateWalletArgs, MetricsArgs, RpcArgs, StorageType, + UoPoolArgs, }, utils::unwrap_path_or_home, }; @@ -19,6 +20,7 @@ use silius_mempool::{ CodeHashes, DatabaseTable, EntitiesReputation, Mempool, Reputation, UserOperations, UserOperationsByEntity, UserOperationsBySender, WriteMap, }; +use silius_metrics::{launch_metrics_exporter, mempool::MetricsHandler}; use silius_primitives::{ bundler::SendStrategy, constants::{ @@ -55,6 +57,7 @@ pub async fn launch_bundler( uopool_args: UoPoolArgs, common_args: BundlerAndUoPoolArgs, rpc_args: RpcArgs, + metrics_args: MetricsArgs, eth_client: Arc, block_streams: Vec, ) -> eyre::Result<()> @@ -67,6 +70,7 @@ where block_streams, common_args.chain, common_args.entry_points.clone(), + metrics_args.clone(), ) .await?; @@ -76,6 +80,7 @@ where common_args.chain, common_args.entry_points, format!("http://{:?}:{:?}", uopool_args.uopool_addr, uopool_args.uopool_port), + metrics_args.clone(), ) .await?; @@ -83,9 +88,14 @@ where rpc_args, format!("http://{:?}:{:?}", uopool_args.uopool_addr, uopool_args.uopool_port), format!("http://{:?}:{:?}", bundler_args.bundler_addr, bundler_args.bundler_port), + metrics_args.clone(), ) .await?; + if metrics_args.enable_metrics { + launch_metrics_exporter(metrics_args.listen_addr(), metrics_args.custom_label_value); + } + Ok(()) } @@ -95,6 +105,7 @@ pub async fn launch_bundling( chain: Option, entry_points: Vec
, uopool_grpc_listen_address: String, + metrics_args: MetricsArgs, ) -> eyre::Result<()> where M: Middleware + Clone + 'static, @@ -140,6 +151,7 @@ where eth_client, client, uopool_grpc_client, + metrics_args.enable_metrics, ); } SendStrategy::Flashbots => { @@ -167,6 +179,7 @@ where eth_client, client, uopool_grpc_client, + metrics_args.enable_metrics, ); } } @@ -182,6 +195,7 @@ pub async fn launch_uopool( block_streams: Vec, chain: Option, entry_points: Vec
, + metrics_args: MetricsArgs, ) -> eyre::Result<()> where M: Middleware + Clone + 'static, @@ -220,7 +234,10 @@ where args.min_priority_fee_per_gas, ); let mempool = Mempool::new( - Arc::new(RwLock::new(HashMap::::default())), + Arc::new(RwLock::new(MetricsHandler::new(HashMap::< + UserOperationHash, + UserOperationSigned, + >::default()))), Arc::new(RwLock::new(HashMap::>::default())), Arc::new(RwLock::new(HashMap::>::default())), Arc::new(RwLock::new(HashMap::>::default())), @@ -233,7 +250,9 @@ where MIN_UNSTAKE_DELAY.into(), Arc::new(RwLock::new(HashSet::
::default())), Arc::new(RwLock::new(HashSet::
::default())), - Arc::new(RwLock::new(HashMap::::default())), + Arc::new(RwLock::new(MetricsHandler::new( + HashMap::::default(), + ))), ); for whiteaddr in args.whitelist.iter() { reputation.add_whitelist(whiteaddr); @@ -253,6 +272,7 @@ where node_enr_file, args.p2p_opts.to_config(), args.p2p_opts.bootnodes, + metrics_args.enable_metrics, ) .await?; info!("Started uopool gRPC service at {:?}:{:?}", args.uopool_addr, args.uopool_port); @@ -269,7 +289,7 @@ where ); env.create_tables().expect("Create mdbx database tables failed"); let mempool = Mempool::new( - DatabaseTable::::new(env.clone()), + MetricsHandler::new(DatabaseTable::::new(env.clone())), DatabaseTable::::new(env.clone()), DatabaseTable::::new(env.clone()), DatabaseTable::::new(env.clone()), @@ -282,7 +302,9 @@ where MIN_UNSTAKE_DELAY.into(), Arc::new(RwLock::new(HashSet::
::default())), Arc::new(RwLock::new(HashSet::
::default())), - DatabaseTable::::new(env.clone()), + MetricsHandler::new(DatabaseTable::::new( + env.clone(), + )), ); for whiteaddr in args.whitelist.iter() { reputation.add_whitelist(whiteaddr); @@ -302,6 +324,7 @@ where node_enr_file, args.p2p_opts.to_config(), args.p2p_opts.bootnodes, + metrics_args.enable_metrics, ) .await?; info!("Started uopool gRPC service at {:?}:{:?}", args.uopool_addr, args.uopool_port); @@ -314,7 +337,10 @@ where args.min_priority_fee_per_gas, ); let mempool = Mempool::new( - Arc::new(RwLock::new(HashMap::::default())), + Arc::new(RwLock::new(MetricsHandler::new(HashMap::< + UserOperationHash, + UserOperationSigned, + >::default()))), Arc::new(RwLock::new(HashMap::>::default())), Arc::new(RwLock::new(HashMap::>::default())), Arc::new(RwLock::new(HashMap::>::default())), @@ -327,7 +353,9 @@ where MIN_UNSTAKE_DELAY.into(), Arc::new(RwLock::new(HashSet::
::default())), Arc::new(RwLock::new(HashSet::
::default())), - Arc::new(RwLock::new(HashMap::::default())), + Arc::new(RwLock::new(MetricsHandler::new( + HashMap::::default(), + ))), ); for whiteaddr in args.whitelist.iter() { reputation.add_whitelist(whiteaddr); @@ -347,6 +375,7 @@ where node_enr_file, args.p2p_opts.to_config(), args.p2p_opts.bootnodes, + metrics_args.enable_metrics, ) .await?; info!("Started uopool gRPC service at {:?}:{:?}", args.uopool_addr, args.uopool_port); @@ -363,7 +392,7 @@ where ); env.create_tables().expect("Create mdbx database tables failed"); let mempool = Mempool::new( - DatabaseTable::::new(env.clone()), + MetricsHandler::new(DatabaseTable::::new(env.clone())), DatabaseTable::::new(env.clone()), DatabaseTable::::new(env.clone()), DatabaseTable::::new(env.clone()), @@ -376,7 +405,9 @@ where MIN_UNSTAKE_DELAY.into(), Arc::new(RwLock::new(HashSet::
::default())), Arc::new(RwLock::new(HashSet::
::default())), - DatabaseTable::::new(env.clone()), + MetricsHandler::new(DatabaseTable::::new( + env.clone(), + )), ); for whiteaddr in args.whitelist.iter() { reputation.add_whitelist(whiteaddr); @@ -396,6 +427,7 @@ where node_enr_file, args.p2p_opts.to_config(), args.p2p_opts.bootnodes, + metrics_args.enable_metrics, ) .await?; info!("Started uopool gRPC service at {:?}:{:?}", args.uopool_addr, args.uopool_port); @@ -409,6 +441,7 @@ pub async fn launch_rpc( args: RpcArgs, uopool_grpc_listen_address: String, bundler_grpc_listen_address: String, + metrics_args: MetricsArgs, ) -> eyre::Result<()> { if !args.is_enabled() { return Err(eyre::eyre!("No RPC protocol is enabled")); @@ -431,6 +464,11 @@ pub async fn launch_rpc( server = server.with_proxy(eth_client_proxy_address); } + if metrics_args.enable_metrics { + info!("Enabling json rpc server metrics."); + server = server.with_metrics() + } + let http_api: HashSet = HashSet::from_iter(args.http_api.iter().cloned()); let ws_api: HashSet = HashSet::from_iter(args.ws_api.iter().cloned()); diff --git a/bin/silius/src/cli/args.rs b/bin/silius/src/cli/args.rs index d8033c33..24f411ea 100644 --- a/bin/silius/src/cli/args.rs +++ b/bin/silius/src/cli/args.rs @@ -1,11 +1,13 @@ use crate::utils::{ - parse_address, parse_duration, parse_enr, parse_send_bundle_mode, parse_u256, parse_uopool_mode, + parse_address, parse_duration, parse_enr, parse_label_value, parse_send_bundle_mode, + parse_u256, parse_uopool_mode, }; use alloy_chains::NamedChain; use clap::{Parser, ValueEnum}; use discv5::Enr; use ethers::types::{Address, U256}; use expanded_pathbuf::ExpandedPathBuf; +use silius_metrics::label::LabelValue; use silius_p2p::config::{Config, ListenAddr}; use silius_primitives::{ bundler::SendStrategy, @@ -17,7 +19,7 @@ use silius_primitives::{ UoPoolMode, }; use std::{ - net::{IpAddr, Ipv4Addr}, + net::{IpAddr, Ipv4Addr, SocketAddr}, path::PathBuf, time::Duration, }; @@ -129,6 +131,9 @@ pub struct BundlerAndUoPoolArgs { /// Poll interval event filters and pending transactions in milliseconds. #[clap(long, default_value = "500", value_parser= parse_duration)] pub poll_interval: Duration, + + #[clap(flatten)] + pub metrics: MetricsArgs, } /// RPC CLI args @@ -290,6 +295,25 @@ impl P2PArgs { } } } + +#[derive(Clone, Debug, Parser, PartialEq)] +pub struct MetricsArgs { + #[clap(long)] + pub enable_metrics: bool, + #[clap(long, value_delimiter = ',', value_parser=parse_label_value)] + pub custom_label_value: Option>, + #[clap(long = "metrics.addr", default_value = "127.0.0.1")] + pub listen_address: Ipv4Addr, + #[clap(long = "metrics.port", default_value = "3030")] + pub port: u16, +} + +impl MetricsArgs { + pub fn listen_addr(&self) -> SocketAddr { + SocketAddr::new(IpAddr::V4(self.listen_address), self.port) + } +} + #[cfg(test)] mod tests { use super::*; @@ -354,6 +378,12 @@ mod tests { Address::from_str("0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990").unwrap() ], poll_interval: Duration::from_millis(5000), + metrics: MetricsArgs { + enable_metrics: false, + custom_label_value: None, + listen_address: Ipv4Addr::new(127, 0, 0, 1), + port: 3030 + } }, BundlerAndUoPoolArgs::try_parse_from(args).unwrap() ); @@ -621,4 +651,30 @@ mod tests { P2PArgs::try_parse_from(args).unwrap() ) } + + #[test] + fn metrics_args() { + let args = vec![ + "metricsargs", + "--enable-metrics", + "--metrics.addr", + "127.0.0.1", + "--metrics.port", + "9090", + "--custom-label-value", + "custom=value", + ]; + assert_eq!( + MetricsArgs { + enable_metrics: true, + listen_address: Ipv4Addr::new(127, 0, 0, 1), + port: 9090, + custom_label_value: Some(vec![LabelValue::new( + String::from("custom"), + String::from("value") + )]) + }, + MetricsArgs::try_parse_from(args).unwrap() + ) + } } diff --git a/bin/silius/src/cli/commands.rs b/bin/silius/src/cli/commands.rs index de21bb6f..1a377fd0 100644 --- a/bin/silius/src/cli/commands.rs +++ b/bin/silius/src/cli/commands.rs @@ -1,4 +1,6 @@ -use super::args::{BundlerAndUoPoolArgs, BundlerArgs, CreateWalletArgs, RpcArgs, UoPoolArgs}; +use super::args::{ + BundlerAndUoPoolArgs, BundlerArgs, CreateWalletArgs, MetricsArgs, RpcArgs, UoPoolArgs, +}; use crate::bundler::{create_wallet, launch_bundler, launch_bundling, launch_rpc, launch_uopool}; use clap::{Parser, Subcommand}; use ethers::types::Address; @@ -6,6 +8,7 @@ use silius_mempool::{ init_env, DatabaseTable, UserOperationAddrOp, UserOperationOp, UserOperations, UserOperationsByEntity, UserOperationsBySender, WriteMap, }; +use silius_metrics::ethers::MetricsMiddleware; use silius_primitives::provider::{ create_http_block_streams, create_http_provider, create_ws_block_streams, create_ws_provider, }; @@ -35,30 +38,34 @@ impl NodeCommand { /// Execute the command pub async fn execute(self) -> eyre::Result<()> { if self.common.eth_client_address.clone().starts_with("http") { - let eth_client = Arc::new( + let http_client = create_http_provider(&self.common.eth_client_address, self.common.poll_interval) - .await?, - ); + .await?; + let eth_client = Arc::new(MetricsMiddleware::new(http_client)); + let block_streams = create_http_block_streams(eth_client.clone(), self.common.entry_points.len()).await; launch_bundler( self.bundler, self.uopool, - self.common, + self.common.clone(), self.rpc, + self.common.metrics, eth_client, block_streams, ) .await?; } else { - let eth_client = Arc::new(create_ws_provider(&self.common.eth_client_address).await?); + let http_client = create_ws_provider(&self.common.eth_client_address).await?; + let eth_client = Arc::new(MetricsMiddleware::new(http_client)); let block_streams = create_ws_block_streams(eth_client.clone(), self.common.entry_points.len()).await; launch_bundler( self.bundler, self.uopool, - self.common, + self.common.clone(), self.rpc, + self.common.metrics, eth_client, block_streams, ) @@ -99,6 +106,7 @@ impl BundlerCommand { self.common.chain, self.common.entry_points, self.uopool_grpc_listen_address, + self.common.metrics, ) .await?; } else { @@ -109,6 +117,7 @@ impl BundlerCommand { self.common.chain, self.common.entry_points, self.uopool_grpc_listen_address, + self.common.metrics, ) .await?; } @@ -145,6 +154,7 @@ impl UoPoolCommand { block_streams, self.common.chain, self.common.entry_points, + self.common.metrics, ) .await?; } else { @@ -157,6 +167,7 @@ impl UoPoolCommand { block_streams, self.common.chain, self.common.entry_points, + self.common.metrics, ) .await?; } @@ -179,13 +190,22 @@ pub struct RpcCommand { /// Bundler gRPC listen address #[clap(long, default_value = "http://127.0.0.1:3003")] pub bundler_grpc_listen_address: String, + + /// All metrics args + #[clap(flatten)] + metrics: MetricsArgs, } impl RpcCommand { /// Execute the command pub async fn execute(self) -> eyre::Result<()> { - launch_rpc(self.rpc, self.uopool_grpc_listen_address, self.bundler_grpc_listen_address) - .await?; + launch_rpc( + self.rpc, + self.uopool_grpc_listen_address, + self.bundler_grpc_listen_address, + self.metrics, + ) + .await?; pending().await } } diff --git a/bin/silius/src/utils.rs b/bin/silius/src/utils.rs index bc935f70..31a64dd6 100644 --- a/bin/silius/src/utils.rs +++ b/bin/silius/src/utils.rs @@ -3,6 +3,7 @@ use discv5::Enr; use ethers::types::{Address, U256}; use expanded_pathbuf::ExpandedPathBuf; use pin_utils::pin_mut; +use silius_metrics::label::LabelValue; use silius_primitives::{bundler::SendStrategy, UoPoolMode}; use std::{future::Future, str::FromStr, time::Duration}; use tracing::info; @@ -49,6 +50,17 @@ pub fn parse_duration(duration: &str) -> Result { Ok(Duration::from_millis(seconds)) } +pub fn parse_label_value(label_value: &str) -> Result { + let mut split = label_value.split('='); + let label = split + .next() + .ok_or_else(|| format!("LabelValue {label_value} is not a valid label=value"))?; + let value = split + .next() + .ok_or_else(|| format!("LabelValue {label_value} is not a valid label=value"))?; + Ok(LabelValue::new(label.to_string(), value.to_string())) +} + /// Runs the future to completion or until: /// - `ctrl-c` is received. /// - `SIGTERM` is received (unix only). diff --git a/crates/grpc/Cargo.toml b/crates/grpc/Cargo.toml index e5247dcc..bd1ce637 100644 --- a/crates/grpc/Cargo.toml +++ b/crates/grpc/Cargo.toml @@ -16,6 +16,7 @@ homepage = "https://github.com/silius-rs/silius/tree/main/crates/grpc" silius-bundler = { workspace = true } silius-contracts = { workspace = true } silius-mempool = { workspace = true } +silius-metrics = { workspace = true } silius-p2p = { workspace = true } silius-primitives = { workspace = true } @@ -25,12 +26,14 @@ discv5 = { workspace = true } ethers = { workspace = true } # grpc +hyper = { version = "0.14.20" } prost = "0.12.3" tonic = { version = "0.10.2", default-features = false, features = [ "codegen", "prost", "transport", ] } +tower = { version = "0.4.13" } # p2p libp2p-identity = "0.2.8" @@ -47,6 +50,7 @@ tokio = { workspace = true } arrayref = "0.3.7" expanded-pathbuf = { workspace = true } eyre = { workspace = true } +metrics = { workspace = true } serde_json = { workspace = true } tracing = { workspace = true } diff --git a/crates/grpc/src/bundler.rs b/crates/grpc/src/bundler.rs index 6595b20f..50a71ab3 100644 --- a/crates/grpc/src/bundler.rs +++ b/crates/grpc/src/bundler.rs @@ -10,6 +10,7 @@ use ethers::{ }; use parking_lot::Mutex; use silius_bundler::{Bundler, SendBundleOp}; +use silius_metrics::grpc::MetricsLayer; use silius_primitives::{UserOperation, Wallet}; use std::{net::SocketAddr, sync::Arc, time::Duration}; use tonic::{Request, Response, Status}; @@ -173,6 +174,7 @@ pub fn bundler_service_run( eth_client: Arc, client: Arc, uopool_grpc_client: UoPoolClient, + enable_metrics: bool, ) where M: Middleware + Clone + 'static, S: SendBundleOp + Clone + 'static, @@ -198,6 +200,11 @@ pub fn bundler_service_run( tokio::spawn(async move { let mut builder = tonic::transport::Server::builder(); let svc = bundler_server::BundlerServer::new(bundler_service); - builder.add_service(svc).serve(addr).await + if enable_metrics { + builder.layer(MetricsLayer).add_service(svc).serve(addr).await + } else { + builder.add_service(svc).serve(addr).await + } + // let route = builder.add_service(svc) }); } diff --git a/crates/grpc/src/uopool.rs b/crates/grpc/src/uopool.rs index 7d75b9a6..b6819dec 100644 --- a/crates/grpc/src/uopool.rs +++ b/crates/grpc/src/uopool.rs @@ -22,6 +22,7 @@ use silius_mempool::{ SimulationTraceCheck, UoPool as UserOperationPool, UoPoolBuilder, UserOperationAct, UserOperationAddrAct, UserOperationCodeHashAct, }; +use silius_metrics::grpc::MetricsLayer; use silius_p2p::{ config::Config, enr::{build_enr, keypair_to_combined}, @@ -402,6 +403,7 @@ pub async fn uopool_service_run( node_enr_file: PathBuf, config: Config, bootnodes: Vec, + enable_metrics: bool, ) -> Result<()> where M: Middleware + Clone + 'static, @@ -560,8 +562,11 @@ where SimCk, SimTrCk, >::new(uopool_map, chain)); - - builder.add_service(svc).serve(addr).await + if enable_metrics { + builder.layer(MetricsLayer).add_service(svc).serve(addr).await + } else { + builder.add_service(svc).serve(addr).await + } }); tokio::time::sleep(Duration::from_secs(1)).await; diff --git a/crates/mempool/src/database/reputation.rs b/crates/mempool/src/database/reputation.rs index 69bdf6cc..b9e89bed 100644 --- a/crates/mempool/src/database/reputation.rs +++ b/crates/mempool/src/database/reputation.rs @@ -2,7 +2,7 @@ use super::{tables::EntitiesReputation, utils::WrapAddress, DatabaseTable}; use crate::{mempool::ClearOp, reputation::ReputationEntryOp, ReputationError}; use ethers::types::Address; use reth_db::{ - cursor::{DbCursorRO, DbCursorRW}, + cursor::DbCursorRO, database::Database, mdbx::EnvironmentKind, transaction::{DbTx, DbTxMut}, @@ -29,12 +29,11 @@ impl ReputationEntryOp for DatabaseTable Result, ReputationError> { let tx = self.env.tx_mut()?; - let original = tx.get::((*addr).into())?; - tx.put::((*addr).into(), entry.into())?; + let original = tx.get::((entry.address).into())?; + tx.put::((entry.address).into(), entry.into())?; tx.commit()?; Ok(original.map(|o| o.into())) } @@ -43,27 +42,6 @@ impl ReputationEntryOp for DatabaseTable Result<(), ReputationError> { - let tx = self.env.tx_mut()?; - let mut cursor = tx.cursor_write::()?; - - while let Ok(Some((addr_wrap, ent))) = cursor.next() { - let mut ent: ReputationEntry = ent.into(); - ent.uo_seen = ent.uo_seen * 23 / 24; - ent.uo_included = ent.uo_included * 23 / 24; - - if ent.uo_seen > 0 || ent.uo_included > 0 { - cursor.upsert(addr_wrap, ent.into())?; - } else { - cursor.delete_current()?; - } - } - - tx.commit()?; - - Ok(()) - } - fn get_all(&self) -> Vec { self.env .tx() diff --git a/crates/mempool/src/lib.rs b/crates/mempool/src/lib.rs index 227cccd1..5b92b09b 100644 --- a/crates/mempool/src/lib.rs +++ b/crates/mempool/src/lib.rs @@ -7,6 +7,7 @@ mod database; pub mod error; mod memory; mod mempool; +pub mod metrics; mod reputation; mod uopool; mod utils; @@ -27,9 +28,9 @@ pub use error::{ SimulationError, }; pub use mempool::{ - mempool_id, AddRemoveUserOp, AddRemoveUserOpHash, Mempool, MempoolId, UserOperationAct, - UserOperationAddrAct, UserOperationAddrOp, UserOperationCodeHashAct, UserOperationCodeHashOp, - UserOperationOp, + mempool_id, AddRemoveUserOp, AddRemoveUserOpHash, ClearOp, Mempool, MempoolId, + UserOperationAct, UserOperationAddrAct, UserOperationAddrOp, UserOperationCodeHashAct, + UserOperationCodeHashOp, UserOperationOp, }; pub use reputation::{HashSetOp, Reputation, ReputationEntryOp}; pub use uopool::UoPool; diff --git a/crates/mempool/src/memory/reputation.rs b/crates/mempool/src/memory/reputation.rs index b36ab826..e1c196c5 100644 --- a/crates/mempool/src/memory/reputation.rs +++ b/crates/mempool/src/memory/reputation.rs @@ -34,26 +34,15 @@ impl ReputationEntryOp for HashMap { fn set_entry( &mut self, - addr: &Address, entry: ReputationEntry, ) -> Result, ReputationError> { - Ok(self.insert(*addr, entry)) + Ok(self.insert(entry.address, entry)) } fn contains_entry(&self, addr: &Address) -> Result { Ok(self.contains_key(addr)) } - fn update(&mut self) -> Result<(), ReputationError> { - for (_, ent) in self.iter_mut() { - ent.uo_seen = ent.uo_seen * 23 / 24; - ent.uo_included = ent.uo_included * 23 / 24; - } - self.retain(|_, ent| ent.uo_seen > 0 || ent.uo_included > 0); - - Ok(()) - } - fn get_all(&self) -> Vec { self.values().cloned().collect() } diff --git a/crates/mempool/src/metrics.rs b/crates/mempool/src/metrics.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/crates/mempool/src/metrics.rs @@ -0,0 +1 @@ + diff --git a/crates/mempool/src/reputation.rs b/crates/mempool/src/reputation.rs index d213bb9e..3884c283 100644 --- a/crates/mempool/src/reputation.rs +++ b/crates/mempool/src/reputation.rs @@ -84,7 +84,6 @@ pub trait ReputationEntryOp: ClearOp + Sync + Send { /// operation. fn set_entry( &mut self, - addr: &Address, entry: ReputationEntry, ) -> Result, ReputationError>; @@ -106,7 +105,15 @@ pub trait ReputationEntryOp: ClearOp + Sync + Send { /// /// Returns `Ok(())` if the update was successful, or an `Err` if an error occurred during the /// update. - fn update(&mut self) -> Result<(), ReputationError>; + fn update(&mut self) -> Result<(), ReputationError> { + let all = self.get_all(); + for mut ent in all { + ent.uo_seen = ent.uo_seen * 23 / 24; + ent.uo_included = ent.uo_included * 23 / 24; + self.set_entry(ent)?; + } + Ok(()) + } /// Retrieves all reputation entries. /// @@ -123,10 +130,9 @@ impl ReputationEntryOp for Arc> { fn set_entry( &mut self, - addr: &Address, entry: ReputationEntry, ) -> Result, ReputationError> { - self.write().set_entry(addr, entry) + self.write().set_entry(entry) } fn contains_entry(&self, addr: &Address) -> Result { @@ -226,7 +232,7 @@ where if !self.entities.contains_entry(addr)? { let ent = ReputationEntry::default_with_addr(*addr); - self.entities.set_entry(addr, ent)?; + self.entities.set_entry(ent)?; } Ok(()) @@ -260,7 +266,7 @@ where self.set_default(addr)?; if let Some(mut ent) = self.entities.get_entry(addr)? { ent.uo_seen += 1; - self.entities.set_entry(addr, ent)?; + self.entities.set_entry(ent)?; } Ok(()) } @@ -278,7 +284,7 @@ where self.set_default(addr)?; if let Some(mut ent) = self.entities.get_entry(addr)? { ent.uo_included += 1; - self.entities.set_entry(addr, ent)?; + self.entities.set_entry(ent)?; } Ok(()) } @@ -400,7 +406,7 @@ where if let Some(mut ent) = self.entities.get_entry(addr)? { ent.uo_seen = 100; ent.uo_included = 0; - self.entities.set_entry(addr, ent)?; + self.entities.set_entry(ent)?; } Ok(()) @@ -462,7 +468,7 @@ where /// * `Ok(())` if the entries were set successfully pub fn set_entities(&mut self, entries: Vec) -> Result<(), ReputationError> { for en in entries { - self.entities.set_entry(&en.address.clone(), en)?; + self.entities.set_entry(en)?; } Ok(()) diff --git a/crates/metrics/Cargo.toml b/crates/metrics/Cargo.toml new file mode 100644 index 00000000..2fe75926 --- /dev/null +++ b/crates/metrics/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "silius-metrics" +version = { workspace = true } +authors = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +rust-version = { workspace = true } +keywords = { workspace = true } +categories = { workspace = true } +description = "Account abstraction (ERC-4337) metrics" +homepage = "https://github.com/silius-rs/silius/tree/main/crates/metrics" + +[dependencies] +silius-mempool = { workspace = true } +silius-primitives = { workspace = true } + +async-trait = { workspace = true } +ethers = { workspace = true } +futures = { workspace = true } +hyper = { version = "0.14.20" } +jsonrpsee = { workspace = true } +metrics = { workspace = true } +metrics-exporter-prometheus = "0.13.0" +metrics-util = "0.16.0" +pin-project = "1.1.3" +serde = { workspace = true } +thiserror = { workspace = true } +tower = { version = "0.4.13" } +tracing = { workspace = true } + + +[features] diff --git a/crates/metrics/README.md b/crates/metrics/README.md new file mode 100644 index 00000000..d761f6cf --- /dev/null +++ b/crates/metrics/README.md @@ -0,0 +1,3 @@ +# Metrics + +This is the README file for the Metrics crate. diff --git a/crates/metrics/src/ethers.rs b/crates/metrics/src/ethers.rs new file mode 100644 index 00000000..962453ef --- /dev/null +++ b/crates/metrics/src/ethers.rs @@ -0,0 +1,438 @@ +use async_trait::async_trait; +use ethers::{ + providers::{ + FilterWatcher, LogQuery, Middleware, MiddlewareError, PendingTransaction, PubsubClient, + SubscriptionStream, + }, + types::{ + transaction::{eip2718::TypedTransaction, eip2930::AccessListWithGasUsed}, + Address, Block, BlockId, BlockNumber, Bytes, FeeHistory, Filter, + GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, Log, NameOrAddress, + Signature, Transaction, TransactionReceipt, H256, U256, U64, + }, +}; +use metrics::counter; +use serde::Serialize; +use std::fmt::Debug; +use thiserror::Error; + +#[derive(Debug, Clone)] +pub struct MetricsMiddleware { + inner: M, +} + +impl MetricsMiddleware +where + M: Middleware, +{ + pub fn new(inner: M) -> Self { + Self { inner } + } +} + +#[derive(Error, Debug)] +pub enum MetricError { + /// Thrown when the internal middleware errors + #[error("{0}")] + MiddlewareError(M::Error), +} + +impl MiddlewareError for MetricError { + type Inner = M::Error; + + fn from_err(src: M::Error) -> Self { + MetricError::MiddlewareError(src) + } + + fn as_inner(&self) -> Option<&Self::Inner> { + match self { + MetricError::MiddlewareError(e) => Some(e), + } + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl Middleware for MetricsMiddleware +where + M: Middleware, +{ + type Error = MetricError; + + type Provider = M::Provider; + + type Inner = M; + + fn inner(&self) -> &Self::Inner { + &self.inner + } + + async fn client_version(&self) -> Result { + counter!("silius_ethers_client_version").increment(1); + result_counter(self.inner().client_version().await, "silius_ethers_client_version") + } + + /// Get the block number + async fn get_block_number(&self) -> Result { + counter!("silius_ethers_get_block_number").increment(1); + result_counter(self.inner().get_block_number().await, "silius_ethers_get_block_number") + } + + async fn send_transaction + Send + Sync>( + &self, + tx: T, + block: Option, + ) -> Result, Self::Error> { + counter!("silius_ethers_send_transaction").increment(1); + result_counter( + self.inner().send_transaction(tx, block).await, + "silius_ethers_send_transaction", + ) + } + + async fn get_block + Send + Sync>( + &self, + block_hash_or_number: T, + ) -> Result>, Self::Error> { + counter!("silius_ethers_get_block").increment(1); + result_counter( + self.inner().get_block(block_hash_or_number).await, + "silius_ethers_get_block", + ) + } + + async fn get_block_with_txs + Send + Sync>( + &self, + block_hash_or_number: T, + ) -> Result>, Self::Error> { + counter!("silius_ethers_get_block_with_txs").increment(1); + result_counter( + self.inner().get_block_with_txs(block_hash_or_number).await, + "silius_ethers_get_block_with_txs", + ) + } + + async fn get_transaction_count + Send + Sync>( + &self, + from: T, + block: Option, + ) -> Result { + counter!("silius_ethers_get_transaction_count").increment(1); + result_counter( + self.inner().get_transaction_count(from, block).await, + "silius_ethers_get_transaction_count", + ) + } + + async fn estimate_gas( + &self, + tx: &TypedTransaction, + block: Option, + ) -> Result { + counter!("silius_ethers_estimate_gas").increment(1); + result_counter(self.inner().estimate_gas(tx, block).await, "silius_ethers_estimate_gas") + } + + async fn call( + &self, + tx: &TypedTransaction, + block: Option, + ) -> Result { + counter!("silius_ethers_call").increment(1); + result_counter(self.inner().call(tx, block).await, "silius_ethers_call") + } + + async fn get_chainid(&self) -> Result { + counter!("silius_ethers_get_chainid").increment(1); + result_counter(self.inner().get_chainid().await, "silius_ethers_get_chainid") + } + + async fn get_balance + Send + Sync>( + &self, + from: T, + block: Option, + ) -> Result { + counter!("silius_ethers_get_balance").increment(1); + result_counter(self.inner().get_balance(from, block).await, "silius_ethers_get_balance") + } + + async fn get_transaction>( + &self, + transaction_hash: T, + ) -> Result, Self::Error> { + counter!("silius_ethers_get_transaction").increment(1); + result_counter( + self.inner().get_transaction(transaction_hash).await, + "silius_ethers_get_transaction", + ) + } + + async fn get_transaction_receipt>( + &self, + transaction_hash: T, + ) -> Result, Self::Error> { + counter!("silius_ethers_get_transaction_receipt").increment(1); + result_counter( + self.inner().get_transaction_receipt(transaction_hash).await, + "silius_ethers_get_transaction_receipt", + ) + } + + async fn get_block_receipts + Send + Sync>( + &self, + block: T, + ) -> Result, Self::Error> { + counter!("silius_ethers_get_block_receipts").increment(1); + result_counter( + self.inner().get_block_receipts(block).await, + "silius_ethers_get_block_receipts", + ) + } + + async fn get_gas_price(&self) -> Result { + counter!("silius_ethers_get_gas_price").increment(1); + result_counter(self.inner().get_gas_price().await, "silius_ethers_get_gas_price") + } + + async fn estimate_eip1559_fees( + &self, + estimator: Option>) -> (U256, U256)>, + ) -> Result<(U256, U256), Self::Error> { + counter!("silius_ethers_estimate_eip1559_fees").increment(1); + result_counter( + self.inner().estimate_eip1559_fees(estimator).await, + "silius_ethers_estimate_eip1559_fees", + ) + } + + async fn get_accounts(&self) -> Result, Self::Error> { + counter!("silius_ethers_get_accounts").increment(1); + result_counter(self.inner().get_accounts().await, "silius_ethers_get_accounts") + } + + async fn send_raw_transaction<'a>( + &'a self, + tx: Bytes, + ) -> Result, Self::Error> { + counter!("silius_ethers_send_raw_transaction").increment(1); + result_counter( + self.inner().send_raw_transaction(tx).await, + "silius_ethers_send_raw_transaction", + ) + } + + async fn sign + Send + Sync>( + &self, + data: T, + from: &Address, + ) -> Result { + counter!("silius_ethers_sign").increment(1); + result_counter(self.inner().sign(data, from).await, "silius_ethers_sign") + } + + async fn sign_transaction( + &self, + tx: &TypedTransaction, + from: Address, + ) -> Result { + counter!("silius_ethers_sign_transaction").increment(1); + result_counter( + self.inner().sign_transaction(tx, from).await, + "silius_ethers_sign_transaction", + ) + } + + async fn get_logs(&self, filter: &Filter) -> Result, Self::Error> { + counter!("silius_ethers_get_logs").increment(1); + result_counter(self.inner().get_logs(filter).await, "silius_ethers_get_logs") + } + + fn get_logs_paginated<'a>( + &'a self, + filter: &Filter, + page_size: u64, + ) -> LogQuery<'a, Self::Provider> { + counter!("silius_ethers_get_logs_paginated").increment(1); + self.inner().get_logs_paginated(filter, page_size) + } + + async fn watch<'a>( + &'a self, + filter: &Filter, + ) -> Result, Self::Error> { + counter!("silius_ethers_watch").increment(1); + result_counter(self.inner().watch(filter).await, "silius_ethers_watch") + } + + async fn watch_pending_transactions( + &self, + ) -> Result, Self::Error> { + counter!("silius_ethers_watch_pending_transactions").increment(1); + result_counter( + self.inner().watch_pending_transactions().await, + "silius_ethers_watch_pending_transactions", + ) + } + async fn watch_blocks(&self) -> Result, Self::Error> { + counter!("silius_ethers_watch_blocks").increment(1); + result_counter(self.inner().watch_blocks().await, "silius_ethers_watch_blocks") + } + async fn get_code + Send + Sync>( + &self, + at: T, + block: Option, + ) -> Result { + counter!("silius_ethers_get_code").increment(1); + result_counter(self.inner().get_code(at, block).await, "silius_ethers_get_code") + } + + async fn get_storage_at + Send + Sync>( + &self, + from: T, + location: H256, + block: Option, + ) -> Result { + counter!("silius_ethers_get_storage_at").increment(1); + result_counter( + self.inner().get_storage_at(from, location, block).await, + "silius_ethers_get_storage_at", + ) + } + + async fn debug_trace_transaction( + &self, + tx_hash: H256, + trace_options: GethDebugTracingOptions, + ) -> Result { + counter!("silius_ethers_debug_trace_transaction").increment(1); + result_counter( + self.inner().debug_trace_transaction(tx_hash, trace_options).await, + "silius_ethers_debug_trace_transaction", + ) + } + + async fn debug_trace_call + Send + Sync>( + &self, + req: T, + block: Option, + trace_options: GethDebugTracingCallOptions, + ) -> Result { + counter!("silius_ethers_debug_trace_call").increment(1); + result_counter( + self.inner().debug_trace_call(req, block, trace_options).await, + "silius_ethers_debug_trace_call", + ) + } + + async fn debug_trace_block_by_number( + &self, + block: Option, + trace_options: GethDebugTracingOptions, + ) -> Result, Self::Error> { + counter!("silius_ethers_debug_trace_block_by_number").increment(1); + result_counter( + self.inner().debug_trace_block_by_number(block, trace_options).await, + "silius_ethers_debug_trace_block_by_number", + ) + } + + async fn debug_trace_block_by_hash( + &self, + block: H256, + trace_options: GethDebugTracingOptions, + ) -> Result, Self::Error> { + counter!("silius_ethers_debug_trace_block_by_hash").increment(1); + result_counter( + self.inner().debug_trace_block_by_hash(block, trace_options).await, + "silius_ethers_debug_trace_block_by_hash", + ) + } + + async fn subscribe_blocks( + &self, + ) -> Result>, Self::Error> + where + ::Provider: PubsubClient, + { + counter!("silius_ethers_subscribe_blocks").increment(1); + result_counter(self.inner().subscribe_blocks().await, "silius_ethers_subscribe_blocks") + } + + async fn subscribe_pending_txs( + &self, + ) -> Result, Self::Error> + where + ::Provider: PubsubClient, + { + counter!("silius_ethers_subscribe_pending_txs").increment(1); + result_counter( + self.inner().subscribe_pending_txs().await, + "silius_ethers_subscribe_pending_txs", + ) + } + + async fn subscribe_full_pending_txs( + &self, + ) -> Result, Self::Error> + where + ::Provider: PubsubClient, + { + counter!("silius_ethers_subscribe_full_pending_txs").increment(1); + result_counter( + self.inner().subscribe_full_pending_txs().await, + "silius_ethers_subscribe_full_pending_txs", + ) + } + async fn subscribe_logs<'a>( + &'a self, + filter: &Filter, + ) -> Result, Self::Error> + where + ::Provider: PubsubClient, + { + counter!("silius_ethers_subscribe_logs").increment(1); + result_counter(self.inner().subscribe_logs(filter).await, "silius_ethers_subscribe_logs") + } + + async fn fee_history + Serialize + Send + Sync>( + &self, + block_count: T, + last_block: BlockNumber, + reward_percentiles: &[f64], + ) -> Result { + counter!("silius_ethers_fee_history").increment(1); + result_counter( + self.inner().fee_history(block_count, last_block, reward_percentiles).await, + "silius_ethers_fee_history", + ) + } + + async fn create_access_list( + &self, + tx: &TypedTransaction, + block: Option, + ) -> Result { + counter!("silius_ethers_create_access_list").increment(1); + result_counter( + self.inner().create_access_list(tx, block).await, + "silius_ethers_create_access_list", + ) + } +} + +fn result_counter(result: Result, request_type: &str) -> Result> +where + M: Middleware, + E: Send + Sync + Debug, +{ + match result { + Ok(res) => { + counter!(format!("{request_type}_success")).increment(1); + Ok(res) + } + Err(e) => { + counter!(format!("{request_type}_failed")).increment(1); + Err(MiddlewareError::from_err(e)) + } + } +} diff --git a/crates/metrics/src/grpc.rs b/crates/metrics/src/grpc.rs new file mode 100644 index 00000000..84f5442a --- /dev/null +++ b/crates/metrics/src/grpc.rs @@ -0,0 +1,74 @@ +use futures::Future; +use hyper::{Body, Request}; +use metrics::{counter, describe_counter}; +use std::{error::Error, pin::Pin}; +use tower::{Layer, Service}; + +const GRPC_REQUEST: &str = "silius_grpc_request"; +const GRPC_REQUEST_SUCCESS: &str = "silius_grpc_request_success"; +const GRPC_REQUEST_FAILED: &str = "silius_grpc_request_failed"; + +#[derive(Clone, Default)] +pub struct MetricsLayer; + +impl Layer for MetricsLayer { + type Service = MetricService; + fn layer(&self, inner: S) -> Self::Service { + MetricService { inner } + } +} + +#[derive(Clone)] +pub struct MetricService { + inner: S, +} + +impl Service> for MetricService +where + S: Service> + Clone + Send + 'static, + S::Response: 'static, + S::Error: Into> + 'static, + S::Future: Send + 'static, +{ + type Response = S::Response; + type Error = S::Error; + type Future = + Pin> + Send + 'static>>; + + fn poll_ready( + &mut self, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + self.inner.poll_ready(cx) + } + + fn call(&mut self, req: Request) -> Self::Future { + let clone = self.inner.clone(); + // take the service that was ready + let mut inner = std::mem::replace(&mut self.inner, clone); + let fut = async move { + let (req_header, body) = req.into_parts(); + let path = req_header.uri.path().to_string(); + + counter!(GRPC_REQUEST, "path" => path.clone()).increment(1); + let result = inner.call(Request::from_parts(req_header, body)).await; + match result { + Ok(response) => { + counter!(GRPC_REQUEST_SUCCESS, "path" => path.clone()).increment(1); + Ok(response) + } + Err(e) => { + counter!(GRPC_REQUEST_FAILED, "path" => path.clone()).increment(1); + Err(e) + } + } + }; + Box::pin(fut) + } +} + +pub fn describe_grpc_metrics() { + describe_counter!(GRPC_REQUEST, "grpc request count"); + describe_counter!(GRPC_REQUEST_SUCCESS, "grpc request success count"); + describe_counter!(GRPC_REQUEST_FAILED, "grpc request failed count"); +} diff --git a/crates/metrics/src/label.rs b/crates/metrics/src/label.rs new file mode 100644 index 00000000..ce46c1d5 --- /dev/null +++ b/crates/metrics/src/label.rs @@ -0,0 +1,13 @@ +/// Represents a label-value pair. +/// Mainly used for metrics system. +#[derive(Debug, Clone, PartialEq)] +pub struct LabelValue { + pub label: String, + pub value: String, +} + +impl LabelValue { + pub fn new(label: String, value: String) -> Self { + Self { label, value } + } +} diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs new file mode 100644 index 00000000..daa4b8be --- /dev/null +++ b/crates/metrics/src/lib.rs @@ -0,0 +1,36 @@ +use crate::{ + grpc::describe_grpc_metrics, mempool::describe_mempool_metrics, rpc::describe_json_rpc_metrics, +}; +use label::LabelValue; +use metrics_exporter_prometheus::PrometheusBuilder; +use metrics_util::MetricKindMask; +use std::{net::SocketAddr, time::Duration}; +use tracing::info; + +pub mod ethers; +pub mod grpc; +pub mod label; +pub mod mempool; +pub mod rpc; + +pub fn launch_metrics_exporter(listen_addr: SocketAddr, label_value_opt: Option>) { + let mut builder = PrometheusBuilder::new(); + info!("launching Prometheus metrics exporter on {}", listen_addr); + if let Some(label_values) = label_value_opt { + for LabelValue { label, value } in label_values.iter() { + builder = builder.add_global_label(label, value); + } + } + builder + .with_http_listener(listen_addr) + .idle_timeout( + MetricKindMask::COUNTER | MetricKindMask::HISTOGRAM, + Some(Duration::from_secs(10)), + ) + .install() + .expect("failed to install Prometheus recorder"); + + describe_json_rpc_metrics(); + describe_mempool_metrics(); + describe_grpc_metrics(); +} diff --git a/crates/metrics/src/mempool.rs b/crates/metrics/src/mempool.rs new file mode 100644 index 00000000..83e192cd --- /dev/null +++ b/crates/metrics/src/mempool.rs @@ -0,0 +1,133 @@ +use metrics::{counter, describe_counter, describe_gauge, gauge}; +use silius_mempool::{ + AddRemoveUserOp, ClearOp, MempoolErrorKind, ReputationEntryOp, ReputationError, UserOperationOp, +}; +use silius_primitives::{UserOperation, UserOperationHash}; + +const MEMPOOL_SIZE: &str = "silius_mempool_size"; +const MEMPOOL_ADD_ERROR: &str = "silius_mempool_add_error"; +const MEMPOOL_REMOVE_ERROR: &str = "silius_mempool_remove_error"; +const REPUTATION_UO_SEEN: &str = "silius_reputation_uo_seen"; +const REPUTATION_UO_INCLUDED: &str = "silius_reputation_uo_included"; +const REPUTATION_STATUS: &str = "silius_reputation_status"; +const REPUTATION_SET_ENTRY_ERROR: &str = "silius_reputation_set_entry.error"; + +#[derive(Clone)] +pub struct MetricsHandler { + inner: S, +} + +impl MetricsHandler { + pub fn new(inner: S) -> Self { + Self { inner } + } +} + +impl AddRemoveUserOp for MetricsHandler { + fn add(&mut self, uo: UserOperation) -> Result { + match self.inner.add(uo) { + Ok(res) => { + gauge!(MEMPOOL_SIZE).increment(1f64); + Ok(res) + } + Err(e) => { + counter!(MEMPOOL_ADD_ERROR, "error" => format!("{:?}", e)).increment(1); + Err(e) + } + } + } + + fn remove_by_uo_hash( + &mut self, + uo_hash: &silius_primitives::UserOperationHash, + ) -> Result { + match self.inner.remove_by_uo_hash(uo_hash) { + Ok(res) => { + gauge!(MEMPOOL_SIZE).decrement(1f64); + Ok(res) + } + Err(e) => { + counter!(MEMPOOL_REMOVE_ERROR, "error" => format!("{:?}", e)).increment(1); + Err(e) + } + } + } +} + +impl UserOperationOp for MetricsHandler { + fn get_by_uo_hash( + &self, + uo_hash: &silius_primitives::UserOperationHash, + ) -> Result, MempoolErrorKind> { + self.inner.get_by_uo_hash(uo_hash) + } + + fn get_sorted(&self) -> Result, MempoolErrorKind> { + self.inner.get_sorted() + } + + fn get_all(&self) -> Result, MempoolErrorKind> { + self.inner.get_all() + } +} + +impl ClearOp for MetricsHandler { + fn clear(&mut self) { + self.inner.clear() + } +} + +impl ReputationEntryOp for MetricsHandler { + fn get_entry( + &self, + addr: ðers::types::Address, + ) -> Result, ReputationError> { + self.inner.get_entry(addr) + } + + fn set_entry( + &mut self, + entry: silius_primitives::reputation::ReputationEntry, + ) -> Result, ReputationError> { + let addr = entry.address; + match self.inner.set_entry(entry.clone()) { + Ok(res) => { + gauge!(REPUTATION_UO_SEEN, "address" => format!("{addr:x}")) + .set(entry.uo_seen as f64); + gauge!(REPUTATION_UO_INCLUDED, "address" => format!("{addr:x}")) + .set(entry.uo_included as f64); + gauge!(REPUTATION_STATUS, "address" => format!("{addr:x}")) + .set(entry.status as f64); + Ok(res) + } + Err(e) => { + counter!(REPUTATION_SET_ENTRY_ERROR, "error" => format!("{:?}", e)).increment(1); + Err(e) + } + } + } + + fn contains_entry(&self, addr: ðers::types::Address) -> Result { + self.inner.contains_entry(addr) + } + + fn get_all(&self) -> Vec { + self.inner.get_all() + } +} + +pub fn describe_mempool_metrics() { + describe_gauge!(MEMPOOL_SIZE, "The number of user operations in the mempool"); + describe_counter!(MEMPOOL_ADD_ERROR, "The number of errors when adding to the mempool"); + describe_counter!(MEMPOOL_REMOVE_ERROR, "The number of errors when removing from the mempool"); + describe_gauge!(REPUTATION_UO_SEEN, "The number of user operations seen for an address"); + describe_gauge!( + REPUTATION_UO_INCLUDED, + "The number of user operations included for an address" + ); + describe_gauge!(REPUTATION_STATUS, "The status of an address"); + describe_counter!( + REPUTATION_SET_ENTRY_ERROR, + "The number of errors when setting a reputation entry" + ) +} diff --git a/crates/metrics/src/rpc.rs b/crates/metrics/src/rpc.rs new file mode 100644 index 00000000..4caeaa42 --- /dev/null +++ b/crates/metrics/src/rpc.rs @@ -0,0 +1,107 @@ +use jsonrpsee::{ + helpers::MethodResponseResult, server::middleware::rpc::RpcServiceT, types::Request, + MethodResponse, +}; +use metrics::{counter, describe_counter}; +use pin_project::pin_project; +use std::{ + future::Future, + pin::Pin, + task::{Context, Poll}, +}; +use tower::Layer; + +const RPC_REQUEST: &str = "silius_rpc_request"; +const RPC_REQUEST_SUCCESS: &str = "silius_rpc_request_success"; +const RPC_REQUEST_FAILED: &str = "silius_rpc_request_failed"; + +#[derive(Clone, Debug, Default)] +pub struct MetricsLayer; + +impl MetricsLayer { + pub fn new() -> Self { + Self + } +} + +impl Layer for MetricsLayer { + type Service = MetricService; + + fn layer(&self, inner: S) -> Self::Service { + MetricService::new(inner) + } +} + +#[derive(Clone)] +pub struct MetricService { + inner: T, +} + +impl MetricService { + pub fn new(inner: T) -> Self { + Self { inner } + } +} + +impl<'a, S> RpcServiceT<'a> for MetricService +where + S: RpcServiceT<'a>, +{ + type Future = MetricsFuture; + + fn call(&self, request: Request<'a>) -> Self::Future { + let method = request.method_name().to_string(); + counter!(RPC_REQUEST, "method" => method.clone()).increment(1); + MetricsFuture { fut: self.inner.call(request), method } + } +} +/// Response future to log the response for a method call. +#[pin_project] +pub struct MetricsFuture { + #[pin] + fut: F, + method: String, +} + +impl std::fmt::Debug for MetricsFuture { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("MetricsFuture") + } +} + +impl> Future for MetricsFuture { + type Output = F::Output; + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let method = self.as_ref().method.clone(); + + let fut = self.project().fut; + + let res = fut.poll(cx); + if let Poll::Ready(rp) = &res { + let is_subscription = rp.is_subscription() as i32; + match rp.success_or_error { + MethodResponseResult::Success => counter!( + RPC_REQUEST_SUCCESS, + "method" => method, + "is_subscription" => is_subscription.to_string() + ) + .increment(1), + MethodResponseResult::Failed(code) => counter!( + RPC_REQUEST_FAILED, + "method" => method, + "code" => code.to_string(), + "is_subscription" => is_subscription.to_string() + ) + .increment(1), + } + } + res + } +} + +pub fn describe_json_rpc_metrics() { + describe_counter!(RPC_REQUEST, "The number of json rpc requests so far"); + describe_counter!(RPC_REQUEST_SUCCESS, "The number of successful json rpc requests so far"); + describe_counter!(RPC_REQUEST_FAILED, "The number of failed json rpc requests so far") +} diff --git a/crates/primitives/src/provider.rs b/crates/primitives/src/provider.rs index 6fef105b..2e7f2145 100644 --- a/crates/primitives/src/provider.rs +++ b/crates/primitives/src/provider.rs @@ -2,7 +2,7 @@ use async_stream::stream; use ethers::{ - providers::{Http, Middleware, Provider, Ws}, + providers::{Http, Middleware, Provider, PubsubClient, Ws}, types::H256, }; use futures_util::{Stream, StreamExt}; @@ -27,7 +27,7 @@ pub async fn create_ws_provider(addr: &str) -> eyre::Result> { } /// Listens for new blocks over HTTP connection -pub async fn create_http_block_stream(provider: Arc>) -> BlockStream { +pub async fn create_http_block_stream(provider: Arc) -> BlockStream { Box::pin(stream! { let mut stream = provider.watch_blocks().await?.stream(); while let Some(hash) = stream.next().await { @@ -37,8 +37,8 @@ pub async fn create_http_block_stream(provider: Arc>) -> BlockStr } /// Create multiple HTTP block streams -pub async fn create_http_block_streams( - provider: Arc>, +pub async fn create_http_block_streams( + provider: Arc, n: usize, ) -> Vec { let mut streams = Vec::new(); @@ -49,7 +49,10 @@ pub async fn create_http_block_streams( } /// Listens for new block over WS connection -pub async fn create_ws_block_stream(provider: Arc>) -> BlockStream { +pub async fn create_ws_block_stream(provider: Arc) -> BlockStream +where + ::Provider: PubsubClient, +{ Box::pin(stream! { let mut stream = provider.subscribe_blocks().await?; while let Some(block) = stream.next().await { @@ -61,7 +64,13 @@ pub async fn create_ws_block_stream(provider: Arc>) -> BlockStream } /// Creates multiple WS block streams -pub async fn create_ws_block_streams(provider: Arc>, n: usize) -> Vec { +pub async fn create_ws_block_streams( + provider: Arc, + n: usize, +) -> Vec +where + ::Provider: PubsubClient, +{ let mut streams = Vec::new(); for _ in 0..n { streams.push(create_ws_block_stream(provider.clone()).await); diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index 51502114..6158d5e3 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -15,6 +15,7 @@ homepage = "https://github.com/silius-rs/silius/tree/main/crates/rpc" # workspace dependencies silius-grpc = { workspace = true } silius-mempool = { workspace = true } +silius-metrics = { workspace = true } silius-primitives = { workspace = true } # eth @@ -23,7 +24,7 @@ ethers = { workspace = true } # rpc hyper = { version = "0.14.20" } hyper-tls = { version = "0.5.0" } -jsonrpsee = { version = "0.21.0", features = ["server", "macros", "client"] } +jsonrpsee = { workspace = true } tower = { version = "0.4.13" } tower-http = { version = "0.4.0", features = ["cors"] } @@ -32,10 +33,12 @@ tonic = { version = "0.10.2", default-features = false, features = ["transport"] # async async-trait = { workspace = true } +pin-project = "1.1.3" # misc eyre = { workspace = true } git-version = "0.3.9" +metrics = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } diff --git a/crates/rpc/src/middleware.rs b/crates/rpc/src/middleware.rs index 8e6ec790..bbea256f 100644 --- a/crates/rpc/src/middleware.rs +++ b/crates/rpc/src/middleware.rs @@ -87,8 +87,9 @@ where fn call(&mut self, req: Request) -> Self::Future { let addr = String::from(self.address.as_ref()); - let mut inner = self.inner.clone(); - + let clone = self.inner.clone(); + // take the service that was ready + let mut inner = std::mem::replace(&mut self.inner, clone); let res_fut = async move { let (req_h, req_b) = req.into_parts(); let req_bb = hyper::body::to_bytes(req_b).await?; diff --git a/crates/rpc/src/rpc.rs b/crates/rpc/src/rpc.rs index d9ccdf7a..70646abc 100644 --- a/crates/rpc/src/rpc.rs +++ b/crates/rpc/src/rpc.rs @@ -2,9 +2,10 @@ use super::middleware::ProxyJsonRpcLayer; use eyre::Error; use hyper::{http::HeaderValue, Method}; use jsonrpsee::{ - server::{ServerBuilder, ServerHandle}, + server::{RpcServiceBuilder, ServerBuilder, ServerHandle}, Methods, }; +use silius_metrics::rpc::MetricsLayer; use std::net::{IpAddr, SocketAddr}; use tower::ServiceBuilder; use tower_http::cors::{AllowOrigin, Any, CorsLayer}; @@ -33,6 +34,9 @@ pub struct JsonRpcServer { ws_cors_layer: Option, /// The [proxy layer](ProxyJsonRpcLayer) to forward requests. proxy_layer: Option, + /// This [metric layer](MetricsLayer) is used for collecting and reporting metrics related to + /// RPC operations. + metric_layer: Option, } pub enum JsonRpcServerType { @@ -77,6 +81,7 @@ impl JsonRpcServer { ws_methods: Methods::new(), ws_cors_layer: None, proxy_layer: None, + metric_layer: None, } } @@ -130,6 +135,11 @@ impl JsonRpcServer { self } + pub fn with_metrics(mut self) -> Self { + self.metric_layer = Some(MetricsLayer::new()); + self + } + /// Add methods to the RPC server. /// /// # Arguments @@ -165,9 +175,11 @@ impl JsonRpcServer { let service = ServiceBuilder::new() .option_layer(self.http_cors_layer.clone()) .option_layer(self.proxy_layer.clone()); + let rpc_service = RpcServiceBuilder::new().option_layer(self.metric_layer.clone()); let server = ServerBuilder::new() .http_only() + .set_rpc_middleware(rpc_service) .set_http_middleware(service) .build(SocketAddr::new(self.http_addr, self.http_port)) .await?; @@ -180,9 +192,10 @@ impl JsonRpcServer { let service = ServiceBuilder::new() .option_layer(self.ws_cors_layer.clone()) .option_layer(self.proxy_layer.clone()); - + let rpc_service = RpcServiceBuilder::new().option_layer(self.metric_layer.clone()); let server = ServerBuilder::new() .ws_only() + .set_rpc_middleware(rpc_service) .set_http_middleware(service) .build(SocketAddr::new(self.ws_addr, self.ws_port)) .await?;