diff --git a/hermes/.envrc.sample b/hermes/.envrc.sample new file mode 100644 index 000000000..dfdc5e8ad --- /dev/null +++ b/hermes/.envrc.sample @@ -0,0 +1,6 @@ +export PYTHNET_HTTP_ADDR=http://pythnet-http-rpc/ +export PYTHNET_WS_ADDR=ws://pythnet-ws-rpc/ +export RPC_LISTEN_ADDR=0.0.0.0:7575 +export BENCHMARKS_ENDPOINT=https://benchmarks.pyth.network +export WORMHOLE_SPY_RPC_ADDR=http://spy-or-beacon-rpc +export RUST_LOG=info diff --git a/hermes/Cargo.lock b/hermes/Cargo.lock index 93e0ca1f0..cc0732a4b 100644 --- a/hermes/Cargo.lock +++ b/hermes/Cargo.lock @@ -48,20 +48,6 @@ dependencies = [ "opaque-debug", ] -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes", - "cipher 0.3.0", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "aes-gcm-siv" version = "0.10.3" @@ -196,12 +182,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -247,29 +227,12 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "assert_matches" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - [[package]] name = "async-compression" version = "0.4.1" @@ -280,68 +243,10 @@ dependencies = [ "flate2", "futures-core", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite", "tokio", ] -[[package]] -name = "async-executor" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" -dependencies = [ - "async-lock", - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite", - "log", - "parking", - "polling", - "rustix 0.37.23", - "slab", - "socket2 0.4.9", - "waker-fn", -] - -[[package]] -name = "async-lock" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" -dependencies = [ - "event-listener", -] - [[package]] name = "async-mutex" version = "1.4.0" @@ -351,46 +256,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-std" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" -dependencies = [ - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite 0.2.10", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "trust-dns-resolver", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -399,7 +264,7 @@ checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", - "pin-project-lite 0.2.10", + "pin-project-lite", ] [[package]] @@ -413,12 +278,6 @@ dependencies = [ "syn 2.0.26", ] -[[package]] -name = "async-task" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" - [[package]] name = "async-trait" version = "0.1.73" @@ -430,31 +289,6 @@ dependencies = [ "syn 2.0.26", ] -[[package]] -name = "asynchronous-codec" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" -dependencies = [ - "bytes", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.10", -] - -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "atomic-waker" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" - [[package]] name = "atty" version = "0.2.14" @@ -493,7 +327,7 @@ dependencies = [ "memchr", "mime", "percent-encoding", - "pin-project-lite 0.2.10", + "pin-project-lite", "rustversion", "serde", "serde_json", @@ -531,7 +365,7 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdca6a10ecad987bda04e95606ef85a5417dcaac1a78455242d72e031e2b6b62" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2 1.0.66", "quote 1.0.31", "syn 2.0.26", @@ -576,12 +410,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bimap" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" - [[package]] name = "bincode" version = "1.3.3" @@ -612,17 +440,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "blake3" version = "1.4.1" @@ -630,7 +447,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "cc", "cfg-if", "constant_time_eq", @@ -662,21 +479,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "blocking" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" -dependencies = [ - "async-channel", - "async-lock", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "log", -] - [[package]] name = "borsh" version = "0.9.3" @@ -878,31 +680,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08493fa7707effc63254c66c6ea908675912493cd67952eda23c09fae2610b1" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "zeroize", -] - -[[package]] -name = "chacha20poly1305" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6547abe025f4027edacd9edaa357aded014eecec42a5070d9b885c3c334aba2" -dependencies = [ - "aead", - "chacha20", - "cipher 0.3.0", - "poly1305", - "zeroize", -] - [[package]] name = "chrono" version = "0.4.28" @@ -981,7 +758,7 @@ version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2 1.0.66", "quote 1.0.31", "syn 2.0.26", @@ -999,15 +776,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.7" @@ -1171,17 +939,6 @@ dependencies = [ "cipher 0.3.0", ] -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - [[package]] name = "curve25519-dalek" version = "3.2.1" @@ -1206,7 +963,7 @@ dependencies = [ "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.8", + "parking_lot_core", ] [[package]] @@ -1253,7 +1010,7 @@ dependencies = [ "convert_case", "proc-macro2 1.0.66", "quote 1.0.31", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1364,16 +1121,6 @@ dependencies = [ "syn 0.15.44", ] -[[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -dependencies = [ - "byteorder", - "quick-error", -] - [[package]] name = "dtoa" version = "1.0.9" @@ -1442,18 +1189,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enum-as-inner" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" -dependencies = [ - "heck 0.4.1", - "proc-macro2 1.0.66", - "quote 1.0.31", - "syn 1.0.109", -] - [[package]] name = "enum-iterator" version = "0.7.0" @@ -1582,7 +1317,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "libz-sys", "miniz_oxide", ] @@ -1656,7 +1390,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -1665,21 +1398,6 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.10", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.28" @@ -1691,17 +1409,6 @@ dependencies = [ "syn 2.0.26", ] -[[package]] -name = "futures-rustls" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" -dependencies = [ - "futures-io", - "rustls 0.20.8", - "webpki", -] - [[package]] name = "futures-sink" version = "0.3.28" @@ -1733,7 +1440,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite", "pin-utils", "slab", ] @@ -1792,34 +1499,12 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "governor" version = "0.6.0" @@ -1832,7 +1517,7 @@ dependencies = [ "futures-timer", "no-std-compat", "nonzero_ext", - "parking_lot 0.12.1", + "parking_lot", "quanta", "rand 0.8.5", "smallvec", @@ -1881,15 +1566,6 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -1898,7 +1574,7 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermes" -version = "0.3.3" +version = "0.4.0" dependencies = [ "anyhow", "async-trait", @@ -1919,13 +1595,12 @@ dependencies = [ "ipnet", "lazy_static", "libc", - "libp2p", "log", "mock_instant", "nonzero_ext", "prometheus-client", - "prost 0.12.1", - "prost-build 0.12.1", + "prost", + "prost-build", "pyth-sdk", "pythnet-sdk", "rand 0.8.5", @@ -1975,12 +1650,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "histogram" version = "0.6.9" @@ -2017,17 +1686,6 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.9" @@ -2047,7 +1705,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.10", + "pin-project-lite", ] [[package]] @@ -2090,8 +1748,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.10", - "socket2 0.4.9", + "pin-project-lite", + "socket2", "tokio", "tower-service", "tracing", @@ -2119,7 +1777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ "hyper", - "pin-project-lite 0.2.10", + "pin-project-lite", "tokio", "tokio-io-timeout", ] @@ -2148,7 +1806,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows", ] [[package]] @@ -2160,17 +1818,6 @@ dependencies = [ "cc", ] -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.4.0" @@ -2188,52 +1835,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9007da9cacbd3e6343da136e98b0d2df013f553d35bdec8b518f07bea768e19c" [[package]] -name = "if-addrs" -version = "0.7.0" +name = "im" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ - "libc", - "winapi", + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", ] [[package]] -name = "if-watch" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" -dependencies = [ - "async-io", - "core-foundation", - "fnv", - "futures", - "if-addrs", - "ipnet", - "log", - "rtnetlink", - "system-configuration", - "windows 0.34.0", -] - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - -[[package]] -name = "indexmap" -version = "1.9.3" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ @@ -2293,18 +1912,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi", - "winreg 0.6.2", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -2379,15 +1986,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2410,514 +2008,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libp2p" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f592f1b06f12a5686a5de7be9f289a161c96d5f89f12b04b7d14cf3d61d7381" -dependencies = [ - "atomic", - "bytes", - "futures", - "futures-timer", - "getrandom 0.2.10", - "instant", - "lazy_static", - "libp2p-autonat", - "libp2p-core", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-metrics", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-rendezvous", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-swarm-derive", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "parking_lot 0.11.2", - "pin-project 1.1.2", - "rand 0.7.3", - "smallvec", -] - -[[package]] -name = "libp2p-autonat" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0e6bbc00385edde71430e7d261d13edebcf0e52aecac8f0081a299f960c545" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-request-response", - "libp2p-swarm", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", -] - -[[package]] -name = "libp2p-core" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c4178afd65bf7c56744b4e0a6cfa6e9b694fe666efba596e03a46f79454d8d" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "lazy_static", - "libsecp256k1 0.7.1", - "log", - "multiaddr", - "multihash", - "multistream-select", - "parking_lot 0.11.2", - "pin-project 1.1.2", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", - "ring", - "rw-stream-sink", - "sha2 0.10.7", - "smallvec", - "thiserror", - "unsigned-varint", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-deflate" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d56c68b9c5d435bbd8cdd20101348194b18d1e6ff29ece7a223734aa7eb695c" -dependencies = [ - "flate2", - "futures", - "libp2p-core", -] - -[[package]] -name = "libp2p-dns" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d4a2e7efe62c738833b6be6c0f158cf7ffccba462320f4b3bebe43e1050e7b" -dependencies = [ - "async-std-resolver", - "futures", - "libp2p-core", - "log", - "smallvec", - "trust-dns-resolver", -] - -[[package]] -name = "libp2p-floodsub" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604b6ad64c07a49a9e5e78d4f25c9ad28a17d5fefb1384d7ea35b3201e4aeed3" -dependencies = [ - "cuckoofilter", - "fnv", - "futures", - "libp2p-core", - "libp2p-swarm", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.7.3", - "smallvec", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385ae5f44e84f51e17014c9f1d98464121d3b1b182c167a0b4482d6250c61926" -dependencies = [ - "asynchronous-codec", - "base64 0.13.1", - "byteorder", - "bytes", - "fnv", - "futures", - "futures-timer", - "hex_fmt", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "open-metrics-client", - "pin-project 1.1.2", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.7.3", - "regex", - "sha2 0.10.7", - "smallvec", - "unsigned-varint", -] - -[[package]] -name = "libp2p-identify" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5d84b4e57cb66abb9dd28ea36f69620816e004a7479c0ad76f45002820f99b" -dependencies = [ - "futures", - "futures-timer", - "libp2p-core", - "libp2p-swarm", - "log", - "lru", - "prost 0.9.0", - "prost-build 0.9.0", - "smallvec", -] - -[[package]] -name = "libp2p-kad" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eeaa28a4c7a8c574874e090c2a731ecc7b81595911fee425b552c799a20abbb" -dependencies = [ - "arrayvec 0.5.2", - "asynchronous-codec", - "bytes", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.7.3", - "sha2 0.10.7", - "smallvec", - "thiserror", - "uint", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-mdns" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5904049ad1fee7f2c2c792be892f3dde8ff5c21213d55702a35e777311326f" -dependencies = [ - "async-io", - "data-encoding", - "dns-parser", - "futures", - "if-watch", - "lazy_static", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec", - "socket2 0.4.9", - "void", -] - -[[package]] -name = "libp2p-metrics" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0791098ddec13b0c2f9ed37a29175f7c712ce8804ebaba7cbd8bddbc83120190" -dependencies = [ - "libp2p-core", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-ping", - "libp2p-relay", - "libp2p-swarm", - "open-metrics-client", -] - -[[package]] -name = "libp2p-mplex" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d470ee73a74340e429fa278469ed274a648738e3fb8de2e8d113482441732f" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.7.3", - "smallvec", - "unsigned-varint", -] - -[[package]] -name = "libp2p-noise" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3676dc2df10a7f4f6a80fbeaf2ce4168a0ca6567273e3105b21fa4c877be9017" -dependencies = [ - "bytes", - "curve25519-dalek", - "futures", - "lazy_static", - "libp2p-core", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", - "sha2 0.10.7", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "libp2p-ping" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d384b30135f122a59bf0d186647ad307da0878a9563232cb382d9dbded6a393e" -dependencies = [ - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83203abb14ae77de42c49be8dbed7ea8dfb83e76773226aa664a96e6c5e18c5d" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6468f382568da936b4fa1cff273ce59b1debf873ff5f4ca412c3b91d0b37442c" -dependencies = [ - "futures", - "log", - "pin-project 1.1.2", - "rand 0.8.5", - "salsa20", - "sha3 0.10.8", -] - -[[package]] -name = "libp2p-relay" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb41d0408839f0975af3e5820bdc3ceea308a7282785d7ca77d28ea33dbb62a" -dependencies = [ - "asynchronous-codec", - "bytes", - "either", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "pin-project 1.1.2", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", - "smallvec", - "static_assertions", - "thiserror", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-rendezvous" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec166a822f4167929c8e1673c05106f7c86a42b8e9e917b569e1d86f06b9d8b5" -dependencies = [ - "asynchronous-codec", - "bimap", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "prost 0.9.0", - "prost-build 0.9.0", - "rand 0.8.5", - "sha2 0.10.7", - "thiserror", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-request-response" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36194499f5b03d66d56badbed430d93bf1bfd9cec80311e03280de130fbe3d5e" -dependencies = [ - "async-trait", - "bytes", - "futures", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "smallvec", - "unsigned-varint", -] - -[[package]] -name = "libp2p-swarm" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8ae0811c7a05b6edc6684eb5cc69b055cbb715ad780e6b97872d90308503c1" -dependencies = [ - "either", - "futures", - "futures-timer", - "instant", - "libp2p-core", - "log", - "rand 0.7.3", - "smallvec", - "void", -] - -[[package]] -name = "libp2p-swarm-derive" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b4d0acd47739fe0b570728d8d11bbb535050d84c0cf05d6477a4891fceae10" -dependencies = [ - "quote 1.0.31", - "syn 1.0.109", -] - -[[package]] -name = "libp2p-tcp" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52042e8796c5b58d0415bceb1bcb1bcca28b222339978e52b1a0305800bb5199" -dependencies = [ - "async-io", - "futures", - "futures-timer", - "if-watch", - "ipnet", - "libc", - "libp2p-core", - "log", - "socket2 0.4.9", -] - -[[package]] -name = "libp2p-uds" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "098f90cb3a0273a830d2595ca7f4de6ca848530ee42324f5c660e2b8955211df" -dependencies = [ - "async-std", - "futures", - "libp2p-core", - "log", -] - -[[package]] -name = "libp2p-wasm-ext" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0e8a3817fc156752f6695e57630a9bceb6ae92e9b9f0a161552702fd76ad45" -dependencies = [ - "futures", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] - -[[package]] -name = "libp2p-websocket" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d788da0ab952632d6ead2486baf38a98db92907d4bc5d0f324af0d0fab803d" -dependencies = [ - "either", - "futures", - "futures-rustls", - "libp2p-core", - "log", - "quicksink", - "rw-stream-sink", - "soketto", - "url", - "webpki-roots", -] - -[[package]] -name = "libp2p-yamux" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053d13ce0670d29f9c5a974cf371e6cc4d2d864da1c72bf6870ac5d5e45e2036" -dependencies = [ - "futures", - "libp2p-core", - "parking_lot 0.11.2", - "thiserror", - "yamux", -] - [[package]] name = "libsecp256k1" version = "0.6.0" @@ -2928,34 +2018,15 @@ dependencies = [ "base64 0.12.3", "digest 0.9.0", "hmac-drbg", - "libsecp256k1-core 0.2.2", - "libsecp256k1-gen-ecmult 0.2.1", - "libsecp256k1-gen-genmult 0.2.1", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", "rand 0.7.3", "serde", "sha2 0.9.9", "typenum", ] -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core 0.3.0", - "libsecp256k1-gen-ecmult 0.3.0", - "libsecp256k1-gen-genmult 0.3.0", - "rand 0.8.5", - "serde", - "sha2 0.9.9", - "typenum", -] - [[package]] name = "libsecp256k1-core" version = "0.2.2" @@ -2967,33 +2038,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - [[package]] name = "libsecp256k1-gen-ecmult" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" dependencies = [ - "libsecp256k1-core 0.2.2", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core 0.3.0", + "libsecp256k1-core", ] [[package]] @@ -3002,27 +2053,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" dependencies = [ - "libsecp256k1-core 0.2.2", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core 0.3.0", -] - -[[package]] -name = "libz-sys" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", + "libsecp256k1-core", ] [[package]] @@ -3058,9 +2089,6 @@ name = "log" version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" -dependencies = [ - "value-bag", -] [[package]] name = "lru" @@ -3071,15 +2099,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "mach2" version = "0.4.1" @@ -3089,12 +2108,6 @@ dependencies = [ "libc", ] -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matchers" version = "0.1.0" @@ -3104,12 +2117,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.0" @@ -3212,71 +2219,12 @@ dependencies = [ "once_cell", ] -[[package]] -name = "multiaddr" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" -dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - -[[package]] -name = "multihash" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" -dependencies = [ - "digest 0.9.0", - "generic-array", - "multihash-derive", - "sha2 0.9.9", - "unsigned-varint", -] - -[[package]] -name = "multihash-derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2 1.0.66", - "quote 1.0.31", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "multimap" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "multistream-select" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" -dependencies = [ - "bytes", - "futures", - "log", - "pin-project 1.1.2", - "smallvec", - "unsigned-varint", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -3295,72 +2243,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "netlink-packet-core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345b8ab5bd4e71a2986663e88c56856699d060e78e152e6e9d7966fcd5491297" -dependencies = [ - "anyhow", - "byteorder", - "libc", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-route" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "byteorder", - "libc", - "netlink-packet-core", - "netlink-packet-utils", -] - -[[package]] -name = "netlink-packet-utils" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" -dependencies = [ - "anyhow", - "byteorder", - "paste", - "thiserror", -] - -[[package]] -name = "netlink-proto" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" -dependencies = [ - "bytes", - "futures", - "log", - "netlink-packet-core", - "netlink-sys", - "thiserror", - "tokio", -] - -[[package]] -name = "netlink-sys" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" -dependencies = [ - "async-io", - "bytes", - "futures", - "libc", - "log", -] - [[package]] name = "nix" version = "0.23.2" @@ -3374,29 +2256,12 @@ dependencies = [ "memoffset 0.6.5", ] -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - [[package]] name = "no-std-compat" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "7.1.3" @@ -3624,29 +2489,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "open-metrics-client" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f85842b073145726190373213c63f852020fb884c841a3a1f390637267a2fb8c" -dependencies = [ - "dtoa", - "itoa", - "open-metrics-client-derive-text-encode", - "owning_ref", -] - -[[package]] -name = "open-metrics-client-derive-text-encode" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c83b586f00268c619c1cb3340ec1a6f59dd9ba1d9833a273a68e6d5cd8ffc" -dependencies = [ - "proc-macro2 1.0.66", - "quote 1.0.31", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.55" @@ -3697,38 +2539,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -3736,21 +2546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -3766,12 +2562,6 @@ dependencies = [ "windows-targets 0.48.1", ] -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - [[package]] name = "pbkdf2" version = "0.4.0" @@ -3814,16 +2604,6 @@ dependencies = [ "num 0.2.1", ] -[[package]] -name = "pest" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" -dependencies = [ - "thiserror", - "ucd-trie", -] - [[package]] name = "petgraph" version = "0.6.3" @@ -3834,33 +2614,13 @@ dependencies = [ "indexmap 1.9.3", ] -[[package]] -name = "pin-project" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" -dependencies = [ - "pin-project-internal 0.4.30", -] - [[package]] name = "pin-project" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ - "pin-project-internal 1.1.2", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" -dependencies = [ - "proc-macro2 1.0.66", - "quote 1.0.31", - "syn 1.0.109", + "pin-project-internal", ] [[package]] @@ -3874,12 +2634,6 @@ dependencies = [ "syn 2.0.26", ] -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.10" @@ -3909,33 +2663,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.10", - "windows-sys 0.48.0", -] - -[[package]] -name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "polyval" version = "0.5.3" @@ -4033,7 +2760,7 @@ checksum = "3c99afa9a01501019ac3a14d71d9f94050346f55ca471ce90c799a15c58f61e2" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.1", + "parking_lot", "prometheus-client-derive-encode", ] @@ -4048,16 +2775,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "prost" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" -dependencies = [ - "bytes", - "prost-derive 0.9.0", -] - [[package]] name = "prost" version = "0.12.1" @@ -4065,27 +2782,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" dependencies = [ "bytes", - "prost-derive 0.12.1", -] - -[[package]] -name = "prost-build" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" -dependencies = [ - "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost 0.9.0", - "prost-types 0.9.0", - "regex", - "tempfile", - "which", + "prost-derive", ] [[package]] @@ -4095,32 +2792,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" dependencies = [ "bytes", - "heck 0.4.1", + "heck", "itertools", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost 0.12.1", - "prost-types 0.12.1", + "prost", + "prost-types", "regex", "syn 2.0.26", "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2 1.0.66", - "quote 1.0.31", - "syn 1.0.109", + "which", ] [[package]] @@ -4136,23 +2820,13 @@ dependencies = [ "syn 2.0.26", ] -[[package]] -name = "prost-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" -dependencies = [ - "bytes", - "prost 0.9.0", -] - [[package]] name = "prost-types" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" dependencies = [ - "prost 0.12.1", + "prost", ] [[package]] @@ -4179,7 +2853,7 @@ dependencies = [ "byteorder", "fast-math", "hex", - "rustc_version 0.4.0", + "rustc_version", "serde", "sha3 0.10.8", "slow_primes", @@ -4212,23 +2886,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quicksink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", -] - [[package]] name = "quinn" version = "0.8.5" @@ -4277,7 +2934,7 @@ dependencies = [ "futures-util", "libc", "quinn-proto", - "socket2 0.4.9", + "socket2", "tokio", "tracing", ] @@ -4521,7 +3178,7 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding", - "pin-project-lite 0.2.10", + "pin-project-lite", "rustls 0.21.7", "rustls-pemfile 1.0.3", "serde", @@ -4537,17 +3194,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg 0.10.1", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", + "winreg", ] [[package]] @@ -4577,21 +3224,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rtnetlink" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" -dependencies = [ - "async-global-executor", - "futures", - "log", - "netlink-packet-route", - "netlink-proto", - "nix 0.24.3", - "thiserror", -] - [[package]] name = "rust-embed" version = "6.8.1" @@ -4639,22 +3271,13 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver", ] [[package]] @@ -4763,32 +3386,12 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "rw-stream-sink" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" -dependencies = [ - "futures", - "pin-project 0.4.30", - "static_assertions", -] - [[package]] name = "ryu" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "same-file" version = "1.0.6" @@ -4890,30 +3493,12 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "1.0.171" @@ -5024,19 +3609,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha-1" version = "0.10.1" @@ -5178,35 +3750,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" -[[package]] -name = "snow" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" -dependencies = [ - "aes-gcm", - "blake2", - "chacha20poly1305", - "rand 0.8.5", - "rand_core 0.6.4", - "ring", - "rustc_version 0.3.3", - "sha2 0.9.9", - "subtle", - "x25519-dalek", -] - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.4.9" @@ -5217,22 +3760,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "soketto" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" -dependencies = [ - "base64 0.13.1", - "bytes", - "flate2", - "futures", - "httparse", - "log", - "rand 0.8.5", - "sha-1 0.9.8", -] - [[package]] name = "solana-account-decoder" version = "1.13.3" @@ -5322,7 +3849,7 @@ dependencies = [ "rayon", "reqwest", "rustls 0.20.8", - "semver 1.0.18", + "semver", "serde", "serde_derive", "serde_json", @@ -5397,7 +3924,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "rustc_version 0.4.0", + "rustc_version", "serde", "serde_bytes", "serde_derive", @@ -5414,7 +3941,7 @@ checksum = "439f7e3b931ff5ec531164f01c3eb8897c0ae72f7d537294e67b81029fa8e89f" dependencies = [ "proc-macro2 1.0.66", "quote 1.0.31", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -5463,11 +3990,11 @@ dependencies = [ "clap 2.34.0", "crossbeam-channel", "log", - "nix 0.23.2", + "nix", "rand 0.7.3", "serde", "serde_derive", - "socket2 0.4.9", + "socket2", "solana-logger", "solana-sdk", "solana-version", @@ -5492,7 +4019,7 @@ dependencies = [ "lazy_static", "libc", "log", - "nix 0.23.2", + "nix", "rand 0.7.3", "rayon", "serde", @@ -5524,13 +4051,13 @@ dependencies = [ "itertools", "js-sys", "lazy_static", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "num-derive", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "rand 0.7.3", - "rustc_version 0.4.0", + "rustc_version", "rustversion", "serde", "serde_bytes", @@ -5559,7 +4086,7 @@ dependencies = [ "log", "num-derive", "num-traits", - "rustc_version 0.4.0", + "rustc_version", "serde", "solana-frozen-abi", "solana-frozen-abi-macro", @@ -5589,9 +4116,9 @@ dependencies = [ "log", "num-derive", "num-traits", - "parking_lot 0.12.1", + "parking_lot", "qstring", - "semver 1.0.18", + "semver", "solana-sdk", "thiserror", "uriparse", @@ -5621,7 +4148,7 @@ dependencies = [ "itertools", "js-sys", "lazy_static", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "memmap2", "num-derive", @@ -5630,7 +4157,7 @@ dependencies = [ "qstring", "rand 0.7.3", "rand_chacha 0.2.2", - "rustc_version 0.4.0", + "rustc_version", "rustversion", "serde", "serde_bytes", @@ -5674,7 +4201,7 @@ dependencies = [ "itertools", "libc", "log", - "nix 0.23.2", + "nix", "pem", "percentage", "pkcs8", @@ -5725,8 +4252,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0312c45b6b94e220c5cc9ec1de4fa0fedf21c33ccb17d932ff6191ac237f405" dependencies = [ "log", - "rustc_version 0.4.0", - "semver 1.0.18", + "rustc_version", + "semver", "serde", "serde_derive", "solana-frozen-abi", @@ -5744,7 +4271,7 @@ dependencies = [ "log", "num-derive", "num-traits", - "rustc_version 0.4.0", + "rustc_version", "serde", "serde_derive", "solana-frozen-abi", @@ -5859,18 +4386,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "strsim" version = "0.8.0" @@ -5898,7 +4413,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2 1.0.66", "quote 1.0.31", "rustversion", @@ -5962,27 +4477,6 @@ dependencies = [ "unicode-xid 0.2.4", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tempfile" version = "3.6.0" @@ -6129,10 +4623,10 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite 0.2.10", + "parking_lot", + "pin-project-lite", "signal-hook-registry", - "socket2 0.4.9", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -6143,7 +4637,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "pin-project-lite 0.2.10", + "pin-project-lite", "tokio", ] @@ -6196,7 +4690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.10", + "pin-project-lite", "tokio", ] @@ -6237,7 +4731,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.10", + "pin-project-lite", "tokio", "tracing", ] @@ -6285,8 +4779,8 @@ dependencies = [ "hyper", "hyper-timeout", "percent-encoding", - "pin-project 1.1.2", - "prost 0.12.1", + "pin-project", + "prost", "rustls 0.21.7", "rustls-pemfile 1.0.3", "tokio", @@ -6306,7 +4800,7 @@ checksum = "c9d37bb15da06ae9bb945963066baca6561b505af93a52e949a85d28558459a2" dependencies = [ "prettyplease", "proc-macro2 1.0.66", - "prost-build 0.12.1", + "prost-build", "quote 1.0.31", "syn 2.0.26", ] @@ -6320,8 +4814,8 @@ dependencies = [ "futures-core", "futures-util", "indexmap 1.9.3", - "pin-project 1.1.2", - "pin-project-lite 0.2.10", + "pin-project", + "pin-project-lite", "rand 0.8.5", "slab", "tokio", @@ -6344,7 +4838,7 @@ dependencies = [ "http", "http-body", "http-range-header", - "pin-project-lite 0.2.10", + "pin-project-lite", "tower-layer", "tower-service", ] @@ -6369,7 +4863,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.10", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -6424,49 +4918,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "trust-dns-proto" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand 0.8.5", - "smallvec", - "thiserror", - "tinyvec", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot 0.11.2", - "resolv-conf", - "smallvec", - "thiserror", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.4" @@ -6487,7 +4938,7 @@ dependencies = [ "log", "rand 0.8.5", "rustls 0.20.8", - "sha-1 0.10.1", + "sha-1", "thiserror", "url", "utf-8", @@ -6520,24 +4971,6 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicase" version = "2.6.0" @@ -6568,12 +5001,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - [[package]] name = "unicode-width" version = "0.1.10" @@ -6602,18 +5029,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "unsigned-varint" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures-io", - "futures-util", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -6637,7 +5052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna", "percent-encoding", ] @@ -6700,12 +5115,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" - [[package]] name = "vcpkg" version = "0.2.15" @@ -6724,18 +5133,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" version = "2.3.3" @@ -6879,12 +5276,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - [[package]] name = "winapi" version = "0.3.9" @@ -6916,19 +5307,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" -dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", -] - [[package]] name = "windows" version = "0.48.0" @@ -6998,12 +5376,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -7016,12 +5388,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -7034,12 +5400,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -7052,12 +5412,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -7082,12 +5436,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -7109,15 +5457,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.10.1" @@ -7141,17 +5480,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "x25519-dalek" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077" -dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "x509-parser" version = "0.14.0" @@ -7179,20 +5507,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yamux" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" -dependencies = [ - "futures", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "static_assertions", -] - [[package]] name = "yasna" version = "0.5.2" diff --git a/hermes/Cargo.toml b/hermes/Cargo.toml index 5e7a7e4af..dc4cbae42 100644 --- a/hermes/Cargo.toml +++ b/hermes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hermes" -version = "0.3.3" +version = "0.4.0" description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle." edition = "2021" @@ -27,7 +27,7 @@ libc = { version = "0.2.140" } log = { version = "0.4.17" } mock_instant = { version = "0.3.1", features = ["sync"] } nonzero_ext = { version = "0.3.0" } -prometheus-client = { version = "0.21.1" } +prometheus-client = { version = "0.21.2" } prost = { version = "0.12.1" } pyth-sdk = { version = "0.8.0" } pythnet-sdk = { path = "../pythnet/pythnet_sdk/", version = "2.0.0", features = ["strum"] } @@ -49,21 +49,6 @@ utoipa = { version = "3.4.0", features = ["axum_extras"] } utoipa-swagger-ui = { version = "3.1.4", features = ["axum"] } wormhole-sdk = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" } -# Setup LibP2P. Unfortunately the dependencies required by libp2p are shared -# with the dependencies required by many Solana components. This means that we -# would have to use the same version of libp2p as solana. Luckily we don't need -# to worry about this until we want to hoist the libp2p portion of Hermes into -# Rust land. -libp2p = { version = "0.42.2", features = [ - "gossipsub", - "identify", - "mplex", - "noise", - "secp256k1", - "websocket", - "yamux", -]} - # We are bound to this Solana version in order to match pyth-oracle. solana-client = { version = "=1.13.3" } solana-sdk = { version = "=1.13.3" } diff --git a/hermes/src/aggregate.rs b/hermes/src/aggregate.rs index 0468c2c0e..f91fd6d8e 100644 --- a/hermes/src/aggregate.rs +++ b/hermes/src/aggregate.rs @@ -36,6 +36,7 @@ use { }, borsh::BorshDeserialize, byteorder::BigEndian, + prometheus_client::registry::Registry, pyth_sdk::{ Price, PriceFeed, @@ -61,6 +62,7 @@ use { wormhole_sdk::Vaa, }; +pub mod metrics; pub mod wormhole_merkle; #[derive(Clone, PartialEq, Debug)] @@ -100,7 +102,7 @@ impl AggregationEvent { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug)] pub struct AggregateState { /// The latest completed slot. This is used to check whether a completed state is new or out of /// order. @@ -112,14 +114,18 @@ pub struct AggregateState { /// The latest observed slot among different Aggregate updates. This is used for the health /// probes. pub latest_observed_slot: Option, + + /// Metrics + pub metrics: metrics::Metrics, } impl AggregateState { - pub fn new() -> Self { + pub fn new(metrics_registry: &mut Registry) -> Self { Self { latest_completed_slot: None, latest_completed_update_at: None, latest_observed_slot: None, + metrics: metrics::Metrics::new(metrics_registry), } } } @@ -192,6 +198,13 @@ pub async fn store_update(state: &State, update: Update) -> Result<()> { ) .await?; + state + .aggregate_state + .write() + .await + .metrics + .observe(proof.slot, metrics::Event::Vaa); + proof.slot } } @@ -203,6 +216,13 @@ pub async fn store_update(state: &State, update: Update) -> Result<()> { state .store_accumulator_messages(accumulator_messages) .await?; + + state + .aggregate_state + .write() + .await + .metrics + .observe(slot, metrics::Event::AccumulatorMessages); slot } }; @@ -269,6 +289,10 @@ pub async fn store_update(state: &State, update: Update) -> Result<()> { .latest_completed_update_at .replace(Instant::now()); + aggregate_state + .metrics + .observe(slot, metrics::Event::CompletedUpdate); + Ok(()) } diff --git a/hermes/src/aggregate/metrics.rs b/hermes/src/aggregate/metrics.rs new file mode 100644 index 000000000..680c02843 --- /dev/null +++ b/hermes/src/aggregate/metrics.rs @@ -0,0 +1,125 @@ +use { + super::Slot, + prometheus_client::{ + encoding::{ + EncodeLabelSet, + EncodeLabelValue, + }, + metrics::{ + counter::Counter, + family::Family, + histogram::Histogram, + }, + registry::Registry, + }, + std::collections::{ + BTreeMap, + HashMap, + }, + tokio::time::Instant, +}; + +const MAX_SLOT_OBSERVATIONS: usize = 1000; + +#[derive(Clone, Debug, Hash, PartialEq, Eq, EncodeLabelValue)] +pub enum SlotOrder { + New, + OutOfOrder, +} + +#[derive(Clone, Debug, Hash, PartialEq, Eq, EncodeLabelValue)] +pub enum Event { + Vaa, + AccumulatorMessages, + CompletedUpdate, +} + +#[derive(Clone, Debug, Hash, PartialEq, Eq, EncodeLabelSet)] +struct ObservedSlotLabels { + pub order: SlotOrder, + pub event: Event, +} + +#[derive(Clone, Debug)] +pub struct Metrics { + observed_slot: Family, + observed_slot_latency: Family, + first_observed_time_of_slot: BTreeMap, + newest_observed_slot: HashMap, +} + +impl Metrics { + pub fn new(metrics_registry: &mut Registry) -> Self { + let new = Self { + observed_slot: Family::default(), + observed_slot_latency: Family::new_with_constructor(|| { + Histogram::new( + [ + 0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 1.0, 1.3, 1.7, 2.0, 3.0, 5.0, 10.0, 20.0, + ] + .into_iter(), + ) + }), + first_observed_time_of_slot: BTreeMap::new(), + newest_observed_slot: HashMap::new(), + }; + + { + let observed_slot = new.observed_slot.clone(); + let observed_slot_latency = new.observed_slot_latency.clone(); + + metrics_registry.register( + "aggregate_observed_slot", + "Total number of observed slots", + observed_slot, + ); + + metrics_registry.register( + "aggregate_observed_slot_latency_seconds", + "Latency of observed slots in seconds", + observed_slot_latency, + ); + } + + new + } + + /// Observe a slot and event. A event at a slot should be observed only once. + pub fn observe(&mut self, slot: Slot, event: Event) { + let order = if let Some(newest_observed_slot) = self.newest_observed_slot.get(&event) { + if slot > *newest_observed_slot { + self.newest_observed_slot.insert(event.clone(), slot); + SlotOrder::New + } else { + SlotOrder::OutOfOrder + } + } else { + self.newest_observed_slot.insert(event.clone(), slot); + SlotOrder::New + }; + + + let labels = ObservedSlotLabels { order, event }; + + self.observed_slot.get_or_create(&labels).inc(); + + if let Some(start) = self.first_observed_time_of_slot.get(&slot) { + let latency = start.elapsed().as_secs_f64(); + self.observed_slot_latency + .get_or_create(&labels) + .observe(latency); + } else { + self.first_observed_time_of_slot + .insert(slot, Instant::now()); + self.observed_slot_latency + .get_or_create(&labels) + .observe(0.0); + } + + // Clear out old slots + while self.first_observed_time_of_slot.len() > MAX_SLOT_OBSERVATIONS { + let oldest_slot = *self.first_observed_time_of_slot.keys().next().unwrap(); + self.first_observed_time_of_slot.remove(&oldest_slot); + } + } +} diff --git a/hermes/src/api.rs b/hermes/src/api.rs index abab1796a..440e23e04 100644 --- a/hermes/src/api.rs +++ b/hermes/src/api.rs @@ -8,6 +8,7 @@ use { anyhow::Result, axum::{ extract::Extension, + middleware::from_fn_with_state, routing::get, Router, }, @@ -26,14 +27,16 @@ use { utoipa_swagger_ui::SwaggerUi, }; +mod metrics_middleware; mod rest; mod types; mod ws; #[derive(Clone)] pub struct ApiState { - pub state: Arc, - pub ws: Arc, + pub state: Arc, + pub ws: Arc, + pub metrics: Arc, } impl ApiState { @@ -43,8 +46,13 @@ impl ApiState { requester_ip_header_name: String, ) -> Self { Self { + metrics: Arc::new(metrics_middleware::Metrics::new(state.clone())), + ws: Arc::new(ws::WsState::new( + ws_whitelist, + requester_ip_header_name, + state.clone(), + )), state, - ws: Arc::new(ws::WsState::new(ws_whitelist, requester_ip_header_name)), } } } @@ -59,7 +67,7 @@ pub async fn run( state: Arc, mut update_rx: Receiver, ) -> Result<()> { - tracing::info!(endpoint = %opts.rpc.addr, "Starting RPC Server."); + tracing::info!(endpoint = %opts.rpc.listen_addr, "Starting RPC Server."); #[derive(OpenApi)] #[openapi( @@ -101,15 +109,20 @@ pub async fn run( let app = app .merge(SwaggerUi::new("/docs").url("/docs/openapi.json", ApiDoc::openapi())) .route("/", get(rest::index)) - .route("/live", get(rest::live)) - .route("/ready", get(rest::ready)) - .route("/ws", get(ws::ws_route_handler)) - .route("/api/latest_price_feeds", get(rest::latest_price_feeds)) - .route("/api/latest_vaas", get(rest::latest_vaas)) .route("/api/get_price_feed", get(rest::get_price_feed)) .route("/api/get_vaa", get(rest::get_vaa)) .route("/api/get_vaa_ccip", get(rest::get_vaa_ccip)) + .route("/api/latest_price_feeds", get(rest::latest_price_feeds)) + .route("/api/latest_vaas", get(rest::latest_vaas)) .route("/api/price_feed_ids", get(rest::price_feed_ids)) + .route("/live", get(rest::live)) + .route("/metrics", get(rest::metrics)) + .route("/ready", get(rest::ready)) + .route("/ws", get(ws::ws_route_handler)) + .route_layer(from_fn_with_state( + state.clone(), + metrics_middleware::track_metrics, + )) .with_state(state.clone()) // Permissive CORS layer to allow all origins .layer(CorsLayer::permissive()) @@ -139,7 +152,7 @@ pub async fn run( // Binds the axum's server to the configured address and port. This is a blocking call and will // not return until the server is shutdown. - axum::Server::try_bind(&opts.rpc.addr)? + axum::Server::try_bind(&opts.rpc.listen_addr)? .serve(app.into_make_service()) .with_graceful_shutdown(async { // Ignore Ctrl+C errors, either way we need to shut down. The main Ctrl+C handler diff --git a/hermes/src/api/metrics_middleware.rs b/hermes/src/api/metrics_middleware.rs new file mode 100644 index 000000000..b384b5119 --- /dev/null +++ b/hermes/src/api/metrics_middleware.rs @@ -0,0 +1,105 @@ +use { + super::ApiState, + crate::state::State as AppState, + axum::{ + extract::{ + MatchedPath, + State, + }, + http::Request, + middleware::Next, + response::IntoResponse, + }, + prometheus_client::{ + encoding::EncodeLabelSet, + metrics::{ + counter::Counter, + family::Family, + histogram::Histogram, + }, + }, + std::sync::Arc, + tokio::time::Instant, +}; + +pub struct Metrics { + pub requests: Family, + pub latencies: Family, +} + +impl Metrics { + pub fn new(state: Arc) -> Self { + let new = Self { + requests: Family::default(), + latencies: Family::new_with_constructor(|| { + Histogram::new( + [ + 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, + ] + .into_iter(), + ) + }), + }; + + { + let requests = new.requests.clone(); + let latencies = new.latencies.clone(); + + tokio::spawn(async move { + let mut metrics_registry = state.metrics_registry.write().await; + + metrics_registry.register("api_requests", "Total number of API requests", requests); + + metrics_registry.register( + "api_request_latency_seconds", + "API request latency in seconds", + latencies, + ); + }); + } + + new + } +} + +#[derive(Clone, Debug, PartialEq, Eq, Hash, EncodeLabelSet)] +pub struct Labels { + pub method: String, + pub path: String, + pub status: u16, +} + +pub async fn track_metrics( + State(api_state): State, + req: Request, + next: Next, +) -> impl IntoResponse { + let start = Instant::now(); + let path = if let Some(matched_path) = req.extensions().get::() { + matched_path.as_str().to_owned() + } else { + req.uri().path().to_owned() + }; + let method = req.method().clone(); + + let response = next.run(req).await; + + let latency = start.elapsed().as_secs_f64(); + let status = response.status().as_u16().to_string(); + + let labels = Labels { + method: method.to_string(), + path, + status: status.parse().unwrap(), + }; + + api_state.metrics.requests.get_or_create(&labels).inc(); + + api_state + .metrics + .latencies + .get_or_create(&labels) + .observe(latency); + + response +} diff --git a/hermes/src/api/rest.rs b/hermes/src/api/rest.rs index 6e80fcb90..24f9bc3b5 100644 --- a/hermes/src/api/rest.rs +++ b/hermes/src/api/rest.rs @@ -17,6 +17,7 @@ mod index; mod latest_price_feeds; mod latest_vaas; mod live; +mod metrics; mod price_feed_ids; mod ready; @@ -28,6 +29,7 @@ pub use { latest_price_feeds::*, latest_vaas::*, live::*, + metrics::*, price_feed_ids::*, ready::*, }; diff --git a/hermes/src/api/rest/metrics.rs b/hermes/src/api/rest/metrics.rs new file mode 100644 index 000000000..eec581cba --- /dev/null +++ b/hermes/src/api/rest/metrics.rs @@ -0,0 +1,20 @@ +//! Exposing prometheus metrics via HTTP in openmetrics format. + +use { + axum::{ + extract::State, + response::IntoResponse, + }, + prometheus_client::encoding::text::encode, +}; + +pub async fn metrics(State(state): State) -> impl IntoResponse { + let registry = state.state.metrics_registry.read().await; + let mut buffer = String::new(); + + // Should not fail if the metrics are valid and there is memory available + // to write to the buffer. + encode(&mut buffer, ®istry).unwrap(); + + buffer +} diff --git a/hermes/src/api/ws.rs b/hermes/src/api/ws.rs index 2326be4cb..892abb94d 100644 --- a/hermes/src/api/ws.rs +++ b/hermes/src/api/ws.rs @@ -43,6 +43,16 @@ use { }, ipnet::IpNet, nonzero_ext::nonzero, + prometheus_client::{ + encoding::{ + EncodeLabelSet, + EncodeLabelValue, + }, + metrics::{ + counter::Counter, + family::Family, + }, + }, pyth_sdk::PriceIdentifier, serde::{ Deserialize, @@ -79,16 +89,65 @@ pub struct PriceFeedClientConfig { allow_out_of_order: bool, } +#[derive(Clone, Debug, Hash, PartialEq, Eq, EncodeLabelValue)] +pub enum Interaction { + NewConnection, + CloseConnection, + ClientHeartbeat, + PriceUpdate, + ClientMessage, + RateLimit, +} + +#[derive(Clone, Debug, Hash, PartialEq, Eq, EncodeLabelValue)] +pub enum Status { + Success, + Error, +} + +#[derive(Clone, Debug, PartialEq, Eq, Hash, EncodeLabelSet)] +pub struct Labels { + pub interaction: Interaction, + pub status: Status, +} + +pub struct Metrics { + pub interactions: Family, +} + +impl Metrics { + pub fn new(state: Arc) -> Self { + let new = Self { + interactions: Family::default(), + }; + + { + let interactions = new.interactions.clone(); + + tokio::spawn(async move { + state.metrics_registry.write().await.register( + "ws_interactions", + "Total number of websocket interactions", + interactions, + ); + }); + } + + new + } +} + pub struct WsState { pub subscriber_counter: AtomicUsize, pub subscribers: DashMap>, pub bytes_limit_whitelist: Vec, pub rate_limiter: DefaultKeyedRateLimiter, pub requester_ip_header_name: String, + pub metrics: Metrics, } impl WsState { - pub fn new(whitelist: Vec, requester_ip_header_name: String) -> Self { + pub fn new(whitelist: Vec, requester_ip_header_name: String, state: Arc) -> Self { Self { subscriber_counter: AtomicUsize::new(0), subscribers: DashMap::new(), @@ -97,6 +156,7 @@ impl WsState { ))), bytes_limit_whitelist: whitelist, requester_ip_header_name, + metrics: Metrics::new(state.clone()), } } } @@ -161,7 +221,16 @@ async fn websocket_handler( ) { let ws_state = state.ws.clone(); let id = ws_state.subscriber_counter.fetch_add(1, Ordering::SeqCst); + tracing::debug!(id, ?subscriber_ip, "New Websocket Connection"); + ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::NewConnection, + status: Status::Success, + }) + .inc(); let (notify_sender, notify_receiver) = mpsc::channel(NOTIFICATIONS_CHAN_LEN); let (sender, receiver) = stream.split(); @@ -247,6 +316,15 @@ impl Subscriber { }, _ = self.ping_interval.tick() => { if !self.responded_to_ping { + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::ClientHeartbeat, + status: Status::Error, + }) + .inc(); + return Err(anyhow!("Subscriber did not respond to ping. Closing connection.")); } self.responded_to_ping = false; @@ -318,6 +396,16 @@ impl Subscriber { ip = %ip_addr, "Rate limit exceeded. Closing connection.", ); + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::RateLimit, + status: Status::Error, + }) + .inc(); + + self.sender .send( serde_json::to_string(&ServerResponseMessage::Err { @@ -335,6 +423,15 @@ impl Subscriber { // `sender.feed` buffers a message to the client but does not flush it, so we can send // multiple messages and flush them all at once. self.sender.feed(message.into()).await?; + + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::PriceUpdate, + status: Status::Success, + }) + .inc(); } self.sender.flush().await?; @@ -350,6 +447,14 @@ impl Subscriber { // to subscribers list will be closed and it will eventually get // removed. tracing::trace!(id = self.id, "Subscriber Closed Connection."); + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::CloseConnection, + status: Status::Success, + }) + .inc(); // Send the close message to gracefully shut down the connection // Otherwise the client might get an abnormal Websocket closure @@ -365,6 +470,16 @@ impl Subscriber { return Ok(()); } Message::Pong(_) => { + // This metric can be used to monitor the number of active connections + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::ClientHeartbeat, + status: Status::Success, + }) + .inc(); + self.responded_to_ping = true; return Ok(()); } @@ -372,6 +487,14 @@ impl Subscriber { match maybe_client_message { Err(e) => { + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::ClientMessage, + status: Status::Error, + }) + .inc(); self.sender .send( serde_json::to_string(&ServerMessage::Response( @@ -437,6 +560,15 @@ impl Subscriber { } } + self.ws_state + .metrics + .interactions + .get_or_create(&Labels { + interaction: Interaction::ClientMessage, + status: Status::Success, + }) + .inc(); + self.sender .send( serde_json::to_string(&ServerMessage::Response(ServerResponseMessage::Success))? diff --git a/hermes/src/config/pythnet.rs b/hermes/src/config/pythnet.rs index 53d0f6c17..0519093de 100644 --- a/hermes/src/config/pythnet.rs +++ b/hermes/src/config/pythnet.rs @@ -6,11 +6,11 @@ use clap::Args; pub struct Options { /// Address of a PythNet compatible websocket RPC endpoint. #[arg(long = "pythnet-ws-addr")] - #[arg(env = "PYTHNET_WS_ENDPOINT")] - pub ws_endpoint: String, + #[arg(env = "PYTHNET_WS_ADDR")] + pub ws_addr: String, /// Addres of a PythNet compatible HTP RPC endpoint. #[arg(long = "pythnet-http-addr")] - #[arg(env = "PYTHNET_HTTP_ENDPOINT")] - pub http_endpoint: String, + #[arg(env = "PYTHNET_HTTP_ADDR")] + pub http_addr: String, } diff --git a/hermes/src/config/rpc.rs b/hermes/src/config/rpc.rs index 8a23b85c5..79e53993e 100644 --- a/hermes/src/config/rpc.rs +++ b/hermes/src/config/rpc.rs @@ -4,7 +4,7 @@ use { std::net::SocketAddr, }; -const DEFAULT_RPC_ADDR: &str = "127.0.0.1:33999"; +const DEFAULT_RPC_LISTEN_ADDR: &str = "127.0.0.1:33999"; const DEFAULT_RPC_REQUESTER_IP_HEADER_NAME: &str = "X-Forwarded-For"; #[derive(Args, Clone, Debug)] @@ -13,9 +13,9 @@ const DEFAULT_RPC_REQUESTER_IP_HEADER_NAME: &str = "X-Forwarded-For"; pub struct Options { /// Address and port the RPC server will bind to. #[arg(long = "rpc-listen-addr")] - #[arg(default_value = DEFAULT_RPC_ADDR)] - #[arg(env = "RPC_ADDR")] - pub addr: SocketAddr, + #[arg(default_value = DEFAULT_RPC_LISTEN_ADDR)] + #[arg(env = "RPC_LISTEN_ADDR")] + pub listen_addr: SocketAddr, /// Whitelisted websocket ip network addresses (separated by comma). #[arg(long = "rpc-ws-whitelist")] diff --git a/hermes/src/network/pythnet.rs b/hermes/src/network/pythnet.rs index e026c8802..005a2c7c9 100644 --- a/hermes/src/network/pythnet.rs +++ b/hermes/src/network/pythnet.rs @@ -255,21 +255,18 @@ async fn fetch_existing_guardian_sets( #[tracing::instrument(skip(opts, state))] pub async fn spawn(opts: RunOptions, state: Arc) -> Result<()> { - tracing::info!( - endpoint = opts.pythnet.ws_endpoint, - "Started Pythnet Listener." - ); + tracing::info!(endpoint = opts.pythnet.ws_addr, "Started Pythnet Listener."); fetch_existing_guardian_sets( state.clone(), - opts.pythnet.http_endpoint.clone(), + opts.pythnet.http_addr.clone(), opts.wormhole.contract_addr, ) .await?; let task_listener = { let store = state.clone(); - let pythnet_ws_endpoint = opts.pythnet.ws_endpoint.clone(); + let pythnet_ws_endpoint = opts.pythnet.ws_addr.clone(); tokio::spawn(async move { while !crate::SHOULD_EXIT.load(Ordering::Acquire) { let current_time = Instant::now(); @@ -289,7 +286,7 @@ pub async fn spawn(opts: RunOptions, state: Arc) -> Result<()> { let task_guadian_watcher = { let store = state.clone(); - let pythnet_http_endpoint = opts.pythnet.http_endpoint.clone(); + let pythnet_http_endpoint = opts.pythnet.http_addr.clone(); tokio::spawn(async move { while !crate::SHOULD_EXIT.load(Ordering::Acquire) { // Poll for new guardian sets every 60 seconds. We use a short wait time so we can diff --git a/hermes/src/state.rs b/hermes/src/state.rs index b9f3b7b6a..0b35c5a54 100644 --- a/hermes/src/state.rs +++ b/hermes/src/state.rs @@ -9,6 +9,7 @@ use { }, network::wormhole::GuardianSet, }, + prometheus_client::registry::Registry, reqwest::Url, std::{ collections::{ @@ -46,6 +47,9 @@ pub struct State { /// Benchmarks endpoint pub benchmarks_endpoint: Option, + + /// Metrics registry + pub metrics_registry: RwLock, } impl State { @@ -54,13 +58,15 @@ impl State { cache_size: u64, benchmarks_endpoint: Option, ) -> Arc { + let mut metrics_registry = Registry::default(); Arc::new(Self { cache: Cache::new(cache_size), observed_vaa_seqs: RwLock::new(Default::default()), guardian_set: RwLock::new(Default::default()), api_update_tx: update_tx, - aggregate_state: RwLock::new(AggregateState::new()), + aggregate_state: RwLock::new(AggregateState::new(&mut metrics_registry)), benchmarks_endpoint, + metrics_registry: RwLock::new(metrics_registry), }) } }