From a4ec9b33d016814a0d97dc15cdf0939637bf710d Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Fri, 20 Sep 2024 15:07:44 +0200 Subject: [PATCH 01/96] wip: relayer-rs --- Cargo.lock | 2591 ++++++++++++++++++++++++++++++++++--- Cargo.toml | 1 + relayer-rs/Cargo.toml | 16 + relayer-rs/src/config.rs | 16 + relayer-rs/src/main.rs | 19 + relayer-rs/src/metrics.rs | 34 + relayer-rs/src/relayer.rs | 104 ++ 7 files changed, 2596 insertions(+), 185 deletions(-) create mode 100644 relayer-rs/Cargo.toml create mode 100644 relayer-rs/src/config.rs create mode 100644 relayer-rs/src/main.rs create mode 100644 relayer-rs/src/metrics.rs create mode 100644 relayer-rs/src/relayer.rs diff --git a/Cargo.lock b/Cargo.lock index d0b4d718..3741d927 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "actix" version = "0.13.5" @@ -89,13 +99,13 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "sha1", "smallvec", "tokio", "tokio-util", "tracing", - "zstd", + "zstd 0.13.2", ] [[package]] @@ -289,7 +299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if 1.0.0", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -299,7 +309,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -311,7 +321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -492,6 +502,21 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "asn1-rs" version = "0.6.2" @@ -698,6 +723,17 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -720,6 +756,17 @@ dependencies = [ "wildmatch", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -753,7 +800,7 @@ dependencies = [ "openssl", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "serde", "serde_json", "serde_urlencoded", @@ -767,7 +814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" dependencies = [ "attohttpc", - "dirs", + "dirs 4.0.0", "rust-ini", "serde", "serde-xml-rs", @@ -845,6 +892,18 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + [[package]] name = "base64" version = "0.12.3" @@ -875,6 +934,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "bincode" version = "1.3.3" @@ -905,6 +970,21 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -926,16 +1006,39 @@ dependencies = [ "typenum", ] +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty 1.1.0", + "radium 0.6.2", + "tap", + "wyz 0.2.0", +] + [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty", - "radium", + "funty 2.0.0", + "radium 0.7.0", "tap", - "wyz", + "wyz 0.5.1", +] + +[[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]] @@ -954,7 +1057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", "cc", "cfg-if 0.1.10", "constant_time_eq", @@ -962,6 +1065,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -1008,7 +1120,7 @@ name = "bls-utils" version = "0.1.0" dependencies = [ "clap", - "rand", + "rand 0.8.5", "serde", "serde_json", "zeropool-bn", @@ -1122,12 +1234,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2 0.10.8", + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + [[package]] name = "bytecheck" version = "0.6.12" @@ -1161,6 +1289,9 @@ name = "bytes" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +dependencies = [ + "serde", +] [[package]] name = "bytesize" @@ -1180,6 +1311,16 @@ dependencies = [ "bytes", ] +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" @@ -1191,13 +1332,55 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cbc" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -1253,6 +1436,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1327,7 +1519,7 @@ dependencies = [ "dotenv", "futures-util", "hex", - "jsonwebtoken", + "jsonwebtoken 7.2.0", "lazy_static", "openssl", "percent-encoding", @@ -1358,6 +1550,58 @@ dependencies = [ "x509-cert", ] +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58 0.5.1", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec 1.0.1", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58 0.5.1", + "digest 0.10.7", + "generic-array 0.14.7", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2 0.10.8", + "sha3", + "thiserror", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -1386,6 +1630,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -1650,6 +1907,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1670,6 +1939,28 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -1776,7 +2067,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid", + "uuid 1.10.0", ] [[package]] @@ -1868,7 +2159,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -1895,7 +2186,8 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -1906,7 +2198,26 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] @@ -1920,6 +2231,29 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1955,6 +2289,18 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "dynasm" version = "1.2.3" @@ -2015,25 +2361,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" [[package]] -name = "ed25519" -version = "2.2.3" +name = "ecdsa" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "signature", + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki", ] [[package]] -name = "ed25519-dalek" -version = "2.1.1" +name = "ed25519" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "curve25519-dalek", - "ed25519", - "rand_core", - "sha2", - "subtle", + "signature 1.6.4", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519 1.5.3", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek 4.1.3", + "ed25519 2.2.3", + "rand_core 0.6.4", + "sha2 0.10.8", + "subtle", ] [[package]] @@ -2042,6 +2425,34 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -2057,6 +2468,24 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + [[package]] name = "enum-map" version = "2.7.3" @@ -2135,6 +2564,325 @@ dependencies = [ "libc", ] +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt 0.10.0", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.77", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec 0.7.6", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array 0.14.7", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.26.3", + "syn 2.0.77", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-channel", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken 8.3.0", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -2171,6 +2919,16 @@ dependencies = [ "async-trait", ] +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fallible-iterator" version = "0.3.0" @@ -2192,6 +2950,16 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2204,7 +2972,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d81b511929c2669eaf64e36471cf27c2508133e62ade9d49e608e8d675e7854" dependencies = [ - "bitvec", + "bitvec 1.0.1", "dissimilar", "num-traits", "prefix-sum-vec", @@ -2220,9 +2988,30 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flagset" version = "0.4.6" @@ -2280,6 +3069,22 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "funty" version = "2.0.0" @@ -2362,6 +3167,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -2385,6 +3200,16 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + [[package]] name = "futures-util" version = "0.3.30" @@ -2442,6 +3267,18 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -2452,7 +3289,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -2478,6 +3315,29 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[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 = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.3.26" @@ -2534,6 +3394,39 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 0.2.12", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.12", +] + [[package]] name = "heck" version = "0.4.1" @@ -2654,6 +3547,20 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper", + "rustls 0.21.12", + "tokio", + "tokio-rustls", +] + [[package]] name = "hyper-timeout" version = "0.4.1" @@ -2725,19 +3632,72 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core", + "rand_core 0.6.4", "rand_xoshiro", "sized-chunks", "typenum", "version_check", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec 2.3.1", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec 3.6.12", +] + [[package]] name = "impl-more" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexer" version = "0.0.1" @@ -2753,7 +3713,7 @@ dependencies = [ "lapin", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-indexer", "near-o11y", "openssl-probe", @@ -2854,6 +3814,15 @@ 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 = "itertools" version = "0.12.1" @@ -2900,11 +3869,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afabcc15e437a6484fc4f12d0fd63068fe457bf93f1c148d3d9649c60b103f32" dependencies = [ "base64 0.12.3", - "pem", + "pem 0.8.3", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1 0.4.1", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", - "simple_asn1", + "simple_asn1 0.6.2", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", + "signature 2.2.0", ] [[package]] @@ -2916,6 +3913,36 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.8.4", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.7", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -3239,6 +4266,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + [[package]] name = "mime" version = "0.3.17" @@ -3288,7 +4321,7 @@ dependencies = [ "hermit-abi 0.3.9", "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -3298,6 +4331,24 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +[[package]] +name = "multer" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 0.2.12", + "httparse", + "log", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + [[package]] name = "native-tls" version = "0.2.12" @@ -3315,6 +4366,28 @@ dependencies = [ "tempfile", ] +[[package]] +name = "near-abi" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "885db39b08518fa700b73fa2214e8adbbfba316ba82dd510f50519173eadaf73" +dependencies = [ + "borsh 0.9.3", + "schemars", + "semver 1.0.23", + "serde", +] + +[[package]] +name = "near-account-id" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d258582a1878e6db67400b0504a5099db85718d22c2e07f747fe1706ae7150" +dependencies = [ + "borsh 0.9.3", + "serde", +] + [[package]] name = "near-account-id" version = "1.0.0" @@ -3384,7 +4457,7 @@ dependencies = [ "near-chain-configs", "near-chain-primitives", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-mainnet-res", "near-network", @@ -3393,16 +4466,16 @@ dependencies = [ "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "near-vm-runner", "node-runtime", "num-rational", "once_cell", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "time", @@ -3420,16 +4493,16 @@ dependencies = [ "chrono", "derive_more", "near-config-utils", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", "near-parameters", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-time", "num-rational", "once_cell", "serde", "serde_json", - "sha2", + "sha2 0.10.8", "smart-default", "time", "tracing", @@ -3440,8 +4513,8 @@ name = "near-chain-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "thiserror", "time", @@ -3464,19 +4537,19 @@ dependencies = [ "near-chain", "near-chain-configs", "near-chunks-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-network", "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", - "rand", - "reed-solomon-erasure", - "strum", + "rand 0.8.5", + "reed-solomon-erasure 6.0.0", + "strum 0.24.1", "time", "tracing", ] @@ -3487,7 +4560,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-chain-primitives", - "near-primitives", + "near-primitives 2.2.1-rc.1", ] [[package]] @@ -3514,7 +4587,7 @@ dependencies = [ "near-chain-primitives", "near-chunks", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-network", @@ -3523,22 +4596,22 @@ dependencies = [ "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "near-telemetry", "near-vm-runner", "num-rational", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "regex", "reqwest", "rust-s3", "serde", "serde_json", - "strum", + "strum 0.24.1", "sysinfo", "tempfile", "thiserror", @@ -3558,12 +4631,12 @@ dependencies = [ "near-chain-configs", "near-chain-primitives", "near-chunks-primitives", - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "serde", "serde_json", - "strum", + "strum 0.24.1", "thiserror", "time", "tracing", @@ -3581,24 +4654,50 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-crypto" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e75673d69fd7365508f3d32483669fe45b03bfb34e4d9363e90adae9dfb416c" +dependencies = [ + "arrayref", + "blake2 0.9.2", + "borsh 0.9.3", + "bs58 0.4.0", + "c2-chacha", + "curve25519-dalek 3.2.0", + "derive_more", + "ed25519-dalek 1.0.1", + "near-account-id 0.14.0", + "once_cell", + "parity-secp256k1", + "primitive-types 0.10.1", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + [[package]] name = "near-crypto" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "blake2", + "blake2 0.10.6", "borsh 1.5.1", - "bs58", - "curve25519-dalek", + "bs58 0.4.0", + "curve25519-dalek 4.1.3", "derive_more", - "ed25519-dalek", + "ed25519-dalek 2.1.1", "hex", - "near-account-id", + "near-account-id 1.0.0", "near-config-utils", "near-stdx", "once_cell", - "primitive-types", - "rand", + "primitive-types 0.10.1", + "rand 0.8.5", "secp256k1", "serde", "serde_json", @@ -3613,9 +4712,9 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "anyhow", "near-chain-configs", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-time", "once_cell", "prometheus", @@ -3636,15 +4735,15 @@ dependencies = [ "near-cache", "near-chain-configs", "near-chain-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "num-rational", "once_cell", - "primitive-types", - "rand", - "rand_hc", + "primitive-types 0.10.1", + "rand 0.8.5", + "rand_hc 0.3.2", "serde_json", "smart-default", "tracing", @@ -3655,7 +4754,7 @@ name = "near-fmt" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", ] [[package]] @@ -3669,12 +4768,12 @@ dependencies = [ "lazy_static", "near-chain-configs", "near-client", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-indexer-primitives", "near-o11y", "near-parameters", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "nearcore", "node-runtime", @@ -3691,7 +4790,7 @@ name = "near-indexer-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives", + "near-primitives 2.2.1-rc.1", "serde", "serde_json", ] @@ -3704,7 +4803,7 @@ dependencies = [ "actix", "actix-cors", "actix-web", - "bs58", + "bs58 0.4.0", "derive_more", "easy-ext", "futures", @@ -3717,8 +4816,8 @@ dependencies = [ "near-jsonrpc-primitives", "near-network", "near-o11y", - "near-primitives", - "near-rpc-error-macro", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "once_cell", "serde", "serde_json", @@ -3737,7 +4836,7 @@ dependencies = [ "awc", "futures", "near-jsonrpc-primitives", - "near-primitives", + "near-primitives 2.2.1-rc.1", "serde", "serde_json", ] @@ -3750,9 +4849,9 @@ dependencies = [ "arbitrary", "near-chain-configs", "near-client-primitives", - "near-crypto", - "near-primitives", - "near-rpc-error-macro", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "serde", "serde_json", "thiserror", @@ -3764,9 +4863,9 @@ name = "near-mainnet-res" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-account-id", + "near-account-id 1.0.0", "near-chain-configs", - "near-primitives", + "near-primitives 2.2.1-rc.1", "serde_json", ] @@ -3793,12 +4892,12 @@ dependencies = [ "lru 0.12.4", "near-async", "near-chain-configs", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-fmt", "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", "opentelemetry", @@ -3806,13 +4905,13 @@ dependencies = [ "pin-project", "protobuf 3.5.1", "protobuf-codegen", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "serde", - "sha2", + "sha2 0.10.8", "smart-default", - "strum", + "strum 0.24.1", "stun", "thiserror", "time", @@ -3830,8 +4929,8 @@ dependencies = [ "actix", "base64 0.21.7", "clap", - "near-crypto", - "near-primitives-core", + "near-crypto 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "once_cell", "opentelemetry", "opentelemetry-otlp", @@ -3855,13 +4954,13 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "borsh 1.5.1", "enum-map", - "near-account-id", - "near-primitives-core", + "near-account-id 1.0.0", + "near-primitives-core 2.2.1-rc.1", "num-rational", "serde", "serde_repr", "serde_yaml", - "strum", + "strum 0.24.1", "thiserror", ] @@ -3896,11 +4995,40 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", - "near-primitives", + "near-primitives 2.2.1-rc.1", "once_cell", - "rand", + "rand 0.8.5", +] + +[[package]] +name = "near-primitives" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad1a9a1640539c81f065425c31bffcfbf6b31ef1aeaade59ce905f5df6ac860" +dependencies = [ + "borsh 0.9.3", + "byteorder", + "bytesize", + "chrono", + "derive_more", + "easy-ext", + "hex", + "near-crypto 0.14.0", + "near-primitives-core 0.14.0", + "near-rpc-error-macro 0.14.0", + "near-vm-errors", + "num-rational", + "once_cell", + "primitive-types 0.10.1", + "rand 0.7.3", + "reed-solomon-erasure 4.0.2", + "serde", + "serde_json", + "smart-default", + "strum 0.24.1", + "thiserror", ] [[package]] @@ -3920,30 +5048,47 @@ dependencies = [ "enum-map", "hex", "itertools 0.10.5", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-fmt", "near-parameters", - "near-primitives-core", - "near-rpc-error-macro", + "near-primitives-core 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "near-stdx", "near-structs-checker-lib", "near-time", "num-rational", "once_cell", "ordered-float", - "primitive-types", - "rand", - "rand_chacha", - "reed-solomon-erasure", + "primitive-types 0.10.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reed-solomon-erasure 6.0.0", "serde", "serde_json", "serde_with", "sha3", "smart-default", - "strum", + "strum 0.24.1", "thiserror", "tracing", - "zstd", + "zstd 0.13.2", +] + +[[package]] +name = "near-primitives-core" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d508f0fc340f6461e4e256417685720d3c4c00bb5a939b105160e49137caba" +dependencies = [ + "base64 0.11.0", + "borsh 0.9.3", + "bs58 0.4.0", + "derive_more", + "near-account-id 0.14.0", + "num-rational", + "serde", + "sha2 0.10.8", + "strum 0.24.1", ] [[package]] @@ -3954,15 +5099,15 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "derive_more", "enum-map", - "near-account-id", + "near-account-id 1.0.0", "near-structs-checker-lib", "num-rational", "serde", "serde_repr", - "sha2", + "sha2 0.10.8", "thiserror", ] @@ -3979,24 +5124,35 @@ dependencies = [ "derive_more", "futures", "hex", - "near-account-id", + "near-account-id 1.0.0", "near-chain-configs", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-network", "near-o11y", "near-parameters", - "near-primitives", + "near-primitives 2.2.1-rc.1", "node-runtime", "paperclip", "serde", "serde_json", - "strum", + "strum 0.24.1", "thiserror", "tokio", ] +[[package]] +name = "near-rpc-error-core" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ee0b41c75ef859c193a8ff1dadfa0c8207bc0ac447cc22259721ad769a1408" +dependencies = [ + "quote", + "serde", + "syn 1.0.109", +] + [[package]] name = "near-rpc-error-core" version = "2.2.1-rc.1" @@ -4007,16 +5163,62 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "near-rpc-error-macro" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e837bd4bacd807073ec5ceb85708da7f721b46a4c2a978de86027fb0034ce31" +dependencies = [ + "near-rpc-error-core 0.14.0", + "serde", + "syn 1.0.109", +] + [[package]] name = "near-rpc-error-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-rpc-error-core", + "near-rpc-error-core 2.2.1-rc.1", "serde", "syn 2.0.77", ] +[[package]] +name = "near-sdk" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15eb3de2defe3626260cc209a6cdb985c6b27b0bd4619fad97dcfae002c3c5bd" +dependencies = [ + "base64 0.13.1", + "borsh 0.9.3", + "bs58 0.4.0", + "near-abi", + "near-crypto 0.14.0", + "near-primitives 0.14.0", + "near-primitives-core 0.14.0", + "near-sdk-macros", + "near-sys", + "near-vm-logic", + "once_cell", + "schemars", + "serde", + "serde_json", + "wee_alloc", +] + +[[package]] +name = "near-sdk-macros" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4907affc9f5ed559456509188ff0024f1f2099c0830e6bdb66eb61d5b75912c0" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "near-stdx" version = "2.2.1-rc.1" @@ -4041,25 +5243,25 @@ dependencies = [ "itoa", "lru 0.12.4", "near-chain-configs", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-fmt", "near-o11y", "near-parameters", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-stdx", "near-time", "near-vm-runner", "num_cpus", "once_cell", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "rlimit", "rocksdb", "serde", "serde_json", "smallvec", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tokio", @@ -4085,6 +5287,12 @@ name = "near-structs-checker-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" +[[package]] +name = "near-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf4ca5c805cb78700e10e43484902d8da05f25788db277999d209568aaf4c8e" + [[package]] name = "near-telemetry" version = "2.2.1-rc.1" @@ -4149,7 +5357,7 @@ dependencies = [ "near-vm-vm", "rayon", "smallvec", - "strum", + "strum 0.24.1", "tracing", ] @@ -4176,6 +5384,40 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-vm-errors" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0da466a30f0446639cbd788c30865086fac3e8dcb07a79e51d2b0775ed4261e" +dependencies = [ + "borsh 0.9.3", + "near-account-id 0.14.0", + "near-rpc-error-macro 0.14.0", + "serde", +] + +[[package]] +name = "near-vm-logic" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81b534828419bacbf1f7b11ef7b00420f248c548c485d3f0cfda8bb6931152f2" +dependencies = [ + "base64 0.13.1", + "borsh 0.9.3", + "bs58 0.4.0", + "byteorder", + "near-account-id 0.14.0", + "near-crypto 0.14.0", + "near-primitives 0.14.0", + "near-primitives-core 0.14.0", + "near-vm-errors", + "ripemd", + "serde", + "sha2 0.10.8", + "sha3", + "zeropool-bn", +] + [[package]] name = "near-vm-runner" version = "2.2.1-rc.1" @@ -4185,15 +5427,15 @@ dependencies = [ "blst", "borsh 1.5.1", "bytesize", - "ed25519-dalek", + "ed25519-dalek 2.1.1", "enum-map", "finite-wasm", "lru 0.12.4", "memoffset 0.8.0", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", "near-parameters", - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", "near-stdx", "near-vm-compiler", "near-vm-compiler-singlepass", @@ -4211,9 +5453,9 @@ dependencies = [ "rustix 0.38.37", "serde", "serde_repr", - "sha2", + "sha2 0.10.8", "sha3", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tracing", @@ -4269,7 +5511,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", "near-vm-runner", "once_cell", ] @@ -4288,7 +5530,7 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "dirs", + "dirs 4.0.0", "easy-ext", "futures", "hex", @@ -4302,7 +5544,7 @@ dependencies = [ "near-client", "near-client-primitives", "near-config-utils", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-jsonrpc", @@ -4313,7 +5555,7 @@ dependencies = [ "near-parameters", "near-performance-metrics", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-rosetta-rpc", "near-store", "near-telemetry", @@ -4321,7 +5563,7 @@ dependencies = [ "node-runtime", "num-rational", "once_cell", - "rand", + "rand 0.8.5", "rayon", "regex", "reqwest", @@ -4331,7 +5573,7 @@ dependencies = [ "serde_ignored", "serde_json", "smart-default", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tokio", @@ -4339,6 +5581,12 @@ dependencies = [ "xz2", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + [[package]] name = "nix" version = "0.15.0" @@ -4370,21 +5618,21 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-o11y", "near-parameters", - "near-primitives", - "near-primitives-core", + "near-primitives 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "near-store", "near-vm-runner", "near-wallet-contract", "num-bigint 0.3.3", "num-traits", "once_cell", - "rand", + "rand 0.8.5", "rayon", "serde_json", - "sha2", + "sha2 0.10.8", "thiserror", "tracing", ] @@ -4485,6 +5733,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -4497,6 +5746,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "number_prefix" version = "0.3.0" @@ -4539,6 +5809,37 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "openssl" version = "0.10.66" @@ -4661,12 +5962,18 @@ dependencies = [ "opentelemetry", "ordered-float", "percent-encoding", - "rand", + "rand 0.8.5", "thiserror", "tokio", "tokio-stream", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ordered-float" version = "4.2.2" @@ -4675,7 +5982,7 @@ checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "borsh 1.5.1", "num-traits", - "rand", + "rand 0.8.5", "serde", ] @@ -4709,10 +6016,10 @@ dependencies = [ "hmac", "pkcs12", "pkcs5", - "rand", + "rand 0.8.5", "rc2", "sha1", - "sha2", + "sha2 0.10.8", "thiserror", "x509-parser", ] @@ -4795,11 +6102,74 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", + "syn 1.0.109", +] + +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.6", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec 0.7.6", + "bitvec 1.0.1", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 3.6.12", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", "syn 1.0.109", ] +[[package]] +name = "parity-secp256k1" +version = "0.7.0" +source = "git+https://github.com/paritytech/rust-secp256k1.git#d05fd8e152f8d110b587906e3d854196b086e42a" +dependencies = [ + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "rand 0.7.3", +] + [[package]] name = "parity-wasm" version = "0.41.0" @@ -4890,12 +6260,41 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2 0.10.8", +] + [[package]] name = "pbkdf2" version = "0.12.2" @@ -4923,6 +6322,15 @@ dependencies = [ "regex", ] +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -4938,6 +6346,77 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.5.0", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.5" @@ -5017,9 +6496,19 @@ dependencies = [ "aes", "cbc", "der", - "pbkdf2", - "scrypt", - "sha2", + "pbkdf2 0.12.2", + "scrypt 0.11.0", + "sha2 0.10.8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", "spki", ] @@ -5075,6 +6564,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "prefix-sum-vec" version = "0.1.2" @@ -5097,7 +6592,22 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ - "fixed-hash", + "fixed-hash 0.7.0", + "impl-codec 0.5.1", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash 0.8.0", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde", + "scale-info", "uint", ] @@ -5107,7 +6617,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", ] [[package]] @@ -5116,7 +6636,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit", + "toml_edit 0.22.20", ] [[package]] @@ -5167,6 +6687,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bitflags 2.6.0", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.4", + "unarray", +] + [[package]] name = "prost" version = "0.12.6" @@ -5296,12 +6832,31 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + [[package]] name = "rand" version = "0.8.5" @@ -5309,11 +6864,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -5321,7 +6886,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -5330,17 +6904,35 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "rand_hc" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b363d4f6370f88d62bf586c80405657bde0f0e1b8945d47d2ad59b906cb4f54" dependencies = [ - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", ] [[package]] @@ -5349,7 +6941,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -5378,7 +6970,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -5422,11 +7014,20 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror", ] +[[package]] +name = "reed-solomon-erasure" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] + [[package]] name = "reed-solomon-erasure" version = "6.0.0" @@ -5515,6 +7116,22 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "relayer-rs" +version = "0.1.0" +dependencies = [ + "anyhow", + "ethers", + "near-sdk", + "prometheus", + "serde", + "serde_json", + "tokio", + "tracing", + "tracing-subscriber", + "warp", +] + [[package]] name = "rend" version = "0.4.2" @@ -5539,6 +7156,7 @@ dependencies = [ "http 0.2.12", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -5548,6 +7166,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -5556,6 +7175,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", + "tokio-rustls", "tokio-util", "tower-service", "url", @@ -5563,9 +7183,20 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots", "winreg", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.16.20" @@ -5589,7 +7220,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -5611,7 +7242,7 @@ version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ - "bitvec", + "bitvec 1.0.1", "bytecheck", "bytes", "hashbrown 0.12.3", @@ -5620,7 +7251,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -5643,6 +7274,28 @@ dependencies = [ "libc", ] +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -5687,7 +7340,7 @@ dependencies = [ "serde", "serde-xml-rs", "serde_derive", - "sha2", + "sha2 0.10.8", "thiserror", "time", "tokio", @@ -5767,6 +7420,18 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.23.13" @@ -5776,7 +7441,7 @@ dependencies = [ "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -5788,10 +7453,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", - "rustls", + "rustls 0.23.13", "rustls-native-certs", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", ] [[package]] @@ -5832,6 +7497,16 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.8" @@ -5878,7 +7553,40 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec 3.6.12", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -5890,21 +7598,73 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.77", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2 0.10.8", +] + [[package]] name = "scrypt" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2", + "pbkdf2 0.12.2", "salsa20", - "sha2", + "sha2 0.10.8", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -5913,13 +7673,27 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "rand", + "rand 0.8.5", "secp256k1-sys", ] @@ -5969,6 +7743,9 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "semver-parser" @@ -5976,6 +7753,18 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.210" @@ -6027,6 +7816,17 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "serde_ignored" version = "0.1.10" @@ -6059,6 +7859,15 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -6125,6 +7934,19 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -6170,11 +7992,21 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + [[package]] name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] [[package]] name = "simdutf8" @@ -6193,6 +8025,24 @@ dependencies = [ "num-traits", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -6266,6 +8116,20 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + [[package]] name = "spin" version = "0.5.2" @@ -6309,6 +8173,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.3", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.11.1" @@ -6321,7 +8198,16 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", ] [[package]] @@ -6337,6 +8223,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.77", +] + [[package]] name = "stun" version = "0.4.4" @@ -6347,7 +8246,7 @@ dependencies = [ "crc", "lazy_static", "md-5", - "rand", + "rand 0.8.5", "ring 0.16.20", "subtle", "thiserror", @@ -6362,6 +8261,26 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs 5.0.1", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver 1.0.23", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -6492,6 +8411,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + [[package]] name = "thiserror" version = "1.0.63" @@ -6572,6 +8502,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -6672,6 +8611,16 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.16" @@ -6683,6 +8632,33 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls", + "tungstenite 0.20.1", + "webpki-roots", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.21.0", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -6705,11 +8681,37 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.20", +] + [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.5.0", + "toml_datetime", + "winnow 0.5.40", +] [[package]] name = "toml_edit" @@ -6718,8 +8720,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap 2.5.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] @@ -6760,7 +8764,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", + "rand 0.8.5", "slab", "tokio", "tokio-util", @@ -6826,6 +8830,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -6879,6 +8893,45 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" @@ -6897,6 +8950,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicase" version = "2.7.0" @@ -6933,6 +8992,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -6968,12 +9033,28 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "uuid" version = "1.10.0" @@ -7010,6 +9091,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -7019,6 +9110,41 @@ dependencies = [ "try-lock", ] +[[package]] +name = "warp" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "headers", + "http 0.2.12", + "hyper", + "log", + "mime", + "mime_guess", + "multer", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-tungstenite 0.21.0", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -7506,7 +9632,7 @@ dependencies = [ "memfd", "memoffset 0.9.1", "paste", - "rand", + "rand 0.8.5", "rustix 0.38.37", "sptr", "wasm-encoder 0.35.0", @@ -7568,6 +9694,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "webrtc-util" version = "0.7.0" @@ -7583,12 +9715,24 @@ dependencies = [ "libc", "log", "nix 0.24.3", - "rand", + "rand 0.8.5", "thiserror", "tokio", "winapi", ] +[[package]] +name = "wee_alloc" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "memory_units", + "winapi", +] + [[package]] name = "which" version = "4.4.2" @@ -7623,6 +9767,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7786,6 +9939,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "0.6.18" @@ -7805,6 +9967,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "wyz" version = "0.5.1" @@ -7914,17 +10101,56 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand", + "rand 0.8.5", "rustc-hex", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe", + "zstd-safe 7.2.1", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] @@ -7945,8 +10171,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "parity-secp256k1" -version = "0.7.0" -source = "git+https://github.com/paritytech/rust-secp256k1.git#d05fd8e152f8d110b587906e3d854196b086e42a" diff --git a/Cargo.toml b/Cargo.toml index 388cb0ea..11fca723 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ resolver = "2" members = [ "indexer", "contracts/evm/test/ffi/bls-utils", + "relayer-rs", ] [workspace.package] diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml new file mode 100644 index 00000000..4d0f89c7 --- /dev/null +++ b/relayer-rs/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "relayer-rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +tokio = { version = "1.28", features = ["full"] } +ethers = { version = "2.0", features = ["ws"] } +near-sdk = "4.1" +prometheus = "0.13" +warp = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +anyhow = "1.0" +tracing = "0.1" +tracing-subscriber = "0.3" \ No newline at end of file diff --git a/relayer-rs/src/config.rs b/relayer-rs/src/config.rs new file mode 100644 index 00000000..0d91cf42 --- /dev/null +++ b/relayer-rs/src/config.rs @@ -0,0 +1,16 @@ +use serde::Deserialize; +use std::fs; + +#[derive(Debug, Deserialize)] +pub struct RelayerConfig { + pub rpc_url: String, + pub key_path: String, + pub da_account_id: String, + pub network: String, +} + +pub fn load_config() -> anyhow::Result { + let config_str = fs::read_to_string("config.json")?; + let config: RelayerConfig = serde_json::from_str(&config_str)?; + Ok(config) +} \ No newline at end of file diff --git a/relayer-rs/src/main.rs b/relayer-rs/src/main.rs new file mode 100644 index 00000000..8bdec468 --- /dev/null +++ b/relayer-rs/src/main.rs @@ -0,0 +1,19 @@ +mod config; +mod metrics; +mod relayer; + +use anyhow::Result; +use relayer::Relayer; +use tracing_subscriber::FmtSubscriber; + +#[tokio::main] +async fn main() -> Result<()> { + let subscriber = FmtSubscriber::new(); + tracing::subscriber::set_global_default(subscriber)?; + + let config = config::load_config()?; + let mut relayer = Relayer::new(config)?; + relayer.start().await?; + + Ok(()) +} \ No newline at end of file diff --git a/relayer-rs/src/metrics.rs b/relayer-rs/src/metrics.rs new file mode 100644 index 00000000..b1772586 --- /dev/null +++ b/relayer-rs/src/metrics.rs @@ -0,0 +1,34 @@ +use prometheus::{Counter, Histogram, IntCounter, Registry}; +use std::sync::Arc; + +pub struct RelayerMetrics { + pub num_blocks_received: IntCounter, + pub num_da_submissions_failed: IntCounter, + pub submission_duration_ms: Histogram, + pub retries_histogram: Histogram, + pub num_of_invalid_nonces: IntCounter, + pub num_of_expired_txs: IntCounter, + pub num_of_timeout_txs: IntCounter, +} + +impl RelayerMetrics { + pub fn new(registry: &Registry) -> anyhow::Result> { + let num_blocks_received = IntCounter::new( + "sffl_relayer_num_blocks_received", + "The number of blocks received from rollup", + )?; + registry.register(Box::new(num_blocks_received.clone()))?; + + // ... Initialize other metrics similarly ... + + Ok(Arc::new(Self { + num_blocks_received, + num_da_submissions_failed: IntCounter::new("sffl_relayer_num_da_submissions_failed", "The number of failed da submissions")?, + submission_duration_ms: Histogram::new("sffl_relayer_submission_duration_ms", "Duration of successful DA submissions")?, + retries_histogram: Histogram::new("sffl_relayer_retries_histogram", "Histogram of retry counts")?, + num_of_invalid_nonces: IntCounter::new("sffl_relayer_num_of_invalid_nonces", "Number of InvalidNonce error")?, + num_of_expired_txs: IntCounter::new("sffl_relayer_num_of_expired_txs", "Number of Expired transactions")?, + num_of_timeout_txs: IntCounter::new("sffl_relayer_num_of_timeout_txs", "Number of Timeout transactions")?, + })) + } +} \ No newline at end of file diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs new file mode 100644 index 00000000..773ba145 --- /dev/null +++ b/relayer-rs/src/relayer.rs @@ -0,0 +1,104 @@ +use crate::config::RelayerConfig; +use crate::metrics::RelayerMetrics; +use anyhow::Result; +use ethers::prelude::*; +use prometheus::Registry; +use std::sync::Arc; +use std::time::Duration; +use tokio::time; +use tracing::{error, info}; + +const NAMESPACE_ID: u64 = 1; +const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); +const SUBMIT_BLOCK_RETRY_TIMEOUT: Duration = Duration::from_secs(2); +const SUBMIT_BLOCK_RETRIES: usize = 3; + +pub struct Relayer { + rpc_client: Provider, + near_client: Arc, + metrics: Arc, +} + +impl Relayer { + pub fn new(config: RelayerConfig) -> Result { + let rpc_client = Provider::::connect(&config.rpc_url)?; + let near_client = Arc::new(near_sdk::NearClient::new( + &config.key_path, + &config.da_account_id, + &config.network, + NAMESPACE_ID, + )?); + + let registry = Registry::new(); + let metrics = RelayerMetrics::new(®istry)?; + + Ok(Self { + rpc_client, + near_client, + metrics, + }) + } + + pub async fn start(&mut self) -> Result<()> { + let mut block_stream = self.rpc_client.subscribe_blocks().await?; + let mut interval = time::interval(SUBMIT_BLOCK_INTERVAL); + + let mut blocks = Vec::new(); + + loop { + tokio::select! { + Some(block) = block_stream.next() => { + info!("Received rollup block header: {:?}", block.number); + self.metrics.num_blocks_received.inc(); + blocks.push(block); + } + _ = interval.tick() => { + if !blocks.is_empty() { + if let Err(e) = self.handle_blocks(&blocks).await { + error!("Error handling blocks: {:?}", e); + } + blocks.clear(); + } + } + } + } + } + + async fn handle_blocks(&self, blocks: &[Block]) -> Result<()> { + info!("Submitting blocks to NEAR: {:?}", blocks.iter().map(|b| b.number).collect::>()); + + let encoded_blocks = rlp::encode_list(blocks); + self.submit_encoded_blocks(&encoded_blocks).await?; + + Ok(()) + } + + async fn submit_encoded_blocks(&self, encoded_blocks: &[u8]) -> Result<()> { + let start_time = std::time::Instant::now(); + + for i in 0..SUBMIT_BLOCK_RETRIES { + match self.near_client.force_submit(encoded_blocks).await { + Ok(out) => { + self.metrics.submission_duration_ms.observe(start_time.elapsed().as_millis() as f64); + self.metrics.retries_histogram.observe(i as f64); + info!("Blocks submitted successfully: {:?}", out); + return Ok(()); + } + Err(e) => { + error!("Error submitting blocks to NEAR, retrying: {:?}", e); + if e.to_string().contains("InvalidNonce") { + self.metrics.num_of_invalid_nonces.inc(); + } else if e.to_string().contains("Expired") { + self.metrics.num_of_expired_txs.inc(); + } else if e.to_string().contains("Timeout") { + self.metrics.num_of_timeout_txs.inc(); + } + time::sleep(SUBMIT_BLOCK_RETRY_TIMEOUT).await; + } + } + } + + self.metrics.num_da_submissions_failed.inc(); + anyhow::bail!("Failed to submit blocks to NEAR after retries") + } +} \ No newline at end of file From 4c7582d473f82ddc6545864157351c9a49242f97 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Fri, 20 Sep 2024 15:12:13 +0200 Subject: [PATCH 02/96] Remove near_sdk --- Cargo.lock | 885 ++++++++------------------------------ relayer-rs/Cargo.toml | 1 - relayer-rs/src/relayer.rs | 8 +- 3 files changed, 182 insertions(+), 712 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3741d927..177a98a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "sha1", "smallvec", "tokio", @@ -299,7 +299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if 1.0.0", - "cipher 0.4.4", + "cipher", "cpufeatures", ] @@ -309,7 +309,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.15", + "getrandom", "once_cell", "version_check", ] @@ -321,7 +321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.15", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -800,7 +800,7 @@ dependencies = [ "openssl", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "serde", "serde_json", "serde_urlencoded", @@ -898,12 +898,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.12.3" @@ -1006,39 +1000,16 @@ dependencies = [ "typenum", ] -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.1", -] - -[[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", + "wyz", ] [[package]] @@ -1065,15 +1036,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -1120,7 +1082,7 @@ name = "bls-utils" version = "0.1.0" dependencies = [ "clap", - "rand 0.8.5", + "rand", "serde", "serde_json", "zeropool-bn", @@ -1240,7 +1202,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ - "sha2 0.10.8", + "sha2", "tinyvec", ] @@ -1332,16 +1294,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "c2-chacha" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" -dependencies = [ - "cipher 0.2.5", - "ppv-lite86", -] - [[package]] name = "camino" version = "1.1.9" @@ -1380,7 +1332,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1436,15 +1388,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1562,7 +1505,7 @@ dependencies = [ "hmac", "k256", "serde", - "sha2 0.10.8", + "sha2", "thiserror", ] @@ -1572,13 +1515,13 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ - "bitvec 1.0.1", + "bitvec", "coins-bip32", "hmac", "once_cell", "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2 0.10.8", + "rand", + "sha2", "thiserror", ] @@ -1597,7 +1540,7 @@ dependencies = [ "ripemd", "serde", "serde_derive", - "sha2 0.10.8", + "sha2", "sha3", "thiserror", ] @@ -1914,7 +1857,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1945,20 +1888,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", + "cipher", ] [[package]] @@ -2159,7 +2089,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -2186,7 +2116,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -2295,12 +2225,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - [[package]] name = "dynasm" version = "1.2.3" @@ -2370,40 +2294,17 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", + "signature", "spki", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "signature", ] [[package]] @@ -2412,10 +2313,10 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.3", - "ed25519 2.2.3", - "rand_core 0.6.4", - "sha2 0.10.8", + "curve25519-dalek", + "ed25519", + "rand_core", + "sha2", "subtle", ] @@ -2438,7 +2339,7 @@ dependencies = [ "generic-array 0.14.7", "group", "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", @@ -2479,7 +2380,7 @@ dependencies = [ "hex", "k256", "log", - "rand 0.8.5", + "rand", "rlp", "serde", "sha3", @@ -2576,11 +2477,11 @@ dependencies = [ "hex", "hmac", "pbkdf2 0.11.0", - "rand 0.8.5", + "rand", "scrypt 0.10.0", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "sha3", "thiserror", "uuid 0.8.2", @@ -2611,7 +2512,7 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -2626,7 +2527,7 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types 0.12.2", @@ -2739,7 +2640,7 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand 0.8.5", + "rand", "rlp", "serde", "serde_json", @@ -2845,8 +2746,8 @@ dependencies = [ "elliptic-curve", "eth-keystore", "ethers-core", - "rand 0.8.5", - "sha2 0.10.8", + "rand", + "sha2", "thiserror", "tracing", ] @@ -2956,7 +2857,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2972,7 +2873,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d81b511929c2669eaf64e36471cf27c2508133e62ade9d49e608e8d675e7854" dependencies = [ - "bitvec 1.0.1", + "bitvec", "dissimilar", "num-traits", "prefix-sum-vec", @@ -2988,9 +2889,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", "static_assertions", ] @@ -3001,7 +2899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3079,12 +2977,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -3270,17 +3162,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -3289,7 +3170,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -3334,7 +3215,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3632,29 +3513,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core 0.6.4", + "rand_core", "rand_xoshiro", "sized-chunks", "typenum", "version_check", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.6.12", + "parity-scale-codec", ] [[package]] @@ -3713,7 +3585,7 @@ dependencies = [ "lapin", "near-client", "near-client-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-indexer", "near-o11y", "openssl-probe", @@ -3900,8 +3772,8 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", - "sha2 0.10.8", - "signature 2.2.0", + "sha2", + "signature", ] [[package]] @@ -4266,12 +4138,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "mime" version = "0.3.17" @@ -4321,7 +4187,7 @@ dependencies = [ "hermit-abi 0.3.9", "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.52.0", ] @@ -4366,28 +4232,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "near-abi" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "885db39b08518fa700b73fa2214e8adbbfba316ba82dd510f50519173eadaf73" -dependencies = [ - "borsh 0.9.3", - "schemars", - "semver 1.0.23", - "serde", -] - -[[package]] -name = "near-account-id" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d258582a1878e6db67400b0504a5099db85718d22c2e07f747fe1706ae7150" -dependencies = [ - "borsh 0.9.3", - "serde", -] - [[package]] name = "near-account-id" version = "1.0.0" @@ -4457,7 +4301,7 @@ dependencies = [ "near-chain-configs", "near-chain-primitives", "near-client-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-epoch-manager", "near-mainnet-res", "near-network", @@ -4466,14 +4310,14 @@ dependencies = [ "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "near-vm-runner", "node-runtime", "num-rational", "once_cell", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rayon", "strum 0.24.1", "tempfile", @@ -4493,16 +4337,16 @@ dependencies = [ "chrono", "derive_more", "near-config-utils", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", "near-parameters", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-time", "num-rational", "once_cell", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "smart-default", "time", "tracing", @@ -4513,8 +4357,8 @@ name = "near-chain-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-crypto 2.2.1-rc.1", - "near-primitives 2.2.1-rc.1", + "near-crypto", + "near-primitives", "near-time", "thiserror", "time", @@ -4537,18 +4381,18 @@ dependencies = [ "near-chain", "near-chain-configs", "near-chunks-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-epoch-manager", "near-network", "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "once_cell", - "rand 0.8.5", - "reed-solomon-erasure 6.0.0", + "rand", + "reed-solomon-erasure", "strum 0.24.1", "time", "tracing", @@ -4560,7 +4404,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-chain-primitives", - "near-primitives 2.2.1-rc.1", + "near-primitives", ] [[package]] @@ -4587,7 +4431,7 @@ dependencies = [ "near-chain-primitives", "near-chunks", "near-client-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-dyn-configs", "near-epoch-manager", "near-network", @@ -4596,16 +4440,16 @@ dependencies = [ "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "near-telemetry", "near-vm-runner", "num-rational", "once_cell", "percent-encoding", - "rand 0.8.5", + "rand", "rayon", - "reed-solomon-erasure 6.0.0", + "reed-solomon-erasure", "regex", "reqwest", "rust-s3", @@ -4631,8 +4475,8 @@ dependencies = [ "near-chain-configs", "near-chain-primitives", "near-chunks-primitives", - "near-crypto 2.2.1-rc.1", - "near-primitives 2.2.1-rc.1", + "near-crypto", + "near-primitives", "near-time", "serde", "serde_json", @@ -4654,50 +4498,24 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-crypto" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e75673d69fd7365508f3d32483669fe45b03bfb34e4d9363e90adae9dfb416c" -dependencies = [ - "arrayref", - "blake2 0.9.2", - "borsh 0.9.3", - "bs58 0.4.0", - "c2-chacha", - "curve25519-dalek 3.2.0", - "derive_more", - "ed25519-dalek 1.0.1", - "near-account-id 0.14.0", - "once_cell", - "parity-secp256k1", - "primitive-types 0.10.1", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - [[package]] name = "near-crypto" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "blake2 0.10.6", + "blake2", "borsh 1.5.1", "bs58 0.4.0", - "curve25519-dalek 4.1.3", + "curve25519-dalek", "derive_more", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "hex", - "near-account-id 1.0.0", + "near-account-id", "near-config-utils", "near-stdx", "once_cell", "primitive-types 0.10.1", - "rand 0.8.5", + "rand", "secp256k1", "serde", "serde_json", @@ -4712,9 +4530,9 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "anyhow", "near-chain-configs", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-time", "once_cell", "prometheus", @@ -4735,15 +4553,15 @@ dependencies = [ "near-cache", "near-chain-configs", "near-chain-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "num-rational", "once_cell", "primitive-types 0.10.1", - "rand 0.8.5", - "rand_hc 0.3.2", + "rand", + "rand_hc", "serde_json", "smart-default", "tracing", @@ -4754,7 +4572,7 @@ name = "near-fmt" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives-core 2.2.1-rc.1", + "near-primitives-core", ] [[package]] @@ -4768,12 +4586,12 @@ dependencies = [ "lazy_static", "near-chain-configs", "near-client", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-dyn-configs", "near-indexer-primitives", "near-o11y", "near-parameters", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "nearcore", "node-runtime", @@ -4790,7 +4608,7 @@ name = "near-indexer-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives 2.2.1-rc.1", + "near-primitives", "serde", "serde_json", ] @@ -4816,8 +4634,8 @@ dependencies = [ "near-jsonrpc-primitives", "near-network", "near-o11y", - "near-primitives 2.2.1-rc.1", - "near-rpc-error-macro 2.2.1-rc.1", + "near-primitives", + "near-rpc-error-macro", "once_cell", "serde", "serde_json", @@ -4836,7 +4654,7 @@ dependencies = [ "awc", "futures", "near-jsonrpc-primitives", - "near-primitives 2.2.1-rc.1", + "near-primitives", "serde", "serde_json", ] @@ -4849,9 +4667,9 @@ dependencies = [ "arbitrary", "near-chain-configs", "near-client-primitives", - "near-crypto 2.2.1-rc.1", - "near-primitives 2.2.1-rc.1", - "near-rpc-error-macro 2.2.1-rc.1", + "near-crypto", + "near-primitives", + "near-rpc-error-macro", "serde", "serde_json", "thiserror", @@ -4863,9 +4681,9 @@ name = "near-mainnet-res" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-account-id 1.0.0", + "near-account-id", "near-chain-configs", - "near-primitives 2.2.1-rc.1", + "near-primitives", "serde_json", ] @@ -4892,12 +4710,12 @@ dependencies = [ "lru 0.12.4", "near-async", "near-chain-configs", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-fmt", "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-store", "once_cell", "opentelemetry", @@ -4905,11 +4723,11 @@ dependencies = [ "pin-project", "protobuf 3.5.1", "protobuf-codegen", - "rand 0.8.5", + "rand", "rayon", - "reed-solomon-erasure 6.0.0", + "reed-solomon-erasure", "serde", - "sha2 0.10.8", + "sha2", "smart-default", "strum 0.24.1", "stun", @@ -4929,8 +4747,8 @@ dependencies = [ "actix", "base64 0.21.7", "clap", - "near-crypto 2.2.1-rc.1", - "near-primitives-core 2.2.1-rc.1", + "near-crypto", + "near-primitives-core", "once_cell", "opentelemetry", "opentelemetry-otlp", @@ -4954,8 +4772,8 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "borsh 1.5.1", "enum-map", - "near-account-id 1.0.0", - "near-primitives-core 2.2.1-rc.1", + "near-account-id", + "near-primitives-core", "num-rational", "serde", "serde_repr", @@ -4995,40 +4813,11 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", - "near-primitives 2.2.1-rc.1", - "once_cell", - "rand 0.8.5", -] - -[[package]] -name = "near-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad1a9a1640539c81f065425c31bffcfbf6b31ef1aeaade59ce905f5df6ac860" -dependencies = [ - "borsh 0.9.3", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext", - "hex", - "near-crypto 0.14.0", - "near-primitives-core 0.14.0", - "near-rpc-error-macro 0.14.0", - "near-vm-errors", - "num-rational", + "near-primitives", "once_cell", - "primitive-types 0.10.1", - "rand 0.7.3", - "reed-solomon-erasure 4.0.2", - "serde", - "serde_json", - "smart-default", - "strum 0.24.1", - "thiserror", + "rand", ] [[package]] @@ -5048,11 +4837,11 @@ dependencies = [ "enum-map", "hex", "itertools 0.10.5", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-fmt", "near-parameters", - "near-primitives-core 2.2.1-rc.1", - "near-rpc-error-macro 2.2.1-rc.1", + "near-primitives-core", + "near-rpc-error-macro", "near-stdx", "near-structs-checker-lib", "near-time", @@ -5060,9 +4849,9 @@ dependencies = [ "once_cell", "ordered-float", "primitive-types 0.10.1", - "rand 0.8.5", - "rand_chacha 0.3.1", - "reed-solomon-erasure 6.0.0", + "rand", + "rand_chacha", + "reed-solomon-erasure", "serde", "serde_json", "serde_with", @@ -5074,23 +4863,6 @@ dependencies = [ "zstd 0.13.2", ] -[[package]] -name = "near-primitives-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d508f0fc340f6461e4e256417685720d3c4c00bb5a939b105160e49137caba" -dependencies = [ - "base64 0.11.0", - "borsh 0.9.3", - "bs58 0.4.0", - "derive_more", - "near-account-id 0.14.0", - "num-rational", - "serde", - "sha2 0.10.8", - "strum 0.24.1", -] - [[package]] name = "near-primitives-core" version = "2.2.1-rc.1" @@ -5102,12 +4874,12 @@ dependencies = [ "bs58 0.4.0", "derive_more", "enum-map", - "near-account-id 1.0.0", + "near-account-id", "near-structs-checker-lib", "num-rational", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "thiserror", ] @@ -5124,15 +4896,15 @@ dependencies = [ "derive_more", "futures", "hex", - "near-account-id 1.0.0", + "near-account-id", "near-chain-configs", "near-client", "near-client-primitives", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-network", "near-o11y", "near-parameters", - "near-primitives 2.2.1-rc.1", + "near-primitives", "node-runtime", "paperclip", "serde", @@ -5142,17 +4914,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "near-rpc-error-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ee0b41c75ef859c193a8ff1dadfa0c8207bc0ac447cc22259721ad769a1408" -dependencies = [ - "quote", - "serde", - "syn 1.0.109", -] - [[package]] name = "near-rpc-error-core" version = "2.2.1-rc.1" @@ -5163,62 +4924,16 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "near-rpc-error-macro" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e837bd4bacd807073ec5ceb85708da7f721b46a4c2a978de86027fb0034ce31" -dependencies = [ - "near-rpc-error-core 0.14.0", - "serde", - "syn 1.0.109", -] - [[package]] name = "near-rpc-error-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-rpc-error-core 2.2.1-rc.1", + "near-rpc-error-core", "serde", "syn 2.0.77", ] -[[package]] -name = "near-sdk" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15eb3de2defe3626260cc209a6cdb985c6b27b0bd4619fad97dcfae002c3c5bd" -dependencies = [ - "base64 0.13.1", - "borsh 0.9.3", - "bs58 0.4.0", - "near-abi", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "near-primitives-core 0.14.0", - "near-sdk-macros", - "near-sys", - "near-vm-logic", - "once_cell", - "schemars", - "serde", - "serde_json", - "wee_alloc", -] - -[[package]] -name = "near-sdk-macros" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4907affc9f5ed559456509188ff0024f1f2099c0830e6bdb66eb61d5b75912c0" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "near-stdx" version = "2.2.1-rc.1" @@ -5243,19 +4958,19 @@ dependencies = [ "itoa", "lru 0.12.4", "near-chain-configs", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-fmt", "near-o11y", "near-parameters", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-stdx", "near-time", "near-vm-runner", "num_cpus", "once_cell", - "rand 0.8.5", + "rand", "rayon", - "reed-solomon-erasure 6.0.0", + "reed-solomon-erasure", "rlimit", "rocksdb", "serde", @@ -5287,12 +5002,6 @@ name = "near-structs-checker-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" -[[package]] -name = "near-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf4ca5c805cb78700e10e43484902d8da05f25788db277999d209568aaf4c8e" - [[package]] name = "near-telemetry" version = "2.2.1-rc.1" @@ -5384,40 +5093,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-vm-errors" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0da466a30f0446639cbd788c30865086fac3e8dcb07a79e51d2b0775ed4261e" -dependencies = [ - "borsh 0.9.3", - "near-account-id 0.14.0", - "near-rpc-error-macro 0.14.0", - "serde", -] - -[[package]] -name = "near-vm-logic" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b534828419bacbf1f7b11ef7b00420f248c548c485d3f0cfda8bb6931152f2" -dependencies = [ - "base64 0.13.1", - "borsh 0.9.3", - "bs58 0.4.0", - "byteorder", - "near-account-id 0.14.0", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "near-primitives-core 0.14.0", - "near-vm-errors", - "ripemd", - "serde", - "sha2 0.10.8", - "sha3", - "zeropool-bn", -] - [[package]] name = "near-vm-runner" version = "2.2.1-rc.1" @@ -5427,15 +5102,15 @@ dependencies = [ "blst", "borsh 1.5.1", "bytesize", - "ed25519-dalek 2.1.1", + "ed25519-dalek", "enum-map", "finite-wasm", "lru 0.12.4", "memoffset 0.8.0", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", "near-parameters", - "near-primitives-core 2.2.1-rc.1", + "near-primitives-core", "near-stdx", "near-vm-compiler", "near-vm-compiler-singlepass", @@ -5453,7 +5128,7 @@ dependencies = [ "rustix 0.38.37", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "sha3", "strum 0.24.1", "tempfile", @@ -5511,7 +5186,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-primitives-core 2.2.1-rc.1", + "near-primitives-core", "near-vm-runner", "once_cell", ] @@ -5544,7 +5219,7 @@ dependencies = [ "near-client", "near-client-primitives", "near-config-utils", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-dyn-configs", "near-epoch-manager", "near-jsonrpc", @@ -5555,7 +5230,7 @@ dependencies = [ "near-parameters", "near-performance-metrics", "near-pool", - "near-primitives 2.2.1-rc.1", + "near-primitives", "near-rosetta-rpc", "near-store", "near-telemetry", @@ -5563,7 +5238,7 @@ dependencies = [ "node-runtime", "num-rational", "once_cell", - "rand 0.8.5", + "rand", "rayon", "regex", "reqwest", @@ -5618,21 +5293,21 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto 2.2.1-rc.1", + "near-crypto", "near-o11y", "near-parameters", - "near-primitives 2.2.1-rc.1", - "near-primitives-core 2.2.1-rc.1", + "near-primitives", + "near-primitives-core", "near-store", "near-vm-runner", "near-wallet-contract", "num-bigint 0.3.3", "num-traits", "once_cell", - "rand 0.8.5", + "rand", "rayon", "serde_json", - "sha2 0.10.8", + "sha2", "thiserror", "tracing", ] @@ -5809,12 +5484,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "open-fastrlp" version = "0.1.4" @@ -5962,7 +5631,7 @@ dependencies = [ "opentelemetry", "ordered-float", "percent-encoding", - "rand 0.8.5", + "rand", "thiserror", "tokio", "tokio-stream", @@ -5982,7 +5651,7 @@ checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "borsh 1.5.1", "num-traits", - "rand 0.8.5", + "rand", "serde", ] @@ -6016,10 +5685,10 @@ dependencies = [ "hmac", "pkcs12", "pkcs5", - "rand 0.8.5", + "rand", "rc2", "sha1", - "sha2 0.10.8", + "sha2", "thiserror", "x509-parser", ] @@ -6107,20 +5776,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.6", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde", -] - [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -6128,25 +5783,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec 0.7.6", - "bitvec 1.0.1", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.12", + "parity-scale-codec-derive", "serde", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "parity-scale-codec-derive" version = "3.6.12" @@ -6159,17 +5802,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parity-secp256k1" -version = "0.7.0" -source = "git+https://github.com/paritytech/rust-secp256k1.git#d05fd8e152f8d110b587906e3d854196b086e42a" -dependencies = [ - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "rand 0.7.3", -] - [[package]] name = "parity-wasm" version = "0.41.0" @@ -6267,7 +5899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -6292,7 +5924,7 @@ dependencies = [ "digest 0.10.7", "hmac", "password-hash", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -6383,7 +6015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", - "rand 0.8.5", + "rand", ] [[package]] @@ -6498,7 +6130,7 @@ dependencies = [ "der", "pbkdf2 0.12.2", "scrypt 0.11.0", - "sha2 0.10.8", + "sha2", "spki", ] @@ -6593,7 +6225,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash 0.7.0", - "impl-codec 0.5.1", "uint", ] @@ -6604,7 +6235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -6620,23 +6251,13 @@ dependencies = [ "toml 0.5.11", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -6696,8 +6317,8 @@ dependencies = [ "bitflags 2.6.0", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_xorshift", "regex-syntax 0.8.4", "unarray", @@ -6832,31 +6453,12 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - [[package]] name = "rand" version = "0.8.5" @@ -6864,21 +6466,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", "serde", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -6886,16 +6478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -6904,26 +6487,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom", "serde", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_hc" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b363d4f6370f88d62bf586c80405657bde0f0e1b8945d47d2ad59b906cb4f54" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -6932,7 +6506,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -6941,7 +6515,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -6970,7 +6544,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -7014,20 +6588,11 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.15", + "getrandom", "libredox", "thiserror", ] -[[package]] -name = "reed-solomon-erasure" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" -dependencies = [ - "smallvec", -] - [[package]] name = "reed-solomon-erasure" version = "6.0.0" @@ -7122,7 +6687,6 @@ version = "0.1.0" dependencies = [ "anyhow", "ethers", - "near-sdk", "prometheus", "serde", "serde_json", @@ -7220,7 +6784,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom 0.2.15", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7242,7 +6806,7 @@ version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ - "bitvec 1.0.1", + "bitvec", "bytecheck", "bytes", "hashbrown 0.12.3", @@ -7340,7 +6904,7 @@ dependencies = [ "serde", "serde-xml-rs", "serde_derive", - "sha2 0.10.8", + "sha2", "thiserror", "time", "tokio", @@ -7553,7 +7117,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -7573,7 +7137,7 @@ checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.6.12", + "parity-scale-codec", "scale-info-derive", ] @@ -7598,30 +7162,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.77", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -7643,7 +7183,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "salsa20", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -7654,7 +7194,7 @@ checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ "pbkdf2 0.12.2", "salsa20", - "sha2 0.10.8", + "sha2", ] [[package]] @@ -7693,7 +7233,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "rand 0.8.5", + "rand", "secp256k1-sys", ] @@ -7816,17 +7356,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "serde_ignored" version = "0.1.10" @@ -7934,19 +7463,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha2" version = "0.10.8" @@ -7992,12 +7508,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - [[package]] name = "signature" version = "2.2.0" @@ -8005,7 +7515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -8246,7 +7756,7 @@ dependencies = [ "crc", "lazy_static", "md-5", - "rand 0.8.5", + "rand", "ring 0.16.20", "subtle", "thiserror", @@ -8275,7 +7785,7 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "thiserror", "url", "zip", @@ -8690,7 +8200,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -8702,17 +8212,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.5.0", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" @@ -8723,7 +8222,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -8764,7 +8263,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", "tokio-util", @@ -8905,7 +8404,7 @@ dependencies = [ "http 0.2.12", "httparse", "log", - "rand 0.8.5", + "rand", "rustls 0.21.12", "sha1", "thiserror", @@ -8925,7 +8424,7 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "rand 0.8.5", + "rand", "sha1", "thiserror", "url", @@ -9051,7 +8550,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.15", + "getrandom", "serde", ] @@ -9139,12 +8638,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9632,7 +9125,7 @@ dependencies = [ "memfd", "memoffset 0.9.1", "paste", - "rand 0.8.5", + "rand", "rustix 0.38.37", "sptr", "wasm-encoder 0.35.0", @@ -9715,24 +9208,12 @@ dependencies = [ "libc", "log", "nix 0.24.3", - "rand 0.8.5", + "rand", "thiserror", "tokio", "winapi", ] -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "which" version = "4.4.2" @@ -9939,15 +9420,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" @@ -9986,12 +9458,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.1" @@ -10101,7 +9567,7 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand 0.8.5", + "rand", "rustc-hex", ] @@ -10171,3 +9637,8 @@ dependencies = [ "cc", "pkg-config", ] + +[[patch.unused]] +name = "parity-secp256k1" +version = "0.7.0" +source = "git+https://github.com/paritytech/rust-secp256k1.git#d05fd8e152f8d110b587906e3d854196b086e42a" diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index 4d0f89c7..b89d0df5 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] tokio = { version = "1.28", features = ["full"] } ethers = { version = "2.0", features = ["ws"] } -near-sdk = "4.1" prometheus = "0.13" warp = "0.3" serde = { version = "1.0", features = ["derive"] } diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 773ba145..929f7456 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -15,14 +15,14 @@ const SUBMIT_BLOCK_RETRIES: usize = 3; pub struct Relayer { rpc_client: Provider, - near_client: Arc, + near_da_client: Arc, metrics: Arc, } impl Relayer { pub fn new(config: RelayerConfig) -> Result { let rpc_client = Provider::::connect(&config.rpc_url)?; - let near_client = Arc::new(near_sdk::NearClient::new( + let near_client = Arc::new(NearDAClient::new( &config.key_path, &config.da_account_id, &config.network, @@ -34,7 +34,7 @@ impl Relayer { Ok(Self { rpc_client, - near_client, + near_da_client, metrics, }) } @@ -77,7 +77,7 @@ impl Relayer { let start_time = std::time::Instant::now(); for i in 0..SUBMIT_BLOCK_RETRIES { - match self.near_client.force_submit(encoded_blocks).await { + match self.near_da_client.force_submit(encoded_blocks).await { Ok(out) => { self.metrics.submission_duration_ms.observe(start_time.elapsed().as_millis() as f64); self.metrics.retries_histogram.observe(i as f64); From 1047cafe72356f410607f96d03fd338dbf57820f Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Fri, 20 Sep 2024 17:17:36 +0200 Subject: [PATCH 03/96] Latest relayer --- Cargo.lock | 1258 ++++++++++++++++++++++++++++++------- relayer-rs/Cargo.toml | 3 + relayer-rs/src/relayer.rs | 28 +- 3 files changed, 1042 insertions(+), 247 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 177a98a1..e326e30a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,7 +34,7 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", - "tokio-util", + "tokio-util 0.7.12", ] [[package]] @@ -50,7 +50,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -99,11 +99,11 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "sha1", "smallvec", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", "zstd 0.13.2", ] @@ -189,7 +189,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-openssl", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -299,7 +299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if 1.0.0", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -309,7 +309,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -321,7 +321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -800,7 +800,7 @@ dependencies = [ "openssl", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "serde", "serde_json", "serde_urlencoded", @@ -1012,6 +1012,17 @@ dependencies = [ "wyz", ] +[[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 = "blake2" version = "0.10.6" @@ -1082,7 +1093,7 @@ name = "bls-utils" version = "0.1.0" dependencies = [ "clap", - "rand", + "rand 0.8.5", "serde", "serde_json", "zeropool-bn", @@ -1294,6 +1305,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.9" @@ -1332,7 +1353,26 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "cbindgen" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" +dependencies = [ + "clap", + "heck 0.4.1", + "indexmap 2.5.0", + "log", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.77", + "tempfile", + "toml 0.8.19", ] [[package]] @@ -1388,6 +1428,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1520,7 +1569,7 @@ dependencies = [ "hmac", "once_cell", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "sha2", "thiserror", ] @@ -1857,7 +1906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1888,7 +1937,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -1902,6 +1951,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", + "rand_core 0.6.4", "rustc_version 0.4.1", "subtle", "zeroize", @@ -2089,7 +2139,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -2315,7 +2365,7 @@ checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core", + "rand_core 0.6.4", "sha2", "subtle", ] @@ -2339,7 +2389,7 @@ dependencies = [ "generic-array 0.14.7", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -2380,7 +2430,7 @@ dependencies = [ "hex", "k256", "log", - "rand", + "rand 0.8.5", "rlp", "serde", "sha3", @@ -2477,7 +2527,7 @@ dependencies = [ "hex", "hmac", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "scrypt 0.10.0", "serde", "serde_json", @@ -2640,7 +2690,7 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand", + "rand 0.8.5", "rlp", "serde", "serde_json", @@ -2746,7 +2796,7 @@ dependencies = [ "elliptic-curve", "eth-keystore", "ethers-core", - "rand", + "rand 0.8.5", "sha2", "thiserror", "tracing", @@ -2857,7 +2907,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2899,7 +2949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -3162,6 +3212,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -3170,7 +3231,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -3215,7 +3276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -3234,7 +3295,7 @@ dependencies = [ "indexmap 2.5.0", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -3308,6 +3369,15 @@ dependencies = [ "http 0.2.12", ] +[[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" @@ -3513,7 +3583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core", + "rand_core 0.6.4", "rand_xoshiro", "sized-chunks", "typenum", @@ -3585,9 +3655,9 @@ dependencies = [ "lapin", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-indexer", - "near-o11y", + "near-o11y 2.2.1-rc.1", "openssl-probe", "prometheus", "serde", @@ -3978,6 +4048,26 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "loupe" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" +dependencies = [ + "loupe-derive", + "rustversion", +] + +[[package]] +name = "loupe-derive" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "lru" version = "0.7.8" @@ -4187,7 +4277,7 @@ dependencies = [ "hermit-abi 0.3.9", "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -4215,6 +4305,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + [[package]] name = "native-tls" version = "0.2.12" @@ -4251,7 +4347,7 @@ dependencies = [ "derive_more", "futures", "near-async-derive", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-time", "once_cell", @@ -4272,6 +4368,15 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "near-cache" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b222afeb8daa3849626f0ce713806ce8be2b33e4aac54913dc7ef1db1fa83d7" +dependencies = [ + "lru 0.7.8", +] + [[package]] name = "near-cache" version = "2.2.1-rc.1" @@ -4297,27 +4402,27 @@ dependencies = [ "itoa", "lru 0.12.4", "near-async", - "near-cache", - "near-chain-configs", + "near-cache 2.2.1-rc.1", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-mainnet-res", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "node-runtime", "num-rational", "once_cell", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", "strum 0.24.1", "tempfile", @@ -4327,6 +4432,29 @@ dependencies = [ "yansi", ] +[[package]] +name = "near-chain-configs" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac5ca8d44a732193603e117f57d490b8c29b1e8e756abb3f12d4eb19443cd1d" +dependencies = [ + "anyhow", + "bytesize", + "chrono", + "derive_more", + "near-config-utils 0.21.2", + "near-crypto 0.21.2", + "near-parameters 0.21.2", + "near-primitives 0.21.2", + "num-rational", + "once_cell", + "serde", + "serde_json", + "sha2", + "smart-default", + "tracing", +] + [[package]] name = "near-chain-configs" version = "2.2.1-rc.1" @@ -4336,11 +4464,11 @@ dependencies = [ "bytesize", "chrono", "derive_more", - "near-config-utils", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives", + "near-config-utils 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "num-rational", "once_cell", @@ -4357,8 +4485,8 @@ name = "near-chain-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "thiserror", "time", @@ -4379,20 +4507,20 @@ dependencies = [ "lru 0.12.4", "near-async", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chunks-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-network", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", - "rand", - "reed-solomon-erasure", + "rand 0.8.5", + "reed-solomon-erasure 6.0.0", "strum 0.24.1", "time", "tracing", @@ -4404,7 +4532,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-chain-primitives", - "near-primitives", + "near-primitives 2.2.1-rc.1", ] [[package]] @@ -4425,31 +4553,31 @@ dependencies = [ "itertools 0.10.5", "lru 0.12.4", "near-async", - "near-cache", + "near-cache 2.2.1-rc.1", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-chunks", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "near-telemetry", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "num-rational", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "regex", "reqwest", "rust-s3", @@ -4472,11 +4600,11 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "actix", "chrono", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-chunks-primitives", - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "serde", "serde_json", @@ -4487,6 +4615,18 @@ dependencies = [ "yansi", ] +[[package]] +name = "near-config-utils" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1c9ff519efa8c778d341fa34971dee93e8adf4e8ae51feaefaa63bdf7e496a" +dependencies = [ + "anyhow", + "json_comments", + "thiserror", + "tracing", +] + [[package]] name = "near-config-utils" version = "2.2.1-rc.1" @@ -4498,12 +4638,39 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-crypto" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d927e95742aea981b9fd60996fbeba3b61e90acafd54c2c3c2a4ed40065ff03" +dependencies = [ + "blake2 0.9.2", + "borsh 1.5.1", + "bs58 0.4.0", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "hex", + "near-account-id", + "near-config-utils 0.21.2", + "near-stdx 0.21.2", + "once_cell", + "primitive-types 0.10.1", + "rand 0.7.3", + "secp256k1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + [[package]] name = "near-crypto" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "blake2", + "blake2 0.10.6", "borsh 1.5.1", "bs58 0.4.0", "curve25519-dalek", @@ -4511,11 +4678,11 @@ dependencies = [ "ed25519-dalek", "hex", "near-account-id", - "near-config-utils", - "near-stdx", + "near-config-utils 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "once_cell", "primitive-types 0.10.1", - "rand", + "rand 0.8.5", "secp256k1", "serde", "serde_json", @@ -4523,16 +4690,50 @@ dependencies = [ "thiserror", ] +[[package]] +name = "near-da-primitives" +version = "0.4.0" +source = "git+https://github.com/Nuffle-Labs/data-availability?branch=main#e182622aa50d4b1bee09f4cda85a2cc2b585f066" +dependencies = [ + "borsh 1.5.1", + "serde", + "serde_with", +] + +[[package]] +name = "near-da-rpc" +version = "0.4.0" +source = "git+https://github.com/Nuffle-Labs/data-availability?branch=main#e182622aa50d4b1bee09f4cda85a2cc2b585f066" +dependencies = [ + "async-trait", + "borsh 1.5.1", + "cbindgen", + "eyre", + "futures", + "near-crypto 0.21.2", + "near-da-primitives", + "near-jsonrpc-client 0.9.0", + "near-jsonrpc-primitives 0.21.2", + "near-primitives 0.21.2", + "serde", + "serde_json", + "serde_with", + "tokio", + "tracing", + "url", + "which", +] + [[package]] name = "near-dyn-configs" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-chain-configs", - "near-crypto", - "near-o11y", - "near-primitives", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "once_cell", "prometheus", @@ -4550,29 +4751,38 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "borsh 1.5.1", "itertools 0.10.5", - "near-cache", - "near-chain-configs", + "near-cache 2.2.1-rc.1", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", - "near-crypto", - "near-o11y", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-store", "num-rational", "once_cell", "primitive-types 0.10.1", - "rand", - "rand_hc", + "rand 0.8.5", + "rand_hc 0.3.2", "serde_json", "smart-default", "tracing", ] +[[package]] +name = "near-fmt" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a9aa862014eeedb79df494b1b8080c5b51cd014f978183e08a7918a50350558" +dependencies = [ + "near-primitives-core 0.21.2", +] + [[package]] name = "near-fmt" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", ] [[package]] @@ -4584,14 +4794,14 @@ dependencies = [ "anyhow", "futures", "lazy_static", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-indexer-primitives", - "near-o11y", - "near-parameters", - "near-primitives", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-store", "nearcore", "node-runtime", @@ -4608,7 +4818,7 @@ name = "near-indexer-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives", + "near-primitives 2.2.1-rc.1", "serde", "serde_json", ] @@ -4627,15 +4837,15 @@ dependencies = [ "futures", "hex", "near-async", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", "near-client-primitives", - "near-jsonrpc-client", - "near-jsonrpc-primitives", + "near-jsonrpc-client 2.2.1-rc.1", + "near-jsonrpc-primitives 2.2.1-rc.1", "near-network", - "near-o11y", - "near-primitives", - "near-rpc-error-macro", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "once_cell", "serde", "serde_json", @@ -4645,6 +4855,25 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "near-jsonrpc-client" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5225c0f97a61fd4534dee3169959dd91bb812be7d0573c1130a3cf86fd16b3e" +dependencies = [ + "borsh 1.5.1", + "lazy_static", + "log", + "near-chain-configs 0.21.2", + "near-crypto 0.21.2", + "near-jsonrpc-primitives 0.21.2", + "near-primitives 0.21.2", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "near-jsonrpc-client" version = "2.2.1-rc.1" @@ -4653,10 +4882,26 @@ dependencies = [ "actix-http", "awc", "futures", - "near-jsonrpc-primitives", - "near-primitives", + "near-jsonrpc-primitives 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "serde", + "serde_json", +] + +[[package]] +name = "near-jsonrpc-primitives" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ba17af2bc4208fdc4f6a8088842ad1f0165ac46d8259db6a2719f15d039e06" +dependencies = [ + "arbitrary", + "near-chain-configs 0.21.2", + "near-crypto 0.21.2", + "near-primitives 0.21.2", + "near-rpc-error-macro 0.21.2", "serde", "serde_json", + "thiserror", ] [[package]] @@ -4665,11 +4910,11 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "arbitrary", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client-primitives", - "near-crypto", - "near-primitives", - "near-rpc-error-macro", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "serde", "serde_json", "thiserror", @@ -4682,8 +4927,8 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-account-id", - "near-chain-configs", - "near-primitives", + "near-chain-configs 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "serde_json", ] @@ -4709,23 +4954,23 @@ dependencies = [ "itertools 0.10.5", "lru 0.12.4", "near-async", - "near-chain-configs", - "near-crypto", - "near-fmt", - "near-o11y", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "parking_lot 0.12.3", "pin-project", "protobuf 3.5.1", "protobuf-codegen", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "serde", "sha2", "smart-default", @@ -4735,8 +4980,36 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "near-o11y" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64d008979998e436ac5ad2e60326d1a7f2d30dcb5a22c1a4657159f7f284342" +dependencies = [ + "actix", + "base64 0.21.7", + "clap", + "near-crypto 0.21.2", + "near-fmt 0.21.2", + "near-primitives-core 0.21.2", + "once_cell", + "opentelemetry 0.17.0", + "opentelemetry-otlp 0.10.0", + "opentelemetry-semantic-conventions 0.9.0", + "prometheus", + "serde", + "serde_json", + "strum 0.24.1", + "thiserror", + "tokio", "tracing", + "tracing-appender", + "tracing-opentelemetry 0.17.4", + "tracing-subscriber", ] [[package]] @@ -4747,12 +5020,12 @@ dependencies = [ "actix", "base64 0.21.7", "clap", - "near-crypto", - "near-primitives-core", + "near-crypto 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "once_cell", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", + "opentelemetry 0.22.0", + "opentelemetry-otlp 0.15.0", + "opentelemetry-semantic-conventions 0.14.0", "opentelemetry_sdk", "prometheus", "serde", @@ -4761,10 +5034,29 @@ dependencies = [ "tokio", "tracing", "tracing-appender", - "tracing-opentelemetry", + "tracing-opentelemetry 0.23.0", "tracing-subscriber", ] +[[package]] +name = "near-parameters" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996c8654020f7eb3c11039cb39123fd4cd78654fde4c9e7c3fd6d092c84f342" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "enum-map", + "near-account-id", + "near-primitives-core 0.21.2", + "num-rational", + "serde", + "serde_repr", + "serde_yaml", + "strum 0.24.1", + "thiserror", +] + [[package]] name = "near-parameters" version = "2.2.1-rc.1" @@ -4773,7 +5065,7 @@ dependencies = [ "borsh 1.5.1", "enum-map", "near-account-id", - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", "num-rational", "serde", "serde_repr", @@ -4794,7 +5086,7 @@ dependencies = [ "libc", "once_cell", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -4813,11 +5105,53 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", - "near-o11y", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "once_cell", + "rand 0.8.5", +] + +[[package]] +name = "near-primitives" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c880397c022d3b8f592cef18f85fd6e79181a2a04c31154afb1730f9fa21098" +dependencies = [ + "arbitrary", + "base64 0.21.7", + "borsh 1.5.1", + "bytesize", + "cfg-if 1.0.0", + "chrono", + "derive_more", + "easy-ext", + "enum-map", + "hex", + "near-crypto 0.21.2", + "near-fmt 0.21.2", + "near-o11y 0.21.2", + "near-parameters 0.21.2", + "near-primitives-core 0.21.2", + "near-rpc-error-macro 0.21.2", + "near-stdx 0.21.2", + "near-vm-runner 0.21.2", + "num-rational", "once_cell", - "rand", + "primitive-types 0.10.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reed-solomon-erasure 4.0.2", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "sha3", + "smart-default", + "strum 0.24.1", + "thiserror", + "time", + "tracing", ] [[package]] @@ -4837,21 +5171,21 @@ dependencies = [ "enum-map", "hex", "itertools 0.10.5", - "near-crypto", - "near-fmt", - "near-parameters", - "near-primitives-core", - "near-rpc-error-macro", - "near-stdx", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "near-structs-checker-lib", "near-time", "num-rational", "once_cell", "ordered-float", "primitive-types 0.10.1", - "rand", - "rand_chacha", - "reed-solomon-erasure", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reed-solomon-erasure 6.0.0", "serde", "serde_json", "serde_with", @@ -4865,8 +5199,9 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "2.2.1-rc.1" -source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "082b1d3f6c7e273ec5cd9588e00bdbfc51be6cc9a3a7ec31fc899b4b7d2d3f9d" dependencies = [ "arbitrary", "base64 0.21.7", @@ -4875,16 +5210,37 @@ dependencies = [ "derive_more", "enum-map", "near-account-id", - "near-structs-checker-lib", "num-rational", "serde", "serde_repr", + "serde_with", "sha2", + "strum 0.24.1", "thiserror", ] [[package]] -name = "near-rosetta-rpc" +name = "near-primitives-core" +version = "2.2.1-rc.1" +source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" +dependencies = [ + "arbitrary", + "base64 0.21.7", + "borsh 1.5.1", + "bs58 0.4.0", + "derive_more", + "enum-map", + "near-account-id", + "near-structs-checker-lib", + "num-rational", + "serde", + "serde_repr", + "sha2", + "thiserror", +] + +[[package]] +name = "near-rosetta-rpc" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ @@ -4897,14 +5253,14 @@ dependencies = [ "futures", "hex", "near-account-id", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-network", - "near-o11y", - "near-parameters", - "near-primitives", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "node-runtime", "paperclip", "serde", @@ -4914,6 +5270,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "near-rpc-error-core" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3610517a56329b7cce0c8c4cf2686fc4bbe0b155181b118acf20d2a301bf29b6" +dependencies = [ + "quote", + "serde", + "syn 2.0.77", +] + [[package]] name = "near-rpc-error-core" version = "2.2.1-rc.1" @@ -4924,16 +5291,34 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "near-rpc-error-macro" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8db2fd2a6dbab8c56908e983f41570341e391daddb0d4c430746c6971107e3" +dependencies = [ + "fs2", + "near-rpc-error-core 0.21.2", + "serde", + "syn 2.0.77", +] + [[package]] name = "near-rpc-error-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-rpc-error-core", + "near-rpc-error-core 2.2.1-rc.1", "serde", "syn 2.0.77", ] +[[package]] +name = "near-stdx" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a697f311c110d0fabae6c8c49ab0a8eff0ec37df82cc860deba92156e77c43" + [[package]] name = "near-stdx" version = "2.2.1-rc.1" @@ -4957,20 +5342,20 @@ dependencies = [ "itertools 0.10.5", "itoa", "lru 0.12.4", - "near-chain-configs", - "near-crypto", - "near-fmt", - "near-o11y", - "near-parameters", - "near-primitives", - "near-stdx", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "near-time", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "num_cpus", "once_cell", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "rlimit", "rocksdb", "serde", @@ -5011,7 +5396,7 @@ dependencies = [ "awc", "futures", "near-async", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-time", @@ -5033,6 +5418,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "near-vm-compiler" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6c12977e11cbc33921c367a8ae949317d099025c96531702d3afed6e5f44ce" +dependencies = [ + "enumset", + "finite-wasm", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "rkyv", + "smallvec", + "target-lexicon 0.12.16", + "thiserror", + "tracing", + "wasmparser 0.99.0", +] + [[package]] name = "near-vm-compiler" version = "2.2.1-rc.1" @@ -5040,8 +5443,8 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "enumset", "finite-wasm", - "near-vm-types", - "near-vm-vm", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "rkyv", "target-lexicon 0.12.16", "thiserror", @@ -5049,6 +5452,28 @@ dependencies = [ "wasmparser 0.99.0", ] +[[package]] +name = "near-vm-compiler-singlepass" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f883363f5d05502035f0f6c0416078fdf535557dbffc1b4177aaab87bd448528" +dependencies = [ + "dynasm 2.0.0", + "dynasmrt 2.0.0", + "enumset", + "finite-wasm", + "lazy_static", + "memoffset 0.8.0", + "more-asserts", + "near-vm-compiler 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "rayon", + "smallvec", + "strum 0.24.1", + "tracing", +] + [[package]] name = "near-vm-compiler-singlepass" version = "2.2.1-rc.1" @@ -5061,15 +5486,39 @@ dependencies = [ "lazy_static", "memoffset 0.8.0", "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "rayon", "smallvec", "strum 0.24.1", "tracing", ] +[[package]] +name = "near-vm-engine" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c758c7ad8d551eafefd783aa286c2fa95f4ad6e89efedf1bd5f8629efd529ac" +dependencies = [ + "backtrace", + "cfg-if 1.0.0", + "enumset", + "finite-wasm", + "lazy_static", + "memmap2", + "more-asserts", + "near-vm-compiler 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "region", + "rkyv", + "rustc-demangle", + "target-lexicon 0.12.16", + "thiserror", + "tracing", +] + [[package]] name = "near-vm-engine" version = "2.2.1-rc.1" @@ -5081,9 +5530,9 @@ dependencies = [ "finite-wasm", "lazy_static", "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "region", "rkyv", "rustc-demangle", @@ -5093,6 +5542,59 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-vm-runner" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20569500ca56e161c6ed81da9a24c7bf7b974c4238b2f08b2582113b66fa0060" +dependencies = [ + "anyhow", + "base64 0.21.7", + "borsh 1.5.1", + "ed25519-dalek", + "enum-map", + "finite-wasm", + "loupe", + "memoffset 0.8.0", + "near-cache 0.21.2", + "near-crypto 0.21.2", + "near-parameters 0.21.2", + "near-primitives-core 0.21.2", + "near-stdx 0.21.2", + "near-vm-compiler 0.21.2", + "near-vm-compiler-singlepass 0.21.2", + "near-vm-engine 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "num-rational", + "once_cell", + "parity-wasm 0.41.0", + "parity-wasm 0.42.2", + "prefix-sum-vec", + "pwasm-utils", + "ripemd", + "serde", + "serde_repr", + "serde_with", + "sha2", + "sha3", + "strum 0.24.1", + "thiserror", + "tracing", + "wasm-encoder 0.27.0", + "wasmer-compiler-near", + "wasmer-compiler-singlepass-near", + "wasmer-engine-near", + "wasmer-engine-universal-near", + "wasmer-runtime-core-near", + "wasmer-runtime-near", + "wasmer-types-near", + "wasmer-vm-near", + "wasmparser 0.78.2", + "wasmtime", + "zeropool-bn", +] + [[package]] name = "near-vm-runner" version = "2.2.1-rc.1" @@ -5107,16 +5609,16 @@ dependencies = [ "finite-wasm", "lru 0.12.4", "memoffset 0.8.0", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives-core", - "near-stdx", - "near-vm-compiler", - "near-vm-compiler-singlepass", - "near-vm-engine", - "near-vm-types", - "near-vm-vm", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-compiler-singlepass 2.2.1-rc.1", + "near-vm-engine 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "num-rational", "once_cell", "parity-wasm 0.41.0", @@ -5148,6 +5650,18 @@ dependencies = [ "zeropool-bn", ] +[[package]] +name = "near-vm-types" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e894a085d2a9ed4e8f10ae8766c95fa77b5aa47d3c0e85b89af22d5b253491" +dependencies = [ + "indexmap 1.9.3", + "num-traits", + "rkyv", + "thiserror", +] + [[package]] name = "near-vm-types" version = "2.2.1-rc.1" @@ -5159,6 +5673,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "near-vm-vm" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c98a68706832b567cafa03375d40512bba8d95ae6d3b760f340b22a4b97893" +dependencies = [ + "backtrace", + "cc", + "cfg-if 1.0.0", + "finite-wasm", + "indexmap 1.9.3", + "libc", + "memoffset 0.8.0", + "more-asserts", + "near-vm-types 0.21.2", + "region", + "rkyv", + "thiserror", + "tracing", + "wasmparser 0.99.0", + "winapi", +] + [[package]] name = "near-vm-vm" version = "2.2.1-rc.1" @@ -5172,7 +5709,7 @@ dependencies = [ "libc", "memoffset 0.8.0", "more-asserts", - "near-vm-types", + "near-vm-types 2.2.1-rc.1", "region", "rkyv", "thiserror", @@ -5186,8 +5723,8 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-primitives-core", - "near-vm-runner", + "near-primitives-core 2.2.1-rc.1", + "near-vm-runner 2.2.1-rc.1", "once_cell", ] @@ -5214,31 +5751,31 @@ dependencies = [ "indicatif", "near-async", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chunks", "near-client", "near-client-primitives", - "near-config-utils", - "near-crypto", + "near-config-utils 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-jsonrpc", - "near-jsonrpc-primitives", + "near-jsonrpc-primitives 2.2.1-rc.1", "near-mainnet-res", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-rosetta-rpc", "near-store", "near-telemetry", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "node-runtime", "num-rational", "once_cell", - "rand", + "rand 0.8.5", "rayon", "regex", "reqwest", @@ -5293,18 +5830,18 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives", - "near-primitives-core", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "near-store", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "near-wallet-contract", "num-bigint 0.3.3", "num-traits", "once_cell", - "rand", + "rand 0.8.5", "rayon", "serde_json", "sha2", @@ -5484,6 +6021,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "open-fastrlp" version = "0.1.4" @@ -5563,6 +6106,27 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", + "tokio", + "tokio-stream", +] + [[package]] name = "opentelemetry" version = "0.22.0" @@ -5578,6 +6142,24 @@ dependencies = [ "urlencoding", ] +[[package]] +name = "opentelemetry-otlp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" +dependencies = [ + "async-trait", + "futures", + "futures-util", + "http 0.2.12", + "opentelemetry 0.17.0", + "prost 0.9.0", + "thiserror", + "tokio", + "tonic 0.6.2", + "tonic-build", +] + [[package]] name = "opentelemetry-otlp" version = "0.15.0" @@ -5587,14 +6169,14 @@ dependencies = [ "async-trait", "futures-core", "http 0.2.12", - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry-proto", - "opentelemetry-semantic-conventions", + "opentelemetry-semantic-conventions 0.14.0", "opentelemetry_sdk", - "prost", + "prost 0.12.6", "thiserror", "tokio", - "tonic", + "tonic 0.11.0", ] [[package]] @@ -5603,10 +6185,19 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" dependencies = [ - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry_sdk", - "prost", - "tonic", + "prost 0.12.6", + "tonic 0.11.0", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" +dependencies = [ + "opentelemetry 0.17.0", ] [[package]] @@ -5628,10 +6219,10 @@ dependencies = [ "futures-util", "glob", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "ordered-float", "percent-encoding", - "rand", + "rand 0.8.5", "thiserror", "tokio", "tokio-stream", @@ -5651,7 +6242,7 @@ checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "borsh 1.5.1", "num-traits", - "rand", + "rand 0.8.5", "serde", ] @@ -5685,7 +6276,7 @@ dependencies = [ "hmac", "pkcs12", "pkcs5", - "rand", + "rand 0.8.5", "rc2", "sha1", "sha2", @@ -5899,7 +6490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -6015,7 +6606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", - "rand", + "rand 0.8.5", ] [[package]] @@ -6317,13 +6908,23 @@ dependencies = [ "bitflags 2.6.0", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.4", "unarray", ] +[[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.6" @@ -6331,7 +6932,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[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 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.9.0", + "prost-types", + "regex", + "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 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -6347,6 +6981,16 @@ dependencies = [ "syn 2.0.77", ] +[[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 = "protobuf" version = "2.28.0" @@ -6459,6 +7103,19 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + [[package]] name = "rand" version = "0.8.5" @@ -6466,11 +7123,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -6478,7 +7145,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -6487,17 +7163,26 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "rand_hc" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b363d4f6370f88d62bf586c80405657bde0f0e1b8945d47d2ad59b906cb4f54" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6506,7 +7191,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6515,7 +7200,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6544,7 +7229,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -6588,11 +7273,20 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror", ] +[[package]] +name = "reed-solomon-erasure" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] + [[package]] name = "reed-solomon-erasure" version = "6.0.0" @@ -6687,6 +7381,8 @@ version = "0.1.0" dependencies = [ "anyhow", "ethers", + "near-da-primitives", + "near-da-rpc", "prometheus", "serde", "serde_json", @@ -6740,7 +7436,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "tokio-util", + "tokio-util 0.7.12", "tower-service", "url", "wasm-bindgen", @@ -6784,7 +7480,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7117,7 +7813,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -7233,7 +7929,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "rand", + "rand 0.8.5", "secp256k1-sys", ] @@ -7515,7 +8211,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -7756,7 +8452,7 @@ dependencies = [ "crc", "lazy_static", "md-5", - "rand", + "rand 0.8.5", "ring 0.16.20", "subtle", "thiserror", @@ -8169,6 +8865,20 @@ dependencies = [ "tungstenite 0.21.0", ] +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -8225,6 +8935,37 @@ dependencies = [ "winnow", ] +[[package]] +name = "tonic" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.9.0", + "prost-derive 0.9.0", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + [[package]] name = "tonic" version = "0.11.0" @@ -8243,7 +8984,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.12.6", "tokio", "tokio-stream", "tower", @@ -8252,6 +8993,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +dependencies = [ + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] + [[package]] name = "tower" version = "0.4.13" @@ -8263,10 +9016,10 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", + "rand 0.8.5", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tower-layer", "tower-service", "tracing", @@ -8339,6 +9092,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -8350,6 +9114,20 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry 0.17.0", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-subscriber", +] + [[package]] name = "tracing-opentelemetry" version = "0.23.0" @@ -8358,12 +9136,12 @@ checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" dependencies = [ "js-sys", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry_sdk", "smallvec", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", "tracing-subscriber", "web-time", ] @@ -8383,7 +9161,7 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", ] [[package]] @@ -8404,7 +9182,7 @@ dependencies = [ "http 0.2.12", "httparse", "log", - "rand", + "rand 0.8.5", "rustls 0.21.12", "sha1", "thiserror", @@ -8424,7 +9202,7 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "rand", + "rand 0.8.5", "sha1", "thiserror", "url", @@ -8485,6 +9263,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "unicode-width" version = "0.1.13" @@ -8550,7 +9334,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] @@ -8633,11 +9417,17 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-tungstenite 0.21.0", - "tokio-util", + "tokio-util 0.7.12", "tower-service", "tracing", ] +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9125,7 +9915,7 @@ dependencies = [ "memfd", "memoffset 0.9.1", "paste", - "rand", + "rand 0.8.5", "rustix 0.38.37", "sptr", "wasm-encoder 0.35.0", @@ -9208,7 +9998,7 @@ dependencies = [ "libc", "log", "nix 0.24.3", - "rand", + "rand 0.8.5", "thiserror", "tokio", "winapi", @@ -9567,7 +10357,7 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand", + "rand 0.8.5", "rustc-hex", ] diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index b89d0df5..225562a4 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" edition = "2021" [dependencies] +near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +rlp = "0.10" tokio = { version = "1.28", features = ["full"] } ethers = { version = "2.0", features = ["ws"] } prometheus = "0.13" diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 929f7456..003da2f2 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -3,32 +3,35 @@ use crate::metrics::RelayerMetrics; use anyhow::Result; use ethers::prelude::*; use prometheus::Registry; -use std::sync::Arc; +use std::{path::PathBuf, sync::Arc}; use std::time::Duration; use tokio::time; use tracing::{error, info}; +use near_da_rpc::*; +use rlp; -const NAMESPACE_ID: u64 = 1; +const NAMESPACE_ID: u8 = 1; const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); const SUBMIT_BLOCK_RETRY_TIMEOUT: Duration = Duration::from_secs(2); const SUBMIT_BLOCK_RETRIES: usize = 3; pub struct Relayer { rpc_client: Provider, - near_da_client: Arc, + near_da_client: near_da_rpc::near::Client, metrics: Arc, } impl Relayer { pub fn new(config: RelayerConfig) -> Result { let rpc_client = Provider::::connect(&config.rpc_url)?; - let near_client = Arc::new(NearDAClient::new( - &config.key_path, - &config.da_account_id, - &config.network, - NAMESPACE_ID, - )?); - + let config = near_da_rpc::near::config::Config { + key: near_da_rpc::near::config::KeyType::File(PathBuf::from(config.key_path)), + contract: config.da_account_id, + network: near_da_rpc::near::config::Network::Custom(config.network), + namespace: Some(near_da_primitives::Namespace::new(NAMESPACE_ID, 1)), + mode: near_da_primitives::Mode::Standard, + }; + let near_da_client = near_da_rpc::near::Client::new(&config); let registry = Registry::new(); let metrics = RelayerMetrics::new(®istry)?; @@ -75,9 +78,8 @@ impl Relayer { async fn submit_encoded_blocks(&self, encoded_blocks: &[u8]) -> Result<()> { let start_time = std::time::Instant::now(); - for i in 0..SUBMIT_BLOCK_RETRIES { - match self.near_da_client.force_submit(encoded_blocks).await { + match self.near_da_client.submit(Blob::from(encoded_blocks.to_vec())).await { Ok(out) => { self.metrics.submission_duration_ms.observe(start_time.elapsed().as_millis() as f64); self.metrics.retries_histogram.observe(i as f64); @@ -99,6 +101,6 @@ impl Relayer { } self.metrics.num_da_submissions_failed.inc(); - anyhow::bail!("Failed to submit blocks to NEAR after retries") + Err(anyhow::anyhow!("Failed to submit blocks to NEAR after retries")) } } \ No newline at end of file From cd0ad87e73ec801d7a75a81d9dda73212ae57bf5 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Fri, 20 Sep 2024 17:24:45 +0200 Subject: [PATCH 04/96] metrics --- relayer-rs/src/metrics.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/relayer-rs/src/metrics.rs b/relayer-rs/src/metrics.rs index b1772586..bb409039 100644 --- a/relayer-rs/src/metrics.rs +++ b/relayer-rs/src/metrics.rs @@ -18,6 +18,12 @@ impl RelayerMetrics { "The number of blocks received from rollup", )?; registry.register(Box::new(num_blocks_received.clone()))?; + registry.register(Box::new(num_da_submissions_failed.clone()))?; + registry.register(Box::new(submission_duration_ms.clone()))?; + registry.register(Box::new(retries_histogram.clone()))?; + registry.register(Box::new(num_of_invalid_nonces.clone()))?; + registry.register(Box::new(num_of_expired_txs.clone()))?; + registry.register(Box::new(num_of_timeout_txs.clone()))?; // ... Initialize other metrics similarly ... From 0eedfade00f926afd0b40a44598b678279e09f96 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Fri, 20 Sep 2024 22:01:05 +0200 Subject: [PATCH 05/96] fix metrics and await --- Cargo.lock | 17 ++++++++++++++--- relayer-rs/Cargo.toml | 4 ++-- relayer-rs/src/main.rs | 2 +- relayer-rs/src/metrics.rs | 12 +++--------- relayer-rs/src/relayer.rs | 4 ++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e326e30a..3f33f77a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2431,7 +2431,7 @@ dependencies = [ "k256", "log", "rand 0.8.5", - "rlp", + "rlp 0.5.2", "serde", "sha3", "zeroize", @@ -2691,7 +2691,7 @@ dependencies = [ "once_cell", "open-fastrlp", "rand 0.8.5", - "rlp", + "rlp 0.5.2", "serde", "serde_json", "strum 0.26.3", @@ -3611,7 +3611,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" dependencies = [ - "rlp", + "rlp 0.5.2", ] [[package]] @@ -7384,6 +7384,7 @@ dependencies = [ "near-da-primitives", "near-da-rpc", "prometheus", + "rlp 0.6.1", "serde", "serde_json", "tokio", @@ -7545,6 +7546,16 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "rlp" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa24e92bb2a83198bb76d661a71df9f7076b8c420b8696e4d3d97d50d94479e3" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rlp-derive" version = "0.1.0" diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index 225562a4..3cdd1f82 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies] near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } -rlp = "0.10" -tokio = { version = "1.28", features = ["full"] } +rlp = "0.6.1" +tokio = { version = "1.30", features = ["full"] } ethers = { version = "2.0", features = ["ws"] } prometheus = "0.13" warp = "0.3" diff --git a/relayer-rs/src/main.rs b/relayer-rs/src/main.rs index 8bdec468..a03800d5 100644 --- a/relayer-rs/src/main.rs +++ b/relayer-rs/src/main.rs @@ -12,7 +12,7 @@ async fn main() -> Result<()> { tracing::subscriber::set_global_default(subscriber)?; let config = config::load_config()?; - let mut relayer = Relayer::new(config)?; + let mut relayer = Relayer::new(config).await?; relayer.start().await?; Ok(()) diff --git a/relayer-rs/src/metrics.rs b/relayer-rs/src/metrics.rs index bb409039..a7975821 100644 --- a/relayer-rs/src/metrics.rs +++ b/relayer-rs/src/metrics.rs @@ -1,4 +1,4 @@ -use prometheus::{Counter, Histogram, IntCounter, Registry}; +use prometheus::{Histogram, HistogramOpts, IntCounter, Registry}; use std::sync::Arc; pub struct RelayerMetrics { @@ -18,20 +18,14 @@ impl RelayerMetrics { "The number of blocks received from rollup", )?; registry.register(Box::new(num_blocks_received.clone()))?; - registry.register(Box::new(num_da_submissions_failed.clone()))?; - registry.register(Box::new(submission_duration_ms.clone()))?; - registry.register(Box::new(retries_histogram.clone()))?; - registry.register(Box::new(num_of_invalid_nonces.clone()))?; - registry.register(Box::new(num_of_expired_txs.clone()))?; - registry.register(Box::new(num_of_timeout_txs.clone()))?; // ... Initialize other metrics similarly ... Ok(Arc::new(Self { num_blocks_received, num_da_submissions_failed: IntCounter::new("sffl_relayer_num_da_submissions_failed", "The number of failed da submissions")?, - submission_duration_ms: Histogram::new("sffl_relayer_submission_duration_ms", "Duration of successful DA submissions")?, - retries_histogram: Histogram::new("sffl_relayer_retries_histogram", "Histogram of retry counts")?, + submission_duration_ms: Histogram::with_opts(HistogramOpts::new("sffl_relayer_submission_duration_ms", "Duration of successful DA submissions"))?, + retries_histogram: Histogram::with_opts(HistogramOpts::new("sffl_relayer_retries_histogram", "Histogram of retry counts"))?, num_of_invalid_nonces: IntCounter::new("sffl_relayer_num_of_invalid_nonces", "Number of InvalidNonce error")?, num_of_expired_txs: IntCounter::new("sffl_relayer_num_of_expired_txs", "Number of Expired transactions")?, num_of_timeout_txs: IntCounter::new("sffl_relayer_num_of_timeout_txs", "Number of Timeout transactions")?, diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 003da2f2..7c3380cb 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -22,8 +22,8 @@ pub struct Relayer { } impl Relayer { - pub fn new(config: RelayerConfig) -> Result { - let rpc_client = Provider::::connect(&config.rpc_url)?; + pub async fn new(config: RelayerConfig) -> Result { + let rpc_client = Provider::::connect(&config.rpc_url).await?; let config = near_da_rpc::near::config::Config { key: near_da_rpc::near::config::KeyType::File(PathBuf::from(config.key_path)), contract: config.da_account_id, From 7e332f69fef14c2d86c6ad57c28dc61bf5b159bf Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 00:04:06 +0200 Subject: [PATCH 06/96] wip: alloy-rs --- relayer-rs/Cargo.toml | 13 +++++++++++-- relayer-rs/src/relayer.rs | 36 +++++++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index 3cdd1f82..c74ea629 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -4,11 +4,20 @@ version = "0.1.0" edition = "2021" [dependencies] +alloy = { version = "0.3.6", features = [ "full", + "node-bindings", + "rpc-types-debug", + "rpc-types-trace", + "json-rpc", + "rpc-client"]} +alloy-primitives = "0.8.3" +alloy-rpc-client = "0.3.6" +alloy-rpc-types = "0.3.6" +alloy-transport-ws = "0.3.6" +alloy-rlp = "0.3.8" near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } -rlp = "0.6.1" tokio = { version = "1.30", features = ["full"] } -ethers = { version = "2.0", features = ["ws"] } prometheus = "0.13" warp = "0.3" serde = { version = "1.0", features = ["derive"] } diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 7c3380cb..4410ac32 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -1,14 +1,17 @@ use crate::config::RelayerConfig; use crate::metrics::RelayerMetrics; +use alloy::pubsub::PubSubFrontend; use anyhow::Result; -use ethers::prelude::*; +use alloy_rpc_client::{RpcClient, ClientBuilder}; +use alloy_rpc_types::{Block, BlockId, BlockNumberOrTag}; +use alloy_transport_ws::{WsConnect}; use prometheus::Registry; use std::{path::PathBuf, sync::Arc}; use std::time::Duration; use tokio::time; use tracing::{error, info}; use near_da_rpc::*; -use rlp; +use alloy::providers::{Provider, ProviderBuilder, RootProvider}; const NAMESPACE_ID: u8 = 1; const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); @@ -16,14 +19,16 @@ const SUBMIT_BLOCK_RETRY_TIMEOUT: Duration = Duration::from_secs(2); const SUBMIT_BLOCK_RETRIES: usize = 3; pub struct Relayer { - rpc_client: Provider, + provider: Arc>, near_da_client: near_da_rpc::near::Client, metrics: Arc, } impl Relayer { pub async fn new(config: RelayerConfig) -> Result { - let rpc_client = Provider::::connect(&config.rpc_url).await?; + let ws = WsConnect::new(&config.rpc_url); + let provider = ProviderBuilder::new().on_ws(ws).await?; + let config = near_da_rpc::near::config::Config { key: near_da_rpc::near::config::KeyType::File(PathBuf::from(config.key_path)), contract: config.da_account_id, @@ -36,24 +41,33 @@ impl Relayer { let metrics = RelayerMetrics::new(®istry)?; Ok(Self { - rpc_client, + provider: Arc::new(provider), near_da_client, metrics, }) } pub async fn start(&mut self) -> Result<()> { - let mut block_stream = self.rpc_client.subscribe_blocks().await?; let mut interval = time::interval(SUBMIT_BLOCK_INTERVAL); let mut blocks = Vec::new(); + // Subscribe to blocks. + let subscription = self.provider.subscribe_blocks().await?; + let mut stream = subscription.into_stream().take(2); loop { tokio::select! { Some(block) = block_stream.next() => { - info!("Received rollup block header: {:?}", block.number); - self.metrics.num_blocks_received.inc(); - blocks.push(block); + match block { + Ok(block) => { + info!("Received rollup block header: {:?}", block.number); + self.metrics.num_blocks_received.inc(); + blocks.push(block); + }, + Err(e) => {g + error!("Error receiving block: {:?}", e); + } + } } _ = interval.tick() => { if !blocks.is_empty() { @@ -67,10 +81,10 @@ impl Relayer { } } - async fn handle_blocks(&self, blocks: &[Block]) -> Result<()> { + async fn handle_blocks(&self, blocks: &[Block]) -> Result<()> { info!("Submitting blocks to NEAR: {:?}", blocks.iter().map(|b| b.number).collect::>()); - let encoded_blocks = rlp::encode_list(blocks); + let encoded_blocks = alloy_rlp::encode_list(blocks); self.submit_encoded_blocks(&encoded_blocks).await?; Ok(()) From 6307c17e9304af443e3d32395c7911ee3dd60875 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 00:04:32 +0200 Subject: [PATCH 07/96] wip: alloy-rs --- relayer-rs/src/relayer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 4410ac32..e65a8281 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -64,7 +64,7 @@ impl Relayer { self.metrics.num_blocks_received.inc(); blocks.push(block); }, - Err(e) => {g + Err(e) => { error!("Error receiving block: {:?}", e); } } From 9826a50cd745c59f44c8d7a082e1ffa2a1cca1a3 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 14:06:58 +0200 Subject: [PATCH 08/96] alloy-rs --- relayer-rs/Cargo.toml | 5 ++++- relayer-rs/src/relayer.rs | 29 ++++++++++++----------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index c74ea629..15722420 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -24,4 +24,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" anyhow = "1.0" tracing = "0.1" -tracing-subscriber = "0.3" \ No newline at end of file +tracing-subscriber = "0.3" +futures-util = "0.3.30" +eyre = "0.6" +bincode = "1.3" \ No newline at end of file diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index e65a8281..375c00c1 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -1,6 +1,7 @@ use crate::config::RelayerConfig; use crate::metrics::RelayerMetrics; use alloy::pubsub::PubSubFrontend; +use alloy_rlp::Encodable; use anyhow::Result; use alloy_rpc_client::{RpcClient, ClientBuilder}; use alloy_rpc_types::{Block, BlockId, BlockNumberOrTag}; @@ -12,6 +13,7 @@ use tokio::time; use tracing::{error, info}; use near_da_rpc::*; use alloy::providers::{Provider, ProviderBuilder, RootProvider}; +use futures_util::{stream, StreamExt}; const NAMESPACE_ID: u8 = 1; const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); @@ -53,21 +55,14 @@ impl Relayer { let mut blocks = Vec::new(); // Subscribe to blocks. let subscription = self.provider.subscribe_blocks().await?; - let mut stream = subscription.into_stream().take(2); + let mut stream = subscription.into_stream(); loop { tokio::select! { - Some(block) = block_stream.next() => { - match block { - Ok(block) => { - info!("Received rollup block header: {:?}", block.number); - self.metrics.num_blocks_received.inc(); - blocks.push(block); - }, - Err(e) => { - error!("Error receiving block: {:?}", e); - } - } + Some(block) = stream.next() => { + info!("Received rollup block header: {:?}", block.header.number); + self.metrics.num_blocks_received.inc(); + blocks.push(block); } _ = interval.tick() => { if !blocks.is_empty() { @@ -82,15 +77,15 @@ impl Relayer { } async fn handle_blocks(&self, blocks: &[Block]) -> Result<()> { - info!("Submitting blocks to NEAR: {:?}", blocks.iter().map(|b| b.number).collect::>()); - - let encoded_blocks = alloy_rlp::encode_list(blocks); - self.submit_encoded_blocks(&encoded_blocks).await?; + info!("Submitting blocks to NEAR: {:?}", blocks.iter().map(|b| b.header.number).collect::>()); + let serialized_blocks = serde_json::to_vec(blocks)?; + let encoded_blocks = alloy_rlp::encode(&serialized_blocks); + self.submit_encoded_blocks(encoded_blocks).await?; Ok(()) } - async fn submit_encoded_blocks(&self, encoded_blocks: &[u8]) -> Result<()> { + async fn submit_encoded_blocks(&self, encoded_blocks: Vec) -> Result<()> { let start_time = std::time::Instant::now(); for i in 0..SUBMIT_BLOCK_RETRIES { match self.near_da_client.submit(Blob::from(encoded_blocks.to_vec())).await { From bbc019dd28bf345fd69fd3a503f4b0585252bfae Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 14:11:35 +0200 Subject: [PATCH 09/96] clippy --- relayer-rs/src/relayer.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index 375c00c1..f89951fa 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -1,10 +1,8 @@ use crate::config::RelayerConfig; use crate::metrics::RelayerMetrics; use alloy::pubsub::PubSubFrontend; -use alloy_rlp::Encodable; use anyhow::Result; -use alloy_rpc_client::{RpcClient, ClientBuilder}; -use alloy_rpc_types::{Block, BlockId, BlockNumberOrTag}; +use alloy_rpc_types::{Block}; use alloy_transport_ws::{WsConnect}; use prometheus::Registry; use std::{path::PathBuf, sync::Arc}; @@ -13,7 +11,7 @@ use tokio::time; use tracing::{error, info}; use near_da_rpc::*; use alloy::providers::{Provider, ProviderBuilder, RootProvider}; -use futures_util::{stream, StreamExt}; +use futures_util::{StreamExt}; const NAMESPACE_ID: u8 = 1; const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); From e3bb9a8015363ba730621e814fb6234b66658dba Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 14:22:14 +0200 Subject: [PATCH 10/96] config and main --- relayer-rs/Cargo.toml | 4 +- relayer-rs/src/config.rs | 44 +++++++++++++++++++--- relayer-rs/src/main.rs | 77 +++++++++++++++++++++++++++++++++++---- relayer-rs/src/relayer.rs | 6 +-- 4 files changed, 114 insertions(+), 17 deletions(-) diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index 15722420..c8aef73d 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -27,4 +27,6 @@ tracing = "0.1" tracing-subscriber = "0.3" futures-util = "0.3.30" eyre = "0.6" -bincode = "1.3" \ No newline at end of file +bincode = "1.3" +serde_yaml = "0.9.1" +clap = "4.6.1" \ No newline at end of file diff --git a/relayer-rs/src/config.rs b/relayer-rs/src/config.rs index 0d91cf42..6fe7d972 100644 --- a/relayer-rs/src/config.rs +++ b/relayer-rs/src/config.rs @@ -1,16 +1,48 @@ -use serde::Deserialize; -use std::fs; +use std::path::PathBuf; +use serde::Deserialize; #[derive(Debug, Deserialize)] pub struct RelayerConfig { + pub production: bool, pub rpc_url: String, - pub key_path: String, pub da_account_id: String, + pub key_path: String, pub network: String, + pub metrics_ip_port_addr: Option, +} + +impl RelayerConfig { + pub fn compile_cmd(&self) -> Vec { + let mut cmd = vec!["run-args".to_string()]; + + if self.production { + cmd.push("--production".to_string()); + } + + cmd.extend_from_slice(&[ + "--key-path".to_string(), + self.key_path.clone(), + "--rpc-url".to_string(), + self.rpc_url.clone(), + "--da-account-id".to_string(), + self.da_account_id.clone(), + "--network".to_string(), + self.network.clone(), + ]); + + if let Some(metrics_addr) = &self.metrics_ip_port_addr { + cmd.extend_from_slice(&[ + "--metrics-ip-port-address".to_string(), + metrics_addr.clone(), + ]); + } + + cmd + } } -pub fn load_config() -> anyhow::Result { - let config_str = fs::read_to_string("config.json")?; - let config: RelayerConfig = serde_json::from_str(&config_str)?; +pub fn load_config(path: PathBuf) -> eyre::Result { + let config_str = std::fs::read_to_string(path)?; + let config: RelayerConfig = serde_yaml::from_str(&config_str)?; Ok(config) } \ No newline at end of file diff --git a/relayer-rs/src/main.rs b/relayer-rs/src/main.rs index a03800d5..d376e0bf 100644 --- a/relayer-rs/src/main.rs +++ b/relayer-rs/src/main.rs @@ -1,18 +1,81 @@ +use crate::config::RelayerConfig; +use crate::relayer::Relayer; +use anyhow::Result; +use clap::{App, Arg, SubCommand}; +use prometheus::Registry; +use std::path::PathBuf; +use tracing_subscriber::FmtSubscriber; + mod config; mod metrics; mod relayer; -use anyhow::Result; -use relayer::Relayer; -use tracing_subscriber::FmtSubscriber; - #[tokio::main] async fn main() -> Result<()> { - let subscriber = FmtSubscriber::new(); + let matches = App::new("sffl-test-relayer") + .about("SFFL Test Relayer") + .subcommand( + SubCommand::with_name("run-args") + .about("Start the relayer with direct CLI options") + .arg(Arg::with_name("production").long("production").help("Run in production logging mode")) + .arg(Arg::with_name("rpc-url").long("rpc-url").required(true).takes_value(true).help("Connect to the indicated RPC")) + .arg(Arg::with_name("da-account-id").long("da-account-id").required(true).takes_value(true).help("Publish block data to the indicated NEAR account")) + .arg(Arg::with_name("key-path").long("key-path").required(true).takes_value(true).help("Path to NEAR account's key file")) + .arg(Arg::with_name("network").long("network").takes_value(true).default_value("http://127.0.0.1:3030").help("Network for NEAR client to use")) + .arg(Arg::with_name("metrics-ip-port-address").long("metrics-ip-port-address").takes_value(true).help("Metrics scrape address")), + ) + .subcommand( + SubCommand::with_name("run-config") + .about("Start the relayer using a configuration file") + .arg(Arg::with_name("path").short("p").long("path").required(true).takes_value(true).help("Load configuration from FILE")), + ) + .get_matches(); + + match matches.subcommand() { + ("run-args", Some(args)) => { + let config = RelayerConfig { + production: args.is_present("production"), + rpc_url: args.value_of("rpc-url").unwrap().to_string(), + da_account_id: args.value_of("da-account-id").unwrap().to_string(), + key_path: args.value_of("key-path").unwrap().to_string(), + network: args.value_of("network").unwrap().to_string(), + metrics_ip_port_addr: args.value_of("metrics-ip-port-address").map(String::from), + }; + relayer_main(config).await + } + ("run-config", Some(args)) => { + let config_path = args.value_of("path").unwrap(); + let config = config::load_config(PathBuf::from(config_path))?; + relayer_main(config).await + } + _ => Err(anyhow::anyhow!("Invalid subcommand")), + } +} + +async fn relayer_main(config: RelayerConfig) -> Result<()> { + let log_level = if config.production { + tracing::Level::INFO + } else { + tracing::Level::DEBUG + }; + + let subscriber = FmtSubscriber::builder() + .with_max_level(log_level) + .finish(); tracing::subscriber::set_global_default(subscriber)?; - let config = config::load_config()?; - let mut relayer = Relayer::new(config).await?; + tracing::info!("Initializing Relayer"); + tracing::info!("Read config: {:?}", config); + + let mut relayer = Relayer::new(config.clone()).await?; + + if let Some(metrics_addr) = config.metrics_ip_port_addr { + let registry = Registry::new(); + relayer.enable_metrics(®istry)?; + metrics::start_metrics_server(metrics_addr, registry); + } + + tracing::info!("Starting relayer"); relayer.start().await?; Ok(()) diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index f89951fa..d3c04fe9 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -2,8 +2,8 @@ use crate::config::RelayerConfig; use crate::metrics::RelayerMetrics; use alloy::pubsub::PubSubFrontend; use anyhow::Result; -use alloy_rpc_types::{Block}; -use alloy_transport_ws::{WsConnect}; +use alloy_rpc_types::Block; +use alloy_transport_ws::WsConnect; use prometheus::Registry; use std::{path::PathBuf, sync::Arc}; use std::time::Duration; @@ -11,7 +11,7 @@ use tokio::time; use tracing::{error, info}; use near_da_rpc::*; use alloy::providers::{Provider, ProviderBuilder, RootProvider}; -use futures_util::{StreamExt}; +use futures_util::StreamExt; const NAMESPACE_ID: u8 = 1; const SUBMIT_BLOCK_INTERVAL: Duration = Duration::from_millis(2500); From d4a22294b8e70a0d948ec7bc0f04b11d7032f8b6 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 21 Sep 2024 14:48:29 +0200 Subject: [PATCH 11/96] feature parity --- relayer-rs/Cargo.toml | 3 +- relayer-rs/src/config.rs | 62 ++++++++++++++++++- relayer-rs/src/main.rs | 48 +++++++-------- relayer-rs/src/metrics.rs | 122 ++++++++++++++++++++++++++++++++++---- relayer-rs/src/relayer.rs | 8 +-- 5 files changed, 203 insertions(+), 40 deletions(-) diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index c8aef73d..c6fd73bc 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -29,4 +29,5 @@ futures-util = "0.3.30" eyre = "0.6" bincode = "1.3" serde_yaml = "0.9.1" -clap = "4.6.1" \ No newline at end of file +clap = "4.5.18" +tempfile = "3.10.0" diff --git a/relayer-rs/src/config.rs b/relayer-rs/src/config.rs index 6fe7d972..0bfa1e5e 100644 --- a/relayer-rs/src/config.rs +++ b/relayer-rs/src/config.rs @@ -41,8 +41,68 @@ impl RelayerConfig { } } -pub fn load_config(path: PathBuf) -> eyre::Result { +pub fn load_config(path: PathBuf) -> Result { let config_str = std::fs::read_to_string(path)?; let config: RelayerConfig = serde_yaml::from_str(&config_str)?; Ok(config) +} + +#[cfg(test)] +mod tests { + use super::*; + use tempfile::NamedTempFile; + use std::io::Write; + + #[test] + fn test_relayer_config_compile_cmd() { + let config = RelayerConfig { + production: true, + rpc_url: "http://example.com".to_string(), + da_account_id: "test.near".to_string(), + key_path: "/path/to/key".to_string(), + network: "testnet".to_string(), + metrics_ip_port_addr: Some("127.0.0.1:8080".to_string()), + }; + + let cmd = config.compile_cmd(); + + assert_eq!(cmd[0], "run-args"); + assert!(cmd.contains(&"--production".to_string())); + assert!(cmd.contains(&"--rpc-url".to_string())); + assert!(cmd.contains(&"http://example.com".to_string())); + assert!(cmd.contains(&"--da-account-id".to_string())); + assert!(cmd.contains(&"test.near".to_string())); + assert!(cmd.contains(&"--key-path".to_string())); + assert!(cmd.contains(&"/path/to/key".to_string())); + assert!(cmd.contains(&"--network".to_string())); + assert!(cmd.contains(&"testnet".to_string())); + assert!(cmd.contains(&"--metrics-ip-port-address".to_string())); + assert!(cmd.contains(&"127.0.0.1:8080".to_string())); + } + + #[test] + fn test_load_config() -> eyre::Result<()> { + let config_content = r#" + production: true + rpc_url: "http://example.com" + da_account_id: "test.near" + key_path: "/path/to/key" + network: "testnet" + metrics_ip_port_addr: "127.0.0.1:8080" + "#; + + let temp_file = NamedTempFile::new()?; + write!(temp_file.as_file(), "{}", config_content)?; + + let config = load_config(temp_file.path().to_path_buf())?; + + assert!(config.production); + assert_eq!(config.rpc_url, "http://example.com"); + assert_eq!(config.da_account_id, "test.near"); + assert_eq!(config.key_path, "/path/to/key"); + assert_eq!(config.network, "testnet"); + assert_eq!(config.metrics_ip_port_addr, Some("127.0.0.1:8080".to_string())); + + Ok(()) + } } \ No newline at end of file diff --git a/relayer-rs/src/main.rs b/relayer-rs/src/main.rs index d376e0bf..2999c14b 100644 --- a/relayer-rs/src/main.rs +++ b/relayer-rs/src/main.rs @@ -1,10 +1,11 @@ use crate::config::RelayerConfig; use crate::relayer::Relayer; use anyhow::Result; -use clap::{App, Arg, SubCommand}; +use clap::{Command, Arg}; use prometheus::Registry; use std::path::PathBuf; use tracing_subscriber::FmtSubscriber; +use crate::metrics::RelayerMetrics; mod config; mod metrics; @@ -12,40 +13,40 @@ mod relayer; #[tokio::main] async fn main() -> Result<()> { - let matches = App::new("sffl-test-relayer") + let matches = Command::new("sffl-test-relayer") .about("SFFL Test Relayer") .subcommand( - SubCommand::with_name("run-args") + Command::new("run-args") .about("Start the relayer with direct CLI options") - .arg(Arg::with_name("production").long("production").help("Run in production logging mode")) - .arg(Arg::with_name("rpc-url").long("rpc-url").required(true).takes_value(true).help("Connect to the indicated RPC")) - .arg(Arg::with_name("da-account-id").long("da-account-id").required(true).takes_value(true).help("Publish block data to the indicated NEAR account")) - .arg(Arg::with_name("key-path").long("key-path").required(true).takes_value(true).help("Path to NEAR account's key file")) - .arg(Arg::with_name("network").long("network").takes_value(true).default_value("http://127.0.0.1:3030").help("Network for NEAR client to use")) - .arg(Arg::with_name("metrics-ip-port-address").long("metrics-ip-port-address").takes_value(true).help("Metrics scrape address")), + .arg(Arg::new("production").long("production").help("Run in production logging mode")) + .arg(Arg::new("rpc-url").long("rpc-url").required(true).value_name("URL").help("Connect to the indicated RPC")) + .arg(Arg::new("da-account-id").long("da-account-id").required(true).value_name("ACCOUNT").help("Publish block data to the indicated NEAR account")) + .arg(Arg::new("key-path").long("key-path").required(true).value_name("FILE").help("Path to NEAR account's key file")) + .arg(Arg::new("network").long("network").value_name("URL").default_value("http://127.0.0.1:3030").help("Network for NEAR client to use")) + .arg(Arg::new("metrics-ip-port-address").long("metrics-ip-port-address").value_name("ADDRESS").help("Metrics scrape address")), ) .subcommand( - SubCommand::with_name("run-config") + Command::new("run-config") .about("Start the relayer using a configuration file") - .arg(Arg::with_name("path").short("p").long("path").required(true).takes_value(true).help("Load configuration from FILE")), + .arg(Arg::new("path").short('p').long("path").required(true).value_name("FILE").help("Load configuration from FILE")), ) .get_matches(); match matches.subcommand() { - ("run-args", Some(args)) => { + Some(("run-args", args)) => { let config = RelayerConfig { - production: args.is_present("production"), - rpc_url: args.value_of("rpc-url").unwrap().to_string(), - da_account_id: args.value_of("da-account-id").unwrap().to_string(), - key_path: args.value_of("key-path").unwrap().to_string(), - network: args.value_of("network").unwrap().to_string(), - metrics_ip_port_addr: args.value_of("metrics-ip-port-address").map(String::from), + production: args.contains_id("production"), + rpc_url: args.get_one::("rpc-url").unwrap().to_string(), + da_account_id: args.get_one::("da-account-id").unwrap().to_string(), + key_path: args.get_one::("key-path").unwrap().to_string(), + network: args.get_one::("network").unwrap().to_string(), + metrics_ip_port_addr: args.get_one::("metrics-ip-port-address").map(|s| s.to_string()), }; relayer_main(config).await } - ("run-config", Some(args)) => { - let config_path = args.value_of("path").unwrap(); - let config = config::load_config(PathBuf::from(config_path))?; + Some(("run-config", args)) => { + let config_path = args.get_one::("path").unwrap(); + let config = config::load_config(PathBuf::from(config_path)).map_err(|e| anyhow::anyhow!(e))?; relayer_main(config).await } _ => Err(anyhow::anyhow!("Invalid subcommand")), @@ -67,12 +68,11 @@ async fn relayer_main(config: RelayerConfig) -> Result<()> { tracing::info!("Initializing Relayer"); tracing::info!("Read config: {:?}", config); - let mut relayer = Relayer::new(config.clone()).await?; + let mut relayer = Relayer::new(&config).await?; if let Some(metrics_addr) = config.metrics_ip_port_addr { let registry = Registry::new(); - relayer.enable_metrics(®istry)?; - metrics::start_metrics_server(metrics_addr, registry); + tokio::spawn(metrics::start_metrics_server(metrics_addr, registry)); } tracing::info!("Starting relayer"); diff --git a/relayer-rs/src/metrics.rs b/relayer-rs/src/metrics.rs index a7975821..397b8d0b 100644 --- a/relayer-rs/src/metrics.rs +++ b/relayer-rs/src/metrics.rs @@ -1,5 +1,10 @@ -use prometheus::{Histogram, HistogramOpts, IntCounter, Registry}; +use prometheus::{Counter, Encoder, Histogram, HistogramOpts, IntCounter, Registry}; use std::sync::Arc; +use tokio::time::Duration; +use warp::Filter; +use anyhow::Result; + +const RELAYER_NAMESPACE: &str = "sffl_relayer"; pub struct RelayerMetrics { pub num_blocks_received: IntCounter, @@ -12,23 +17,120 @@ pub struct RelayerMetrics { } impl RelayerMetrics { - pub fn new(registry: &Registry) -> anyhow::Result> { + pub fn new(registry: &Registry) -> Result> { let num_blocks_received = IntCounter::new( - "sffl_relayer_num_blocks_received", + format!("{}_num_blocks_received", RELAYER_NAMESPACE), "The number of blocks received from rollup", )?; registry.register(Box::new(num_blocks_received.clone()))?; - // ... Initialize other metrics similarly ... + let num_da_submissions_failed = IntCounter::new( + format!("{}_num_da_submissions_failed", RELAYER_NAMESPACE), + "The number of failed da submissions", + )?; + registry.register(Box::new(num_da_submissions_failed.clone()))?; + + let latency_buckets = vec![ + 1.0, 25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0, + 10000.0, f64::INFINITY, + ]; + + let submission_duration_ms = Histogram::with_opts( + HistogramOpts::new( + format!("{}_submission_duration_ms", RELAYER_NAMESPACE), + "Duration of successful DA submissions", + ) + .buckets(latency_buckets), + )?; + registry.register(Box::new(submission_duration_ms.clone()))?; + + let retries_histogram = Histogram::with_opts( + HistogramOpts::new( + format!("{}_retries_histogram", RELAYER_NAMESPACE), + "Histogram of retry counts", + ) + .buckets(prometheus::linear_buckets(0.0, 1.0, 3).unwrap()), + )?; + registry.register(Box::new(retries_histogram.clone()))?; + + let num_of_invalid_nonces = IntCounter::new( + format!("{}_num_of_invalid_nonces", RELAYER_NAMESPACE), + "Number of InvalidNonce error", + )?; + registry.register(Box::new(num_of_invalid_nonces.clone()))?; + + let num_of_expired_txs = IntCounter::new( + format!("{}_num_of_expired_txs", RELAYER_NAMESPACE), + "Number of Expired transactions", + )?; + registry.register(Box::new(num_of_expired_txs.clone()))?; + + let num_of_timeout_txs = IntCounter::new( + format!("{}_num_of_timeout_txs", RELAYER_NAMESPACE), + "Number of Timeout transactions", + )?; + registry.register(Box::new(num_of_timeout_txs.clone()))?; Ok(Arc::new(Self { num_blocks_received, - num_da_submissions_failed: IntCounter::new("sffl_relayer_num_da_submissions_failed", "The number of failed da submissions")?, - submission_duration_ms: Histogram::with_opts(HistogramOpts::new("sffl_relayer_submission_duration_ms", "Duration of successful DA submissions"))?, - retries_histogram: Histogram::with_opts(HistogramOpts::new("sffl_relayer_retries_histogram", "Histogram of retry counts"))?, - num_of_invalid_nonces: IntCounter::new("sffl_relayer_num_of_invalid_nonces", "Number of InvalidNonce error")?, - num_of_expired_txs: IntCounter::new("sffl_relayer_num_of_expired_txs", "Number of Expired transactions")?, - num_of_timeout_txs: IntCounter::new("sffl_relayer_num_of_timeout_txs", "Number of Timeout transactions")?, + num_da_submissions_failed, + submission_duration_ms, + retries_histogram, + num_of_invalid_nonces, + num_of_expired_txs, + num_of_timeout_txs, })) } +} + +pub async fn start_metrics_server(metrics_addr: String, registry: Registry) { + let metrics_route = warp::path!("metrics").and(warp::get()).map(move || { + let encoder = prometheus::TextEncoder::new(); + let mut buffer = Vec::new(); + encoder.encode(®istry.gather(), &mut buffer).unwrap(); + String::from_utf8(buffer).unwrap() + }); + + let socket_addr: std::net::SocketAddr = metrics_addr.parse().expect("Failed to parse metrics address"); + warp::serve(metrics_route).run(socket_addr).await; +} + +pub trait EventListener { + fn on_block_received(&self); + fn on_da_submission_failed(&self); + fn on_da_submitted(&self, duration: Duration); + fn on_retries_required(&self, retries: i32); + fn on_invalid_nonce(&self); + fn on_expired_tx(&self); + fn on_timeout_tx(&self); +} + +impl EventListener for Arc { + fn on_block_received(&self) { + self.num_blocks_received.inc(); + } + + fn on_da_submission_failed(&self) { + self.num_da_submissions_failed.inc(); + } + + fn on_da_submitted(&self, duration: Duration) { + self.submission_duration_ms.observe(duration.as_millis() as f64); + } + + fn on_retries_required(&self, retries: i32) { + self.retries_histogram.observe(retries as f64); + } + + fn on_invalid_nonce(&self) { + self.num_of_invalid_nonces.inc(); + } + + fn on_expired_tx(&self) { + self.num_of_expired_txs.inc(); + } + + fn on_timeout_tx(&self) { + self.num_of_timeout_txs.inc(); + } } \ No newline at end of file diff --git a/relayer-rs/src/relayer.rs b/relayer-rs/src/relayer.rs index d3c04fe9..4fcf703e 100644 --- a/relayer-rs/src/relayer.rs +++ b/relayer-rs/src/relayer.rs @@ -25,14 +25,14 @@ pub struct Relayer { } impl Relayer { - pub async fn new(config: RelayerConfig) -> Result { + pub async fn new(config: &RelayerConfig) -> Result { let ws = WsConnect::new(&config.rpc_url); let provider = ProviderBuilder::new().on_ws(ws).await?; let config = near_da_rpc::near::config::Config { - key: near_da_rpc::near::config::KeyType::File(PathBuf::from(config.key_path)), - contract: config.da_account_id, - network: near_da_rpc::near::config::Network::Custom(config.network), + key: near_da_rpc::near::config::KeyType::File(PathBuf::from(config.key_path.clone())), + contract: config.da_account_id.clone(), + network: near_da_rpc::near::config::Network::Custom(config.network.clone()), namespace: Some(near_da_primitives::Namespace::new(NAMESPACE_ID, 1)), mode: near_da_primitives::Mode::Standard, }; From 3d155f407a287ed6de13ab85e53d0ab1727446bf Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 22 Sep 2024 12:42:44 +0200 Subject: [PATCH 12/96] Dockerfile --- relayer-rs/Dockerfile | 29 +++++++++++++++++++++++++++++ relayer-rs/src/main.rs | 1 - 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 relayer-rs/Dockerfile diff --git a/relayer-rs/Dockerfile b/relayer-rs/Dockerfile new file mode 100644 index 00000000..4703c88d --- /dev/null +++ b/relayer-rs/Dockerfile @@ -0,0 +1,29 @@ +# Use the official Rust image as a parent image +FROM rust:1.79.0 as builder + +# Set the working directory in the container +WORKDIR /usr/src/relayer-rs + +# Copy the Cargo.toml file +COPY Cargo.toml ./ + +# Copy the source code +COPY src ./src + +# Build the application +RUN cargo build --release + +# Start a new stage for a smaller final image +FROM debian:bookworm-slim + +# Install OpenSSL and CA certificates +RUN apt-get update && apt-get install -y openssl ca-certificates && rm -rf /var/lib/apt/lists/* + +# Copy the binary from the builder stage +COPY --from=builder /usr/src/relayer-rs/target/release/relayer-rs /usr/local/bin/relayer-rs + +# Set the entrypoint to the relayer-rs binary +ENTRYPOINT ["/usr/local/bin/relayer-rs"] + +# Default command (can be overridden) +CMD ["--help"] \ No newline at end of file diff --git a/relayer-rs/src/main.rs b/relayer-rs/src/main.rs index 2999c14b..35acc9b1 100644 --- a/relayer-rs/src/main.rs +++ b/relayer-rs/src/main.rs @@ -5,7 +5,6 @@ use clap::{Command, Arg}; use prometheus::Registry; use std::path::PathBuf; use tracing_subscriber::FmtSubscriber; -use crate::metrics::RelayerMetrics; mod config; mod metrics; From 4b52febf5538ebb1af10a1db2e41eeb347f53531 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 22 Sep 2024 14:38:45 +0200 Subject: [PATCH 13/96] docker-compose relayer-rs --- setup/relayer-rs/.env.example | 11 ++ setup/relayer-rs/docker-compose.yml | 112 +++++++++++++++++++++ setup/relayer-rs/prometheus/prometheus.yml | 26 +++++ 3 files changed, 149 insertions(+) create mode 100644 setup/relayer-rs/.env.example create mode 100644 setup/relayer-rs/docker-compose.yml create mode 100644 setup/relayer-rs/prometheus/prometheus.yml diff --git a/setup/relayer-rs/.env.example b/setup/relayer-rs/.env.example new file mode 100644 index 00000000..9c5cc074 --- /dev/null +++ b/setup/relayer-rs/.env.example @@ -0,0 +1,11 @@ +# Tagged release for SFFL containers +SFFL_RELEASE=latest + +# NEAR chain ID +NEAR_CHAIN_ID=testnet + +# Path to the directory containing the keys for the relayer DA account +NEAR_KEYS_DIR=~/.near-credentials + +# RPC URL of the NEAR network +NEAR_RPC_URL=https://rpc.testnet.near.org \ No newline at end of file diff --git a/setup/relayer-rs/docker-compose.yml b/setup/relayer-rs/docker-compose.yml new file mode 100644 index 00000000..e1456d13 --- /dev/null +++ b/setup/relayer-rs/docker-compose.yml @@ -0,0 +1,112 @@ +version: "3" + +networks: + near-sffl-relayer-rs: + driver: bridge + +services: + relayer_421614_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-421614 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9093 + command: + - run-args + - --rpc-url + - wss://arbitrum-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer421614-1.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer421614-1.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-421614:9093 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" + + relayer_11155420_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-11155420 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9094 + command: + - run-args + - --rpc-url + - wss://optimism-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer11155420-1.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer11155420-1.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-11155420:9094 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" + + grafana: + profiles: ["monitoring"] + image: grafana/grafana:9.4.1 + container_name: grafana-rs + volumes: + - grafana_data_relayer_rs:/var/lib/grafana + - ../../grafana/provisioning:/etc/grafana/provisioning + networks: + - near-sffl-relayer-rs + environment: + - GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin} + - GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin} + - GF_USERS_ALLOW_SIGN_UP=false + restart: unless-stopped + ports: + - "127.0.0.1:3002:3000" + + prometheus: + profiles: ["monitoring"] + image: prom/prometheus:v2.42.0 + container_name: prometheus-rs + volumes: + - ./prometheus:/etc/prometheus + - prometheus_data_relayer_rs:/prometheus + networks: + - near-sffl-relayer-rs + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--web.console.libraries=/etc/prometheus/console_libraries" + - "--web.console.templates=/etc/prometheus/consoles" + - "--storage.tsdb.retention.time=200h" + - "--web.enable-lifecycle" + - --web.enable-remote-write-receiver + restart: unless-stopped + ports: + - "127.0.0.1:9092:9090" + extra_hosts: + - "host.docker.internal:host-gateway" + +volumes: + prometheus_data_relayer_rs: + grafana_data_relayer_rs: \ No newline at end of file diff --git a/setup/relayer-rs/prometheus/prometheus.yml b/setup/relayer-rs/prometheus/prometheus.yml new file mode 100644 index 00000000..7295f931 --- /dev/null +++ b/setup/relayer-rs/prometheus/prometheus.yml @@ -0,0 +1,26 @@ +global: + scrape_interval: 15s + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: "docker-host-alpha" + +# A scrape configuration containing exactly one endpoint to scrape. +scrape_configs: + - job_name: "prometheus" + scrape_interval: 10s + static_configs: + - targets: ["localhost:9090"] + + - job_name: "sffl-relayer-rs" + scrape_interval: 5s + static_configs: + - targets: ["near-sffl-relayer-rs-421614:9093"] + labels: + role: "relayer" + instance: "1" + - targets: ["near-sffl-relayer-rs-11155420:9094"] + labels: + role: "relayer" + instance: "2" \ No newline at end of file From ec0b13e108ad12dd1624d4faa5895172be291561 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 22 Sep 2024 19:09:50 +0200 Subject: [PATCH 14/96] working relayer --- setup/relayer-rs/docker-compose.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup/relayer-rs/docker-compose.yml b/setup/relayer-rs/docker-compose.yml index e1456d13..1d2e4b22 100644 --- a/setup/relayer-rs/docker-compose.yml +++ b/setup/relayer-rs/docker-compose.yml @@ -5,7 +5,7 @@ networks: driver: bridge services: - relayer_421614_rs: + relayer_431614_rs: build: context: ../../relayer-rs dockerfile: Dockerfile @@ -21,13 +21,13 @@ services: - --rpc-url - wss://arbitrum-sepolia-rpc.publicnode.com - --da-account-id - - sfrelayer421614-1.testnet + - sfrelayer431614-2.testnet - --key-path - - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer421614-1.testnet.json + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer431614-2.testnet.json - --network - ${NEAR_RPC_URL} - --metrics-ip-port-address - - near-sffl-relayer-rs-421614:9093 + - near-sffl-relayer-rs-431614:9093 restart: unless-stopped logging: driver: "json-file" @@ -40,7 +40,7 @@ services: build: context: ../../relayer-rs dockerfile: Dockerfile - container_name: near-sffl-relayer-rs-11155420 + container_name: near-sffl-relayer-rs-21155420 volumes: - ${NEAR_KEYS_DIR}:/root/.near-credentials networks: @@ -52,13 +52,13 @@ services: - --rpc-url - wss://optimism-sepolia-rpc.publicnode.com - --da-account-id - - sfrelayer11155420-1.testnet + - sfrelayer21155420-2.testnet - --key-path - - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer11155420-1.testnet.json + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer21155420-2.testnet.json - --network - ${NEAR_RPC_URL} - --metrics-ip-port-address - - near-sffl-relayer-rs-11155420:9094 + - near-sffl-relayer-rs-21155420:9094 restart: unless-stopped logging: driver: "json-file" From 9bbc73b0a43f82fa0776fa1626a5bfd191855290 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Mon, 23 Sep 2024 21:09:04 +0200 Subject: [PATCH 15/96] Operator scaffold --- operator-rs/Cargo.toml | 30 +++ operator-rs/src/config.rs | 10 + operator-rs/src/lib.rs | 3 + operator-rs/src/main.rs | 91 ++++++++ operator-rs/src/operator.rs | 400 ++++++++++++++++++++++++++++++++++++ 5 files changed, 534 insertions(+) create mode 100644 operator-rs/Cargo.toml create mode 100644 operator-rs/src/config.rs create mode 100644 operator-rs/src/lib.rs create mode 100644 operator-rs/src/main.rs create mode 100644 operator-rs/src/operator.rs diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml new file mode 100644 index 00000000..a02f5574 --- /dev/null +++ b/operator-rs/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "operator-rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +alloy = { version = "0.3.6", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client"] } +alloy-primitives = "0.8.3" +alloy-rpc-client = "0.3.6" +alloy-rpc-types = "0.3.6" +alloy-transport-ws = "0.3.6" +alloy-rlp = "0.3.8" +near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +tokio = { version = "1.30", features = ["full"] } +prometheus = "0.13" +warp = "0.3" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +anyhow = "1.0" +tracing = "0.1" +tracing-subscriber = "0.3" +futures-util = "0.3.30" +eyre = "0.6" +bincode = "1.3" +serde_yaml = "0.9.1" +clap = "4.5.18" +tempfile = "3.10.0" +hex = "0.4" +rand = "0.8" \ No newline at end of file diff --git a/operator-rs/src/config.rs b/operator-rs/src/config.rs new file mode 100644 index 00000000..bc4a24cc --- /dev/null +++ b/operator-rs/src/config.rs @@ -0,0 +1,10 @@ +use std::path::PathBuf; +use anyhow::Result; +use serde::Deserialize; +use crate::operator::NodeConfig; + +pub fn load_config(path: PathBuf) -> Result { + let config_str = std::fs::read_to_string(path)?; + let config: NodeConfig = serde_yaml::from_str(&config_str)?; + Ok(config) +} \ No newline at end of file diff --git a/operator-rs/src/lib.rs b/operator-rs/src/lib.rs new file mode 100644 index 00000000..a43c9294 --- /dev/null +++ b/operator-rs/src/lib.rs @@ -0,0 +1,3 @@ +pub mod operator; +pub mod config; +// pub mod metrics; \ No newline at end of file diff --git a/operator-rs/src/main.rs b/operator-rs/src/main.rs new file mode 100644 index 00000000..fb768a67 --- /dev/null +++ b/operator-rs/src/main.rs @@ -0,0 +1,91 @@ +use anyhow::Result; +use clap::{Command, Arg}; +use operator_rs::operator::{Operator, NodeConfig}; +use std::path::PathBuf; +use tracing_subscriber::FmtSubscriber; + +mod config; + +#[tokio::main] +async fn main() -> Result<()> { + let matches = Command::new("sffl-operator") + .about("SFFL Operator") + .subcommand( + Command::new("run-args") + .about("Start the operator with direct CLI options") + .arg(Arg::new("production").long("production").help("Run in production logging mode")) + .arg(Arg::new("rpc-url").long("rpc-url").required(true).value_name("URL").help("Connect to the indicated RPC")) + .arg(Arg::new("ws-url").long("ws-url").required(true).value_name("URL").help("Connect to the indicated WebSocket")) + .arg(Arg::new("operator-address").long("operator-address").required(true).value_name("ADDRESS").help("Operator's Ethereum address")) + .arg(Arg::new("bls-key-path").long("bls-key-path").required(true).value_name("FILE").help("Path to BLS key file")) + .arg(Arg::new("ecdsa-key-path").long("ecdsa-key-path").required(true).value_name("FILE").help("Path to ECDSA key file")) + .arg(Arg::new("avs-registry-coordinator").long("avs-registry-coordinator").required(true).value_name("ADDRESS").help("AVS Registry Coordinator address")) + .arg(Arg::new("operator-state-retriever").long("operator-state-retriever").required(true).value_name("ADDRESS").help("Operator State Retriever address")) + .arg(Arg::new("aggregator-server-ip-port").long("aggregator-server-ip-port").required(true).value_name("IP:PORT").help("Aggregator server IP and port")) + .arg(Arg::new("enable-metrics").long("enable-metrics").help("Enable metrics collection")) + .arg(Arg::new("eigen-metrics-ip-port").long("eigen-metrics-ip-port").value_name("IP:PORT").help("EigenMetrics IP and port")) + .arg(Arg::new("node-api-ip-port").long("node-api-ip-port").value_name("IP:PORT").help("Node API IP and port")) + .arg(Arg::new("task-response-wait-ms").long("task-response-wait-ms").value_name("MS").default_value("0").help("Task response wait time in milliseconds")) + .arg(Arg::new("register-operator-on-startup").long("register-operator-on-startup").help("Register operator on startup")) + .arg(Arg::new("token-strategy-addr").long("token-strategy-addr").value_name("ADDRESS").help("Token strategy address")), + ) + .subcommand( + Command::new("run-config") + .about("Start the operator using a configuration file") + .arg(Arg::new("path").short('p').long("path").required(true).value_name("FILE").help("Load configuration from FILE")), + ) + .get_matches(); + + match matches.subcommand() { + Some(("run-args", args)) => { + let config = NodeConfig { + production: args.contains_id("production"), + eth_rpc_url: args.get_one::("rpc-url").unwrap().to_string(), + eth_ws_url: args.get_one::("ws-url").unwrap().to_string(), + operator_address: args.get_one::("operator-address").unwrap().to_string(), + bls_private_key_store_path: args.get_one::("bls-key-path").unwrap().to_string(), + ecdsa_private_key_store_path: args.get_one::("ecdsa-key-path").unwrap().to_string(), + avs_registry_coordinator_address: args.get_one::("avs-registry-coordinator").unwrap().to_string(), + operator_state_retriever_address: args.get_one::("operator-state-retriever").unwrap().to_string(), + aggregator_server_ip_port_address: args.get_one::("aggregator-server-ip-port").unwrap().to_string(), + enable_metrics: args.contains_id("enable-metrics"), + eigen_metrics_ip_port_address: args.get_one::("eigen-metrics-ip-port").map(|s| s.to_string()), + node_api_ip_port_address: args.get_one::("node-api-ip-port").map(|s| s.to_string()), + task_response_wait_ms: args.get_one::("task-response-wait-ms").unwrap().parse().unwrap(), + register_operator_on_startup: args.contains_id("register-operator-on-startup"), + token_strategy_addr: args.get_one::("token-strategy-addr").map(|s| s.to_string()), + }; + operator_main(config).await + } + Some(("run-config", args)) => { + let config_path = args.get_one::("path").unwrap(); + let config = config::load_config(PathBuf::from(config_path))?; + operator_main(config).await + } + _ => Err(anyhow::anyhow!("Invalid subcommand")), + } +} + +async fn operator_main(config: NodeConfig) -> Result<()> { + let log_level = if config.production { + tracing::Level::INFO + } else { + tracing::Level::DEBUG + }; + + let subscriber = FmtSubscriber::builder() + .with_max_level(log_level) + .finish(); + tracing::subscriber::set_global_default(subscriber)?; + + tracing::info!("Initializing Operator"); + tracing::info!("Read config: {:?}", config); + + let operator = Operator::new_from_config(config).await?; + + tracing::info!("Starting operator"); + let mut ctx = operator_rs::operator::Context; + operator.start(&mut ctx).await?; + + Ok(()) +} \ No newline at end of file diff --git a/operator-rs/src/operator.rs b/operator-rs/src/operator.rs new file mode 100644 index 00000000..05a39627 --- /dev/null +++ b/operator-rs/src/operator.rs @@ -0,0 +1,400 @@ +use alloy::providers::{Provider, ProviderBuilder}; +use alloy::pubsub::PubSubFrontend; +use alloy_primitives::{Address, U256}; +use alloy_rpc_types::{Block, BlockId}; +use alloy_transport_ws::WsConnect; +use anyhow::Result; +use prometheus::Registry; +use serde::{Deserialize, Serialize}; +use std::sync::Arc; +use tokio::time::{self, Duration}; +use tracing::{debug, error, info, warn}; + +// Constants +const AVS_NAME: &str = "super-fast-finality-layer"; +const SEM_VER: &str = "0.0.1"; + +// Mock implementations for missing types and traits +mod mock { + use super::*; + + #[derive(Clone)] + pub struct BlsKeyPair; + impl BlsKeyPair { + pub fn sign_message(&self, _message: &[u8]) -> BlsSignature { + BlsSignature + } + pub fn get_pub_key_g1(&self) -> G1Point { + G1Point + } + pub fn get_pub_key_g2(&self) -> G2Point { + G2Point + } + } + + #[derive(Clone, Debug)] + pub struct BlsSignature; + + #[derive(Clone, Debug)] + pub struct G1Point; + + #[derive(Clone, Debug)] + pub struct G2Point; + + #[derive(Clone)] + pub struct OperatorId([u8; 32]); + + #[derive(Clone)] + pub struct AvsManager; + + #[derive(Clone)] + pub struct Attestor; + + #[derive(Clone)] + pub struct AggregatorRpcClient; + + pub struct NodeApi; + + pub struct EigenMetrics; + + pub struct Logger; +} + +use mock::*; + +#[derive(Clone, Deserialize)] +pub struct NodeConfig { + pub production: bool, + pub eth_rpc_url: String, + pub eth_ws_url: String, + pub operator_address: String, + pub bls_private_key_store_path: String, + pub ecdsa_private_key_store_path: String, + pub avs_registry_coordinator_address: String, + pub operator_state_retriever_address: String, + pub aggregator_server_ip_port_address: String, + pub enable_metrics: bool, + pub eigen_metrics_ip_port_address: Option, + pub node_api_ip_port_address: Option, + pub task_response_wait_ms: u64, + pub register_operator_on_startup: bool, + pub token_strategy_addr: Option, +} + +pub struct Operator { + config: NodeConfig, + logger: Logger, + provider: Arc>, + metrics_reg: Registry, + metrics: Option, + node_api: Option, + avs_manager: AvsManager, + bls_keypair: BlsKeyPair, + operator_addr: Address, + aggregator_server_ip_port_addr: String, + aggregator_rpc_client: AggregatorRpcClient, + registry_coordinator_addr: Address, + operator_id: OperatorId, + task_response_wait: Duration, + attestor: Attestor, +} + +impl Operator { + pub async fn new_from_config(config: NodeConfig) -> Result { + let logger = Logger; // Mock implementation + debug!(logger, "Creating operator from config", config = ?config); + + let node_api = if config.enable_metrics { + Some(NodeApi::new(AVS_NAME, SEM_VER, &config.node_api_ip_port_address.unwrap(), &logger)) + } else { + None + }; + + let bls_key_password = std::env::var("OPERATOR_BLS_KEY_PASSWORD").unwrap_or_else(|_| { + warn!(logger, "OPERATOR_BLS_KEY_PASSWORD env var not set. using empty string"); + String::new() + }); + + let bls_keypair = BlsKeyPair; // Mock implementation + let operator_id = OperatorId([0; 32]); // Mock implementation + + let ecdsa_key_password = std::env::var("OPERATOR_ECDSA_KEY_PASSWORD").unwrap_or_else(|_| { + warn!(logger, "OPERATOR_ECDSA_KEY_PASSWORD env var not set. using empty string"); + String::new() + }); + + let metrics_reg = Registry::new(); + let id = format!("{}OperatorSubsytem", config.operator_address); + + let ws = WsConnect::new(&config.eth_ws_url); + let provider = ProviderBuilder::new().on_ws(ws).await?; + + let registry_coordinator_addr = config.avs_registry_coordinator_address.parse()?; + let operator_state_retriever_addr = config.operator_state_retriever_address.parse()?; + + let aggregator_rpc_client = AggregatorRpcClient; // Mock implementation + + let avs_manager = AvsManager; // Mock implementation + + let attestor = Attestor; // Mock implementation + + let metrics = if config.enable_metrics { + Some(EigenMetrics::new(AVS_NAME, &config.eigen_metrics_ip_port_address.unwrap(), &metrics_reg, &logger)) + } else { + None + }; + + let operator = Self { + config: config.clone(), + logger, + provider: Arc::new(provider), + metrics_reg, + metrics, + node_api, + avs_manager, + bls_keypair, + operator_addr: config.operator_address.parse()?, + aggregator_server_ip_port_addr: config.aggregator_server_ip_port_address, + aggregator_rpc_client, + registry_coordinator_addr, + operator_id, + task_response_wait: Duration::from_millis(config.task_response_wait_ms), + attestor, + }; + + if config.register_operator_on_startup { + operator.register_operator_on_startup()?; + } + + info!(operator.logger, "Operator info"; + "operatorId" => ?operator.operator_id, + "operatorAddr" => ?config.operator_address, + "operatorG1Pubkey" => ?operator.bls_keypair.get_pub_key_g1(), + "operatorG2Pubkey" => ?operator.bls_keypair.get_pub_key_g2(), + ); + + Ok(operator) + } + + pub async fn start(&self, ctx: &mut Context) -> Result<()> { + info!("Starting operator"); + + if let Some(node_api) = &self.node_api { + node_api.start(); + } + + let metrics_err_chan = if let Some(metrics) = &self.metrics { + metrics.start(ctx, &self.metrics_reg) + } else { + tokio::sync::mpsc::channel(1).1 + }; + + let signed_roots_rx = self.attestor.get_signed_root_rx(); + let checkpoint_task_created_rx = self.avs_manager.get_checkpoint_task_created_rx(); + let operator_set_update_rx = self.avs_manager.get_operator_set_update_rx(); + + loop { + tokio::select! { + _ = ctx.done() => { + return self.close(); + } + Some(err) = metrics_err_chan.recv() => { + error!(self.logger, "Error in metrics server"; "err" => ?err); + } + Some(signed_state_root_update_message) = signed_roots_rx.recv() => { + tokio::spawn(async move { + self.aggregator_rpc_client.send_signed_state_root_update_to_aggregator(&signed_state_root_update_message).await; + }); + } + Some(checkpoint_task_created_event) = checkpoint_task_created_rx.recv() => { + tokio::spawn(async move { + if let Err(e) = self.process_checkpoint_task(checkpoint_task_created_event).await { + error!(self.logger, "Error processing checkpoint task"; "err" => ?e); + } + }); + } + Some(operator_set_update) = operator_set_update_rx.recv() => { + tokio::spawn(async move { + match self.sign_operator_set_update(operator_set_update) { + Ok(signed_update) => { + self.aggregator_rpc_client.send_signed_operator_set_update_to_aggregator(&signed_update).await; + } + Err(e) => { + error!(self.logger, "Failed to sign operator set update"; "err" => ?e); + } + } + }); + } + } + } + } + + async fn close(&self) -> Result<()> { + self.attestor.close()?; + Ok(()) + } + + fn sign_task_response(&self, task_response: &CheckpointTaskResponse) -> Result { + let task_response_hash = task_response.digest()?; + let bls_signature = self.bls_keypair.sign_message(&task_response_hash); + Ok(SignedCheckpointTaskResponse { + task_response: task_response.clone(), + bls_signature, + operator_id: self.operator_id.clone(), + }) + } + + fn sign_operator_set_update(&self, message: OperatorSetUpdateMessage) -> Result { + let message_hash = message.digest()?; + let signature = self.bls_keypair.sign_message(&message_hash); + Ok(SignedOperatorSetUpdateMessage { + message, + operator_id: self.operator_id.clone(), + bls_signature: signature, + }) + } + + async fn process_checkpoint_task(&self, event: CheckpointTaskCreatedEvent) -> Result<()> { + if self.task_response_wait > Duration::from_millis(0) { + tokio::time::sleep(self.task_response_wait).await; + } + + let checkpoint_messages = self.aggregator_rpc_client.get_aggregated_checkpoint_messages( + event.task.from_timestamp, + event.task.to_timestamp, + ).await?; + + let checkpoint_task_response = CheckpointTaskResponse::new_from_messages( + event.task_index, + checkpoint_messages, + )?; + + let signed_checkpoint_task_response = self.sign_task_response(&checkpoint_task_response)?; + + self.aggregator_rpc_client.send_signed_checkpoint_task_response_to_aggregator(&signed_checkpoint_task_response).await; + + Ok(()) + } + + pub async fn register_operator_with_avs(&self, operator_ecdsa_key_pair: &EcdsaKeyPair) -> Result<()> { + self.avs_manager.register_operator_with_avs(&self.provider, operator_ecdsa_key_pair, &self.bls_keypair).await + } + + pub async fn deposit_into_strategy(&self, strategy_addr: Address, amount: U256) -> Result<()> { + self.avs_manager.deposit_into_strategy(self.operator_addr, strategy_addr, amount).await + } + + pub async fn register_operator_with_eigenlayer(&self) -> Result<()> { + self.avs_manager.register_operator_with_eigenlayer(self.operator_addr).await + } + + pub async fn print_operator_status(&self) -> Result<()> { + let operator_id = self.avs_manager.get_operator_id(self.operator_addr).await?; + let pubkeys_registered = operator_id != [0; 32]; + let registered_with_avs = self.operator_id.0 != [0; 32]; + + let operator_status = OperatorStatus { + ecdsa_address: self.operator_addr.to_string(), + pubkeys_registered, + g1_pubkey: hex::encode(self.bls_keypair.get_pub_key_g1().to_bytes()), + g2_pubkey: hex::encode(self.bls_keypair.get_pub_key_g2().to_bytes()), + registered_with_avs, + operator_id: hex::encode(self.operator_id.0), + }; + + println!("{}", serde_json::to_string_pretty(&operator_status)?); + Ok(()) + } + + fn register_operator_on_startup(&self) -> Result<()> { + // Implementation omitted for brevity + Ok(()) + } + + pub fn bls_pubkey_g1(&self) -> G1Point { + self.bls_keypair.get_pub_key_g1() + } +} + +#[derive(Serialize)] +struct OperatorStatus { + ecdsa_address: String, + pubkeys_registered: bool, + g1_pubkey: String, + g2_pubkey: String, + registered_with_avs: bool, + operator_id: String, +} + +// Mock implementations for missing types +pub struct Context; +impl Context { + pub fn done(&self) -> impl std::future::Future { + std::future::ready(()) + } +} + +#[derive(Clone)] +pub struct CheckpointTaskCreatedEvent { + pub task: CheckpointTask, + pub task_index: u64, +} + +#[derive(Clone)] +pub struct CheckpointTask { + pub from_timestamp: u64, + pub to_timestamp: u64, +} + +#[derive(Clone)] +pub struct CheckpointTaskResponse { + // Fields omitted for brevity +} + +impl CheckpointTaskResponse { + pub fn new_from_messages(_task_index: u64, _messages: Vec) -> Result { + // Implementation omitted for brevity + Ok(Self {}) + } + + pub fn digest(&self) -> Result> { + // Implementation omitted for brevity + Ok(vec![]) + } +} + +#[derive(Clone)] +pub struct SignedCheckpointTaskResponse { + pub task_response: CheckpointTaskResponse, + pub bls_signature: BlsSignature, + pub operator_id: OperatorId, +} + +#[derive(Clone)] +pub struct OperatorSetUpdateMessage { + // Fields omitted for brevity +} + +impl OperatorSetUpdateMessage { + pub fn digest(&self) -> Result> { + // Implementation omitted for brevity + Ok(vec![]) + } +} + +#[derive(Clone)] +pub struct SignedOperatorSetUpdateMessage { + pub message: OperatorSetUpdateMessage, + pub operator_id: OperatorId, + pub bls_signature: BlsSignature, +} + +#[derive(Clone)] +pub struct CheckpointMessage { + // Fields omitted for brevity +} + +pub struct EcdsaKeyPair; + +// Implement necessary traits and methods for AvsManager, Attestor, AggregatorRpcClient, etc. +// These implementations are omitted for brevity but would need to be filled in for a complete solution. \ No newline at end of file From 9560e6c194e66bde20e7cccdb587967f0b0aacc4 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Tue, 24 Sep 2024 00:46:25 +0200 Subject: [PATCH 16/96] wip:near-lake --- near-lake/Cargo.toml | 13 +++++++++++++ near-lake/src/main.rs | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 near-lake/Cargo.toml create mode 100644 near-lake/src/main.rs diff --git a/near-lake/Cargo.toml b/near-lake/Cargo.toml new file mode 100644 index 00000000..75a37229 --- /dev/null +++ b/near-lake/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "near-lake" +version = "0.0.1" +edition = "2021" + + +[dependencies] +near-lake-framework = "0.7.9" +anyhow = "1.0" +futures = "0.3" +tokio = { version = "1.38.0", features = ["rt-multi-thread", "macros"] } +tokio-stream = "0.1.16" +near-lake-primitives = "0.8.0-beta.3" diff --git a/near-lake/src/main.rs b/near-lake/src/main.rs new file mode 100644 index 00000000..ec499e0c --- /dev/null +++ b/near-lake/src/main.rs @@ -0,0 +1,36 @@ +//! This example show how to use a context with Lake Framework. +//! It is going to follow the NEAR Social contract and the block height along +//! with a number of calls to the contract. +use near_lake_framework::{LakeConfigBuilder, near_indexer_primitives::StreamerMessage}; +// We need to import this trait to use the `as_function_call` method. +use futures::StreamExt; +const CONTRACT_ID: &str = "social.near"; + +#[tokio::main] +async fn main() -> Result<(), tokio::io::Error> { + let config = LakeConfigBuilder::default() + .testnet() + .start_block_height(82422587) + .build() + .expect("Failed to build LakeConfig"); + + let (sender, stream) = near_lake_framework::streamer(config); + + let mut handlers = tokio_stream::wrappers::ReceiverStream::new(stream) + .map(|streamer_message| handle_block(streamer_message)) + .buffer_unordered(1usize); + + while let Some(_handle_message) = handlers.next().await {} + drop(handlers); + + match sender.await { + Ok(Ok(())) => Ok(()), + Ok(Err(e)) => Err(std::io::Error::new(std::io::ErrorKind::Other, e)), + Err(e) => Err(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())), + } +} + +async fn handle_block(streamer_message: StreamerMessage) -> Result<(), Box> { + println!("Handling block: {}", streamer_message.block.header.height); + Ok(()) +} From e5879dad9202dd1f4b95c2639ffc84765a3d530f Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Tue, 24 Sep 2024 00:50:24 +0200 Subject: [PATCH 17/96] types and stuff --- operator-rs/src/operator.rs | 20 +------------------- operator-rs/src/types.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 operator-rs/src/types.rs diff --git a/operator-rs/src/operator.rs b/operator-rs/src/operator.rs index 05a39627..83e93283 100644 --- a/operator-rs/src/operator.rs +++ b/operator-rs/src/operator.rs @@ -61,25 +61,7 @@ mod mock { } use mock::*; - -#[derive(Clone, Deserialize)] -pub struct NodeConfig { - pub production: bool, - pub eth_rpc_url: String, - pub eth_ws_url: String, - pub operator_address: String, - pub bls_private_key_store_path: String, - pub ecdsa_private_key_store_path: String, - pub avs_registry_coordinator_address: String, - pub operator_state_retriever_address: String, - pub aggregator_server_ip_port_address: String, - pub enable_metrics: bool, - pub eigen_metrics_ip_port_address: Option, - pub node_api_ip_port_address: Option, - pub task_response_wait_ms: u64, - pub register_operator_on_startup: bool, - pub token_strategy_addr: Option, -} +use types::NodeConfig; pub struct Operator { config: NodeConfig, diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs new file mode 100644 index 00000000..2f443fcc --- /dev/null +++ b/operator-rs/src/types.rs @@ -0,0 +1,18 @@ +#[derive(Clone, Deserialize)] +pub struct NodeConfig { + pub production: bool, + pub eth_rpc_url: String, + pub eth_ws_url: String, + pub operator_address: String, + pub bls_private_key_store_path: String, + pub ecdsa_private_key_store_path: String, + pub avs_registry_coordinator_address: String, + pub operator_state_retriever_address: String, + pub aggregator_server_ip_port_address: String, + pub enable_metrics: bool, + pub eigen_metrics_ip_port_address: Option, + pub node_api_ip_port_address: Option, + pub task_response_wait_ms: u64, + pub register_operator_on_startup: bool, + pub token_strategy_addr: Option, +} From a79ead34e09a2135b18302843ec9da34accbfec6 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 28 Sep 2024 01:36:07 +0200 Subject: [PATCH 18/96] fastnear --- indexer/src/fastnear_indexer.rs | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 indexer/src/fastnear_indexer.rs diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs new file mode 100644 index 00000000..bb39901d --- /dev/null +++ b/indexer/src/fastnear_indexer.rs @@ -0,0 +1,56 @@ +use reqwest::Client; +use tokio::sync::mpsc; +use near_indexer::StreamerMessage; +// const VERSION: &str = "v0"; +// const NETWORK: &str = "testnet"; +// const HEIGHT: u64 = 100000000; +// const LATEST: bool = true; +const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/block/latest"; + +#[derive(Debug)] +pub struct FastNearIndexer { + client: Client, +} + +impl FastNearIndexer { + pub fn new() -> Self { + FastNearIndexer { + client: Client::new(), + } + } + + pub fn stream_latest_blocks(&self) -> mpsc::Receiver { + let (sender, receiver) = mpsc::channel(100); + let client = self.client.clone(); + + tokio::spawn(async move { + loop { + match client.get(FASTNEAR_ENDPOINT).send().await { + Ok(response) => { + if let Ok(block) = response.json::().await { + if sender.send(block).await.is_err() { + break; + } + } + } + Err(e) => eprintln!("Error fetching latest block: {:?}", e), + } + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + } + }); + + receiver + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn test_stream_latest_blocks() { + let indexer = FastNearIndexer::new(); + let stream = indexer.stream_latest_blocks(); + assert!(stream.is_empty()); + } +} From 4e36b3235285154f92a261f700d89020f9c5ded6 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 28 Sep 2024 01:38:35 +0200 Subject: [PATCH 19/96] types.rs --- Cargo.lock | 2742 +++++++++++++++++++++----------------- operator-rs/src/types.rs | 28 +- 2 files changed, 1502 insertions(+), 1268 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f33f77a..ec58b2d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "actix" version = "0.13.5" @@ -62,7 +52,7 @@ checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" dependencies = [ "actix-utils", "actix-web", - "derive_more", + "derive_more 0.99.18", "futures-util", "log", "once_cell", @@ -85,7 +75,7 @@ dependencies = [ "brotli", "bytes", "bytestring", - "derive_more", + "derive_more 0.99.18", "encoding_rs", "flate2", "futures-core", @@ -105,7 +95,7 @@ dependencies = [ "tokio", "tokio-util 0.7.12", "tracing", - "zstd 0.13.2", + "zstd", ] [[package]] @@ -223,7 +213,7 @@ dependencies = [ "bytestring", "cfg-if 1.0.0", "cookie", - "derive_more", + "derive_more 0.99.18", "encoding_rs", "futures-core", "futures-util", @@ -358,198 +348,338 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] -name = "amq-protocol" -version = "7.2.1" +name = "alloy" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" +checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" dependencies = [ - "amq-protocol-tcp", - "amq-protocol-types", - "amq-protocol-uri", - "cookie-factory", - "nom", - "serde", + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-json-rpc", + "alloy-network", + "alloy-node-bindings", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", ] [[package]] -name = "amq-protocol-tcp" -version = "7.2.1" +name = "alloy-chains" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" +checksum = "8158b4878c67837e5413721cc44298e6a2d88d39203175ea025e51892a16ba4c" dependencies = [ - "amq-protocol-uri", - "tcp-stream", - "tracing", + "num_enum", + "strum 0.26.3", ] [[package]] -name = "amq-protocol-types" -version = "7.2.1" +name = "alloy-consensus" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" +checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" dependencies = [ - "cookie-factory", - "nom", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", "serde", - "serde_json", ] [[package]] -name = "amq-protocol-uri" -version = "7.2.1" +name = "alloy-contract" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" -dependencies = [ - "amq-protocol-types", - "percent-encoding", - "url", +checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", ] [[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" +name = "alloy-core" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" dependencies = [ - "libc", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", ] [[package]] -name = "anstream" -version = "0.6.15" +name = "alloy-dyn-abi" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", ] [[package]] -name = "anstyle" -version = "1.0.8" +name = "alloy-eip2930" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] [[package]] -name = "anstyle-parse" -version = "0.2.5" +name = "alloy-eip7702" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" dependencies = [ - "utf8parse", + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", ] [[package]] -name = "anstyle-query" -version = "1.1.1" +name = "alloy-eips" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" dependencies = [ - "windows-sys 0.52.0", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", ] [[package]] -name = "anstyle-wincon" -version = "3.0.4" +name = "alloy-genesis" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" dependencies = [ - "anstyle", - "windows-sys 0.52.0", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] -name = "anyhow" -version = "1.0.89" +name = "alloy-json-abi" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "a438d4486b5d525df3b3004188f9d5cd1d65cd30ecc41e5a3ccef6f6342e8af9" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] [[package]] -name = "arbitrary" -version = "1.3.2" +name = "alloy-json-rpc" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" dependencies = [ - "derive_arbitrary", + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "arc-swap" -version = "1.7.1" +name = "alloy-network" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] [[package]] -name = "arrayref" -version = "0.3.9" +name = "alloy-network-primitives" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" +checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] [[package]] -name = "arrayvec" -version = "0.5.2" +name = "alloy-node-bindings" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", +] [[package]] -name = "arrayvec" -version = "0.7.6" +name = "alloy-primitives" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "260d3ff3bff0bb84599f032a2f2c6828180b0ea0cd41fdaf44f39cef3ba41861" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if 1.0.0", + "const-hex", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "hex-literal", + "indexmap 2.5.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.8.5", + "ruint", + "rustc-hash 2.0.0", + "serde", + "sha3", + "tiny-keccak", +] [[package]] -name = "ascii-canvas" -version = "3.0.0" +name = "alloy-provider" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", +checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-node-bindings", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-anvil", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru 0.12.4", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", ] [[package]] -name = "asn1-rs" -version = "0.6.2" +name = "alloy-pubsub" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +checksum = "2d05f63677e210d758cd5d6d1ce10f20c980c3560ccfbe79ba1997791862a04f" dependencies = [ - "asn1-rs-derive", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", ] [[package]] -name = "asn1-rs-derive" -version = "0.5.1" +name = "alloy-rlp" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", - "synstructure", + "alloy-rlp-derive", + "arrayvec 0.7.6", + "bytes", ] [[package]] -name = "asn1-rs-impl" -version = "0.2.0" +name = "alloy-rlp-derive" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", @@ -557,53 +687,653 @@ dependencies = [ ] [[package]] -name = "assert_matches" -version = "1.5.0" +name = "alloy-rpc-client" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] [[package]] -name = "async-channel" -version = "2.3.1" +name = "alloy-rpc-types" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-serde", + "serde", ] [[package]] -name = "async-executor" -version = "1.13.1" +name = "alloy-rpc-types-anvil" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" dependencies = [ - "async-task", - "concurrent-queue", - "fastrand 2.1.1", - "futures-lite 2.3.0", - "slab", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] -name = "async-global-executor" -version = "2.4.1" +name = "alloy-rpc-types-engine" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +checksum = "1464c4dd646e1bdfde86ae65ce5ba168dbb29180b478011fe87117ae46b1629b" dependencies = [ - "async-channel", - "async-executor", - "async-io 2.3.4", - "async-lock 3.4.0", - "blocking", - "futures-lite 2.3.0", - "once_cell", + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "derive_more 1.0.0", + "jsonwebtoken 9.3.0", + "rand 0.8.5", + "serde", ] [[package]] -name = "async-global-executor-trait" +name = "alloy-rpc-types-eth" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "cfg-if 1.0.0", + "derive_more 1.0.0", + "hashbrown 0.14.5", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98db35cd42c90b484377e6bc44d95377a7a38a5ebee996e67754ac0446d542ab" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-serde" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.5.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.77", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.7", + "serde_json", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-ipc" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fd8491249f74d16ec979b1f5672377b12ebb818e6056478ffa386954dbd350" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9704761f6297fe482276bee7f77a93cb42bd541c2bd6c1c560b6f3a9ece672e" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http 1.1.0", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite 0.23.1", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "amq-protocol" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" +dependencies = [ + "amq-protocol-tcp", + "amq-protocol-types", + "amq-protocol-uri", + "cookie-factory", + "nom", + "serde", +] + +[[package]] +name = "amq-protocol-tcp" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" +dependencies = [ + "amq-protocol-uri", + "tcp-stream", + "tracing", +] + +[[package]] +name = "amq-protocol-types" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" +dependencies = [ + "cookie-factory", + "nom", + "serde", + "serde_json", +] + +[[package]] +name = "amq-protocol-uri" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" +dependencies = [ + "amq-protocol-types", + "percent-encoding", + "url", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[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 = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.1", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel", + "async-executor", + "async-io 2.3.4", + "async-lock 3.4.0", + "blocking", + "futures-lite 2.3.0", + "once_cell", +] + +[[package]] +name = "async-global-executor-trait" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75" @@ -789,7 +1519,7 @@ dependencies = [ "bytes", "cfg-if 1.0.0", "cookie", - "derive_more", + "derive_more 0.99.18", "futures-core", "futures-util", "h2", @@ -814,7 +1544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" dependencies = [ "attohttpc", - "dirs 4.0.0", + "dirs", "rust-ini", "serde", "serde-xml-rs", @@ -844,8 +1574,8 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -854,8 +1584,8 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", - "tower", + "sync_wrapper 0.1.2", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -870,7 +1600,7 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -929,10 +1659,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "bech32" -version = "0.9.1" +name = "bimap" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" [[package]] name = "bincode" @@ -959,7 +1689,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.77", ] @@ -1207,16 +1937,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -1285,24 +2005,29 @@ dependencies = [ ] [[package]] -name = "bzip2" -version = "0.4.4" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ - "bzip2-sys", + "cc", "libc", + "pkg-config", ] [[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "c-kzg" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ + "blst", "cc", + "glob", + "hex", "libc", - "pkg-config", + "once_cell", + "serde", ] [[package]] @@ -1315,38 +2040,6 @@ dependencies = [ "ppv-lite86", ] -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "cbc" version = "0.1.2" @@ -1460,9 +2153,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -1470,9 +2163,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -1482,9 +2175,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1515,7 +2208,7 @@ dependencies = [ "lazy_static", "openssl", "percent-encoding", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "tokio", @@ -1542,58 +2235,6 @@ dependencies = [ "x509-cert", ] -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58 0.5.1", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58 0.5.1", - "digest 0.10.7", - "generic-array 0.14.7", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -1931,15 +2572,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -2003,6 +2635,20 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api 0.4.12", + "once_cell", + "parking_lot_core 0.9.10", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -2047,7 +2693,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid 1.10.0", + "uuid", ] [[package]] @@ -2098,6 +2744,17 @@ dependencies = [ "serde", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive-where" version = "1.2.7" @@ -2133,6 +2790,27 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", + "unicode-xid", +] + [[package]] name = "des" version = "0.8.1" @@ -2178,26 +2856,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys 0.3.7", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", + "dirs-sys", ] [[package]] @@ -2211,29 +2870,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -2263,6 +2899,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + [[package]] name = "dotenv" version = "0.15.0" @@ -2395,15 +3037,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -2418,420 +3051,83 @@ checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if 1.0.0", ] - -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp 0.5.2", - "serde", - "sha3", - "zeroize", -] - -[[package]] -name = "enum-map" -version = "2.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" -dependencies = [ - "enum-map-derive", -] - -[[package]] -name = "enum-map-derive" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "enumset" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" -dependencies = [ - "enumset_derive", -] - -[[package]] -name = "enumset_derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt 0.10.0", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid 0.8.2", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types 0.12.2", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest", - "serde", - "serde_json", - "syn 2.0.77", - "toml 0.8.19", - "walkdir", + +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", ] [[package]] -name = "ethers-contract-derive" -version = "2.0.14" +name = "enum-map-derive" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", "proc-macro2", "quote", - "serde_json", "syn 2.0.77", ] [[package]] -name = "ethers-core" -version = "2.0.14" +name = "enumset" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" dependencies = [ - "arrayvec 0.7.6", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array 0.14.7", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp 0.5.2", - "serde", - "serde_json", - "strum 0.26.3", - "syn 2.0.77", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", + "enumset_derive", ] [[package]] -name = "ethers-etherscan" -version = "2.0.14" +name = "enumset_derive" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" dependencies = [ - "chrono", - "ethers-core", - "reqwest", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", - "tracing", + "darling", + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] -name = "ethers-middleware" -version = "2.0.14" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "ethers-providers" -version = "2.0.14" +name = "errno" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken 8.3.0", - "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite 0.20.1", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", + "errno-dragonfly", + "libc", + "winapi", ] [[package]] -name = "ethers-signers" -version = "2.0.14" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2", - "thiserror", - "tracing", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "ethers-solc" -version = "2.0.14" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "cfg-if 1.0.0", - "const-hex", - "dirs 5.0.1", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver 1.0.23", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi", + "cc", + "libc", ] [[package]] @@ -2901,6 +3197,17 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] + [[package]] name = "ff" version = "0.13.0" @@ -3109,16 +3416,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -3142,16 +3439,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.30" @@ -3170,6 +3457,12 @@ dependencies = [ "slab", ] +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + [[package]] name = "fxhash" version = "0.2.1" @@ -3230,8 +3523,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -3257,18 +3552,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[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 = "group" version = "0.13.0" @@ -3334,15 +3617,7 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", "allocator-api2", -] - -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", + "serde", ] [[package]] @@ -3411,6 +3686,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + [[package]] name = "hmac" version = "0.12.1" @@ -3462,6 +3743,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "httparse" version = "1.9.4" @@ -3486,7 +3790,7 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -3499,17 +3803,22 @@ dependencies = [ ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ + "bytes", + "futures-channel", "futures-util", - "http 0.2.12", - "hyper", - "rustls 0.21.12", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", "tokio", - "tokio-rustls", + "want", ] [[package]] @@ -3518,7 +3827,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3531,10 +3840,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", ] [[package]] @@ -3605,24 +3949,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp 0.5.2", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3721,7 +4047,22 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.0", +] + +[[package]] +name = "interprocess" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", ] [[package]] @@ -3758,18 +4099,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -3820,13 +4161,14 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "8.3.0" +version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ "base64 0.21.7", - "pem 1.1.1", - "ring 0.16.20", + "js-sys", + "pem 3.0.4", + "ring 0.17.8", "serde", "serde_json", "simple_asn1 0.6.2", @@ -3843,7 +4185,6 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", - "signature", ] [[package]] @@ -3856,33 +4197,13 @@ dependencies = [ ] [[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax 0.8.4", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" +name = "keccak-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ - "regex-automata 0.4.7", + "digest 0.10.7", + "sha3-asm", ] [[package]] @@ -4344,7 +4665,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "actix", - "derive_more", + "derive_more 0.99.18", "futures", "near-async-derive", "near-o11y 2.2.1-rc.1", @@ -4441,7 +4762,7 @@ dependencies = [ "anyhow", "bytesize", "chrono", - "derive_more", + "derive_more 0.99.18", "near-config-utils 0.21.2", "near-crypto 0.21.2", "near-parameters 0.21.2", @@ -4463,7 +4784,7 @@ dependencies = [ "anyhow", "bytesize", "chrono", - "derive_more", + "derive_more 0.99.18", "near-config-utils 2.2.1-rc.1", "near-crypto 2.2.1-rc.1", "near-o11y 2.2.1-rc.1", @@ -4501,7 +4822,7 @@ dependencies = [ "actix", "borsh 1.5.1", "chrono", - "derive_more", + "derive_more 0.99.18", "futures", "itertools 0.10.5", "lru 0.12.4", @@ -4548,7 +4869,7 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "derive_more", + "derive_more 0.99.18", "futures", "itertools 0.10.5", "lru 0.12.4", @@ -4579,7 +4900,7 @@ dependencies = [ "rayon", "reed-solomon-erasure 6.0.0", "regex", - "reqwest", + "reqwest 0.11.27", "rust-s3", "serde", "serde_json", @@ -4646,10 +4967,10 @@ checksum = "3d927e95742aea981b9fd60996fbeba3b61e90acafd54c2c3c2a4ed40065ff03" dependencies = [ "blake2 0.9.2", "borsh 1.5.1", - "bs58 0.4.0", + "bs58", "c2-chacha", "curve25519-dalek", - "derive_more", + "derive_more 0.99.18", "ed25519-dalek", "hex", "near-account-id", @@ -4672,9 +4993,9 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "blake2 0.10.6", "borsh 1.5.1", - "bs58 0.4.0", + "bs58", "curve25519-dalek", - "derive_more", + "derive_more 0.99.18", "ed25519-dalek", "hex", "near-account-id", @@ -4831,8 +5152,8 @@ dependencies = [ "actix", "actix-cors", "actix-web", - "bs58 0.4.0", - "derive_more", + "bs58", + "derive_more 0.99.18", "easy-ext", "futures", "hex", @@ -4868,7 +5189,7 @@ dependencies = [ "near-crypto 0.21.2", "near-jsonrpc-primitives 0.21.2", "near-primitives 0.21.2", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "thiserror", @@ -4946,7 +5267,7 @@ dependencies = [ "bytesize", "chrono", "crossbeam-channel", - "derive_more", + "derive_more 0.99.18", "enum-map", "futures", "futures-util", @@ -5124,7 +5445,7 @@ dependencies = [ "bytesize", "cfg-if 1.0.0", "chrono", - "derive_more", + "derive_more 0.99.18", "easy-ext", "enum-map", "hex", @@ -5166,7 +5487,7 @@ dependencies = [ "bytesize", "cfg-if 1.0.0", "chrono", - "derive_more", + "derive_more 0.99.18", "easy-ext", "enum-map", "hex", @@ -5194,7 +5515,7 @@ dependencies = [ "strum 0.24.1", "thiserror", "tracing", - "zstd 0.13.2", + "zstd", ] [[package]] @@ -5206,8 +5527,8 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58 0.4.0", - "derive_more", + "bs58", + "derive_more 0.99.18", "enum-map", "near-account-id", "num-rational", @@ -5227,8 +5548,8 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58 0.4.0", - "derive_more", + "bs58", + "derive_more 0.99.18", "enum-map", "near-account-id", "near-structs-checker-lib", @@ -5249,7 +5570,7 @@ dependencies = [ "actix-http", "actix-web", "awc", - "derive_more", + "derive_more 0.99.18", "futures", "hex", "near-account-id", @@ -5336,7 +5657,7 @@ dependencies = [ "bytesize", "crossbeam", "derive-where", - "derive_more", + "derive_more 0.99.18", "enum-map", "hex", "itertools 0.10.5", @@ -5742,12 +6063,12 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "dirs 4.0.0", + "dirs", "easy-ext", "futures", "hex", - "hyper", - "hyper-tls", + "hyper 0.14.30", + "hyper-tls 0.5.0", "indicatif", "near-async", "near-chain", @@ -5778,7 +6099,7 @@ dependencies = [ "rand 0.8.5", "rayon", "regex", - "reqwest", + "reqwest 0.11.27", "rlimit", "rust-s3", "serde", @@ -5793,12 +6114,6 @@ dependencies = [ "xz2", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nix" version = "0.15.0" @@ -5973,7 +6288,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.77", @@ -6027,31 +6341,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec 0.7.6", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.66" @@ -6228,12 +6517,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - [[package]] name = "ordered-float" version = "4.2.2" @@ -6483,41 +6766,12 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac", - "password-hash", - "sha2", -] - [[package]] name = "pbkdf2" version = "0.12.2" @@ -6547,11 +6801,12 @@ dependencies = [ [[package]] name = "pem" -version = "1.1.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", + "serde", ] [[package]] @@ -6569,6 +6824,17 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.5" @@ -6589,57 +6855,6 @@ dependencies = [ "rustc_version 0.4.1", ] -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.5" @@ -6719,8 +6934,8 @@ dependencies = [ "aes", "cbc", "der", - "pbkdf2 0.12.2", - "scrypt 0.11.0", + "pbkdf2", + "scrypt", "sha2", "spki", ] @@ -6787,12 +7002,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "prefix-sum-vec" version = "0.1.2" @@ -6827,9 +7036,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -6875,6 +7081,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -6905,6 +7133,8 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ + "bit-set", + "bit-vec", "bitflags 2.6.0", "lazy_static", "num-traits", @@ -6912,6 +7142,8 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.4", + "rusty-fork", + "tempfile", "unarray", ] @@ -7088,6 +7320,12 @@ dependencies = [ "parity-wasm 0.41.0", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" version = "1.0.37" @@ -7243,6 +7481,12 @@ dependencies = [ "futures-io", ] +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" version = "0.1.57" @@ -7308,7 +7552,7 @@ checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", - "rustc-hash", + "rustc-hash 1.1.0", "slice-group-by", "smallvec", ] @@ -7379,14 +7623,24 @@ dependencies = [ name = "relayer-rs" version = "0.1.0" dependencies = [ + "alloy", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-transport-ws", "anyhow", - "ethers", + "bincode", + "clap", + "eyre", + "futures-util", "near-da-primitives", "near-da-rpc", "prometheus", - "rlp 0.6.1", "serde", "serde_json", + "serde_yaml", + "tempfile", "tokio", "tracing", "tracing-subscriber", @@ -7415,10 +7669,9 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -7427,16 +7680,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", "tokio-util 0.7.12", "tower-service", "url", @@ -7444,10 +7695,48 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.3", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -7512,7 +7801,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.10.0", + "uuid", ] [[package]] @@ -7542,40 +7831,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] [[package]] -name = "rlp" -version = "0.6.1" +name = "rocksdb" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24e92bb2a83198bb76d661a71df9f7076b8c420b8696e4d3d97d50d94479e3" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ - "bytes", - "rustc-hex", + "libc", + "librocksdb-sys", ] [[package]] -name = "rlp-derive" -version = "0.1.0" +name = "ruint" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.6", + "num-traits", + "parity-scale-codec", + "primitive-types 0.12.2", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", ] [[package]] -name = "rocksdb" -version = "0.21.0" +name = "ruint-macro" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-ini" @@ -7607,7 +7904,7 @@ dependencies = [ "md5", "minidom", "percent-encoding", - "reqwest", + "reqwest 0.11.27", "serde", "serde-xml-rs", "serde_derive", @@ -7631,6 +7928,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -7646,6 +7949,15 @@ dependencies = [ "semver 0.9.0", ] +[[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.1" @@ -7691,18 +8003,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.13" @@ -7712,7 +8012,7 @@ dependencies = [ "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] @@ -7724,10 +8024,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", - "rustls 0.23.13", + "rustls", "rustls-native-certs", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", ] [[package]] @@ -7768,16 +8068,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -7793,7 +8083,19 @@ dependencies = [ name = "rustversion" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] [[package]] name = "rxml" @@ -7827,39 +8129,6 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" -dependencies = [ - "cfg-if 1.0.0", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" -dependencies = [ - "proc-macro-crate 3.2.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "schannel" version = "0.1.24" @@ -7881,39 +8150,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - [[package]] name = "scrypt" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2 0.12.2", + "pbkdf2", "salsa20", "sha2", ] -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "seahash" version = "4.1.0" @@ -7982,18 +8229,24 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] name = "semver" -version = "1.0.23" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "serde", + "semver-parser 0.10.2", ] +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "semver-parser" version = "0.7.0" @@ -8001,10 +8254,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] -name = "send_wrapper" -version = "0.4.0" +name = "semver-parser" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "send_wrapper" @@ -8191,6 +8447,16 @@ dependencies = [ "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if 1.0.0", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -8254,12 +8520,6 @@ dependencies = [ "time", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "sized-chunks" version = "0.6.5" @@ -8333,20 +8593,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "solang-parser" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" -dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", -] - [[package]] name = "spin" version = "0.5.2" @@ -8390,19 +8636,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.3", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "strsim" version = "0.11.1" @@ -8478,26 +8711,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "svm-rs" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" -dependencies = [ - "dirs 5.0.1", - "fs2", - "hex", - "once_cell", - "reqwest", - "semver 1.0.23", - "serde", - "serde_json", - "sha2", - "thiserror", - "url", - "zip", -] - [[package]] name = "syn" version = "1.0.109" @@ -8520,6 +8733,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "syn_derive" version = "0.1.8" @@ -8538,6 +8763,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.13.1" @@ -8628,17 +8862,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - [[package]] name = "thiserror" version = "1.0.63" @@ -8830,11 +9053,12 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.21.12", + "rustls", + "rustls-pki-types", "tokio", ] @@ -8847,33 +9071,35 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util 0.7.12", ] [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", - "rustls 0.21.12", "tokio", - "tokio-rustls", - "tungstenite 0.20.1", - "webpki-roots", + "tungstenite 0.21.0", ] [[package]] name = "tokio-tungstenite" -version = "0.21.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", + "rustls", + "rustls-pki-types", "tokio", - "tungstenite 0.21.0", + "tokio-rustls", + "tungstenite 0.23.0", + "webpki-roots", ] [[package]] @@ -8960,8 +9186,8 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", @@ -8970,7 +9196,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util 0.6.10", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -8990,15 +9216,15 @@ dependencies = [ "bytes", "h2", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", "prost 0.12.6", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -9036,6 +9262,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -9183,18 +9423,17 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http 0.2.12", + "http 1.1.0", "httparse", "log", "rand 0.8.5", - "rustls 0.21.12", "sha1", "thiserror", "url", @@ -9203,9 +9442,9 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" dependencies = [ "byteorder", "bytes", @@ -9214,9 +9453,10 @@ dependencies = [ "httparse", "log", "rand 0.8.5", + "rustls", + "rustls-pki-types", "sha1", "thiserror", - "url", "utf-8", ] @@ -9226,6 +9466,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[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" @@ -9339,16 +9585,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.15", - "serde", -] - [[package]] name = "uuid" version = "1.10.0" @@ -9380,20 +9616,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "waker-fn" -version = "1.2.0" +name = "wait-timeout" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] [[package]] -name = "walkdir" -version = "2.5.0" +name = "waker-fn" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "want" @@ -9415,7 +9650,7 @@ dependencies = [ "futures-util", "headers", "http 0.2.12", - "hyper", + "hyper 0.14.30", "log", "mime", "mime_guess", @@ -9990,9 +10225,12 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.4" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "webrtc-util" @@ -10027,6 +10265,12 @@ dependencies = [ "rustix 0.38.37", ] +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "wildmatch" version = "2.3.4" @@ -10049,15 +10293,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -10073,6 +10308,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -10252,7 +10517,7 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.1", - "send_wrapper 0.6.0", + "send_wrapper", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -10372,52 +10637,13 @@ dependencies = [ "rustc-hex", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.2.1", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index 2f443fcc..fa823fa5 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -1,18 +1,26 @@ -#[derive(Clone, Deserialize)] +use std::collections::HashMap; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Deserialize, Serialize)] pub struct NodeConfig { + /// Used to set the logger level (true = info, false = debug) pub production: bool, + pub operator_address: String, + pub operator_state_retriever_address: String, + pub avs_registry_coordinator_address: String, + pub token_strategy_addr: String, pub eth_rpc_url: String, pub eth_ws_url: String, - pub operator_address: String, pub bls_private_key_store_path: String, pub ecdsa_private_key_store_path: String, - pub avs_registry_coordinator_address: String, - pub operator_state_retriever_address: String, pub aggregator_server_ip_port_address: String, - pub enable_metrics: bool, - pub eigen_metrics_ip_port_address: Option, - pub node_api_ip_port_address: Option, - pub task_response_wait_ms: u64, pub register_operator_on_startup: bool, - pub token_strategy_addr: Option, -} + pub eigen_metrics_ip_port_address: String, + pub enable_metrics: bool, + pub node_api_ip_port_address: String, + pub enable_node_api: bool, + pub near_da_indexer_rmq_ip_port_address: String, + pub near_da_indexer_rollup_ids: Vec, + pub rollup_ids_to_rpc_urls: HashMap, + pub task_response_wait_ms: u32, +} \ No newline at end of file From 3b9760d3c87efa537ee0dd2dc27da493705ea070 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 28 Sep 2024 10:19:14 +0200 Subject: [PATCH 20/96] wip: fastnear block listener --- Cargo.lock | 325 ++++++++++++++++++++------------ indexer/Cargo.toml | 4 + indexer/src/fastnear_indexer.rs | 3 + indexer/src/indexer_wrapper.rs | 12 +- indexer/src/main.rs | 1 + 5 files changed, 221 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec58b2d7..8c6560e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,7 +79,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2", + "h2 0.3.26", "http 0.2.12", "httparse", "httpdate", @@ -105,7 +105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -244,7 +244,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -255,7 +255,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -683,7 +683,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -839,7 +839,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -856,7 +856,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "syn-solidity", "tiny-keccak", ] @@ -874,7 +874,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.77", + "syn 2.0.79", "syn-solidity", ] @@ -974,9 +974,9 @@ dependencies = [ [[package]] name = "amq-protocol" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" +checksum = "e3a41c091e49edfcc098b4f90d4d7706a8cf9158034e84ebfee7ff346092f67c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -988,9 +988,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" +checksum = "3ed7a4a662472f88823ed2fc81babb0b00562f2c54284e3e7bffc02b6df649bf" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -999,9 +999,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" +checksum = "bd6484fdc918c1b6e2ae8eda2914d19a5873e1975f93ad8d33d6a24d1d98df05" dependencies = [ "cookie-factory", "nom", @@ -1011,9 +1011,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" +checksum = "7f7f2da69e0e1182765bf33407cd8a843f20791b5af2b57a2645818c4776c56c" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -1271,7 +1271,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "synstructure", ] @@ -1283,7 +1283,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1433,7 +1433,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1444,13 +1444,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1494,14 +1494,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "awc" @@ -1522,7 +1522,7 @@ dependencies = [ "derive_more 0.99.18", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "itoa", "log", @@ -1691,7 +1691,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1884,7 +1884,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "syn_derive", ] @@ -1979,9 +1979,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -2063,16 +2063,16 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.77", + "syn 2.0.79", "tempfile", "toml 0.8.19", ] [[package]] name = "cc" -version = "1.1.19" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" dependencies = [ "jobserver", "libc", @@ -2182,7 +2182,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2597,7 +2597,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2621,7 +2621,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2632,7 +2632,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2731,7 +2731,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2763,7 +2763,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2774,7 +2774,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2787,7 +2787,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2807,7 +2807,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "unicode-xid", ] @@ -2878,7 +2878,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3069,7 +3069,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3090,7 +3090,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3275,9 +3275,9 @@ checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -3424,7 +3424,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3582,6 +3582,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.5.0", + "slab", + "tokio", + "tokio-util 0.7.12", + "tracing", +] + [[package]] name = "hashbrown" version = "0.11.2" @@ -3788,7 +3807,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -3811,6 +3830,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -3821,6 +3841,23 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.4.1" @@ -3986,6 +4023,7 @@ dependencies = [ "near-o11y 2.2.1-rc.1", "openssl-probe", "prometheus", + "reqwest 0.12.7", "serde", "serde_json", "serde_yaml", @@ -4176,9 +4214,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if 1.0.0", "ecdsa", @@ -4257,9 +4295,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -4409,9 +4447,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.11.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb44a01837a858d47e5a630d2ccf304c8efcc4b83b8f9f75b7a9ee4fcc6e57d" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -4469,7 +4507,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4686,7 +4724,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5042,7 +5080,7 @@ dependencies = [ "tokio", "tracing", "url", - "which", + "which 6.0.3", ] [[package]] @@ -5417,7 +5455,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5599,7 +5637,7 @@ checksum = "3610517a56329b7cce0c8c4cf2686fc4bbe0b155181b118acf20d2a301bf29b6" dependencies = [ "quote", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5609,7 +5647,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "quote", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5621,7 +5659,7 @@ dependencies = [ "fs2", "near-rpc-error-core 0.21.2", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -5631,7 +5669,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "near-rpc-error-core 2.2.1-rc.1", "serde", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6290,7 +6328,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6364,7 +6402,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6519,9 +6557,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" dependencies = [ "borsh 1.5.1", "num-traits", @@ -6761,7 +6799,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.6", "smallvec", "windows-targets 0.52.6", ] @@ -6872,7 +6910,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -6952,9 +6990,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" @@ -7015,7 +7053,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -7100,7 +7138,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -7184,7 +7222,7 @@ dependencies = [ "prost-types", "regex", "tempfile", - "which", + "which 4.4.2", ] [[package]] @@ -7210,7 +7248,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -7268,7 +7306,7 @@ dependencies = [ "protobuf-support", "tempfile", "thiserror", - "which", + "which 4.4.2", ] [[package]] @@ -7504,9 +7542,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" dependencies = [ "bitflags 2.6.0", ] @@ -7667,7 +7705,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", @@ -7685,7 +7723,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", - "system-configuration", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", "tokio-util 0.7.12", @@ -7706,12 +7744,15 @@ checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", "hyper 1.4.1", + "hyper-rustls", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -7727,6 +7768,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", "tower-service", @@ -8064,9 +8106,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -8215,9 +8257,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -8316,7 +8358,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8348,14 +8390,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -8399,7 +8441,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8493,9 +8535,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" @@ -8683,7 +8725,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8724,9 +8766,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -8742,7 +8784,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8754,7 +8796,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8780,7 +8822,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -8806,7 +8848,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -8819,6 +8872,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -8864,22 +8927,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -9013,7 +9076,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -9161,9 +9224,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.5.0", "serde", @@ -9184,7 +9247,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", @@ -9214,7 +9277,7 @@ dependencies = [ "axum", "base64 0.21.7", "bytes", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", @@ -9320,7 +9383,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -9513,9 +9576,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -9528,9 +9591,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" @@ -9702,7 +9765,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -9736,7 +9799,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9767,9 +9830,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -10194,7 +10257,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -10265,6 +10328,18 @@ dependencies = [ "rustix 0.38.37", ] +[[package]] +name = "which" +version = "6.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +dependencies = [ + "either", + "home", + "rustix 0.38.37", + "winsafe", +] + [[package]] name = "widestring" version = "1.1.0" @@ -10488,9 +10563,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -10505,6 +10580,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -10600,7 +10681,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -10620,7 +10701,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] diff --git a/indexer/Cargo.toml b/indexer/Cargo.toml index 5591fee0..35a561c4 100644 --- a/indexer/Cargo.toml +++ b/indexer/Cargo.toml @@ -30,8 +30,12 @@ near-indexer = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e near-client = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-o11y = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-client-primitives = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } +reqwest = { version = "0.12.7", features = ["json"] } borsh = { version = "1.0.0", features = ["derive", "rc"] } serde_yaml = "0.9.34" [dev-dependencies] near-crypto = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } + +[features] +use_fastnear = [] diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index bb39901d..1daf85a7 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -20,6 +20,7 @@ impl FastNearIndexer { } pub fn stream_latest_blocks(&self) -> mpsc::Receiver { + println!("Starting to stream latest blocks"); let (sender, receiver) = mpsc::channel(100); let client = self.client.clone(); @@ -28,7 +29,9 @@ impl FastNearIndexer { match client.get(FASTNEAR_ENDPOINT).send().await { Ok(response) => { if let Ok(block) = response.json::().await { + println!("Received block: {:?}", block); if sender.send(block).await.is_err() { + println!("Error sending block to channel"); break; } } diff --git a/indexer/src/indexer_wrapper.rs b/indexer/src/indexer_wrapper.rs index 540905f4..c39750fd 100644 --- a/indexer/src/indexer_wrapper.rs +++ b/indexer/src/indexer_wrapper.rs @@ -4,20 +4,23 @@ use std::collections::HashMap; use tokio::{sync::mpsc::Receiver, task::JoinHandle}; use crate::{block_listener::BlockListener, errors::Result, metrics::Metricable, types}; +use crate::fastnear_indexer::FastNearIndexer; pub struct IndexerWrapper { indexer: near_indexer::Indexer, block_listener: BlockListener, + fastnear_indexer: FastNearIndexer, } impl IndexerWrapper { pub fn new(config: near_indexer::IndexerConfig, addresses_to_rollup_ids: HashMap) -> Self { let indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); let block_listener = BlockListener::new(addresses_to_rollup_ids); - + let fastnear_indexer = FastNearIndexer::new(); Self { indexer, block_listener, + fastnear_indexer, } } @@ -31,7 +34,12 @@ impl IndexerWrapper { } pub fn run(self) -> (JoinHandle<()>, Receiver) { - let indexer_stream = self.indexer.streamer(); + // let indexer_stream = if cfg!(feature = "use_fastnear") { + // self.fastnear_indexer.stream_latest_blocks() + // } else { + // self.indexer.streamer() + // }; + let indexer_stream = self.fastnear_indexer.stream_latest_blocks(); self.block_listener.run(indexer_stream) } } diff --git a/indexer/src/main.rs b/indexer/src/main.rs index feeb98fc..0a5bd5a3 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -17,6 +17,7 @@ mod metrics; mod metrics_server; mod rmq_publisher; mod types; +mod fastnear_indexer; const INDEXER: &str = "indexer"; From 09d10543a2a3b96eef42a1e38c40ac0873b3f8a2 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sat, 28 Sep 2024 11:01:13 +0200 Subject: [PATCH 21/96] wip: tracing and get last final block --- Cargo.lock | 246 +++++++++++++++----------------- indexer/src/fastnear_indexer.rs | 21 ++- indexer/src/main.rs | 2 +- 3 files changed, 125 insertions(+), 144 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c6560e7..708ed878 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,7 +105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -244,7 +244,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -255,7 +255,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -683,7 +683,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -839,7 +839,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -856,7 +856,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "syn-solidity", "tiny-keccak", ] @@ -874,7 +874,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.79", + "syn 2.0.77", "syn-solidity", ] @@ -974,9 +974,9 @@ dependencies = [ [[package]] name = "amq-protocol" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a41c091e49edfcc098b4f90d4d7706a8cf9158034e84ebfee7ff346092f67c" +checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -988,9 +988,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed7a4a662472f88823ed2fc81babb0b00562f2c54284e3e7bffc02b6df649bf" +checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -999,9 +999,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6484fdc918c1b6e2ae8eda2914d19a5873e1975f93ad8d33d6a24d1d98df05" +checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" dependencies = [ "cookie-factory", "nom", @@ -1011,9 +1011,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7f2da69e0e1182765bf33407cd8a843f20791b5af2b57a2645818c4776c56c" +checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -1271,7 +1271,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "synstructure", ] @@ -1283,7 +1283,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1433,7 +1433,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1444,13 +1444,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1494,14 +1494,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "awc" @@ -1691,7 +1691,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1884,7 +1884,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "syn_derive", ] @@ -1979,9 +1979,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -2063,16 +2063,16 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.79", + "syn 2.0.77", "tempfile", "toml 0.8.19", ] [[package]] name = "cc" -version = "1.1.22" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" dependencies = [ "jobserver", "libc", @@ -2182,7 +2182,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2597,7 +2597,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2621,7 +2621,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2632,7 +2632,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2731,7 +2731,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2763,7 +2763,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2774,7 +2774,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2787,7 +2787,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2807,7 +2807,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "unicode-xid", ] @@ -2878,7 +2878,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -3069,7 +3069,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -3090,7 +3090,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -3275,9 +3275,9 @@ checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -3424,7 +3424,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -4214,9 +4214,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if 1.0.0", "ecdsa", @@ -4295,9 +4295,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -4447,9 +4447,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.11.1+lz4-1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +checksum = "fcb44a01837a858d47e5a630d2ccf304c8efcc4b83b8f9f75b7a9ee4fcc6e57d" dependencies = [ "cc", "libc", @@ -4507,7 +4507,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -4724,7 +4724,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5080,7 +5080,7 @@ dependencies = [ "tokio", "tracing", "url", - "which 6.0.3", + "which", ] [[package]] @@ -5455,7 +5455,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5637,7 +5637,7 @@ checksum = "3610517a56329b7cce0c8c4cf2686fc4bbe0b155181b118acf20d2a301bf29b6" dependencies = [ "quote", "serde", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5647,7 +5647,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "quote", "serde", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5659,7 +5659,7 @@ dependencies = [ "fs2", "near-rpc-error-core 0.21.2", "serde", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5669,7 +5669,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "near-rpc-error-core 2.2.1-rc.1", "serde", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6328,7 +6328,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6402,7 +6402,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6557,9 +6557,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.3.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" +checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "borsh 1.5.1", "num-traits", @@ -6799,7 +6799,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.6", + "redox_syscall 0.5.4", "smallvec", "windows-targets 0.52.6", ] @@ -6910,7 +6910,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6990,9 +6990,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" @@ -7053,7 +7053,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -7138,7 +7138,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -7222,7 +7222,7 @@ dependencies = [ "prost-types", "regex", "tempfile", - "which 4.4.2", + "which", ] [[package]] @@ -7248,7 +7248,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -7306,7 +7306,7 @@ dependencies = [ "protobuf-support", "tempfile", "thiserror", - "which 4.4.2", + "which", ] [[package]] @@ -7542,9 +7542,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -8106,9 +8106,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -8257,9 +8257,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -8358,7 +8358,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8390,14 +8390,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -8441,7 +8441,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8535,9 +8535,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple_asn1" @@ -8725,7 +8725,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8766,9 +8766,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -8784,7 +8784,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8796,7 +8796,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8822,7 +8822,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8927,22 +8927,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9076,7 +9076,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9224,9 +9224,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap 2.5.0", "serde", @@ -9383,7 +9383,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9576,9 +9576,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -9591,9 +9591,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -9765,7 +9765,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -9799,7 +9799,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9830,9 +9830,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -10257,7 +10257,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -10328,18 +10328,6 @@ dependencies = [ "rustix 0.38.37", ] -[[package]] -name = "which" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" -dependencies = [ - "either", - "home", - "rustix 0.38.37", - "winsafe", -] - [[package]] name = "widestring" version = "1.1.0" @@ -10563,9 +10551,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -10580,12 +10568,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winsafe" -version = "0.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" - [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -10681,7 +10663,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -10701,7 +10683,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 1daf85a7..c2a528e8 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -1,11 +1,9 @@ use reqwest::Client; use tokio::sync::mpsc; use near_indexer::StreamerMessage; -// const VERSION: &str = "v0"; -// const NETWORK: &str = "testnet"; -// const HEIGHT: u64 = 100000000; -// const LATEST: bool = true; -const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/block/latest"; +use tracing::{info, error}; + +const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; #[derive(Debug)] pub struct FastNearIndexer { @@ -20,23 +18,24 @@ impl FastNearIndexer { } pub fn stream_latest_blocks(&self) -> mpsc::Receiver { - println!("Starting to stream latest blocks"); let (sender, receiver) = mpsc::channel(100); let client = self.client.clone(); tokio::spawn(async move { loop { - match client.get(FASTNEAR_ENDPOINT).send().await { + match client.get(FASTNEAR_ENDPOINT).send().await.and_then(|resp| resp.error_for_status()) { Ok(response) => { if let Ok(block) = response.json::().await { - println!("Received block: {:?}", block); - if sender.send(block).await.is_err() { - println!("Error sending block to channel"); + if sender.send(block.clone()).await.is_err() { + error!(target: "fastnear_indexer", "Failed to send block to channel"); break; } + info!(target: "fastnear_indexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); + } else { + error!(target: "fastnear_indexer", "Failed to deserialize response into StreamerMessage"); } } - Err(e) => eprintln!("Error fetching latest block: {:?}", e), + Err(e) => error!(target: "fastnear_indexer", "Error fetching latest block: {:?}", e), } tokio::time::sleep(std::time::Duration::from_secs(1)).await; } diff --git a/indexer/src/main.rs b/indexer/src/main.rs index 0a5bd5a3..cb85a144 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -102,7 +102,7 @@ fn main() -> Result<()> { let env_filter = near_o11y::tracing_subscriber::EnvFilter::new( "nearcore=info,publisher=info,indexer=info,candidates_validator=info,\ metrics=info,tokio_reactor=info,near=info,stats=info,telemetry=info,\ - near-performance-metrics=info", + near-performance-metrics=info,fastnear_indexer=info", ); let _subscriber = near_o11y::default_subscriber(env_filter, &Default::default()).global(); let opts: Opts = Opts::parse(); From a02cbea6c3d1aa7a4a4cbd733ced22ba0eb82cd7 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sat, 28 Sep 2024 11:07:09 +0200 Subject: [PATCH 22/96] wip: makefile and cfg feature --- Makefile | 4 ++++ indexer/src/indexer_wrapper.rs | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 834bd035..3daa3625 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,10 @@ start-indexer: ## cargo run -p indexer --release -- --home-dir ~/.near/localnet init --chain-id localnet cargo run -p indexer --release -- --home-dir ~/.near/localnet run --da-contract-ids da.test.near --rollup-ids 2 --rmq-address "amqp://127.0.0.1:5672" +start-indexer-with-fastnear: ## + cargo run --features use_fastnear -p indexer --release -- --home-dir ~/.near/localnet init --chain-id localnet + cargo run --features use_fastnear -p indexer --release -- --home-dir ~/.near/localnet run --da-contract-ids da.test.near --rollup-ids 2 --rmq-address "amqp://127.0.0.1:5672" + start-test-relayer: ## CGO_LDFLAGS="-L ./relayer/libs ${CGO_LDFLAGS}" go run relayer/cmd/main.go run-args --rpc-url ws://127.0.0.1:8546 --da-account-id da.test.near --key-path ~/.near-credentials/localnet/da.test.near.json diff --git a/indexer/src/indexer_wrapper.rs b/indexer/src/indexer_wrapper.rs index c39750fd..4fee6770 100644 --- a/indexer/src/indexer_wrapper.rs +++ b/indexer/src/indexer_wrapper.rs @@ -34,12 +34,11 @@ impl IndexerWrapper { } pub fn run(self) -> (JoinHandle<()>, Receiver) { - // let indexer_stream = if cfg!(feature = "use_fastnear") { - // self.fastnear_indexer.stream_latest_blocks() - // } else { - // self.indexer.streamer() - // }; - let indexer_stream = self.fastnear_indexer.stream_latest_blocks(); + let indexer_stream = if cfg!(feature = "use_fastnear") { + self.fastnear_indexer.stream_latest_blocks() + } else { + self.indexer.streamer() + }; self.block_listener.run(indexer_stream) } } From ce3fce426ce8f5ff1516d9590c5103d0c072b57d Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sat, 28 Sep 2024 12:56:28 +0200 Subject: [PATCH 23/96] wip: add fastnear types --- indexer/src/types.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/indexer/src/types.rs b/indexer/src/types.rs index 7552b95e..8a0fb566 100644 --- a/indexer/src/types.rs +++ b/indexer/src/types.rs @@ -2,6 +2,7 @@ use std::collections::VecDeque; use std::fmt::Formatter; use std::{fmt, sync}; use tokio::sync::Mutex; +use near_indexer::{near_primitives::{hash::CryptoHash, types::ShardId, views::{BlockView, ExecutionOutcomeWithIdView, ReceiptView, StateChangeWithCauseView}}, IndexerChunkView, StreamerMessage}; pub(crate) type ProtectedQueue = sync::Arc>>; @@ -12,6 +13,28 @@ pub(crate) struct CandidateData { pub payloads: Vec>, } +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] +pub struct BlockWithTxHashes { + pub block: BlockView, + pub shards: Vec, +} + +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] +pub struct IndexerShardWithTxHashes { + pub shard_id: ShardId, + pub chunk: Option, + pub receipt_execution_outcomes: Vec, + pub state_changes: Vec, +} + +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] +pub struct IndexerExecutionOutcomeWithReceiptAndTxHash { + pub execution_outcome: ExecutionOutcomeWithIdView, + pub receipt: ReceiptView, + pub tx_hash: Option, +} + + impl fmt::Display for CandidateData { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.write_fmt(format_args!( From 00d88c9f4bf4ef9eb0f66e74d13e657721e9df2c Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sat, 28 Sep 2024 13:31:04 +0200 Subject: [PATCH 24/96] broken: indexstreamer type, block_listner edits --- indexer/src/block_listener.rs | 21 ++++++++++----- indexer/src/errors.rs | 2 ++ indexer/src/fastnear_indexer.rs | 9 ++++--- indexer/src/indexer_wrapper.rs | 46 +++++++++++++++++++++------------ indexer/src/types.rs | 19 ++++++++++++++ 5 files changed, 72 insertions(+), 25 deletions(-) diff --git a/indexer/src/block_listener.rs b/indexer/src/block_listener.rs index a9a6c643..1937bd3c 100644 --- a/indexer/src/block_listener.rs +++ b/indexer/src/block_listener.rs @@ -17,8 +17,7 @@ use tracing::info; use crate::{ errors::Result, metrics::{make_block_listener_metrics, BlockEventListener, Metricable}, - types, - types::CandidateData, + types::{self, CandidateData, IndexerStream}, INDEXER, }; @@ -240,11 +239,21 @@ impl BlockListener { } /// Filters indexer stream and returns receiving channel. - pub(crate) fn run(&self, indexer_stream: Receiver) -> (JoinHandle<()>, Receiver) { - let (candidates_sender, candidates_receiver) = mpsc::channel(1000); - let handle = actix::spawn(Self::process_stream(self.clone(), indexer_stream, candidates_sender)); + pub(crate) fn run(&self, indexer_stream: IndexerStream) -> (JoinHandle<()>, Receiver) { + match indexer_stream { + IndexerStream::BlockWithTxHashes(streamer) => { + let (candidates_sender, candidates_receiver) = mpsc::channel(1000); + let handle = actix::spawn(Self::process_stream(self.clone(), streamer, candidates_sender)); - (handle, candidates_receiver) + (handle, candidates_receiver) + } + IndexerStream::StreamerMessage(receiver) => { + let (candidates_sender, candidates_receiver) = mpsc::channel(1000); + let handle = actix::spawn(Self::process_stream(self.clone(), receiver, candidates_sender)); + + (handle, candidates_receiver) + } + } } #[cfg(test)] diff --git a/indexer/src/errors.rs b/indexer/src/errors.rs index 74bb65db..45b18b4a 100644 --- a/indexer/src/errors.rs +++ b/indexer/src/errors.rs @@ -30,6 +30,8 @@ pub enum Error { ActixErrorKind(std::io::ErrorKind), #[error{"0"}] JoinError(#[from] tokio::task::JoinError), + #[error("Indexer not initialized")] + IndexerNotInitialized, } impl From> for Error { diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index c2a528e8..93f2688a 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -1,15 +1,18 @@ use reqwest::Client; use tokio::sync::mpsc; -use near_indexer::StreamerMessage; use tracing::{info, error}; +use crate::types::BlockWithTxHashes; + const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; + #[derive(Debug)] pub struct FastNearIndexer { client: Client, } + impl FastNearIndexer { pub fn new() -> Self { FastNearIndexer { @@ -17,7 +20,7 @@ impl FastNearIndexer { } } - pub fn stream_latest_blocks(&self) -> mpsc::Receiver { + pub fn stream_latest_blocks(&self) -> mpsc::Receiver { let (sender, receiver) = mpsc::channel(100); let client = self.client.clone(); @@ -25,7 +28,7 @@ impl FastNearIndexer { loop { match client.get(FASTNEAR_ENDPOINT).send().await.and_then(|resp| resp.error_for_status()) { Ok(response) => { - if let Ok(block) = response.json::().await { + if let Ok(block) = response.json::().await { if sender.send(block.clone()).await.is_err() { error!(target: "fastnear_indexer", "Failed to send block to channel"); break; diff --git a/indexer/src/indexer_wrapper.rs b/indexer/src/indexer_wrapper.rs index 4fee6770..9cac9558 100644 --- a/indexer/src/indexer_wrapper.rs +++ b/indexer/src/indexer_wrapper.rs @@ -1,26 +1,35 @@ use near_indexer::near_primitives::types::AccountId; use prometheus::Registry; use std::collections::HashMap; -use tokio::{sync::mpsc::Receiver, task::JoinHandle}; - +use tokio::{task::JoinHandle, sync::mpsc::Receiver}; use crate::{block_listener::BlockListener, errors::Result, metrics::Metricable, types}; use crate::fastnear_indexer::FastNearIndexer; - +use types::IndexerStream; pub struct IndexerWrapper { - indexer: near_indexer::Indexer, + indexer: Option, block_listener: BlockListener, - fastnear_indexer: FastNearIndexer, + fastnear_indexer: Option, } impl IndexerWrapper { pub fn new(config: near_indexer::IndexerConfig, addresses_to_rollup_ids: HashMap) -> Self { - let indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); - let block_listener = BlockListener::new(addresses_to_rollup_ids); - let fastnear_indexer = FastNearIndexer::new(); - Self { - indexer, - block_listener, - fastnear_indexer, + if cfg!(feature = "use_fastnear") { + let indexer: near_indexer::Indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); + let block_listener = BlockListener::new(addresses_to_rollup_ids); + let fastnear_indexer = FastNearIndexer::new(); + Self { + indexer: Some(indexer), + block_listener, + fastnear_indexer: Some(fastnear_indexer), + } + } else { + let indexer: near_indexer::Indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); + let block_listener = BlockListener::new(addresses_to_rollup_ids); + Self { + indexer: Some(indexer), + block_listener, + fastnear_indexer: None, + } } } @@ -30,14 +39,19 @@ impl IndexerWrapper { actix::Addr, actix::Addr, ) { - self.indexer.client_actors() + //TODO: handle error + if let Some(indexer) = &self.indexer { + indexer.client_actors() + } else { + panic!("Indexer not initialized") + } } pub fn run(self) -> (JoinHandle<()>, Receiver) { - let indexer_stream = if cfg!(feature = "use_fastnear") { - self.fastnear_indexer.stream_latest_blocks() + let indexer_stream: IndexerStream = if cfg!(feature = "use_fastnear") { + self.fastnear_indexer.unwrap().stream_latest_blocks().into() } else { - self.indexer.streamer() + self.indexer.unwrap().streamer().into() }; self.block_listener.run(indexer_stream) } diff --git a/indexer/src/types.rs b/indexer/src/types.rs index 8a0fb566..dbd6d59d 100644 --- a/indexer/src/types.rs +++ b/indexer/src/types.rs @@ -3,6 +3,7 @@ use std::fmt::Formatter; use std::{fmt, sync}; use tokio::sync::Mutex; use near_indexer::{near_primitives::{hash::CryptoHash, types::ShardId, views::{BlockView, ExecutionOutcomeWithIdView, ReceiptView, StateChangeWithCauseView}}, IndexerChunkView, StreamerMessage}; +use tokio::sync::mpsc::Receiver; pub(crate) type ProtectedQueue = sync::Arc>>; @@ -27,6 +28,24 @@ pub struct IndexerShardWithTxHashes { pub state_changes: Vec, } + +pub enum IndexerStream { + StreamerMessage(Receiver), + BlockWithTxHashes(Receiver), +} + +impl From> for IndexerStream { + fn from(value: Receiver) -> Self { + IndexerStream::StreamerMessage(value) + } +} + +impl From> for IndexerStream { + fn from(value: Receiver) -> Self { + IndexerStream::BlockWithTxHashes(value) + } +} + #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IndexerExecutionOutcomeWithReceiptAndTxHash { pub execution_outcome: ExecutionOutcomeWithIdView, From bc57e367b3ebffd985cad1e4d774f94441eb3edb Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 29 Sep 2024 15:59:00 +0200 Subject: [PATCH 25/96] wip: fastnear_indexer single run func --- indexer/src/block_listener.rs | 20 +--- indexer/src/errors.rs | 6 ++ indexer/src/fastnear_indexer.rs | 172 +++++++++++++++++++++++++++----- indexer/src/indexer_wrapper.rs | 21 +--- indexer/src/types.rs | 13 ++- 5 files changed, 169 insertions(+), 63 deletions(-) diff --git a/indexer/src/block_listener.rs b/indexer/src/block_listener.rs index 1937bd3c..b304ef1f 100644 --- a/indexer/src/block_listener.rs +++ b/indexer/src/block_listener.rs @@ -17,7 +17,7 @@ use tracing::info; use crate::{ errors::Result, metrics::{make_block_listener_metrics, BlockEventListener, Metricable}, - types::{self, CandidateData, IndexerStream}, + types::{self, CandidateData}, INDEXER, }; @@ -239,21 +239,11 @@ impl BlockListener { } /// Filters indexer stream and returns receiving channel. - pub(crate) fn run(&self, indexer_stream: IndexerStream) -> (JoinHandle<()>, Receiver) { - match indexer_stream { - IndexerStream::BlockWithTxHashes(streamer) => { - let (candidates_sender, candidates_receiver) = mpsc::channel(1000); - let handle = actix::spawn(Self::process_stream(self.clone(), streamer, candidates_sender)); + pub(crate) fn run(&self, streamer: Receiver) -> (JoinHandle<()>, Receiver) { + let (candidates_sender, candidates_receiver) = mpsc::channel(1000); + let handle = actix::spawn(Self::process_stream(self.clone(), streamer, candidates_sender)); - (handle, candidates_receiver) - } - IndexerStream::StreamerMessage(receiver) => { - let (candidates_sender, candidates_receiver) = mpsc::channel(1000); - let handle = actix::spawn(Self::process_stream(self.clone(), receiver, candidates_sender)); - - (handle, candidates_receiver) - } - } + (handle, candidates_receiver) } #[cfg(test)] diff --git a/indexer/src/errors.rs b/indexer/src/errors.rs index 45b18b4a..cff7e22e 100644 --- a/indexer/src/errors.rs +++ b/indexer/src/errors.rs @@ -32,6 +32,12 @@ pub enum Error { JoinError(#[from] tokio::task::JoinError), #[error("Indexer not initialized")] IndexerNotInitialized, + #[error("Network error: {0}")] + NetworkError(String), + #[error("API error: {0}")] + ApiError(String), + #[error("Deserialize jsonerror: {0}")] + DeserializeJsonError(String), } impl From> for Error { diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 93f2688a..96613388 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -1,42 +1,100 @@ +use std::collections::HashMap; +use near_indexer::near_primitives::{types::AccountId, views::{ActionView, ExecutionStatusView, ReceiptEnumView}}; use reqwest::Client; -use tokio::sync::mpsc; +use tokio::sync::{mpsc::{Sender, Receiver}, mpsc}; use tracing::{info, error}; -use crate::types::BlockWithTxHashes; +use crate::{errors::Error, rmq_publisher::{get_routing_key, PublishData, PublishOptions, PublishPayload, PublisherContext, RmqPublisherHandle}, types::{BlockWithTxHashes, CandidateData, IndexerExecutionOutcomeWithReceiptAndTxHash, PartialCandidateData, PartialCandidateDataWithBlockTxHash}}; const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; - #[derive(Debug)] pub struct FastNearIndexer { client: Client, + addresses_to_rollup_ids: HashMap, } - impl FastNearIndexer { - pub fn new() -> Self { - FastNearIndexer { + pub(crate) fn new(addresses_to_rollup_ids: HashMap) -> Self { + Self { client: Client::new(), + addresses_to_rollup_ids, + } + } + + pub fn run(&self) -> Receiver { + let block_receiver = self.stream_latest_blocks(); + let (publish_sender, publish_receiver) = mpsc::channel(100); + + let addresses_to_rollup_ids = self.addresses_to_rollup_ids.clone(); + + tokio::spawn(async move { + Self::process_blocks(block_receiver, publish_sender, addresses_to_rollup_ids).await; + }); + + publish_receiver + } + + async fn process_blocks( + mut block_receiver: Receiver, + publish_sender: Sender, + addresses_to_rollup_ids: HashMap, + ) { + while let Some(block) = block_receiver.recv().await { + if let Err(e) = Self::parse_and_publish_block(block, &publish_sender, &addresses_to_rollup_ids).await { + error!(target: "fastnear_indexer", "Error parsing and publishing block: {:?}", e); + } } } + async fn parse_and_publish_block( + block: BlockWithTxHashes, + publish_sender: &Sender, + addresses_to_rollup_ids: &HashMap, + ) -> Result<(), Error> { + for shard in block.shards { + for receipt_execution_outcome in shard.receipt_execution_outcomes { + let receiver_id = &receipt_execution_outcome.receipt.receiver_id; + + if let Some(rollup_id) = addresses_to_rollup_ids.get(receiver_id) { + if !Self::is_successful_execution(&receipt_execution_outcome) { + continue; + } + + let partial_candidate_data = Self::receipt_filter_map( + receipt_execution_outcome.receipt.receipt, + *rollup_id + ); + + if let (Some(partial_data), Some(tx_hash)) = (partial_candidate_data, receipt_execution_outcome.tx_hash) { + let candidate_data = PartialCandidateDataWithBlockTxHash { + rollup_id: *rollup_id, + payloads: partial_data.payloads, + tx_hash, + block_hash: block.block.header.hash, + }; + Self::send(&candidate_data, publish_sender).await?; + } + } + } + } + + Ok(()) + } + pub fn stream_latest_blocks(&self) -> mpsc::Receiver { - let (sender, receiver) = mpsc::channel(100); + let (block_sender, block_receiver) = mpsc::channel(100); let client = self.client.clone(); tokio::spawn(async move { loop { - match client.get(FASTNEAR_ENDPOINT).send().await.and_then(|resp| resp.error_for_status()) { - Ok(response) => { - if let Ok(block) = response.json::().await { - if sender.send(block.clone()).await.is_err() { - error!(target: "fastnear_indexer", "Failed to send block to channel"); - break; - } - info!(target: "fastnear_indexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); - } else { - error!(target: "fastnear_indexer", "Failed to deserialize response into StreamerMessage"); + match Self::fetch_latest_block(&client).await { + Ok(block) => { + if block_sender.send(block.clone()).await.is_err() { + error!(target: "fastnear_indexer", "Failed to send block to channel"); + break; } + info!(target: "fastnear_indexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); } Err(e) => error!(target: "fastnear_indexer", "Error fetching latest block: {:?}", e), } @@ -44,18 +102,78 @@ impl FastNearIndexer { } }); - receiver + block_receiver } -} -#[cfg(test)] -mod tests { - use super::*; + async fn fetch_latest_block(client: &Client) -> Result { + let response = client.get(FASTNEAR_ENDPOINT) + .send() + .await + .map_err(|e| Error::NetworkError(e.to_string()))?; + + if !response.status().is_success() { + return Err(Error::ApiError(format!("API request failed with status: {}", response.status()))); + } + + response.json::() + .await + .map_err(|e| Error::DeserializeJsonError(e.to_string())) + } + + // Update the send method to use Sender directly + async fn send(candidate_data: &PartialCandidateDataWithBlockTxHash, sender: &Sender) -> Result<(), Error> { + for data in candidate_data.clone().payloads { + let publish_data = PublishData { + publish_options: PublishOptions { + routing_key: get_routing_key(candidate_data.rollup_id), + ..PublishOptions::default() + }, + cx: PublisherContext { + block_hash: candidate_data.block_hash, + }, + payload: PublishPayload { + transaction_id: candidate_data.tx_hash, + data, + }, + }; + sender.send(publish_data).await? + } + + Ok(()) + } - #[tokio::test] - async fn test_stream_latest_blocks() { - let indexer = FastNearIndexer::new(); - let stream = indexer.stream_latest_blocks(); - assert!(stream.is_empty()); + // Make this method static as it doesn't use &self + fn is_successful_execution(receipt_execution_outcome: &IndexerExecutionOutcomeWithReceiptAndTxHash) -> bool { + matches!( + receipt_execution_outcome.execution_outcome.outcome.status, + ExecutionStatusView::SuccessValue(ref value) if value.is_empty() + ) + } + + fn receipt_filter_map(receipt_enum_view: ReceiptEnumView, rollup_id: u32) -> Option { + let payloads = match receipt_enum_view { + ReceiptEnumView::Action { actions, .. } => { + actions.into_iter() + .filter_map(Self::extract_args) + .collect::>>() + } + _ => return None, + }; + + if payloads.is_empty() { + return None; + } + + Some(PartialCandidateData { + rollup_id, + payloads, + }) + } + + fn extract_args(action: ActionView) -> Option> { + match action { + ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => Some(args.into()), + _ => None, + } } } diff --git a/indexer/src/indexer_wrapper.rs b/indexer/src/indexer_wrapper.rs index 9cac9558..53bfd0fd 100644 --- a/indexer/src/indexer_wrapper.rs +++ b/indexer/src/indexer_wrapper.rs @@ -3,33 +3,18 @@ use prometheus::Registry; use std::collections::HashMap; use tokio::{task::JoinHandle, sync::mpsc::Receiver}; use crate::{block_listener::BlockListener, errors::Result, metrics::Metricable, types}; -use crate::fastnear_indexer::FastNearIndexer; -use types::IndexerStream; pub struct IndexerWrapper { indexer: Option, block_listener: BlockListener, - fastnear_indexer: Option, } impl IndexerWrapper { pub fn new(config: near_indexer::IndexerConfig, addresses_to_rollup_ids: HashMap) -> Self { - if cfg!(feature = "use_fastnear") { let indexer: near_indexer::Indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); let block_listener = BlockListener::new(addresses_to_rollup_ids); - let fastnear_indexer = FastNearIndexer::new(); Self { indexer: Some(indexer), block_listener, - fastnear_indexer: Some(fastnear_indexer), - } - } else { - let indexer: near_indexer::Indexer = near_indexer::Indexer::new(config).expect("Indexer::new()"); - let block_listener = BlockListener::new(addresses_to_rollup_ids); - Self { - indexer: Some(indexer), - block_listener, - fastnear_indexer: None, - } } } @@ -48,11 +33,7 @@ impl IndexerWrapper { } pub fn run(self) -> (JoinHandle<()>, Receiver) { - let indexer_stream: IndexerStream = if cfg!(feature = "use_fastnear") { - self.fastnear_indexer.unwrap().stream_latest_blocks().into() - } else { - self.indexer.unwrap().streamer().into() - }; + let indexer_stream = self.indexer.unwrap().streamer(); self.block_listener.run(indexer_stream) } } diff --git a/indexer/src/types.rs b/indexer/src/types.rs index dbd6d59d..247fc75f 100644 --- a/indexer/src/types.rs +++ b/indexer/src/types.rs @@ -13,7 +13,18 @@ pub(crate) struct CandidateData { pub transaction: near_indexer::IndexerTransactionWithOutcome, pub payloads: Vec>, } - +#[derive(Clone, Debug)] +pub (crate) struct PartialCandidateData { + pub rollup_id: u32, + pub payloads: Vec>, +} +#[derive(Clone, Debug)] +pub(crate) struct PartialCandidateDataWithBlockTxHash { + pub rollup_id: u32, + pub payloads: Vec>, + pub tx_hash: CryptoHash, + pub block_hash: CryptoHash, +} #[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] pub struct BlockWithTxHashes { pub block: BlockView, From e51f66aad78c3a1876cc94eb03c77b180eeec1ff Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 29 Sep 2024 16:05:35 +0200 Subject: [PATCH 26/96] wip: added main function cfg flag --- indexer/src/main.rs | 52 ++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/indexer/src/main.rs b/indexer/src/main.rs index cb85a144..c729cb38 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -1,7 +1,10 @@ use clap::Parser; use configs::{Opts, SubCommand}; +use fastnear_indexer::FastNearIndexer; use prometheus::Registry; use tracing::{error, info}; +use tokio::sync::mpsc::Receiver; +use crate::rmq_publisher::PublishData; use crate::{ candidates_validator::CandidatesValidator, configs::RunConfigArgs, errors::Error, errors::Result, @@ -38,30 +41,39 @@ fn run(home_dir: std::path::PathBuf, config: RunConfigArgs) -> Result<()> { } else { None }; - + // firat: added some logic to handle the case when fastnear is enabled. Needs tests and maybe refactoring for base case // TODO: refactor let block_res = system.block_on(async move { - let mut indexer = IndexerWrapper::new(indexer_config, addresses_to_rollup_ids); - if let Some(_) = config.metrics_ip_port_address { - indexer.enable_metrics(registry.clone())?; - } - - let (view_client, _) = indexer.client_actors(); - let (block_handle, candidates_stream) = indexer.run(); - let mut candidates_validator = CandidatesValidator::new(view_client); - if let Some(_) = config.metrics_ip_port_address { - candidates_validator.enable_metrics(registry.clone())?; + let validated_stream: Receiver; + if cfg!(feature = "fastnear") { + let fastnear_indexer = FastNearIndexer::new(addresses_to_rollup_ids); + validated_stream = fastnear_indexer.run(); + } else { + let mut indexer = IndexerWrapper::new(indexer_config, addresses_to_rollup_ids); + if config.metrics_ip_port_address.is_some() { + indexer.enable_metrics(registry.clone())?; + } + + let (view_client, _) = indexer.client_actors(); + let (block_handle, candidates_stream) = indexer.run(); + let mut candidates_validator = CandidatesValidator::new(view_client); + if config.metrics_ip_port_address.is_some() { + candidates_validator.enable_metrics(registry.clone())?; + } + + validated_stream = candidates_validator.run(candidates_stream); + + // TODO: Handle block_handle whether cancelled or panics + block_handle.await?; } - - let validated_stream = candidates_validator.run(candidates_stream); + let mut rmq_publisher = RmqPublisher::new(&config.rmq_address)?; - if let Some(_) = config.metrics_ip_port_address { + if config.metrics_ip_port_address.is_some() { rmq_publisher.enable_metrics(registry.clone())?; } rmq_publisher.run(validated_stream); - // TODO: block_handle wether cancelled or Panics. Can handle - Ok::<_, Error>(block_handle.await?) + Ok::<_, Error>(()) }); if let Some(handle) = server_handle { @@ -85,11 +97,7 @@ fn read_config( let config_str = std::fs::read_to_string(config_path)?; serde_yaml::from_str(&config_str).map_err(Into::into) } else { - if let Some(config_args) = config_args { - Ok(config_args) - } else { - panic!("Either config_path or config_args must be provided") - } + config_args.ok_or_else(|| Error::AnyhowError(anyhow::anyhow!("Either config_path or config_args must be provided"))) } } @@ -107,7 +115,7 @@ fn main() -> Result<()> { let _subscriber = near_o11y::default_subscriber(env_filter, &Default::default()).global(); let opts: Opts = Opts::parse(); - let home_dir = opts.home_dir.unwrap_or(near_indexer::get_default_home()); + let home_dir = opts.home_dir.unwrap_or_else(near_indexer::get_default_home); match opts.subcmd { SubCommand::Init(params) => { near_indexer::indexer_init_configs(&home_dir, read_config(params.config, params.args)?.into())?; From ea020a0b4b73e2c6f6a48046528c5ad9ca9d13cb Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 29 Sep 2024 16:07:12 +0200 Subject: [PATCH 27/96] wip: some documentation --- indexer/src/fastnear_indexer.rs | 96 ++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 96613388..6c071020 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -1,3 +1,9 @@ +//! FastNearIndexer module for efficient indexing of NEAR blockchain data. +//! +//! This module provides functionality to stream and process the latest blocks +//! from the NEAR blockchain, focusing on specific transactions and receipts +//! related to configured rollup addresses. + use std::collections::HashMap; use near_indexer::near_primitives::{types::AccountId, views::{ActionView, ExecutionStatusView, ReceiptEnumView}}; use reqwest::Client; @@ -6,15 +12,28 @@ use tracing::{info, error}; use crate::{errors::Error, rmq_publisher::{get_routing_key, PublishData, PublishOptions, PublishPayload, PublisherContext, RmqPublisherHandle}, types::{BlockWithTxHashes, CandidateData, IndexerExecutionOutcomeWithReceiptAndTxHash, PartialCandidateData, PartialCandidateDataWithBlockTxHash}}; +/// The endpoint URL for fetching the latest finalized block from NEAR testnet. const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; +/// Represents the FastNearIndexer, which processes NEAR blockchain data. #[derive(Debug)] pub struct FastNearIndexer { + /// HTTP client for making requests to the NEAR API. client: Client, + /// Mapping of account IDs to their corresponding rollup IDs. addresses_to_rollup_ids: HashMap, } impl FastNearIndexer { + /// Creates a new instance of FastNearIndexer. + /// + /// # Arguments + /// + /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. + /// + /// # Returns + /// + /// A new `FastNearIndexer` instance. pub(crate) fn new(addresses_to_rollup_ids: HashMap) -> Self { Self { client: Client::new(), @@ -22,6 +41,11 @@ impl FastNearIndexer { } } + /// Starts the indexing process and returns a receiver for publish data. + /// + /// # Returns + /// + /// A `Receiver` for consuming the processed blockchain data. pub fn run(&self) -> Receiver { let block_receiver = self.stream_latest_blocks(); let (publish_sender, publish_receiver) = mpsc::channel(100); @@ -35,6 +59,13 @@ impl FastNearIndexer { publish_receiver } + /// Processes incoming blocks and publishes relevant data. + /// + /// # Arguments + /// + /// * `block_receiver` - A receiver for incoming `BlockWithTxHashes`. + /// * `publish_sender` - A sender for outgoing `PublishData`. + /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. async fn process_blocks( mut block_receiver: Receiver, publish_sender: Sender, @@ -47,6 +78,17 @@ impl FastNearIndexer { } } + /// Parses a block and publishes relevant data. + /// + /// # Arguments + /// + /// * `block` - The `BlockWithTxHashes` to be parsed. + /// * `publish_sender` - A sender for outgoing `PublishData`. + /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. + /// + /// # Returns + /// + /// A `Result` indicating success or containing an `Error`. async fn parse_and_publish_block( block: BlockWithTxHashes, publish_sender: &Sender, @@ -82,6 +124,11 @@ impl FastNearIndexer { Ok(()) } + /// Creates a stream of the latest blocks from the NEAR blockchain. + /// + /// # Returns + /// + /// A `Receiver` for consuming the latest blocks. pub fn stream_latest_blocks(&self) -> mpsc::Receiver { let (block_sender, block_receiver) = mpsc::channel(100); let client = self.client.clone(); @@ -105,6 +152,15 @@ impl FastNearIndexer { block_receiver } + /// Fetches the latest block from the NEAR API. + /// + /// # Arguments + /// + /// * `client` - The HTTP client to use for the API request. + /// + /// # Returns + /// + /// A `Result` containing the `BlockWithTxHashes` or an `Error`. async fn fetch_latest_block(client: &Client) -> Result { let response = client.get(FASTNEAR_ENDPOINT) .send() @@ -120,7 +176,16 @@ impl FastNearIndexer { .map_err(|e| Error::DeserializeJsonError(e.to_string())) } - // Update the send method to use Sender directly + /// Sends candidate data to the publish channel. + /// + /// # Arguments + /// + /// * `candidate_data` - The `PartialCandidateDataWithBlockTxHash` to be sent. + /// * `sender` - The `Sender` to send the data through. + /// + /// # Returns + /// + /// A `Result` indicating success or containing an `Error`. async fn send(candidate_data: &PartialCandidateDataWithBlockTxHash, sender: &Sender) -> Result<(), Error> { for data in candidate_data.clone().payloads { let publish_data = PublishData { @@ -142,7 +207,15 @@ impl FastNearIndexer { Ok(()) } - // Make this method static as it doesn't use &self + /// Checks if the execution of a receipt was successful. + /// + /// # Arguments + /// + /// * `receipt_execution_outcome` - The `IndexerExecutionOutcomeWithReceiptAndTxHash` to check. + /// + /// # Returns + /// + /// A boolean indicating whether the execution was successful. fn is_successful_execution(receipt_execution_outcome: &IndexerExecutionOutcomeWithReceiptAndTxHash) -> bool { matches!( receipt_execution_outcome.execution_outcome.outcome.status, @@ -150,6 +223,16 @@ impl FastNearIndexer { ) } + /// Filters and maps a receipt to partial candidate data. + /// + /// # Arguments + /// + /// * `receipt_enum_view` - The `ReceiptEnumView` to be filtered and mapped. + /// * `rollup_id` - The rollup ID associated with this receipt. + /// + /// # Returns + /// + /// An `Option` containing the filtered and mapped data, if any. fn receipt_filter_map(receipt_enum_view: ReceiptEnumView, rollup_id: u32) -> Option { let payloads = match receipt_enum_view { ReceiptEnumView::Action { actions, .. } => { @@ -170,6 +253,15 @@ impl FastNearIndexer { }) } + /// Extracts arguments from an action view. + /// + /// # Arguments + /// + /// * `action` - The `ActionView` to extract arguments from. + /// + /// # Returns + /// + /// An `Option>` containing the extracted arguments, if any. fn extract_args(action: ActionView) -> Option> { match action { ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => Some(args.into()), From 7f43c808ebacbc10a014879dfa8c743dfc70feec Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 29 Sep 2024 16:16:57 +0200 Subject: [PATCH 28/96] wip: cfg fix and tracing --- indexer/src/fastnear_indexer.rs | 42 +++++++++++++++++++++++++-------- indexer/src/main.rs | 2 +- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 6c071020..04935cfe 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -8,9 +8,9 @@ use std::collections::HashMap; use near_indexer::near_primitives::{types::AccountId, views::{ActionView, ExecutionStatusView, ReceiptEnumView}}; use reqwest::Client; use tokio::sync::{mpsc::{Sender, Receiver}, mpsc}; -use tracing::{info, error}; +use tracing::{info, error, debug, trace}; -use crate::{errors::Error, rmq_publisher::{get_routing_key, PublishData, PublishOptions, PublishPayload, PublisherContext, RmqPublisherHandle}, types::{BlockWithTxHashes, CandidateData, IndexerExecutionOutcomeWithReceiptAndTxHash, PartialCandidateData, PartialCandidateDataWithBlockTxHash}}; +use crate::{errors::Error, rmq_publisher::{get_routing_key, PublishData, PublishOptions, PublishPayload, PublisherContext}, types::{BlockWithTxHashes, IndexerExecutionOutcomeWithReceiptAndTxHash, PartialCandidateData, PartialCandidateDataWithBlockTxHash}}; /// The endpoint URL for fetching the latest finalized block from NEAR testnet. const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; @@ -35,6 +35,7 @@ impl FastNearIndexer { /// /// A new `FastNearIndexer` instance. pub(crate) fn new(addresses_to_rollup_ids: HashMap) -> Self { + debug!(target: "fastNearIndexer", "Creating new FastNearIndexer"); Self { client: Client::new(), addresses_to_rollup_ids, @@ -47,6 +48,7 @@ impl FastNearIndexer { /// /// A `Receiver` for consuming the processed blockchain data. pub fn run(&self) -> Receiver { + info!(target: "fastNearIndexer", "Starting FastNearIndexer"); let block_receiver = self.stream_latest_blocks(); let (publish_sender, publish_receiver) = mpsc::channel(100); @@ -71,9 +73,11 @@ impl FastNearIndexer { publish_sender: Sender, addresses_to_rollup_ids: HashMap, ) { + debug!(target: "fastNearIndexer", "Starting block processing"); while let Some(block) = block_receiver.recv().await { + trace!(target: "fastNearIndexer", "Received block: {:?}", block.block.header.height); if let Err(e) = Self::parse_and_publish_block(block, &publish_sender, &addresses_to_rollup_ids).await { - error!(target: "fastnear_indexer", "Error parsing and publishing block: {:?}", e); + error!(target: "fastNearIndexer", "Error parsing and publishing block: {:?}", e); } } } @@ -94,12 +98,15 @@ impl FastNearIndexer { publish_sender: &Sender, addresses_to_rollup_ids: &HashMap, ) -> Result<(), Error> { + debug!(target: "fastNearIndexer", "Parsing block: {:?}", block.block.header.height); for shard in block.shards { for receipt_execution_outcome in shard.receipt_execution_outcomes { let receiver_id = &receipt_execution_outcome.receipt.receiver_id; if let Some(rollup_id) = addresses_to_rollup_ids.get(receiver_id) { + trace!(target: "fastNearIndexer", "Processing receipt for rollup_id: {}", rollup_id); if !Self::is_successful_execution(&receipt_execution_outcome) { + trace!(target: "fastNearIndexer", "Skipping unsuccessful execution for rollup_id: {}", rollup_id); continue; } @@ -115,6 +122,7 @@ impl FastNearIndexer { tx_hash, block_hash: block.block.header.hash, }; + debug!(target: "fastNearIndexer", "Sending candidate data for rollup_id: {}", rollup_id); Self::send(&candidate_data, publish_sender).await?; } } @@ -130,6 +138,7 @@ impl FastNearIndexer { /// /// A `Receiver` for consuming the latest blocks. pub fn stream_latest_blocks(&self) -> mpsc::Receiver { + info!(target: "fastNearIndexer", "Starting block stream"); let (block_sender, block_receiver) = mpsc::channel(100); let client = self.client.clone(); @@ -138,12 +147,12 @@ impl FastNearIndexer { match Self::fetch_latest_block(&client).await { Ok(block) => { if block_sender.send(block.clone()).await.is_err() { - error!(target: "fastnear_indexer", "Failed to send block to channel"); + error!(target: "fastNearIndexer", "Failed to send block to channel"); break; } - info!(target: "fastnear_indexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); + info!(target: "fastNearIndexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); } - Err(e) => error!(target: "fastnear_indexer", "Error fetching latest block: {:?}", e), + Err(e) => error!(target: "fastNearIndexer", "Error fetching latest block: {:?}", e), } tokio::time::sleep(std::time::Duration::from_secs(1)).await; } @@ -162,12 +171,14 @@ impl FastNearIndexer { /// /// A `Result` containing the `BlockWithTxHashes` or an `Error`. async fn fetch_latest_block(client: &Client) -> Result { + debug!(target: "fastNearIndexer", "Fetching latest block"); let response = client.get(FASTNEAR_ENDPOINT) .send() .await .map_err(|e| Error::NetworkError(e.to_string()))?; if !response.status().is_success() { + error!(target: "fastNearIndexer", "API request failed with status: {}", response.status()); return Err(Error::ApiError(format!("API request failed with status: {}", response.status()))); } @@ -187,6 +198,7 @@ impl FastNearIndexer { /// /// A `Result` indicating success or containing an `Error`. async fn send(candidate_data: &PartialCandidateDataWithBlockTxHash, sender: &Sender) -> Result<(), Error> { + trace!(target: "fastNearIndexer", "Sending candidate data: {:?}", candidate_data); for data in candidate_data.clone().payloads { let publish_data = PublishData { publish_options: PublishOptions { @@ -217,10 +229,12 @@ impl FastNearIndexer { /// /// A boolean indicating whether the execution was successful. fn is_successful_execution(receipt_execution_outcome: &IndexerExecutionOutcomeWithReceiptAndTxHash) -> bool { - matches!( + let is_successful = matches!( receipt_execution_outcome.execution_outcome.outcome.status, ExecutionStatusView::SuccessValue(ref value) if value.is_empty() - ) + ); + trace!(target: "fastNearIndexer", "Execution successful: {}", is_successful); + is_successful } /// Filters and maps a receipt to partial candidate data. @@ -234,6 +248,7 @@ impl FastNearIndexer { /// /// An `Option` containing the filtered and mapped data, if any. fn receipt_filter_map(receipt_enum_view: ReceiptEnumView, rollup_id: u32) -> Option { + trace!(target: "fastNearIndexer", "Filtering receipt for rollup_id: {}", rollup_id); let payloads = match receipt_enum_view { ReceiptEnumView::Action { actions, .. } => { actions.into_iter() @@ -244,6 +259,7 @@ impl FastNearIndexer { }; if payloads.is_empty() { + trace!(target: "fastNearIndexer", "No payloads found for rollup_id: {}", rollup_id); return None; } @@ -264,8 +280,14 @@ impl FastNearIndexer { /// An `Option>` containing the extracted arguments, if any. fn extract_args(action: ActionView) -> Option> { match action { - ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => Some(args.into()), - _ => None, + ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => { + trace!(target: "fastNearIndexer", "Extracted args for 'submit' method"); + Some(args.into()) + }, + _ => { + trace!(target: "fastNearIndexer", "Skipped non-'submit' method"); + None + }, } } } diff --git a/indexer/src/main.rs b/indexer/src/main.rs index c729cb38..ee157102 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -45,7 +45,7 @@ fn run(home_dir: std::path::PathBuf, config: RunConfigArgs) -> Result<()> { // TODO: refactor let block_res = system.block_on(async move { let validated_stream: Receiver; - if cfg!(feature = "fastnear") { + if cfg!(feature = "use_fastnear") { let fastnear_indexer = FastNearIndexer::new(addresses_to_rollup_ids); validated_stream = fastnear_indexer.run(); } else { From cf74716ada15417891189b91913ce307cb946819 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 29 Sep 2024 16:42:02 +0200 Subject: [PATCH 29/96] wip: target name fix --- indexer/src/fastnear_indexer.rs | 46 +++++++++++++++------------------ indexer/src/main.rs | 2 +- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 04935cfe..a5db93a7 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -35,7 +35,7 @@ impl FastNearIndexer { /// /// A new `FastNearIndexer` instance. pub(crate) fn new(addresses_to_rollup_ids: HashMap) -> Self { - debug!(target: "fastNearIndexer", "Creating new FastNearIndexer"); + debug!(target: "fastnear_indexer", "Creating new FastNearIndexer"); Self { client: Client::new(), addresses_to_rollup_ids, @@ -48,7 +48,7 @@ impl FastNearIndexer { /// /// A `Receiver` for consuming the processed blockchain data. pub fn run(&self) -> Receiver { - info!(target: "fastNearIndexer", "Starting FastNearIndexer"); + info!(target: "fastnear_indexer", "Starting FastNearIndexer"); let block_receiver = self.stream_latest_blocks(); let (publish_sender, publish_receiver) = mpsc::channel(100); @@ -73,11 +73,11 @@ impl FastNearIndexer { publish_sender: Sender, addresses_to_rollup_ids: HashMap, ) { - debug!(target: "fastNearIndexer", "Starting block processing"); + debug!(target: "fastnear_indexer", "Starting block processing"); while let Some(block) = block_receiver.recv().await { - trace!(target: "fastNearIndexer", "Received block: {:?}", block.block.header.height); + trace!(target: "fastnear_indexer", "Received block: {:?}", block.block.header.height); if let Err(e) = Self::parse_and_publish_block(block, &publish_sender, &addresses_to_rollup_ids).await { - error!(target: "fastNearIndexer", "Error parsing and publishing block: {:?}", e); + error!(target: "fastnear_indexer", "Error parsing and publishing block: {:?}", e); } } } @@ -98,15 +98,15 @@ impl FastNearIndexer { publish_sender: &Sender, addresses_to_rollup_ids: &HashMap, ) -> Result<(), Error> { - debug!(target: "fastNearIndexer", "Parsing block: {:?}", block.block.header.height); + debug!(target: "fastnear_indexer", "Parsing block: {:?}", block.block.header.height); for shard in block.shards { for receipt_execution_outcome in shard.receipt_execution_outcomes { let receiver_id = &receipt_execution_outcome.receipt.receiver_id; if let Some(rollup_id) = addresses_to_rollup_ids.get(receiver_id) { - trace!(target: "fastNearIndexer", "Processing receipt for rollup_id: {}", rollup_id); + trace!(target: "fastnear_indexer", "Processing receipt for rollup_id: {}", rollup_id); if !Self::is_successful_execution(&receipt_execution_outcome) { - trace!(target: "fastNearIndexer", "Skipping unsuccessful execution for rollup_id: {}", rollup_id); + trace!(target: "fastnear_indexer", "Skipping unsuccessful execution for rollup_id: {}", rollup_id); continue; } @@ -122,7 +122,7 @@ impl FastNearIndexer { tx_hash, block_hash: block.block.header.hash, }; - debug!(target: "fastNearIndexer", "Sending candidate data for rollup_id: {}", rollup_id); + debug!(target: "fastnear_indexer", "Sending candidate data for rollup_id: {}", rollup_id); Self::send(&candidate_data, publish_sender).await?; } } @@ -138,7 +138,7 @@ impl FastNearIndexer { /// /// A `Receiver` for consuming the latest blocks. pub fn stream_latest_blocks(&self) -> mpsc::Receiver { - info!(target: "fastNearIndexer", "Starting block stream"); + info!(target: "fastnear_indexer", "Starting block stream"); let (block_sender, block_receiver) = mpsc::channel(100); let client = self.client.clone(); @@ -147,12 +147,12 @@ impl FastNearIndexer { match Self::fetch_latest_block(&client).await { Ok(block) => { if block_sender.send(block.clone()).await.is_err() { - error!(target: "fastNearIndexer", "Failed to send block to channel"); + error!(target: "fastnear_indexer", "Failed to send block to channel"); break; } - info!(target: "fastNearIndexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); + info!(target: "fastnear_indexer", "Successfully fetched and sent latest block with id: {}", block.block.header.height); } - Err(e) => error!(target: "fastNearIndexer", "Error fetching latest block: {:?}", e), + Err(e) => error!(target: "fastnear_indexer", "Error fetching latest block: {:?}", e), } tokio::time::sleep(std::time::Duration::from_secs(1)).await; } @@ -171,17 +171,13 @@ impl FastNearIndexer { /// /// A `Result` containing the `BlockWithTxHashes` or an `Error`. async fn fetch_latest_block(client: &Client) -> Result { - debug!(target: "fastNearIndexer", "Fetching latest block"); + debug!(target: "fastnear_indexer", "Fetching latest block"); let response = client.get(FASTNEAR_ENDPOINT) .send() .await + .and_then(|r| r.error_for_status()) .map_err(|e| Error::NetworkError(e.to_string()))?; - if !response.status().is_success() { - error!(target: "fastNearIndexer", "API request failed with status: {}", response.status()); - return Err(Error::ApiError(format!("API request failed with status: {}", response.status()))); - } - response.json::() .await .map_err(|e| Error::DeserializeJsonError(e.to_string())) @@ -198,7 +194,7 @@ impl FastNearIndexer { /// /// A `Result` indicating success or containing an `Error`. async fn send(candidate_data: &PartialCandidateDataWithBlockTxHash, sender: &Sender) -> Result<(), Error> { - trace!(target: "fastNearIndexer", "Sending candidate data: {:?}", candidate_data); + trace!(target: "fastnear_indexer", "Sending candidate data: {:?}", candidate_data); for data in candidate_data.clone().payloads { let publish_data = PublishData { publish_options: PublishOptions { @@ -233,7 +229,7 @@ impl FastNearIndexer { receipt_execution_outcome.execution_outcome.outcome.status, ExecutionStatusView::SuccessValue(ref value) if value.is_empty() ); - trace!(target: "fastNearIndexer", "Execution successful: {}", is_successful); + trace!(target: "fastnear_indexer", "Execution successful: {}", is_successful); is_successful } @@ -248,7 +244,7 @@ impl FastNearIndexer { /// /// An `Option` containing the filtered and mapped data, if any. fn receipt_filter_map(receipt_enum_view: ReceiptEnumView, rollup_id: u32) -> Option { - trace!(target: "fastNearIndexer", "Filtering receipt for rollup_id: {}", rollup_id); + trace!(target: "fastnear_indexer", "Filtering receipt for rollup_id: {}", rollup_id); let payloads = match receipt_enum_view { ReceiptEnumView::Action { actions, .. } => { actions.into_iter() @@ -259,7 +255,7 @@ impl FastNearIndexer { }; if payloads.is_empty() { - trace!(target: "fastNearIndexer", "No payloads found for rollup_id: {}", rollup_id); + trace!(target: "fastnear_indexer", "No payloads found for rollup_id: {}", rollup_id); return None; } @@ -281,11 +277,11 @@ impl FastNearIndexer { fn extract_args(action: ActionView) -> Option> { match action { ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => { - trace!(target: "fastNearIndexer", "Extracted args for 'submit' method"); + trace!(target: "fastnear_indexer", "Extracted args for 'submit' method"); Some(args.into()) }, _ => { - trace!(target: "fastNearIndexer", "Skipped non-'submit' method"); + trace!(target: "fastnear_indexer", "Skipped non-'submit' method"); None }, } diff --git a/indexer/src/main.rs b/indexer/src/main.rs index ee157102..c6db159f 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -110,7 +110,7 @@ fn main() -> Result<()> { let env_filter = near_o11y::tracing_subscriber::EnvFilter::new( "nearcore=info,publisher=info,indexer=info,candidates_validator=info,\ metrics=info,tokio_reactor=info,near=info,stats=info,telemetry=info,\ - near-performance-metrics=info,fastnear_indexer=info", + near-performance-metrics=info,fastnear_indexer=info,fastnear_indexer=debug, fastnear_indexer=trace", ); let _subscriber = near_o11y::default_subscriber(env_filter, &Default::default()).global(); let opts: Opts = Opts::parse(); From e7c5d188549c28ca649e79ae90bde7d1ba7655f1 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Mon, 30 Sep 2024 00:49:47 +0200 Subject: [PATCH 30/96] wip: docker compose setup --- setup/fastnear-indexer/config/.env.example | 14 ++++++ setup/fastnear-indexer/config/indexer.yaml | 14 ++++++ setup/fastnear-indexer/docker-compose.yml | 54 ++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 setup/fastnear-indexer/config/.env.example create mode 100644 setup/fastnear-indexer/config/indexer.yaml create mode 100644 setup/fastnear-indexer/docker-compose.yml diff --git a/setup/fastnear-indexer/config/.env.example b/setup/fastnear-indexer/config/.env.example new file mode 100644 index 00000000..19868c8b --- /dev/null +++ b/setup/fastnear-indexer/config/.env.example @@ -0,0 +1,14 @@ +# Tagged release for SFFL containers +SFFL_RELEASE=latest + +# NEAR chain ID +NEAR_CHAIN_ID=testnet + +# Path to the directory containing the keys for the relayer DA account +NEAR_KEYS_DIR=~/.near-credentials + +# Home dir +NEAR_HOME_DIR=~/.near + +# RPC URL of the NEAR network +NEAR_RPC_URL=https://rpc.testnet.near.org \ No newline at end of file diff --git a/setup/fastnear-indexer/config/indexer.yaml b/setup/fastnear-indexer/config/indexer.yaml new file mode 100644 index 00000000..9e49b0c8 --- /dev/null +++ b/setup/fastnear-indexer/config/indexer.yaml @@ -0,0 +1,14 @@ +# RMQ address +rmq_address: amqp://rmq:5672 + +# AVS network contract IDs +da_contract_ids: + - sfrelayer421614-2.testnet + - sfrelayer21155420-2.testnet + +# Rollup IDs, must follow the same order as da_contract_ids +rollup_ids: + - 421614 + - 11155420 + +metrics_ip_port_address: "0.0.0.0:9092" \ No newline at end of file diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml new file mode 100644 index 00000000..c0ffacd0 --- /dev/null +++ b/setup/fastnear-indexer/docker-compose.yml @@ -0,0 +1,54 @@ +networks: + fastnear: + name: fastnear + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + profiles: [indexer] + build: + context: ../../indexer + dockerfile: Dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR}:/root/.near + - ${NEAR_KEYS_DIR}:/root/.near-credentials + command: + - --config + - /fastnear-indexer/config/indexer.yaml + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" \ No newline at end of file From ed2dbe692e0514f87195a40798bef7a6fc6c07f7 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Mon, 30 Sep 2024 00:50:35 +0200 Subject: [PATCH 31/96] remove lake --- near-lake/Cargo.toml | 13 ------------- near-lake/src/main.rs | 36 ------------------------------------ 2 files changed, 49 deletions(-) delete mode 100644 near-lake/Cargo.toml delete mode 100644 near-lake/src/main.rs diff --git a/near-lake/Cargo.toml b/near-lake/Cargo.toml deleted file mode 100644 index 75a37229..00000000 --- a/near-lake/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "near-lake" -version = "0.0.1" -edition = "2021" - - -[dependencies] -near-lake-framework = "0.7.9" -anyhow = "1.0" -futures = "0.3" -tokio = { version = "1.38.0", features = ["rt-multi-thread", "macros"] } -tokio-stream = "0.1.16" -near-lake-primitives = "0.8.0-beta.3" diff --git a/near-lake/src/main.rs b/near-lake/src/main.rs deleted file mode 100644 index ec499e0c..00000000 --- a/near-lake/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -//! This example show how to use a context with Lake Framework. -//! It is going to follow the NEAR Social contract and the block height along -//! with a number of calls to the contract. -use near_lake_framework::{LakeConfigBuilder, near_indexer_primitives::StreamerMessage}; -// We need to import this trait to use the `as_function_call` method. -use futures::StreamExt; -const CONTRACT_ID: &str = "social.near"; - -#[tokio::main] -async fn main() -> Result<(), tokio::io::Error> { - let config = LakeConfigBuilder::default() - .testnet() - .start_block_height(82422587) - .build() - .expect("Failed to build LakeConfig"); - - let (sender, stream) = near_lake_framework::streamer(config); - - let mut handlers = tokio_stream::wrappers::ReceiverStream::new(stream) - .map(|streamer_message| handle_block(streamer_message)) - .buffer_unordered(1usize); - - while let Some(_handle_message) = handlers.next().await {} - drop(handlers); - - match sender.await { - Ok(Ok(())) => Ok(()), - Ok(Err(e)) => Err(std::io::Error::new(std::io::ErrorKind::Other, e)), - Err(e) => Err(std::io::Error::new(std::io::ErrorKind::Other, e.to_string())), - } -} - -async fn handle_block(streamer_message: StreamerMessage) -> Result<(), Box> { - println!("Handling block: {}", streamer_message.block.header.height); - Ok(()) -} From f0925616ef1d6c7f63105300afd24f82b8fcdb56 Mon Sep 17 00:00:00 2001 From: Sasha Syrotenko Date: Wed, 2 Oct 2024 11:20:13 +0300 Subject: [PATCH 32/96] Fixes compilation error in `block_listener` test suite --- indexer/src/block_listener.rs | 3 +++ .../7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5.json | 2 +- .../9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b.json | 2 +- .../AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa.json | 2 +- .../HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18.json | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indexer/src/block_listener.rs b/indexer/src/block_listener.rs index b304ef1f..6f1c2695 100644 --- a/indexer/src/block_listener.rs +++ b/indexer/src/block_listener.rs @@ -337,6 +337,7 @@ mod tests { gas: 100, deposit: 100, }], + priority_fee: 0, signature: Signature::default(), hash: CryptoHash::default(), }, @@ -354,6 +355,7 @@ mod tests { nonce: 0, receiver_id: da_contract_id, actions: vec![ActionView::CreateAccount], + priority_fee: 0, signature: Signature::default(), hash: CryptoHash::default(), }, @@ -414,6 +416,7 @@ mod tests { nonce: 0, receiver_id: da_contract_id.clone(), actions, + priority_fee: 0, signature: Signature::default(), hash: CryptoHash::hash_bytes(b"test_tx_id"), }, diff --git a/indexer/test_data/candidates/7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5.json b/indexer/test_data/candidates/7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5.json index d23927fe..6949faa2 100644 --- a/indexer/test_data/candidates/7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5.json +++ b/indexer/test_data/candidates/7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5.json @@ -1 +1 @@ -{"block":{"author":"test.near","header":{"height":45494,"prev_height":45493,"epoch_id":"8VT78YkYJRLxPHryKdzL7dFeREwiDaKhV5ygwLs7KUWV","next_epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","prev_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","prev_state_root":"5Gh6w63sJCuA9uaGaVPhKdtFRh92Hsb87CrEveRQuA6n","block_body_hash":"5o7GkxhPYpvjo9dJyJ5QHxSSqQXekygqKzwAZ5BirzTn","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"CVcKzGspBhjLUW6zmhm2csDkZJF24Pnc8jrE67zbrVWx","chunk_tx_root":"5pWHvE8RAVrDgor1avRnkGzGjY6H5qJSu19BqQHaGGsj","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136268560478000,"timestamp_nanosec":"1712136268560478000","random_value":"7kb1ZaogF1tuYDm2Wt5wQ2yrRgMaf7baCFjwUtnHPXP","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45390,"rent_paid":"0","validator_reward":"0","total_supply":"2078635437075814263799527848111711","challenges_result":[],"last_final_block":"9HE1KKUEv7jh15BP4z1GxJpQjsw16L9BjWFYvkAfzkL1","last_ds_final_block":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","next_bp_hash":"DfVYbWFJSgjEXZCsh8EsWevHm5bvPKauFeCA5otu7Rka","block_merkle_root":"9fXi7aPKFDujAW4RLeA52r3UV5WGjHh7jedZhXRTjzct","epoch_sync_data_hash":null,"approvals":["ed25519:mrFqGkHWqVsUVwL1b72KipzCjxMT5NefDVWkrpcYnAffhB5wEvCSZnisQSHmQhUEKZjKuUwVfSGmAdb4uv7SFAe"],"signature":"ed25519:3Rdf8DpcA9P6JmnE4mSUyTTGpo8hhJPXuuApqzKL3ur1a4GeWuRd5oDcisnaVsf2eDPnWfYnk98E5MQ7AUYtwrNd","latest_protocol_version":64},"chunks":[{"chunk_hash":"23ciqLqeRf5ia3Zase13968vuyYXdy9sy1UmNzH4g8LQ","prev_block_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","outcome_root":"11111111111111111111111111111111","prev_state_root":"GCUxiSvoF2pyuBJpGgDWAkXf7c9zruW6dP2SjgknemVF","encoded_merkle_root":"8fDpQiLoCjcp4HgN8BdKQpHdksxFDya88gvDwRHbLrZs","encoded_length":237,"height_created":45494,"height_included":45494,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"BrLejsYGeZL2doe6ZpXQ765Da5pKqizetksozpHiiucS","validator_proposals":[],"signature":"ed25519:34xLVAsZgpX7hxDcZEqzc4xCnw5WGueXDLHukU1iDQ7LDGcvsM8zqsEi5Ryag2rzQyKZ1FdEjCnEFEYaktX2GiNY"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"23ciqLqeRf5ia3Zase13968vuyYXdy9sy1UmNzH4g8LQ","prev_block_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","outcome_root":"11111111111111111111111111111111","prev_state_root":"GCUxiSvoF2pyuBJpGgDWAkXf7c9zruW6dP2SjgknemVF","encoded_merkle_root":"8fDpQiLoCjcp4HgN8BdKQpHdksxFDya88gvDwRHbLrZs","encoded_length":237,"height_created":45494,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"BrLejsYGeZL2doe6ZpXQ765Da5pKqizetksozpHiiucS","validator_proposals":[],"signature":"ed25519:34xLVAsZgpX7hxDcZEqzc4xCnw5WGueXDLHukU1iDQ7LDGcvsM8zqsEi5Ryag2rzQyKZ1FdEjCnEFEYaktX2GiNY"},"transactions":[{"transaction":{"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000075,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:25b72WYZjSyiddaqhp8yw6GEmYtFLxUE5eeBCakidfWobk2EVzPrDrpSKW53v5T4LzXpkeLBGDPk2trKegtoozyW","hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"outcome":{"execution_outcome":{"proof":[{"hash":"Bt9voNmDne2LRW2Wt5VCgRPso2Jy5fc8NUPtuxNjHZ7s","direction":"Right"}],"block_hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","id":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9","outcome":{"logs":[],"receipt_ids":["8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"],"gas_burnt":2427970190548,"tokens_burnt":"242797019054800000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"B9RpVa877vT2uLbYVwPBzWSsMV3K6DiDSehKk7L9NvSL","direction":"Left"}],"block_hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","outcome":{"logs":[],"receipt_ids":["7bcvBfjp3H9F6VQJdVf9orWzbz4H1YVWPMCgbPnSpcXc"],"gas_burnt":2575843020487,"tokens_burnt":"257584302048700000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3942480"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"108950880"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"152062560"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959578806260191572233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959578806260191572233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959583242445089672233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000075,"permission":"FullAccess"}}}]}]} \ No newline at end of file +{"block":{"author":"test.near","header":{"height":45494,"prev_height":45493,"epoch_id":"8VT78YkYJRLxPHryKdzL7dFeREwiDaKhV5ygwLs7KUWV","next_epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","prev_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","prev_state_root":"5Gh6w63sJCuA9uaGaVPhKdtFRh92Hsb87CrEveRQuA6n","block_body_hash":"5o7GkxhPYpvjo9dJyJ5QHxSSqQXekygqKzwAZ5BirzTn","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"CVcKzGspBhjLUW6zmhm2csDkZJF24Pnc8jrE67zbrVWx","chunk_tx_root":"5pWHvE8RAVrDgor1avRnkGzGjY6H5qJSu19BqQHaGGsj","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136268560478000,"timestamp_nanosec":"1712136268560478000","random_value":"7kb1ZaogF1tuYDm2Wt5wQ2yrRgMaf7baCFjwUtnHPXP","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45390,"rent_paid":"0","validator_reward":"0","total_supply":"2078635437075814263799527848111711","challenges_result":[],"last_final_block":"9HE1KKUEv7jh15BP4z1GxJpQjsw16L9BjWFYvkAfzkL1","last_ds_final_block":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","next_bp_hash":"DfVYbWFJSgjEXZCsh8EsWevHm5bvPKauFeCA5otu7Rka","block_merkle_root":"9fXi7aPKFDujAW4RLeA52r3UV5WGjHh7jedZhXRTjzct","epoch_sync_data_hash":null,"approvals":["ed25519:mrFqGkHWqVsUVwL1b72KipzCjxMT5NefDVWkrpcYnAffhB5wEvCSZnisQSHmQhUEKZjKuUwVfSGmAdb4uv7SFAe"],"signature":"ed25519:3Rdf8DpcA9P6JmnE4mSUyTTGpo8hhJPXuuApqzKL3ur1a4GeWuRd5oDcisnaVsf2eDPnWfYnk98E5MQ7AUYtwrNd","latest_protocol_version":64},"chunks":[{"chunk_hash":"23ciqLqeRf5ia3Zase13968vuyYXdy9sy1UmNzH4g8LQ","prev_block_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","outcome_root":"11111111111111111111111111111111","prev_state_root":"GCUxiSvoF2pyuBJpGgDWAkXf7c9zruW6dP2SjgknemVF","encoded_merkle_root":"8fDpQiLoCjcp4HgN8BdKQpHdksxFDya88gvDwRHbLrZs","encoded_length":237,"height_created":45494,"height_included":45494,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"BrLejsYGeZL2doe6ZpXQ765Da5pKqizetksozpHiiucS","validator_proposals":[],"signature":"ed25519:34xLVAsZgpX7hxDcZEqzc4xCnw5WGueXDLHukU1iDQ7LDGcvsM8zqsEi5Ryag2rzQyKZ1FdEjCnEFEYaktX2GiNY"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"23ciqLqeRf5ia3Zase13968vuyYXdy9sy1UmNzH4g8LQ","prev_block_hash":"BGjj89jehuAAsevRuYxjUJQYCHPy83yMB15efc3QFBsx","outcome_root":"11111111111111111111111111111111","prev_state_root":"GCUxiSvoF2pyuBJpGgDWAkXf7c9zruW6dP2SjgknemVF","encoded_merkle_root":"8fDpQiLoCjcp4HgN8BdKQpHdksxFDya88gvDwRHbLrZs","encoded_length":237,"height_created":45494,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"BrLejsYGeZL2doe6ZpXQ765Da5pKqizetksozpHiiucS","validator_proposals":[],"signature":"ed25519:34xLVAsZgpX7hxDcZEqzc4xCnw5WGueXDLHukU1iDQ7LDGcvsM8zqsEi5Ryag2rzQyKZ1FdEjCnEFEYaktX2GiNY"},"transactions":[{"transaction":{"priority_fee":0,"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000075,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:25b72WYZjSyiddaqhp8yw6GEmYtFLxUE5eeBCakidfWobk2EVzPrDrpSKW53v5T4LzXpkeLBGDPk2trKegtoozyW","hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"outcome":{"execution_outcome":{"proof":[{"hash":"Bt9voNmDne2LRW2Wt5VCgRPso2Jy5fc8NUPtuxNjHZ7s","direction":"Right"}],"block_hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","id":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9","outcome":{"logs":[],"receipt_ids":["8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"],"gas_burnt":2427970190548,"tokens_burnt":"242797019054800000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"B9RpVa877vT2uLbYVwPBzWSsMV3K6DiDSehKk7L9NvSL","direction":"Left"}],"block_hash":"7dVA5Z3B4tVN38Cr3UzfEwy9RBGBKifFkTENuy7x1rR5","id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","outcome":{"logs":[],"receipt_ids":["7bcvBfjp3H9F6VQJdVf9orWzbz4H1YVWPMCgbPnSpcXc"],"gas_burnt":2575843020487,"tokens_burnt":"257584302048700000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3942480"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"108950880"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"152062560"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJ0ZXh0IjoiQWxvaGEifQ==","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959578806260191572233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959578806260191572233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"8ZwSFbNdHpWVx46w9K5tpzirwJDp9YsScmp4655Vpbwm"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959583242445089672233960","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"5yfvfYtXqcLgfVifZyVgfUnmL8QiY5WCWoj21CYMuJi9"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000075,"permission":"FullAccess"}}}]}]} \ No newline at end of file diff --git a/indexer/test_data/candidates/9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b.json b/indexer/test_data/candidates/9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b.json index d87ad8e6..9351c945 100644 --- a/indexer/test_data/candidates/9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b.json +++ b/indexer/test_data/candidates/9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b.json @@ -1 +1 @@ -{"block":{"author":"test.near","header":{"height":20698,"prev_height":20697,"epoch_id":"CMnJcardk5opU55K3Et8BXYqnkgVGT3KtTWGqcLHtmMW","next_epoch_id":"9nUfmUGN4N723qzHvz9iadU2ZyBMKgGLmMZFbGUWpqKf","hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","prev_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","prev_state_root":"3VsNYUDXjziK1Gh5cRcJyXpjudPh3cjTzS8XR1Atv1k1","block_body_hash":"CJHjip8XBJryCjV8mbtMjH3UgjWjQHFYVDJPWAV3PoJh","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"3NW4xy9p4EjHQYZ3cgLSTfpRTbnrYt3JxamSAfwNsThm","chunk_tx_root":"8HsRHvCQMDRPRFsAgDRjsZjs98LsnbuyARNXswb9FPFk","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1705483122040186000,"timestamp_nanosec":"1705483122040186000","random_value":"GRxxxAVLQQuN7sAXqay9oCzynrndSuphTG9mrXh6fiY","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":20619,"rent_paid":"0","validator_reward":"0","total_supply":"2057726651765659617454023914896514","challenges_result":[],"last_final_block":"FFV2akG4vMF1LJ17ff2Jy2u21W4mFKzXwepCVRsxmWx","last_ds_final_block":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","next_bp_hash":"C91UJTp3cn2wKoVpAArhq6hRXWFKBxjJ56cCxQaTR9f8","block_merkle_root":"6zw3KU77Zh7mXV5HFBtascbumiJdYSnZAEanY51mShSt","epoch_sync_data_hash":null,"approvals":["ed25519:5iJTKgspRYNzdwe72tnwtUnq77gfLgG3chM26sZicXkguSPTwcSoAwMm8yFm7GF13X7NFXhQNBrK43t8q9aBmgsQ"],"signature":"ed25519:63QB6kY4RrjT4CwhhDddHcguJNk4jppnX5mFgP6kFNdVPS574p6XGfDKuEFNZBFNLoYsKPBFvWJ3aK2wc9B91Y2n","latest_protocol_version":64},"chunks":[{"chunk_hash":"79Sa7iLgt6gMmPZvHXRXCVjQUReRsbvCLmCFXwFmoMey","prev_block_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","outcome_root":"11111111111111111111111111111111","prev_state_root":"81SNysrQR7Cyfirm4ZX3yB3YySxUTien5LSPNzGh1SoP","encoded_merkle_root":"BKK9nmVJimi6VgcwkdLesrXNP324SAhVgknj3Czj123W","encoded_length":240,"height_created":20698,"height_included":20698,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"3hS1fKVbrG5LiBcKwtsmKjrQN8mrURZcaqrzrCAbcMtz","validator_proposals":[],"signature":"ed25519:5CjxmCb34FdWZerQKNh3JQQpwbmPBkFyUyydkrd4X3e4Hazo5ExXLrsZKnutoAcfbQxR5vGU2obs9mptjsyJ6ABb"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"79Sa7iLgt6gMmPZvHXRXCVjQUReRsbvCLmCFXwFmoMey","prev_block_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","outcome_root":"11111111111111111111111111111111","prev_state_root":"81SNysrQR7Cyfirm4ZX3yB3YySxUTien5LSPNzGh1SoP","encoded_merkle_root":"BKK9nmVJimi6VgcwkdLesrXNP324SAhVgknj3Czj123W","encoded_length":240,"height_created":20698,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"3hS1fKVbrG5LiBcKwtsmKjrQN8mrURZcaqrzrCAbcMtz","validator_proposals":[],"signature":"ed25519:5CjxmCb34FdWZerQKNh3JQQpwbmPBkFyUyydkrd4X3e4Hazo5ExXLrsZKnutoAcfbQxR5vGU2obs9mptjsyJ6ABb"},"transactions":[{"transaction":{"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000048,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:5EQ5FW8Gpp3MFbh5JNfL1ZtWfyDZDGz58DYbUWVgoqg6YnzJA6jESnJE9KjbuXYghdGMgP48yhCsdmNUy4VKd9J7","hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"outcome":{"execution_outcome":{"proof":[{"hash":"4MRZWSWoMPm34NzVQXHa36GicmKGym2uudNqCPH72xzc","direction":"Right"}],"block_hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","id":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef","outcome":{"logs":[],"receipt_ids":["D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"],"gas_burnt":2427976898350,"tokens_burnt":"242797689835000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"746yoMpBrdHCKGbb5v88Wz7cV2pGLui51XvcEreeer84","direction":"Left"}],"block_hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","outcome":{"logs":[],"receipt_ids":["DLM5dSvfNb5BPasqU8xNjwZBajR5FZQVmew7Swq9jHJ4"],"gas_burnt":2575869599983,"tokens_burnt":"257586959998300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"4238166"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"117122196"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"163467252"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972928372489495131629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972928372489495131629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972932809270544031629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000048,"permission":"FullAccess"}}}]}]} \ No newline at end of file +{"block":{"author":"test.near","header":{"height":20698,"prev_height":20697,"epoch_id":"CMnJcardk5opU55K3Et8BXYqnkgVGT3KtTWGqcLHtmMW","next_epoch_id":"9nUfmUGN4N723qzHvz9iadU2ZyBMKgGLmMZFbGUWpqKf","hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","prev_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","prev_state_root":"3VsNYUDXjziK1Gh5cRcJyXpjudPh3cjTzS8XR1Atv1k1","block_body_hash":"CJHjip8XBJryCjV8mbtMjH3UgjWjQHFYVDJPWAV3PoJh","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"3NW4xy9p4EjHQYZ3cgLSTfpRTbnrYt3JxamSAfwNsThm","chunk_tx_root":"8HsRHvCQMDRPRFsAgDRjsZjs98LsnbuyARNXswb9FPFk","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1705483122040186000,"timestamp_nanosec":"1705483122040186000","random_value":"GRxxxAVLQQuN7sAXqay9oCzynrndSuphTG9mrXh6fiY","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":20619,"rent_paid":"0","validator_reward":"0","total_supply":"2057726651765659617454023914896514","challenges_result":[],"last_final_block":"FFV2akG4vMF1LJ17ff2Jy2u21W4mFKzXwepCVRsxmWx","last_ds_final_block":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","next_bp_hash":"C91UJTp3cn2wKoVpAArhq6hRXWFKBxjJ56cCxQaTR9f8","block_merkle_root":"6zw3KU77Zh7mXV5HFBtascbumiJdYSnZAEanY51mShSt","epoch_sync_data_hash":null,"approvals":["ed25519:5iJTKgspRYNzdwe72tnwtUnq77gfLgG3chM26sZicXkguSPTwcSoAwMm8yFm7GF13X7NFXhQNBrK43t8q9aBmgsQ"],"signature":"ed25519:63QB6kY4RrjT4CwhhDddHcguJNk4jppnX5mFgP6kFNdVPS574p6XGfDKuEFNZBFNLoYsKPBFvWJ3aK2wc9B91Y2n","latest_protocol_version":64},"chunks":[{"chunk_hash":"79Sa7iLgt6gMmPZvHXRXCVjQUReRsbvCLmCFXwFmoMey","prev_block_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","outcome_root":"11111111111111111111111111111111","prev_state_root":"81SNysrQR7Cyfirm4ZX3yB3YySxUTien5LSPNzGh1SoP","encoded_merkle_root":"BKK9nmVJimi6VgcwkdLesrXNP324SAhVgknj3Czj123W","encoded_length":240,"height_created":20698,"height_included":20698,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"3hS1fKVbrG5LiBcKwtsmKjrQN8mrURZcaqrzrCAbcMtz","validator_proposals":[],"signature":"ed25519:5CjxmCb34FdWZerQKNh3JQQpwbmPBkFyUyydkrd4X3e4Hazo5ExXLrsZKnutoAcfbQxR5vGU2obs9mptjsyJ6ABb"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"79Sa7iLgt6gMmPZvHXRXCVjQUReRsbvCLmCFXwFmoMey","prev_block_hash":"6zn12vnznJwmoSX8stU4dSpsuxW8FnrixXkhuSsVktrC","outcome_root":"11111111111111111111111111111111","prev_state_root":"81SNysrQR7Cyfirm4ZX3yB3YySxUTien5LSPNzGh1SoP","encoded_merkle_root":"BKK9nmVJimi6VgcwkdLesrXNP324SAhVgknj3Czj123W","encoded_length":240,"height_created":20698,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"3hS1fKVbrG5LiBcKwtsmKjrQN8mrURZcaqrzrCAbcMtz","validator_proposals":[],"signature":"ed25519:5CjxmCb34FdWZerQKNh3JQQpwbmPBkFyUyydkrd4X3e4Hazo5ExXLrsZKnutoAcfbQxR5vGU2obs9mptjsyJ6ABb"},"transactions":[{"transaction":{"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000048,"receiver_id":"da.test.near","priority_fee":0,"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:5EQ5FW8Gpp3MFbh5JNfL1ZtWfyDZDGz58DYbUWVgoqg6YnzJA6jESnJE9KjbuXYghdGMgP48yhCsdmNUy4VKd9J7","hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"outcome":{"execution_outcome":{"proof":[{"hash":"4MRZWSWoMPm34NzVQXHa36GicmKGym2uudNqCPH72xzc","direction":"Right"}],"block_hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","id":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef","outcome":{"logs":[],"receipt_ids":["D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"],"gas_burnt":2427976898350,"tokens_burnt":"242797689835000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"746yoMpBrdHCKGbb5v88Wz7cV2pGLui51XvcEreeer84","direction":"Left"}],"block_hash":"9zwSzRUA9xH3SXoeZkS7tQXFupEJz9f5XZdNbB3sgK2b","id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","outcome":{"logs":[],"receipt_ids":["DLM5dSvfNb5BPasqU8xNjwZBajR5FZQVmew7Swq9jHJ4"],"gas_burnt":2575869599983,"tokens_burnt":"257586959998300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"4238166"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"117122196"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"163467252"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmczIjozLCJhcmc0IjoyfQ==","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972928372489495131629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972928372489495131629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"D8amXow9Y2DxE57PwyYN6UQHezbQXTqSt7q51bVweErG"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99972932809270544031629500","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"Hm9eSkit6WDrLRpjjvTe78kyR4fFd52hvhMcPqKoa1ef"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000048,"permission":"FullAccess"}}}]}]} \ No newline at end of file diff --git a/indexer/test_data/candidates/AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa.json b/indexer/test_data/candidates/AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa.json index 4a0d19ec..5682ed32 100644 --- a/indexer/test_data/candidates/AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa.json +++ b/indexer/test_data/candidates/AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa.json @@ -1 +1 @@ -{"block":{"author":"test.near","header":{"height":45573,"prev_height":45572,"epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","next_epoch_id":"Ch4bp426GrTbuuMxhoFhoBV7oCzeRyw7rPP6BNARnaHu","hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","prev_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","prev_state_root":"F4YR5JhTXneH5ZLhcHWZDX3QESb2DHy6TGscyVBvsysM","block_body_hash":"DiQXUS7TsqxhCErhSqbkK9WxT2QgXEk6iutAv5PMGbmX","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"DZL9zXLwRYYVZsCVtDePEniVDCT4ityddiEipj8QnDA5","chunk_tx_root":"G2MjizDEzxCHhkoNu7U7oJT2cWCpS28oSmxs4zcoheQm","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136317429970000,"timestamp_nanosec":"1712136317429970000","random_value":"DHh3hX4JKtStebCthdCgnETf9MXAEoP68iT75C449gtw","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45469,"rent_paid":"0","validator_reward":"0","total_supply":"2080376991499652586745873350984976","challenges_result":[],"last_final_block":"AcmtUMM4KEuFZvEL6C31eKRCb8H1BE9HDt4DoQgssWx","last_ds_final_block":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","next_bp_hash":"BUt5pmFdnnPQ98hvyHEiXhXR2N3DYUpRJ8RLA27AXpKE","block_merkle_root":"3Keqa5hNyihtjTXJDpPxuP8Kvic8Ryq9V6hMoH8iQUiT","epoch_sync_data_hash":null,"approvals":["ed25519:4h6dY8dYhNgwDdWXYNtK4YcXAK55DPaN1zEkUDGZTTFXrVPV7sdA9Xm8j946aNWRB5vkSHzrHXj5k1pE9J77VSpP"],"signature":"ed25519:2J87gEM3FPhaExwdmCASARmHfPgQN7ho8KJd17YmkF7d1BLM74jyqcmEagxUhcDZuyGARpaUTs7eE29iFjkdppBm","latest_protocol_version":64},"chunks":[{"chunk_hash":"F7KdAxV81d9U2vAz2Z2aiPLJZm9mpzWRDbVNNvyK5ZXr","prev_block_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","outcome_root":"11111111111111111111111111111111","prev_state_root":"B5BvEvy7qeCoGt7dAodXjhKrU6vvPuRiyTC12C8FEcx1","encoded_merkle_root":"26BSZwi83ryJvvUQddsJz4XxwrjwdoQjxa7XMtxYNA1p","encoded_length":230,"height_created":45573,"height_included":45573,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"HR9J4UXCrtSDJwRQQBGpwL5jrhVUNc1Sj13fKAqziHrB","validator_proposals":[],"signature":"ed25519:YwWRjmTxLRqCpbqLVhZYxthHLWJow8TaGeVqyXTH7gaaDWkUDDPcrKdp6mDQNqS9H8qZLqjhavd67oBEpz6YzqT"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"F7KdAxV81d9U2vAz2Z2aiPLJZm9mpzWRDbVNNvyK5ZXr","prev_block_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","outcome_root":"11111111111111111111111111111111","prev_state_root":"B5BvEvy7qeCoGt7dAodXjhKrU6vvPuRiyTC12C8FEcx1","encoded_merkle_root":"26BSZwi83ryJvvUQddsJz4XxwrjwdoQjxa7XMtxYNA1p","encoded_length":230,"height_created":45573,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"HR9J4UXCrtSDJwRQQBGpwL5jrhVUNc1Sj13fKAqziHrB","validator_proposals":[],"signature":"ed25519:YwWRjmTxLRqCpbqLVhZYxthHLWJow8TaGeVqyXTH7gaaDWkUDDPcrKdp6mDQNqS9H8qZLqjhavd67oBEpz6YzqT"},"transactions":[{"transaction":{"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000077,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:4JZH6mE4q4wGPiNZJK1WVwxnySJkWVJbDR2KhorRdT5Bo4dhVE8pb6TEMumC19FS4zbNeHAb3tcirau18WzeVxUT","hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"outcome":{"execution_outcome":{"proof":[{"hash":"BkqKwPwa95NHHyyskKd1NjCKN5xwKRFc4y5fMz56MDpL","direction":"Right"}],"block_hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","id":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc","outcome":{"logs":[],"receipt_ids":["8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"],"gas_burnt":2427954539010,"tokens_burnt":"242795453901000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"AkdF2JbB9Eyb3CL6QqKFMCSbnRGoLyd5nLuXjJ9ZhLtw","direction":"Left"}],"block_hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","outcome":{"logs":[],"receipt_ids":["EExgvxnFr9ViJyrfPwsGu3nWVyqmCq2YChp7NECTfDqk"],"gas_burnt":2575781001663,"tokens_burnt":"257578100166300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3252546"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"89884476"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"125451612"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958586925797827666977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958586925797827666977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958591360591707166977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000077,"permission":"FullAccess"}}}]}]} \ No newline at end of file +{"block":{"author":"test.near","header":{"height":45573,"prev_height":45572,"epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","next_epoch_id":"Ch4bp426GrTbuuMxhoFhoBV7oCzeRyw7rPP6BNARnaHu","hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","prev_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","prev_state_root":"F4YR5JhTXneH5ZLhcHWZDX3QESb2DHy6TGscyVBvsysM","block_body_hash":"DiQXUS7TsqxhCErhSqbkK9WxT2QgXEk6iutAv5PMGbmX","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"DZL9zXLwRYYVZsCVtDePEniVDCT4ityddiEipj8QnDA5","chunk_tx_root":"G2MjizDEzxCHhkoNu7U7oJT2cWCpS28oSmxs4zcoheQm","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136317429970000,"timestamp_nanosec":"1712136317429970000","random_value":"DHh3hX4JKtStebCthdCgnETf9MXAEoP68iT75C449gtw","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45469,"rent_paid":"0","validator_reward":"0","total_supply":"2080376991499652586745873350984976","challenges_result":[],"last_final_block":"AcmtUMM4KEuFZvEL6C31eKRCb8H1BE9HDt4DoQgssWx","last_ds_final_block":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","next_bp_hash":"BUt5pmFdnnPQ98hvyHEiXhXR2N3DYUpRJ8RLA27AXpKE","block_merkle_root":"3Keqa5hNyihtjTXJDpPxuP8Kvic8Ryq9V6hMoH8iQUiT","epoch_sync_data_hash":null,"approvals":["ed25519:4h6dY8dYhNgwDdWXYNtK4YcXAK55DPaN1zEkUDGZTTFXrVPV7sdA9Xm8j946aNWRB5vkSHzrHXj5k1pE9J77VSpP"],"signature":"ed25519:2J87gEM3FPhaExwdmCASARmHfPgQN7ho8KJd17YmkF7d1BLM74jyqcmEagxUhcDZuyGARpaUTs7eE29iFjkdppBm","latest_protocol_version":64},"chunks":[{"chunk_hash":"F7KdAxV81d9U2vAz2Z2aiPLJZm9mpzWRDbVNNvyK5ZXr","prev_block_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","outcome_root":"11111111111111111111111111111111","prev_state_root":"B5BvEvy7qeCoGt7dAodXjhKrU6vvPuRiyTC12C8FEcx1","encoded_merkle_root":"26BSZwi83ryJvvUQddsJz4XxwrjwdoQjxa7XMtxYNA1p","encoded_length":230,"height_created":45573,"height_included":45573,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"HR9J4UXCrtSDJwRQQBGpwL5jrhVUNc1Sj13fKAqziHrB","validator_proposals":[],"signature":"ed25519:YwWRjmTxLRqCpbqLVhZYxthHLWJow8TaGeVqyXTH7gaaDWkUDDPcrKdp6mDQNqS9H8qZLqjhavd67oBEpz6YzqT"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"F7KdAxV81d9U2vAz2Z2aiPLJZm9mpzWRDbVNNvyK5ZXr","prev_block_hash":"2vqoUi31iNeE6GFeEZFqyeWXBJNRNzahNxfY7thVAkYX","outcome_root":"11111111111111111111111111111111","prev_state_root":"B5BvEvy7qeCoGt7dAodXjhKrU6vvPuRiyTC12C8FEcx1","encoded_merkle_root":"26BSZwi83ryJvvUQddsJz4XxwrjwdoQjxa7XMtxYNA1p","encoded_length":230,"height_created":45573,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"HR9J4UXCrtSDJwRQQBGpwL5jrhVUNc1Sj13fKAqziHrB","validator_proposals":[],"signature":"ed25519:YwWRjmTxLRqCpbqLVhZYxthHLWJow8TaGeVqyXTH7gaaDWkUDDPcrKdp6mDQNqS9H8qZLqjhavd67oBEpz6YzqT"},"transactions":[{"transaction":{"priority_fee":0,"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000077,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:4JZH6mE4q4wGPiNZJK1WVwxnySJkWVJbDR2KhorRdT5Bo4dhVE8pb6TEMumC19FS4zbNeHAb3tcirau18WzeVxUT","hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"outcome":{"execution_outcome":{"proof":[{"hash":"BkqKwPwa95NHHyyskKd1NjCKN5xwKRFc4y5fMz56MDpL","direction":"Right"}],"block_hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","id":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc","outcome":{"logs":[],"receipt_ids":["8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"],"gas_burnt":2427954539010,"tokens_burnt":"242795453901000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"AkdF2JbB9Eyb3CL6QqKFMCSbnRGoLyd5nLuXjJ9ZhLtw","direction":"Left"}],"block_hash":"AFhRAEcgFpV3SPvAQ4DF5QArCiPQgu6aSibPLCqsrvWa","id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","outcome":{"logs":[],"receipt_ids":["EExgvxnFr9ViJyrfPwsGu3nWVyqmCq2YChp7NECTfDqk"],"gas_burnt":2575781001663,"tokens_burnt":"257578100166300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3252546"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"89884476"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"125451612"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958586925797827666977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958586925797827666977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"8k43iA164wRGKDZekjHuNTVNFVexPFUmz71cNCnRh2ou"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99958591360591707166977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"EpYUUmFnkQo2kh958m7mNr7UPb2fiqSWkASWF5wzLDWc"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000077,"permission":"FullAccess"}}}]}]} \ No newline at end of file diff --git a/indexer/test_data/candidates/HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18.json b/indexer/test_data/candidates/HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18.json index d40507a2..731e2f17 100644 --- a/indexer/test_data/candidates/HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18.json +++ b/indexer/test_data/candidates/HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18.json @@ -1 +1 @@ -{"block":{"author":"test.near","header":{"height":45546,"prev_height":45545,"epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","next_epoch_id":"Ch4bp426GrTbuuMxhoFhoBV7oCzeRyw7rPP6BNARnaHu","hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","prev_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","prev_state_root":"FgSyVMwKpZNEkZGypzqytUafT8HFsL9GphDgSsKq8Goi","block_body_hash":"79tJRBZpaGWUTLH2EGGAGfSqteHFMcoH4uRFnRdY69F","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"o97r29NVyeCBhFZp23TZe8Pi6EmNGeFgJpd4Rji9pSj","chunk_tx_root":"7ny5Z55CtZpCxfCjg7vBa9uxcKWuLjc9JcAJeSWMg4m1","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136300728082000,"timestamp_nanosec":"1712136300728082000","random_value":"GuafCAcM7WTzWjGov8cF8sMnBffL1TEkEeKrhwqUkFFt","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45442,"rent_paid":"0","validator_reward":"0","total_supply":"2080376991500148525506061150984976","challenges_result":[],"last_final_block":"FVKB7J3qLRTGb3t7P41sdzx1YFqQYKySJAmKF8Do8r9U","last_ds_final_block":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","next_bp_hash":"BUt5pmFdnnPQ98hvyHEiXhXR2N3DYUpRJ8RLA27AXpKE","block_merkle_root":"9nxsfJV5hG4r2hmYes8MPFEQbkvSgRLnMWpAy1CJgsZE","epoch_sync_data_hash":null,"approvals":["ed25519:s6WvBGZPtmE5U5XTmJhMEz6kvMVZSqYQqu8GXryPvtyodcpizG3rg7PwS3yog9ThGEH71yoC21NMPgfQFgM9eus"],"signature":"ed25519:4xEaEKXKBt4ciBsC9cFsWD2pfDMSC2tX7p7c4eFPdwD7XiT1Zcbzj12nCeouaDpfnjJch7R4ku9v7JHGYRNr1pfg","latest_protocol_version":64},"chunks":[{"chunk_hash":"6NXsCLF2HWSn8pRw7Nonb34VtZyiyFyK3iVm8ycPucHK","prev_block_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","outcome_root":"11111111111111111111111111111111","prev_state_root":"Fwep6RG6Jt4YstGrJ5Z51bFHtojhsE62m43oyxjTPVPC","encoded_merkle_root":"GpVdeADTkxm73mHYaZv6RWvGDv8J8HE27zusK1roToA1","encoded_length":230,"height_created":45546,"height_included":45546,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"GekgbPeYX2tM2cguXPiXAy4PrxoNriL3Vc75w3tPquFx","validator_proposals":[],"signature":"ed25519:AJC4BwFn6m1aRXPFomLZf347ChmSX6MfGqJwHsmRZC54B9757PkobH9c6j6qNjmLuiwyTmtPF11Q6cuwzXcTFHr"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"6NXsCLF2HWSn8pRw7Nonb34VtZyiyFyK3iVm8ycPucHK","prev_block_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","outcome_root":"11111111111111111111111111111111","prev_state_root":"Fwep6RG6Jt4YstGrJ5Z51bFHtojhsE62m43oyxjTPVPC","encoded_merkle_root":"GpVdeADTkxm73mHYaZv6RWvGDv8J8HE27zusK1roToA1","encoded_length":230,"height_created":45546,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"GekgbPeYX2tM2cguXPiXAy4PrxoNriL3Vc75w3tPquFx","validator_proposals":[],"signature":"ed25519:AJC4BwFn6m1aRXPFomLZf347ChmSX6MfGqJwHsmRZC54B9757PkobH9c6j6qNjmLuiwyTmtPF11Q6cuwzXcTFHr"},"transactions":[{"transaction":{"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000076,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:2rRkV7oSqiBKBcw9Npd79U1Sud84zGeaU12iQQV7YVfofXYd6AbiqkSBD94T7mvfbeHphr7swp5hvuTPK175UALz","hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"outcome":{"execution_outcome":{"proof":[{"hash":"7rjuH4tf61MM2vo2XxT6LcwpY36xurWUFuEVFmr3JA8N","direction":"Right"}],"block_hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","id":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8","outcome":{"logs":[],"receipt_ids":["7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"],"gas_burnt":2427954539010,"tokens_burnt":"242795453901000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"AJ46727JkMeoQyhkV9JmiBSKQvhMA17xAv4JBR7ozACk","direction":"Left"}],"block_hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","outcome":{"logs":[],"receipt_ids":["2y5YoNEmN5GioXbHJaYb6H12ky3BCmCFHtiaHnmyjUmq"],"gas_burnt":2575781001663,"tokens_burnt":"257578100166300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3252546"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"89884476"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"125451612"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959082864558015466977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959082864558015466977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959087299351894966977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000076,"permission":"FullAccess"}}}]}]} \ No newline at end of file +{"block":{"author":"test.near","header":{"height":45546,"prev_height":45545,"epoch_id":"DyJqzm3mAuDc36X7nqEfZe8ASkLWFHtt3e7Hqey66WB8","next_epoch_id":"Ch4bp426GrTbuuMxhoFhoBV7oCzeRyw7rPP6BNARnaHu","hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","prev_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","prev_state_root":"FgSyVMwKpZNEkZGypzqytUafT8HFsL9GphDgSsKq8Goi","block_body_hash":"79tJRBZpaGWUTLH2EGGAGfSqteHFMcoH4uRFnRdY69F","chunk_receipts_root":"9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv","chunk_headers_root":"o97r29NVyeCBhFZp23TZe8Pi6EmNGeFgJpd4Rji9pSj","chunk_tx_root":"7ny5Z55CtZpCxfCjg7vBa9uxcKWuLjc9JcAJeSWMg4m1","outcome_root":"7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t","chunks_included":1,"challenges_root":"11111111111111111111111111111111","timestamp":1712136300728082000,"timestamp_nanosec":"1712136300728082000","random_value":"GuafCAcM7WTzWjGov8cF8sMnBffL1TEkEeKrhwqUkFFt","validator_proposals":[],"chunk_mask":[true],"gas_price":"100000000","block_ordinal":45442,"rent_paid":"0","validator_reward":"0","total_supply":"2080376991500148525506061150984976","challenges_result":[],"last_final_block":"FVKB7J3qLRTGb3t7P41sdzx1YFqQYKySJAmKF8Do8r9U","last_ds_final_block":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","next_bp_hash":"BUt5pmFdnnPQ98hvyHEiXhXR2N3DYUpRJ8RLA27AXpKE","block_merkle_root":"9nxsfJV5hG4r2hmYes8MPFEQbkvSgRLnMWpAy1CJgsZE","epoch_sync_data_hash":null,"approvals":["ed25519:s6WvBGZPtmE5U5XTmJhMEz6kvMVZSqYQqu8GXryPvtyodcpizG3rg7PwS3yog9ThGEH71yoC21NMPgfQFgM9eus"],"signature":"ed25519:4xEaEKXKBt4ciBsC9cFsWD2pfDMSC2tX7p7c4eFPdwD7XiT1Zcbzj12nCeouaDpfnjJch7R4ku9v7JHGYRNr1pfg","latest_protocol_version":64},"chunks":[{"chunk_hash":"6NXsCLF2HWSn8pRw7Nonb34VtZyiyFyK3iVm8ycPucHK","prev_block_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","outcome_root":"11111111111111111111111111111111","prev_state_root":"Fwep6RG6Jt4YstGrJ5Z51bFHtojhsE62m43oyxjTPVPC","encoded_merkle_root":"GpVdeADTkxm73mHYaZv6RWvGDv8J8HE27zusK1roToA1","encoded_length":230,"height_created":45546,"height_included":45546,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"GekgbPeYX2tM2cguXPiXAy4PrxoNriL3Vc75w3tPquFx","validator_proposals":[],"signature":"ed25519:AJC4BwFn6m1aRXPFomLZf347ChmSX6MfGqJwHsmRZC54B9757PkobH9c6j6qNjmLuiwyTmtPF11Q6cuwzXcTFHr"}]},"shards":[{"shard_id":0,"chunk":{"author":"test.near","header":{"chunk_hash":"6NXsCLF2HWSn8pRw7Nonb34VtZyiyFyK3iVm8ycPucHK","prev_block_hash":"3DE7kshnvgRRc8fi4aL7HwFsdA9z86bUrAVjiM1mhk4g","outcome_root":"11111111111111111111111111111111","prev_state_root":"Fwep6RG6Jt4YstGrJ5Z51bFHtojhsE62m43oyxjTPVPC","encoded_merkle_root":"GpVdeADTkxm73mHYaZv6RWvGDv8J8HE27zusK1roToA1","encoded_length":230,"height_created":45546,"height_included":0,"shard_id":0,"gas_used":0,"gas_limit":1000000000000000,"rent_paid":"0","validator_reward":"0","balance_burnt":"0","outgoing_receipts_root":"H4Rd6SGeEBTbxkitsCdzfu9xL9HtZ2eHoPCQXUeZ6bW4","tx_root":"GekgbPeYX2tM2cguXPiXAy4PrxoNriL3Vc75w3tPquFx","validator_proposals":[],"signature":"ed25519:AJC4BwFn6m1aRXPFomLZf347ChmSX6MfGqJwHsmRZC54B9757PkobH9c6j6qNjmLuiwyTmtPF11Q6cuwzXcTFHr"},"transactions":[{"transaction":{"priority_fee":0,"signer_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","nonce":6781000076,"receiver_id":"da.test.near","actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}],"signature":"ed25519:2rRkV7oSqiBKBcw9Npd79U1Sud84zGeaU12iQQV7YVfofXYd6AbiqkSBD94T7mvfbeHphr7swp5hvuTPK175UALz","hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"outcome":{"execution_outcome":{"proof":[{"hash":"7rjuH4tf61MM2vo2XxT6LcwpY36xurWUFuEVFmr3JA8N","direction":"Right"}],"block_hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","id":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8","outcome":{"logs":[],"receipt_ids":["7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"],"gas_burnt":2427954539010,"tokens_burnt":"242795453901000000000","executor_id":"da.test.near","status":{"SuccessReceiptId":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"metadata":{"version":1,"gas_profile":null}}},"receipt":null}}],"receipts":[{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}]},"receipt_execution_outcomes":[{"execution_outcome":{"proof":[{"hash":"AJ46727JkMeoQyhkV9JmiBSKQvhMA17xAv4JBR7ozACk","direction":"Left"}],"block_hash":"HKnmoD4cpBStpdWC1Mahm1NRWc4FZayjUEURzGuWpU18","id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","outcome":{"logs":[],"receipt_ids":["2y5YoNEmN5GioXbHJaYb6H12ky3BCmCFHtiaHnmyjUmq"],"gas_burnt":2575781001663,"tokens_burnt":"257578100166300000000","executor_id":"da.test.near","status":{"SuccessValue":""},"metadata":{"version":3,"gas_profile":[{"cost_category":"WASM_HOST_COST","cost":"BASE","gas_used":"2647681110"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BASE","gas_used":"35445963"},{"cost_category":"WASM_HOST_COST","cost":"CONTRACT_LOADING_BYTES","gas_used":"1874020500"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BASE","gas_used":"5219726400"},{"cost_category":"WASM_HOST_COST","cost":"READ_MEMORY_BYTE","gas_used":"7602666"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BASE","gas_used":"7551495558"},{"cost_category":"WASM_HOST_COST","cost":"READ_REGISTER_BYTE","gas_used":"3252546"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BASE","gas_used":"54039896625"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_HAS_KEY_BYTE","gas_used":"30790845"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_BASE","gas_used":"56356845750"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_KEY_BYTE","gas_used":"30952533"},{"cost_category":"WASM_HOST_COST","cost":"STORAGE_READ_VALUE_BYTE","gas_used":"67332060"},{"cost_category":"WASM_HOST_COST","cost":"WASM_INSTRUCTION","gas_used":"2738131968"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BASE","gas_used":"8411384583"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_MEMORY_BYTE","gas_used":"89884476"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BASE","gas_used":"8596567458"},{"cost_category":"WASM_HOST_COST","cost":"WRITE_REGISTER_BYTE","gas_used":"125451612"}]}}},"receipt":{"predecessor_id":"da.test.near","receiver_id":"da.test.near","receipt_id":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD","priority":0,"receipt":{"Action":{"signer_id":"da.test.near","signer_public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","gas_price":"119405230","output_data_receivers":[],"input_data_ids":[],"actions":[{"FunctionCall":{"method_name":"submit","args":"eyJhcmciOjF9","gas":30000000000000,"deposit":"0"}}]}}}}],"state_changes":[{"cause":{"type":"transaction_processing","tx_hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959082864558015466977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"receipt_processing","receipt_hash":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959082864558015466977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"action_receipt_gas_reward","receipt_hash":"7rbQU1cWoGiQuUQjTTKoxzpQkQmA3cGLKLYSaSQsM5GD"},"type":"account_update","change":{"account_id":"da.test.near","amount":"99959087299351894966977700","locked":"0","code_hash":"AGe5t2yJ1NgyxxfvNfSenyY5w1mJybuoK3fKcY1juNwd","storage_usage":8923,"storage_paid_at":0}},{"cause":{"type":"transaction_processing","tx_hash":"J7Rq24qywM5XiyZX1cmbEkrBWN77gh4i4mcMFA52S6R8"},"type":"access_key_update","change":{"account_id":"da.test.near","public_key":"ed25519:H2BvchWN5XvzhCzoCqRzapPwe6zDfMDw6nrFuxnMyha","access_key":{"nonce":6781000076,"permission":"FullAccess"}}}]}]} \ No newline at end of file From 683f887e42e6b3227b59c32c32289ddcd338e3cb Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 11:29:22 +0200 Subject: [PATCH 33/96] wip: changes on docker --- indexer/src/fastnear_indexer.rs | 2 +- setup/relayer-rs/docker-compose.yml | 60 ++++++++++++++--------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index a5db93a7..52b8f4c5 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -102,7 +102,7 @@ impl FastNearIndexer { for shard in block.shards { for receipt_execution_outcome in shard.receipt_execution_outcomes { let receiver_id = &receipt_execution_outcome.receipt.receiver_id; - + debug!(target: "fastnear_indexer", "Processing receipt for receiver_id: {}", receiver_id); if let Some(rollup_id) = addresses_to_rollup_ids.get(receiver_id) { trace!(target: "fastnear_indexer", "Processing receipt for rollup_id: {}", rollup_id); if !Self::is_successful_execution(&receipt_execution_outcome) { diff --git a/setup/relayer-rs/docker-compose.yml b/setup/relayer-rs/docker-compose.yml index 1d2e4b22..f999110e 100644 --- a/setup/relayer-rs/docker-compose.yml +++ b/setup/relayer-rs/docker-compose.yml @@ -5,36 +5,36 @@ networks: driver: bridge services: - relayer_431614_rs: - build: - context: ../../relayer-rs - dockerfile: Dockerfile - container_name: near-sffl-relayer-rs-421614 - volumes: - - ${NEAR_KEYS_DIR}:/root/.near-credentials - networks: - - near-sffl-relayer-rs - expose: - - 9093 - command: - - run-args - - --rpc-url - - wss://arbitrum-sepolia-rpc.publicnode.com - - --da-account-id - - sfrelayer431614-2.testnet - - --key-path - - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer431614-2.testnet.json - - --network - - ${NEAR_RPC_URL} - - --metrics-ip-port-address - - near-sffl-relayer-rs-431614:9093 - restart: unless-stopped - logging: - driver: "json-file" - options: - max-size: "1g" - max-file: "20" - compress: "true" + # relayer_431614_rs: + # build: + # context: ../../relayer-rs + # dockerfile: Dockerfile + # container_name: near-sffl-relayer-rs-421614 + # volumes: + # - ${NEAR_KEYS_DIR}:/root/.near-credentials + # networks: + # - near-sffl-relayer-rs + # expose: + # - 9093 + # command: + # - run-args + # - --rpc-url + # - wss://arbitrum-sepolia-rpc.publicnode.com + # - --da-account-id + # - sfrelayer431614-2.testnet + # - --key-path + # - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer431614-2.testnet.json + # - --network + # - ${NEAR_RPC_URL} + # - --metrics-ip-port-address + # - near-sffl-relayer-rs-431614:9093 + # restart: unless-stopped + # logging: + # driver: "json-file" + # options: + # max-size: "1g" + # max-file: "20" + # compress: "true" relayer_11155420_rs: build: From e4919d9ed138ed6d7a94ea01f8ba87fd9e4a4918 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 11:36:51 +0200 Subject: [PATCH 34/96] wip: clippy --- relayer-rs/src/metrics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer-rs/src/metrics.rs b/relayer-rs/src/metrics.rs index 397b8d0b..6660b73f 100644 --- a/relayer-rs/src/metrics.rs +++ b/relayer-rs/src/metrics.rs @@ -1,4 +1,4 @@ -use prometheus::{Counter, Encoder, Histogram, HistogramOpts, IntCounter, Registry}; +use prometheus::{Encoder, Histogram, HistogramOpts, IntCounter, Registry}; use std::sync::Arc; use tokio::time::Duration; use warp::Filter; From 88227d8e942ab564052ce3dabb474290f7a23f7c Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 11:50:45 +0200 Subject: [PATCH 35/96] wip: README --- indexer/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/indexer/README.md b/indexer/README.md index c400320b..ba2c128e 100644 --- a/indexer/README.md +++ b/indexer/README.md @@ -21,4 +21,16 @@ $ cargo run --release -- --home-dir ~/.near/localnet/ run --da-contract-id "da.t Now the node have started, and we listen to "submit" method in DA contract. -Use [near-cli](https://github.com/near/near-shell) to "submit" calldata. \ No newline at end of file +Use [near-cli](https://github.com/near/near-shell) to "submit" calldata. + +### FastNear Mode + +To run the Indexer using FastNear endpoints, use the following command: + +```bash +$ cargo run --features use_fastnear -p indexer --release -- --home-dir ~/.near/testnet run --da-contract-ids da.testnet --rollup-ids 2 +``` + +This command will start the indexer using FastNEAR endpoints to fetch NEAR blocks more efficiently. The `--features use_fastnear` flag enables the FastNEAR mode. + +Note: FastNEAR will only work with NEAR mainnet and testnet. For local testing it is recommended to use a local NEAR node. \ No newline at end of file From ccfc34b69c4b9b0a79b4ce92c7da3a9d593208b9 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 11:53:11 +0200 Subject: [PATCH 36/96] wip: docker compose fix --- setup/fastnear-indexer/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml index c0ffacd0..58c3e5bb 100644 --- a/setup/fastnear-indexer/docker-compose.yml +++ b/setup/fastnear-indexer/docker-compose.yml @@ -38,8 +38,8 @@ services: - CHAIN_ID=${NEAR_CHAIN_ID} volumes: - ./:/fastnear-indexer/ - - ${NEAR_HOME_DIR}:/root/.near - - ${NEAR_KEYS_DIR}:/root/.near-credentials + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials command: - --config - /fastnear-indexer/config/indexer.yaml From 916e42bcf2f2dc6a127a0baf8edafbd7db057728 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 13:11:44 +0200 Subject: [PATCH 37/96] wip: building and workign fast near indexer for docker compose --- indexer/Dockerfile | 10 +++++----- indexer/src/main.rs | 2 +- setup/fastnear-indexer/docker-compose.yml | 10 +++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/indexer/Dockerfile b/indexer/Dockerfile index 0f9cf621..5e898fec 100644 --- a/indexer/Dockerfile +++ b/indexer/Dockerfile @@ -14,14 +14,14 @@ RUN apt-get update -qq && \ llvm \ clang -COPY ./indexer/Cargo.toml . +COPY ./Cargo.toml . RUN mkdir ./src && echo "fn main() {}" > ./src/main.rs -RUN cargo build --release -p indexer +RUN cargo build --release -p indexer --features use_fastnear -COPY ./indexer . +COPY . . RUN touch ./src/main.rs -RUN cargo build --release -p indexer +RUN cargo build --release -p indexer --features use_fastnear FROM debian:bookworm-slim as runtime WORKDIR /indexer-app @@ -29,7 +29,7 @@ WORKDIR /indexer-app RUN apt update && apt install -yy openssl ca-certificates jq curl COPY --from=builder /tmp/indexer/target/release/indexer . -COPY ./indexer/entrypoint.sh ./entrypoint.sh +COPY entrypoint.sh ./entrypoint.sh RUN chmod +x ./entrypoint.sh EXPOSE 3030 diff --git a/indexer/src/main.rs b/indexer/src/main.rs index c6db159f..ee157102 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -110,7 +110,7 @@ fn main() -> Result<()> { let env_filter = near_o11y::tracing_subscriber::EnvFilter::new( "nearcore=info,publisher=info,indexer=info,candidates_validator=info,\ metrics=info,tokio_reactor=info,near=info,stats=info,telemetry=info,\ - near-performance-metrics=info,fastnear_indexer=info,fastnear_indexer=debug, fastnear_indexer=trace", + near-performance-metrics=info,fastnear_indexer=info", ); let _subscriber = near_o11y::default_subscriber(env_filter, &Default::default()).global(); let opts: Opts = Opts::parse(); diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml index 58c3e5bb..dc8e15eb 100644 --- a/setup/fastnear-indexer/docker-compose.yml +++ b/setup/fastnear-indexer/docker-compose.yml @@ -35,14 +35,18 @@ services: - "127.0.0.1:3030:3030" - "127.0.0.1:9092:9092" environment: - - CHAIN_ID=${NEAR_CHAIN_ID} + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} volumes: - ./:/fastnear-indexer/ - ${NEAR_HOME_DIR:-~/.near}:/root/.near - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials command: - - --config - - /fastnear-indexer/config/indexer.yaml + - run + - --da-contract-ids + - da.testnet + - --rollup-ids + - "2" + entrypoint: ["/indexer-app/indexer"] restart: unless-stopped networks: - fastnear From 1751c0c44e643e358715e57b7710c19ecc467cbe Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 13:41:38 +0200 Subject: [PATCH 38/96] wip: docker compose fix connect rmq --- setup/fastnear-indexer/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml index dc8e15eb..3cb817d9 100644 --- a/setup/fastnear-indexer/docker-compose.yml +++ b/setup/fastnear-indexer/docker-compose.yml @@ -46,6 +46,8 @@ services: - da.testnet - --rollup-ids - "2" + - --rmq-address + - "amqp://rmq:5672" entrypoint: ["/indexer-app/indexer"] restart: unless-stopped networks: From 8c9161ad59b55d023f4052fce6c366db08c9d213 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 13:55:27 +0200 Subject: [PATCH 39/96] wip: indexer relayer integration docker compose --- .../config/.env.example | 14 +++ .../config/indexer.yaml | 14 +++ .../docker-compose.yml | 94 +++++++++++++++++++ .../prometheus/prometheus.yml | 26 +++++ 4 files changed, 148 insertions(+) create mode 100644 setup/indexer-relayer-testnet/config/.env.example create mode 100644 setup/indexer-relayer-testnet/config/indexer.yaml create mode 100644 setup/indexer-relayer-testnet/docker-compose.yml create mode 100644 setup/indexer-relayer-testnet/prometheus/prometheus.yml diff --git a/setup/indexer-relayer-testnet/config/.env.example b/setup/indexer-relayer-testnet/config/.env.example new file mode 100644 index 00000000..19868c8b --- /dev/null +++ b/setup/indexer-relayer-testnet/config/.env.example @@ -0,0 +1,14 @@ +# Tagged release for SFFL containers +SFFL_RELEASE=latest + +# NEAR chain ID +NEAR_CHAIN_ID=testnet + +# Path to the directory containing the keys for the relayer DA account +NEAR_KEYS_DIR=~/.near-credentials + +# Home dir +NEAR_HOME_DIR=~/.near + +# RPC URL of the NEAR network +NEAR_RPC_URL=https://rpc.testnet.near.org \ No newline at end of file diff --git a/setup/indexer-relayer-testnet/config/indexer.yaml b/setup/indexer-relayer-testnet/config/indexer.yaml new file mode 100644 index 00000000..9e49b0c8 --- /dev/null +++ b/setup/indexer-relayer-testnet/config/indexer.yaml @@ -0,0 +1,14 @@ +# RMQ address +rmq_address: amqp://rmq:5672 + +# AVS network contract IDs +da_contract_ids: + - sfrelayer421614-2.testnet + - sfrelayer21155420-2.testnet + +# Rollup IDs, must follow the same order as da_contract_ids +rollup_ids: + - 421614 + - 11155420 + +metrics_ip_port_address: "0.0.0.0:9092" \ No newline at end of file diff --git a/setup/indexer-relayer-testnet/docker-compose.yml b/setup/indexer-relayer-testnet/docker-compose.yml new file mode 100644 index 00000000..904d99cf --- /dev/null +++ b/setup/indexer-relayer-testnet/docker-compose.yml @@ -0,0 +1,94 @@ +version: "3" + +networks: + fastnear: + name: fastnear + driver: bridge + near-sffl-relayer-rs: + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + build: + context: ../../indexer + dockerfile: Dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + command: + - run + - --da-contract-ids + - sfrelayer21155420-2.testnet + - --rollup-ids + - "2" + - --rmq-address + - "amqp://rmq:5672" + entrypoint: ["/indexer-app/indexer"] + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" + + relayer_11155420_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-21155420 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9094 + command: + - run-args + - --rpc-url + - wss://optimism-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer21155420-2.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer21155420-2.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-21155420:9094 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" \ No newline at end of file diff --git a/setup/indexer-relayer-testnet/prometheus/prometheus.yml b/setup/indexer-relayer-testnet/prometheus/prometheus.yml new file mode 100644 index 00000000..7295f931 --- /dev/null +++ b/setup/indexer-relayer-testnet/prometheus/prometheus.yml @@ -0,0 +1,26 @@ +global: + scrape_interval: 15s + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: "docker-host-alpha" + +# A scrape configuration containing exactly one endpoint to scrape. +scrape_configs: + - job_name: "prometheus" + scrape_interval: 10s + static_configs: + - targets: ["localhost:9090"] + + - job_name: "sffl-relayer-rs" + scrape_interval: 5s + static_configs: + - targets: ["near-sffl-relayer-rs-421614:9093"] + labels: + role: "relayer" + instance: "1" + - targets: ["near-sffl-relayer-rs-11155420:9094"] + labels: + role: "relayer" + instance: "2" \ No newline at end of file From 20b9bf256824f3959b1c07f037d31687f7d5bbe0 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sat, 5 Oct 2024 21:45:40 +0200 Subject: [PATCH 40/96] wip: operator-rs attestor skeleton --- Cargo.lock | 30 ++ Cargo.toml | 1 + operator-rs/src/attestor/event_listener.rs | 142 +++++++++ operator-rs/src/attestor/mod.rs | 327 +++++++++++++++++++++ operator-rs/src/attestor/notifier.rs | 71 +++++ operator-rs/src/lib.rs | 2 +- 6 files changed, 572 insertions(+), 1 deletion(-) create mode 100644 operator-rs/src/attestor/event_listener.rs create mode 100644 operator-rs/src/attestor/mod.rs create mode 100644 operator-rs/src/attestor/notifier.rs diff --git a/Cargo.lock b/Cargo.lock index 708ed878..7383bb5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6555,6 +6555,36 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "operator-rs" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-transport-ws", + "anyhow", + "bincode", + "clap", + "eyre", + "futures-util", + "hex", + "near-da-primitives", + "near-da-rpc", + "prometheus", + "rand 0.8.5", + "serde", + "serde_json", + "serde_yaml", + "tempfile", + "tokio", + "tracing", + "tracing-subscriber", + "warp", +] + [[package]] name = "ordered-float" version = "4.2.2" diff --git a/Cargo.toml b/Cargo.toml index 11fca723..cbefc0fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ members = [ "indexer", "contracts/evm/test/ffi/bls-utils", "relayer-rs", + "operator-rs", ] [workspace.package] diff --git a/operator-rs/src/attestor/event_listener.rs b/operator-rs/src/attestor/event_listener.rs new file mode 100644 index 00000000..1fb1624a --- /dev/null +++ b/operator-rs/src/attestor/event_listener.rs @@ -0,0 +1,142 @@ +use prometheus::{Registry, Counter, CounterVec, Gauge, GaugeVec, opts}; +use anyhow::Result; + +pub trait EventListener: Send + Sync { + fn on_missed_mq_block(&self, rollup_id: u32); + fn on_block_mismatch(&self, rollup_id: u32); + fn on_block_received(&self, rollup_id: u32); + fn observe_last_block_received(&self, rollup_id: u32, block_number: u64); + fn observe_last_block_received_timestamp(&self, rollup_id: u32, timestamp: u64); + fn observe_initialization_initial_block_number(&self, rollup_id: u32, block_number: u64); +} + +pub struct SelectiveEventListener { + on_missed_mq_block_cb: Option>, + on_block_mismatch_cb: Option>, + on_block_received_cb: Option>, + observe_last_block_received_cb: Option>, + observe_last_block_received_timestamp_cb: Option>, + observe_initialization_initial_block_number_cb: Option>, +} + +impl Default for SelectiveEventListener { + fn default() -> Self { + Self { + on_missed_mq_block_cb: None, + on_block_mismatch_cb: None, + on_block_received_cb: None, + observe_last_block_received_cb: None, + observe_last_block_received_timestamp_cb: None, + observe_initialization_initial_block_number_cb: None, + } + } +} + +impl EventListener for SelectiveEventListener { + fn on_missed_mq_block(&self, rollup_id: u32) { + if let Some(cb) = &self.on_missed_mq_block_cb { + cb(rollup_id); + } + } + + fn on_block_mismatch(&self, rollup_id: u32) { + if let Some(cb) = &self.on_block_mismatch_cb { + cb(rollup_id); + } + } + + fn on_block_received(&self, rollup_id: u32) { + if let Some(cb) = &self.on_block_received_cb { + cb(rollup_id); + } + } + + fn observe_last_block_received(&self, rollup_id: u32, block_number: u64) { + if let Some(cb) = &self.observe_last_block_received_cb { + cb(rollup_id, block_number); + } + } + + fn observe_last_block_received_timestamp(&self, rollup_id: u32, timestamp: u64) { + if let Some(cb) = &self.observe_last_block_received_timestamp_cb { + cb(rollup_id, timestamp); + } + } + + fn observe_initialization_initial_block_number(&self, rollup_id: u32, block_number: u64) { + if let Some(cb) = &self.observe_initialization_initial_block_number_cb { + cb(rollup_id, block_number); + } + } +} + +const OPERATOR_NAMESPACE: &str = "sffl_operator"; +const ATTESTOR_SUBSYSTEM: &str = "attestor"; + +pub fn make_attestor_metrics(registry: &Registry) -> Result { + let num_missed_mq_blocks = CounterVec::new( + opts!("num_of_missed_mq_blocks", "The number of late blocks from MQ") + .namespace(OPERATOR_NAMESPACE) + .subsystem(ATTESTOR_SUBSYSTEM), + &["rollup_id"], + )?; + registry.register(Box::new(num_missed_mq_blocks.clone()))?; + + let num_blocks_mismatched = CounterVec::new( + opts!("num_of_mismatched_blocks", "The number of blocks from MQ mismatched with RPC ones") + .namespace(OPERATOR_NAMESPACE) + .subsystem(ATTESTOR_SUBSYSTEM), + &["rollup_id"], + )?; + registry.register(Box::new(num_blocks_mismatched.clone()))?; + + let num_blocks_received = CounterVec::new( + opts!("num_of_received_blocks", "The number of blocks received from RPC") + .namespace(OPERATOR_NAMESPACE) + .subsystem(ATTESTOR_SUBSYSTEM), + &["rollup_id"], + )?; + registry.register(Box::new(num_blocks_received.clone()))?; + + let last_block_received = GaugeVec::new( + opts!("last_block_received", "Last block received per rollup ID") + .namespace(OPERATOR_NAMESPACE), + &["rollup_id"], + )?; + registry.register(Box::new(last_block_received.clone()))?; + + let last_block_received_timestamp = GaugeVec::new( + opts!("last_block_received_timestamp", "Timestamp of last block received per rollup ID") + .namespace(OPERATOR_NAMESPACE), + &["rollup_id"], + )?; + registry.register(Box::new(last_block_received_timestamp.clone()))?; + + let initialization_initial_block_number = GaugeVec::new( + opts!("initialization_initial_block_number", "Initialization initial block number per rollup ID") + .namespace(OPERATOR_NAMESPACE), + &["rollup_id"], + )?; + registry.register(Box::new(initialization_initial_block_number.clone()))?; + + Ok(SelectiveEventListener { + on_missed_mq_block_cb: Some(Box::new(move |rollup_id| { + num_missed_mq_blocks.with_label_values(&[&rollup_id.to_string()]).inc(); + })), + on_block_mismatch_cb: Some(Box::new(move |rollup_id| { + num_blocks_mismatched.with_label_values(&[&rollup_id.to_string()]).inc(); + })), + on_block_received_cb: Some(Box::new(move |rollup_id| { + num_blocks_received.with_label_values(&[&rollup_id.to_string()]).inc(); + })), + observe_last_block_received_cb: Some(Box::new(move |rollup_id, block_number| { + last_block_received.with_label_values(&[&rollup_id.to_string()]).set(block_number as f64); + })), + observe_last_block_received_timestamp_cb: Some(Box::new(move |rollup_id, timestamp| { + last_block_received_timestamp.with_label_values(&[&rollup_id.to_string()]).set(timestamp as f64); + })), + observe_initialization_initial_block_number_cb: Some(Box::new(move |rollup_id, block_number| { + initialization_initial_block_number.with_label_values(&[&rollup_id.to_string()]).set(block_number as f64); + })), + }) +} \ No newline at end of file diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs new file mode 100644 index 00000000..3664c1d7 --- /dev/null +++ b/operator-rs/src/attestor/mod.rs @@ -0,0 +1,327 @@ +mod notifier; +mod event_listener; + +use std::collections::HashMap; +use std::sync::Arc; +use tokio::sync::mpsc; +use tokio::time::{Duration, sleep}; +use anyhow::{Result, anyhow}; +use tracing::{info, warn, error}; +use prometheus::Registry; + +use serde::{Serialize, Deserialize}; +use crate::operator::types::NodeConfig; +use crate::types::messages::SignedStateRootUpdateMessage; +use self::notifier::Notifier; +use self::event_listener::{EventListener, SelectiveEventListener}; + +// Constants +const MQ_WAIT_TIMEOUT: Duration = Duration::from_secs(30); +const MQ_REBROADCAST_TIMEOUT: Duration = Duration::from_secs(15); + +// Mock types (to be replaced with actual implementations) +type SafeClient = Arc; +trait SafeClientTrait: Send + Sync { + fn subscribe_new_head(&self) -> mpsc::Receiver
; + fn block_number(&self) -> u64; + fn close(&self); +} +type Header = (); +type Block = (); +type BlsKeyPair = (); +type OperatorId = [u8; 32]; + +pub struct Attestor { + signed_root_tx: mpsc::Sender, + rollup_ids_to_urls: HashMap, + clients: HashMap, + rpc_calls_collectors: HashMap, // Replace with actual RPC calls collector + notifier: Notifier, + consumer: Consumer, + config: NodeConfig, + bls_keypair: BlsKeyPair, + operator_id: OperatorId, + logger: tracing::Logger, + listener: Box, + registry: Registry, +} + +impl Attestor { + pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry) -> Result { + let consumer = Consumer::new(ConsumerConfig { + rollup_ids: config.near_da_indexer_rollup_ids.clone(), + id: hex::encode(&operator_id), + }); + + let mut clients = HashMap::new(); + let mut rpc_calls_collectors = HashMap::new(); + + for (rollup_id, url) in &config.rollup_ids_to_rpc_urls { + let client = create_safe_client(url)?; + clients.insert(*rollup_id, client); + + if config.enable_metrics { + // Create and add RPC calls collector (mock for now) + rpc_calls_collectors.insert(*rollup_id, ()); + } + } + + let (signed_root_tx, _) = mpsc::channel(100); + + Ok(Self { + signed_root_tx, + rollup_ids_to_urls: config.rollup_ids_to_rpc_urls.clone(), + clients, + rpc_calls_collectors, + notifier: Notifier::new(), + consumer, + config: config.clone(), + bls_keypair, + operator_id, + logger: tracing::logger(), + listener: Box::new(SelectiveEventListener::default()), + registry, + }) + } + + pub fn enable_metrics(&mut self, registry: &Registry) -> Result<()> { + let listener = event_listener::make_attestor_metrics(registry)?; + self.listener = Box::new(listener); + self.consumer.enable_metrics(registry)?; + Ok(()) + } + + pub async fn start(&self, ctx: &mut Context) -> Result<()> { + self.consumer.start(ctx, &self.config.near_da_indexer_rmq_ip_port_address).await?; + + let mut subscriptions = HashMap::new(); + let mut headers_rxs = HashMap::new(); + + for (rollup_id, client) in &self.clients { + let headers_rx = client.subscribe_new_head(); + let block_number = client.block_number(); + + self.listener.observe_initialization_initial_block_number(*rollup_id, block_number); + + subscriptions.insert(*rollup_id, ()); + headers_rxs.insert(*rollup_id, headers_rx); + } + + tokio::spawn(self.process_mq_blocks(ctx.clone())); + + for rollup_id in self.clients.keys() { + let headers_rx = headers_rxs.remove(rollup_id).unwrap(); + tokio::spawn(self.process_rollup_headers(*rollup_id, headers_rx, ctx.clone())); + } + + Ok(()) + } + + async fn process_mq_blocks(&self, mut ctx: Context) { + let mut mq_block_rx = self.consumer.get_block_stream(); + + while let Some(mq_block) = mq_block_rx.recv().await { + if ctx.is_done() { + return; + } + + info!(self.logger, "Notifying"; "rollupId" => mq_block.rollup_id, "height" => mq_block.block.header().number); + if let Err(e) = self.notifier.notify(mq_block.rollup_id, mq_block.clone()) { + error!(self.logger, "Notifier error"; "err" => ?e); + } + + let notifier = self.notifier.clone(); + let logger = self.logger.clone(); + tokio::spawn(async move { + tokio::select! { + _ = sleep(MQ_REBROADCAST_TIMEOUT) => { + info!(logger, "Renotifying"; "rollupId" => mq_block.rollup_id, "height" => mq_block.block.header().number); + if let Err(e) = notifier.notify(mq_block.rollup_id, mq_block) { + error!(logger, "Error while renotifying"; "err" => ?e); + } + } + _ = ctx.done() => {} + } + }); + } + } + + async fn process_rollup_headers(&self, rollup_id: u32, mut headers_rx: mpsc::Receiver
, mut ctx: Context) { + while let Some(header) = headers_rx.recv().await { + if ctx.is_done() { + return; + } + + self.process_header(rollup_id, header, ctx.clone()).await; + } + } + + async fn process_header(&self, rollup_id: u32, rollup_header: Header, ctx: Context) { + info!(self.logger, "Processing header"; "rollupId" => rollup_id, "height" => get_header_number(&rollup_header)); + + self.listener.observe_last_block_received(rollup_id, get_header_number(&rollup_header)); + self.listener.observe_last_block_received_timestamp(rollup_id, get_header_timestamp(&rollup_header)); + self.listener.on_block_received(rollup_id); + + let predicate = |mq_block: &BlockData| { + if mq_block.rollup_id != rollup_id { + warn!(self.logger, "Subscriber rollupId mismatch"; "expected" => rollup_id, "actual" => mq_block.rollup_id); + return false; + } + + if get_header_number(&rollup_header) != get_block_number(&mq_block.block) { + return false; + } + + if get_block_root(&mq_block.block) != get_header_root(&rollup_header) { + warn!(self.logger, "StateRoot from MQ doesn't match one from Node"); + self.listener.on_block_mismatch(rollup_id); + return false; + } + + true + }; + + let (mq_blocks_rx, id) = self.notifier.subscribe(rollup_id, predicate); + + let mut transaction_id = [0u8; 32]; + let mut da_commitment = [0u8; 32]; + + tokio::select! { + _ = sleep(MQ_WAIT_TIMEOUT) => { + info!(self.logger, "MQ timeout"; "rollupId" => rollup_id, "height" => get_header_number(&rollup_header)); + self.listener.on_missed_mq_block(rollup_id); + } + Some(mq_block) = mq_blocks_rx.recv() => { + info!(self.logger, "MQ block found"; "height" => get_block_number(&mq_block.block), "rollupId" => mq_block.rollup_id); + transaction_id = mq_block.transaction_id; + da_commitment = mq_block.commitment; + } + _ = ctx.done() => { + return; + } + } + + self.notifier.unsubscribe(rollup_id, id); + + let message = StateRootUpdateMessage { + rollup_id, + block_height: get_header_number(&rollup_header), + timestamp: get_header_timestamp(&rollup_header), + state_root: get_header_root(&rollup_header), + near_da_transaction_id: transaction_id, + near_da_commitment: da_commitment, + }; + + match sign_state_root_update_message(&self.bls_keypair, &message) { + Ok(signature) => { + let signed_message = SignedStateRootUpdateMessage { + message, + bls_signature: signature, + operator_id: self.operator_id, + }; + if let Err(e) = self.signed_root_tx.send(signed_message).await { + warn!(self.logger, "Failed to send signed state root update"; "err" => ?e); + } + } + Err(e) => { + warn!(self.logger, "StateRoot sign failed"; "err" => ?e); + } + } + } + + pub fn get_signed_root_rx(&self) -> mpsc::Receiver { + self.signed_root_tx.subscribe() + } + + pub fn close(&self) -> Result<()> { + self.consumer.close()?; + for client in self.clients.values() { + client.close(); + } + Ok(()) + } +} + +// Helper functions (to be implemented) +fn create_safe_client(_url: &str) -> Result { + unimplemented!() +} + +fn sign_state_root_update_message(_keypair: &BlsKeyPair, _message: &StateRootUpdateMessage) -> Result { + unimplemented!() +} + +fn get_header_number(_header: &Header) -> u64 { + unimplemented!() +} + +fn get_header_timestamp(_header: &Header) -> u64 { + unimplemented!() +} + +fn get_header_root(_header: &Header) -> [u8; 32] { + unimplemented!() +} + +fn get_block_number(_block: &Block) -> u64 { + unimplemented!() +} + +fn get_block_root(_block: &Block) -> [u8; 32] { + unimplemented!() +} + +// Mock types (to be replaced with actual implementations) +struct Consumer; +struct ConsumerConfig { + rollup_ids: Vec, + id: String, +} +struct Context; + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct BlockData { + rollup_id: u32, + block: Block, + transaction_id: [u8; 32], + commitment: [u8; 32], +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct StateRootUpdateMessage { + rollup_id: u32, + block_height: u64, + timestamp: u64, + state_root: [u8; 32], + near_da_transaction_id: [u8; 32], + near_da_commitment: [u8; 32], +} +type BlsSignature = (); + +impl Consumer { + fn new(_config: ConsumerConfig) -> Self { + unimplemented!() + } + async fn start(&self, _ctx: &mut Context, _address: &str) -> Result<()> { + unimplemented!() + } + fn get_block_stream(&self) -> mpsc::Receiver { + unimplemented!() + } + fn enable_metrics(&self, _registry: &Registry) -> Result<()> { + unimplemented!() + } + fn close(&self) -> Result<()> { + unimplemented!() + } +} + +impl Context { + fn is_done(&self) -> bool { + unimplemented!() + } + fn done(&self) -> impl std::future::Future { + std::future::ready(()) + } +} \ No newline at end of file diff --git a/operator-rs/src/attestor/notifier.rs b/operator-rs/src/attestor/notifier.rs new file mode 100644 index 00000000..516a0671 --- /dev/null +++ b/operator-rs/src/attestor/notifier.rs @@ -0,0 +1,71 @@ +use std::collections::HashMap; +use std::sync::{Arc, Mutex}; +use tokio::sync::mpsc; +use anyhow::{Result, anyhow}; + +use super::BlockData; + +type BlockPredicate = Arc bool + Send + Sync>; + +struct SubscriberData { + predicate: BlockPredicate, + notifier_tx: mpsc::Sender, +} + +pub struct Notifier { + rollup_ids_to_subscribers: Arc>>>, +} + +impl Notifier { + pub fn new() -> Self { + Self { + rollup_ids_to_subscribers: Arc::new(Mutex::new(HashMap::new())), + } + } + + pub fn subscribe(&self, rollup_id: u32, predicate: impl Fn(&BlockData) -> bool + Send + Sync + 'static) -> (mpsc::Receiver, usize) { + let mut subscribers = self.rollup_ids_to_subscribers.lock().unwrap(); + let subscribers_for_rollup = subscribers.entry(rollup_id).or_insert_with(Vec::new); + + let (tx, rx) = mpsc::channel(100); + let subscriber = SubscriberData { + predicate: Arc::new(predicate), + notifier_tx: tx, + }; + + let id = subscribers_for_rollup.len(); + subscribers_for_rollup.push(subscriber); + + (rx, id) + } + + pub fn notify(&self, rollup_id: u32, block: BlockData) -> Result<()> { + let subscribers = self.rollup_ids_to_subscribers.lock().unwrap(); + let subscribers_for_rollup = subscribers.get(&rollup_id).ok_or_else(|| anyhow!("Unknown rollup ID"))?; + + for subscriber in subscribers_for_rollup { + if (subscriber.predicate)(&block) { + if let Err(e) = subscriber.notifier_tx.try_send(block.clone()) { + eprintln!("Failed to send block to subscriber: {:?}", e); + } + } + } + + Ok(()) + } + + pub fn unsubscribe(&self, rollup_id: u32, id: usize) { + let mut subscribers = self.rollup_ids_to_subscribers.lock().unwrap(); + if let Some(subscribers_for_rollup) = subscribers.get_mut(&rollup_id) { + subscribers_for_rollup.remove(id); + } + } +} + +impl Clone for Notifier { + fn clone(&self) -> Self { + Self { + rollup_ids_to_subscribers: self.rollup_ids_to_subscribers.clone(), + } + } +} \ No newline at end of file diff --git a/operator-rs/src/lib.rs b/operator-rs/src/lib.rs index a43c9294..00799cc6 100644 --- a/operator-rs/src/lib.rs +++ b/operator-rs/src/lib.rs @@ -1,3 +1,3 @@ pub mod operator; pub mod config; -// pub mod metrics; \ No newline at end of file +pub mod attestor; From 01a7321a65afc32b4a0199db270d812ea9265b02 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 6 Oct 2024 08:16:53 +0200 Subject: [PATCH 41/96] wip: attestor --- Cargo.lock | 3751 ++++++++++++++++++++++++++++--- operator-rs/Cargo.toml | 3 +- operator-rs/src/attestor/mod.rs | 45 +- operator-rs/src/config.rs | 2 +- operator-rs/src/lib.rs | 1 + operator-rs/src/operator.rs | 2 +- 6 files changed, 3476 insertions(+), 328 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7383bb5e..93ddef2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "actix" version = "0.13.5" @@ -95,7 +105,7 @@ dependencies = [ "tokio", "tokio-util 0.7.12", "tracing", - "zstd", + "zstd 0.13.2", ] [[package]] @@ -353,25 +363,25 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" dependencies = [ - "alloy-consensus", - "alloy-contract", + "alloy-consensus 0.3.6", + "alloy-contract 0.3.6", "alloy-core", - "alloy-eips", + "alloy-eips 0.3.6", "alloy-genesis", - "alloy-json-rpc", - "alloy-network", + "alloy-json-rpc 0.3.6", + "alloy-network 0.3.6", "alloy-node-bindings", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-serde", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-provider 0.3.6", + "alloy-pubsub 0.3.6", + "alloy-rpc-client 0.3.6", + "alloy-rpc-types 0.3.6", + "alloy-serde 0.3.6", + "alloy-signer 0.3.6", + "alloy-signer-local 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.3.6", ] [[package]] @@ -384,36 +394,69 @@ dependencies = [ "strum 0.26.3", ] +[[package]] +name = "alloy-consensus" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da374e868f54c7f4ad2ad56829827badca388efd645f8cf5fccc61c2b5343504" +dependencies = [ + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.6", "c-kzg", "serde", ] +[[package]] +name = "alloy-contract" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dc6957ff706f9e5f6fd42f52a93e4bce476b726c92d077b348de28c4a76730c" +dependencies = [ + "alloy-dyn-abi 0.7.7", + "alloy-json-abi 0.7.7", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-sol-types 0.7.7", + "alloy-transport 0.1.4", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-contract" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network", + "alloy-dyn-abi 0.8.5", + "alloy-json-abi 0.8.5", + "alloy-network 0.3.6", "alloy-network-primitives", - "alloy-primitives", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-types-eth", - "alloy-sol-types", - "alloy-transport", + "alloy-primitives 0.8.5", + "alloy-provider 0.3.6", + "alloy-pubsub 0.3.6", + "alloy-rpc-types-eth 0.3.6", + "alloy-sol-types 0.8.5", + "alloy-transport 0.3.6", "futures", "futures-util", "thiserror", @@ -425,11 +468,28 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", + "alloy-dyn-abi 0.8.5", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-sol-types", + "alloy-sol-types 0.8.5", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413902aa18a97569e60f679c23f46a18db1656d87ab4d4e49d0e1e52042f66df" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "alloy-sol-types 0.7.7", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", ] [[package]] @@ -438,10 +498,10 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", + "alloy-sol-type-parser 0.8.5", + "alloy-sol-types 0.8.5", "const-hex", "itoa", "serde", @@ -455,7 +515,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", "serde", ] @@ -466,12 +526,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", "k256", "serde", ] +[[package]] +name = "alloy-eips" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76ecab54890cdea1e4808fc0891c7e6cfcf71fe1a9fe26810c7280ef768f4ed" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "once_cell", + "serde", + "sha2", +] + [[package]] name = "alloy-eips" version = "0.3.6" @@ -480,9 +555,9 @@ checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.6", "c-kzg", "derive_more 1.0.0", "once_cell", @@ -496,9 +571,21 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-serde 0.3.6", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", "serde", + "serde_json", ] [[package]] @@ -507,10 +594,23 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a438d4486b5d525df3b3004188f9d5cd1d65cd30ecc41e5a3ccef6f6342e8af9" dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", + "alloy-primitives 0.8.5", + "alloy-sol-type-parser 0.8.5", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d6f34930b7e3e2744bcc79056c217f00cb2abb33bc5d4ff88da7623c5bb078b" +dependencies = [ + "alloy-primitives 0.7.7", "serde", "serde_json", + "thiserror", + "tracing", ] [[package]] @@ -519,29 +619,49 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.8.5", + "alloy-sol-types 0.8.5", "serde", "serde_json", "thiserror", "tracing", ] +[[package]] +name = "alloy-network" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f6895fc31b48fa12306ef9b4f78b7764f8bd6d7d91cdb0a40e233704a0f23f" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", + "alloy-signer 0.1.4", + "alloy-sol-types 0.7.7", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-json-rpc 0.3.6", "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", + "alloy-signer 0.3.6", + "alloy-sol-types 0.8.5", "async-trait", "auto_impl", "futures-utils-wasm", @@ -554,9 +674,9 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" dependencies = [ - "alloy-eips", - "alloy-primitives", - "alloy-serde", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.5", + "alloy-serde 0.3.6", "serde", ] @@ -567,7 +687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" dependencies = [ "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.8.5", "k256", "rand 0.8.5", "serde_json", @@ -577,6 +697,28 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-primitives" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if 1.0.0", + "const-hex", + "derive_more 0.99.18", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-primitives" version = "0.8.5" @@ -604,6 +746,40 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c538bfa893d07e27cb4f3c1ab5f451592b7c526d511d62b576a2ce59e146e4a" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-pubsub 0.1.4", + "alloy-rpc-client 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 5.5.3", + "futures", + "futures-utils-wasm", + "lru 0.12.4", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-provider" version = "0.3.6" @@ -611,27 +787,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-json-rpc 0.3.6", + "alloy-network 0.3.6", "alloy-network-primitives", "alloy-node-bindings", - "alloy-primitives", - "alloy-pubsub", - "alloy-rpc-client", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.3.6", + "alloy-rpc-client 0.3.6", "alloy-rpc-types-anvil", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.3.6", "alloy-rpc-types-trace", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-signer-local 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.3.6", "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.1.0", "futures", "futures-utils-wasm", "lru 0.12.4", @@ -645,15 +821,34 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-pubsub" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7341322d9bc0e49f6e9fd9f2eb8e30f73806f2dd12cbb3d6bab2694c921f87" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-transport 0.1.4", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", +] + [[package]] name = "alloy-pubsub" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d05f63677e210d758cd5d6d1ce10f20c980c3560ccfbe79ba1997791862a04f" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", + "alloy-json-rpc 0.3.6", + "alloy-primitives 0.8.5", + "alloy-transport 0.3.6", "bimap", "futures", "serde", @@ -686,19 +881,43 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "alloy-rpc-client" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba31bae67773fd5a60020bea900231f8396202b7feca4d0c70c6b59308ab4a8" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-pubsub 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "futures", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-rpc-client" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.3.6", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.3.6", + "alloy-transport 0.3.6", + "alloy-transport-http 0.3.6", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.3.6", "futures", "pin-project", "reqwest 0.12.7", @@ -711,6 +930,16 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-rpc-types" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184a7a42c7ba9141cc9e76368356168c282c3bc3d9e5d78f3556bdfe39343447" +dependencies = [ + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", +] + [[package]] name = "alloy-rpc-types" version = "0.3.6" @@ -718,9 +947,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" dependencies = [ "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.3.6", "alloy-rpc-types-trace", - "alloy-serde", + "alloy-serde 0.3.6", "serde", ] @@ -730,8 +959,8 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-serde 0.3.6", "serde", ] @@ -741,30 +970,48 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1464c4dd646e1bdfde86ae65ce5ba168dbb29180b478011fe87117ae46b1629b" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.3.6", "derive_more 1.0.0", "jsonwebtoken 9.3.0", "rand 0.8.5", "serde", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab4123ee21f99ba4bd31bfa36ba89112a18a500f8b452f02b35708b1b951e2b9" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "alloy-sol-types 0.7.7", + "itertools 0.13.0", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "alloy-rpc-types-eth" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.3.6", + "alloy-eips 0.3.6", "alloy-network-primitives", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", - "alloy-sol-types", + "alloy-serde 0.3.6", + "alloy-sol-types 0.8.5", "cfg-if 1.0.0", "derive_more 1.0.0", "hashbrown 0.14.5", @@ -779,32 +1026,57 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98db35cd42c90b484377e6bc44d95377a7a38a5ebee996e67754ac0446d542ab" dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.3.6", + "alloy-serde 0.3.6", "serde", "serde_json", "thiserror", ] +[[package]] +name = "alloy-serde" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9416c52959e66ead795a11f4a86c248410e9e368a0765710e57055b8a1774dd6" +dependencies = [ + "alloy-primitives 0.7.7", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "serde", "serde_json", ] +[[package]] +name = "alloy-signer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b33753c09fa1ad85e5b092b8dc2372f1e337a42e84b9b4cff9fede75ba4adb32" +dependencies = [ + "alloy-primitives 0.7.7", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + [[package]] name = "alloy-signer" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "async-trait", "auto_impl", "elliptic-curve", @@ -812,44 +1084,111 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer-aws" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ce17bfd5aa38e14b9c83b553d93c76e1bd5641a2db45f381f81619fd3e54ca" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-signer 0.1.4", + "async-trait", + "aws-sdk-kms", + "k256", + "spki", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-signer-local" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dfc9c26fe6c6f1bad818c9a976de9044dd12e1f75f1f156a801ee3e8148c1b6" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-signer 0.1.4", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + [[package]] name = "alloy-signer-local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", + "alloy-consensus 0.3.6", + "alloy-network 0.3.6", + "alloy-primitives 0.8.5", + "alloy-signer 0.3.6", "async-trait", "k256", "rand 0.8.5", "thiserror", ] +[[package]] +name = "alloy-sol-macro" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +dependencies = [ + "alloy-sol-macro-expander 0.7.7", + "alloy-sol-macro-input 0.7.7", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "alloy-sol-macro" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", + "alloy-sol-macro-expander 0.8.5", + "alloy-sol-macro-input 0.8.5", "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.77", ] +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-sol-macro-input 0.7.7", + "const-hex", + "heck 0.5.0", + "indexmap 2.5.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.77", + "syn-solidity 0.7.7", + "tiny-keccak", +] + [[package]] name = "alloy-sol-macro-expander" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" dependencies = [ - "alloy-json-abi", - "alloy-sol-macro-input", + "alloy-json-abi 0.8.5", + "alloy-sol-macro-input 0.8.5", "const-hex", "heck 0.5.0", "indexmap 2.5.0", @@ -857,17 +1196,34 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.77", - "syn-solidity", + "syn-solidity 0.8.5", "tiny-keccak", ] +[[package]] +name = "alloy-sol-macro-input" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +dependencies = [ + "alloy-json-abi 0.7.7", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", + "syn-solidity 0.7.7", +] + [[package]] name = "alloy-sol-macro-input" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.5", "const-hex", "dunce", "heck 0.5.0", @@ -875,39 +1231,81 @@ dependencies = [ "quote", "serde_json", "syn 2.0.77", - "syn-solidity", + "syn-solidity 0.8.5", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" dependencies = [ "serde", "winnow", ] [[package]] -name = "alloy-sol-types" +name = "alloy-sol-type-parser" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-macro 0.7.7", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", + "alloy-sol-macro 0.8.5", "const-hex", "serde", ] +[[package]] +name = "alloy-transport" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b51a291f949f755e6165c3ed562883175c97423703703355f4faa4b7d0a57c" +dependencies = [ + "alloy-json-rpc 0.1.4", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.3.6", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -920,14 +1318,29 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport-http" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d65871f9f1cafe1ed25cde2f1303be83e6473e995a2d56c275ae4fcce6119c" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-transport 0.1.4", + "reqwest 0.12.7", + "serde_json", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" dependencies = [ - "alloy-json-rpc", - "alloy-transport", + "alloy-json-rpc 0.3.6", + "alloy-transport 0.3.6", "reqwest 0.12.7", "serde_json", "tower 0.5.1", @@ -941,9 +1354,9 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09fd8491249f74d16ec979b1f5672377b12ebb818e6056478ffa386954dbd350" dependencies = [ - "alloy-json-rpc", - "alloy-pubsub", - "alloy-transport", + "alloy-json-rpc 0.3.6", + "alloy-pubsub 0.3.6", + "alloy-transport 0.3.6", "bytes", "futures", "interprocess", @@ -954,17 +1367,35 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-transport-ws" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec83fd052684556c78c54df111433493267234d82321c2236560c752f595f20" +dependencies = [ + "alloy-pubsub 0.1.4", + "alloy-transport 0.1.4", + "futures", + "http 1.1.0", + "rustls 0.23.13", + "serde_json", + "tokio", + "tokio-tungstenite 0.23.1", + "tracing", + "ws_stream_wasm", +] + [[package]] name = "alloy-transport-ws" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9704761f6297fe482276bee7f77a93cb42bd541c2bd6c1c560b6f3a9ece672e" dependencies = [ - "alloy-pubsub", - "alloy-transport", + "alloy-pubsub 0.3.6", + "alloy-transport 0.3.6", "futures", "http 1.1.0", - "rustls", + "rustls 0.23.13", "serde_json", "tokio", "tokio-tungstenite 0.23.1", @@ -1105,6 +1536,34 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -1188,6 +1647,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -1204,11 +1676,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ + "ark-serialize-derive", "ark-std 0.4.0", "digest 0.10.7", "num-bigint 0.4.6", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-std" version = "0.3.0" @@ -1247,6 +1731,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "asn1-rs" version = "0.6.2" @@ -1292,6 +1785,18 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-broadcast" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-channel" version = "2.3.1" @@ -1537,6 +2042,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "aws-credential-types" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + [[package]] name = "aws-creds" version = "0.30.0" @@ -1544,7 +2061,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" dependencies = [ "attohttpc", - "dirs", + "dirs 4.0.0", "rust-ini", "serde", "serde-xml-rs", @@ -1553,6 +2070,33 @@ dependencies = [ "url", ] +[[package]] +name = "aws-lc-rs" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd82dba44d209fddb11c190e0a94b78651f95299598e472215667417a03ff1d" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7a4168111d7eb622a31b214057b8509c0a7e1794f44c546d742330dc793972" +dependencies = [ + "bindgen 0.69.4", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] + [[package]] name = "aws-region" version = "0.25.5" @@ -1563,102 +2107,312 @@ dependencies = [ ] [[package]] -name = "axum" -version = "0.6.20" +name = "aws-runtime" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes", - "futures-util", + "fastrand 2.1.1", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", + "once_cell", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower 0.4.13", - "tower-layer", - "tower-service", + "tracing", + "uuid 1.10.0", ] [[package]] -name = "axum-core" -version = "0.3.4" +name = "aws-sdk-kms" +version = "1.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "e33590e8d45206fdc4273ded8a1f292bcceaadd513037aa790fc67b237bc30ee" dependencies = [ - "async-trait", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes", - "futures-util", "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", + "once_cell", + "regex-lite", + "tracing", ] [[package]] -name = "backtrace" -version = "0.3.74" +name = "aws-sigv4" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" dependencies = [ - "addr2line 0.24.1", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object 0.36.4", - "rustc-demangle", - "windows-targets 0.52.6", + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.1.0", + "once_cell", + "percent-encoding", + "sha2", + "time", + "tracing", ] [[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.12.3" +name = "aws-smithy-async" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] [[package]] -name = "base64" -version = "0.13.1" +name = "aws-smithy-http" +version = "0.60.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] [[package]] -name = "base64" -version = "0.21.7" +name = "aws-smithy-json" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +dependencies = [ + "aws-smithy-types", +] [[package]] -name = "base64" -version = "0.22.1" +name = "aws-smithy-runtime" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "d1ce695746394772e7000b39fe073095db6d45a862d0767dd5ad0ac0d7f8eb87" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand 2.1.1", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "http-body 1.0.1", + "httparse", + "hyper 0.14.30", + "hyper-rustls 0.24.2", + "once_cell", + "pin-project-lite", + "pin-utils", + "rustls 0.21.12", + "tokio", + "tracing", +] [[package]] -name = "base64ct" -version = "1.6.0" +name = "aws-smithy-runtime-api" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] +checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.1.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.1.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util 0.7.12", +] + +[[package]] +name = "aws-types" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version 0.4.1", + "tracing", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 0.1.2", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line 0.24.1", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object 0.36.4", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] name = "bimap" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1694,6 +2448,29 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.77", + "which", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1841,6 +2618,56 @@ dependencies = [ "zeroize", ] +[[package]] +name = "bollard" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aed08d3adb6ebe0eff737115056652670ae290f177759aac19c30456135f94c" +dependencies = [ + "base64 0.22.1", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "home", + "http 1.1.0", + "http-body-util", + "hyper 1.4.1", + "hyper-named-pipe", + "hyper-rustls 0.26.0", + "hyper-util", + "hyperlocal-next", + "log", + "pin-project-lite", + "rustls 0.22.4", + "rustls-native-certs 0.7.3", + "rustls-pemfile 2.1.3", + "rustls-pki-types", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror", + "tokio", + "tokio-util 0.7.12", + "tower-service", + "url", + "winapi", +] + +[[package]] +name = "bollard-stubs" +version = "1.44.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709d9aa1c37abb89d40f19f5d0ad6f0d88cb1581264e571c9350fc5bb89cf1c5" +dependencies = [ + "serde", + "serde_repr", + "serde_with", +] + [[package]] name = "borsh" version = "0.9.3" @@ -1937,6 +2764,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -1986,6 +2823,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bytesize" version = "1.3.0" @@ -2004,6 +2851,16 @@ dependencies = [ "bytes", ] +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" @@ -2040,6 +2897,38 @@ dependencies = [ "ppv-lite86", ] +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cbc" version = "0.1.2" @@ -2224,8 +3113,17 @@ dependencies = [ ] [[package]] -name = "cms" -version = "0.2.3" +name = "cmake" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +dependencies = [ + "cc", +] + +[[package]] +name = "cms" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" dependencies = [ @@ -2235,6 +3133,58 @@ dependencies = [ "x509-cert", ] +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58 0.5.1", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58 0.5.1", + "digest 0.10.7", + "generic-array 0.14.7", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -2572,6 +3522,35 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctor" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +dependencies = [ + "quote", + "syn 2.0.77", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "ctrlc" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +dependencies = [ + "nix 0.29.0", + "windows-sys 0.59.0", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -2635,6 +3614,19 @@ dependencies = [ "syn 2.0.77", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown 0.14.5", + "lock_api 0.4.12", + "once_cell", + "parking_lot_core 0.9.10", +] + [[package]] name = "dashmap" version = "6.1.0" @@ -2693,7 +3685,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid", + "uuid 1.10.0", ] [[package]] @@ -2856,7 +3848,26 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] @@ -2870,6 +3881,29 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -2899,6 +3933,17 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "docker_credential" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31951f49556e34d90ed28342e1df7e1cb7a229c4cab0aecc627b5d91edd41d07" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + [[package]] name = "doctest-file" version = "1.0.0" @@ -3013,121 +4058,834 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.13.0" +name = "eigen-chainio-txmanager" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "92a9242f761ef1403ada3fc268d5373b977c32cf755560019a211d881b343135" +dependencies = [ + "alloy-eips 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-signer-local 0.1.4", + "alloy-transport-http 0.1.4", + "eigen-logging", + "eigen-signer", + "k256", + "reqwest 0.12.7", + "thiserror", +] [[package]] -name = "elliptic-curve" -version = "0.13.8" +name = "eigen-client-avsregistry" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "26b545b7b3bb97aa6f769fa329c43e121d3d3ef2c700528c51493d14b7ca4c2b" dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array 0.14.7", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "alloy-signer 0.1.4", + "alloy-signer-local 0.1.4", + "ark-ff 0.4.2", + "async-trait", + "eigen-client-elcontracts", + "eigen-crypto-bls", + "eigen-logging", + "eigen-types", + "eigen-utils", + "num-bigint 0.4.6", + "thiserror", + "tracing", ] [[package]] -name = "encode_unicode" -version = "0.3.6" +name = "eigen-client-elcontracts" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "46b72f6b15b8e641b4b43c1dced1df39cd1b4bcc6ce943ab1ce2280cba6e486f" +dependencies = [ + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "eigen-logging", + "eigen-types", + "eigen-utils", + "thiserror", + "tracing", +] [[package]] -name = "encoding_rs" -version = "0.8.34" +name = "eigen-client-eth" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "afc00e0508a9137355212339d6bc0b83b3ceb7dc4f541ec920e66171295bd9c3" dependencies = [ - "cfg-if 1.0.0", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-pubsub 0.1.4", + "alloy-rlp", + "alloy-rpc-types-eth 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "async-trait", + "eigen-logging", + "eigen-metrics-collectors-rpc-calls", + "hex", + "thiserror", + "url", ] [[package]] -name = "enum-map" -version = "2.7.3" +name = "eigen-client-fireblocks" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +checksum = "0327abf48cd09e672456be65e640ee609d23a1989ea1d310b0585e333829f124" dependencies = [ - "enum-map-derive", + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "chrono", + "eigen-utils", + "hex", + "jsonwebtoken 7.2.0", + "mime", + "once_cell", + "reqwest 0.11.27", + "serde", + "serde_json", + "sha2", + "thiserror", + "uuid 1.10.0", ] [[package]] -name = "enum-map-derive" -version = "0.17.0" +name = "eigen-contract-bindings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +checksum = "f0a99d2a3c6b116d4013121fc20ff2a2f4e884475f6327c7d8300b175683fcb4" + +[[package]] +name = "eigen-crypto-bls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4016b25de0e41e5f4a8b8c495cef35cbdf5d1946021b472a0ce10b656956465f" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "eigen-crypto-bn254", + "eigen-utils", + "serde", + "thiserror", ] [[package]] -name = "enumset" -version = "1.1.5" +name = "eigen-crypto-bn254" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" +checksum = "bab240b582aa622c9a94e12bc7ac6fb65380b85053e1b0db08c8478c618a84a0" dependencies = [ - "enumset_derive", + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "num-bigint 0.4.6", + "rust-bls-bn254", ] [[package]] -name = "enumset_derive" -version = "0.10.0" +name = "eigen-logging" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" +checksum = "858b74ed2efc43af7de8db0f04e7c5d5b348aa8755c1a9000eb03d36f442c690" dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.77", + "ctor", + "once_cell", + "tracing", + "tracing-subscriber", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "eigen-metrics" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "52e0fbdbdb429d03ff6f0be07abe4d58a942d6069328f7827938ca57157766df" +dependencies = [ + "eigen-logging", + "metrics", + "metrics-exporter-prometheus", + "metrics-util", +] [[package]] -name = "errno" -version = "0.2.8" +name = "eigen-metrics-collectors-rpc-calls" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "67563f8a7d1e242f8cab846729a4fec5d299c2e57abea66732400749c265ab92" dependencies = [ - "errno-dragonfly", - "libc", - "winapi", + "eigen-logging", + "metrics", ] [[package]] -name = "errno" -version = "0.3.9" +name = "eigen-nodeapi" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "0d53c0275e3e0c8afc1358c0a3d1c781ac9815aadb0463a7d8e8cdc832569dca" dependencies = [ - "libc", - "windows-sys 0.52.0", + "ntex", + "serde", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "eigen-services-avsregistry" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "6b8a3bf7010289fcac159db5a5d89fb3879236ac3c84e7c389366269d512c1da" dependencies = [ - "cc", - "libc", + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "async-trait", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-services-operatorsinfo", + "eigen-types", + "eigen-utils", +] + +[[package]] +name = "eigen-services-blsaggregation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccce420984d12deb996b6d85580f0080e5b8f6dc10c8858622c24f23953453b" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-crypto-bn254", + "eigen-services-avsregistry", + "eigen-types", + "parking_lot 0.12.3", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "eigen-services-operatorsinfo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc37b203588165d466fbff505e474b7fdfd4bfdd9095171f171209aeaf57919d" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "anyhow", + "async-trait", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-logging", + "eigen-types", + "eigen-utils", + "futures-util", + "thiserror", + "tokio", + "tokio-util 0.7.12", +] + +[[package]] +name = "eigen-signer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e981bde69979d705dbac089181df625f7e54ec01898983a8a1d8d1144b67b83b" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rpc-client 0.1.4", + "alloy-signer 0.1.4", + "alloy-signer-aws", + "alloy-signer-local 0.1.4", + "async-trait", + "aws-sdk-kms", + "eth-keystore", + "serde", + "thiserror", + "url", +] + +[[package]] +name = "eigen-testing-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b14a2ba9fbb5585ce0b3170243db2dfc551383ea7a46114a2c3f748da4515a" +dependencies = [ + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-transport-http 0.1.4", + "eigen-utils", + "once_cell", + "serde", + "serde_json", + "testcontainers", + "tokio", +] + +[[package]] +name = "eigen-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59467c722b271730a065a401002a6d3e7f6861233cf6241fda3a94bf863b4d74" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-serialize 0.4.2", + "eigen-crypto-bls", + "ethers", + "num-bigint 0.4.6", + "thiserror", + "tokio", +] + +[[package]] +name = "eigen-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781a0d9bc2ab3d3709a1d6b23dfca5c2ef2da29b38f10a04bf7f1991bb53293e" +dependencies = [ + "alloy-contract 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-network 0.1.4", + "alloy-provider 0.1.4", + "alloy-pubsub 0.1.4", + "alloy-signer-local 0.1.4", + "alloy-sol-types 0.7.7", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "reqwest 0.12.7", +] + +[[package]] +name = "eigensdk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8683d526d79c3d8deaed773e0dd9a18383e0f710fa2d182615142ce26b448338" +dependencies = [ + "eigen-chainio-txmanager", + "eigen-client-avsregistry", + "eigen-client-elcontracts", + "eigen-client-eth", + "eigen-client-fireblocks", + "eigen-contract-bindings", + "eigen-crypto-bls", + "eigen-crypto-bn254", + "eigen-logging", + "eigen-metrics", + "eigen-nodeapi", + "eigen-services-avsregistry", + "eigen-services-blsaggregation", + "eigen-services-operatorsinfo", + "eigen-signer", + "eigen-testing-utils", + "eigen-types", + "eigen-utils", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if 1.0.0", +] + +[[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.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "enum-map" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "enumset" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +dependencies = [ + "errno-dragonfly", + "libc", + "winapi", +] + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt 0.10.0", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "syn 2.0.77", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec 0.7.6", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array 0.14.7", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.26.3", + "syn 2.0.77", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken 8.3.0", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", ] [[package]] @@ -3334,6 +5092,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -3416,6 +5180,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -3439,6 +5213,16 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + [[package]] name = "futures-util" version = "0.3.30" @@ -3552,6 +5336,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[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 = "group" version = "0.13.0" @@ -3639,6 +5435,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + [[package]] name = "headers" version = "0.3.9" @@ -3711,6 +5516,60 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if 1.0.0", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if 1.0.0", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.3", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -3729,6 +5588,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[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.12" @@ -3834,6 +5704,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -3841,6 +5712,56 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.4.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.30", + "log", + "rustls 0.21.12", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "log", + "rustls 0.22.4", + "rustls-native-certs 0.7.3", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", +] + [[package]] name = "hyper-rustls" version = "0.27.3" @@ -3851,11 +5772,14 @@ dependencies = [ "http 1.1.0", "hyper 1.4.1", "hyper-util", - "rustls", + "log", + "rustls 0.23.13", + "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", "tower-service", + "webpki-roots 0.26.6", ] [[package]] @@ -3918,6 +5842,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "hyperlocal-next" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf569d43fa9848e510358c07b80f4adf34084ddc28c6a4a651ee8474c070dcc" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -3947,6 +5886,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -3986,6 +5935,24 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -4114,6 +6081,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2 0.5.7", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + [[package]] name = "ipnet" version = "2.10.0" @@ -4135,6 +6114,15 @@ 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 = "itertools" version = "0.12.1" @@ -4197,6 +6185,20 @@ dependencies = [ "simple_asn1 0.4.1", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem 1.1.1", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1 0.6.2", +] + [[package]] name = "jsonwebtoken" version = "9.3.0" @@ -4223,6 +6225,7 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", + "signature", ] [[package]] @@ -4244,6 +6247,36 @@ dependencies = [ "sha3-asm", ] +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.8.4", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.7", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -4331,7 +6364,7 @@ version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ - "bindgen", + "bindgen 0.65.1", "bzip2-sys", "cc", "glob", @@ -4353,6 +6386,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -4445,6 +6484,15 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "lz4-sys" version = "1.11.0" @@ -4484,6 +6532,12 @@ 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" @@ -4579,12 +6633,62 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.9.1" +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metrics" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" +dependencies = [ + "ahash 0.8.11", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" +dependencies = [ + "base64 0.22.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.3", + "hyper-util", + "indexmap 2.5.0", + "ipnet", + "metrics", + "metrics-util", + "quanta", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-util" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" dependencies = [ - "autocfg", + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.14.5", + "indexmap 2.5.0", + "metrics", + "num_cpus", + "ordered-float", + "quanta", + "radix_trie", + "sketches-ddsketch", ] [[package]] @@ -4640,6 +6744,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + [[package]] name = "more-asserts" version = "0.2.2" @@ -4670,6 +6780,12 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" + [[package]] name = "native-tls" version = "0.2.12" @@ -5005,7 +7121,7 @@ checksum = "3d927e95742aea981b9fd60996fbeba3b61e90acafd54c2c3c2a4ed40065ff03" dependencies = [ "blake2 0.9.2", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "c2-chacha", "curve25519-dalek", "derive_more 0.99.18", @@ -5031,7 +7147,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "blake2 0.10.6", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "curve25519-dalek", "derive_more 0.99.18", "ed25519-dalek", @@ -5190,7 +7306,7 @@ dependencies = [ "actix", "actix-cors", "actix-web", - "bs58", + "bs58 0.4.0", "derive_more 0.99.18", "easy-ext", "futures", @@ -5553,7 +7669,7 @@ dependencies = [ "strum 0.24.1", "thiserror", "tracing", - "zstd", + "zstd 0.13.2", ] [[package]] @@ -5565,7 +7681,7 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "derive_more 0.99.18", "enum-map", "near-account-id", @@ -5586,7 +7702,7 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "derive_more 0.99.18", "enum-map", "near-account-id", @@ -6101,7 +8217,7 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "dirs", + "dirs 4.0.0", "easy-ext", "futures", "hex", @@ -6152,6 +8268,21 @@ dependencies = [ "xz2", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + [[package]] name = "nix" version = "0.15.0" @@ -6177,6 +8308,18 @@ dependencies = [ "memoffset 0.6.5", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.6.0", + "cfg-if 1.0.0", + "cfg_aliases", + "libc", +] + [[package]] name = "node-runtime" version = "2.2.1-rc.1" @@ -6221,6 +8364,244 @@ dependencies = [ "winapi", ] +[[package]] +name = "ntex" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93daf570cdedb9a01a3020ccd367b2ff37402b30c979aff2da23e3e84d2b6cfc" +dependencies = [ + "base64 0.22.1", + "bitflags 2.6.0", + "bytes", + "encoding_rs", + "httparse", + "httpdate", + "log", + "mime", + "nanorand", + "ntex-bytes", + "ntex-codec", + "ntex-h2", + "ntex-http", + "ntex-io", + "ntex-macros", + "ntex-net", + "ntex-router", + "ntex-rt", + "ntex-server", + "ntex-service", + "ntex-tls", + "ntex-util", + "percent-encoding", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "sha-1", + "thiserror", +] + +[[package]] +name = "ntex-bytes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffd6ac357a3fd885753ddeb4130ec92474e79d013362532eba4778854466981" +dependencies = [ + "bitflags 2.6.0", + "bytes", + "futures-core", + "serde", +] + +[[package]] +name = "ntex-codec" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a7e111d946bb915d712df496728ca2a120b1b5643f66c580f13023bce46fda" +dependencies = [ + "ntex-bytes", +] + +[[package]] +name = "ntex-h2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98763f0ee78f247c02fe1bcdf6380f306a08d95169f9c2d83619d5e1cb26c738" +dependencies = [ + "bitflags 2.6.0", + "fxhash", + "log", + "nanorand", + "ntex-bytes", + "ntex-codec", + "ntex-http", + "ntex-io", + "ntex-net", + "ntex-service", + "ntex-util", + "pin-project-lite", + "thiserror", +] + +[[package]] +name = "ntex-http" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81e205c980c693cb426f55669078bc311973f7e27a34f7ea4d0ce4069dedd05" +dependencies = [ + "fxhash", + "http 1.1.0", + "itoa", + "log", + "ntex-bytes", + "serde", +] + +[[package]] +name = "ntex-io" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec68a2766bcc47426631e3461c8d7994f6eec194445f394ab61f83d92756ad12" +dependencies = [ + "bitflags 2.6.0", + "log", + "ntex-bytes", + "ntex-codec", + "ntex-service", + "ntex-util", + "pin-project-lite", +] + +[[package]] +name = "ntex-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50a359f2a10c712b0446675070c22b1437d57a7cf08139f6a229e1e80817ed84" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ntex-net" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f3d87616c8fc39c41d432402d98a118861e8e144df30037fe1400cdd29ac35" +dependencies = [ + "log", + "ntex-bytes", + "ntex-http", + "ntex-io", + "ntex-rt", + "ntex-service", + "ntex-tokio", + "ntex-util", + "thiserror", +] + +[[package]] +name = "ntex-router" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb9c68c26a87ffca54339be5f95223339db3e7bcc5d64733fef20812970a746f" +dependencies = [ + "http 1.1.0", + "log", + "ntex-bytes", + "regex", + "serde", +] + +[[package]] +name = "ntex-rt" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d24cfad65aab77e56ee1f1a218ca248c141a22f6f65aba8ed56037ec3c6f3a4" +dependencies = [ + "async-channel", + "futures-core", + "log", + "oneshot", + "tokio", +] + +[[package]] +name = "ntex-server" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9c3f4b038d1bcc3aff4e457a4b8258828b8e119c9ef4fd1e42c8df5e732cee" +dependencies = [ + "async-broadcast", + "async-channel", + "ctrlc", + "log", + "ntex-bytes", + "ntex-net", + "ntex-rt", + "ntex-service", + "ntex-util", + "oneshot", + "polling 3.7.3", + "signal-hook", + "socket2 0.5.7", +] + +[[package]] +name = "ntex-service" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2cc8f131d5fed702d758485fdc45a41dfab69d8ed71b84e2b910b4ea39f795" +dependencies = [ + "slab", +] + +[[package]] +name = "ntex-tls" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e08948d9a1d27d11c474c374e6b8c0eee7e2dd4a288967d5dcce13d7adbd80e" +dependencies = [ + "log", + "ntex-bytes", + "ntex-io", + "ntex-net", + "ntex-service", + "ntex-util", +] + +[[package]] +name = "ntex-tokio" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "623868ff022f737d7b94212dc85e471f895e58f6c59c72552cdc9a22c5f167ed" +dependencies = [ + "log", + "ntex-bytes", + "ntex-io", + "ntex-util", + "tokio", +] + +[[package]] +name = "ntex-util" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f0cf57859407e61c61a7e131cd339b05537046580b65abbf0a817f46917be" +dependencies = [ + "bitflags 2.6.0", + "futures-core", + "futures-sink", + "futures-timer", + "fxhash", + "log", + "ntex-rt", + "ntex-service", + "pin-project-lite", + "slab", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -6261,6 +8642,7 @@ checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", + "serde", ] [[package]] @@ -6326,6 +8708,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.77", @@ -6373,12 +8756,43 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "oneshot" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e296cf87e61c9cfc1a61c3c63a0f7f286ed4554e0e22be84e8a38e1d264a2a29" + [[package]] name = "opaque-debug" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "openssl" version = "0.10.66" @@ -6560,14 +8974,15 @@ name = "operator-rs" version = "0.1.0" dependencies = [ "alloy", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-transport-ws", + "alloy-rpc-client 0.3.6", + "alloy-rpc-types 0.3.6", + "alloy-transport-ws 0.3.6", "anyhow", "bincode", "clap", + "eigensdk", "eyre", "futures-util", "hex", @@ -6585,6 +9000,12 @@ dependencies = [ "warp", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ordered-float" version = "4.2.2" @@ -6607,6 +9028,12 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "outref" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + [[package]] name = "overload" version = "0.1.1" @@ -6822,16 +9249,63 @@ dependencies = [ ] [[package]] -name = "parking_lot_core" -version = "0.9.10" +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.5.4", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "parse-display" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" +dependencies = [ + "parse-display-derive", + "regex", + "regex-syntax 0.8.4", +] + +[[package]] +name = "parse-display-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "regex-syntax 0.8.4", + "structmeta", + "syn 2.0.77", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "password-hash" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.5.4", - "smallvec", - "windows-targets 0.52.6", + "base64ct", + "rand_core 0.6.4", + "subtle", ] [[package]] @@ -6840,6 +9314,24 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash 0.4.2", + "sha2", +] + [[package]] name = "pbkdf2" version = "0.12.2" @@ -6867,6 +9359,15 @@ dependencies = [ "regex", ] +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "pem" version = "3.0.4" @@ -6923,6 +9424,57 @@ dependencies = [ "rustc_version 0.4.1", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.5" @@ -7002,8 +9554,8 @@ dependencies = [ "aes", "cbc", "der", - "pbkdf2", - "scrypt", + "pbkdf2 0.12.2", + "scrypt 0.11.0", "sha2", "spki", ] @@ -7055,6 +9607,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -7070,6 +9628,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "prefix-sum-vec" version = "0.1.2" @@ -7104,6 +9668,9 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", "uint", ] @@ -7388,12 +9955,75 @@ dependencies = [ "parity-wasm 0.41.0", ] +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls 0.23.13", + "socket2 0.5.7", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.17.8", + "rustc-hash 2.0.0", + "rustls 0.23.13", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2 0.5.7", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -7409,6 +10039,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.7.3" @@ -7509,6 +10149,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "rayon" version = "1.10.0" @@ -7692,11 +10341,11 @@ name = "relayer-rs" version = "0.1.0" dependencies = [ "alloy", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-transport-ws", + "alloy-rpc-client 0.3.6", + "alloy-rpc-types 0.3.6", + "alloy-transport-ws 0.3.6", "anyhow", "bincode", "clap", @@ -7739,6 +10388,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", + "hyper-rustls 0.24.2", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -7748,6 +10398,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -7756,6 +10407,7 @@ dependencies = [ "system-configuration 0.5.1", "tokio", "tokio-native-tls", + "tokio-rustls 0.24.1", "tokio-util 0.7.12", "tower-service", "url", @@ -7763,6 +10415,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots 0.25.4", "winreg", ] @@ -7778,11 +10431,12 @@ dependencies = [ "futures-core", "futures-util", "h2 0.4.6", + "hickory-resolver", "http 1.1.0", "http-body 1.0.1", "http-body-util", "hyper 1.4.1", - "hyper-rustls", + "hyper-rustls 0.27.3", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -7793,7 +10447,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls 0.23.13", + "rustls-native-certs 0.7.3", "rustls-pemfile 2.1.3", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", @@ -7801,14 +10459,26 @@ dependencies = [ "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tokio-rustls 0.26.0", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 0.26.6", "windows-registry", ] +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -7873,7 +10543,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -7903,9 +10573,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -7946,6 +10628,34 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" +[[package]] +name = "rust-bls-bn254" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24ee74e41c4bdfb5720a8d5743e089cb7c7b3ea7dfed73de1fe0a02c5fe744f9" +dependencies = [ + "aes", + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ctr", + "hex", + "hkdf", + "num-bigint 0.4.6", + "num-traits", + "pbkdf2 0.12.2", + "rand 0.8.5", + "scrypt 0.11.0", + "serde", + "serde_json", + "sha2", + "thiserror", + "unicode-normalization", + "uuid 0.8.2", +] + [[package]] name = "rust-ini" version = "0.18.0" @@ -8075,16 +10785,44 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls" version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ + "aws-lc-rs", + "log", "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -8096,10 +10834,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", - "rustls", - "rustls-native-certs", + "rustls 0.23.13", + "rustls-native-certs 0.7.3", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", ] [[package]] @@ -8115,6 +10865,19 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.3", + "rustls-pki-types", + "schannel", + "security-framework", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -8140,12 +10903,23 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", @@ -8201,6 +10975,39 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if 1.0.0", + "derive_more 0.99.18", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "schannel" version = "0.1.24" @@ -8220,7 +11027,19 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] [[package]] name = "scrypt" @@ -8228,11 +11047,22 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2", + "password-hash 0.5.0", + "pbkdf2 0.12.2", "salsa20", "sha2", ] +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "seahash" version = "4.1.0" @@ -8318,6 +11148,9 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "semver-parser" @@ -8334,6 +11167,12 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "send_wrapper" version = "0.6.0" @@ -8487,6 +11326,17 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha1" version = "0.10.6" @@ -8544,6 +11394,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -8592,6 +11452,12 @@ dependencies = [ "time", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -8602,6 +11468,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "sketches-ddsketch" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" + [[package]] name = "slab" version = "0.4.9" @@ -8665,6 +11537,20 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + [[package]] name = "spin" version = "0.5.2" @@ -8708,12 +11594,48 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.3", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "structmeta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.77", +] + +[[package]] +name = "structmeta-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "strum" version = "0.24.1" @@ -8783,6 +11705,26 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs 5.0.1", + "fs2", + "hex", + "once_cell", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -8805,6 +11747,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "syn-solidity" version = "0.8.5" @@ -8955,6 +11909,46 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "testcontainers" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "725cbe485aafddfd8b2d01665937c95498d894c07fabd9c4e06a53c7da4ccc56" +dependencies = [ + "async-trait", + "bollard", + "bollard-stubs", + "bytes", + "dirs 5.0.1", + "docker_credential", + "either", + "futures", + "log", + "memchr", + "parse-display", + "pin-project-lite", + "reqwest 0.12.7", + "serde", + "serde_json", + "serde_with", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util 0.7.12", + "url", +] + [[package]] name = "thiserror" version = "1.0.63" @@ -9144,13 +12138,34 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls", + "rustls 0.23.13", "rustls-pki-types", "tokio", ] @@ -9167,6 +12182,21 @@ dependencies = [ "tokio-util 0.7.12", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite 0.20.1", + "webpki-roots 0.25.4", +] + [[package]] name = "tokio-tungstenite" version = "0.21.0" @@ -9187,12 +12217,12 @@ checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.23.13", "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", "tungstenite 0.23.0", - "webpki-roots", + "webpki-roots 0.26.6", ] [[package]] @@ -9490,6 +12520,16 @@ dependencies = [ "web-time", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -9500,12 +12540,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log 0.2.0", + "tracing-serde", ] [[package]] @@ -9514,6 +12557,26 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.21.0" @@ -9546,7 +12609,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "rustls", + "rustls 0.23.13", "rustls-pki-types", "sha1", "thiserror", @@ -9656,8 +12719,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", + "serde", ] [[package]] @@ -9678,11 +12742,24 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "uuid" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom 0.2.15", +] [[package]] name = "valuable" @@ -9708,6 +12785,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "wait-timeout" version = "0.2.0" @@ -9723,6 +12806,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -10316,6 +13409,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "webpki-roots" version = "0.26.6" @@ -10386,6 +13485,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -10610,7 +13718,7 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.1", - "send_wrapper", + "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -10730,13 +13838,52 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe", + "zstd-safe 7.2.1", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml index a02f5574..be2c9393 100644 --- a/operator-rs/Cargo.toml +++ b/operator-rs/Cargo.toml @@ -27,4 +27,5 @@ serde_yaml = "0.9.1" clap = "4.5.18" tempfile = "3.10.0" hex = "0.4" -rand = "0.8" \ No newline at end of file +rand = "0.8" +eigensdk = { version = "0.1.0", features = ["full", "types", "crypto-bls", "utils"] } diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 3664c1d7..40b82bce 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -3,6 +3,8 @@ mod event_listener; use std::collections::HashMap; use std::sync::Arc; +use alloy_rlp::Header; +use eigensdk::logging::logger::Logger; use tokio::sync::mpsc; use tokio::time::{Duration, sleep}; use anyhow::{Result, anyhow}; @@ -10,11 +12,11 @@ use tracing::{info, warn, error}; use prometheus::Registry; use serde::{Serialize, Deserialize}; -use crate::operator::types::NodeConfig; +use crate::types::NodeConfig; use crate::types::messages::SignedStateRootUpdateMessage; use self::notifier::Notifier; use self::event_listener::{EventListener, SelectiveEventListener}; - +use eigensdk::crypto_bls::BlsKeyPair; // Constants const MQ_WAIT_TIMEOUT: Duration = Duration::from_secs(30); const MQ_REBROADCAST_TIMEOUT: Duration = Duration::from_secs(15); @@ -26,9 +28,8 @@ trait SafeClientTrait: Send + Sync { fn block_number(&self) -> u64; fn close(&self); } -type Header = (); -type Block = (); -type BlsKeyPair = (); + +// TODO: Replace wth actual types from eigensdk-rs type OperatorId = [u8; 32]; pub struct Attestor { @@ -41,13 +42,13 @@ pub struct Attestor { config: NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, - logger: tracing::Logger, + logger: Box, listener: Box, registry: Registry, } impl Attestor { - pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry) -> Result { + pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), id: hex::encode(&operator_id), @@ -78,7 +79,7 @@ impl Attestor { config: config.clone(), bls_keypair, operator_id, - logger: tracing::logger(), + logger, listener: Box::new(SelectiveEventListener::default()), registry, }) @@ -91,8 +92,8 @@ impl Attestor { Ok(()) } - pub async fn start(&self, ctx: &mut Context) -> Result<()> { - self.consumer.start(ctx, &self.config.near_da_indexer_rmq_ip_port_address).await?; + pub async fn start(&self) -> Result<()> { + self.consumer.start(&self.config.near_da_indexer_rmq_ip_port_address).await?; let mut subscriptions = HashMap::new(); let mut headers_rxs = HashMap::new(); @@ -107,17 +108,19 @@ impl Attestor { headers_rxs.insert(*rollup_id, headers_rx); } - tokio::spawn(self.process_mq_blocks(ctx.clone())); + let mq_task = tokio::spawn(self.process_mq_blocks()); - for rollup_id in self.clients.keys() { - let headers_rx = headers_rxs.remove(rollup_id).unwrap(); - tokio::spawn(self.process_rollup_headers(*rollup_id, headers_rx, ctx.clone())); + let mut rollup_tasks = Vec::new(); + for (rollup_id, headers_rx) in headers_rxs { + let task = tokio::spawn(self.process_rollup_headers(rollup_id, headers_rx)); + rollup_tasks.push(task); } + // You might want to store these JoinHandles somewhere if you need to cancel them later Ok(()) } - async fn process_mq_blocks(&self, mut ctx: Context) { + async fn process_mq_blocks(&self) { let mut mq_block_rx = self.consumer.get_block_stream(); while let Some(mq_block) = mq_block_rx.recv().await { @@ -146,17 +149,13 @@ impl Attestor { } } - async fn process_rollup_headers(&self, rollup_id: u32, mut headers_rx: mpsc::Receiver
, mut ctx: Context) { + async fn process_rollup_headers(&self, rollup_id: u32, mut headers_rx: mpsc::Receiver
) { while let Some(header) = headers_rx.recv().await { - if ctx.is_done() { - return; - } - - self.process_header(rollup_id, header, ctx.clone()).await; + self.process_header(rollup_id, header).await; } } - async fn process_header(&self, rollup_id: u32, rollup_header: Header, ctx: Context) { + async fn process_header(&self, rollup_id: u32, rollup_header: Header) { info!(self.logger, "Processing header"; "rollupId" => rollup_id, "height" => get_header_number(&rollup_header)); self.listener.observe_last_block_received(rollup_id, get_header_number(&rollup_header)); @@ -303,7 +302,7 @@ impl Consumer { fn new(_config: ConsumerConfig) -> Self { unimplemented!() } - async fn start(&self, _ctx: &mut Context, _address: &str) -> Result<()> { + async fn start(&self, _address: &str) -> Result<()> { unimplemented!() } fn get_block_stream(&self) -> mpsc::Receiver { diff --git a/operator-rs/src/config.rs b/operator-rs/src/config.rs index bc4a24cc..f9fc54d9 100644 --- a/operator-rs/src/config.rs +++ b/operator-rs/src/config.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use anyhow::Result; use serde::Deserialize; -use crate::operator::NodeConfig; +use crate::types::NodeConfig; // Changed from crate::operator::types pub fn load_config(path: PathBuf) -> Result { let config_str = std::fs::read_to_string(path)?; diff --git a/operator-rs/src/lib.rs b/operator-rs/src/lib.rs index 00799cc6..ed74a799 100644 --- a/operator-rs/src/lib.rs +++ b/operator-rs/src/lib.rs @@ -1,3 +1,4 @@ pub mod operator; pub mod config; pub mod attestor; +pub mod types; \ No newline at end of file diff --git a/operator-rs/src/operator.rs b/operator-rs/src/operator.rs index 83e93283..e25ca16c 100644 --- a/operator-rs/src/operator.rs +++ b/operator-rs/src/operator.rs @@ -61,7 +61,7 @@ mod mock { } use mock::*; -use types::NodeConfig; +use crate::types::NodeConfig; pub struct Operator { config: NodeConfig, From 97fe9877b92e3e76ba4cd6d14816cc7ad564d68d Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 6 Oct 2024 13:53:04 +0200 Subject: [PATCH 42/96] wip: broken attestor, fix Arc --- operator-rs/src/attestor/mod.rs | 180 +++++++++++++++----------------- operator-rs/src/types.rs | 18 ++++ 2 files changed, 103 insertions(+), 95 deletions(-) diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 40b82bce..d49410b7 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -10,13 +10,13 @@ use tokio::time::{Duration, sleep}; use anyhow::{Result, anyhow}; use tracing::{info, warn, error}; use prometheus::Registry; +use alloy_rpc_types::Block; use serde::{Serialize, Deserialize}; -use crate::types::NodeConfig; -use crate::types::messages::SignedStateRootUpdateMessage; +use crate::types::{NodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; use self::notifier::Notifier; use self::event_listener::{EventListener, SelectiveEventListener}; -use eigensdk::crypto_bls::BlsKeyPair; +use eigensdk::crypto_bls::{BlsKeyPair, BlsSignature}; // Constants const MQ_WAIT_TIMEOUT: Duration = Duration::from_secs(30); const MQ_REBROADCAST_TIMEOUT: Duration = Duration::from_secs(15); @@ -30,25 +30,29 @@ trait SafeClientTrait: Send + Sync { } // TODO: Replace wth actual types from eigensdk-rs -type OperatorId = [u8; 32]; +type OperatorId = eigensdk::types::operator::OperatorId; -pub struct Attestor { +struct SharedState { + notifier: Notifier, + consumer: Consumer, + logger: Box, + listener: Box, signed_root_tx: mpsc::Sender, +} + +pub struct Attestor { + shared: Arc, rollup_ids_to_urls: HashMap, clients: HashMap, rpc_calls_collectors: HashMap, // Replace with actual RPC calls collector - notifier: Notifier, - consumer: Consumer, config: NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, - logger: Box, - listener: Box, registry: Registry, } impl Attestor { - pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { + pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), id: hex::encode(&operator_id), @@ -69,31 +73,35 @@ impl Attestor { let (signed_root_tx, _) = mpsc::channel(100); - Ok(Self { + let shared = Arc::new(SharedState { + notifier: Notifier::new(), + consumer, + logger, + listener: Box::new(SelectiveEventListener::default()), signed_root_tx, + }); + + Ok(Self { + shared, rollup_ids_to_urls: config.rollup_ids_to_rpc_urls.clone(), clients, rpc_calls_collectors, - notifier: Notifier::new(), - consumer, config: config.clone(), bls_keypair, operator_id, - logger, - listener: Box::new(SelectiveEventListener::default()), registry, }) } pub fn enable_metrics(&mut self, registry: &Registry) -> Result<()> { let listener = event_listener::make_attestor_metrics(registry)?; - self.listener = Box::new(listener); - self.consumer.enable_metrics(registry)?; + // self.shared.listener = Box::new(listener); + // self.shared.consumer.enable_metrics(registry)?; Ok(()) } pub async fn start(&self) -> Result<()> { - self.consumer.start(&self.config.near_da_indexer_rmq_ip_port_address).await?; + self.shared.consumer.start(&self.config.near_da_indexer_rmq_ip_port_address).await?; let mut subscriptions = HashMap::new(); let mut headers_rxs = HashMap::new(); @@ -102,17 +110,29 @@ impl Attestor { let headers_rx = client.subscribe_new_head(); let block_number = client.block_number(); - self.listener.observe_initialization_initial_block_number(*rollup_id, block_number); + self.shared.listener.observe_initialization_initial_block_number(*rollup_id, block_number); subscriptions.insert(*rollup_id, ()); headers_rxs.insert(*rollup_id, headers_rx); } - let mq_task = tokio::spawn(self.process_mq_blocks()); + let shared = Arc::clone(&self.shared); + tokio::spawn(async move { + if let Err(e) = Self::process_mq_blocks(shared).await { + error!("Error processing MQ blocks: {:?}", e); + } + }); let mut rollup_tasks = Vec::new(); for (rollup_id, headers_rx) in headers_rxs { - let task = tokio::spawn(self.process_rollup_headers(rollup_id, headers_rx)); + let cloned_operator_id = self.operator_id.clone(); + let cloned_keypair = self.bls_keypair.clone(); + let self_ref = Arc::clone(&self.shared); + let task = tokio::spawn(async move { + if let Err(e) = Self::process_rollup_headers(&self_ref, rollup_id, cloned_operator_id, &cloned_keypair, headers_rx).await { + error!("Error processing rollup headers for rollup {}: {:?}", rollup_id, e); + } + }); rollup_tasks.push(task); } @@ -120,51 +140,38 @@ impl Attestor { Ok(()) } - async fn process_mq_blocks(&self) { - let mut mq_block_rx = self.consumer.get_block_stream(); + async fn process_mq_blocks(shared: Arc) -> Result<()> { + let mut mq_block_rx = shared.consumer.get_block_stream(); while let Some(mq_block) = mq_block_rx.recv().await { - if ctx.is_done() { - return; + shared.logger.info("Notifying", &format!("rollupId: {}, height: {}", mq_block.rollup_id, get_block_number(&mq_block.block))); + if let Err(e) = shared.notifier.notify(mq_block.rollup_id, mq_block.clone()) { + shared.logger.error("Notifier error", &e.to_string()); } - info!(self.logger, "Notifying"; "rollupId" => mq_block.rollup_id, "height" => mq_block.block.header().number); - if let Err(e) = self.notifier.notify(mq_block.rollup_id, mq_block.clone()) { - error!(self.logger, "Notifier error"; "err" => ?e); - } - - let notifier = self.notifier.clone(); - let logger = self.logger.clone(); - tokio::spawn(async move { - tokio::select! { - _ = sleep(MQ_REBROADCAST_TIMEOUT) => { - info!(logger, "Renotifying"; "rollupId" => mq_block.rollup_id, "height" => mq_block.block.header().number); - if let Err(e) = notifier.notify(mq_block.rollup_id, mq_block) { - error!(logger, "Error while renotifying"; "err" => ?e); - } - } - _ = ctx.done() => {} - } - }); + // Remove the rebroadcast logic, as it's not necessary with this approach } + + Ok(()) } - async fn process_rollup_headers(&self, rollup_id: u32, mut headers_rx: mpsc::Receiver
) { + async fn process_rollup_headers(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, mut headers_rx: mpsc::Receiver
) -> Result<()> { while let Some(header) = headers_rx.recv().await { - self.process_header(rollup_id, header).await; + Self::process_header(shared, rollup_id, operator_id, keypair, header).await?; } + Ok(()) } - async fn process_header(&self, rollup_id: u32, rollup_header: Header) { - info!(self.logger, "Processing header"; "rollupId" => rollup_id, "height" => get_header_number(&rollup_header)); + async fn process_header(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, rollup_header: Header) -> Result<()> { + shared.logger.info("Processing header", &get_header_number(&rollup_header).to_string()); - self.listener.observe_last_block_received(rollup_id, get_header_number(&rollup_header)); - self.listener.observe_last_block_received_timestamp(rollup_id, get_header_timestamp(&rollup_header)); - self.listener.on_block_received(rollup_id); + shared.listener.observe_last_block_received(rollup_id, get_header_number(&rollup_header)); + shared.listener.observe_last_block_received_timestamp(rollup_id, get_header_timestamp(&rollup_header)); + shared.listener.on_block_received(rollup_id); let predicate = |mq_block: &BlockData| { if mq_block.rollup_id != rollup_id { - warn!(self.logger, "Subscriber rollupId mismatch"; "expected" => rollup_id, "actual" => mq_block.rollup_id); + shared.logger.warn("Subscriber rollup mismatch {:?}", &mq_block.rollup_id.to_string()); return false; } @@ -173,35 +180,37 @@ impl Attestor { } if get_block_root(&mq_block.block) != get_header_root(&rollup_header) { - warn!(self.logger, "StateRoot from MQ doesn't match one from Node"); - self.listener.on_block_mismatch(rollup_id); + shared.logger.warn("StateRoot from MQ doesn't match one from Node", "str"); + shared.listener.on_block_mismatch(rollup_id); return false; } true }; - let (mq_blocks_rx, id) = self.notifier.subscribe(rollup_id, predicate); + let (mq_blocks_rx, id) = shared.notifier.subscribe(rollup_id, predicate); let mut transaction_id = [0u8; 32]; let mut da_commitment = [0u8; 32]; - tokio::select! { - _ = sleep(MQ_WAIT_TIMEOUT) => { - info!(self.logger, "MQ timeout"; "rollupId" => rollup_id, "height" => get_header_number(&rollup_header)); - self.listener.on_missed_mq_block(rollup_id); - } - Some(mq_block) = mq_blocks_rx.recv() => { - info!(self.logger, "MQ block found"; "height" => get_block_number(&mq_block.block), "rollupId" => mq_block.rollup_id); + let result = tokio::time::timeout(MQ_WAIT_TIMEOUT, mq_blocks_rx.recv()).await; + + match result { + Ok(Some(mq_block)) => { + shared.logger.info("MQ block found", &format!("height: {}, rollupId: {}", get_block_number(&mq_block.block), mq_block.rollup_id)); transaction_id = mq_block.transaction_id; da_commitment = mq_block.commitment; } - _ = ctx.done() => { - return; + Ok(None) => { + shared.logger.warn("MQ channel closed unexpectedly", &format!("rollupId: {}, height: {}", rollup_id, get_header_number(&rollup_header))); + } + Err(_) => { + shared.logger.info("MQ timeout", &format!("rollupId: {}, height: {}", rollup_id, get_header_number(&rollup_header))); + shared.listener.on_missed_mq_block(rollup_id); } } - self.notifier.unsubscribe(rollup_id, id); + shared.notifier.unsubscribe(rollup_id, id); let message = StateRootUpdateMessage { rollup_id, @@ -212,29 +221,33 @@ impl Attestor { near_da_commitment: da_commitment, }; - match sign_state_root_update_message(&self.bls_keypair, &message) { + match sign_state_root_update_message(keypair, &message) { Ok(signature) => { let signed_message = SignedStateRootUpdateMessage { message, bls_signature: signature, - operator_id: self.operator_id, + operator_id, }; - if let Err(e) = self.signed_root_tx.send(signed_message).await { - warn!(self.logger, "Failed to send signed state root update"; "err" => ?e); + if let Err(e) = shared.signed_root_tx.send(signed_message).await { + shared.logger.warn("Failed to send signed state root update {:?}", &e.to_string()) } } Err(e) => { - warn!(self.logger, "StateRoot sign failed"; "err" => ?e); + shared.logger.warn("State root sign faield {:?}", &e.to_string()); + return Err(anyhow::anyhow!("State root sign faield {:?}", &e.to_string())) } } + Ok(()) } - pub fn get_signed_root_rx(&self) -> mpsc::Receiver { - self.signed_root_tx.subscribe() + pub fn get_signed_root_rx(shared: Arc) -> mpsc::Receiver { + //TODO: implement the subscribe method here. Most likely we need to change the signed_root_tx to broadcast + // shared.signed_root_tx.subscribe() + unimplemented!() } pub fn close(&self) -> Result<()> { - self.consumer.close()?; + self.shared.consumer.close()?; for client in self.clients.values() { client.close(); } @@ -271,14 +284,11 @@ fn get_block_root(_block: &Block) -> [u8; 32] { unimplemented!() } -// Mock types (to be replaced with actual implementations) struct Consumer; struct ConsumerConfig { rollup_ids: Vec, id: String, } -struct Context; - #[derive(Clone, Debug, Serialize, Deserialize)] struct BlockData { rollup_id: u32, @@ -287,17 +297,6 @@ struct BlockData { commitment: [u8; 32], } -#[derive(Clone, Debug, Serialize, Deserialize)] -struct StateRootUpdateMessage { - rollup_id: u32, - block_height: u64, - timestamp: u64, - state_root: [u8; 32], - near_da_transaction_id: [u8; 32], - near_da_commitment: [u8; 32], -} -type BlsSignature = (); - impl Consumer { fn new(_config: ConsumerConfig) -> Self { unimplemented!() @@ -314,13 +313,4 @@ impl Consumer { fn close(&self) -> Result<()> { unimplemented!() } -} - -impl Context { - fn is_done(&self) -> bool { - unimplemented!() - } - fn done(&self) -> impl std::future::Future { - std::future::ready(()) - } } \ No newline at end of file diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index fa823fa5..cfeca1b8 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -1,4 +1,5 @@ use std::collections::HashMap; +use eigensdk::{crypto_bls::BlsSignature, types::operator::OperatorId}; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Deserialize, Serialize)] @@ -23,4 +24,21 @@ pub struct NodeConfig { pub near_da_indexer_rollup_ids: Vec, pub rollup_ids_to_rpc_urls: HashMap, pub task_response_wait_ms: u32, +} +#[derive(Clone, Debug)] + +pub struct SignedStateRootUpdateMessage { + pub message: StateRootUpdateMessage, + pub bls_signature: BlsSignature, + pub operator_id: OperatorId, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct StateRootUpdateMessage { + pub rollup_id: u32, + pub block_height: u64, + pub timestamp: u64, + pub state_root: [u8; 32], + pub near_da_transaction_id: [u8; 32], + pub near_da_commitment: [u8; 32], } \ No newline at end of file From 85fc220922b07e168da8afd02dba37f5a5bf2f00 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 6 Oct 2024 16:20:57 +0200 Subject: [PATCH 43/96] wip: compiles with missing functions --- operator-rs/src/attestor/mod.rs | 68 +++++++++++++++++---------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index d49410b7..072b9fb3 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -33,7 +33,7 @@ trait SafeClientTrait: Send + Sync { type OperatorId = eigensdk::types::operator::OperatorId; struct SharedState { - notifier: Notifier, + notifier: Arc, consumer: Consumer, logger: Box, listener: Box, @@ -74,7 +74,7 @@ impl Attestor { let (signed_root_tx, _) = mpsc::channel(100); let shared = Arc::new(SharedState { - notifier: Notifier::new(), + notifier: Arc::new(Notifier::new()), consumer, logger, listener: Box::new(SelectiveEventListener::default()), @@ -163,38 +163,40 @@ impl Attestor { } async fn process_header(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, rollup_header: Header) -> Result<()> { - shared.logger.info("Processing header", &get_header_number(&rollup_header).to_string()); - - shared.listener.observe_last_block_received(rollup_id, get_header_number(&rollup_header)); - shared.listener.observe_last_block_received_timestamp(rollup_id, get_header_timestamp(&rollup_header)); + let header_number = get_header_number(&rollup_header); + let header_timestamp = get_header_timestamp(&rollup_header); + let header_root = get_header_root(&rollup_header); + + shared.logger.info("Processing header", &header_number.to_string()); + + shared.listener.observe_last_block_received(rollup_id, header_number); + shared.listener.observe_last_block_received_timestamp(rollup_id, header_timestamp); shared.listener.on_block_received(rollup_id); - - let predicate = |mq_block: &BlockData| { + + let predicate = move |mq_block: &BlockData| { if mq_block.rollup_id != rollup_id { - shared.logger.warn("Subscriber rollup mismatch {:?}", &mq_block.rollup_id.to_string()); return false; } - - if get_header_number(&rollup_header) != get_block_number(&mq_block.block) { + + if header_number != get_block_number(&mq_block.block) { return false; } - - if get_block_root(&mq_block.block) != get_header_root(&rollup_header) { - shared.logger.warn("StateRoot from MQ doesn't match one from Node", "str"); - shared.listener.on_block_mismatch(rollup_id); + + if get_block_root(&mq_block.block) != header_root { return false; } - + true }; - - let (mq_blocks_rx, id) = shared.notifier.subscribe(rollup_id, predicate); - + + let notifier = Arc::clone(&shared.notifier); + let (mut mq_blocks_rx, id) = notifier.subscribe(rollup_id, predicate); + let mut transaction_id = [0u8; 32]; let mut da_commitment = [0u8; 32]; - + let result = tokio::time::timeout(MQ_WAIT_TIMEOUT, mq_blocks_rx.recv()).await; - + match result { Ok(Some(mq_block)) => { shared.logger.info("MQ block found", &format!("height: {}, rollupId: {}", get_block_number(&mq_block.block), mq_block.rollup_id)); @@ -202,25 +204,25 @@ impl Attestor { da_commitment = mq_block.commitment; } Ok(None) => { - shared.logger.warn("MQ channel closed unexpectedly", &format!("rollupId: {}, height: {}", rollup_id, get_header_number(&rollup_header))); + shared.logger.warn("MQ channel closed unexpectedly", &format!("rollupId: {}, height: {}", rollup_id, header_number)); } Err(_) => { - shared.logger.info("MQ timeout", &format!("rollupId: {}, height: {}", rollup_id, get_header_number(&rollup_header))); + shared.logger.info("MQ timeout", &format!("rollupId: {}, height: {}", rollup_id, header_number)); shared.listener.on_missed_mq_block(rollup_id); } } - - shared.notifier.unsubscribe(rollup_id, id); - + + notifier.unsubscribe(rollup_id, id); + let message = StateRootUpdateMessage { rollup_id, - block_height: get_header_number(&rollup_header), - timestamp: get_header_timestamp(&rollup_header), - state_root: get_header_root(&rollup_header), + block_height: header_number, + timestamp: header_timestamp, + state_root: header_root, near_da_transaction_id: transaction_id, near_da_commitment: da_commitment, }; - + match sign_state_root_update_message(keypair, &message) { Ok(signature) => { let signed_message = SignedStateRootUpdateMessage { @@ -229,12 +231,12 @@ impl Attestor { operator_id, }; if let Err(e) = shared.signed_root_tx.send(signed_message).await { - shared.logger.warn("Failed to send signed state root update {:?}", &e.to_string()) + shared.logger.warn("Failed to send signed state root update", &e.to_string()); } } Err(e) => { - shared.logger.warn("State root sign faield {:?}", &e.to_string()); - return Err(anyhow::anyhow!("State root sign faield {:?}", &e.to_string())) + shared.logger.warn("State root sign failed", &e.to_string()); + return Err(anyhow::anyhow!("State root sign failed: {}", e)); } } Ok(()) From bed95b2633959f1ba90ab0b63a33807b5b74b852 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 6 Oct 2024 14:51:48 -0700 Subject: [PATCH 44/96] wip: consumer implementation --- operator-rs/Cargo.toml | 10 +- operator-rs/src/attestor/mod.rs | 93 +++++++------ operator-rs/src/attestor/notifier.rs | 2 +- operator-rs/src/consumer/config.rs | 19 +++ operator-rs/src/consumer/event_listener.rs | 59 +++++++++ operator-rs/src/consumer/mod.rs | 139 ++++++++++++++++++++ operator-rs/src/consumer/queues_listener.rs | 125 ++++++++++++++++++ operator-rs/src/lib.rs | 3 +- operator-rs/src/types.rs | 88 +++++++++++++ 9 files changed, 485 insertions(+), 53 deletions(-) create mode 100644 operator-rs/src/consumer/config.rs create mode 100644 operator-rs/src/consumer/event_listener.rs create mode 100644 operator-rs/src/consumer/mod.rs create mode 100644 operator-rs/src/consumer/queues_listener.rs diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml index be2c9393..b294fa84 100644 --- a/operator-rs/Cargo.toml +++ b/operator-rs/Cargo.toml @@ -4,11 +4,11 @@ version = "0.1.0" edition = "2021" [dependencies] -alloy = { version = "0.3.6", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client"] } +alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde"] } alloy-primitives = "0.8.3" -alloy-rpc-client = "0.3.6" -alloy-rpc-types = "0.3.6" -alloy-transport-ws = "0.3.6" +alloy-rpc-client = "0.4.2" +alloy-rpc-types = "0.4.2" +alloy-transport-ws = "0.4.2" alloy-rlp = "0.3.8" near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } @@ -29,3 +29,5 @@ tempfile = "3.10.0" hex = "0.4" rand = "0.8" eigensdk = { version = "0.1.0", features = ["full", "types", "crypto-bls", "utils"] } +borsh = "1.5.1" +lapin = "2.3.1" diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 072b9fb3..7b4881c2 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -1,5 +1,7 @@ mod notifier; mod event_listener; +use crate::consumer::Consumer; +use crate::consumer::config::ConsumerConfig; use std::collections::HashMap; use std::sync::Arc; @@ -11,9 +13,10 @@ use anyhow::{Result, anyhow}; use tracing::{info, warn, error}; use prometheus::Registry; use alloy_rpc_types::Block; +use tokio::sync::Mutex; use serde::{Serialize, Deserialize}; -use crate::types::{NodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; +use crate::types::{BlockData, NodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; use self::notifier::Notifier; use self::event_listener::{EventListener, SelectiveEventListener}; use eigensdk::crypto_bls::{BlsKeyPair, BlsSignature}; @@ -34,7 +37,7 @@ type OperatorId = eigensdk::types::operator::OperatorId; struct SharedState { notifier: Arc, - consumer: Consumer, + consumer: Mutex, logger: Box, listener: Box, signed_root_tx: mpsc::Sender, @@ -75,7 +78,7 @@ impl Attestor { let shared = Arc::new(SharedState { notifier: Arc::new(Notifier::new()), - consumer, + consumer: Mutex::new(consumer), logger, listener: Box::new(SelectiveEventListener::default()), signed_root_tx, @@ -101,7 +104,18 @@ impl Attestor { } pub async fn start(&self) -> Result<()> { - self.shared.consumer.start(&self.config.near_da_indexer_rmq_ip_port_address).await?; + let addr = self.config.near_da_indexer_rmq_ip_port_address.clone(); + + let shared = Arc::clone(&self.shared); + tokio::spawn(async move { + loop { + let mut consumer = shared.consumer.lock().await; + if let Err(e) = consumer.start(&addr).await { + error!("Consumer error: {:?}", e); + tokio::time::sleep(Duration::from_secs(5)).await; + } + } + }); let mut subscriptions = HashMap::new(); let mut headers_rxs = HashMap::new(); @@ -141,18 +155,33 @@ impl Attestor { } async fn process_mq_blocks(shared: Arc) -> Result<()> { - let mut mq_block_rx = shared.consumer.get_block_stream(); - - while let Some(mq_block) = mq_block_rx.recv().await { - shared.logger.info("Notifying", &format!("rollupId: {}, height: {}", mq_block.rollup_id, get_block_number(&mq_block.block))); - if let Err(e) = shared.notifier.notify(mq_block.rollup_id, mq_block.clone()) { - shared.logger.error("Notifier error", &e.to_string()); + loop { + let consumer = shared.consumer.lock().await; + let mut mq_block_rx = consumer.get_block_stream(); + drop(consumer); // Release the lock + + loop { + match mq_block_rx.recv().await { + Ok(mq_block) => { + shared.logger.info("Notifying", &format!("rollupId: {}, height: {}", mq_block.rollup_id, get_block_number(&mq_block.block))); + if let Err(e) = shared.notifier.notify(mq_block.rollup_id, mq_block) { + shared.logger.error("Notifier error", &e.to_string()); + } + }, + Err(tokio::sync::broadcast::error::RecvError::Closed) => { + shared.logger.warn("MQ block channel closed {:?}", "test"); + break; // Break the inner loop to reconnect + }, + Err(tokio::sync::broadcast::error::RecvError::Lagged(skipped)) => { + shared.logger.warn("Skipped {:?} messages due to slow processing", &skipped.to_string()); + // Continue processing + } + } } - - // Remove the rebroadcast logic, as it's not necessary with this approach + + // If we've broken out of the inner loop, wait a bit before trying to reconnect + tokio::time::sleep(Duration::from_secs(5)).await; } - - Ok(()) } async fn process_rollup_headers(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, mut headers_rx: mpsc::Receiver
) -> Result<()> { @@ -248,8 +277,9 @@ impl Attestor { unimplemented!() } - pub fn close(&self) -> Result<()> { - self.shared.consumer.close()?; + pub async fn close(&self) -> Result<()> { + let mut consumer = self.shared.consumer.lock().await; + consumer.close().await?; for client in self.clients.values() { client.close(); } @@ -285,34 +315,3 @@ fn get_block_number(_block: &Block) -> u64 { fn get_block_root(_block: &Block) -> [u8; 32] { unimplemented!() } - -struct Consumer; -struct ConsumerConfig { - rollup_ids: Vec, - id: String, -} -#[derive(Clone, Debug, Serialize, Deserialize)] -struct BlockData { - rollup_id: u32, - block: Block, - transaction_id: [u8; 32], - commitment: [u8; 32], -} - -impl Consumer { - fn new(_config: ConsumerConfig) -> Self { - unimplemented!() - } - async fn start(&self, _address: &str) -> Result<()> { - unimplemented!() - } - fn get_block_stream(&self) -> mpsc::Receiver { - unimplemented!() - } - fn enable_metrics(&self, _registry: &Registry) -> Result<()> { - unimplemented!() - } - fn close(&self) -> Result<()> { - unimplemented!() - } -} \ No newline at end of file diff --git a/operator-rs/src/attestor/notifier.rs b/operator-rs/src/attestor/notifier.rs index 516a0671..dd1989e2 100644 --- a/operator-rs/src/attestor/notifier.rs +++ b/operator-rs/src/attestor/notifier.rs @@ -3,7 +3,7 @@ use std::sync::{Arc, Mutex}; use tokio::sync::mpsc; use anyhow::{Result, anyhow}; -use super::BlockData; +use crate::types::BlockData; type BlockPredicate = Arc bool + Send + Sync>; diff --git a/operator-rs/src/consumer/config.rs b/operator-rs/src/consumer/config.rs new file mode 100644 index 00000000..3ec0f2ec --- /dev/null +++ b/operator-rs/src/consumer/config.rs @@ -0,0 +1,19 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ConsumerConfig { + pub rollup_ids: Vec, + pub id: String, +} + +pub fn get_queue_name(rollup_id: u32, id: &str) -> String { + format!("rollup{}-{}", rollup_id, id) +} + +pub fn get_routing_key(rollup_id: u32) -> String { + format!("rollup{}", rollup_id) +} + +pub fn get_consumer_tag(rollup_id: u32) -> String { + format!("operator{}", rollup_id) +} \ No newline at end of file diff --git a/operator-rs/src/consumer/event_listener.rs b/operator-rs/src/consumer/event_listener.rs new file mode 100644 index 00000000..35d6a7e3 --- /dev/null +++ b/operator-rs/src/consumer/event_listener.rs @@ -0,0 +1,59 @@ +use prometheus::{Registry, IntCounter}; +use anyhow::Result; +use std::sync::Arc; + +pub trait EventListener: Send + Sync { + fn on_arrival(&self); + fn on_format_error(&self); +} + +const OPERATOR_NAMESPACE: &str = "sffl_operator"; +const CONSUMER_SUBSYSTEM: &str = "consumer"; + +#[derive(Default)] +pub struct SelectiveListener { + on_arrival_cb: Option>, + on_format_error_cb: Option>, +} + +impl EventListener for SelectiveListener { + fn on_arrival(&self) { + if let Some(cb) = &self.on_arrival_cb { + cb(); + } + } + + fn on_format_error(&self) { + if let Some(cb) = &self.on_format_error_cb { + cb(); + } + } +} + +impl Clone for SelectiveListener { + fn clone(&self) -> Self { + Self { + on_arrival_cb: self.on_arrival_cb.clone(), + on_format_error_cb: self.on_format_error_cb.clone(), + } + } +} + +pub fn make_consumer_metrics(registry: &Registry) -> Result> { + let num_blocks_arrived = IntCounter::new( + "num_of_mq_arrivals", + "The number of consumed blocks from MQ", + )?; + registry.register(Box::new(num_blocks_arrived.clone()))?; + + let num_format_errors = IntCounter::new( + "num_of_mismatched_blocks", + "The number of blocks from MQ with invalid format", + )?; + registry.register(Box::new(num_format_errors.clone()))?; + + Ok(Arc::new(SelectiveListener { + on_arrival_cb: Some(Arc::new(move || num_blocks_arrived.inc())), + on_format_error_cb: Some(Arc::new(move || num_format_errors.inc())), + })) +} \ No newline at end of file diff --git a/operator-rs/src/consumer/mod.rs b/operator-rs/src/consumer/mod.rs new file mode 100644 index 00000000..e7a324d9 --- /dev/null +++ b/operator-rs/src/consumer/mod.rs @@ -0,0 +1,139 @@ +pub mod config; +mod event_listener; +mod queues_listener; + +use std::sync::Arc; +use tokio::sync::broadcast; +use tokio::time::{Duration, sleep}; +use anyhow::{Result, anyhow}; +use tracing::{info, warn, error}; +use lapin::{Connection, ConnectionProperties}; +use prometheus::Registry; +use crate::types::BlockData; + +use self::config::ConsumerConfig; +use self::event_listener::EventListener; +use self::queues_listener::QueuesListener; + +const RECONNECT_DELAY: Duration = Duration::from_secs(5); +const RECHANNEL_DELAY: Duration = Duration::from_secs(2); +const EXCHANGE_NAME: &str = "rollup_exchange"; + +pub struct Consumer { + received_blocks_tx: Arc>, + queues_listener: Option>, + config: ConsumerConfig, + event_listener: Arc, + connection: Option, +} + +impl Consumer { + pub fn new(config: ConsumerConfig) -> Self { + let (received_blocks_tx, _) = broadcast::channel(100); + let received_blocks_tx = Arc::new(received_blocks_tx); + Self { + received_blocks_tx, + queues_listener: None, + config, + event_listener: Arc::new(event_listener::SelectiveListener::default()), + connection: None, + } + } + + pub fn enable_metrics(&mut self, registry: &Registry) -> Result<()> { + self.event_listener = event_listener::make_consumer_metrics(registry)?; + Ok(()) + } + + pub async fn start(&mut self, addr: &str) -> Result<()> { + loop { + match self.connect(addr).await { + Ok(conn) => { + self.connection = Some(conn); + if let Err(e) = self.setup_channel().await { + error!("Failed to setup channel: {:?}", e); + sleep(RECHANNEL_DELAY).await; + continue; + } + info!("Connected and channel set up"); + } + Err(e) => { + error!("Failed to connect: {:?}", e); + sleep(RECONNECT_DELAY).await; + continue; + } + } + + if let Some(conn) = &self.connection { + match conn.status().connected() { + true => { + // Connection is still active, wait for a while before checking again + sleep(Duration::from_secs(30)).await; + } + false => { + warn!("Connection lost, attempting to reconnect"); + self.connection = None; + sleep(RECONNECT_DELAY).await; + } + } + } else { + warn!("No active connection, attempting to reconnect"); + sleep(RECONNECT_DELAY).await; + } + } + } + + async fn connect(&self, addr: &str) -> Result { + Connection::connect( + addr, + ConnectionProperties::default(), + ).await.map_err(|e| anyhow::anyhow!("Failed to connect: {:?}", e)) + } + + async fn setup_channel(&mut self) -> Result<()> { + let conn = self.connection.as_ref().ok_or_else(|| anyhow!("No active connection"))?; + let channel = conn.create_channel().await?; + + let mut queues_listener = QueuesListener::new(Arc::clone(&self.received_blocks_tx), Arc::clone(&self.event_listener)); + + for &rollup_id in &self.config.rollup_ids { + let queue_name = config::get_queue_name(rollup_id, &self.config.id); + let queue = channel.queue_declare(&queue_name, Default::default(), Default::default()).await?; + + if queue.message_count() > 0 { + info!("Queue '{}' declared with {} messages", queue_name, queue.message_count()); + } + + channel.queue_bind( + &queue_name, + EXCHANGE_NAME, + &config::get_routing_key(rollup_id), + Default::default(), + Default::default(), + ).await?; + + let consumer = channel.basic_consume( + &queue_name, + &config::get_consumer_tag(rollup_id), + Default::default(), + Default::default(), + ).await?; + + queues_listener.add(rollup_id, consumer).await?; + } + + self.queues_listener = Some(Arc::new(queues_listener)); + Ok(()) + } + + pub async fn close(&mut self) -> Result<()> { + if let Some(conn) = self.connection.take() { + conn.close(0, "Consumer closed").await?; + } + Ok(()) + } + + pub fn get_block_stream(&self) -> broadcast::Receiver { + self.received_blocks_tx.subscribe() + } +} \ No newline at end of file diff --git a/operator-rs/src/consumer/queues_listener.rs b/operator-rs/src/consumer/queues_listener.rs new file mode 100644 index 00000000..b21aea84 --- /dev/null +++ b/operator-rs/src/consumer/queues_listener.rs @@ -0,0 +1,125 @@ +use std::collections::HashMap; +use std::sync::{Arc, Mutex}; +use alloy_rpc_types::Block; +use tokio::sync::broadcast; +use anyhow::{Result, anyhow}; +use lapin::{message::Delivery, Consumer}; +use tracing::{info, error}; +use borsh::BorshDeserialize; +use alloy_rlp::{Rlp, Decodable}; +use futures_util::StreamExt; +use serde_json::Value; +use crate::types::BlockData; + +use super::EventListener; +use crate::types::{Blob, Namespace, PublishPayload, SubmitRequest}; + +pub struct QueuesListener { + received_blocks_tx: Arc>, + queue_consumers: Arc>>, + event_listener: Arc, +} + +impl QueuesListener { + pub fn new( + received_blocks_tx: Arc>, + event_listener: Arc, + ) -> Self { + Self { + received_blocks_tx, + queue_consumers: Arc::new(Mutex::new(HashMap::new())), + event_listener, + } + } + + pub async fn add(&self, rollup_id: u32, consumer: Consumer) -> Result<()> { + let mut consumers = self.queue_consumers.lock().unwrap(); + consumers.insert(rollup_id, consumer); + Ok(()) + } + + pub fn remove(&self, rollup_id: u32) { + let mut consumers = self.queue_consumers.lock().unwrap(); + consumers.remove(&rollup_id); + } + + pub async fn listen(&self, rollup_id: u32) -> Result<()> { + let mut consumer = { + let consumers = self.queue_consumers.lock().unwrap(); + consumers.get(&rollup_id).cloned().ok_or_else(|| anyhow!("Consumer not found"))? + }; + + loop { + match consumer.next().await { + Some(Ok(delivery)) => { + if let Err(e) = self.process_delivery(rollup_id, delivery).await { + error!("Failed to process delivery: {:?}", e); + } + } + Some(Err(e)) => error!("Failed to get delivery: {:?}", e), + None => { + info!("Consumer channel closed"); + return Ok(()); + } + } + } + } + + async fn process_delivery(&self, rollup_id: u32, delivery: Delivery) -> Result<()> { + info!("New delivery, rollup_id: {}", rollup_id); + self.event_listener.on_arrival(); + + let publish_payload = PublishPayload::try_from_slice(&delivery.data) + .map_err(|e| { + self.event_listener.on_format_error(); + anyhow!("Error deserializing payload: {:?}", e) + })?; + + let submit_request = SubmitRequest::try_from_slice(&publish_payload.data) + .map_err(|e| { + self.event_listener.on_format_error(); + anyhow!("Invalid blob: {:?}", e) + })?; + + for blob in submit_request.blobs { + // Decode the blob data into Blocks + let mut rlp = Rlp::new(&blob.data)?; + let mut blocks = Vec::new(); + if let Some(block_vec) = rlp.get_next::>>()? { + for block_bytes in block_vec { + let json_block: Value = serde_json::from_slice(&block_bytes) + .map_err(|e| anyhow!("Failed to parse JSON block: {:?}", e))?; + let block: Block = serde_json::from_value(json_block) + .map_err(|e| anyhow!("Failed to convert JSON to Block: {:?}", e))?; + blocks.push(block); + } + }; + + for block in blocks { + let block_data = BlockData { + rollup_id, + transaction_id: publish_payload.transaction_id, + commitment: blob.commitment, + block + }; + + info!( + "MQ Block received: rollup_id={}, block_height={}, transaction_id={}, commitment={}", + rollup_id, + block_data.block.header.number, + hex::encode(block_data.transaction_id), + hex::encode(block_data.commitment) + ); + + if let Err(e) = self.received_blocks_tx.send(block_data) { + error!("Failed to send block data: {:?}", e); + } + } + } + + delivery.ack(Default::default()).await + .map_err(|e| anyhow!("Failed to ack delivery: {:?}", e))?; + + Ok(()) + } +} diff --git a/operator-rs/src/lib.rs b/operator-rs/src/lib.rs index ed74a799..12989226 100644 --- a/operator-rs/src/lib.rs +++ b/operator-rs/src/lib.rs @@ -1,4 +1,5 @@ pub mod operator; pub mod config; pub mod attestor; -pub mod types; \ No newline at end of file +pub mod types; +pub mod consumer; \ No newline at end of file diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index cfeca1b8..4f30c623 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -1,6 +1,8 @@ use std::collections::HashMap; +use borsh::BorshDeserialize; use eigensdk::{crypto_bls::BlsSignature, types::operator::OperatorId}; use serde::{Deserialize, Serialize}; +use alloy_rpc_types::Block; #[derive(Debug, Clone, Deserialize, Serialize)] pub struct NodeConfig { @@ -41,4 +43,90 @@ pub struct StateRootUpdateMessage { pub state_root: [u8; 32], pub near_da_transaction_id: [u8; 32], pub near_da_commitment: [u8; 32], +} + + +#[derive(Clone, Debug)] +pub struct BlockData { + pub rollup_id: u32, + pub commitment: [u8; 32], + pub transaction_id: [u8; 32], + pub block: Block, +} + + + +pub struct SubmitRequest { + pub blobs: Vec, +} + +pub struct Blob { + pub namespace: Namespace, + pub share_version: u32, + pub commitment: [u8; 32], + pub data: Vec, +} + +pub struct Namespace { + pub version: u8, + pub id: u32, +} + +pub struct PublishPayload { + pub transaction_id: [u8; 32], + pub data: Vec, +} + + +impl BorshDeserialize for PublishPayload { + fn deserialize_reader(reader: &mut R) -> std::io::Result { + let mut transaction_id = [0u8; 32]; + reader.read_exact(&mut transaction_id)?; + let mut data = Vec::new(); + reader.read_to_end(&mut data)?; + Ok(PublishPayload { transaction_id, data }) + } +} + +impl BorshDeserialize for SubmitRequest { + fn deserialize_reader(reader: &mut R) -> std::io::Result { + let blobs_len = u32::deserialize_reader(reader)? as usize; + let mut blobs = Vec::with_capacity(blobs_len); + for _ in 0..blobs_len { + blobs.push(Blob::deserialize_reader(reader)?); + } + Ok(SubmitRequest { blobs }) + } +} + + + + +impl BorshDeserialize for Blob { + fn deserialize_reader(reader: &mut R) -> std::io::Result { + Ok(Blob { + namespace: Namespace::deserialize_reader(reader)?, + share_version: u32::deserialize_reader(reader)?, + commitment: { + let mut commitment = [0u8; 32]; + reader.read_exact(&mut commitment)?; + commitment + }, + data: { + let data_len = u32::deserialize_reader(reader)? as usize; + let mut data = vec![0u8; data_len]; + reader.read_exact(&mut data)?; + data + }, + }) + } +} + +impl BorshDeserialize for Namespace { + fn deserialize_reader(reader: &mut R) -> std::io::Result { + Ok(Namespace { + version: u8::deserialize_reader(reader)?, + id: u32::deserialize_reader(reader)?, + }) + } } \ No newline at end of file From 5766be1dc8b0a27ec999bd71d25c8bacf34967aa Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 9 Oct 2024 23:03:47 -0600 Subject: [PATCH 45/96] wip: commented out operator, unit tests for notifier --- Cargo.lock | 513 +++++++++++++++++++++++++-- operator-rs/Cargo.toml | 4 +- operator-rs/src/attestor/mod.rs | 6 +- operator-rs/src/attestor/notifier.rs | 111 ++++++ operator-rs/src/config.rs | 7 +- operator-rs/src/lib.rs | 9 +- operator-rs/src/main.rs | 32 +- operator-rs/src/operator.rs | 438 +++++++++++------------ operator-rs/src/types.rs | 13 +- 9 files changed, 864 insertions(+), 269 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93ddef2f..1c668a05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,10 +367,10 @@ dependencies = [ "alloy-contract 0.3.6", "alloy-core", "alloy-eips 0.3.6", - "alloy-genesis", + "alloy-genesis 0.3.6", "alloy-json-rpc 0.3.6", "alloy-network 0.3.6", - "alloy-node-bindings", + "alloy-node-bindings 0.3.6", "alloy-provider 0.3.6", "alloy-pubsub 0.3.6", "alloy-rpc-client 0.3.6", @@ -380,10 +380,37 @@ dependencies = [ "alloy-signer-local 0.3.6", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", - "alloy-transport-ipc", + "alloy-transport-ipc 0.3.6", "alloy-transport-ws 0.3.6", ] +[[package]] +name = "alloy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-contract 0.4.2", + "alloy-core", + "alloy-eips 0.4.2", + "alloy-genesis 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", + "alloy-node-bindings 0.4.2", + "alloy-provider 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-signer-local 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "alloy-transport-ipc 0.4.2", + "alloy-transport-ws 0.4.2", +] + [[package]] name = "alloy-chains" version = "0.1.34" @@ -422,6 +449,22 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-consensus" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +dependencies = [ + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-serde 0.4.2", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "serde", +] + [[package]] name = "alloy-contract" version = "0.1.4" @@ -450,7 +493,7 @@ dependencies = [ "alloy-dyn-abi 0.8.5", "alloy-json-abi 0.8.5", "alloy-network 0.3.6", - "alloy-network-primitives", + "alloy-network-primitives 0.3.6", "alloy-primitives 0.8.5", "alloy-provider 0.3.6", "alloy-pubsub 0.3.6", @@ -462,6 +505,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-contract" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +dependencies = [ + "alloy-dyn-abi 0.8.5", + "alloy-json-abi 0.8.5", + "alloy-network 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.5", + "alloy-provider 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-sol-types 0.8.5", + "alloy-transport 0.4.2", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-core" version = "0.8.5" @@ -522,9 +586,9 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d319bb544ca6caeab58c39cea8921c55d924d4f68f2c60f24f914673f9a74a" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ "alloy-primitives 0.8.5", "alloy-rlp", @@ -565,6 +629,24 @@ dependencies = [ "sha2", ] +[[package]] +name = "alloy-eips" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-serde 0.4.2", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", +] + [[package]] name = "alloy-genesis" version = "0.3.6" @@ -576,6 +658,17 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-genesis" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", + "serde", +] + [[package]] name = "alloy-json-abi" version = "0.7.7" @@ -627,6 +720,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-json-rpc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-sol-types 0.8.5", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "alloy-network" version = "0.1.4" @@ -656,7 +763,7 @@ dependencies = [ "alloy-consensus 0.3.6", "alloy-eips 0.3.6", "alloy-json-rpc 0.3.6", - "alloy-network-primitives", + "alloy-network-primitives 0.3.6", "alloy-primitives 0.8.5", "alloy-rpc-types-eth 0.3.6", "alloy-serde 0.3.6", @@ -668,6 +775,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-network" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-sol-types 0.8.5", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network-primitives" version = "0.3.6" @@ -680,13 +808,43 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-network-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", + "serde", +] + [[package]] name = "alloy-node-bindings" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" dependencies = [ - "alloy-genesis", + "alloy-genesis 0.3.6", + "alloy-primitives 0.8.5", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", +] + +[[package]] +name = "alloy-node-bindings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1334a738aa1710cb8227441b3fcc319202ce78e967ef37406940242df4a454" +dependencies = [ + "alloy-genesis 0.4.2", "alloy-primitives 0.8.5", "k256", "rand 0.8.5", @@ -791,18 +949,18 @@ dependencies = [ "alloy-eips 0.3.6", "alloy-json-rpc 0.3.6", "alloy-network 0.3.6", - "alloy-network-primitives", - "alloy-node-bindings", + "alloy-network-primitives 0.3.6", + "alloy-node-bindings 0.3.6", "alloy-primitives 0.8.5", "alloy-pubsub 0.3.6", "alloy-rpc-client 0.3.6", - "alloy-rpc-types-anvil", + "alloy-rpc-types-anvil 0.3.6", "alloy-rpc-types-eth 0.3.6", - "alloy-rpc-types-trace", + "alloy-rpc-types-trace 0.3.6", "alloy-signer-local 0.3.6", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", - "alloy-transport-ipc", + "alloy-transport-ipc 0.3.6", "alloy-transport-ws 0.3.6", "async-stream", "async-trait", @@ -821,6 +979,47 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-provider" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-node-bindings 0.4.2", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.4.2", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types-anvil 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-trace 0.4.2", + "alloy-signer-local 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "alloy-transport-ipc 0.4.2", + "alloy-transport-ws 0.4.2", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 6.1.0", + "futures", + "futures-utils-wasm", + "lru 0.12.4", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-pubsub" version = "0.1.4" @@ -859,6 +1058,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-pubsub" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.5", + "alloy-transport 0.4.2", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", +] + [[package]] name = "alloy-rlp" version = "0.3.8" @@ -916,7 +1134,7 @@ dependencies = [ "alloy-pubsub 0.3.6", "alloy-transport 0.3.6", "alloy-transport-http 0.3.6", - "alloy-transport-ipc", + "alloy-transport-ipc 0.3.6", "alloy-transport-ws 0.3.6", "futures", "pin-project", @@ -930,6 +1148,31 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-rpc-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", + "alloy-transport-ipc 0.4.2", + "alloy-transport-ws 0.4.2", + "futures", + "pin-project", + "reqwest 0.12.7", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] + [[package]] name = "alloy-rpc-types" version = "0.1.4" @@ -946,13 +1189,27 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" dependencies = [ - "alloy-rpc-types-engine", + "alloy-rpc-types-engine 0.3.6", "alloy-rpc-types-eth 0.3.6", - "alloy-rpc-types-trace", + "alloy-rpc-types-trace 0.3.6", "alloy-serde 0.3.6", "serde", ] +[[package]] +name = "alloy-rpc-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-rpc-types-engine 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-rpc-types-trace 0.4.2", + "alloy-serde 0.4.2", + "serde", +] + [[package]] name = "alloy-rpc-types-anvil" version = "0.3.6" @@ -964,6 +1221,17 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d780adaa5d95b07ad92006b2feb68ecfa7e2015f7d5976ceaac4c906c73ebd07" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", + "serde", +] + [[package]] name = "alloy-rpc-types-engine" version = "0.3.6" @@ -981,6 +1249,24 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-rpc-types-engine" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-serde 0.4.2", + "derive_more 1.0.0", + "jsonwebtoken 9.3.0", + "rand 0.8.5", + "serde", + "strum 0.26.3", +] + [[package]] name = "alloy-rpc-types-eth" version = "0.1.4" @@ -1007,7 +1293,7 @@ checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" dependencies = [ "alloy-consensus 0.3.6", "alloy-eips 0.3.6", - "alloy-network-primitives", + "alloy-network-primitives 0.3.6", "alloy-primitives 0.8.5", "alloy-rlp", "alloy-serde 0.3.6", @@ -1020,6 +1306,25 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-network-primitives 0.4.2", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-serde 0.4.2", + "alloy-sol-types 0.8.5", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + [[package]] name = "alloy-rpc-types-trace" version = "0.3.6" @@ -1034,6 +1339,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-rpc-types-trace" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "alloy-serde" version = "0.1.4" @@ -1056,6 +1375,17 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-serde" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives 0.8.5", + "serde", + "serde_json", +] + [[package]] name = "alloy-signer" version = "0.1.4" @@ -1084,6 +1414,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +dependencies = [ + "alloy-primitives 0.8.5", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + [[package]] name = "alloy-signer-aws" version = "0.1.4" @@ -1134,6 +1478,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer-local" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" +dependencies = [ + "alloy-consensus 0.4.2", + "alloy-network 0.4.2", + "alloy-primitives 0.8.5", + "alloy-signer 0.4.2", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + [[package]] name = "alloy-sol-macro" version = "0.7.7" @@ -1318,6 +1678,25 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +dependencies = [ + "alloy-json-rpc 0.4.2", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.1.4" @@ -1348,6 +1727,21 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport-http" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-transport 0.4.2", + "reqwest 0.12.7", + "serde_json", + "tower 0.5.1", + "tracing", + "url", +] + [[package]] name = "alloy-transport-ipc" version = "0.3.6" @@ -1367,6 +1761,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "alloy-transport-ipc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90cf9cde7f2fce617da52768ee28f522264b282d148384a4ca0ea85af04fa3a" +dependencies = [ + "alloy-json-rpc 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util 0.7.12", + "tracing", +] + [[package]] name = "alloy-transport-ws" version = "0.1.4" @@ -1403,6 +1816,24 @@ dependencies = [ "ws_stream_wasm", ] +[[package]] +name = "alloy-transport-ws" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" +dependencies = [ + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", + "futures", + "http 1.1.0", + "rustls 0.23.13", + "serde_json", + "tokio", + "tokio-tungstenite 0.24.0", + "tracing", + "ws_stream_wasm", +] + [[package]] name = "amq-protocol" version = "7.2.1" @@ -8973,19 +9404,21 @@ dependencies = [ name = "operator-rs" version = "0.1.0" dependencies = [ - "alloy", + "alloy 0.4.2", "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-rpc-client 0.3.6", - "alloy-rpc-types 0.3.6", - "alloy-transport-ws 0.3.6", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-transport-ws 0.4.2", "anyhow", "bincode", + "borsh 1.5.1", "clap", "eigensdk", "eyre", "futures-util", "hex", + "lapin", "near-da-primitives", "near-da-rpc", "prometheus", @@ -10340,7 +10773,7 @@ dependencies = [ name = "relayer-rs" version = "0.1.0" dependencies = [ - "alloy", + "alloy 0.3.6", "alloy-primitives 0.8.5", "alloy-rlp", "alloy-rpc-client 0.3.6", @@ -12225,6 +12658,22 @@ dependencies = [ "webpki-roots 0.26.6", ] +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "rustls 0.23.13", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tungstenite 0.24.0", + "webpki-roots 0.26.6", +] + [[package]] name = "tokio-util" version = "0.6.10" @@ -12616,6 +13065,26 @@ dependencies = [ "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.23.13", + "rustls-pki-types", + "sha1", + "thiserror", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml index b294fa84..f97edffe 100644 --- a/operator-rs/Cargo.toml +++ b/operator-rs/Cargo.toml @@ -12,7 +12,7 @@ alloy-transport-ws = "0.4.2" alloy-rlp = "0.3.8" near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } -tokio = { version = "1.30", features = ["full"] } +tokio = { version = "1.0", features = ["full"] } prometheus = "0.13" warp = "0.3" serde = { version = "1.0", features = ["derive"] } @@ -23,7 +23,7 @@ tracing-subscriber = "0.3" futures-util = "0.3.30" eyre = "0.6" bincode = "1.3" -serde_yaml = "0.9.1" +serde_yaml = "0.9" clap = "4.5.18" tempfile = "3.10.0" hex = "0.4" diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 7b4881c2..764fc542 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -16,7 +16,7 @@ use alloy_rpc_types::Block; use tokio::sync::Mutex; use serde::{Serialize, Deserialize}; -use crate::types::{BlockData, NodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; +use crate::types::{BlockData, NFFLNodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; use self::notifier::Notifier; use self::event_listener::{EventListener, SelectiveEventListener}; use eigensdk::crypto_bls::{BlsKeyPair, BlsSignature}; @@ -48,14 +48,14 @@ pub struct Attestor { rollup_ids_to_urls: HashMap, clients: HashMap, rpc_calls_collectors: HashMap, // Replace with actual RPC calls collector - config: NodeConfig, + config: NFFLNodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, } impl Attestor { - pub fn new(config: &NodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { + pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), id: hex::encode(&operator_id), diff --git a/operator-rs/src/attestor/notifier.rs b/operator-rs/src/attestor/notifier.rs index dd1989e2..1dddb063 100644 --- a/operator-rs/src/attestor/notifier.rs +++ b/operator-rs/src/attestor/notifier.rs @@ -68,4 +68,115 @@ impl Clone for Notifier { rollup_ids_to_subscribers: self.rollup_ids_to_subscribers.clone(), } } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::sync::Arc; + use tokio::runtime::Runtime; + + #[test] + fn test_notifier_subscribe_and_notify() { + let rt = Runtime::new().unwrap(); + rt.block_on(async { + let notifier = Notifier::new(); + let rollup_id = 1; + + // Subscribe to notifications + let (mut rx, id) = notifier.subscribe(rollup_id, move |block| block.rollup_id == rollup_id); + + // Create a test block + let test_block = BlockData { + rollup_id, + block: Default::default(), // You might need to adjust this based on your Block type + transaction_id: [0; 32], + commitment: [0; 32], + }; + + // Notify the subscribers + notifier.notify(rollup_id, test_block.clone()).unwrap(); + + // Check if we received the notification + let received_block = rx.recv().await.unwrap(); + assert_eq!(received_block.rollup_id, test_block.rollup_id); + + // Unsubscribe + notifier.unsubscribe(rollup_id, id); + }); + } + + #[test] + fn test_notifier_multiple_subscribers() { + let rt = Runtime::new().unwrap(); + rt.block_on(async { + let notifier = Notifier::new(); + let rollup_id = 1; + + // Subscribe two listeners + let (mut rx1, id1) = notifier.subscribe(rollup_id, move |block| block.rollup_id == rollup_id); + let (mut rx2, id2) = notifier.subscribe(rollup_id, move |block| block.rollup_id == rollup_id); + + // Create a test block + let test_block = BlockData { + rollup_id, + block: Default::default(), + transaction_id: [0; 32], + commitment: [0; 32], + }; + + // Notify the subscribers + notifier.notify(rollup_id, test_block.clone()).unwrap(); + + // Check if both subscribers received the notification + let received_block1 = rx1.recv().await.unwrap(); + let received_block2 = rx2.recv().await.unwrap(); + assert_eq!(received_block1.rollup_id, test_block.rollup_id); + assert_eq!(received_block2.rollup_id, test_block.rollup_id); + + // Unsubscribe + notifier.unsubscribe(rollup_id, id1); + notifier.unsubscribe(rollup_id, id2); + }); + } + + #[test] + fn test_notifier_predicate_filtering() { + let rt = Runtime::new().unwrap(); + rt.block_on(async { + let notifier = Notifier::new(); + let rollup_id = 1; + + // Subscribe with a specific predicate + let (mut rx, id) = notifier.subscribe(rollup_id, move |block| block.rollup_id == rollup_id && block.transaction_id[0] == 1); + + // Create test blocks + let matching_block = BlockData { + rollup_id, + block: Default::default(), + transaction_id: [1; 32], + commitment: [0; 32], + }; + let non_matching_block = BlockData { + rollup_id, + block: Default::default(), + transaction_id: [0; 32], + commitment: [0; 32], + }; + + // Notify the subscribers + notifier.notify(rollup_id, matching_block.clone()).unwrap(); + notifier.notify(rollup_id, non_matching_block.clone()).unwrap(); + + // Check if only the matching block was received + let received_block = rx.recv().await.unwrap(); + assert_eq!(received_block.transaction_id[0], 1); + + // Ensure no more blocks were received + assert!(rx.try_recv().is_err()); + + // Unsubscribe + notifier.unsubscribe(rollup_id, id); + }); + } } \ No newline at end of file diff --git a/operator-rs/src/config.rs b/operator-rs/src/config.rs index f9fc54d9..b568d8b3 100644 --- a/operator-rs/src/config.rs +++ b/operator-rs/src/config.rs @@ -1,10 +1,9 @@ +use crate::NFFLNodeConfig; use std::path::PathBuf; use anyhow::Result; -use serde::Deserialize; -use crate::types::NodeConfig; // Changed from crate::operator::types -pub fn load_config(path: PathBuf) -> Result { +pub fn load_config(path: PathBuf) -> Result { let config_str = std::fs::read_to_string(path)?; - let config: NodeConfig = serde_yaml::from_str(&config_str)?; + let config: NFFLNodeConfig = serde_yaml::from_str(&config_str)?; Ok(config) } \ No newline at end of file diff --git a/operator-rs/src/lib.rs b/operator-rs/src/lib.rs index 12989226..280ba06f 100644 --- a/operator-rs/src/lib.rs +++ b/operator-rs/src/lib.rs @@ -1,5 +1,8 @@ -pub mod operator; +pub mod types; pub mod config; +pub mod operator; pub mod attestor; -pub mod types; -pub mod consumer; \ No newline at end of file +pub mod consumer; + +// Re-export NFFLNodeConfig +pub use crate::types::NFFLNodeConfig; \ No newline at end of file diff --git a/operator-rs/src/main.rs b/operator-rs/src/main.rs index fb768a67..e2b5859b 100644 --- a/operator-rs/src/main.rs +++ b/operator-rs/src/main.rs @@ -1,6 +1,7 @@ use anyhow::Result; use clap::{Command, Arg}; -use operator_rs::operator::{Operator, NodeConfig}; +use operator_rs::operator::Operator; +use operator_rs::types::NFFLNodeConfig; use std::path::PathBuf; use tracing_subscriber::FmtSubscriber; @@ -38,7 +39,18 @@ async fn main() -> Result<()> { match matches.subcommand() { Some(("run-args", args)) => { - let config = NodeConfig { + let config = NFFLNodeConfig { + enable_node_api: args.contains_id("enable-node-api"), + near_da_indexer_rmq_ip_port_address: args.get_one::("near-da-indexer-rmq-ip-port-address").unwrap().to_string(), + near_da_indexer_rollup_ids: args.get_one::("near-da-indexer-rollup-ids").unwrap().split(',').map(|s| s.parse().unwrap()).collect(), + rollup_ids_to_rpc_urls: args.get_one::("rollup-ids-to-rpc-urls") + .unwrap() + .split(',') + .map(|s| { + let mut parts = s.split(':'); + (parts.next().unwrap().parse().unwrap(), parts.next().unwrap().to_string()) + }) + .collect(), production: args.contains_id("production"), eth_rpc_url: args.get_one::("rpc-url").unwrap().to_string(), eth_ws_url: args.get_one::("ws-url").unwrap().to_string(), @@ -49,11 +61,11 @@ async fn main() -> Result<()> { operator_state_retriever_address: args.get_one::("operator-state-retriever").unwrap().to_string(), aggregator_server_ip_port_address: args.get_one::("aggregator-server-ip-port").unwrap().to_string(), enable_metrics: args.contains_id("enable-metrics"), - eigen_metrics_ip_port_address: args.get_one::("eigen-metrics-ip-port").map(|s| s.to_string()), - node_api_ip_port_address: args.get_one::("node-api-ip-port").map(|s| s.to_string()), + eigen_metrics_ip_port_address: args.get_one::("eigen-metrics-ip-port").unwrap().to_string(), + node_api_ip_port_address: args.get_one::("node-api-ip-port").unwrap().to_string(), task_response_wait_ms: args.get_one::("task-response-wait-ms").unwrap().parse().unwrap(), register_operator_on_startup: args.contains_id("register-operator-on-startup"), - token_strategy_addr: args.get_one::("token-strategy-addr").map(|s| s.to_string()), + token_strategy_addr: args.get_one::("token-strategy-addr").unwrap().to_string(), }; operator_main(config).await } @@ -66,7 +78,7 @@ async fn main() -> Result<()> { } } -async fn operator_main(config: NodeConfig) -> Result<()> { +async fn operator_main(config: NFFLNodeConfig) -> Result<()> { let log_level = if config.production { tracing::Level::INFO } else { @@ -81,11 +93,11 @@ async fn operator_main(config: NodeConfig) -> Result<()> { tracing::info!("Initializing Operator"); tracing::info!("Read config: {:?}", config); - let operator = Operator::new_from_config(config).await?; + // let operator = Operator::new(config).await?; + // tracing::info!("Starting operator"); - tracing::info!("Starting operator"); - let mut ctx = operator_rs::operator::Context; - operator.start(&mut ctx).await?; + // let mut ctx = operator_rs::operator::Context; + // operator.start(&mut ctx).await?; Ok(()) } \ No newline at end of file diff --git a/operator-rs/src/operator.rs b/operator-rs/src/operator.rs index e25ca16c..ececcf01 100644 --- a/operator-rs/src/operator.rs +++ b/operator-rs/src/operator.rs @@ -61,12 +61,12 @@ mod mock { } use mock::*; -use crate::types::NodeConfig; +use crate::types::NFFLNodeConfig; pub struct Operator { - config: NodeConfig, + config: NFFLNodeConfig, logger: Logger, - provider: Arc>, + provider: Arc>, metrics_reg: Registry, metrics: Option, node_api: Option, @@ -81,222 +81,222 @@ pub struct Operator { attestor: Attestor, } -impl Operator { - pub async fn new_from_config(config: NodeConfig) -> Result { - let logger = Logger; // Mock implementation - debug!(logger, "Creating operator from config", config = ?config); - - let node_api = if config.enable_metrics { - Some(NodeApi::new(AVS_NAME, SEM_VER, &config.node_api_ip_port_address.unwrap(), &logger)) - } else { - None - }; - - let bls_key_password = std::env::var("OPERATOR_BLS_KEY_PASSWORD").unwrap_or_else(|_| { - warn!(logger, "OPERATOR_BLS_KEY_PASSWORD env var not set. using empty string"); - String::new() - }); - - let bls_keypair = BlsKeyPair; // Mock implementation - let operator_id = OperatorId([0; 32]); // Mock implementation - - let ecdsa_key_password = std::env::var("OPERATOR_ECDSA_KEY_PASSWORD").unwrap_or_else(|_| { - warn!(logger, "OPERATOR_ECDSA_KEY_PASSWORD env var not set. using empty string"); - String::new() - }); - - let metrics_reg = Registry::new(); - let id = format!("{}OperatorSubsytem", config.operator_address); - - let ws = WsConnect::new(&config.eth_ws_url); - let provider = ProviderBuilder::new().on_ws(ws).await?; - - let registry_coordinator_addr = config.avs_registry_coordinator_address.parse()?; - let operator_state_retriever_addr = config.operator_state_retriever_address.parse()?; - - let aggregator_rpc_client = AggregatorRpcClient; // Mock implementation - - let avs_manager = AvsManager; // Mock implementation - - let attestor = Attestor; // Mock implementation - - let metrics = if config.enable_metrics { - Some(EigenMetrics::new(AVS_NAME, &config.eigen_metrics_ip_port_address.unwrap(), &metrics_reg, &logger)) - } else { - None - }; - - let operator = Self { - config: config.clone(), - logger, - provider: Arc::new(provider), - metrics_reg, - metrics, - node_api, - avs_manager, - bls_keypair, - operator_addr: config.operator_address.parse()?, - aggregator_server_ip_port_addr: config.aggregator_server_ip_port_address, - aggregator_rpc_client, - registry_coordinator_addr, - operator_id, - task_response_wait: Duration::from_millis(config.task_response_wait_ms), - attestor, - }; - - if config.register_operator_on_startup { - operator.register_operator_on_startup()?; - } - - info!(operator.logger, "Operator info"; - "operatorId" => ?operator.operator_id, - "operatorAddr" => ?config.operator_address, - "operatorG1Pubkey" => ?operator.bls_keypair.get_pub_key_g1(), - "operatorG2Pubkey" => ?operator.bls_keypair.get_pub_key_g2(), - ); - - Ok(operator) - } - - pub async fn start(&self, ctx: &mut Context) -> Result<()> { - info!("Starting operator"); - - if let Some(node_api) = &self.node_api { - node_api.start(); - } - - let metrics_err_chan = if let Some(metrics) = &self.metrics { - metrics.start(ctx, &self.metrics_reg) - } else { - tokio::sync::mpsc::channel(1).1 - }; - - let signed_roots_rx = self.attestor.get_signed_root_rx(); - let checkpoint_task_created_rx = self.avs_manager.get_checkpoint_task_created_rx(); - let operator_set_update_rx = self.avs_manager.get_operator_set_update_rx(); - - loop { - tokio::select! { - _ = ctx.done() => { - return self.close(); - } - Some(err) = metrics_err_chan.recv() => { - error!(self.logger, "Error in metrics server"; "err" => ?err); - } - Some(signed_state_root_update_message) = signed_roots_rx.recv() => { - tokio::spawn(async move { - self.aggregator_rpc_client.send_signed_state_root_update_to_aggregator(&signed_state_root_update_message).await; - }); - } - Some(checkpoint_task_created_event) = checkpoint_task_created_rx.recv() => { - tokio::spawn(async move { - if let Err(e) = self.process_checkpoint_task(checkpoint_task_created_event).await { - error!(self.logger, "Error processing checkpoint task"; "err" => ?e); - } - }); - } - Some(operator_set_update) = operator_set_update_rx.recv() => { - tokio::spawn(async move { - match self.sign_operator_set_update(operator_set_update) { - Ok(signed_update) => { - self.aggregator_rpc_client.send_signed_operator_set_update_to_aggregator(&signed_update).await; - } - Err(e) => { - error!(self.logger, "Failed to sign operator set update"; "err" => ?e); - } - } - }); - } - } - } - } - - async fn close(&self) -> Result<()> { - self.attestor.close()?; - Ok(()) - } - - fn sign_task_response(&self, task_response: &CheckpointTaskResponse) -> Result { - let task_response_hash = task_response.digest()?; - let bls_signature = self.bls_keypair.sign_message(&task_response_hash); - Ok(SignedCheckpointTaskResponse { - task_response: task_response.clone(), - bls_signature, - operator_id: self.operator_id.clone(), - }) - } - - fn sign_operator_set_update(&self, message: OperatorSetUpdateMessage) -> Result { - let message_hash = message.digest()?; - let signature = self.bls_keypair.sign_message(&message_hash); - Ok(SignedOperatorSetUpdateMessage { - message, - operator_id: self.operator_id.clone(), - bls_signature: signature, - }) - } - - async fn process_checkpoint_task(&self, event: CheckpointTaskCreatedEvent) -> Result<()> { - if self.task_response_wait > Duration::from_millis(0) { - tokio::time::sleep(self.task_response_wait).await; - } - - let checkpoint_messages = self.aggregator_rpc_client.get_aggregated_checkpoint_messages( - event.task.from_timestamp, - event.task.to_timestamp, - ).await?; - - let checkpoint_task_response = CheckpointTaskResponse::new_from_messages( - event.task_index, - checkpoint_messages, - )?; - - let signed_checkpoint_task_response = self.sign_task_response(&checkpoint_task_response)?; - - self.aggregator_rpc_client.send_signed_checkpoint_task_response_to_aggregator(&signed_checkpoint_task_response).await; - - Ok(()) - } - - pub async fn register_operator_with_avs(&self, operator_ecdsa_key_pair: &EcdsaKeyPair) -> Result<()> { - self.avs_manager.register_operator_with_avs(&self.provider, operator_ecdsa_key_pair, &self.bls_keypair).await - } - - pub async fn deposit_into_strategy(&self, strategy_addr: Address, amount: U256) -> Result<()> { - self.avs_manager.deposit_into_strategy(self.operator_addr, strategy_addr, amount).await - } - - pub async fn register_operator_with_eigenlayer(&self) -> Result<()> { - self.avs_manager.register_operator_with_eigenlayer(self.operator_addr).await - } - - pub async fn print_operator_status(&self) -> Result<()> { - let operator_id = self.avs_manager.get_operator_id(self.operator_addr).await?; - let pubkeys_registered = operator_id != [0; 32]; - let registered_with_avs = self.operator_id.0 != [0; 32]; - - let operator_status = OperatorStatus { - ecdsa_address: self.operator_addr.to_string(), - pubkeys_registered, - g1_pubkey: hex::encode(self.bls_keypair.get_pub_key_g1().to_bytes()), - g2_pubkey: hex::encode(self.bls_keypair.get_pub_key_g2().to_bytes()), - registered_with_avs, - operator_id: hex::encode(self.operator_id.0), - }; - - println!("{}", serde_json::to_string_pretty(&operator_status)?); - Ok(()) - } - - fn register_operator_on_startup(&self) -> Result<()> { - // Implementation omitted for brevity - Ok(()) - } - - pub fn bls_pubkey_g1(&self) -> G1Point { - self.bls_keypair.get_pub_key_g1() - } -} +// impl Operator { +// pub async fn new_from_config(config: NodeConfig) -> Result { +// let logger = Logger; // Mock implementation +// debug!(logger, "Creating operator from config", config = ?config); + +// let node_api = if config.enable_metrics { +// Some(NodeApi::new(AVS_NAME, SEM_VER, &config.node_api_ip_port_address.unwrap(), &logger)) +// } else { +// None +// }; + +// let bls_key_password = std::env::var("OPERATOR_BLS_KEY_PASSWORD").unwrap_or_else(|_| { +// warn!(logger, "OPERATOR_BLS_KEY_PASSWORD env var not set. using empty string"); +// String::new() +// }); + +// let bls_keypair = BlsKeyPair; // Mock implementation +// let operator_id = OperatorId([0; 32]); // Mock implementation + +// let ecdsa_key_password = std::env::var("OPERATOR_ECDSA_KEY_PASSWORD").unwrap_or_else(|_| { +// warn!(logger, "OPERATOR_ECDSA_KEY_PASSWORD env var not set. using empty string"); +// String::new() +// }); + +// let metrics_reg = Registry::new(); +// let id = format!("{}OperatorSubsytem", config.operator_address); + +// let ws = WsConnect::new(&config.eth_ws_url); +// let provider = ProviderBuilder::new().on_ws(ws).await?; + +// let registry_coordinator_addr = config.avs_registry_coordinator_address.parse()?; +// let operator_state_retriever_addr = config.operator_state_retriever_address.parse()?; + +// let aggregator_rpc_client = AggregatorRpcClient; // Mock implementation + +// let avs_manager = AvsManager; // Mock implementation + +// let attestor = Attestor; // Mock implementation + +// let metrics = if config.enable_metrics { +// Some(EigenMetrics::new(AVS_NAME, &config.eigen_metrics_ip_port_address.unwrap(), &metrics_reg, &logger)) +// } else { +// None +// }; + +// let operator = Self { +// config: config.clone(), +// logger, +// provider: Arc::new(provider), +// metrics_reg, +// metrics, +// node_api, +// avs_manager, +// bls_keypair, +// operator_addr: config.operator_address.parse()?, +// aggregator_server_ip_port_addr: config.aggregator_server_ip_port_address, +// aggregator_rpc_client, +// registry_coordinator_addr, +// operator_id, +// task_response_wait: Duration::from_millis(config.task_response_wait_ms), +// attestor, +// }; + +// if config.register_operator_on_startup { +// operator.register_operator_on_startup()?; +// } + +// info!(operator.logger, "Operator info"; +// "operatorId" => ?operator.operator_id, +// "operatorAddr" => ?config.operator_address, +// "operatorG1Pubkey" => ?operator.bls_keypair.get_pub_key_g1(), +// "operatorG2Pubkey" => ?operator.bls_keypair.get_pub_key_g2(), +// ); + +// Ok(operator) +// } + +// pub async fn start(&self, ctx: &mut Context) -> Result<()> { +// info!("Starting operator"); + +// if let Some(node_api) = &self.node_api { +// node_api.start(); +// } + +// let metrics_err_chan = if let Some(metrics) = &self.metrics { +// metrics.start(ctx, &self.metrics_reg) +// } else { +// tokio::sync::mpsc::channel(1).1 +// }; + +// let signed_roots_rx = self.attestor.get_signed_root_rx(); +// let checkpoint_task_created_rx = self.avs_manager.get_checkpoint_task_created_rx(); +// let operator_set_update_rx = self.avs_manager.get_operator_set_update_rx(); + +// loop { +// tokio::select! { +// _ = ctx.done() => { +// return self.close(); +// } +// Some(err) = metrics_err_chan.recv() => { +// error!(self.logger, "Error in metrics server"; "err" => ?err); +// } +// Some(signed_state_root_update_message) = signed_roots_rx.recv() => { +// tokio::spawn(async move { +// self.aggregator_rpc_client.send_signed_state_root_update_to_aggregator(&signed_state_root_update_message).await; +// }); +// } +// Some(checkpoint_task_created_event) = checkpoint_task_created_rx.recv() => { +// tokio::spawn(async move { +// if let Err(e) = self.process_checkpoint_task(checkpoint_task_created_event).await { +// error!(self.logger, "Error processing checkpoint task"; "err" => ?e); +// } +// }); +// } +// Some(operator_set_update) = operator_set_update_rx.recv() => { +// tokio::spawn(async move { +// match self.sign_operator_set_update(operator_set_update) { +// Ok(signed_update) => { +// self.aggregator_rpc_client.send_signed_operator_set_update_to_aggregator(&signed_update).await; +// } +// Err(e) => { +// error!(self.logger, "Failed to sign operator set update"; "err" => ?e); +// } +// } +// }); +// } +// } +// } +// } + +// async fn close(&self) -> Result<()> { +// self.attestor.close()?; +// Ok(()) +// } + +// fn sign_task_response(&self, task_response: &CheckpointTaskResponse) -> Result { +// let task_response_hash = task_response.digest()?; +// let bls_signature = self.bls_keypair.sign_message(&task_response_hash); +// Ok(SignedCheckpointTaskResponse { +// task_response: task_response.clone(), +// bls_signature, +// operator_id: self.operator_id.clone(), +// }) +// } + +// fn sign_operator_set_update(&self, message: OperatorSetUpdateMessage) -> Result { +// let message_hash = message.digest()?; +// let signature = self.bls_keypair.sign_message(&message_hash); +// Ok(SignedOperatorSetUpdateMessage { +// message, +// operator_id: self.operator_id.clone(), +// bls_signature: signature, +// }) +// } + +// async fn process_checkpoint_task(&self, event: CheckpointTaskCreatedEvent) -> Result<()> { +// if self.task_response_wait > Duration::from_millis(0) { +// tokio::time::sleep(self.task_response_wait).await; +// } + +// let checkpoint_messages = self.aggregator_rpc_client.get_aggregated_checkpoint_messages( +// event.task.from_timestamp, +// event.task.to_timestamp, +// ).await?; + +// let checkpoint_task_response = CheckpointTaskResponse::new_from_messages( +// event.task_index, +// checkpoint_messages, +// )?; + +// let signed_checkpoint_task_response = self.sign_task_response(&checkpoint_task_response)?; + +// self.aggregator_rpc_client.send_signed_checkpoint_task_response_to_aggregator(&signed_checkpoint_task_response).await; + +// Ok(()) +// } + +// pub async fn register_operator_with_avs(&self, operator_ecdsa_key_pair: &EcdsaKeyPair) -> Result<()> { +// self.avs_manager.register_operator_with_avs(&self.provider, operator_ecdsa_key_pair, &self.bls_keypair).await +// } + +// pub async fn deposit_into_strategy(&self, strategy_addr: Address, amount: U256) -> Result<()> { +// self.avs_manager.deposit_into_strategy(self.operator_addr, strategy_addr, amount).await +// } + +// pub async fn register_operator_with_eigenlayer(&self) -> Result<()> { +// self.avs_manager.register_operator_with_eigenlayer(self.operator_addr).await +// } + +// pub async fn print_operator_status(&self) -> Result<()> { +// let operator_id = self.avs_manager.get_operator_id(self.operator_addr).await?; +// let pubkeys_registered = operator_id != [0; 32]; +// let registered_with_avs = self.operator_id.0 != [0; 32]; + +// let operator_status = OperatorStatus { +// ecdsa_address: self.operator_addr.to_string(), +// pubkeys_registered, +// g1_pubkey: hex::encode(self.bls_keypair.get_pub_key_g1().to_bytes()), +// g2_pubkey: hex::encode(self.bls_keypair.get_pub_key_g2().to_bytes()), +// registered_with_avs, +// operator_id: hex::encode(self.operator_id.0), +// }; + +// println!("{}", serde_json::to_string_pretty(&operator_status)?); +// Ok(()) +// } + +// fn register_operator_on_startup(&self) -> Result<()> { +// // Implementation omitted for brevity +// Ok(()) +// } + +// pub fn bls_pubkey_g1(&self) -> G1Point { +// self.bls_keypair.get_pub_key_g1() +// } +// } #[derive(Serialize)] struct OperatorStatus { diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index 4f30c623..ca1f66a6 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -4,9 +4,8 @@ use eigensdk::{crypto_bls::BlsSignature, types::operator::OperatorId}; use serde::{Deserialize, Serialize}; use alloy_rpc_types::Block; -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct NodeConfig { - /// Used to set the logger level (true = info, false = debug) +#[derive(Debug, Serialize, Deserialize, Clone)] +pub struct NFFLNodeConfig { pub production: bool, pub operator_address: String, pub operator_state_retriever_address: String, @@ -27,8 +26,8 @@ pub struct NodeConfig { pub rollup_ids_to_rpc_urls: HashMap, pub task_response_wait_ms: u32, } -#[derive(Clone, Debug)] +#[derive(Clone, Debug)] pub struct SignedStateRootUpdateMessage { pub message: StateRootUpdateMessage, pub bls_signature: BlsSignature, @@ -55,11 +54,12 @@ pub struct BlockData { } - +#[derive(Clone, Debug)] pub struct SubmitRequest { pub blobs: Vec, } +#[derive(Clone, Debug)] pub struct Blob { pub namespace: Namespace, pub share_version: u32, @@ -67,11 +67,12 @@ pub struct Blob { pub data: Vec, } +#[derive(Clone, Debug)] pub struct Namespace { pub version: u8, pub id: u32, } - +#[derive(Clone, Debug)] pub struct PublishPayload { pub transaction_id: [u8; 32], pub data: Vec, From 48f162a604627a66528795842bf3e4fed4377b06 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 9 Oct 2024 23:27:01 -0600 Subject: [PATCH 46/96] wip: some mocking and implementation --- operator-rs/src/attestor/mod.rs | 118 ++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 53 deletions(-) diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 764fc542..a63e53af 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -5,24 +5,24 @@ use crate::consumer::config::ConsumerConfig; use std::collections::HashMap; use std::sync::Arc; -use alloy_rlp::Header; +use alloy_rpc_types::Header; use eigensdk::logging::logger::Logger; use tokio::sync::mpsc; -use tokio::time::{Duration, sleep}; +use tokio::time::Duration; use anyhow::{Result, anyhow}; -use tracing::{info, warn, error}; +use tracing::error; use prometheus::Registry; use alloy_rpc_types::Block; use tokio::sync::Mutex; -use serde::{Serialize, Deserialize}; use crate::types::{BlockData, NFFLNodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; use self::notifier::Notifier; use self::event_listener::{EventListener, SelectiveEventListener}; use eigensdk::crypto_bls::{BlsKeyPair, BlsSignature}; +use tokio::sync::broadcast; + // Constants const MQ_WAIT_TIMEOUT: Duration = Duration::from_secs(30); -const MQ_REBROADCAST_TIMEOUT: Duration = Duration::from_secs(15); // Mock types (to be replaced with actual implementations) type SafeClient = Arc; @@ -32,7 +32,7 @@ trait SafeClientTrait: Send + Sync { fn close(&self); } -// TODO: Replace wth actual types from eigensdk-rs +// TODO: Replace with actual types from eigensdk-rs type OperatorId = eigensdk::types::operator::OperatorId; struct SharedState { @@ -40,7 +40,7 @@ struct SharedState { consumer: Mutex, logger: Box, listener: Box, - signed_root_tx: mpsc::Sender, + signed_root_tx: broadcast::Sender, } pub struct Attestor { @@ -55,6 +55,7 @@ pub struct Attestor { } impl Attestor { + #[allow(clippy::too_many_arguments)] pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), @@ -74,7 +75,7 @@ impl Attestor { } } - let (signed_root_tx, _) = mpsc::channel(100); + let (signed_root_tx, _) = broadcast::channel(100); let shared = Arc::new(SharedState { notifier: Arc::new(Notifier::new()), @@ -89,7 +90,7 @@ impl Attestor { rollup_ids_to_urls: config.rollup_ids_to_rpc_urls.clone(), clients, rpc_calls_collectors, - config: config.clone(), + config, bls_keypair, operator_id, registry, @@ -97,9 +98,8 @@ impl Attestor { } pub fn enable_metrics(&mut self, registry: &Registry) -> Result<()> { - let listener = event_listener::make_attestor_metrics(registry)?; - // self.shared.listener = Box::new(listener); - // self.shared.consumer.enable_metrics(registry)?; + let _listener = event_listener::make_attestor_metrics(registry)?; + // TODO: Implement metrics enabling logic Ok(()) } @@ -117,7 +117,6 @@ impl Attestor { } }); - let mut subscriptions = HashMap::new(); let mut headers_rxs = HashMap::new(); for (rollup_id, client) in &self.clients { @@ -126,7 +125,6 @@ impl Attestor { self.shared.listener.observe_initialization_initial_block_number(*rollup_id, block_number); - subscriptions.insert(*rollup_id, ()); headers_rxs.insert(*rollup_id, headers_rx); } @@ -137,20 +135,17 @@ impl Attestor { } }); - let mut rollup_tasks = Vec::new(); for (rollup_id, headers_rx) in headers_rxs { let cloned_operator_id = self.operator_id.clone(); let cloned_keypair = self.bls_keypair.clone(); let self_ref = Arc::clone(&self.shared); - let task = tokio::spawn(async move { + tokio::spawn(async move { if let Err(e) = Self::process_rollup_headers(&self_ref, rollup_id, cloned_operator_id, &cloned_keypair, headers_rx).await { error!("Error processing rollup headers for rollup {}: {:?}", rollup_id, e); } }); - rollup_tasks.push(task); } - // You might want to store these JoinHandles somewhere if you need to cancel them later Ok(()) } @@ -169,11 +164,11 @@ impl Attestor { } }, Err(tokio::sync::broadcast::error::RecvError::Closed) => { - shared.logger.warn("MQ block channel closed {:?}", "test"); + shared.logger.warn("MQ block channel closed", ""); break; // Break the inner loop to reconnect }, Err(tokio::sync::broadcast::error::RecvError::Lagged(skipped)) => { - shared.logger.warn("Skipped {:?} messages due to slow processing", &skipped.to_string()); + shared.logger.warn("Skipped messages due to slow processing", &skipped.to_string()); // Continue processing } } @@ -203,19 +198,9 @@ impl Attestor { shared.listener.on_block_received(rollup_id); let predicate = move |mq_block: &BlockData| { - if mq_block.rollup_id != rollup_id { - return false; - } - - if header_number != get_block_number(&mq_block.block) { - return false; - } - - if get_block_root(&mq_block.block) != header_root { - return false; - } - - true + mq_block.rollup_id == rollup_id + && header_number == get_block_number(&mq_block.block) + && get_block_root(&mq_block.block) == header_root }; let notifier = Arc::clone(&shared.notifier); @@ -259,22 +244,20 @@ impl Attestor { bls_signature: signature, operator_id, }; - if let Err(e) = shared.signed_root_tx.send(signed_message).await { + if let Err(e) = shared.signed_root_tx.send(signed_message) { shared.logger.warn("Failed to send signed state root update", &e.to_string()); } } Err(e) => { shared.logger.warn("State root sign failed", &e.to_string()); - return Err(anyhow::anyhow!("State root sign failed: {}", e)); + return Err(anyhow!("State root sign failed: {}", e)); } } Ok(()) } - pub fn get_signed_root_rx(shared: Arc) -> mpsc::Receiver { - //TODO: implement the subscribe method here. Most likely we need to change the signed_root_tx to broadcast - // shared.signed_root_tx.subscribe() - unimplemented!() + pub fn get_signed_root_rx(shared: Arc) -> broadcast::Receiver { + shared.signed_root_tx.subscribe() } pub async fn close(&self) -> Result<()> { @@ -287,31 +270,60 @@ impl Attestor { } } -// Helper functions (to be implemented) +// Helper functions implementations fn create_safe_client(_url: &str) -> Result { - unimplemented!() + // This is a mock implementation. In a real scenario, you'd create an actual client. + struct MockSafeClient; + impl SafeClientTrait for MockSafeClient { + fn subscribe_new_head(&self) -> mpsc::Receiver
{ + let (tx, rx) = mpsc::channel(100); + tokio::spawn(async move { + loop { + tokio::time::sleep(Duration::from_secs(10)).await; + let mock_header = Header::default(); // Create a mock header + if tx.send(mock_header).await.is_err() { + break; + } + } + }); + rx + } + + fn block_number(&self) -> u64 { + 0 // Mock implementation + } + + fn close(&self) { + // Mock implementation + } + } + + Ok(Arc::new(MockSafeClient) as SafeClient) } fn sign_state_root_update_message(_keypair: &BlsKeyPair, _message: &StateRootUpdateMessage) -> Result { - unimplemented!() + // In a real implementation, you'd use the actual BLS signing logic + // For now, we'll create a mock signature + let mock_signature = BlsSignature::default(); // Assuming BlsSignature has a default implementation + Ok(mock_signature) } -fn get_header_number(_header: &Header) -> u64 { - unimplemented!() +fn get_header_number(header: &Header) -> u64 { + header.number } -fn get_header_timestamp(_header: &Header) -> u64 { - unimplemented!() +fn get_header_timestamp(header: &Header) -> u64 { + header.timestamp } -fn get_header_root(_header: &Header) -> [u8; 32] { - unimplemented!() +fn get_header_root(header: &Header) -> [u8; 32] { + header.state_root.into() } -fn get_block_number(_block: &Block) -> u64 { - unimplemented!() +fn get_block_number(block: &Block) -> u64 { + block.header.number } -fn get_block_root(_block: &Block) -> [u8; 32] { - unimplemented!() -} +fn get_block_root(block: &Block) -> [u8; 32] { + block.header.state_root.into() +} \ No newline at end of file From bfadaa8be811b48334b8a2a5334648126751307c Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 13 Oct 2024 09:01:34 +0200 Subject: [PATCH 47/96] wip: setup and operator-rs --- operator-rs/Dockerfile | 29 ++++ operator-rs/src/attestor/mod.rs | 3 +- operator-rs/src/consumer/event_listener.rs | 3 - operator-rs/src/main.rs | 16 ++ operator-rs/src/operator.rs | 8 - operator-rs/src/types.rs | 40 ++++- setup/i-r-a/config/.env.example | 14 ++ setup/i-r-a/config/indexer.yaml | 14 ++ setup/i-r-a/config/keys/bls.example.json | 1 + setup/i-r-a/config/keys/ecdsa.example.json | 1 + setup/i-r-a/config/operator.yaml | 51 +++++++ setup/i-r-a/docker-compose.yml | 166 +++++++++++++++++++++ setup/i-r-a/prometheus/prometheus.yml | 26 ++++ 13 files changed, 359 insertions(+), 13 deletions(-) create mode 100644 operator-rs/Dockerfile create mode 100644 setup/i-r-a/config/.env.example create mode 100644 setup/i-r-a/config/indexer.yaml create mode 100644 setup/i-r-a/config/keys/bls.example.json create mode 100644 setup/i-r-a/config/keys/ecdsa.example.json create mode 100644 setup/i-r-a/config/operator.yaml create mode 100644 setup/i-r-a/docker-compose.yml create mode 100644 setup/i-r-a/prometheus/prometheus.yml diff --git a/operator-rs/Dockerfile b/operator-rs/Dockerfile new file mode 100644 index 00000000..56b1e3a8 --- /dev/null +++ b/operator-rs/Dockerfile @@ -0,0 +1,29 @@ +# Use the official Rust image as a parent image +FROM rust:1.70 as builder + +# Set the working directory in the container +WORKDIR /usr/src/operator-rs + +# Copy the Cargo.toml file +COPY Cargo.toml ./ + +# Copy the source code +COPY src ./src + +# Build the application +RUN cargo build --release + +# Start a new stage for a smaller final image +FROM debian:bookworm-slim + +# Install OpenSSL and CA certificates +RUN apt-get update && apt-get install -y openssl ca-certificates && rm -rf /var/lib/apt/lists/* + +# Copy the binary from the builder stage +COPY --from=builder /usr/src/operator-rs/target/release/operator-rs /usr/local/bin/operator-rs + +# Set the entrypoint to the operator-rs binary +ENTRYPOINT ["operator-rs"] + +# Default command (can be overridden) +CMD ["--help"] \ No newline at end of file diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index a63e53af..0831377a 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -56,7 +56,8 @@ pub struct Attestor { impl Attestor { #[allow(clippy::too_many_arguments)] - pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { + pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, + operator_id: OperatorId, registry: Registry, logger: Box) -> Result { let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), id: hex::encode(&operator_id), diff --git a/operator-rs/src/consumer/event_listener.rs b/operator-rs/src/consumer/event_listener.rs index 35d6a7e3..4852289b 100644 --- a/operator-rs/src/consumer/event_listener.rs +++ b/operator-rs/src/consumer/event_listener.rs @@ -7,9 +7,6 @@ pub trait EventListener: Send + Sync { fn on_format_error(&self); } -const OPERATOR_NAMESPACE: &str = "sffl_operator"; -const CONSUMER_SUBSYSTEM: &str = "consumer"; - #[derive(Default)] pub struct SelectiveListener { on_arrival_cb: Option>, diff --git a/operator-rs/src/main.rs b/operator-rs/src/main.rs index e2b5859b..cdea1578 100644 --- a/operator-rs/src/main.rs +++ b/operator-rs/src/main.rs @@ -1,7 +1,11 @@ use anyhow::Result; use clap::{Command, Arg}; +use eigensdk::logging::logger::Logger; +use operator_rs::attestor::Attestor; +use operator_rs::consumer::Consumer; use operator_rs::operator::Operator; use operator_rs::types::NFFLNodeConfig; +use prometheus::Registry; use std::path::PathBuf; use tracing_subscriber::FmtSubscriber; @@ -93,6 +97,18 @@ async fn operator_main(config: NFFLNodeConfig) -> Result<()> { tracing::info!("Initializing Operator"); tracing::info!("Read config: {:?}", config); + let attestor_config = config.clone(); + let attestor = Attestor::new( + attestor_config, + eigensdk::crypto_bls::BlsKeyPair::new(config.bls_private_key_store_path.clone())?, + eigensdk::types::operator::OperatorId::from([1u8; 32]), + Registry::default(), + operator_rs::types::create_default_logger() + )?; + //Start the attestor + attestor.start().await?; + + // let operator = Operator::new(config).await?; // tracing::info!("Starting operator"); diff --git a/operator-rs/src/operator.rs b/operator-rs/src/operator.rs index ececcf01..9240c9ac 100644 --- a/operator-rs/src/operator.rs +++ b/operator-rs/src/operator.rs @@ -308,14 +308,6 @@ struct OperatorStatus { operator_id: String, } -// Mock implementations for missing types -pub struct Context; -impl Context { - pub fn done(&self) -> impl std::future::Future { - std::future::ready(()) - } -} - #[derive(Clone)] pub struct CheckpointTaskCreatedEvent { pub task: CheckpointTask, diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index ca1f66a6..4557bd6f 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -3,6 +3,9 @@ use borsh::BorshDeserialize; use eigensdk::{crypto_bls::BlsSignature, types::operator::OperatorId}; use serde::{Deserialize, Serialize}; use alloy_rpc_types::Block; +use eigensdk::logging::logger::Logger; +use tracing::{debug, error, info, warn}; +use std::sync::Arc; #[derive(Debug, Serialize, Deserialize, Clone)] pub struct NFFLNodeConfig { @@ -130,4 +133,39 @@ impl BorshDeserialize for Namespace { id: u32::deserialize_reader(reader)?, }) } -} \ No newline at end of file +} + +// Add this struct and implementation at the end of the file +#[derive(Debug)] +pub struct DefaultLogger; + +impl Logger for DefaultLogger { + fn info(&self, target: &str, message: &str) { + info!(target = target, "{}", message); + } + + fn warn(&self, target: &str, message: &str) { + warn!(target = target, "{}", message); + } + + fn error(&self, target: &str, message: &str) { + error!(target = target, "{}", message); + } + + fn debug(&self, target: &str, message: &str) { + debug!(target = target, "{}", message); + } + + fn fatal(&self, target: &str, message: &str) { + error!(target = target, "FATAL: {}", message); + } + + fn log(&self, target: &str, message: &str) { + info!(target: "default_logger", "{}: {}", target, message); + } +} + +// Function to create a new logger instance +pub fn create_default_logger() -> Box { + Box::new(DefaultLogger) +} diff --git a/setup/i-r-a/config/.env.example b/setup/i-r-a/config/.env.example new file mode 100644 index 00000000..19868c8b --- /dev/null +++ b/setup/i-r-a/config/.env.example @@ -0,0 +1,14 @@ +# Tagged release for SFFL containers +SFFL_RELEASE=latest + +# NEAR chain ID +NEAR_CHAIN_ID=testnet + +# Path to the directory containing the keys for the relayer DA account +NEAR_KEYS_DIR=~/.near-credentials + +# Home dir +NEAR_HOME_DIR=~/.near + +# RPC URL of the NEAR network +NEAR_RPC_URL=https://rpc.testnet.near.org \ No newline at end of file diff --git a/setup/i-r-a/config/indexer.yaml b/setup/i-r-a/config/indexer.yaml new file mode 100644 index 00000000..9e49b0c8 --- /dev/null +++ b/setup/i-r-a/config/indexer.yaml @@ -0,0 +1,14 @@ +# RMQ address +rmq_address: amqp://rmq:5672 + +# AVS network contract IDs +da_contract_ids: + - sfrelayer421614-2.testnet + - sfrelayer21155420-2.testnet + +# Rollup IDs, must follow the same order as da_contract_ids +rollup_ids: + - 421614 + - 11155420 + +metrics_ip_port_address: "0.0.0.0:9092" \ No newline at end of file diff --git a/setup/i-r-a/config/keys/bls.example.json b/setup/i-r-a/config/keys/bls.example.json new file mode 100644 index 00000000..72306d85 --- /dev/null +++ b/setup/i-r-a/config/keys/bls.example.json @@ -0,0 +1 @@ +{"pubKey":"E([19408553463882111916887171276012224475029133183214861480489485386352635269635,17418827901203159022109906145273000034647571131322064812191371351028964064220])","crypto":{"cipher":"aes-128-ctr","ciphertext":"f2e5a3df524234426297f84b80c3c69e008ca17960fa512845b250a5308a7a6c","cipherparams":{"iv":"64528130796bc7227f48b0b01030b4c2"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"7ceca78a0011e3ab5dce8b4f562b0615f60d8642b841d751bc676fb7dc574938"},"mac":"f9e5050e1077e2558a66f82fad05259ebc9e81da6e5ef8025f34d8fbc7e6e8ac"}} \ No newline at end of file diff --git a/setup/i-r-a/config/keys/ecdsa.example.json b/setup/i-r-a/config/keys/ecdsa.example.json new file mode 100644 index 00000000..aa11e4c9 --- /dev/null +++ b/setup/i-r-a/config/keys/ecdsa.example.json @@ -0,0 +1 @@ +{"address":"d5a0359da7b310917d7760385516b2426e86ab7f","crypto":{"cipher":"aes-128-ctr","ciphertext":"91a55f690a65c9b352a24783d1db851a7b2f826763ff979a877bb78ae63860eb","cipherparams":{"iv":"313c5db87ccef736f2844c218b0728c2"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"64e28acc8270b64aa22fb6554a694657face2887ceb6cc209c607db11c4338d7"},"mac":"9087dd2b17322a7237505b368eac0462dd8c87637516cd80740fafe7d2f3ae5b"},"id":"96c2a806-cd73-4e95-8d65-e0933a3e7e1c","version":3} \ No newline at end of file diff --git a/setup/i-r-a/config/operator.yaml b/setup/i-r-a/config/operator.yaml new file mode 100644 index 00000000..8933f85e --- /dev/null +++ b/setup/i-r-a/config/operator.yaml @@ -0,0 +1,51 @@ + +# Production flag for logging - false for printing debug logs +production: false + +# Operator ECDSA address +operator_address: 0xD5A0359da7B310917d7760385516B2426E86ab7f + +# AVS contract addresses +avs_registry_coordinator_address: 0x0069A298e68c09B047E5447b3b762E42114a99a2 +operator_state_retriever_address: 0x8D0b27Df027bc5C41855Da352Da4B5B2C406c1F0 + +# AVS network RPCs +# *Important*: The WS RPC must allow event subscriptions. As Public Node +# doesn't support it, you should use a different RPC provider. +eth_rpc_url: https://ethereum-holesky-rpc.publicnode.com +eth_ws_url: wss://ethereum-holesky-rpc.publicnode.com # You should change this! + +# EigenLayer ECDSA and BLS private key paths +ecdsa_private_key_store_path: /near-sffl/config/keys/ecdsa.json +bls_private_key_store_path: /near-sffl/config/keys/bls.json + +# Aggregator server IP and port +aggregator_server_ip_port_address: near-sffl-aggregator:8090 + +# Operator EigenLayer metrics server IP and port +enable_metrics: true +eigen_metrics_ip_port_address: 0.0.0.0:9091 + +enable_node_api: true +node_api_ip_port_address: 0.0.0.0:9010 + +# Whether to try and register the operator in the AVS and in EL on startup. +# It will not re-register the operator if already registered. +# If unset, the operator will not be registered on startup! You'll need to +# manually register the operator. +register_operator_on_startup: false + +# RMQ address and indexer rollup IDs +near_da_indexer_rmq_ip_port_address: amqp://rmq:5672 +near_da_indexer_rollup_ids: [421614, 11155420] + +# Rollup RPCs +rollup_ids_to_rpc_urls: + 421614: wss://arbitrum-sepolia-rpc.publicnode.com + 11155420: wss://optimism-sepolia-rpc.publicnode.com + +task_response_wait_ms: 60000 + +# Token strategy address +# Mock strategy to deposit when registering (only used for testing) +token_strategy_addr: 0x0000000000000000000000000000000000000000 diff --git a/setup/i-r-a/docker-compose.yml b/setup/i-r-a/docker-compose.yml new file mode 100644 index 00000000..99ff45d0 --- /dev/null +++ b/setup/i-r-a/docker-compose.yml @@ -0,0 +1,166 @@ +version: "3" + +networks: + fastnear: + name: fastnear + driver: bridge + near-sffl-relayer-rs: + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + build: + context: ../../indexer + dockerfile: Dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + command: + - run + - --da-contract-ids + - sfrelayer21155420-2.testnet + - --rollup-ids + - "2" + - --rmq-address + - "amqp://rmq:5672" + entrypoint: ["/indexer-app/indexer"] + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" + + relayer_11155420_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-21155420 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9094 + command: + - run-args + - --rpc-url + - wss://optimism-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer21155420-2.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer21155420-2.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-21155420:9094 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" + + operator-rs: + build: + context: ../../operator-rs + dockerfile: Dockerfile + container_name: near-sffl-operator-rs + volumes: + - ./config:/near-sffl/config + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + networks: + - fastnear + - near-sffl-relayer-rs + expose: + - ${OPERATOR_METRICS_PORT:-9095} + environment: + - PRODUCTION=${PRODUCTION:-false} + - ETH_RPC_URL=${ETH_RPC_URL:-https://optimism-sepolia-rpc.publicnode.com} + - ETH_WS_URL=${ETH_WS_URL:-wss://optimism-sepolia-rpc.publicnode.com} + - OPERATOR_ADDRESS=${OPERATOR_ADDRESS} + - BLS_KEY_PATH=${BLS_KEY_PATH:-/root/.near-credentials/bls_key.json} + - ECDSA_KEY_PATH=${ECDSA_KEY_PATH:-/root/.near-credentials/ecdsa_key.json} + - AVS_REGISTRY_COORDINATOR_ADDRESS=${AVS_REGISTRY_COORDINATOR_ADDRESS} + - OPERATOR_STATE_RETRIEVER_ADDRESS=${OPERATOR_STATE_RETRIEVER_ADDRESS} + - AGGREGATOR_SERVER_IP_PORT=${AGGREGATOR_SERVER_IP_PORT} + - ENABLE_METRICS=${ENABLE_METRICS:-true} + - EIGEN_METRICS_IP_PORT=${EIGEN_METRICS_IP_PORT:-0.0.0.0:9095} + - NEAR_DA_INDEXER_RMQ_ADDRESS=${NEAR_DA_INDEXER_RMQ_ADDRESS:-amqp://rmq:5672} + - NEAR_DA_INDEXER_ROLLUP_IDS=${NEAR_DA_INDEXER_ROLLUP_IDS:-2} + - ROLLUP_IDS_TO_RPC_URLS=${ROLLUP_IDS_TO_RPC_URLS:-2:https://optimism-sepolia-rpc.publicnode.com} + - TASK_RESPONSE_WAIT_MS=${TASK_RESPONSE_WAIT_MS:-60000} + - TOKEN_STRATEGY_ADDR=${TOKEN_STRATEGY_ADDR:-0x0000000000000000000000000000000000000000} + command: + - run-args + - --production + - ${PRODUCTION} + - --rpc-url + - ${ETH_RPC_URL} + - --ws-url + - ${ETH_WS_URL} + - --operator-address + - ${OPERATOR_ADDRESS} + - --bls-key-path + - ${BLS_KEY_PATH} + - --ecdsa-key-path + - ${ECDSA_KEY_PATH} + - --avs-registry-coordinator + - ${AVS_REGISTRY_COORDINATOR_ADDRESS} + - --operator-state-retriever + - ${OPERATOR_STATE_RETRIEVER_ADDRESS} + - --aggregator-server-ip-port + - ${AGGREGATOR_SERVER_IP_PORT} + - --enable-metrics + - ${ENABLE_METRICS} + - --eigen-metrics-ip-port + - ${EIGEN_METRICS_IP_PORT} + - --near-da-indexer-rmq-ip-port-address + - ${NEAR_DA_INDEXER_RMQ_ADDRESS} + - --near-da-indexer-rollup-ids + - ${NEAR_DA_INDEXER_ROLLUP_IDS} + - --rollup-ids-to-rpc-urls + - ${ROLLUP_IDS_TO_RPC_URLS} + - --task-response-wait-ms + - ${TASK_RESPONSE_WAIT_MS} + - --token-strategy-addr + - ${TOKEN_STRATEGY_ADDR} + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" \ No newline at end of file diff --git a/setup/i-r-a/prometheus/prometheus.yml b/setup/i-r-a/prometheus/prometheus.yml new file mode 100644 index 00000000..7295f931 --- /dev/null +++ b/setup/i-r-a/prometheus/prometheus.yml @@ -0,0 +1,26 @@ +global: + scrape_interval: 15s + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: "docker-host-alpha" + +# A scrape configuration containing exactly one endpoint to scrape. +scrape_configs: + - job_name: "prometheus" + scrape_interval: 10s + static_configs: + - targets: ["localhost:9090"] + + - job_name: "sffl-relayer-rs" + scrape_interval: 5s + static_configs: + - targets: ["near-sffl-relayer-rs-421614:9093"] + labels: + role: "relayer" + instance: "1" + - targets: ["near-sffl-relayer-rs-11155420:9094"] + labels: + role: "relayer" + instance: "2" \ No newline at end of file From bc2e40799543e3d844176164ac4e9fa39c74ba99 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sun, 13 Oct 2024 15:41:15 +0200 Subject: [PATCH 48/96] wip: attestor setup, bls keypair, mock safeclient --- operator-rs/Dockerfile | 2 +- operator-rs/src/attestor/mod.rs | 52 +++++++++++++----- operator-rs/src/main.rs | 92 +++++++++++++++++++------------- operator-rs/src/types.rs | 3 +- setup/i-r-a/config/operator.yaml | 13 ++--- setup/i-r-a/docker-compose.yml | 42 +++------------ 6 files changed, 111 insertions(+), 93 deletions(-) diff --git a/operator-rs/Dockerfile b/operator-rs/Dockerfile index 56b1e3a8..e8215ec2 100644 --- a/operator-rs/Dockerfile +++ b/operator-rs/Dockerfile @@ -1,5 +1,5 @@ # Use the official Rust image as a parent image -FROM rust:1.70 as builder +FROM rust:1.79 as builder # Set the working directory in the container WORKDIR /usr/src/operator-rs diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 0831377a..71b39f6d 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -10,7 +10,7 @@ use eigensdk::logging::logger::Logger; use tokio::sync::mpsc; use tokio::time::Duration; use anyhow::{Result, anyhow}; -use tracing::error; +use tracing::{error, info, warn}; use prometheus::Registry; use alloy_rpc_types::Block; use tokio::sync::Mutex; @@ -58,6 +58,7 @@ impl Attestor { #[allow(clippy::too_many_arguments)] pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, operator_id: OperatorId, registry: Registry, logger: Box) -> Result { + info!("Creating new Attestor instance"); let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), id: hex::encode(&operator_id), @@ -67,10 +68,12 @@ impl Attestor { let mut rpc_calls_collectors = HashMap::new(); for (rollup_id, url) in &config.rollup_ids_to_rpc_urls { + info!("Creating SafeClient for rollup_id: {}, url: {}", rollup_id, url); let client = create_safe_client(url)?; clients.insert(*rollup_id, client); if config.enable_metrics { + info!("Metrics enabled, creating RPC calls collector for rollup_id: {}", rollup_id); // Create and add RPC calls collector (mock for now) rpc_calls_collectors.insert(*rollup_id, ()); } @@ -86,6 +89,7 @@ impl Attestor { signed_root_tx, }); + info!("Attestor instance created successfully"); Ok(Self { shared, rollup_ids_to_urls: config.rollup_ids_to_rpc_urls.clone(), @@ -99,12 +103,15 @@ impl Attestor { } pub fn enable_metrics(&mut self, registry: &Registry) -> Result<()> { + info!("Enabling metrics for Attestor"); let _listener = event_listener::make_attestor_metrics(registry)?; // TODO: Implement metrics enabling logic + info!("Metrics enabled successfully"); Ok(()) } pub async fn start(&self) -> Result<()> { + info!("Starting Attestor"); let addr = self.config.near_da_indexer_rmq_ip_port_address.clone(); let shared = Arc::clone(&self.shared); @@ -113,6 +120,7 @@ impl Attestor { let mut consumer = shared.consumer.lock().await; if let Err(e) = consumer.start(&addr).await { error!("Consumer error: {:?}", e); + info!("Retrying consumer start in 5 seconds"); tokio::time::sleep(Duration::from_secs(5)).await; } } @@ -121,9 +129,11 @@ impl Attestor { let mut headers_rxs = HashMap::new(); for (rollup_id, client) in &self.clients { + info!("Setting up header subscription for rollup_id: {}", rollup_id); let headers_rx = client.subscribe_new_head(); let block_number = client.block_number(); + info!("Observing initial block number {} for rollup_id: {}", block_number, rollup_id); self.shared.listener.observe_initialization_initial_block_number(*rollup_id, block_number); headers_rxs.insert(*rollup_id, headers_rx); @@ -140,6 +150,7 @@ impl Attestor { let cloned_operator_id = self.operator_id.clone(); let cloned_keypair = self.bls_keypair.clone(); let self_ref = Arc::clone(&self.shared); + info!("Spawning task to process rollup headers for rollup_id: {}", rollup_id); tokio::spawn(async move { if let Err(e) = Self::process_rollup_headers(&self_ref, rollup_id, cloned_operator_id, &cloned_keypair, headers_rx).await { error!("Error processing rollup headers for rollup {}: {:?}", rollup_id, e); @@ -147,10 +158,12 @@ impl Attestor { }); } + info!("Attestor started successfully"); Ok(()) } async fn process_mq_blocks(shared: Arc) -> Result<()> { + info!("Starting MQ blocks processing"); loop { let consumer = shared.consumer.lock().await; let mut mq_block_rx = consumer.get_block_stream(); @@ -159,31 +172,36 @@ impl Attestor { loop { match mq_block_rx.recv().await { Ok(mq_block) => { - shared.logger.info("Notifying", &format!("rollupId: {}, height: {}", mq_block.rollup_id, get_block_number(&mq_block.block))); + info!("Notifying - rollupId: {}, height: {}", mq_block.rollup_id, get_block_number(&mq_block.block)); if let Err(e) = shared.notifier.notify(mq_block.rollup_id, mq_block) { - shared.logger.error("Notifier error", &e.to_string()); + error!("Notifier error: {}", e); } }, Err(tokio::sync::broadcast::error::RecvError::Closed) => { - shared.logger.warn("MQ block channel closed", ""); + warn!("MQ block channel closed"); break; // Break the inner loop to reconnect }, Err(tokio::sync::broadcast::error::RecvError::Lagged(skipped)) => { - shared.logger.warn("Skipped messages due to slow processing", &skipped.to_string()); + warn!("Skipped {} messages due to slow processing", skipped); // Continue processing } } } // If we've broken out of the inner loop, wait a bit before trying to reconnect + info!("Waiting 5 seconds before attempting to reconnect to MQ"); tokio::time::sleep(Duration::from_secs(5)).await; } } async fn process_rollup_headers(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, mut headers_rx: mpsc::Receiver
) -> Result<()> { + info!("Starting to process rollup headers for rollup_id: {}", rollup_id); while let Some(header) = headers_rx.recv().await { - Self::process_header(shared, rollup_id, operator_id, keypair, header).await?; + if let Err(e) = Self::process_header(shared, rollup_id, operator_id, keypair, header).await { + error!("Error processing header for rollup {}: {:?}", rollup_id, e); + } } + warn!("Finished processing rollup headers for rollup_id: {}", rollup_id); Ok(()) } @@ -192,7 +210,7 @@ impl Attestor { let header_timestamp = get_header_timestamp(&rollup_header); let header_root = get_header_root(&rollup_header); - shared.logger.info("Processing header", &header_number.to_string()); + info!("Processing header - rollup_id: {}, header_number: {}", rollup_id, header_number); shared.listener.observe_last_block_received(rollup_id, header_number); shared.listener.observe_last_block_received_timestamp(rollup_id, header_timestamp); @@ -214,15 +232,15 @@ impl Attestor { match result { Ok(Some(mq_block)) => { - shared.logger.info("MQ block found", &format!("height: {}, rollupId: {}", get_block_number(&mq_block.block), mq_block.rollup_id)); + info!("MQ block found - height: {}, rollupId: {}", get_block_number(&mq_block.block), mq_block.rollup_id); transaction_id = mq_block.transaction_id; da_commitment = mq_block.commitment; } Ok(None) => { - shared.logger.warn("MQ channel closed unexpectedly", &format!("rollupId: {}, height: {}", rollup_id, header_number)); + warn!("MQ channel closed unexpectedly - rollupId: {}, height: {}", rollup_id, header_number); } Err(_) => { - shared.logger.info("MQ timeout", &format!("rollupId: {}, height: {}", rollup_id, header_number)); + warn!("MQ timeout - rollupId: {}, height: {}", rollup_id, header_number); shared.listener.on_missed_mq_block(rollup_id); } } @@ -246,11 +264,13 @@ impl Attestor { operator_id, }; if let Err(e) = shared.signed_root_tx.send(signed_message) { - shared.logger.warn("Failed to send signed state root update", &e.to_string()); + warn!("Failed to send signed state root update: {}", e); + } else { + info!("Successfully sent signed state root update for rollup_id: {}, height: {}", rollup_id, header_number); } } Err(e) => { - shared.logger.warn("State root sign failed", &e.to_string()); + error!("State root sign failed: {}", e); return Err(anyhow!("State root sign failed: {}", e)); } } @@ -258,15 +278,19 @@ impl Attestor { } pub fn get_signed_root_rx(shared: Arc) -> broadcast::Receiver { + info!("Getting signed root receiver"); shared.signed_root_tx.subscribe() } pub async fn close(&self) -> Result<()> { + info!("Closing Attestor"); let mut consumer = self.shared.consumer.lock().await; consumer.close().await?; - for client in self.clients.values() { + for (rollup_id, client) in &self.clients { + info!("Closing client for rollup_id: {}", rollup_id); client.close(); } + info!("Attestor closed successfully"); Ok(()) } } @@ -299,12 +323,14 @@ fn create_safe_client(_url: &str) -> Result { } } + info!("Creating mock SafeClient"); Ok(Arc::new(MockSafeClient) as SafeClient) } fn sign_state_root_update_message(_keypair: &BlsKeyPair, _message: &StateRootUpdateMessage) -> Result { // In a real implementation, you'd use the actual BLS signing logic // For now, we'll create a mock signature + info!("Creating mock BLS signature"); let mock_signature = BlsSignature::default(); // Assuming BlsSignature has a default implementation Ok(mock_signature) } diff --git a/operator-rs/src/main.rs b/operator-rs/src/main.rs index cdea1578..e8477125 100644 --- a/operator-rs/src/main.rs +++ b/operator-rs/src/main.rs @@ -8,31 +8,41 @@ use operator_rs::types::NFFLNodeConfig; use prometheus::Registry; use std::path::PathBuf; use tracing_subscriber::FmtSubscriber; +use serde_json::Value; +use eigensdk::crypto_bls::BlsKeyPair; + mod config; #[tokio::main] async fn main() -> Result<()> { + // Print all arguments for debugging + println!("Received arguments: {:?}", std::env::args().collect::>()); + let matches = Command::new("sffl-operator") .about("SFFL Operator") .subcommand( Command::new("run-args") .about("Start the operator with direct CLI options") .arg(Arg::new("production").long("production").help("Run in production logging mode")) - .arg(Arg::new("rpc-url").long("rpc-url").required(true).value_name("URL").help("Connect to the indicated RPC")) - .arg(Arg::new("ws-url").long("ws-url").required(true).value_name("URL").help("Connect to the indicated WebSocket")) - .arg(Arg::new("operator-address").long("operator-address").required(true).value_name("ADDRESS").help("Operator's Ethereum address")) - .arg(Arg::new("bls-key-path").long("bls-key-path").required(true).value_name("FILE").help("Path to BLS key file")) - .arg(Arg::new("ecdsa-key-path").long("ecdsa-key-path").required(true).value_name("FILE").help("Path to ECDSA key file")) - .arg(Arg::new("avs-registry-coordinator").long("avs-registry-coordinator").required(true).value_name("ADDRESS").help("AVS Registry Coordinator address")) - .arg(Arg::new("operator-state-retriever").long("operator-state-retriever").required(true).value_name("ADDRESS").help("Operator State Retriever address")) - .arg(Arg::new("aggregator-server-ip-port").long("aggregator-server-ip-port").required(true).value_name("IP:PORT").help("Aggregator server IP and port")) + .arg(Arg::new("rpc-url").long("rpc-url").value_name("URL").help("Connect to the indicated RPC")) + .arg(Arg::new("ws-url").long("ws-url").value_name("URL").help("Connect to the indicated WebSocket")) + .arg(Arg::new("operator-address").long("operator-address").value_name("ADDRESS").help("Operator's Ethereum address")) + .arg(Arg::new("bls-key-path").long("bls-key-path").value_name("FILE").help("Path to BLS key file")) + .arg(Arg::new("ecdsa-key-path").long("ecdsa-key-path").value_name("FILE").help("Path to ECDSA key file")) + .arg(Arg::new("avs-registry-coordinator").long("avs-registry-coordinator").value_name("ADDRESS").help("AVS Registry Coordinator address")) + .arg(Arg::new("operator-state-retriever").long("operator-state-retriever").value_name("ADDRESS").help("Operator State Retriever address")) + .arg(Arg::new("aggregator-server-ip-port").long("aggregator-server-ip-port").value_name("IP:PORT").help("Aggregator server IP and port")) .arg(Arg::new("enable-metrics").long("enable-metrics").help("Enable metrics collection")) .arg(Arg::new("eigen-metrics-ip-port").long("eigen-metrics-ip-port").value_name("IP:PORT").help("EigenMetrics IP and port")) .arg(Arg::new("node-api-ip-port").long("node-api-ip-port").value_name("IP:PORT").help("Node API IP and port")) - .arg(Arg::new("task-response-wait-ms").long("task-response-wait-ms").value_name("MS").default_value("0").help("Task response wait time in milliseconds")) + .arg(Arg::new("task-response-wait-ms").long("task-response-wait-ms").value_name("MS").help("Task response wait time in milliseconds")) .arg(Arg::new("register-operator-on-startup").long("register-operator-on-startup").help("Register operator on startup")) - .arg(Arg::new("token-strategy-addr").long("token-strategy-addr").value_name("ADDRESS").help("Token strategy address")), + .arg(Arg::new("token-strategy-addr").long("token-strategy-addr").value_name("ADDRESS").help("Token strategy address")) + .arg(Arg::new("enable-node-api").long("enable-node-api").help("Enable Node API")) + .arg(Arg::new("near-da-indexer-rmq-ip-port-address").long("near-da-indexer-rmq-ip-port-address").value_name("IP:PORT").help("NEAR DA Indexer RabbitMQ IP and port")) + .arg(Arg::new("near-da-indexer-rollup-ids").long("near-da-indexer-rollup-ids").value_name("IDS").help("Comma-separated list of NEAR DA Indexer rollup IDs")) + .arg(Arg::new("rollup-ids-to-rpc-urls").long("rollup-ids-to-rpc-urls").value_name("ID:URL").help("Comma-separated list of rollup ID to RPC URL mappings")) ) .subcommand( Command::new("run-config") @@ -45,31 +55,39 @@ async fn main() -> Result<()> { Some(("run-args", args)) => { let config = NFFLNodeConfig { enable_node_api: args.contains_id("enable-node-api"), - near_da_indexer_rmq_ip_port_address: args.get_one::("near-da-indexer-rmq-ip-port-address").unwrap().to_string(), - near_da_indexer_rollup_ids: args.get_one::("near-da-indexer-rollup-ids").unwrap().split(',').map(|s| s.parse().unwrap()).collect(), + near_da_indexer_rmq_ip_port_address: args.get_one::("near-da-indexer-rmq-ip-port-address") + .map(|s| s.to_string()) + .unwrap_or_default(), + near_da_indexer_rollup_ids: args.get_one::("near-da-indexer-rollup-ids") + .map(|s| s.split(',').filter_map(|id| id.parse().ok()).collect()) + .unwrap_or_default(), rollup_ids_to_rpc_urls: args.get_one::("rollup-ids-to-rpc-urls") - .unwrap() - .split(',') - .map(|s| { - let mut parts = s.split(':'); - (parts.next().unwrap().parse().unwrap(), parts.next().unwrap().to_string()) - }) - .collect(), + .map(|s| s.split(',') + .filter_map(|pair| { + let mut parts = pair.split(':'); + let id = parts.next()?.parse().ok()?; + let url = parts.next()?.to_string(); + Some((id, url)) + }) + .collect()) + .unwrap_or_default(), production: args.contains_id("production"), - eth_rpc_url: args.get_one::("rpc-url").unwrap().to_string(), - eth_ws_url: args.get_one::("ws-url").unwrap().to_string(), - operator_address: args.get_one::("operator-address").unwrap().to_string(), - bls_private_key_store_path: args.get_one::("bls-key-path").unwrap().to_string(), - ecdsa_private_key_store_path: args.get_one::("ecdsa-key-path").unwrap().to_string(), - avs_registry_coordinator_address: args.get_one::("avs-registry-coordinator").unwrap().to_string(), - operator_state_retriever_address: args.get_one::("operator-state-retriever").unwrap().to_string(), - aggregator_server_ip_port_address: args.get_one::("aggregator-server-ip-port").unwrap().to_string(), + eth_rpc_url: args.get_one::("rpc-url").map(|s| s.to_string()).unwrap_or_default(), + eth_ws_url: args.get_one::("ws-url").map(|s| s.to_string()).unwrap_or_default(), + operator_address: args.get_one::("operator-address").map(|s| s.to_string()).unwrap_or_default(), + ecdsa_private_key_store_path: args.get_one::("ecdsa-key-path").map(|s| s.to_string()).unwrap_or_default(), + bls_keypair: args.get_one::("bls-key-path").map(|s| s.to_string()).unwrap_or_default(), + avs_registry_coordinator_address: args.get_one::("avs-registry-coordinator").map(|s| s.to_string()).unwrap_or_default(), + operator_state_retriever_address: args.get_one::("operator-state-retriever").map(|s| s.to_string()).unwrap_or_default(), + aggregator_server_ip_port_address: args.get_one::("aggregator-server-ip-port").map(|s| s.to_string()).unwrap_or_default(), enable_metrics: args.contains_id("enable-metrics"), - eigen_metrics_ip_port_address: args.get_one::("eigen-metrics-ip-port").unwrap().to_string(), - node_api_ip_port_address: args.get_one::("node-api-ip-port").unwrap().to_string(), - task_response_wait_ms: args.get_one::("task-response-wait-ms").unwrap().parse().unwrap(), + eigen_metrics_ip_port_address: args.get_one::("eigen-metrics-ip-port").map(|s| s.to_string()).unwrap_or_default(), + node_api_ip_port_address: args.get_one::("node-api-ip-port").map(|s| s.to_string()).unwrap_or_default(), + task_response_wait_ms: args.get_one::("task-response-wait-ms") + .and_then(|s| s.parse().ok()) + .unwrap_or(0), register_operator_on_startup: args.contains_id("register-operator-on-startup"), - token_strategy_addr: args.get_one::("token-strategy-addr").unwrap().to_string(), + token_strategy_addr: args.get_one::("token-strategy-addr").map(|s| s.to_string()).unwrap_or_default(), }; operator_main(config).await } @@ -100,20 +118,20 @@ async fn operator_main(config: NFFLNodeConfig) -> Result<()> { let attestor_config = config.clone(); let attestor = Attestor::new( attestor_config, - eigensdk::crypto_bls::BlsKeyPair::new(config.bls_private_key_store_path.clone())?, + BlsKeyPair::new(config.bls_keypair)?, eigensdk::types::operator::OperatorId::from([1u8; 32]), Registry::default(), operator_rs::types::create_default_logger() )?; - //Start the attestor + + // Start the attestor attestor.start().await?; - + // Uncomment these lines when you're ready to use the Operator // let operator = Operator::new(config).await?; // tracing::info!("Starting operator"); - - // let mut ctx = operator_rs::operator::Context; + // let mut ctx = operator_rs::operator::Context::default(); // operator.start(&mut ctx).await?; Ok(()) -} \ No newline at end of file +} diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index 4557bd6f..50e4009d 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -16,8 +16,9 @@ pub struct NFFLNodeConfig { pub token_strategy_addr: String, pub eth_rpc_url: String, pub eth_ws_url: String, - pub bls_private_key_store_path: String, pub ecdsa_private_key_store_path: String, + // Replace bls_private_key_store_path with bls_keypair + pub bls_keypair: String, pub aggregator_server_ip_port_address: String, pub register_operator_on_startup: bool, pub eigen_metrics_ip_port_address: String, diff --git a/setup/i-r-a/config/operator.yaml b/setup/i-r-a/config/operator.yaml index 8933f85e..c90dae8f 100644 --- a/setup/i-r-a/config/operator.yaml +++ b/setup/i-r-a/config/operator.yaml @@ -1,4 +1,3 @@ - # Production flag for logging - false for printing debug logs production: false @@ -15,9 +14,11 @@ operator_state_retriever_address: 0x8D0b27Df027bc5C41855Da352Da4B5B2C406c1F0 eth_rpc_url: https://ethereum-holesky-rpc.publicnode.com eth_ws_url: wss://ethereum-holesky-rpc.publicnode.com # You should change this! -# EigenLayer ECDSA and BLS private key paths +# EigenLayer ECDSA private key path ecdsa_private_key_store_path: /near-sffl/config/keys/ecdsa.json -bls_private_key_store_path: /near-sffl/config/keys/bls.json + +# BLS private key as a decimal string (example) +bls_keypair: "6357264453605833890416165025677756558252870029365952232381486360336261321079" # Aggregator server IP and port aggregator_server_ip_port_address: near-sffl-aggregator:8090 @@ -37,12 +38,12 @@ register_operator_on_startup: false # RMQ address and indexer rollup IDs near_da_indexer_rmq_ip_port_address: amqp://rmq:5672 -near_da_indexer_rollup_ids: [421614, 11155420] +near_da_indexer_rollup_ids: [1, 2] # Rollup RPCs rollup_ids_to_rpc_urls: - 421614: wss://arbitrum-sepolia-rpc.publicnode.com - 11155420: wss://optimism-sepolia-rpc.publicnode.com + 1: wss://arbitrum-sepolia-rpc.publicnode.com + 2: wss://optimism-sepolia-rpc.publicnode.com task_response_wait_ms: 60000 diff --git a/setup/i-r-a/docker-compose.yml b/setup/i-r-a/docker-compose.yml index 99ff45d0..84009b21 100644 --- a/setup/i-r-a/docker-compose.yml +++ b/setup/i-r-a/docker-compose.yml @@ -101,6 +101,7 @@ services: volumes: - ./config:/near-sffl/config - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + - ../../tests/keys/bls:/near-sffl/bls_keys networks: - fastnear - near-sffl-relayer-rs @@ -111,7 +112,8 @@ services: - ETH_RPC_URL=${ETH_RPC_URL:-https://optimism-sepolia-rpc.publicnode.com} - ETH_WS_URL=${ETH_WS_URL:-wss://optimism-sepolia-rpc.publicnode.com} - OPERATOR_ADDRESS=${OPERATOR_ADDRESS} - - BLS_KEY_PATH=${BLS_KEY_PATH:-/root/.near-credentials/bls_key.json} + - BLS_KEY_PATH=/near-sffl/bls_keys/1/key.json + - BLS_KEY_PASSWORD_PATH=/near-sffl/bls_keys/1/password.txt - ECDSA_KEY_PATH=${ECDSA_KEY_PATH:-/root/.near-credentials/ecdsa_key.json} - AVS_REGISTRY_COORDINATOR_ADDRESS=${AVS_REGISTRY_COORDINATOR_ADDRESS} - OPERATOR_STATE_RETRIEVER_ADDRESS=${OPERATOR_STATE_RETRIEVER_ADDRESS} @@ -124,43 +126,13 @@ services: - TASK_RESPONSE_WAIT_MS=${TASK_RESPONSE_WAIT_MS:-60000} - TOKEN_STRATEGY_ADDR=${TOKEN_STRATEGY_ADDR:-0x0000000000000000000000000000000000000000} command: - - run-args - - --production - - ${PRODUCTION} - - --rpc-url - - ${ETH_RPC_URL} - - --ws-url - - ${ETH_WS_URL} - - --operator-address - - ${OPERATOR_ADDRESS} - - --bls-key-path - - ${BLS_KEY_PATH} - - --ecdsa-key-path - - ${ECDSA_KEY_PATH} - - --avs-registry-coordinator - - ${AVS_REGISTRY_COORDINATOR_ADDRESS} - - --operator-state-retriever - - ${OPERATOR_STATE_RETRIEVER_ADDRESS} - - --aggregator-server-ip-port - - ${AGGREGATOR_SERVER_IP_PORT} - - --enable-metrics - - ${ENABLE_METRICS} - - --eigen-metrics-ip-port - - ${EIGEN_METRICS_IP_PORT} - - --near-da-indexer-rmq-ip-port-address - - ${NEAR_DA_INDEXER_RMQ_ADDRESS} - - --near-da-indexer-rollup-ids - - ${NEAR_DA_INDEXER_ROLLUP_IDS} - - --rollup-ids-to-rpc-urls - - ${ROLLUP_IDS_TO_RPC_URLS} - - --task-response-wait-ms - - ${TASK_RESPONSE_WAIT_MS} - - --token-strategy-addr - - ${TOKEN_STRATEGY_ADDR} + - run-config + - --path + - /near-sffl/config/operator.yaml restart: unless-stopped logging: driver: "json-file" options: max-size: "1g" max-file: "20" - compress: "true" \ No newline at end of file + compress: "true" From bc9318194208704669564e5778035cfb8f394b7d Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sun, 13 Oct 2024 17:48:07 +0200 Subject: [PATCH 49/96] wip: safeclient in rust --- Cargo.toml | 6 ++ core-rs/Cargo.toml | 32 ++++++ core-rs/src/lib.rs | 6 ++ core-rs/src/safeclient/client.rs | 156 ++++++++++++++++++++++++++++ core-rs/src/safeclient/mocks/mod.rs | 5 + core-rs/src/safeclient/mod.rs | 6 ++ core-rs/src/safeclient/utils.rs | 26 +++++ indexer/src/fastnear_indexer.rs | 94 ----------------- operator-rs/src/attestor/mod.rs | 6 +- 9 files changed, 239 insertions(+), 98 deletions(-) create mode 100644 core-rs/Cargo.toml create mode 100644 core-rs/src/lib.rs create mode 100644 core-rs/src/safeclient/client.rs create mode 100644 core-rs/src/safeclient/mocks/mod.rs create mode 100644 core-rs/src/safeclient/mod.rs create mode 100644 core-rs/src/safeclient/utils.rs diff --git a/Cargo.toml b/Cargo.toml index cbefc0fa..5f4b99a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ members = [ "contracts/evm/test/ffi/bls-utils", "relayer-rs", "operator-rs", + "core-rs", # Added core-rs as a workspace member ] [workspace.package] @@ -16,3 +17,8 @@ repository = "https://github.com/NethermindEth/near-sffl" [patch.crates-io] parity-secp256k1 = { git = 'https://github.com/paritytech/rust-secp256k1.git' } + +# If you want to add core-rs as a dependency for other workspace members, +# you can uncomment and add the following: +# [workspace.dependencies] +# core-rs = { path = "core-rs" } diff --git a/core-rs/Cargo.toml b/core-rs/Cargo.toml new file mode 100644 index 00000000..193fa31f --- /dev/null +++ b/core-rs/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "safeclient" +version = "0.1.0" +edition = "2021" + +[dependencies] +# Core dependencies +tokio = { version = "1.0", features = ["full"] } +async-trait = "0.1" +thiserror = "1.0" +anyhow = "1.0" + +# Alloy dependencies +alloy = "0.4.2" +# Mocking +mockall = "0.13.0" + +# Serialization +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +sha2 = "0.10.6" + +# Logging +log = "0.4" + +# Other potential dependencies +reqwest = { version = "0.12.8", features = ["json"] } +url = "2.3" +futures-util = "0.3.30" + +[dev-dependencies] +tokio-test = "0.4" diff --git a/core-rs/src/lib.rs b/core-rs/src/lib.rs new file mode 100644 index 00000000..e7ad11a8 --- /dev/null +++ b/core-rs/src/lib.rs @@ -0,0 +1,6 @@ +// pub mod chainio; +// pub mod config; +// pub mod metricable; +// pub mod smt; +// pub mod types; +pub mod safeclient; diff --git a/core-rs/src/safeclient/client.rs b/core-rs/src/safeclient/client.rs new file mode 100644 index 00000000..700332d8 --- /dev/null +++ b/core-rs/src/safeclient/client.rs @@ -0,0 +1,156 @@ +use alloy::eips::BlockNumberOrTag; +use alloy::primitives::{B256, U256}; +use alloy::providers::{Provider, ProviderBuilder, RootProvider, WsConnect}; +use alloy::pubsub::PubSubFrontend; +use alloy::rpc::types::{Block, Filter, Log, Transaction, TransactionReceipt}; +use anyhow::Result; +use async_trait::async_trait; +use std::sync::Arc; +use std::time::Duration; +use tokio::sync::broadcast; +use futures_util::StreamExt; +use log::{error, warn}; + + +#[async_trait] +pub trait SafeClient: Send + Sync { + async fn block_number(&self) -> Result; + async fn get_block(&self, block_number: BlockNumberOrTag) -> Result>; + async fn get_transaction(&self, tx_hash: B256) -> Result>; + async fn get_transaction_receipt(&self, tx_hash: B256) -> Result>; + async fn get_logs(&self, filter: Filter) -> Result>; + async fn subscribe_logs(&self, filter: Filter) -> Result>; + async fn subscribe_new_heads(&self) -> Result>; + fn close(&self); +} + +pub struct SafeEthClient { + provider: Arc>, + log_resub_interval: Duration, + header_timeout: Duration, + block_chunk_size: u64, + block_max_range: u64, + close_sender: broadcast::Sender<()>, +} + +pub struct SafeEthClientOptions { + pub log_resub_interval: Duration, + pub header_timeout: Duration, + pub block_chunk_size: u64, + pub block_max_range: u64, +} + +impl Default for SafeEthClientOptions { + fn default() -> Self { + Self { + log_resub_interval: Duration::from_secs(300), + header_timeout: Duration::from_secs(30), + block_chunk_size: 100, + block_max_range: 100, + } + } +} + +impl SafeEthClient { + pub async fn new(ws_url: &str, options: SafeEthClientOptions) -> Result { + let ws = WsConnect::new(ws_url); + let provider = ProviderBuilder::new().on_ws(ws).await?; + let (close_sender, _) = broadcast::channel(1); + + Ok(Self { + provider: Arc::new(provider), + log_resub_interval: options.log_resub_interval, + header_timeout: options.header_timeout, + block_chunk_size: options.block_chunk_size, + block_max_range: options.block_max_range, + close_sender, + }) + } +} + +#[async_trait] +impl SafeClient for SafeEthClient { + async fn block_number(&self) -> Result { + Ok(U256::from(self.provider.get_block_number().await?)) + } + + async fn get_block(&self, block_number: BlockNumberOrTag) -> Result> { + Ok(self.provider.get_block(alloy::eips::BlockId::Number(block_number), alloy::rpc::types::BlockTransactionsKind::Hashes).await?) + } + + async fn get_transaction(&self, tx_hash: B256) -> Result> { + Ok(self.provider.get_transaction_by_hash(tx_hash).await?) + } + + async fn get_transaction_receipt(&self, tx_hash: B256) -> Result> { + Ok(self.provider.get_transaction_receipt(tx_hash).await?) + } + + async fn get_logs(&self, filter: Filter) -> Result> { + Ok(self.provider.get_logs(&filter).await?) + } + + async fn subscribe_logs(&self, filter: Filter) -> Result> { + let (tx, rx) = broadcast::channel(100); + let log_resub_interval = self.log_resub_interval; + let subscription = self.provider.subscribe_logs(&filter).await?; + let mut stream = subscription.into_stream(); + + tokio::spawn(async move { + loop { + tokio::select! { + Some(log) = stream.next() => { + if tx.send(log).is_err() { + error!("Error sending log: channel closed"); + break; + } + } + _ = tokio::time::sleep(log_resub_interval) => { + warn!("Timeout waiting for new log"); + break; + } + else => { + error!("Log stream ended unexpectedly"); + break; + } + } + } + }); + + Ok(rx) + } + + async fn subscribe_new_heads(&self) -> Result> { + let (tx, rx) = broadcast::channel(100); + let header_timeout = self.header_timeout; + let subscription = self.provider.subscribe_blocks().await?; + let mut stream = subscription.into_stream(); + + tokio::spawn(async move { + loop { + tokio::select! { + Some(block) = stream.next() => { + if tx.send(block).is_err() { + error!("Error sending block: channel closed"); + break; + } + } + _ = tokio::time::sleep(header_timeout) => { + warn!("Timeout waiting for new block"); + break; + } + else => { + error!("Block stream ended unexpectedly"); + break; + } + } + } + }); + + Ok(rx) + } + + fn close(&self) { + let _ = self.close_sender.send(()); + } +} diff --git a/core-rs/src/safeclient/mocks/mod.rs b/core-rs/src/safeclient/mocks/mod.rs new file mode 100644 index 00000000..8f32de6b --- /dev/null +++ b/core-rs/src/safeclient/mocks/mod.rs @@ -0,0 +1,5 @@ +use mockall::automock; +use crate::safeclient::SafeClient; + +#[automock] +pub trait MockSafeClient: SafeClient {} \ No newline at end of file diff --git a/core-rs/src/safeclient/mod.rs b/core-rs/src/safeclient/mod.rs new file mode 100644 index 00000000..831c29a8 --- /dev/null +++ b/core-rs/src/safeclient/mod.rs @@ -0,0 +1,6 @@ +pub mod mocks; +mod client; +mod utils; + +pub use client::{SafeClient, SafeEthClient}; +pub use utils::*; \ No newline at end of file diff --git a/core-rs/src/safeclient/utils.rs b/core-rs/src/safeclient/utils.rs new file mode 100644 index 00000000..28f599b6 --- /dev/null +++ b/core-rs/src/safeclient/utils.rs @@ -0,0 +1,26 @@ +use alloy::{primitives::B256, rpc::types::Log}; +use sha2::{Digest, Sha256}; + +pub fn hash_log(log: &Log) -> B256 { + let mut hasher = Sha256::new(); + + // Hash the log fields + hasher.update(log.address().as_slice()); + for topic in log.topics() { + hasher.update(topic.as_slice()); + } + hasher.update(log.data().as_slice()); + + // Hash additional block and tx info + if let Some(block_hash) = log.block_hash { + hasher.update(block_hash.as_slice()); + } + if let Some(transaction_hash) = log.transaction_hash { + hasher.update(transaction_hash.as_slice()); + } + if let Some(log_index) = log.log_index { + hasher.update(&log_index.to_be_bytes()); + } + + B256::from_slice(&hasher.finalize()) +} diff --git a/indexer/src/fastnear_indexer.rs b/indexer/src/fastnear_indexer.rs index 52b8f4c5..fc8d7fc6 100644 --- a/indexer/src/fastnear_indexer.rs +++ b/indexer/src/fastnear_indexer.rs @@ -1,9 +1,3 @@ -//! FastNearIndexer module for efficient indexing of NEAR blockchain data. -//! -//! This module provides functionality to stream and process the latest blocks -//! from the NEAR blockchain, focusing on specific transactions and receipts -//! related to configured rollup addresses. - use std::collections::HashMap; use near_indexer::near_primitives::{types::AccountId, views::{ActionView, ExecutionStatusView, ReceiptEnumView}}; use reqwest::Client; @@ -12,28 +6,15 @@ use tracing::{info, error, debug, trace}; use crate::{errors::Error, rmq_publisher::{get_routing_key, PublishData, PublishOptions, PublishPayload, PublisherContext}, types::{BlockWithTxHashes, IndexerExecutionOutcomeWithReceiptAndTxHash, PartialCandidateData, PartialCandidateDataWithBlockTxHash}}; -/// The endpoint URL for fetching the latest finalized block from NEAR testnet. const FASTNEAR_ENDPOINT: &str = "https://testnet.neardata.xyz/v0/last_block/final"; -/// Represents the FastNearIndexer, which processes NEAR blockchain data. #[derive(Debug)] pub struct FastNearIndexer { - /// HTTP client for making requests to the NEAR API. client: Client, - /// Mapping of account IDs to their corresponding rollup IDs. addresses_to_rollup_ids: HashMap, } impl FastNearIndexer { - /// Creates a new instance of FastNearIndexer. - /// - /// # Arguments - /// - /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. - /// - /// # Returns - /// - /// A new `FastNearIndexer` instance. pub(crate) fn new(addresses_to_rollup_ids: HashMap) -> Self { debug!(target: "fastnear_indexer", "Creating new FastNearIndexer"); Self { @@ -42,11 +23,6 @@ impl FastNearIndexer { } } - /// Starts the indexing process and returns a receiver for publish data. - /// - /// # Returns - /// - /// A `Receiver` for consuming the processed blockchain data. pub fn run(&self) -> Receiver { info!(target: "fastnear_indexer", "Starting FastNearIndexer"); let block_receiver = self.stream_latest_blocks(); @@ -61,13 +37,6 @@ impl FastNearIndexer { publish_receiver } - /// Processes incoming blocks and publishes relevant data. - /// - /// # Arguments - /// - /// * `block_receiver` - A receiver for incoming `BlockWithTxHashes`. - /// * `publish_sender` - A sender for outgoing `PublishData`. - /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. async fn process_blocks( mut block_receiver: Receiver, publish_sender: Sender, @@ -82,17 +51,6 @@ impl FastNearIndexer { } } - /// Parses a block and publishes relevant data. - /// - /// # Arguments - /// - /// * `block` - The `BlockWithTxHashes` to be parsed. - /// * `publish_sender` - A sender for outgoing `PublishData`. - /// * `addresses_to_rollup_ids` - A HashMap mapping AccountIds to their corresponding rollup IDs. - /// - /// # Returns - /// - /// A `Result` indicating success or containing an `Error`. async fn parse_and_publish_block( block: BlockWithTxHashes, publish_sender: &Sender, @@ -132,11 +90,6 @@ impl FastNearIndexer { Ok(()) } - /// Creates a stream of the latest blocks from the NEAR blockchain. - /// - /// # Returns - /// - /// A `Receiver` for consuming the latest blocks. pub fn stream_latest_blocks(&self) -> mpsc::Receiver { info!(target: "fastnear_indexer", "Starting block stream"); let (block_sender, block_receiver) = mpsc::channel(100); @@ -161,15 +114,6 @@ impl FastNearIndexer { block_receiver } - /// Fetches the latest block from the NEAR API. - /// - /// # Arguments - /// - /// * `client` - The HTTP client to use for the API request. - /// - /// # Returns - /// - /// A `Result` containing the `BlockWithTxHashes` or an `Error`. async fn fetch_latest_block(client: &Client) -> Result { debug!(target: "fastnear_indexer", "Fetching latest block"); let response = client.get(FASTNEAR_ENDPOINT) @@ -183,16 +127,6 @@ impl FastNearIndexer { .map_err(|e| Error::DeserializeJsonError(e.to_string())) } - /// Sends candidate data to the publish channel. - /// - /// # Arguments - /// - /// * `candidate_data` - The `PartialCandidateDataWithBlockTxHash` to be sent. - /// * `sender` - The `Sender` to send the data through. - /// - /// # Returns - /// - /// A `Result` indicating success or containing an `Error`. async fn send(candidate_data: &PartialCandidateDataWithBlockTxHash, sender: &Sender) -> Result<(), Error> { trace!(target: "fastnear_indexer", "Sending candidate data: {:?}", candidate_data); for data in candidate_data.clone().payloads { @@ -215,15 +149,6 @@ impl FastNearIndexer { Ok(()) } - /// Checks if the execution of a receipt was successful. - /// - /// # Arguments - /// - /// * `receipt_execution_outcome` - The `IndexerExecutionOutcomeWithReceiptAndTxHash` to check. - /// - /// # Returns - /// - /// A boolean indicating whether the execution was successful. fn is_successful_execution(receipt_execution_outcome: &IndexerExecutionOutcomeWithReceiptAndTxHash) -> bool { let is_successful = matches!( receipt_execution_outcome.execution_outcome.outcome.status, @@ -233,16 +158,6 @@ impl FastNearIndexer { is_successful } - /// Filters and maps a receipt to partial candidate data. - /// - /// # Arguments - /// - /// * `receipt_enum_view` - The `ReceiptEnumView` to be filtered and mapped. - /// * `rollup_id` - The rollup ID associated with this receipt. - /// - /// # Returns - /// - /// An `Option` containing the filtered and mapped data, if any. fn receipt_filter_map(receipt_enum_view: ReceiptEnumView, rollup_id: u32) -> Option { trace!(target: "fastnear_indexer", "Filtering receipt for rollup_id: {}", rollup_id); let payloads = match receipt_enum_view { @@ -265,15 +180,6 @@ impl FastNearIndexer { }) } - /// Extracts arguments from an action view. - /// - /// # Arguments - /// - /// * `action` - The `ActionView` to extract arguments from. - /// - /// # Returns - /// - /// An `Option>` containing the extracted arguments, if any. fn extract_args(action: ActionView) -> Option> { match action { ActionView::FunctionCall { method_name, args, .. } if method_name == "submit" => { diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 71b39f6d..5f6f0f65 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -38,7 +38,6 @@ type OperatorId = eigensdk::types::operator::OperatorId; struct SharedState { notifier: Arc, consumer: Mutex, - logger: Box, listener: Box, signed_root_tx: broadcast::Sender, } @@ -84,7 +83,6 @@ impl Attestor { let shared = Arc::new(SharedState { notifier: Arc::new(Notifier::new()), consumer: Mutex::new(consumer), - logger, listener: Box::new(SelectiveEventListener::default()), signed_root_tx, }); @@ -277,9 +275,9 @@ impl Attestor { Ok(()) } - pub fn get_signed_root_rx(shared: Arc) -> broadcast::Receiver { + pub fn get_signed_root_rx(&self) -> broadcast::Receiver { info!("Getting signed root receiver"); - shared.signed_root_tx.subscribe() + self.shared.signed_root_tx.subscribe() } pub async fn close(&self) -> Result<()> { From 5624c06fc9b2fb9d48c970fbe3748badccc069b7 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sun, 13 Oct 2024 18:25:55 +0200 Subject: [PATCH 50/96] wip: safeclient in attestor --- Cargo.toml | 2 +- core-rs/Cargo.toml | 6 +-- core-rs/src/safeclient/client.rs | 14 +++--- core-rs/src/safeclient/mocks/mod.rs | 5 -- core-rs/src/safeclient/mod.rs | 3 +- core-rs/src/safeclient/utils.rs | 2 +- operator-rs/Cargo.toml | 1 + operator-rs/src/attestor/mod.rs | 71 ++++++++++------------------- operator-rs/src/main.rs | 1 - operator-rs/src/types.rs | 1 - 10 files changed, 36 insertions(+), 70 deletions(-) delete mode 100644 core-rs/src/safeclient/mocks/mod.rs diff --git a/Cargo.toml b/Cargo.toml index 5f4b99a4..633d2c2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ "contracts/evm/test/ffi/bls-utils", "relayer-rs", "operator-rs", - "core-rs", # Added core-rs as a workspace member + "core-rs", ] [workspace.package] diff --git a/core-rs/Cargo.toml b/core-rs/Cargo.toml index 193fa31f..e0fce512 100644 --- a/core-rs/Cargo.toml +++ b/core-rs/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "safeclient" +name = "core-rs" version = "0.1.0" edition = "2021" @@ -22,10 +22,6 @@ sha2 = "0.10.6" # Logging log = "0.4" - -# Other potential dependencies -reqwest = { version = "0.12.8", features = ["json"] } -url = "2.3" futures-util = "0.3.30" [dev-dependencies] diff --git a/core-rs/src/safeclient/client.rs b/core-rs/src/safeclient/client.rs index 700332d8..a426a88b 100644 --- a/core-rs/src/safeclient/client.rs +++ b/core-rs/src/safeclient/client.rs @@ -2,7 +2,7 @@ use alloy::eips::BlockNumberOrTag; use alloy::primitives::{B256, U256}; use alloy::providers::{Provider, ProviderBuilder, RootProvider, WsConnect}; use alloy::pubsub::PubSubFrontend; -use alloy::rpc::types::{Block, Filter, Log, Transaction, TransactionReceipt}; +use alloy::rpc::types::{Block, Filter, Header, Log, Transaction, TransactionReceipt}; use anyhow::Result; use async_trait::async_trait; use std::sync::Arc; @@ -20,7 +20,7 @@ pub trait SafeClient: Send + Sync { async fn get_transaction_receipt(&self, tx_hash: B256) -> Result>; async fn get_logs(&self, filter: Filter) -> Result>; async fn subscribe_logs(&self, filter: Filter) -> Result>; - async fn subscribe_new_heads(&self) -> Result>; + async fn subscribe_new_heads(&self) -> Result>; fn close(&self); } @@ -120,7 +120,7 @@ impl SafeClient for SafeEthClient { Ok(rx) } - async fn subscribe_new_heads(&self) -> Result> { + async fn subscribe_new_heads(&self) -> Result> { let (tx, rx) = broadcast::channel(100); let header_timeout = self.header_timeout; let subscription = self.provider.subscribe_blocks().await?; @@ -130,17 +130,17 @@ impl SafeClient for SafeEthClient { loop { tokio::select! { Some(block) = stream.next() => { - if tx.send(block).is_err() { - error!("Error sending block: channel closed"); + if tx.send(block.header).is_err() { + error!("Error sending header: channel closed"); break; } } _ = tokio::time::sleep(header_timeout) => { - warn!("Timeout waiting for new block"); + warn!("Timeout waiting for new header"); break; } else => { - error!("Block stream ended unexpectedly"); + error!("Header stream ended unexpectedly"); break; } } diff --git a/core-rs/src/safeclient/mocks/mod.rs b/core-rs/src/safeclient/mocks/mod.rs deleted file mode 100644 index 8f32de6b..00000000 --- a/core-rs/src/safeclient/mocks/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -use mockall::automock; -use crate::safeclient::SafeClient; - -#[automock] -pub trait MockSafeClient: SafeClient {} \ No newline at end of file diff --git a/core-rs/src/safeclient/mod.rs b/core-rs/src/safeclient/mod.rs index 831c29a8..b5e700b0 100644 --- a/core-rs/src/safeclient/mod.rs +++ b/core-rs/src/safeclient/mod.rs @@ -1,6 +1,5 @@ -pub mod mocks; mod client; mod utils; -pub use client::{SafeClient, SafeEthClient}; +pub use client::{SafeClient, SafeEthClient, SafeEthClientOptions}; pub use utils::*; \ No newline at end of file diff --git a/core-rs/src/safeclient/utils.rs b/core-rs/src/safeclient/utils.rs index 28f599b6..7a81cac5 100644 --- a/core-rs/src/safeclient/utils.rs +++ b/core-rs/src/safeclient/utils.rs @@ -9,7 +9,7 @@ pub fn hash_log(log: &Log) -> B256 { for topic in log.topics() { hasher.update(topic.as_slice()); } - hasher.update(log.data().as_slice()); + hasher.update(log.data().data.clone()); // Hash additional block and tx info if let Some(block_hash) = log.block_hash { diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml index f97edffe..bb3cf10d 100644 --- a/operator-rs/Cargo.toml +++ b/operator-rs/Cargo.toml @@ -31,3 +31,4 @@ rand = "0.8" eigensdk = { version = "0.1.0", features = ["full", "types", "crypto-bls", "utils"] } borsh = "1.5.1" lapin = "2.3.1" +core-rs = { path = "../core-rs" } diff --git a/operator-rs/src/attestor/mod.rs b/operator-rs/src/attestor/mod.rs index 5f6f0f65..f2c36df2 100644 --- a/operator-rs/src/attestor/mod.rs +++ b/operator-rs/src/attestor/mod.rs @@ -6,7 +6,6 @@ use crate::consumer::config::ConsumerConfig; use std::collections::HashMap; use std::sync::Arc; use alloy_rpc_types::Header; -use eigensdk::logging::logger::Logger; use tokio::sync::mpsc; use tokio::time::Duration; use anyhow::{Result, anyhow}; @@ -14,6 +13,7 @@ use tracing::{error, info, warn}; use prometheus::Registry; use alloy_rpc_types::Block; use tokio::sync::Mutex; +use core_rs::safeclient::{SafeClient, SafeEthClient, SafeEthClientOptions}; use crate::types::{BlockData, NFFLNodeConfig, SignedStateRootUpdateMessage, StateRootUpdateMessage}; use self::notifier::Notifier; @@ -24,14 +24,6 @@ use tokio::sync::broadcast; // Constants const MQ_WAIT_TIMEOUT: Duration = Duration::from_secs(30); -// Mock types (to be replaced with actual implementations) -type SafeClient = Arc; -trait SafeClientTrait: Send + Sync { - fn subscribe_new_head(&self) -> mpsc::Receiver
; - fn block_number(&self) -> u64; - fn close(&self); -} - // TODO: Replace with actual types from eigensdk-rs type OperatorId = eigensdk::types::operator::OperatorId; @@ -45,7 +37,7 @@ struct SharedState { pub struct Attestor { shared: Arc, rollup_ids_to_urls: HashMap, - clients: HashMap, + clients: HashMap>, rpc_calls_collectors: HashMap, // Replace with actual RPC calls collector config: NFFLNodeConfig, bls_keypair: BlsKeyPair, @@ -56,7 +48,7 @@ pub struct Attestor { impl Attestor { #[allow(clippy::too_many_arguments)] pub fn new(config: NFFLNodeConfig, bls_keypair: BlsKeyPair, - operator_id: OperatorId, registry: Registry, logger: Box) -> Result { + operator_id: OperatorId, registry: Registry) -> Result { info!("Creating new Attestor instance"); let consumer = Consumer::new(ConsumerConfig { rollup_ids: config.near_da_indexer_rollup_ids.clone(), @@ -68,7 +60,7 @@ impl Attestor { for (rollup_id, url) in &config.rollup_ids_to_rpc_urls { info!("Creating SafeClient for rollup_id: {}, url: {}", rollup_id, url); - let client = create_safe_client(url)?; + let client: Arc = Arc::new(create_safe_client(url)?); clients.insert(*rollup_id, client); if config.enable_metrics { @@ -128,11 +120,11 @@ impl Attestor { for (rollup_id, client) in &self.clients { info!("Setting up header subscription for rollup_id: {}", rollup_id); - let headers_rx = client.subscribe_new_head(); - let block_number = client.block_number(); + let headers_rx = client.subscribe_new_heads().await?; + let block_number = client.block_number().await?; info!("Observing initial block number {} for rollup_id: {}", block_number, rollup_id); - self.shared.listener.observe_initialization_initial_block_number(*rollup_id, block_number); + self.shared.listener.observe_initialization_initial_block_number(*rollup_id, block_number.to::()); headers_rxs.insert(*rollup_id, headers_rx); } @@ -192,9 +184,9 @@ impl Attestor { } } - async fn process_rollup_headers(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, mut headers_rx: mpsc::Receiver
) -> Result<()> { + async fn process_rollup_headers(shared: &Arc, rollup_id: u32, operator_id: OperatorId, keypair: &BlsKeyPair, mut headers_rx: broadcast::Receiver
) -> Result<()> { info!("Starting to process rollup headers for rollup_id: {}", rollup_id); - while let Some(header) = headers_rx.recv().await { + while let Ok(header) = headers_rx.recv().await { if let Err(e) = Self::process_header(shared, rollup_id, operator_id, keypair, header).await { error!("Error processing header for rollup {}: {:?}", rollup_id, e); } @@ -294,35 +286,20 @@ impl Attestor { } // Helper functions implementations -fn create_safe_client(_url: &str) -> Result { - // This is a mock implementation. In a real scenario, you'd create an actual client. - struct MockSafeClient; - impl SafeClientTrait for MockSafeClient { - fn subscribe_new_head(&self) -> mpsc::Receiver
{ - let (tx, rx) = mpsc::channel(100); - tokio::spawn(async move { - loop { - tokio::time::sleep(Duration::from_secs(10)).await; - let mock_header = Header::default(); // Create a mock header - if tx.send(mock_header).await.is_err() { - break; - } - } - }); - rx - } - - fn block_number(&self) -> u64 { - 0 // Mock implementation - } - - fn close(&self) { - // Mock implementation - } - } - - info!("Creating mock SafeClient"); - Ok(Arc::new(MockSafeClient) as SafeClient) +fn create_safe_client(url: &str) -> Result { + let options = SafeEthClientOptions { + log_resub_interval: Duration::from_secs(300), + header_timeout: Duration::from_secs(30), + block_chunk_size: 100, + block_max_range: 100, + }; + + let client = tokio::runtime::Runtime::new()?.block_on(async { + SafeEthClient::new(url, options).await + })?; + + info!("Created SafeEthClient"); + Ok(client) } fn sign_state_root_update_message(_keypair: &BlsKeyPair, _message: &StateRootUpdateMessage) -> Result { @@ -351,4 +328,4 @@ fn get_block_number(block: &Block) -> u64 { fn get_block_root(block: &Block) -> [u8; 32] { block.header.state_root.into() -} \ No newline at end of file +} diff --git a/operator-rs/src/main.rs b/operator-rs/src/main.rs index e8477125..ec40c2a5 100644 --- a/operator-rs/src/main.rs +++ b/operator-rs/src/main.rs @@ -121,7 +121,6 @@ async fn operator_main(config: NFFLNodeConfig) -> Result<()> { BlsKeyPair::new(config.bls_keypair)?, eigensdk::types::operator::OperatorId::from([1u8; 32]), Registry::default(), - operator_rs::types::create_default_logger() )?; // Start the attestor diff --git a/operator-rs/src/types.rs b/operator-rs/src/types.rs index 50e4009d..9fbbd569 100644 --- a/operator-rs/src/types.rs +++ b/operator-rs/src/types.rs @@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize}; use alloy_rpc_types::Block; use eigensdk::logging::logger::Logger; use tracing::{debug, error, info, warn}; -use std::sync::Arc; #[derive(Debug, Serialize, Deserialize, Clone)] pub struct NFFLNodeConfig { From 8dc05d720881f35c9d7cd960e943a306c5fa446b Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Sun, 13 Oct 2024 18:59:30 +0200 Subject: [PATCH 51/96] wip: safeclient builds within docker compose --- operator-rs/Dockerfile | 18 +++++++++++++++--- setup/i-r-a/docker-compose.yml | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/operator-rs/Dockerfile b/operator-rs/Dockerfile index e8215ec2..a7eac989 100644 --- a/operator-rs/Dockerfile +++ b/operator-rs/Dockerfile @@ -1,6 +1,17 @@ # Use the official Rust image as a parent image FROM rust:1.79 as builder +# Install system dependencies +RUN apt-get update && apt-get install -y \ + clang \ + libclang-dev \ + llvm-dev \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* + +# Find and set the LIBCLANG_PATH +RUN echo "export LIBCLANG_PATH=$(llvm-config --prefix)/lib" >> ~/.bashrc + # Set the working directory in the container WORKDIR /usr/src/operator-rs @@ -8,10 +19,11 @@ WORKDIR /usr/src/operator-rs COPY Cargo.toml ./ # Copy the source code -COPY src ./src +COPY . /usr/src/operator-rs +COPY ../core-rs /usr/src/core-rs # Build the application -RUN cargo build --release +RUN . ~/.bashrc && cargo build --release # Start a new stage for a smaller final image FROM debian:bookworm-slim @@ -26,4 +38,4 @@ COPY --from=builder /usr/src/operator-rs/target/release/operator-rs /usr/local/b ENTRYPOINT ["operator-rs"] # Default command (can be overridden) -CMD ["--help"] \ No newline at end of file +CMD ["--help"] diff --git a/setup/i-r-a/docker-compose.yml b/setup/i-r-a/docker-compose.yml index 84009b21..7a42aa96 100644 --- a/setup/i-r-a/docker-compose.yml +++ b/setup/i-r-a/docker-compose.yml @@ -95,8 +95,8 @@ services: operator-rs: build: - context: ../../operator-rs - dockerfile: Dockerfile + context: ../.. # Set this to the parent directory of both operator-rs and core-rs + dockerfile: operator-rs/Dockerfile container_name: near-sffl-operator-rs volumes: - ./config:/near-sffl/config From 0d250e08aab2b8fbc1a3cd86e8497743d0177f95 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 16 Oct 2024 09:40:24 +0200 Subject: [PATCH 52/96] wip: fix dockerfile so it doesn't break current indexer --- indexer/Dockerfile | 4 +-- indexer/FastIndexer.dockerfile | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 indexer/FastIndexer.dockerfile diff --git a/indexer/Dockerfile b/indexer/Dockerfile index 5e898fec..c9350fb7 100644 --- a/indexer/Dockerfile +++ b/indexer/Dockerfile @@ -16,12 +16,12 @@ RUN apt-get update -qq && \ COPY ./Cargo.toml . RUN mkdir ./src && echo "fn main() {}" > ./src/main.rs -RUN cargo build --release -p indexer --features use_fastnear +RUN cargo build --release -p indexer COPY . . RUN touch ./src/main.rs -RUN cargo build --release -p indexer --features use_fastnear +RUN cargo build --release -p indexer FROM debian:bookworm-slim as runtime WORKDIR /indexer-app diff --git a/indexer/FastIndexer.dockerfile b/indexer/FastIndexer.dockerfile new file mode 100644 index 00000000..5e898fec --- /dev/null +++ b/indexer/FastIndexer.dockerfile @@ -0,0 +1,47 @@ +FROM rust:1.79 AS builder +WORKDIR /tmp/indexer + +# Copy from nearcore: +# https://github.com/near/nearcore/blob/master/Dockerfile +RUN apt-get update -qq && \ + apt-get install -y \ + git \ + cmake \ + g++ \ + pkg-config \ + libssl-dev \ + curl \ + llvm \ + clang + +COPY ./Cargo.toml . +RUN mkdir ./src && echo "fn main() {}" > ./src/main.rs +RUN cargo build --release -p indexer --features use_fastnear + +COPY . . +RUN touch ./src/main.rs + +RUN cargo build --release -p indexer --features use_fastnear + +FROM debian:bookworm-slim as runtime +WORKDIR /indexer-app + +RUN apt update && apt install -yy openssl ca-certificates jq curl + +COPY --from=builder /tmp/indexer/target/release/indexer . +COPY entrypoint.sh ./entrypoint.sh +RUN chmod +x ./entrypoint.sh + +EXPOSE 3030 + +HEALTHCHECK --interval=20s --timeout=30s --retries=10000 \ + CMD (curl -f -s -X POST -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"block","params":{"finality":"optimistic"},"id":"dontcare"}' \ + http://localhost:3030 | \ + jq -es 'if . == [] then null else .[] | (now - (.result.header.timestamp / 1000000000)) < 10 end') && \ + (curl -f -s -X POST -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"status","params":[],"id":"dontcare"}' \ + http://localhost:3030 | \ + jq -es 'if . == [] then null else .[] | .result.sync_info.syncing == false end') + +ENTRYPOINT [ "./entrypoint.sh" ] From cf1b4a4ff38cf11ef8c2a0e7c50bb308a3f0694c Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 16 Oct 2024 09:43:02 +0200 Subject: [PATCH 53/96] wip: fix docker compose for setups --- setup/fastnear-indexer/docker-compose.yml | 2 +- setup/i-r-a/docker-compose.yml | 2 +- setup/indexer-relayer-testnet/docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml index 3cb817d9..0285e111 100644 --- a/setup/fastnear-indexer/docker-compose.yml +++ b/setup/fastnear-indexer/docker-compose.yml @@ -26,7 +26,7 @@ services: profiles: [indexer] build: context: ../../indexer - dockerfile: Dockerfile + dockerfile: FastIndexer.dockerfile container_name: fastnear-indexer depends_on: rmq: diff --git a/setup/i-r-a/docker-compose.yml b/setup/i-r-a/docker-compose.yml index 7a42aa96..d526529f 100644 --- a/setup/i-r-a/docker-compose.yml +++ b/setup/i-r-a/docker-compose.yml @@ -29,7 +29,7 @@ services: fastnear-indexer: build: context: ../../indexer - dockerfile: Dockerfile + dockerfile: FastIndexer.dockerfile container_name: fastnear-indexer depends_on: rmq: diff --git a/setup/indexer-relayer-testnet/docker-compose.yml b/setup/indexer-relayer-testnet/docker-compose.yml index 904d99cf..6962b6c8 100644 --- a/setup/indexer-relayer-testnet/docker-compose.yml +++ b/setup/indexer-relayer-testnet/docker-compose.yml @@ -29,7 +29,7 @@ services: fastnear-indexer: build: context: ../../indexer - dockerfile: Dockerfile + dockerfile: FastIndexer.dockerfile container_name: fastnear-indexer depends_on: rmq: From b14dfa62f8f5df5851ab159e73fd65c0feb7655f Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Wed, 16 Oct 2024 10:20:01 +0200 Subject: [PATCH 54/96] wip: big cargo clean up --- Cargo.lock | 596 ++++++++++------------------------------- Cargo.toml | 29 +- core-rs/Cargo.toml | 21 +- indexer/Cargo.toml | 16 +- operator-rs/Cargo.toml | 42 +-- relayer-rs/Cargo.toml | 43 ++- 6 files changed, 216 insertions(+), 531 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1c668a05..bd16fd65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -357,33 +357,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "alloy" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367891bf380210abb0d6aa30c5f85a9080cb4a066c4d5c5acadad630823751b" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-contract 0.3.6", - "alloy-core", - "alloy-eips 0.3.6", - "alloy-genesis 0.3.6", - "alloy-json-rpc 0.3.6", - "alloy-network 0.3.6", - "alloy-node-bindings 0.3.6", - "alloy-provider 0.3.6", - "alloy-pubsub 0.3.6", - "alloy-rpc-client 0.3.6", - "alloy-rpc-types 0.3.6", - "alloy-serde 0.3.6", - "alloy-signer 0.3.6", - "alloy-signer-local 0.3.6", - "alloy-transport 0.3.6", - "alloy-transport-http 0.3.6", - "alloy-transport-ipc 0.3.6", - "alloy-transport-ws 0.3.6", -] - [[package]] name = "alloy" version = "0.4.2" @@ -394,10 +367,10 @@ dependencies = [ "alloy-contract 0.4.2", "alloy-core", "alloy-eips 0.4.2", - "alloy-genesis 0.4.2", + "alloy-genesis", "alloy-json-rpc 0.4.2", "alloy-network 0.4.2", - "alloy-node-bindings 0.4.2", + "alloy-node-bindings", "alloy-provider 0.4.2", "alloy-pubsub 0.4.2", "alloy-rpc-client 0.4.2", @@ -407,7 +380,7 @@ dependencies = [ "alloy-signer-local 0.4.2", "alloy-transport 0.4.2", "alloy-transport-http 0.4.2", - "alloy-transport-ipc 0.4.2", + "alloy-transport-ipc", "alloy-transport-ws 0.4.2", ] @@ -435,20 +408,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-consensus" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" -dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives 0.8.5", - "alloy-rlp", - "alloy-serde 0.3.6", - "c-kzg", - "serde", -] - [[package]] name = "alloy-consensus" version = "0.4.2" @@ -484,27 +443,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-contract" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eefe64fd344cffa9cf9e3435ec4e93e6e9c3481bc37269af988bf497faf4a6a" -dependencies = [ - "alloy-dyn-abi 0.8.5", - "alloy-json-abi 0.8.5", - "alloy-network 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.5", - "alloy-provider 0.3.6", - "alloy-pubsub 0.3.6", - "alloy-rpc-types-eth 0.3.6", - "alloy-sol-types 0.8.5", - "alloy-transport 0.3.6", - "futures", - "futures-util", - "thiserror", -] - [[package]] name = "alloy-contract" version = "0.4.2" @@ -514,7 +452,7 @@ dependencies = [ "alloy-dyn-abi 0.8.5", "alloy-json-abi 0.8.5", "alloy-network 0.4.2", - "alloy-network-primitives 0.4.2", + "alloy-network-primitives", "alloy-primitives 0.8.5", "alloy-provider 0.4.2", "alloy-pubsub 0.4.2", @@ -611,24 +549,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "alloy-eips" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives 0.8.5", - "alloy-rlp", - "alloy-serde 0.3.6", - "c-kzg", - "derive_more 1.0.0", - "once_cell", - "serde", - "sha2", -] - [[package]] name = "alloy-eips" version = "0.4.2" @@ -647,17 +567,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "alloy-genesis" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" -dependencies = [ - "alloy-primitives 0.8.5", - "alloy-serde 0.3.6", - "serde", -] - [[package]] name = "alloy-genesis" version = "0.4.2" @@ -706,20 +615,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-json-rpc" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" -dependencies = [ - "alloy-primitives 0.8.5", - "alloy-sol-types 0.8.5", - "serde", - "serde_json", - "thiserror", - "tracing", -] - [[package]] name = "alloy-json-rpc" version = "0.4.2" @@ -754,27 +649,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-network" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-json-rpc 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.5", - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "alloy-signer 0.3.6", - "alloy-sol-types 0.8.5", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "thiserror", -] - [[package]] name = "alloy-network" version = "0.4.2" @@ -784,7 +658,7 @@ dependencies = [ "alloy-consensus 0.4.2", "alloy-eips 0.4.2", "alloy-json-rpc 0.4.2", - "alloy-network-primitives 0.4.2", + "alloy-network-primitives", "alloy-primitives 0.8.5", "alloy-rpc-types-eth 0.4.2", "alloy-serde 0.4.2", @@ -796,18 +670,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-network-primitives" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" -dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives 0.8.5", - "alloy-serde 0.3.6", - "serde", -] - [[package]] name = "alloy-network-primitives" version = "0.4.2" @@ -821,30 +683,13 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-node-bindings" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5988a227293f949525f0a1b3e1ef728d2ef24afa96bad2b7788c6c9617fa3eec" -dependencies = [ - "alloy-genesis 0.3.6", - "alloy-primitives 0.8.5", - "k256", - "rand 0.8.5", - "serde_json", - "tempfile", - "thiserror", - "tracing", - "url", -] - [[package]] name = "alloy-node-bindings" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f1334a738aa1710cb8227441b3fcc319202ce78e967ef37406940242df4a454" dependencies = [ - "alloy-genesis 0.4.2", + "alloy-genesis", "alloy-primitives 0.8.5", "k256", "rand 0.8.5", @@ -930,7 +775,7 @@ dependencies = [ "futures-utils-wasm", "lru 0.12.4", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "tokio", @@ -938,47 +783,6 @@ dependencies = [ "url", ] -[[package]] -name = "alloy-provider" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927f708dd457ed63420400ee5f06945df9632d5d101851952056840426a10dc5" -dependencies = [ - "alloy-chains", - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-json-rpc 0.3.6", - "alloy-network 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-node-bindings 0.3.6", - "alloy-primitives 0.8.5", - "alloy-pubsub 0.3.6", - "alloy-rpc-client 0.3.6", - "alloy-rpc-types-anvil 0.3.6", - "alloy-rpc-types-eth 0.3.6", - "alloy-rpc-types-trace 0.3.6", - "alloy-signer-local 0.3.6", - "alloy-transport 0.3.6", - "alloy-transport-http 0.3.6", - "alloy-transport-ipc 0.3.6", - "alloy-transport-ws 0.3.6", - "async-stream", - "async-trait", - "auto_impl", - "dashmap 6.1.0", - "futures", - "futures-utils-wasm", - "lru 0.12.4", - "pin-project", - "reqwest 0.12.7", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "url", -] - [[package]] name = "alloy-provider" version = "0.4.2" @@ -990,18 +794,18 @@ dependencies = [ "alloy-eips 0.4.2", "alloy-json-rpc 0.4.2", "alloy-network 0.4.2", - "alloy-network-primitives 0.4.2", - "alloy-node-bindings 0.4.2", + "alloy-network-primitives", + "alloy-node-bindings", "alloy-primitives 0.8.5", "alloy-pubsub 0.4.2", "alloy-rpc-client 0.4.2", - "alloy-rpc-types-anvil 0.4.2", + "alloy-rpc-types-anvil", "alloy-rpc-types-eth 0.4.2", - "alloy-rpc-types-trace 0.4.2", + "alloy-rpc-types-trace", "alloy-signer-local 0.4.2", "alloy-transport 0.4.2", "alloy-transport-http 0.4.2", - "alloy-transport-ipc 0.4.2", + "alloy-transport-ipc", "alloy-transport-ws 0.4.2", "async-stream", "async-trait", @@ -1011,7 +815,7 @@ dependencies = [ "futures-utils-wasm", "lru 0.12.4", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "thiserror", @@ -1039,25 +843,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "alloy-pubsub" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d05f63677e210d758cd5d6d1ce10f20c980c3560ccfbe79ba1997791862a04f" -dependencies = [ - "alloy-json-rpc 0.3.6", - "alloy-primitives 0.8.5", - "alloy-transport 0.3.6", - "bimap", - "futures", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower 0.5.1", - "tracing", -] - [[package]] name = "alloy-pubsub" version = "0.4.2" @@ -1113,7 +898,7 @@ dependencies = [ "alloy-transport-ws 0.1.4", "futures", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "tokio", @@ -1123,31 +908,6 @@ dependencies = [ "url", ] -[[package]] -name = "alloy-rpc-client" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d82952dca71173813d4e5733e2c986d8b04aea9e0f3b0a576664c232ad050a5" -dependencies = [ - "alloy-json-rpc 0.3.6", - "alloy-primitives 0.8.5", - "alloy-pubsub 0.3.6", - "alloy-transport 0.3.6", - "alloy-transport-http 0.3.6", - "alloy-transport-ipc 0.3.6", - "alloy-transport-ws 0.3.6", - "futures", - "pin-project", - "reqwest 0.12.7", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower 0.5.1", - "tracing", - "url", -] - [[package]] name = "alloy-rpc-client" version = "0.4.2" @@ -1159,11 +919,11 @@ dependencies = [ "alloy-pubsub 0.4.2", "alloy-transport 0.4.2", "alloy-transport-http 0.4.2", - "alloy-transport-ipc 0.4.2", + "alloy-transport-ipc", "alloy-transport-ws 0.4.2", "futures", "pin-project", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "tokio", @@ -1183,19 +943,6 @@ dependencies = [ "alloy-serde 0.1.4", ] -[[package]] -name = "alloy-rpc-types" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" -dependencies = [ - "alloy-rpc-types-engine 0.3.6", - "alloy-rpc-types-eth 0.3.6", - "alloy-rpc-types-trace 0.3.6", - "alloy-serde 0.3.6", - "serde", -] - [[package]] name = "alloy-rpc-types" version = "0.4.2" @@ -1203,24 +950,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" dependencies = [ "alloy-primitives 0.8.5", - "alloy-rpc-types-engine 0.4.2", + "alloy-rpc-types-engine", "alloy-rpc-types-eth 0.4.2", - "alloy-rpc-types-trace 0.4.2", + "alloy-rpc-types-trace", "alloy-serde 0.4.2", "serde", ] -[[package]] -name = "alloy-rpc-types-anvil" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25cb45ad7c0930dd62eecf164d2afe4c3d2dd2c82af85680ad1f118e1e5cb83" -dependencies = [ - "alloy-primitives 0.8.5", - "alloy-serde 0.3.6", - "serde", -] - [[package]] name = "alloy-rpc-types-anvil" version = "0.4.2" @@ -1232,23 +968,6 @@ dependencies = [ "serde", ] -[[package]] -name = "alloy-rpc-types-engine" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1464c4dd646e1bdfde86ae65ce5ba168dbb29180b478011fe87117ae46b1629b" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-primitives 0.8.5", - "alloy-rlp", - "alloy-serde 0.3.6", - "derive_more 1.0.0", - "jsonwebtoken 9.3.0", - "rand 0.8.5", - "serde", -] - [[package]] name = "alloy-rpc-types-engine" version = "0.4.2" @@ -1285,27 +1004,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.5", - "alloy-rlp", - "alloy-serde 0.3.6", - "alloy-sol-types 0.8.5", - "cfg-if 1.0.0", - "derive_more 1.0.0", - "hashbrown 0.14.5", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.4.2" @@ -1314,7 +1012,7 @@ checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" dependencies = [ "alloy-consensus 0.4.2", "alloy-eips 0.4.2", - "alloy-network-primitives 0.4.2", + "alloy-network-primitives", "alloy-primitives 0.8.5", "alloy-rlp", "alloy-serde 0.4.2", @@ -1325,20 +1023,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-rpc-types-trace" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98db35cd42c90b484377e6bc44d95377a7a38a5ebee996e67754ac0446d542ab" -dependencies = [ - "alloy-primitives 0.8.5", - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "alloy-rpc-types-trace" version = "0.4.2" @@ -1364,17 +1048,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-serde" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" -dependencies = [ - "alloy-primitives 0.8.5", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.4.2" @@ -1400,20 +1073,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-signer" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" -dependencies = [ - "alloy-primitives 0.8.5", - "async-trait", - "auto_impl", - "elliptic-curve", - "k256", - "thiserror", -] - [[package]] name = "alloy-signer" version = "0.4.2" @@ -1462,22 +1121,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "alloy-signer-local" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-network 0.3.6", - "alloy-primitives 0.8.5", - "alloy-signer 0.3.6", - "async-trait", - "k256", - "rand 0.8.5", - "thiserror", -] - [[package]] name = "alloy-signer-local" version = "0.4.2" @@ -1659,25 +1302,6 @@ dependencies = [ "url", ] -[[package]] -name = "alloy-transport" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33616b2edf7454302a1d48084db185e52c309f73f6c10be99b0fe39354b3f1e9" -dependencies = [ - "alloy-json-rpc 0.3.6", - "base64 0.22.1", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower 0.5.1", - "tracing", - "url", -] - [[package]] name = "alloy-transport" version = "0.4.2" @@ -1705,28 +1329,13 @@ checksum = "86d65871f9f1cafe1ed25cde2f1303be83e6473e995a2d56c275ae4fcce6119c" dependencies = [ "alloy-json-rpc 0.1.4", "alloy-transport 0.1.4", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde_json", "tower 0.4.13", "tracing", "url", ] -[[package]] -name = "alloy-transport-http" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a944f5310c690b62bbb3e7e5ce34527cbd36b2d18532a797af123271ce595a49" -dependencies = [ - "alloy-json-rpc 0.3.6", - "alloy-transport 0.3.6", - "reqwest 0.12.7", - "serde_json", - "tower 0.5.1", - "tracing", - "url", -] - [[package]] name = "alloy-transport-http" version = "0.4.2" @@ -1735,32 +1344,13 @@ checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" dependencies = [ "alloy-json-rpc 0.4.2", "alloy-transport 0.4.2", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde_json", "tower 0.5.1", "tracing", "url", ] -[[package]] -name = "alloy-transport-ipc" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fd8491249f74d16ec979b1f5672377b12ebb818e6056478ffa386954dbd350" -dependencies = [ - "alloy-json-rpc 0.3.6", - "alloy-pubsub 0.3.6", - "alloy-transport 0.3.6", - "bytes", - "futures", - "interprocess", - "pin-project", - "serde_json", - "tokio", - "tokio-util 0.7.12", - "tracing", -] - [[package]] name = "alloy-transport-ipc" version = "0.4.2" @@ -1798,24 +1388,6 @@ dependencies = [ "ws_stream_wasm", ] -[[package]] -name = "alloy-transport-ws" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9704761f6297fe482276bee7f77a93cb42bd541c2bd6c1c560b6f3a9ece672e" -dependencies = [ - "alloy-pubsub 0.3.6", - "alloy-transport 0.3.6", - "futures", - "http 1.1.0", - "rustls 0.23.13", - "serde_json", - "tokio", - "tokio-tungstenite 0.23.1", - "tracing", - "ws_stream_wasm", -] - [[package]] name = "alloy-transport-ws" version = "0.4.2" @@ -3708,6 +3280,24 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-rs" +version = "0.1.0" +dependencies = [ + "alloy", + "anyhow", + "async-trait", + "futures-util", + "log", + "mockall", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tokio-test", +] + [[package]] name = "cpp_demangle" version = "0.3.5" @@ -4387,6 +3977,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "dunce" version = "1.0.5" @@ -4504,7 +4100,7 @@ dependencies = [ "eigen-logging", "eigen-signer", "k256", - "reqwest 0.12.7", + "reqwest 0.12.8", "thiserror", ] @@ -4809,7 +4405,7 @@ dependencies = [ "alloy-sol-types 0.7.7", "alloy-transport 0.1.4", "alloy-transport-http 0.1.4", - "reqwest 0.12.7", + "reqwest 0.12.8", ] [[package]] @@ -5513,6 +5109,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "fs2" version = "0.4.3" @@ -6421,7 +6023,7 @@ dependencies = [ "near-o11y 2.2.1-rc.1", "openssl-probe", "prometheus", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "serde_yaml", @@ -7181,6 +6783,32 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" +[[package]] +name = "mockall" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "more-asserts" version = "0.2.2" @@ -9404,7 +9032,7 @@ dependencies = [ name = "operator-rs" version = "0.1.0" dependencies = [ - "alloy 0.4.2", + "alloy", "alloy-primitives 0.8.5", "alloy-rlp", "alloy-rpc-client 0.4.2", @@ -9414,6 +9042,7 @@ dependencies = [ "bincode", "borsh 1.5.1", "clap", + "core-rs", "eigensdk", "eyre", "futures-util", @@ -10067,6 +9696,32 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "predicates" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" + +[[package]] +name = "predicates-tree" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "prefix-sum-vec" version = "0.1.2" @@ -10773,12 +10428,12 @@ dependencies = [ name = "relayer-rs" version = "0.1.0" dependencies = [ - "alloy 0.3.6", + "alloy", "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-rpc-client 0.3.6", - "alloy-rpc-types 0.3.6", - "alloy-transport-ws 0.3.6", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-transport-ws 0.4.2", "anyhow", "bincode", "clap", @@ -10854,9 +10509,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", @@ -10882,7 +10537,7 @@ dependencies = [ "pin-project-lite", "quinn", "rustls 0.23.13", - "rustls-native-certs 0.7.3", + "rustls-native-certs 0.8.0", "rustls-pemfile 2.1.3", "rustls-pki-types", "serde", @@ -12353,6 +12008,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + [[package]] name = "testcontainers" version = "0.20.1" @@ -12371,7 +12032,7 @@ dependencies = [ "memchr", "parse-display", "pin-project-lite", - "reqwest 0.12.7", + "reqwest 0.12.8", "serde", "serde_json", "serde_with", @@ -12615,6 +12276,19 @@ dependencies = [ "tokio-util 0.7.12", ] +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + [[package]] name = "tokio-tungstenite" version = "0.20.1" diff --git a/Cargo.toml b/Cargo.toml index 633d2c2d..791da094 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,29 @@ version = "0.0.1" edition = "2021" repository = "https://github.com/NethermindEth/near-sffl" +[workspace.dependencies] +alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde"] } +alloy-primitives = "0.8.3" +alloy-rpc-client = "0.4.2" +alloy-rpc-types = "0.4.2" +alloy-transport-ws = "0.4.2" +alloy-rlp = "0.3.8" +tokio = { version = "1.0", features = ["full"] } +prometheus = "0.13" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +anyhow = "1.0" +tracing = "0.1" +tracing-subscriber = "0.3" +futures-util = "0.3.30" +eyre = "0.6" +bincode = "1.3" +serde_yaml = "0.9" +clap = "4.5.18" +tempfile = "3.10.0" +async-trait = "0.1" +log = "0.4" +core-rs = { path = "core-rs" } + [patch.crates-io] parity-secp256k1 = { git = 'https://github.com/paritytech/rust-secp256k1.git' } - -# If you want to add core-rs as a dependency for other workspace members, -# you can uncomment and add the following: -# [workspace.dependencies] -# core-rs = { path = "core-rs" } diff --git a/core-rs/Cargo.toml b/core-rs/Cargo.toml index e0fce512..590b9bda 100644 --- a/core-rs/Cargo.toml +++ b/core-rs/Cargo.toml @@ -4,25 +4,20 @@ version = "0.1.0" edition = "2021" [dependencies] -# Core dependencies -tokio = { version = "1.0", features = ["full"] } -async-trait = "0.1" +tokio = { workspace = true } +async-trait = { workspace = true } thiserror = "1.0" -anyhow = "1.0" +anyhow = { workspace = true } -# Alloy dependencies -alloy = "0.4.2" -# Mocking +alloy = { workspace = true } mockall = "0.13.0" -# Serialization -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +serde = { workspace = true } +serde_json = { workspace = true } sha2 = "0.10.6" -# Logging -log = "0.4" -futures-util = "0.3.30" +log = { workspace = true } +futures-util = { workspace = true } [dev-dependencies] tokio-test = "0.4" diff --git a/indexer/Cargo.toml b/indexer/Cargo.toml index 35a561c4..295e8089 100644 --- a/indexer/Cargo.toml +++ b/indexer/Cargo.toml @@ -9,22 +9,22 @@ edition = "2021" actix = "0.13.1" actix-web = "4.5.1" futures = "0.3.5" -tokio = { version = "1.28.2", features = ["sync", "time"] } +tokio = { workspace = true } deadpool = "0.10.0" lapin = "2.3.1" deadpool-lapin = "0.11.0" tokio-executor-trait = "2.1.0" tokio-reactor-trait = "1.1.0" -prometheus = "0.13.3" +prometheus = { workspace = true } -clap = { version = "4.4.11", features = ["color", "derive", "env"] } +clap = { workspace = true } openssl-probe = "0.1.4" -serde = { version = "1", features = ["derive"] } -serde_json = "1.0.68" +serde = { workspace = true } +serde_json = { workspace = true } -tracing = { version = "0.1.36", features = ["std"] } +tracing = { workspace = true } thiserror = "1.0.56" -anyhow = "1.0.79" +anyhow = { workspace = true } near-indexer = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-client = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } @@ -32,7 +32,7 @@ near-o11y = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123 near-client-primitives = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } reqwest = { version = "0.12.7", features = ["json"] } borsh = { version = "1.0.0", features = ["derive", "rc"] } -serde_yaml = "0.9.34" +serde_yaml = { workspace = true } [dev-dependencies] near-crypto = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml index bb3cf10d..3b65eeab 100644 --- a/operator-rs/Cargo.toml +++ b/operator-rs/Cargo.toml @@ -4,31 +4,33 @@ version = "0.1.0" edition = "2021" [dependencies] -alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde"] } -alloy-primitives = "0.8.3" -alloy-rpc-client = "0.4.2" -alloy-rpc-types = "0.4.2" -alloy-transport-ws = "0.4.2" -alloy-rlp = "0.3.8" +alloy = { workspace = true } +alloy-primitives = { workspace = true } +alloy-rpc-client = { workspace = true } +alloy-rpc-types = { workspace = true } +alloy-transport-ws = { workspace = true } +alloy-rlp = { workspace = true } +tokio = { workspace = true } +prometheus = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +anyhow = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +futures-util = { workspace = true } +eyre = { workspace = true } +bincode = { workspace = true } +serde_yaml = { workspace = true } +clap = { workspace = true } +tempfile = { workspace = true } +core-rs = { workspace = true } + +# Dependencies specific to operator-rs near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } -tokio = { version = "1.0", features = ["full"] } -prometheus = "0.13" warp = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -anyhow = "1.0" -tracing = "0.1" -tracing-subscriber = "0.3" -futures-util = "0.3.30" -eyre = "0.6" -bincode = "1.3" -serde_yaml = "0.9" -clap = "4.5.18" -tempfile = "3.10.0" hex = "0.4" rand = "0.8" eigensdk = { version = "0.1.0", features = ["full", "types", "crypto-bls", "utils"] } borsh = "1.5.1" lapin = "2.3.1" -core-rs = { path = "../core-rs" } diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml index c6fd73bc..0fe2c99b 100644 --- a/relayer-rs/Cargo.toml +++ b/relayer-rs/Cargo.toml @@ -4,30 +4,25 @@ version = "0.1.0" edition = "2021" [dependencies] -alloy = { version = "0.3.6", features = [ "full", - "node-bindings", - "rpc-types-debug", - "rpc-types-trace", - "json-rpc", - "rpc-client"]} -alloy-primitives = "0.8.3" -alloy-rpc-client = "0.3.6" -alloy-rpc-types = "0.3.6" -alloy-transport-ws = "0.3.6" -alloy-rlp = "0.3.8" +alloy = { workspace = true } +alloy-primitives = { workspace = true } +alloy-rpc-client = { workspace = true } +alloy-rpc-types = { workspace = true } +alloy-transport-ws = { workspace = true } +alloy-rlp = { workspace = true } near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } -tokio = { version = "1.30", features = ["full"] } -prometheus = "0.13" +tokio = { workspace = true } +prometheus = { workspace = true } warp = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -anyhow = "1.0" -tracing = "0.1" -tracing-subscriber = "0.3" -futures-util = "0.3.30" -eyre = "0.6" -bincode = "1.3" -serde_yaml = "0.9.1" -clap = "4.5.18" -tempfile = "3.10.0" +serde = { workspace = true } +serde_json = { workspace = true } +anyhow = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +futures-util = { workspace = true } +eyre = { workspace = true } +bincode = { workspace = true } +serde_yaml = { workspace = true } +clap = { workspace = true } +tempfile = { workspace = true } From 016ebd0dc5fbea8963620c612d89b99f1b3ee663 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Thu, 17 Oct 2024 18:20:10 +0200 Subject: [PATCH 55/96] wip: env.example --- setup/i-r-a/.env.example | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 setup/i-r-a/.env.example diff --git a/setup/i-r-a/.env.example b/setup/i-r-a/.env.example new file mode 100644 index 00000000..6ca384b1 --- /dev/null +++ b/setup/i-r-a/.env.example @@ -0,0 +1,17 @@ + +# Tagged release for SFFL containers +SFFL_RELEASE=latest + +# NEAR chain ID +NEAR_CHAIN_ID=testnet + +# NEAR home and keys directories +NEAR_HOME_DIR=~/.near +NEAR_KEYS_DIR=~/.near-credentials + +# Operator BLS key password (from config/keys files) +OPERATOR_BLS_KEY_PASSWORD=fDUMDLmBROwlzzPXyIcy + +# Operator BLS key password (from config/keys files) +# Only set this if you're using the `register_on_startup` configuration +OPERATOR_ECDSA_KEY_PASSWORD=EnJuncq01CiVk9UbuBYl From 2a08d9da95d78c6d4b424a066c0fd4e9db918d82 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 20 Oct 2024 11:36:58 +0200 Subject: [PATCH 56/96] wip: add comments for config validation --- operator-rs/src/config.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operator-rs/src/config.rs b/operator-rs/src/config.rs index b568d8b3..e5c9044a 100644 --- a/operator-rs/src/config.rs +++ b/operator-rs/src/config.rs @@ -2,6 +2,8 @@ use crate::NFFLNodeConfig; use std::path::PathBuf; use anyhow::Result; + +// TODO: Add checks on the validation of the config file pub fn load_config(path: PathBuf) -> Result { let config_str = std::fs::read_to_string(path)?; let config: NFFLNodeConfig = serde_yaml::from_str(&config_str)?; From 49db338e47603c27178c7172e508e21e839e9f9a Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 20 Oct 2024 11:37:13 +0200 Subject: [PATCH 57/96] wip: add bookworm to dockerfile --- operator-rs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator-rs/Dockerfile b/operator-rs/Dockerfile index a7eac989..80e9f06c 100644 --- a/operator-rs/Dockerfile +++ b/operator-rs/Dockerfile @@ -1,5 +1,5 @@ # Use the official Rust image as a parent image -FROM rust:1.79 as builder +FROM rust:1.79-bookworm AS builder # Install system dependencies RUN apt-get update && apt-get install -y \ From 392c1cee81ce056d83b38aa74205ce1cc5df9d9f Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Sun, 20 Oct 2024 11:37:24 +0200 Subject: [PATCH 58/96] wip: add bookworm to fastinedexer dockerfile --- indexer/FastIndexer.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer/FastIndexer.dockerfile b/indexer/FastIndexer.dockerfile index 5e898fec..dbb21b9e 100644 --- a/indexer/FastIndexer.dockerfile +++ b/indexer/FastIndexer.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.79 AS builder +FROM rust:1.79-bookworm AS builder WORKDIR /tmp/indexer # Copy from nearcore: From 1e933b9642d3c11cd0934fa92de0da3304e8cbf1 Mon Sep 17 00:00:00 2001 From: Lozano Date: Wed, 9 Oct 2024 11:23:09 +0200 Subject: [PATCH 59/96] feat: reusable offchain workers --- Cargo.lock | 2322 ++++++++++++++++++--- Cargo.toml | 1 + workers/Cargo.lock | 3581 +++++++++++++++++++++++++++++++++ workers/Cargo.toml | 24 + workers/README.md | 12 + workers/abi/L0V2Endpoint.json | 1 + workers/abi/SendLibrary.json | 1 + workers/src/abi.rs | 20 + workers/src/bin/dvn.rs | 78 + workers/src/config.rs | 94 + workers/src/lib.rs | 5 + workers/src/utils.rs | 235 +++ 12 files changed, 6051 insertions(+), 323 deletions(-) create mode 100644 workers/Cargo.lock create mode 100644 workers/Cargo.toml create mode 100644 workers/README.md create mode 100644 workers/abi/L0V2Endpoint.json create mode 100644 workers/abi/SendLibrary.json create mode 100644 workers/src/abi.rs create mode 100644 workers/src/bin/dvn.rs create mode 100644 workers/src/config.rs create mode 100644 workers/src/lib.rs create mode 100644 workers/src/utils.rs diff --git a/Cargo.lock b/Cargo.lock index d0b4d718..1fd6901b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ checksum = "0346d8c1f762b41b458ed3145eea914966bb9ad20b9be0d6d463b20d45586370" dependencies = [ "actix-utils", "actix-web", - "derive_more", + "derive_more 0.99.18", "futures-util", "log", "once_cell", @@ -75,7 +75,7 @@ dependencies = [ "brotli", "bytes", "bytestring", - "derive_more", + "derive_more 0.99.18", "encoding_rs", "flate2", "futures-core", @@ -105,7 +105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -213,7 +213,7 @@ dependencies = [ "bytestring", "cfg-if 1.0.0", "cookie", - "derive_more", + "derive_more 0.99.18", "encoding_rs", "futures-core", "futures-util", @@ -244,7 +244,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -255,7 +255,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -269,11 +269,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli 0.31.0", + "gimli 0.31.1", ] [[package]] @@ -347,11 +347,588 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", +] + +[[package]] +name = "alloy-chains" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4932d790c723181807738cf1ac68198ab581cd699545b155601332541ee47bd" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum 0.26.3", +] + +[[package]] +name = "alloy-consensus" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more 1.0.0", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-core" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cce174ca699ddee3bfb2ec1fbd99ad7efd05eca20c5c888d8320db41f7e8f04" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5647fce5a168f9630f935bf7821c4207b1755184edaeba783cb4e11d35058484" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more 1.0.0", + "once_cell", + "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b5671117c38b1c2306891f97ad3828d85487087f54ebe2c7591a055ea5bcea7" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71738eb20c42c5fb149571e76536a0f309d142f3957c28791662b96baf77a3d" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if 1.0.0", + "const-hex", + "derive_more 1.0.0", + "foldhash", + "hashbrown 0.15.0", + "hex-literal", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand", + "ruint", + "rustc-hash 2.0.0", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru 0.12.5", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-pubsub" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.6", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "derive_more 1.0.0", + "strum 0.26.3", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "derive_more 1.0.0", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0900b83f4ee1f45c640ceee596afbc118051921b9438fdb5a3175c1a7e05f8b" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.82", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41b1e78dde06b5e12e6702fa8c1d30621bf07728ba75b801fb801c9c6a0ba10" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.82", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91dc311a561a306664393407b88d3e53ae58581624128afd8a15faa5de3627dc" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.82", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d1fbee9e698f3ba176b6e7a145f4aefe6d2b746b611e8bb246fe11a0e9f6c4" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "086f41bc6ebcd8cb15f38ba20e47be38dd03692149681ce8061c35d960dbf850" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +dependencies = [ + "alloy-json-rpc", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.8", + "serde_json", + "tower 0.5.1", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-ipc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90cf9cde7f2fce617da52768ee28f522264b282d148384a4ca0ea85af04fa3a" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http 1.1.0", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + [[package]] name = "amq-protocol" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" +checksum = "e3a41c091e49edfcc098b4f90d4d7706a8cf9158034e84ebfee7ff346092f67c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -363,9 +940,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" +checksum = "3ed7a4a662472f88823ed2fc81babb0b00562f2c54284e3e7bffc02b6df649bf" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -374,9 +951,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" +checksum = "bd6484fdc918c1b6e2ae8eda2914d19a5873e1975f93ad8d33d6a24d1d98df05" dependencies = [ "cookie-factory", "nom", @@ -386,9 +963,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.2.1" +version = "7.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" +checksum = "7f7f2da69e0e1182765bf33407cd8a843f20791b5af2b57a2645818c4776c56c" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -461,9 +1038,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" [[package]] name = "arbitrary" @@ -480,6 +1057,130 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + [[package]] name = "arrayref" version = "0.3.9" @@ -492,6 +1193,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "asn1-rs" version = "0.6.2" @@ -516,7 +1223,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "synstructure", ] @@ -528,7 +1235,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -579,9 +1286,9 @@ dependencies = [ [[package]] name = "async-global-executor-trait" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75" +checksum = "80f19936c1a84fb48ceb8899b642d2a72572587d1021cc561bfb24de9f33ee89" dependencies = [ "async-global-executor", "async-trait", @@ -661,9 +1368,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -672,13 +1379,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -689,13 +1396,24 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", ] [[package]] @@ -720,11 +1438,22 @@ dependencies = [ "wildmatch", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "awc" @@ -742,7 +1471,7 @@ dependencies = [ "bytes", "cfg-if 1.0.0", "cookie", - "derive_more", + "derive_more 0.99.18", "futures-core", "futures-util", "h2", @@ -797,8 +1526,8 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -807,8 +1536,8 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", - "tower", + "sync_wrapper 0.1.2", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -823,7 +1552,7 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -836,15 +1565,21 @@ version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ - "addr2line 0.24.1", + "addr2line 0.24.2", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.36.4", + "object 0.36.5", "rustc-demangle", "windows-targets 0.52.6", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.12.3" @@ -875,6 +1610,12 @@ 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" @@ -900,11 +1641,26 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.77", + "syn 2.0.82", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", ] +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" @@ -954,7 +1710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" dependencies = [ "arrayref", - "arrayvec", + "arrayvec 0.5.2", "cc", "cfg-if 0.1.10", "constant_time_eq", @@ -1069,7 +1825,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "syn_derive", ] @@ -1128,6 +1884,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + [[package]] name = "bytecheck" version = "0.6.12" @@ -1158,9 +1920,12 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +dependencies = [ + "serde", +] [[package]] name = "bytesize" @@ -1191,6 +1956,21 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + [[package]] name = "cbc" version = "0.1.2" @@ -1202,9 +1982,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.19" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -1276,9 +2056,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1286,9 +2066,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -1298,14 +2078,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1331,7 +2111,7 @@ dependencies = [ "lazy_static", "openssl", "percent-encoding", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "tokio", @@ -1386,6 +2166,19 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "const-hex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "hex", + "proptest", + "serde", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -1650,6 +2443,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1694,7 +2499,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1718,7 +2523,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1729,7 +2534,21 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.82", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api 0.4.12", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] @@ -1814,7 +2633,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1827,6 +2646,17 @@ dependencies = [ "serde", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive-where" version = "1.2.7" @@ -1835,7 +2665,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1846,7 +2676,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1859,7 +2689,28 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.77", + "syn 2.0.82", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", + "unicode-xid", ] [[package]] @@ -1896,6 +2747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -1928,7 +2780,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -1949,12 +2801,24 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + [[package]] name = "dotenv" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dynasm" version = "1.2.3" @@ -2014,6 +2878,20 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -2042,6 +2920,25 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -2074,7 +2971,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -2095,7 +2992,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -2164,13 +3061,23 @@ dependencies = [ [[package]] name = "executor-trait" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a1052dd43212a7777ec6a69b117da52f5e52f07aec47d00c1a2b33b85d06b08" +checksum = "13c39dff9342e4e0e16ce96be751eb21a94e94a87bb2f6e63ad1961c2ce109bf" dependencies = [ "async-trait", ] +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fallible-iterator" version = "0.3.0" @@ -2192,6 +3099,27 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "fiat-crypto" version = "0.2.9" @@ -2223,6 +3151,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + [[package]] name = "flagset" version = "0.4.6" @@ -2231,9 +3171,9 @@ checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -2241,9 +3181,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -2256,6 +3196,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2288,9 +3234,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2303,9 +3249,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2313,15 +3259,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2330,9 +3276,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -2364,32 +3310,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2403,6 +3349,12 @@ dependencies = [ "slab", ] +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + [[package]] name = "fxhash" version = "0.2.1" @@ -2442,6 +3394,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2462,15 +3415,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 2.5.0", + "indexmap 2.6.0", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2478,6 +3431,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" version = "0.3.26" @@ -2490,7 +3454,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.5.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2531,7 +3495,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ "allocator-api2", + "equivalent", + "foldhash", + "serde", ] [[package]] @@ -2567,6 +3542,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + [[package]] name = "hmac" version = "0.12.1" @@ -2618,11 +3599,34 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2632,9 +3636,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -2642,7 +3646,7 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -2654,29 +3658,83 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-timeout" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.31", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.31", + "native-tls", + "tokio", + "tokio-native-tls", ] [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper", + "http-body-util", + "hyper 1.5.0", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.5.0", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", ] [[package]] @@ -2732,11 +3790,37 @@ dependencies = [ "version_check", ] +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + [[package]] name = "impl-more" -version = "0.1.6" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexer" @@ -2781,12 +3865,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -2822,6 +3906,21 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "interprocess" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -2835,9 +3934,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -2863,6 +3962,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -2880,9 +3988,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2907,6 +4015,19 @@ dependencies = [ "simple_asn1", ] +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + [[package]] name = "keccak" version = "0.1.5" @@ -2916,6 +4037,16 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -2967,9 +4098,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -3090,18 +4221,18 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] name = "lz4-sys" -version = "1.11.0" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb44a01837a858d47e5a630d2ccf304c8efcc4b83b8f9f75b7a9ee4fcc6e57d" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -3159,7 +4290,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3331,7 +4462,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "actix", - "derive_more", + "derive_more 0.99.18", "futures", "near-async-derive", "near-o11y", @@ -3352,7 +4483,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3360,7 +4491,7 @@ name = "near-cache" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "lru 0.12.4", + "lru 0.12.5", ] [[package]] @@ -3378,7 +4509,7 @@ dependencies = [ "enum-map", "itertools 0.10.5", "itoa", - "lru 0.12.4", + "lru 0.12.5", "near-async", "near-cache", "near-chain-configs", @@ -3402,7 +4533,7 @@ dependencies = [ "rand", "rand_chacha", "rayon", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "time", @@ -3418,7 +4549,7 @@ dependencies = [ "anyhow", "bytesize", "chrono", - "derive_more", + "derive_more 0.99.18", "near-config-utils", "near-crypto", "near-o11y", @@ -3456,10 +4587,10 @@ dependencies = [ "actix", "borsh 1.5.1", "chrono", - "derive_more", + "derive_more 0.99.18", "futures", "itertools 0.10.5", - "lru 0.12.4", + "lru 0.12.5", "near-async", "near-chain", "near-chain-configs", @@ -3476,7 +4607,7 @@ dependencies = [ "once_cell", "rand", "reed-solomon-erasure", - "strum", + "strum 0.24.1", "time", "tracing", ] @@ -3503,10 +4634,10 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "derive_more", + "derive_more 0.99.18", "futures", "itertools 0.10.5", - "lru 0.12.4", + "lru 0.12.5", "near-async", "near-cache", "near-chain", @@ -3534,11 +4665,11 @@ dependencies = [ "rayon", "reed-solomon-erasure", "regex", - "reqwest", + "reqwest 0.11.27", "rust-s3", "serde", "serde_json", - "strum", + "strum 0.24.1", "sysinfo", "tempfile", "thiserror", @@ -3563,7 +4694,7 @@ dependencies = [ "near-time", "serde", "serde_json", - "strum", + "strum 0.24.1", "thiserror", "time", "tracing", @@ -3590,14 +4721,14 @@ dependencies = [ "borsh 1.5.1", "bs58", "curve25519-dalek", - "derive_more", + "derive_more 0.99.18", "ed25519-dalek", "hex", "near-account-id", "near-config-utils", "near-stdx", "once_cell", - "primitive-types", + "primitive-types 0.10.1", "rand", "secp256k1", "serde", @@ -3642,7 +4773,7 @@ dependencies = [ "near-store", "num-rational", "once_cell", - "primitive-types", + "primitive-types 0.10.1", "rand", "rand_hc", "serde_json", @@ -3705,7 +4836,7 @@ dependencies = [ "actix-cors", "actix-web", "bs58", - "derive_more", + "derive_more 0.99.18", "easy-ext", "futures", "hex", @@ -3784,13 +4915,13 @@ dependencies = [ "bytesize", "chrono", "crossbeam-channel", - "derive_more", + "derive_more 0.99.18", "enum-map", "futures", "futures-util", "im", "itertools 0.10.5", - "lru 0.12.4", + "lru 0.12.5", "near-async", "near-chain-configs", "near-crypto", @@ -3804,7 +4935,7 @@ dependencies = [ "opentelemetry", "parking_lot 0.12.3", "pin-project", - "protobuf 3.5.1", + "protobuf 3.7.1", "protobuf-codegen", "rand", "rayon", @@ -3812,7 +4943,7 @@ dependencies = [ "serde", "sha2", "smart-default", - "strum", + "strum 0.24.1", "stun", "thiserror", "time", @@ -3861,7 +4992,7 @@ dependencies = [ "serde", "serde_repr", "serde_yaml", - "strum", + "strum 0.24.1", "thiserror", ] @@ -3887,7 +5018,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -3915,7 +5046,7 @@ dependencies = [ "bytesize", "cfg-if 1.0.0", "chrono", - "derive_more", + "derive_more 0.99.18", "easy-ext", "enum-map", "hex", @@ -3931,7 +5062,7 @@ dependencies = [ "num-rational", "once_cell", "ordered-float", - "primitive-types", + "primitive-types 0.10.1", "rand", "rand_chacha", "reed-solomon-erasure", @@ -3940,7 +5071,7 @@ dependencies = [ "serde_with", "sha3", "smart-default", - "strum", + "strum 0.24.1", "thiserror", "tracing", "zstd", @@ -3955,7 +5086,7 @@ dependencies = [ "base64 0.21.7", "borsh 1.5.1", "bs58", - "derive_more", + "derive_more 0.99.18", "enum-map", "near-account-id", "near-structs-checker-lib", @@ -3976,7 +5107,7 @@ dependencies = [ "actix-http", "actix-web", "awc", - "derive_more", + "derive_more 0.99.18", "futures", "hex", "near-account-id", @@ -3992,7 +5123,7 @@ dependencies = [ "paperclip", "serde", "serde_json", - "strum", + "strum 0.24.1", "thiserror", "tokio", ] @@ -4004,7 +5135,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "quote", "serde", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -4014,7 +5145,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "near-rpc-error-core", "serde", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -4034,12 +5165,12 @@ dependencies = [ "bytesize", "crossbeam", "derive-where", - "derive_more", + "derive_more 0.99.18", "enum-map", "hex", "itertools 0.10.5", "itoa", - "lru 0.12.4", + "lru 0.12.5", "near-chain-configs", "near-crypto", "near-fmt", @@ -4059,7 +5190,7 @@ dependencies = [ "serde", "serde_json", "smallvec", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tokio", @@ -4149,7 +5280,7 @@ dependencies = [ "near-vm-vm", "rayon", "smallvec", - "strum", + "strum 0.24.1", "tracing", ] @@ -4188,7 +5319,7 @@ dependencies = [ "ed25519-dalek", "enum-map", "finite-wasm", - "lru 0.12.4", + "lru 0.12.5", "memoffset 0.8.0", "near-crypto", "near-o11y", @@ -4213,7 +5344,7 @@ dependencies = [ "serde_repr", "sha2", "sha3", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tracing", @@ -4292,8 +5423,8 @@ dependencies = [ "easy-ext", "futures", "hex", - "hyper", - "hyper-tls", + "hyper 0.14.31", + "hyper-tls 0.5.0", "indicatif", "near-async", "near-chain", @@ -4324,14 +5455,14 @@ dependencies = [ "rand", "rayon", "regex", - "reqwest", + "reqwest 0.11.27", "rlimit", "rust-s3", "serde", "serde_ignored", "serde_json", "smart-default", - "strum", + "strum 0.24.1", "tempfile", "thiserror", "tokio", @@ -4485,6 +5616,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -4497,6 +5629,26 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "number_prefix" version = "0.3.0" @@ -4511,15 +5663,15 @@ checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "crc32fast", "hashbrown 0.14.5", - "indexmap 2.5.0", + "indexmap 2.6.0", "memchr", ] [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -4535,15 +5687,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if 1.0.0", @@ -4562,7 +5714,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -4582,9 +5734,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -4669,9 +5821,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.2.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" +checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" dependencies = [ "borsh 1.5.1", "num-traits", @@ -4784,9 +5936,9 @@ dependencies = [ [[package]] name = "paperclip-macros" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0385be5ae9c886c46688290534363a229f2531aa2c5c2bfc3b3ddafed5143aaa" +checksum = "ce6e25ce2c5362c8d48dc89e0f9ca076d507f7c1eabd04f0d593cdf5addff90c" dependencies = [ "heck 0.4.1", "http 0.2.12", @@ -4795,8 +5947,34 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", + "syn 1.0.109", +] + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec 0.7.6", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4885,7 +6063,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.4", + "redox_syscall 0.5.7", "smallvec", "windows-targets 0.52.6", ] @@ -4938,24 +6116,45 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", +] + [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -5023,11 +6222,21 @@ dependencies = [ "spki", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" @@ -5083,12 +6292,12 @@ checksum = "aa06bd51638b6e76ac9ba9b6afb4164fa647bd2916d722f2623fbb6d1ed8bdba" [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" dependencies = [ "proc-macro2", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -5097,7 +6306,18 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ - "fixed-hash", + "fixed-hash 0.7.0", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash 0.8.0", + "impl-codec", "uint", ] @@ -5143,11 +6363,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -5167,6 +6409,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.6.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.12.6" @@ -5187,7 +6449,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -5198,9 +6460,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "protobuf" -version = "3.5.1" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bcc343da15609eaecd65f8aa76df8dc4209d325131d8219358c0aaaebab0bf6" +checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" dependencies = [ "once_cell", "protobuf-support", @@ -5209,13 +6471,13 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.5.1" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d0cde5642ea4df842b13eb9f59ea6fafa26dcb43e3e1ee49120e9757556189" +checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" dependencies = [ "anyhow", "once_cell", - "protobuf 3.5.1", + "protobuf 3.7.1", "protobuf-parse", "regex", "tempfile", @@ -5224,14 +6486,14 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.5.1" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b0e9b447d099ae2c4993c0cbb03c7a9d6c937b17f2d56cfc0b1550e6fcfdb76" +checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" dependencies = [ "anyhow", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", - "protobuf 3.5.1", + "protobuf 3.7.1", "protobuf-support", "tempfile", "thiserror", @@ -5240,9 +6502,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.5.1" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0766e3675a627c327e4b3964582594b0e8741305d628a98a5de75a1d15f99b9" +checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" dependencies = [ "thiserror", ] @@ -5287,6 +6549,12 @@ dependencies = [ "parity-wasm 0.41.0", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" version = "1.0.37" @@ -5343,6 +6611,15 @@ dependencies = [ "rand_core", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + [[package]] name = "rand_xoshiro" version = "0.6.0" @@ -5392,6 +6669,12 @@ dependencies = [ "futures-io", ] +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + [[package]] name = "redox_syscall" version = "0.1.57" @@ -5409,9 +6692,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -5448,21 +6731,21 @@ checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", - "rustc-hash", + "rustc-hash 1.1.0", "slice-group-by", "smallvec", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -5476,13 +6759,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -5499,9 +6782,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "region" @@ -5537,9 +6820,9 @@ dependencies = [ "futures-util", "h2", "http 0.2.12", - "http-body", - "hyper", - "hyper-tls", + "http-body 0.4.6", + "hyper 0.14.31", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -5552,7 +6835,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", @@ -5566,6 +6849,55 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.16.20" @@ -5643,6 +6975,16 @@ dependencies = [ "libc", ] +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -5653,6 +6995,36 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.6", + "num-traits", + "parity-scale-codec", + "primitive-types 0.12.2", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rust-ini" version = "0.18.0" @@ -5683,7 +7055,7 @@ dependencies = [ "md5", "minidom", "percent-encoding", - "reqwest", + "reqwest 0.11.27", "serde", "serde-xml-rs", "serde_derive", @@ -5707,6 +7079,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -5722,6 +7100,15 @@ dependencies = [ "semver 0.9.0", ] +[[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.1" @@ -5769,9 +7156,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "once_cell", "ring 0.17.8", @@ -5801,7 +7188,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -5818,19 +7205,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -5845,9 +7231,21 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" + +[[package]] +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] [[package]] name = "rxml" @@ -5883,9 +7281,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -5913,6 +7311,20 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.27.0" @@ -5947,9 +7359,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -5961,7 +7373,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -5976,11 +7397,26 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" -version = "1.0.210" +version = "1.0.211" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" dependencies = [ "serde_derive", ] @@ -6018,13 +7454,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.211" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6038,9 +7474,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -6056,7 +7492,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6073,15 +7509,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -6091,14 +7527,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6107,7 +7543,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -6146,6 +7582,16 @@ dependencies = [ "keccak", ] +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if 1.0.0", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -6175,12 +7621,16 @@ name = "signature" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" @@ -6321,7 +7771,16 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", ] [[package]] @@ -6337,6 +7796,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.82", +] + [[package]] name = "stun" version = "0.4.4" @@ -6375,15 +7847,27 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5e0c2ea8db64b2898b62ea2fbd60204ca95e0b2c6bdf53ff768bbe916fbe4d" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "syn_derive" version = "0.1.8" @@ -6393,7 +7877,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6402,6 +7886,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.13.1" @@ -6410,7 +7903,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6476,14 +7969,14 @@ dependencies = [ "cfg-if 1.0.0", "p12-keystore", "rustls-connector", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", ] [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if 1.0.0", "fastrand 2.1.1", @@ -6494,22 +7987,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6572,6 +8065,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -6589,9 +8091,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -6607,9 +8109,9 @@ dependencies = [ [[package]] name = "tokio-executor-trait" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802ccf58e108fe16561f35348fabe15ff38218968f033d587e399a84937533cc" +checksum = "96a1593beae7759f592e1100c5997fe9e9ebf4b5968062f1fbcd807989cd1b79" dependencies = [ "async-trait", "executor-trait", @@ -6634,7 +8136,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6672,6 +8174,17 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.16" @@ -6681,6 +8194,23 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", ] [[package]] @@ -6713,11 +8243,11 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "toml_datetime", "winnow", ] @@ -6735,15 +8265,15 @@ dependencies = [ "bytes", "h2", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.31", "hyper-timeout", "percent-encoding", "pin-project", "prost", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -6769,6 +8299,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -6813,7 +8357,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -6879,12 +8423,38 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + [[package]] name = "uint" version = "0.9.5" @@ -6897,20 +8467,23 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" @@ -6920,18 +8493,24 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unsafe-libyaml" @@ -6968,6 +8547,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.2" @@ -6976,9 +8561,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "valuable" @@ -7004,6 +8589,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "waker-fn" version = "1.2.0" @@ -7027,9 +8621,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -7038,24 +8632,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -7065,9 +8659,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7075,22 +8669,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-encoder" @@ -7112,9 +8706,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -7329,7 +8923,7 @@ version = "0.115.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "semver 1.0.23", ] @@ -7354,7 +8948,7 @@ dependencies = [ "bumpalo", "cfg-if 1.0.0", "fxprof-processed-profile", - "indexmap 2.5.0", + "indexmap 2.6.0", "libc", "log", "object 0.32.2", @@ -7433,7 +9027,7 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli 0.28.1", - "indexmap 2.5.0", + "indexmap 2.6.0", "log", "object 0.32.2", "serde", @@ -7499,7 +9093,7 @@ dependencies = [ "anyhow", "cc", "cfg-if 1.0.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "libc", "log", "mach", @@ -7539,7 +9133,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -7550,9 +9144,9 @@ checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -7568,6 +9162,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webrtc-util" version = "0.7.0" @@ -7601,11 +9204,17 @@ dependencies = [ "rustix 0.38.37", ] +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + [[package]] name = "wildmatch" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" +checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" [[package]] name = "winapi" @@ -7638,6 +9247,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -7788,9 +9427,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -7805,6 +9444,43 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "workers" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-json-abi", + "dotenv", + "eyre", + "futures", + "hex", + "serde", + "serde_json", + "sha3", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wyz" version = "0.5.1" @@ -7881,7 +9557,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] @@ -7901,7 +9577,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.82", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 388cb0ea..3fa805b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ resolver = "2" members = [ "indexer", "contracts/evm/test/ffi/bls-utils", + "workers", ] [workspace.package] diff --git a/workers/Cargo.lock b/workers/Cargo.lock new file mode 100644 index 00000000..9b3ecd35 --- /dev/null +++ b/workers/Cargo.lock @@ -0,0 +1,3581 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", +] + +[[package]] +name = "alloy-chains" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94c225801d42099570d0674701dddd4142f0ef715282aeb5985042e2ec962df7" +dependencies = [ + "num_enum", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", +] + +[[package]] +name = "alloy-eips" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "derive_more", + "once_cell", + "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cc0e59c803dd44d14fc0cfa9fea1f74cfa8fd9fb60ca303ced390c58c28d4e" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a289ffd7448036f2f436b377f981c79ce0b2090877bad938d43387dc09931877" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "foldhash", + "hashbrown 0.15.0", + "hex-literal", + "indexmap", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-pubsub", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "futures-utils-wasm", + "lru", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "alloy-pubsub" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-pubsub", + "alloy-transport", + "alloy-transport-http", + "alloy-transport-ipc", + "alloy-transport-ws", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-rpc-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "derive_more", + "strum", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "derive_more", + "itertools 0.13.0", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-serde" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.79", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.79", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd3548d5262867c2c4be6223fe4f2583e21ade0ca1c307fd23bc7f28fca479e" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" +dependencies = [ + "alloy-json-rpc", + "base64", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-http" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-transport-ipc" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b90cf9cde7f2fce617da52768ee28f522264b282d148384a4ca0ea85af04fa3a" +dependencies = [ + "alloy-json-rpc", + "alloy-pubsub", + "alloy-transport", + "bytes", + "futures", + "interprocess", + "pin-project", + "serde_json", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" +dependencies = [ + "alloy-pubsub", + "alloy-transport", + "futures", + "http", + "rustls", + "serde_json", + "tokio", + "tokio-tungstenite", + "tracing", + "ws_stream_wasm", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +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 = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cc" +version = "1.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-hex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "doctest-file" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", + "serde", +] + +[[package]] +name = "interprocess" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" +dependencies = [ + "doctest-file", + "futures-core", + "libc", + "recvmsg", + "tokio", + "widestring", + "windows-sys 0.52.0", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.159" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "lru" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "openssl" +version = "0.10.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.5", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "recvmsg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.23", +] + +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +dependencies = [ + "core-foundation-sys", + "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.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "serde_json" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.79", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.79", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" + +[[package]] +name = "web-sys" +version = "0.3.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "workers" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-json-abi", + "dotenv", + "eyre", + "futures", + "hex", + "serde", + "serde_json", + "sha3", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] diff --git a/workers/Cargo.toml b/workers/Cargo.toml new file mode 100644 index 00000000..913060ad --- /dev/null +++ b/workers/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "workers" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "dvn" +path = "src/bin/dvn.rs" + +[dependencies] +alloy = { version = "0.4.2", features = ["full"] } +alloy-json-abi = "0.8.6" +dotenv = "0.15.0" +eyre = "0.6.12" +futures = "0.3.31" +serde = { version = "1.0.210", features = ["derive"] } +serde_json = "1.0.128" +sha3 = "0.10.8" +tokio = { version = "1.40.0", features = ["full"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } + +[dev-dependencies] +hex = "0.4.3" diff --git a/workers/README.md b/workers/README.md new file mode 100644 index 00000000..d9694042 --- /dev/null +++ b/workers/README.md @@ -0,0 +1,12 @@ +# Workers for offchain workflows + +## DVN + +Nuff's DVN for LayerZero integration lives under `bin/dvn.rs`. + +To run it, do `$ RUST_LOG=debug cargo run --bin dvn` to see everything, or `$ RUST_LOG=info cargo run --bin dvn` for something less. + +## Configuration + +To run different binaries, some configuration is needed. It usually loads some environment variables from an `.env` file. + diff --git a/workers/abi/L0V2Endpoint.json b/workers/abi/L0V2Endpoint.json new file mode 100644 index 00000000..33f4ede9 --- /dev/null +++ b/workers/abi/L0V2Endpoint.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_AlreadyRegistered","type":"error"},{"inputs":[],"name":"LZ_ComposeExists","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_ComposeNotFound","type":"error"},{"inputs":[],"name":"LZ_DefaultReceiveLibUnavailable","type":"error"},{"inputs":[],"name":"LZ_DefaultSendLibUnavailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"requiredNative","type":"uint256"},{"internalType":"uint256","name":"suppliedNative","type":"uint256"},{"internalType":"uint256","name":"requiredLzToken","type":"uint256"},{"internalType":"uint256","name":"suppliedLzToken","type":"uint256"}],"name":"LZ_InsufficientFee","type":"error"},{"inputs":[],"name":"LZ_InvalidExpiry","type":"error"},{"inputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"LZ_InvalidNonce","type":"error"},{"inputs":[],"name":"LZ_InvalidPayloadHash","type":"error"},{"inputs":[],"name":"LZ_InvalidReceiveLibrary","type":"error"},{"inputs":[],"name":"LZ_LzTokenUnavailable","type":"error"},{"inputs":[],"name":"LZ_OnlyNonDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlyReceiveLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredOrDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlySendLib","type":"error"},{"inputs":[],"name":"LZ_PathNotInitializable","type":"error"},{"inputs":[],"name":"LZ_PathNotVerifiable","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_PayloadHashNotFound","type":"error"},{"inputs":[],"name":"LZ_SameValue","type":"error"},{"inputs":[],"name":"LZ_SendReentrancy","type":"error"},{"inputs":[],"name":"LZ_Unauthorized","type":"error"},{"inputs":[],"name":"LZ_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_UnsupportedInterface","type":"error"},{"inputs":[],"name":"LZ_ZeroLzTokenFee","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"}],"name":"ComposeDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"ComposeSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"DefaultReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultSendLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"}],"name":"DelegateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"InboundNonceSkipped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"LibraryRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzComposeAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzReceiveAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"LzTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketBurnt","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"PacketDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketNilified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"encodedPayload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"address","name":"sendLibrary","type":"address"}],"name":"PacketSent","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"ReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"timeout","type":"uint256"}],"name":"ReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"SendLibrarySet","type":"event"},{"inputs":[],"name":"EMPTY_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NIL_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockedLibrary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"clear","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint16","name":"index","type":"uint16"}],"name":"composeQueue","outputs":[{"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstEid","type":"uint32"}],"name":"defaultSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"delegate","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eid","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"config","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"}],"name":"getReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredLibraries","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSendContext","outputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"getSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"}],"name":"inboundNonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"inboundNonce","type":"uint64"}],"name":"inboundPayloadHash","outputs":[{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"initializable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"isDefaultSendLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lib","type":"address"}],"name":"isRegisteredLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSendingMessage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"address","name":"_actualReceiveLib","type":"address"}],"name":"isValidReceiveLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"lazyInboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzCompose","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzComposeAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzReceiveAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lzToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"bytes32","name":"_receiver","type":"bytes32"}],"name":"nextGuid","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"nilify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"}],"name":"outboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_sender","type":"address"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"receiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lib","type":"address"}],"name":"registerLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"sendCompose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setDefaultReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setDefaultReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setDefaultSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"}],"name":"setLzToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"skip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"}]} diff --git a/workers/abi/SendLibrary.json b/workers/abi/SendLibrary.json new file mode 100644 index 00000000..ed8a8f21 --- /dev/null +++ b/workers/abi/SendLibrary.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"},{"internalType":"uint256","name":"_treasuryGasLimit","type":"uint256"},{"internalType":"uint256","name":"_treasuryGasForFeeCap","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DVN_InvalidDVNIdx","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"DVN_InvalidDVNOptions","type":"error"},{"inputs":[],"name":"LZ_MessageLib_CannotWithdrawAltToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"LZ_MessageLib_InvalidAmount","type":"error"},{"inputs":[],"name":"LZ_MessageLib_InvalidExecutor","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"LZ_MessageLib_InvalidMessageSize","type":"error"},{"inputs":[],"name":"LZ_MessageLib_NotTreasury","type":"error"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_MessageLib_TransferFailed","type":"error"},{"inputs":[],"name":"LZ_MessageLib_ZeroMessageSize","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType1Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType2Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[{"internalType":"uint8","name":"workerId","type":"uint8"}],"name":"LZ_ULN_InvalidWorkerId","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"LZ_ULN_InvalidWorkerOptions","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[{"internalType":"uint16","name":"optionType","type":"uint16"}],"name":"LZ_ULN_UnsupportedOptionType","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"optionalDVNs","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"fees","type":"uint256[]"}],"name":"DVNFeePaid","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultExecutorConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultExecutorConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"indexed":false,"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"name":"ExecutorConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ExecutorFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lzToken","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LzTokenFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"worker","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NativeFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTreasuryNativeFeeCap","type":"uint256"}],"name":"TreasuryNativeFeeCapSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"TreasurySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"executorConfigs","outputs":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"worker","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getExecutorConfig","outputs":[{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"send","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultExecutorConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultExecutorConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTreasuryNativeFeeCap","type":"uint256"}],"name":"setTreasuryNativeFeeCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawLzTokenFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]} diff --git a/workers/src/abi.rs b/workers/src/abi.rs new file mode 100644 index 00000000..bed75af1 --- /dev/null +++ b/workers/src/abi.rs @@ -0,0 +1,20 @@ +//! Types create from the JSON ABI files. For example, to be able to decode the logs' data, or call contracts' methods. + +use alloy::sol; +use serde::{Deserialize, Serialize}; + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + #[derive(Debug, Serialize, Deserialize)] + SendLibraryAbi, + "abi/SendLibrary.json" +); + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + #[derive(Debug, Serialize, Deserialize)] + L0V2EndpointAbi, + "abi/L0V2Endpoint.json" +); diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs new file mode 100644 index 00000000..27b07931 --- /dev/null +++ b/workers/src/bin/dvn.rs @@ -0,0 +1,78 @@ +//! Main workflow for subscribing and listening for specific contract events using a `WebSocket` subscription. + +use eyre::Result; +use futures::stream::StreamExt; +use tracing::{debug, error, info}; +use tracing_subscriber::EnvFilter; +use workers::{ + abi::{L0V2EndpointAbi, SendLibraryAbi}, + config, utils, +}; + +#[tokio::main] +async fn main() -> Result<()> { + // Initialize tracing + tracing_subscriber::fmt() + .with_target(false) + .with_env_filter(EnvFilter::from_default_env()) + .init(); + + // Load the DVN workflow configuration. + let config = config::DVNConfig::load_from_env()?; + + // Create the WS subscriptions for listening to the events. + let (_provider, mut endpoint_stream, mut sendlib_stream) = utils::build_subscriptions(&config).await?; + + // Create an HTTP provider to call the contract. + let http_provider = utils::get_http_provider(&config)?; + + // Get the relevant contract ABI. + let sendlib_abi = utils::get_sendlib_abi()?; + + // Create a contract instance. + let sendlib_contract = utils::create_contract_instance(&config, http_provider, sendlib_abi)?; + + info!("Listening to chain events..."); + + loop { + tokio::select! { + Some(log) = endpoint_stream.next() => { + match log.log_decode::() { + Ok(_inner_log) => { + info!("PacketSent event found and decoded."); + }, + Err(e) => { + error!("Failed to decode PacketSent event: {:?}", e); + } + } + } + Some(log) = sendlib_stream.next() => { + match log.log_decode::() { + Ok(inner_log) => { + info!("DVNFeePaid event found and decoded."); + let required_dvns = inner_log.inner.requiredDVNs.clone(); + + if required_dvns.contains(&config.dvn_addr()?) { + debug!("Matched DVN found in required DVNs. Performing idempotency check..."); + + let required_confirmations = utils::get_confirmations(&config, &sendlib_contract).await?; + + //let already_verified = utils::get_verified(&config, &sendlib_contract, required_confirmations).await?; + // + //if already_verified { + // debug!("Packet has been verified. Listening for more packets..."); + //} else { + // debug!("Packet has not been verified. Calling verification."); + //} + // TODO: idempotency check again + + } + }, + Err(e) => { + error!("Failed to decode DVNFeePaid event: {:?}", e); + } + } + }, + } + } +} diff --git a/workers/src/config.rs b/workers/src/config.rs new file mode 100644 index 00000000..40ecdc90 --- /dev/null +++ b/workers/src/config.rs @@ -0,0 +1,94 @@ +//! Configuration for the DVN offchain workflow. + +use alloy::{ + primitives::{Address, U256}, + transports::http::reqwest::Url, +}; +use eyre::Result; + +#[derive(Default)] +pub struct DVNConfig { + /// The Websocket RPC URL to connect to the Ethereum network. + ws_rpc_url: String, + /// The HTTP RPC URL to connect to the Ethereum network. + http_rpc_url: String, + /// The LayerZero endpoint address. + l0_endpoint_addr: String, + /// The SendLib Ultra Light Node 302 address. + sendlib_uln302_addr: String, + /// The SendLib Ultra Light Node 301 address. + sendlib_uln301_addr: String, + /// The Ethereum network ID. + network_id: u64, + /// Own DVN address. Used to check when the DVN is assigned to a task. + dvn_addr: String, +} + +impl DVNConfig { + /// Get the chain's RPC URL. + pub fn ws_rpc(&self) -> &str { + &self.ws_rpc_url + } + + /// Get the chain's RPC URL. + pub fn http_rpc(&self) -> Result { + Ok(self.http_rpc_url.parse::()?) + } + + /// Get the LayerZero endpoint address. + pub fn l0_addr(&self) -> Result
{ + Ok(self.l0_endpoint_addr.parse::
()?) + } + + /// Get the SendLib ULN302 address. + pub fn sendlib_uln302_addr(&self) -> Result
{ + Ok(self.sendlib_uln302_addr.parse::
()?) + } + + /// Get the SendLib ULN301 address. + pub fn sendlib_uln301_addr(&self) -> Result
{ + Ok(self.sendlib_uln301_addr.parse::
()?) + } + + /// Get the EID as U256. + pub fn eid(&self) -> U256 { + U256::from(self.network_id) + } + + /// Get the DVN address. + pub fn dvn_addr(&self) -> Result
{ + Ok(self.dvn_addr.parse::
()?) + } + + /// Load environment variables. + pub fn load_from_env() -> Result { + dotenv::dotenv()?; + + Ok(Self { + ws_rpc_url: std::env::var("WS_RPC_URL").unwrap_or_else(|_| Default::default()), + http_rpc_url: std::env::var("HTTP_RPC_URL").unwrap_or_else(|_| Default::default()), + l0_endpoint_addr: std::env::var("L0_ENDPOINT_ADDR").unwrap_or_else(|_| Default::default()), + sendlib_uln302_addr: std::env::var("SENDLIB_ULN302_ADDR").unwrap_or_else(|_| Default::default()), + sendlib_uln301_addr: std::env::var("SENDLIB_ULN301_ADDR").unwrap_or_else(|_| Default::default()), + network_id: std::env::var("NETWORK_EID") + .unwrap_or_else(|_| "0".to_string()) + .parse::()?, + dvn_addr: std::env::var("DVN_ADDR").unwrap_or_else(|_| Default::default()), + }) + } +} + +/// Useful events for the DVN workflow. +pub enum DVNEvent { + PacketSent, + FeePaid, +} + +impl AsRef for DVNEvent { + fn as_ref(&self) -> &str { + match self { + DVNEvent::PacketSent => "PacketSent(bytes,bytes,address)", + DVNEvent::FeePaid => "DVNFeePaid(address[],address[],uint256[])", + } + } +} diff --git a/workers/src/lib.rs b/workers/src/lib.rs new file mode 100644 index 00000000..6805bab0 --- /dev/null +++ b/workers/src/lib.rs @@ -0,0 +1,5 @@ +//! Tools to build offchain workers for the LayerZero protocol. + +pub mod abi; +pub mod config; +pub mod utils; diff --git a/workers/src/utils.rs b/workers/src/utils.rs new file mode 100644 index 00000000..b6dfcae0 --- /dev/null +++ b/workers/src/utils.rs @@ -0,0 +1,235 @@ +//! Utilities for interacting with the DVN. + +use crate::config::{DVNConfig, DVNEvent}; +use alloy::{ + contract::{ContractInstance, Interface}, + dyn_abi::DynSolValue, + eips::BlockNumberOrTag, + network::Ethereum, + primitives::U256, + providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, + pubsub::{PubSubFrontend, SubscriptionStream}, + rpc::types::{Filter, Log}, + transports::http::{Client, Http}, +}; +use alloy_json_abi::JsonAbi; +use eyre::Result; +use sha3::{Digest, Keccak256}; +use tracing::debug; + +pub type ContractInst = ContractInstance, RootProvider>, Ethereum>; +pub type HttpProvider = RootProvider>; + +/// Create the subscriptions for the DVN workflow. +pub async fn build_subscriptions( + config: &DVNConfig, +) -> Result<( + RootProvider, + SubscriptionStream, + SubscriptionStream, +)> { + // Create the provider + let rpc_url = config.ws_rpc(); + let ws = WsConnect::new(rpc_url); + let provider = ProviderBuilder::new().on_ws(ws).await?; + + // layerzero endpoint filter + let packet_filter = Filter::new() + .address(config.l0_addr()?) + .event(DVNEvent::PacketSent.as_ref()) + .from_block(BlockNumberOrTag::Latest); + + // messagelib endpoint filter + let fee_paid_filter = Filter::new() + .address(config.sendlib_uln302_addr()?) + .event(DVNEvent::FeePaid.as_ref()) + .from_block(BlockNumberOrTag::Latest); + + // Subscribe to logs + let endpoint_sub = provider.subscribe_logs(&packet_filter).await?; + let sendlib_sub = provider.subscribe_logs(&fee_paid_filter).await?; + + // Create some streams from the subscriptions + let endpoint_stream = endpoint_sub.into_stream(); + let sendlib_stream = sendlib_sub.into_stream(); + + Ok((provider, endpoint_stream, sendlib_stream)) +} + +/// Load the MessageLib ABI. +pub fn get_sendlib_abi() -> Result { + // Get the SendLib ABI + let artifact = std::fs::read("./abi/SendLibrary.json")?; + let json: serde_json::Value = serde_json::from_slice(&artifact)?; + // SAFETY: Assume `unwrap` is safe since the key is always present + let abi_value = json.get("abi").unwrap(); + let abi = serde_json::from_str(&abi_value.to_string())?; + Ok(abi) +} + +/// Construct an HTTP provider given the config. +pub fn get_http_provider(config: &DVNConfig) -> Result { + let http_provider = ProviderBuilder::new().on_http(config.http_rpc()?); + Ok(http_provider) +} + +/// Create a contract instance from the ABI to interact with on-chain instance. +pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, abi: JsonAbi) -> Result { + let contract: ContractInstance, _, Ethereum> = ContractInstance::new( + config.sendlib_uln302_addr()?, + http_provider.clone(), + Interface::new(abi), + ); + Ok(contract) +} + +/// Get the number of required confirmations by the ULN. +pub async fn get_confirmations(config: &DVNConfig, contract: &ContractInst) -> Result { + // FIXME: there an error returned by the server: + // Error: server returned an error response: error code 3: execution reverted, data: "0xce2c3751" + // which decodes (https://www.4byte.directory/signatures/?bytes4_signature=0xce2c3751) to: + // LZ_ULN_AtLeastOneDVN() + + debug!("Getting confirmations required by the ULN."); + debug!("Contract address: {:?}", config.sendlib_uln302_addr()?); + debug!("Contract address: {:?}", config.eid()); + + // Call the `getUlnConfig` function on the contract + let uln_config = contract + .function( + "getUlnConfig", + &[ + DynSolValue::Address(config.sendlib_uln302_addr()?), + DynSolValue::Uint(config.eid(), 32), + ], + )? + .call() + .await?; + + let num_confirmations = if let DynSolValue::Tuple(tupled_uint) = uln_config[0].clone() { + if let Some(value) = tupled_uint[0].as_uint() { + value.0 + } else { + U256::from(0) + } + } else { + U256::from(0) + }; + + debug!( + "{:?} confirmations required by MessageLib at: {:?}", + num_confirmations, + contract.address() + ); + + Ok(num_confirmations) +} + +/// Idempotent check to see if there's work to do for the DVN. +pub async fn get_verified(config: &DVNConfig, contract: &ContractInst, required_confirmations: U256) -> Result { + // Call the `verified` function on the contract + let uln302 = contract + .function( + "_verified", + &[ + DynSolValue::Address(config.sendlib_uln301_addr()?), + // HeaderHash + // PayloadHash + DynSolValue::Uint(required_confirmations, 32), + ], + )? + .call() + .await?; + + let uln302_state = if uln302[0].as_bool().unwrap() { + debug!("Packet already verified, DVN workflow can stop."); + true + } else { + debug!("Packet hasn't been verified. Call `verify`."); + false + }; + + // Call the `_verified` function on the contract + let uln301 = contract + .function( + "_verified", + &[ + DynSolValue::Address(config.sendlib_uln301_addr()?), + // HeaderHash + // PayloadHash + DynSolValue::Uint(required_confirmations, 32), + ], + )? + .call() + .await?; + + let uln301_state = if uln301[0].as_bool().unwrap() { + debug!("Packet already verified, DVN workflow can stop."); + true + } else { + debug!("Packet hasn't been verified. Call `verify`."); + false + }; + + Ok(uln302_state && uln301_state) +} + +pub async fn verify( + config: &DVNConfig, + contract: &ContractInst, + packet_header: &[u8], + payload: &[u8], + confirmations: U256, +) -> Result { + // Create the hash of the payload + let payload_hash = keccak256(payload); + + // Call the `verified` function on the contract + let _ = contract + .function( + "verify", + &[ + // PacketHeader + //packet_header, + // PayloadHash + //payload_hash, + // Confirmations + //DynSolValue::Uint(confirmations, 32), + ], + )? + .call() + .await?; + + Ok(false) +} + +/// Helper for hashing some data with `keccak256`. +fn keccak256(data: &[u8]) -> [u8; 32] { + let mut hasher = Keccak256::default(); + hasher.update(data); + let result = hasher.finalize(); + result.into() +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::config; + + #[tokio::test] + async fn test_get_confirmations() -> Result<()> { + // Set up + let config = config::DVNConfig::load_from_env()?; + let http_provider = get_http_provider(&config)?; + let sendlib_abi = get_sendlib_abi()?; + let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; + + // Query contract value + let required_confirmations = get_confirmations(&config, &sendlib_contract).await?; + + // Check the value is what we expect + assert_eq!(required_confirmations, U256::from(20)); + + Ok(()) + } +} From 9fc8be8b9a846b80fb9d29c352ad7e41f73ba244 Mon Sep 17 00:00:00 2001 From: Lozano Date: Wed, 9 Oct 2024 16:18:40 +0200 Subject: [PATCH 60/96] chore: add receive lib abi --- ...ndpoint.json => ArbitrumL0V2Endpoint.json} | 0 workers/abi/ArbitrumReceiveLibUln302.json | 1 + ...ibrary.json => ArbitrumSendLibUln302.json} | 0 workers/src/abi.rs | 12 ++++- workers/src/bin/dvn.rs | 26 ++++++---- workers/src/config.rs | 16 ++++++ workers/src/utils.rs | 50 +++++++++++-------- 7 files changed, 73 insertions(+), 32 deletions(-) rename workers/abi/{L0V2Endpoint.json => ArbitrumL0V2Endpoint.json} (100%) create mode 100644 workers/abi/ArbitrumReceiveLibUln302.json rename workers/abi/{SendLibrary.json => ArbitrumSendLibUln302.json} (100%) diff --git a/workers/abi/L0V2Endpoint.json b/workers/abi/ArbitrumL0V2Endpoint.json similarity index 100% rename from workers/abi/L0V2Endpoint.json rename to workers/abi/ArbitrumL0V2Endpoint.json diff --git a/workers/abi/ArbitrumReceiveLibUln302.json b/workers/abi/ArbitrumReceiveLibUln302.json new file mode 100644 index 00000000..9b9ad405 --- /dev/null +++ b/workers/abi/ArbitrumReceiveLibUln302.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidEid","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketHeader","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketVersion","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_ULN_Verifying","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"dvn","type":"address"},{"indexed":false,"internalType":"bytes","name":"header","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"confirmations","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"proofHash","type":"bytes32"}],"name":"PayloadVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"uint32","name":"_localEid","type":"uint32"}],"name":"assertHeader","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"commitVerification","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"headerHash","type":"bytes32"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"internalType":"address","name":"dvn","type":"address"}],"name":"hashLookup","outputs":[{"internalType":"bool","name":"submitted","type":"bool"},{"internalType":"uint64","name":"confirmations","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"_config","type":"tuple"},{"internalType":"bytes32","name":"_headerHash","type":"bytes32"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"},{"internalType":"uint64","name":"_confirmations","type":"uint64"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"}]} diff --git a/workers/abi/SendLibrary.json b/workers/abi/ArbitrumSendLibUln302.json similarity index 100% rename from workers/abi/SendLibrary.json rename to workers/abi/ArbitrumSendLibUln302.json diff --git a/workers/src/abi.rs b/workers/src/abi.rs index bed75af1..96ca4b75 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -8,7 +8,15 @@ sol!( #[sol(rpc)] #[derive(Debug, Serialize, Deserialize)] SendLibraryAbi, - "abi/SendLibrary.json" + "abi/ArbitrumSendLibUln302.json" +); + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + #[derive(Debug, Serialize, Deserialize)] + ReceiveLibraryAbi, + "abi/ArbitrumReceiveLibUln302.json" ); sol!( @@ -16,5 +24,5 @@ sol!( #[sol(rpc)] #[derive(Debug, Serialize, Deserialize)] L0V2EndpointAbi, - "abi/L0V2Endpoint.json" + "abi/ArbitrumL0V2Endpoint.json" ); diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 27b07931..1de716bf 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -27,10 +27,12 @@ async fn main() -> Result<()> { let http_provider = utils::get_http_provider(&config)?; // Get the relevant contract ABI. - let sendlib_abi = utils::get_sendlib_abi()?; + let sendlib_abi = utils::get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; + let receivelib_abi = utils::get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; // Create a contract instance. - let sendlib_contract = utils::create_contract_instance(&config, http_provider, sendlib_abi)?; + let sendlib_contract = utils::create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; + let receivelib_contract = utils::create_contract_instance(&config, http_provider, receivelib_abi)?; info!("Listening to chain events..."); @@ -57,15 +59,19 @@ async fn main() -> Result<()> { let required_confirmations = utils::get_confirmations(&config, &sendlib_contract).await?; - //let already_verified = utils::get_verified(&config, &sendlib_contract, required_confirmations).await?; - // - //if already_verified { - // debug!("Packet has been verified. Listening for more packets..."); - //} else { - // debug!("Packet has not been verified. Calling verification."); - //} - // TODO: idempotency check again + let already_verified = utils::get_verified(&config, &receivelib_contract, required_confirmations).await?; + loop { + if already_verified { + debug!("Packet has been verified. Listening for more packets..."); + + } else { + debug!("Packet has not been verified. Calling verification."); + //utils::verify(); + // TODO: idempotency check again + let already_verified = utils::get_verified(&config, &receivelib_contract, required_confirmations).await?; + } + } } }, Err(e) => { diff --git a/workers/src/config.rs b/workers/src/config.rs index 40ecdc90..8737e37a 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -16,8 +16,12 @@ pub struct DVNConfig { l0_endpoint_addr: String, /// The SendLib Ultra Light Node 302 address. sendlib_uln302_addr: String, + /// The ReceiveLib Ultra Light Node 302 address. + receivelib_uln302_addr: String, /// The SendLib Ultra Light Node 301 address. sendlib_uln301_addr: String, + /// The ReceiveLib Ultra Light Node 301 address. + receivelib_uln301_addr: String, /// The Ethereum network ID. network_id: u64, /// Own DVN address. Used to check when the DVN is assigned to a task. @@ -45,11 +49,21 @@ impl DVNConfig { Ok(self.sendlib_uln302_addr.parse::
()?) } + /// Get the ReceiveLib ULN302 address. + pub fn receivelib_uln302_addr(&self) -> Result
{ + Ok(self.receivelib_uln302_addr.parse::
()?) + } + /// Get the SendLib ULN301 address. pub fn sendlib_uln301_addr(&self) -> Result
{ Ok(self.sendlib_uln301_addr.parse::
()?) } + /// Get the ReceiveLib ULN301 address. + pub fn receivelib_uln301_addr(&self) -> Result
{ + Ok(self.receivelib_uln301_addr.parse::
()?) + } + /// Get the EID as U256. pub fn eid(&self) -> U256 { U256::from(self.network_id) @@ -69,7 +83,9 @@ impl DVNConfig { http_rpc_url: std::env::var("HTTP_RPC_URL").unwrap_or_else(|_| Default::default()), l0_endpoint_addr: std::env::var("L0_ENDPOINT_ADDR").unwrap_or_else(|_| Default::default()), sendlib_uln302_addr: std::env::var("SENDLIB_ULN302_ADDR").unwrap_or_else(|_| Default::default()), + receivelib_uln302_addr: std::env::var("RECEIVELIB_ULN302_ADDR").unwrap_or_else(|_| Default::default()), sendlib_uln301_addr: std::env::var("SENDLIB_ULN301_ADDR").unwrap_or_else(|_| Default::default()), + receivelib_uln301_addr: std::env::var("RECEIVELIB_ULN301_ADDR").unwrap_or_else(|_| Default::default()), network_id: std::env::var("NETWORK_EID") .unwrap_or_else(|_| "0".to_string()) .parse::()?, diff --git a/workers/src/utils.rs b/workers/src/utils.rs index b6dfcae0..a92ece7c 100644 --- a/workers/src/utils.rs +++ b/workers/src/utils.rs @@ -17,7 +17,9 @@ use eyre::Result; use sha3::{Digest, Keccak256}; use tracing::debug; +/// Alias for a contract instance in the Ethereum network. pub type ContractInst = ContractInstance, RootProvider>, Ethereum>; +/// Alias for an HTTP provider. pub type HttpProvider = RootProvider>; /// Create the subscriptions for the DVN workflow. @@ -57,9 +59,9 @@ pub async fn build_subscriptions( } /// Load the MessageLib ABI. -pub fn get_sendlib_abi() -> Result { +pub fn get_abi_from_path(path: &str) -> Result { // Get the SendLib ABI - let artifact = std::fs::read("./abi/SendLibrary.json")?; + let artifact = std::fs::read(path)?; let json: serde_json::Value = serde_json::from_slice(&artifact)?; // SAFETY: Assume `unwrap` is safe since the key is always present let abi_value = json.get("abi").unwrap(); @@ -85,15 +87,6 @@ pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, /// Get the number of required confirmations by the ULN. pub async fn get_confirmations(config: &DVNConfig, contract: &ContractInst) -> Result { - // FIXME: there an error returned by the server: - // Error: server returned an error response: error code 3: execution reverted, data: "0xce2c3751" - // which decodes (https://www.4byte.directory/signatures/?bytes4_signature=0xce2c3751) to: - // LZ_ULN_AtLeastOneDVN() - - debug!("Getting confirmations required by the ULN."); - debug!("Contract address: {:?}", config.sendlib_uln302_addr()?); - debug!("Contract address: {:?}", config.eid()); - // Call the `getUlnConfig` function on the contract let uln_config = contract .function( @@ -127,12 +120,12 @@ pub async fn get_confirmations(config: &DVNConfig, contract: &ContractInst) -> R /// Idempotent check to see if there's work to do for the DVN. pub async fn get_verified(config: &DVNConfig, contract: &ContractInst, required_confirmations: U256) -> Result { - // Call the `verified` function on the contract - let uln302 = contract + // Call the `_verified` function on the 302 contract + let receive_uln302 = contract .function( "_verified", &[ - DynSolValue::Address(config.sendlib_uln301_addr()?), + DynSolValue::Address(config.receivelib_uln302_addr()?), // HeaderHash // PayloadHash DynSolValue::Uint(required_confirmations, 32), @@ -141,20 +134,20 @@ pub async fn get_verified(config: &DVNConfig, contract: &ContractInst, required_ .call() .await?; - let uln302_state = if uln302[0].as_bool().unwrap() { - debug!("Packet already verified, DVN workflow can stop."); + let uln302_state = if receive_uln302[0].as_bool().unwrap() { + debug!("Packet already verified (by Uln302), DVN workflow can stop."); true } else { debug!("Packet hasn't been verified. Call `verify`."); false }; - // Call the `_verified` function on the contract + // Call the `_verified` function on the 301 contract let uln301 = contract .function( "_verified", &[ - DynSolValue::Address(config.sendlib_uln301_addr()?), + DynSolValue::Address(config.receivelib_uln301_addr()?), // HeaderHash // PayloadHash DynSolValue::Uint(required_confirmations, 32), @@ -164,7 +157,7 @@ pub async fn get_verified(config: &DVNConfig, contract: &ContractInst, required_ .await?; let uln301_state = if uln301[0].as_bool().unwrap() { - debug!("Packet already verified, DVN workflow can stop."); + debug!("Packet already verified (by Uln301), DVN workflow can stop."); true } else { debug!("Packet hasn't been verified. Call `verify`."); @@ -221,7 +214,7 @@ mod tests { // Set up let config = config::DVNConfig::load_from_env()?; let http_provider = get_http_provider(&config)?; - let sendlib_abi = get_sendlib_abi()?; + let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; // Query contract value @@ -232,4 +225,21 @@ mod tests { Ok(()) } + + #[tokio::test] + async fn test_get_verified() -> Result<()> { + // Set up + let config = config::DVNConfig::load_from_env()?; + let http_provider = get_http_provider(&config)?; + let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLib302.json")?; + let receivelib_contract = create_contract_instance(&config, http_provider, receivelib_abi)?; + + // Query contract value + let is_verified = get_verified(&config, &receivelib_contract, U256::from(20)).await?; + + // Check the value is what we expect + assert!(is_verified); + + Ok(()) + } } From 9d720c57b67d1ceae805964cffc04485edd09eef Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 10 Oct 2024 12:38:24 +0200 Subject: [PATCH 61/96] chore: fix overall flow --- workers/Cargo.toml | 4 +- workers/src/abi.rs | 4 +- workers/src/bin/dvn.rs | 83 +++++++---- workers/src/chain/connections.rs | 67 +++++++++ workers/src/chain/contracts.rs | 180 +++++++++++++++++++++++ workers/src/chain/mod.rs | 16 ++ workers/src/data.rs | 62 ++++++++ workers/src/lib.rs | 3 +- workers/src/utils.rs | 245 ------------------------------- 9 files changed, 387 insertions(+), 277 deletions(-) create mode 100644 workers/src/chain/connections.rs create mode 100644 workers/src/chain/contracts.rs create mode 100644 workers/src/chain/mod.rs create mode 100644 workers/src/data.rs delete mode 100644 workers/src/utils.rs diff --git a/workers/Cargo.toml b/workers/Cargo.toml index 913060ad..b4d62b18 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -13,12 +13,10 @@ alloy-json-abi = "0.8.6" dotenv = "0.15.0" eyre = "0.6.12" futures = "0.3.31" +hex = "0.4.3" serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" sha3 = "0.10.8" tokio = { version = "1.40.0", features = ["full"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } - -[dev-dependencies] -hex = "0.4.3" diff --git a/workers/src/abi.rs b/workers/src/abi.rs index 96ca4b75..d352fe8f 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -1,4 +1,6 @@ -//! Types create from the JSON ABI files. For example, to be able to decode the logs' data, or call contracts' methods. +//! Types create from the JSON ABI files. +//! +//! For example, to be able to decode the logs' data, or call contracts' methods. use alloy::sol; use serde::{Deserialize, Serialize}; diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 1de716bf..73b60103 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -1,12 +1,19 @@ -//! Main workflow for subscribing and listening for specific contract events using a `WebSocket` subscription. +//! Main offchain workflow for Nuff DVN. use eyre::Result; use futures::stream::StreamExt; use tracing::{debug, error, info}; use tracing_subscriber::EnvFilter; use workers::{ - abi::{L0V2EndpointAbi, SendLibraryAbi}, - config, utils, + abi::{ + L0V2EndpointAbi::{self}, + SendLibraryAbi, + }, + chain::{ + connections::{build_subscriptions, get_abi_from_path, get_http_provider}, + contracts::{create_contract_instance, query_confirmations, verify}, + }, + data::Dvn, }; #[tokio::main] @@ -17,31 +24,35 @@ async fn main() -> Result<()> { .with_env_filter(EnvFilter::from_default_env()) .init(); - // Load the DVN workflow configuration. - let config = config::DVNConfig::load_from_env()?; + let mut dvn_worker = Dvn::new_from_env()?; // Create the WS subscriptions for listening to the events. - let (_provider, mut endpoint_stream, mut sendlib_stream) = utils::build_subscriptions(&config).await?; + let (_provider, mut endpoint_stream, mut sendlib_stream) = build_subscriptions(dvn_worker.config()).await?; - // Create an HTTP provider to call the contract. - let http_provider = utils::get_http_provider(&config)?; + // Create an HTTP provider to call contract functions. + let http_provider = get_http_provider(dvn_worker.config())?; // Get the relevant contract ABI. - let sendlib_abi = utils::get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; - let receivelib_abi = utils::get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; + //let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; + let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; // Create a contract instance. - let sendlib_contract = utils::create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; - let receivelib_contract = utils::create_contract_instance(&config, http_provider, receivelib_abi)?; + //let sendlib_contract = create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; + let receivelib_contract = create_contract_instance(dvn_worker.config(), http_provider, receivelib_abi)?; info!("Listening to chain events..."); loop { tokio::select! { Some(log) = endpoint_stream.next() => { + //println!("->> PacketSent log: {:?}", log); match log.log_decode::() { - Ok(_inner_log) => { - info!("PacketSent event found and decoded."); + Ok(inner_log) => { + debug!("PacketSent event found and decoded."); + dvn_worker.packet_received(inner_log.data().clone()); + debug!("PacketSent data stored."); + + println!("->> PacketSent data stored: {:?}", dvn_worker.packet()); }, Err(e) => { error!("Failed to decode PacketSent event: {:?}", e); @@ -49,28 +60,46 @@ async fn main() -> Result<()> { } } Some(log) = sendlib_stream.next() => { + //println!("->> DVNFeePaid log: {:?}", log); match log.log_decode::() { Ok(inner_log) => { info!("DVNFeePaid event found and decoded."); let required_dvns = inner_log.inner.requiredDVNs.clone(); - if required_dvns.contains(&config.dvn_addr()?) { - debug!("Matched DVN found in required DVNs. Performing idempotency check..."); + if required_dvns.contains(&dvn_worker.config().dvn_addr()?) { + debug!("Matched DVN found in required DVNs."); - let required_confirmations = utils::get_confirmations(&config, &sendlib_contract).await?; + // NOTE: the docs' workflow require now to query L0's endpoint to + // get the address of the MessageLib, but we have already created + // the contract above to query it directly. - let already_verified = utils::get_verified(&config, &receivelib_contract, required_confirmations).await?; + let required_confirmations = query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; - loop { - if already_verified { - debug!("Packet has been verified. Listening for more packets..."); + // NOTE: the method `_verified` doesn't seem to exist in the contract, + // so cannot perform the idempotency check. + // + //let already_verified = query_already_verified(&receivelib_contract, dvn_worker.config().dvn_addr()?, &[1,2,3], &[1,2,3], required_confirmations).await?; + // + //if already_verified { + // debug!("Packet already verified."); + //} else { + // debug!("Packet NOT verified. Calling verification."); + // let _ = utils::verify(); + // + // // Idempotency check again + // if get_verified(&receivelib_contract, required_confirmations).await? { + // debug!("Packet successfully verified. Listening for more packets..."); + // } else { + // debug!("Packet verification failed!"); + // } + //} - } else { - debug!("Packet has not been verified. Calling verification."); - //utils::verify(); - // TODO: idempotency check again - let already_verified = utils::get_verified(&config, &receivelib_contract, required_confirmations).await?; - } + if let Some(packet) = dvn_worker.packet() { + debug!("Packet data found. Calling verification."); + // FIXME: incorrect data + verify(&receivelib_contract, &packet.options, &packet.encodedPayload, required_confirmations).await?; + } else { + debug!("No packet data found. Skipping verification."); } } }, diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs new file mode 100644 index 00000000..01669a2c --- /dev/null +++ b/workers/src/chain/connections.rs @@ -0,0 +1,67 @@ +//! Utilities related to connection with a blockchain. + +use crate::{ + chain::HttpProvider, + config::{DVNConfig, DVNEvent}, +}; +use alloy::{ + eips::BlockNumberOrTag, + providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, + pubsub::{PubSubFrontend, SubscriptionStream}, + rpc::types::{Filter, Log}, +}; +use alloy_json_abi::JsonAbi; +use eyre::Result; + +/// Create the subscriptions for the DVN workflow. +pub async fn build_subscriptions( + config: &DVNConfig, +) -> Result<( + RootProvider, + SubscriptionStream, + SubscriptionStream, +)> { + // Create the provider + let rpc_url = config.ws_rpc(); + let ws = WsConnect::new(rpc_url); + let provider = ProviderBuilder::new().on_ws(ws).await?; + + // layerzero endpoint filter + let packet_filter = Filter::new() + .address(config.l0_addr()?) + .event(DVNEvent::PacketSent.as_ref()) + .from_block(BlockNumberOrTag::Latest); + + // messagelib endpoint filter + let fee_paid_filter = Filter::new() + .address(config.sendlib_uln302_addr()?) + .event(DVNEvent::FeePaid.as_ref()) + .from_block(BlockNumberOrTag::Latest); + + // Subscribe to logs + let endpoint_sub = provider.subscribe_logs(&packet_filter).await?; + let sendlib_sub = provider.subscribe_logs(&fee_paid_filter).await?; + + // Create some streams from the subscriptions + let endpoint_stream = endpoint_sub.into_stream(); + let sendlib_stream = sendlib_sub.into_stream(); + + Ok((provider, endpoint_stream, sendlib_stream)) +} + +/// Load the MessageLib ABI. +pub fn get_abi_from_path(path: &str) -> Result { + // Get the SendLib ABI + let artifact = std::fs::read(path)?; + let json: serde_json::Value = serde_json::from_slice(&artifact)?; + // SAFETY: Assume `unwrap` is safe since the key has been harcoded + let abi_value = json.get("abi").unwrap(); + let abi = serde_json::from_str(&abi_value.to_string())?; + Ok(abi) +} + +/// Construct an HTTP provider given the config. +pub fn get_http_provider(config: &DVNConfig) -> Result { + let http_provider = ProviderBuilder::new().on_http(config.http_rpc()?); + Ok(http_provider) +} diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs new file mode 100644 index 00000000..d5271289 --- /dev/null +++ b/workers/src/chain/contracts.rs @@ -0,0 +1,180 @@ +//! Utilities for interacting with onchain contracts. + +use crate::{ + chain::{ContractInst, HttpProvider}, + config::DVNConfig, +}; +use alloy::{ + contract::{ContractInstance, Interface}, + dyn_abi::DynSolValue, + network::Ethereum, + primitives::{Address, Bytes, FixedBytes, U256}, + transports::http::{Client, Http}, +}; +use alloy_json_abi::JsonAbi; +use eyre::{eyre, OptionExt, Result}; +use sha3::{Digest, Keccak256}; + +/// Create a contract instance from the ABI to interact with on-chain instance. +pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, abi: JsonAbi) -> Result { + let contract: ContractInstance, _, Ethereum> = ContractInstance::new( + config.sendlib_uln302_addr()?, + http_provider.clone(), + Interface::new(abi), + ); + Ok(contract) +} + +/// Get the address of the MessageLib on the destination chain +pub async fn get_messagelib_addr(contract: &ContractInst, eid: U256) -> Result
{ + // Call the `getUlnConfig` function on the contract + let receive_library = contract + .function( + "getReceiveLibrary", + &[DynSolValue::Address(*contract.address()), DynSolValue::Uint(eid, 32)], + )? + .call() + .await?; + + match receive_library[0] { + DynSolValue::Address(address) => Ok(address), + _ => Err(eyre!("Failed to get address")), + } +} + +/// Get the number of required confirmations by the ULN. +pub async fn query_confirmations(contract: &ContractInst, eid: U256) -> Result { + // Call the `getUlnConfig` function on the contract + let uln_config = contract + .function( + "getUlnConfig", + &[DynSolValue::Address(*contract.address()), DynSolValue::Uint(eid, 32)], + )? + .call() + .await?; + + match &uln_config[0] { + DynSolValue::Tuple(tupled_int) => { + let value = tupled_int[0] + .as_uint() + .ok_or_eyre("Cannot parse response from MessageLib")?; + Ok(value.0) + } + _ => Err(eyre::eyre!("Failed to get confirmations")), + } +} + +/// Idempotent check to see if there's work to do for the DVN. +pub async fn query_already_verified( + contract: &ContractInst, + dvn_address: Address, + header_hash: &[u8], + payload_hash: &[u8], + required_confirmations: U256, +) -> Result { + // Call the `_verified` function on the 302 contract, to check if the DVN has already verified + // the packet. + let receive_uln302 = contract + .function( + "_verified", + &[ + DynSolValue::Address(dvn_address), // DVN address + DynSolValue::Bytes(header_hash.to_vec()), // HeaderHash + DynSolValue::Bytes(payload_hash.to_vec()), // PayloadHash + DynSolValue::Uint(required_confirmations, 32), // confirmations + ], + )? + .call() + .await?; + + let uln302_state = match receive_uln302[0] { + DynSolValue::Bool(b) => Ok(b), + _ => Err(eyre!("Failed to parse response from ULN302 for `_verified`")), + }?; + + Ok(uln302_state) +} + +pub async fn verify( + contract: &ContractInst, + packet_header: &Bytes, + payload: &Bytes, + confirmations: U256, +) -> Result { + //// Create the hash of the payload + let payload_hash = keccak256(payload); + // + // Call the `verified` function on the contract + let _ = contract + .function( + "verify", + &[ + DynSolValue::Bytes(packet_header.to_vec()), // PacketHeader + DynSolValue::FixedBytes(FixedBytes(payload_hash), 32), // PayloadHash + DynSolValue::Uint(confirmations, 64), // Confirmations + ], + )? + .call() + .await?; + + Ok(false) +} + +/// Hash some data with `keccak256`. +fn keccak256(data: &[u8]) -> [u8; 32] { + let mut hasher = Keccak256::default(); + hasher.update(data); + let result = hasher.finalize(); + result.into() +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + chain::connections::{get_abi_from_path, get_http_provider}, + config, + }; + + #[tokio::test] + async fn test_get_confirmations() -> Result<()> { + // Set up + let config = config::DVNConfig::load_from_env()?; + let http_provider = get_http_provider(&config)?; + let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; + let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; + + // Query contract value + let required_confirmations = query_confirmations(&sendlib_contract, U256::from(30110)).await?; + + // Check the value is what we expect + assert_eq!(required_confirmations, U256::from(20)); + + Ok(()) + } + + //#[tokio::test] + async fn test_get_verified() -> Result<()> { + // NOTE: this method doesn't seem to exist in the contract + // Set up + let config = config::DVNConfig::load_from_env()?; + let http_provider = get_http_provider(&config)?; + let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; + let receivelib_contract = create_contract_instance(&config, http_provider, receivelib_abi)?; + + // Query contract value + let uln302 = query_already_verified( + &receivelib_contract, + "0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6".parse::
()?, + &[1, 2, 3], + &[1, 2, 3], + U256::from(20), + ) + .await?; + + // Check the value is what we expect + assert!(uln302); + + Ok(()) + } +} diff --git a/workers/src/chain/mod.rs b/workers/src/chain/mod.rs new file mode 100644 index 00000000..b6f18ad3 --- /dev/null +++ b/workers/src/chain/mod.rs @@ -0,0 +1,16 @@ +//! Utilities for interacting with the blockchain. + +use alloy::{ + contract::ContractInstance, + network::Ethereum, + providers::RootProvider, + transports::http::{Client, Http}, +}; + +pub mod connections; +pub mod contracts; + +/// Alias for a contract instance in the Ethereum network. +pub type ContractInst = ContractInstance, RootProvider>, Ethereum>; +/// Alias for an HTTP provider. +pub type HttpProvider = RootProvider>; diff --git a/workers/src/data.rs b/workers/src/data.rs new file mode 100644 index 00000000..2ac99327 --- /dev/null +++ b/workers/src/data.rs @@ -0,0 +1,62 @@ +use crate::abi::L0V2EndpointAbi::PacketSent; +use crate::config; +use crate::config::DVNConfig; +use eyre::Result; +//use alloy::primitives::{Address, U256}; + +pub struct Dvn { + config: DVNConfig, + status: DvnStatus, + packet: Option, + //receivelib_address: Option
, + //num_confirmations: Option, +} + +pub enum DvnStatus { + Stopped, + Listening, + PacketReceived, + Verifying, +} + +impl Dvn { + pub fn new(config: DVNConfig) -> Self { + Self { + config, + status: DvnStatus::Stopped, + packet: None, + //receivelib_address: None, + //num_confirmations: None, + } + } + + pub fn new_from_env() -> Result { + Ok(Dvn::new(config::DVNConfig::load_from_env()?)) + } + + pub fn packet(&self) -> Option<&PacketSent> { + self.packet.as_ref() + } + + pub fn config(&self) -> &DVNConfig { + &self.config + } + + pub fn listen(&mut self) { + self.status = DvnStatus::Listening; + } + + pub fn stop(&mut self) { + self.status = DvnStatus::Stopped; + } + + pub fn packet_received(&mut self, packet_log: PacketSent) { + self.packet = Some(packet_log); + self.status = DvnStatus::PacketReceived; + } + + pub fn verify(&mut self) { + self.status = DvnStatus::Verifying; + } +} + diff --git a/workers/src/lib.rs b/workers/src/lib.rs index 6805bab0..5bfaf915 100644 --- a/workers/src/lib.rs +++ b/workers/src/lib.rs @@ -1,5 +1,6 @@ //! Tools to build offchain workers for the LayerZero protocol. pub mod abi; +pub mod chain; pub mod config; -pub mod utils; +pub mod data; diff --git a/workers/src/utils.rs b/workers/src/utils.rs deleted file mode 100644 index a92ece7c..00000000 --- a/workers/src/utils.rs +++ /dev/null @@ -1,245 +0,0 @@ -//! Utilities for interacting with the DVN. - -use crate::config::{DVNConfig, DVNEvent}; -use alloy::{ - contract::{ContractInstance, Interface}, - dyn_abi::DynSolValue, - eips::BlockNumberOrTag, - network::Ethereum, - primitives::U256, - providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, - pubsub::{PubSubFrontend, SubscriptionStream}, - rpc::types::{Filter, Log}, - transports::http::{Client, Http}, -}; -use alloy_json_abi::JsonAbi; -use eyre::Result; -use sha3::{Digest, Keccak256}; -use tracing::debug; - -/// Alias for a contract instance in the Ethereum network. -pub type ContractInst = ContractInstance, RootProvider>, Ethereum>; -/// Alias for an HTTP provider. -pub type HttpProvider = RootProvider>; - -/// Create the subscriptions for the DVN workflow. -pub async fn build_subscriptions( - config: &DVNConfig, -) -> Result<( - RootProvider, - SubscriptionStream, - SubscriptionStream, -)> { - // Create the provider - let rpc_url = config.ws_rpc(); - let ws = WsConnect::new(rpc_url); - let provider = ProviderBuilder::new().on_ws(ws).await?; - - // layerzero endpoint filter - let packet_filter = Filter::new() - .address(config.l0_addr()?) - .event(DVNEvent::PacketSent.as_ref()) - .from_block(BlockNumberOrTag::Latest); - - // messagelib endpoint filter - let fee_paid_filter = Filter::new() - .address(config.sendlib_uln302_addr()?) - .event(DVNEvent::FeePaid.as_ref()) - .from_block(BlockNumberOrTag::Latest); - - // Subscribe to logs - let endpoint_sub = provider.subscribe_logs(&packet_filter).await?; - let sendlib_sub = provider.subscribe_logs(&fee_paid_filter).await?; - - // Create some streams from the subscriptions - let endpoint_stream = endpoint_sub.into_stream(); - let sendlib_stream = sendlib_sub.into_stream(); - - Ok((provider, endpoint_stream, sendlib_stream)) -} - -/// Load the MessageLib ABI. -pub fn get_abi_from_path(path: &str) -> Result { - // Get the SendLib ABI - let artifact = std::fs::read(path)?; - let json: serde_json::Value = serde_json::from_slice(&artifact)?; - // SAFETY: Assume `unwrap` is safe since the key is always present - let abi_value = json.get("abi").unwrap(); - let abi = serde_json::from_str(&abi_value.to_string())?; - Ok(abi) -} - -/// Construct an HTTP provider given the config. -pub fn get_http_provider(config: &DVNConfig) -> Result { - let http_provider = ProviderBuilder::new().on_http(config.http_rpc()?); - Ok(http_provider) -} - -/// Create a contract instance from the ABI to interact with on-chain instance. -pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, abi: JsonAbi) -> Result { - let contract: ContractInstance, _, Ethereum> = ContractInstance::new( - config.sendlib_uln302_addr()?, - http_provider.clone(), - Interface::new(abi), - ); - Ok(contract) -} - -/// Get the number of required confirmations by the ULN. -pub async fn get_confirmations(config: &DVNConfig, contract: &ContractInst) -> Result { - // Call the `getUlnConfig` function on the contract - let uln_config = contract - .function( - "getUlnConfig", - &[ - DynSolValue::Address(config.sendlib_uln302_addr()?), - DynSolValue::Uint(config.eid(), 32), - ], - )? - .call() - .await?; - - let num_confirmations = if let DynSolValue::Tuple(tupled_uint) = uln_config[0].clone() { - if let Some(value) = tupled_uint[0].as_uint() { - value.0 - } else { - U256::from(0) - } - } else { - U256::from(0) - }; - - debug!( - "{:?} confirmations required by MessageLib at: {:?}", - num_confirmations, - contract.address() - ); - - Ok(num_confirmations) -} - -/// Idempotent check to see if there's work to do for the DVN. -pub async fn get_verified(config: &DVNConfig, contract: &ContractInst, required_confirmations: U256) -> Result { - // Call the `_verified` function on the 302 contract - let receive_uln302 = contract - .function( - "_verified", - &[ - DynSolValue::Address(config.receivelib_uln302_addr()?), - // HeaderHash - // PayloadHash - DynSolValue::Uint(required_confirmations, 32), - ], - )? - .call() - .await?; - - let uln302_state = if receive_uln302[0].as_bool().unwrap() { - debug!("Packet already verified (by Uln302), DVN workflow can stop."); - true - } else { - debug!("Packet hasn't been verified. Call `verify`."); - false - }; - - // Call the `_verified` function on the 301 contract - let uln301 = contract - .function( - "_verified", - &[ - DynSolValue::Address(config.receivelib_uln301_addr()?), - // HeaderHash - // PayloadHash - DynSolValue::Uint(required_confirmations, 32), - ], - )? - .call() - .await?; - - let uln301_state = if uln301[0].as_bool().unwrap() { - debug!("Packet already verified (by Uln301), DVN workflow can stop."); - true - } else { - debug!("Packet hasn't been verified. Call `verify`."); - false - }; - - Ok(uln302_state && uln301_state) -} - -pub async fn verify( - config: &DVNConfig, - contract: &ContractInst, - packet_header: &[u8], - payload: &[u8], - confirmations: U256, -) -> Result { - // Create the hash of the payload - let payload_hash = keccak256(payload); - - // Call the `verified` function on the contract - let _ = contract - .function( - "verify", - &[ - // PacketHeader - //packet_header, - // PayloadHash - //payload_hash, - // Confirmations - //DynSolValue::Uint(confirmations, 32), - ], - )? - .call() - .await?; - - Ok(false) -} - -/// Helper for hashing some data with `keccak256`. -fn keccak256(data: &[u8]) -> [u8; 32] { - let mut hasher = Keccak256::default(); - hasher.update(data); - let result = hasher.finalize(); - result.into() -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::config; - - #[tokio::test] - async fn test_get_confirmations() -> Result<()> { - // Set up - let config = config::DVNConfig::load_from_env()?; - let http_provider = get_http_provider(&config)?; - let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; - let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; - - // Query contract value - let required_confirmations = get_confirmations(&config, &sendlib_contract).await?; - - // Check the value is what we expect - assert_eq!(required_confirmations, U256::from(20)); - - Ok(()) - } - - #[tokio::test] - async fn test_get_verified() -> Result<()> { - // Set up - let config = config::DVNConfig::load_from_env()?; - let http_provider = get_http_provider(&config)?; - let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLib302.json")?; - let receivelib_contract = create_contract_instance(&config, http_provider, receivelib_abi)?; - - // Query contract value - let is_verified = get_verified(&config, &receivelib_contract, U256::from(20)).await?; - - // Check the value is what we expect - assert!(is_verified); - - Ok(()) - } -} From 9e1c1eeaf6a2933b89fed633d990f6f3a82b2df9 Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 10 Oct 2024 15:21:00 +0200 Subject: [PATCH 62/96] chore: preparing for deployment, lacking correct header --- workers/src/bin/dvn.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 73b60103..a4ed7726 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -55,7 +55,7 @@ async fn main() -> Result<()> { println!("->> PacketSent data stored: {:?}", dvn_worker.packet()); }, Err(e) => { - error!("Failed to decode PacketSent event: {:?}", e); + error!("Failed to decode `PacketSent` event: {:?}", e); } } } @@ -75,7 +75,7 @@ async fn main() -> Result<()> { let required_confirmations = query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; - // NOTE: the method `_verified` doesn't seem to exist in the contract, + // NOTE: the method `_verified` doesn't seem to exist in the contracts, // so cannot perform the idempotency check. // //let already_verified = query_already_verified(&receivelib_contract, dvn_worker.config().dvn_addr()?, &[1,2,3], &[1,2,3], required_confirmations).await?; @@ -94,8 +94,9 @@ async fn main() -> Result<()> { // } //} + // If the packet was stored when emited in the PacketSent event. if let Some(packet) = dvn_worker.packet() { - debug!("Packet data found. Calling verification."); + debug!("Calling verification."); // FIXME: incorrect data verify(&receivelib_contract, &packet.options, &packet.encodedPayload, required_confirmations).await?; } else { @@ -104,7 +105,7 @@ async fn main() -> Result<()> { } }, Err(e) => { - error!("Failed to decode DVNFeePaid event: {:?}", e); + error!("Failed to decode `DVNFeePaid` event: {:?}", e); } } }, From 1b02a1ef4f872fa671aabdbbe2f00364a414d7cc Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 11 Oct 2024 17:28:48 +0200 Subject: [PATCH 63/96] chore: ordering --- workers/src/bin/dvn.rs | 71 ++++++++++++++++------------------ workers/src/chain/contracts.rs | 24 +++++++++--- workers/src/data.rs | 14 ++++--- 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index a4ed7726..0b3913f9 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -11,7 +11,7 @@ use workers::{ }, chain::{ connections::{build_subscriptions, get_abi_from_path, get_http_provider}, - contracts::{create_contract_instance, query_confirmations, verify}, + contracts::{create_contract_instance, query_already_verified, query_confirmations, verify}, }, data::Dvn, }; @@ -32,27 +32,22 @@ async fn main() -> Result<()> { // Create an HTTP provider to call contract functions. let http_provider = get_http_provider(dvn_worker.config())?; - // Get the relevant contract ABI. + // Get the relevant contract ABI, and create contract. //let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; - let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; - - // Create a contract instance. //let sendlib_contract = create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; + let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; let receivelib_contract = create_contract_instance(dvn_worker.config(), http_provider, receivelib_abi)?; info!("Listening to chain events..."); loop { + dvn_worker.listening(); tokio::select! { Some(log) = endpoint_stream.next() => { - //println!("->> PacketSent log: {:?}", log); match log.log_decode::() { Ok(inner_log) => { debug!("PacketSent event found and decoded."); dvn_worker.packet_received(inner_log.data().clone()); - debug!("PacketSent data stored."); - - println!("->> PacketSent data stored: {:?}", dvn_worker.packet()); }, Err(e) => { error!("Failed to decode `PacketSent` event: {:?}", e); @@ -60,55 +55,57 @@ async fn main() -> Result<()> { } } Some(log) = sendlib_stream.next() => { - //println!("->> DVNFeePaid log: {:?}", log); match log.log_decode::() { Ok(inner_log) => { info!("DVNFeePaid event found and decoded."); let required_dvns = inner_log.inner.requiredDVNs.clone(); if required_dvns.contains(&dvn_worker.config().dvn_addr()?) { - debug!("Matched DVN found in required DVNs."); + info!("Found DVN in required DVNs."); // NOTE: the docs' workflow require now to query L0's endpoint to // get the address of the MessageLib, but we have already created // the contract above to query it directly. - let required_confirmations = query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; + let required_confirmations = + query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; - // NOTE: the method `_verified` doesn't seem to exist in the contracts, - // so cannot perform the idempotency check. - // - //let already_verified = query_already_verified(&receivelib_contract, dvn_worker.config().dvn_addr()?, &[1,2,3], &[1,2,3], required_confirmations).await?; - // - //if already_verified { - // debug!("Packet already verified."); - //} else { - // debug!("Packet NOT verified. Calling verification."); - // let _ = utils::verify(); - // - // // Idempotency check again - // if get_verified(&receivelib_contract, required_confirmations).await? { - // debug!("Packet successfully verified. Listening for more packets..."); - // } else { - // debug!("Packet verification failed!"); - // } - //} + let already_verified = query_already_verified( + &receivelib_contract, + dvn_worker.config().dvn_addr()?, + &[1, 2, 3], + &[1, 2, 3], + required_confirmations, + ) + .await?; - // If the packet was stored when emited in the PacketSent event. - if let Some(packet) = dvn_worker.packet() { - debug!("Calling verification."); - // FIXME: incorrect data - verify(&receivelib_contract, &packet.options, &packet.encodedPayload, required_confirmations).await?; + if already_verified { + debug!("Packet already verified."); } else { - debug!("No packet data found. Skipping verification."); + // If the packet was stored when emited in the PacketSent event. + if let Some(packet) = dvn_worker.packet() { + dvn_worker.verifying(); + debug!("Packet NOT verified. Calling verification."); + // FIXME: incorrect data + verify( + &receivelib_contract, + &packet.options, + &packet.encodedPayload, + required_confirmations, + ) + .await?; + } else { + debug!("No packet data found. Skipping verification."); + } } } - }, + } Err(e) => { error!("Failed to decode `DVNFeePaid` event: {:?}", e); } } }, } + dvn_worker.reset_packet(); } } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index d5271289..979c7973 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -14,6 +14,7 @@ use alloy::{ use alloy_json_abi::JsonAbi; use eyre::{eyre, OptionExt, Result}; use sha3::{Digest, Keccak256}; +use tracing::{debug, error}; /// Create a contract instance from the ABI to interact with on-chain instance. pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, abi: JsonAbi) -> Result { @@ -38,7 +39,10 @@ pub async fn get_messagelib_addr(contract: &ContractInst, eid: U256) -> Result Ok(address), - _ => Err(eyre!("Failed to get address")), + _ => { + error!("Failed to get address"); + Err(eyre!("Failed to get address")) + } } } @@ -60,7 +64,10 @@ pub async fn query_confirmations(contract: &ContractInst, eid: U256) -> Result Err(eyre::eyre!("Failed to get confirmations")), + _ => { + error!("Failed to get confirmations"); + Err(eyre!("Failed to get confirmations")) + } } } @@ -74,7 +81,9 @@ pub async fn query_already_verified( ) -> Result { // Call the `_verified` function on the 302 contract, to check if the DVN has already verified // the packet. - let receive_uln302 = contract + debug!("Calling _verified on contract's ReceiveLib"); + + let contract_state = contract .function( "_verified", &[ @@ -87,12 +96,15 @@ pub async fn query_already_verified( .call() .await?; - let uln302_state = match receive_uln302[0] { + let packet_state = match contract_state[0] { DynSolValue::Bool(b) => Ok(b), - _ => Err(eyre!("Failed to parse response from ULN302 for `_verified`")), + _ => { + error!("Failed to parse response from ReceiveLib for `_verified`"); + Err(eyre!("Failed to parse response from ReceiveLib for `_verified`")) + } }?; - Ok(uln302_state) + Ok(packet_state) } pub async fn verify( diff --git a/workers/src/data.rs b/workers/src/data.rs index 2ac99327..a53a0c6c 100644 --- a/workers/src/data.rs +++ b/workers/src/data.rs @@ -34,15 +34,15 @@ impl Dvn { Ok(Dvn::new(config::DVNConfig::load_from_env()?)) } - pub fn packet(&self) -> Option<&PacketSent> { - self.packet.as_ref() + pub fn packet(&self) -> Option { + self.packet.clone() } pub fn config(&self) -> &DVNConfig { &self.config } - pub fn listen(&mut self) { + pub fn listening(&mut self) { self.status = DvnStatus::Listening; } @@ -55,8 +55,12 @@ impl Dvn { self.status = DvnStatus::PacketReceived; } - pub fn verify(&mut self) { + pub fn reset_packet(&mut self) { + self.packet = None; + self.status = DvnStatus::Stopped; + } + + pub fn verifying(&mut self) { self.status = DvnStatus::Verifying; } } - From d4b3c538b038ca3f0ec32b727d459506b11a60b0 Mon Sep 17 00:00:00 2001 From: Lozano Date: Tue, 15 Oct 2024 12:55:55 +0200 Subject: [PATCH 64/96] refactor: more modular for later executor --- workers/src/chain/contracts.rs | 27 +-------------------------- workers/src/{data.rs => data/dvn.rs} | 0 workers/src/data/mod.rs | 2 ++ 3 files changed, 3 insertions(+), 26 deletions(-) rename workers/src/{data.rs => data/dvn.rs} (100%) create mode 100644 workers/src/data/mod.rs diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 979c7973..ce4a89d4 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -8,7 +8,7 @@ use alloy::{ contract::{ContractInstance, Interface}, dyn_abi::DynSolValue, network::Ethereum, - primitives::{Address, Bytes, FixedBytes, U256}, + primitives::{Address, FixedBytes, U256}, transports::http::{Client, Http}, }; use alloy_json_abi::JsonAbi; @@ -164,29 +164,4 @@ mod tests { Ok(()) } - - //#[tokio::test] - async fn test_get_verified() -> Result<()> { - // NOTE: this method doesn't seem to exist in the contract - // Set up - let config = config::DVNConfig::load_from_env()?; - let http_provider = get_http_provider(&config)?; - let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; - let receivelib_contract = create_contract_instance(&config, http_provider, receivelib_abi)?; - - // Query contract value - let uln302 = query_already_verified( - &receivelib_contract, - "0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6".parse::
()?, - &[1, 2, 3], - &[1, 2, 3], - U256::from(20), - ) - .await?; - - // Check the value is what we expect - assert!(uln302); - - Ok(()) - } } diff --git a/workers/src/data.rs b/workers/src/data/dvn.rs similarity index 100% rename from workers/src/data.rs rename to workers/src/data/dvn.rs diff --git a/workers/src/data/mod.rs b/workers/src/data/mod.rs new file mode 100644 index 00000000..4cec19d2 --- /dev/null +++ b/workers/src/data/mod.rs @@ -0,0 +1,2 @@ +pub mod dvn; + From a9508f87ae9037cd736906fe4cba74bb41921c67 Mon Sep 17 00:00:00 2001 From: Lozano Date: Tue, 15 Oct 2024 13:57:42 +0200 Subject: [PATCH 65/96] chore: clean up --- Cargo.lock | 1 - contracts/evm/src/dvn/NuffDVN.sol | 338 ++++++++++++++++++++++++++++++ workers/Cargo.toml | 1 - workers/src/chain/contracts.rs | 17 +- 4 files changed, 342 insertions(+), 15 deletions(-) create mode 100644 contracts/evm/src/dvn/NuffDVN.sol diff --git a/Cargo.lock b/Cargo.lock index 1fd6901b..8b12968a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9456,7 +9456,6 @@ dependencies = [ "hex", "serde", "serde_json", - "sha3", "tokio", "tracing", "tracing-subscriber", diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol new file mode 100644 index 00000000..9a2eb907 --- /dev/null +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -0,0 +1,338 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; + +import { ILayerZeroEndpointV2 } from "./interfaces/ILayerZeroEndpointV2.sol"; +import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; +import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; +import { IReceiveUlnE2, Verification, UlnConfig } from "./interfaces/IReceiveUlnE2.sol"; +import { ISendLib } from "./interfaces/ISendLib.sol"; +import { IDVNFeeLib } from "./interfaces/IDVNFeeLib.sol"; +import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; +import { IDVN } from "./interfaces/IDVN.sol"; +import "./interfaces/INuffClient.sol"; +import "./utils/PacketV1Codec.sol"; + +contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { + using PacketV1Codec for bytes; + using ECDSA for bytes32; + using MessageHashUtils for bytes32; + + struct Job { + address origin; + uint32 srcEid; + uint32 dstEid; + bytes packetHeader; + bytes32 payloadHash; + uint64 confirmations; + address sender; + address receiver; + bytes options; + } + + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + bytes32 public constant MESSAGE_LIB_ROLE = keccak256("MESSAGE_LIB_ROLE"); + + ILayerZeroEndpointV2 public layerZeroEndpointV2; + ILayerZeroEndpoint public layerZeroEndpointV1; + uint32 public immutable localEid; + + uint256 public lastJobId; + + uint256 public nuffAppId; + INuffClient.PublicKey public nuffPublicKey; + INuffClient public nuff; + INuffDVNConfig public dvnConfig; + + uint16 public defaultMultiplierBps; + uint64 public quorum; + address public priceFeed; + address public feeLib; + + mapping(uint256 => Job) public jobs; + + // eid => bool + mapping(uint32 => bool) public supportedDstChain; + mapping(uint32 dstEid => DstConfig) public dstConfig; + // srcEid => ( jobId => isVerified ) + mapping(uint32 => mapping(uint256 => bool)) public verifiedJobs; + + event JobAssigned(uint256 jobId); + event Verified(uint32 srcEid, uint256 jobId); + + constructor( + uint256 _nuffAppId, + INuffClient.PublicKey memory _nuffPublicKey, + address _nuff, + address _layerZeroEndpointV2, + address _layerZeroEndpointV1, + address _dvnConfig, + uint16 _defaultMultiplierBps, + uint64 _quorum, + address _priceFeed, + address _feeLib + ) { + nuffAppId = _nuffAppId; + nuffPublicKey = _nuffPublicKey; + nuff = INuffClient(_nuff); + layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); + layerZeroEndpointV1 = ILayerZeroEndpoint(_layerZeroEndpointV1); + dvnConfig = INuffDVNConfig(_dvnConfig); + localEid = layerZeroEndpointV2.eid(); + defaultMultiplierBps = _defaultMultiplierBps; + quorum = _quorum; + priceFeed = _priceFeed; + feeLib = _feeLib; + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(ADMIN_ROLE, msg.sender); + } + + function assignJob( + AssignJobParam calldata _param, + bytes calldata _options + ) + external + payable + override + onlyRole(MESSAGE_LIB_ROLE) + returns (uint256 fee) + { + require(supportedDstChain[_param.dstEid], "Unsupported chain"); + + uint256 jobId = ++lastJobId; + Job storage newJob = jobs[jobId]; + + newJob.origin = msg.sender; + newJob.srcEid = localEid; + newJob.dstEid = _param.dstEid; + newJob.packetHeader = _param.packetHeader; + newJob.payloadHash = _param.payloadHash; + newJob.confirmations = _param.confirmations; + newJob.sender = _param.sender; + newJob.receiver = address( + uint160(uint256(_param.packetHeader.receiver())) + ); + newJob.options = _options; + + IDVNFeeLib.FeeParams memory feeParams = IDVNFeeLib.FeeParams( + priceFeed, + _param.dstEid, + _param.confirmations, + _param.sender, + quorum, + defaultMultiplierBps + ); + + fee = IDVNFeeLib(feeLib).getFeeOnSend( + feeParams, + dstConfig[_param.dstEid], + _options + ); + + emit JobAssigned(jobId); + } + + function verify( + uint32 _srcEid, + uint32 _dstEid, + uint256 _jobId, + bytes memory _packetHeader, + bytes32 _payloadHash, + uint64 _confirmations, + address _receiver, + bytes calldata _reqId, + INuffClient.SchnorrSign calldata _signature, + bytes calldata gatewaySignature + ) external { + require(_isLocal(_dstEid), "Invalid dstEid"); + require( + !verifiedJobs[_srcEid][_jobId], + "src jobId is already verified" + ); + + verifiedJobs[_srcEid][_jobId] = true; + + bytes32 hash = keccak256( + abi.encodePacked( + nuffAppId, + _reqId, + _srcEid, + _dstEid, + _jobId, + _packetHeader, + _payloadHash, + _confirmations, + _receiver + ) + ); + + _verifyNuffSig( + _reqId, + hash, + _signature, + dvnConfig.shieldNodes(_receiver), + gatewaySignature + ); + + _lzVerify( + _srcEid, + _packetHeader, + _payloadHash, + _confirmations, + _receiver + ); + + emit Verified(_srcEid, _jobId); + } + + function setNuffAppId(uint256 _nuffAppId) external onlyRole(ADMIN_ROLE) { + nuffAppId = _nuffAppId; + } + + function setNuffContract(address addr) external onlyRole(ADMIN_ROLE) { + nuff = INuffClient(addr); + } + + function setNuffPubKey( + INuffClient.PublicKey memory _nuffPublicKey + ) external onlyRole(ADMIN_ROLE) { + nuffPublicKey = _nuffPublicKey; + } + + function setLzEndpointV2( + address _layerZeroEndpointV2 + ) external onlyRole(ADMIN_ROLE) { + layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); + } + + function updateSupportedDstChain( + uint32 eid, + bool status + ) external onlyRole(ADMIN_ROLE) { + supportedDstChain[eid] = status; + } + + function setPriceFeed(address _priceFeed) external onlyRole(ADMIN_ROLE) { + priceFeed = _priceFeed; + } + + function setDefaultMultiplierBps( + uint16 _multiplierBps + ) external onlyRole(ADMIN_ROLE) { + defaultMultiplierBps = _multiplierBps; + } + + function setDstConfig( + DstConfigParam[] calldata _params + ) external onlyRole(ADMIN_ROLE) { + for (uint256 i = 0; i < _params.length; ++i) { + DstConfigParam calldata param = _params[i]; + dstConfig[param.dstEid] = DstConfig( + param.gas, + param.multiplierBps, + param.floorMarginUSD + ); + } + emit SetDstConfig(_params); + } + + function setFeeLib(address _feeLib) external onlyRole(ADMIN_ROLE) { + feeLib = _feeLib; + } + + function withdrawFee( + address _lib, + address _to, + uint256 _amount + ) external onlyRole(ADMIN_ROLE) { + require(hasRole(MESSAGE_LIB_ROLE, _lib), "Invalid lib"); + ISendLib(_lib).withdrawFee(_to, _amount); + emit Withdraw(_lib, _to, _amount); + } + + function getFee( + uint32 _dstEid, + uint64 _confirmations, + address _sender, + bytes calldata _options + ) external view override returns (uint256 _fee) { + IDVNFeeLib.FeeParams memory params = IDVNFeeLib.FeeParams( + priceFeed, + _dstEid, + _confirmations, + _sender, + quorum, + defaultMultiplierBps + ); + return IDVNFeeLib(feeLib).getFee(params, dstConfig[_dstEid], _options); + } + + function _verifyNuffSig( + bytes calldata reqId, + bytes32 hash, + INuffClient.SchnorrSign calldata sign, + address nuffValidGateway, + bytes calldata gatewaySignature + ) internal { + bool verified = nuff.nuffVerify( + reqId, + uint256(hash), + sign, + nuffPublicKey + ); + require(verified, "Invalid signature!"); + + if (nuffValidGateway != address(0)) { + hash = hash.toEthSignedMessageHash(); + address gatewaySignatureSigner = hash.recover(gatewaySignature); + + require( + gatewaySignatureSigner == nuffValidGateway, + "Gateway is not valid" + ); + } + } + + function _lzVerify( + uint32 _srcEid, + bytes memory _packetHeader, + bytes32 _payloadHash, + uint64 _confirmations, + address _receiver + ) internal { + address receiverLib; + if (_isV2(_srcEid)) { + (receiverLib, ) = layerZeroEndpointV2.getReceiveLibrary( + _receiver, + _srcEid + ); + } else { + receiverLib = layerZeroEndpointV1.getReceiveLibraryAddress( + _receiver + ); + } + + IReceiveUlnE2(receiverLib).verify( + _packetHeader, + _payloadHash, + _confirmations + ); + } + + function _isLocal(uint32 _dstEid) internal view returns (bool) { + if (localEid == _dstEid || localEid == _dstEid + 30000) { + return true; + } + return false; + } + + function _isV2(uint32 _eid) internal pure returns (bool) { + if (_eid > 30000) { + return true; + } + return false; + } +} diff --git a/workers/Cargo.toml b/workers/Cargo.toml index b4d62b18..711c2d12 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -16,7 +16,6 @@ futures = "0.3.31" hex = "0.4.3" serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" -sha3 = "0.10.8" tokio = { version = "1.40.0", features = ["full"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index ce4a89d4..2878fdb5 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -8,12 +8,11 @@ use alloy::{ contract::{ContractInstance, Interface}, dyn_abi::DynSolValue, network::Ethereum, - primitives::{Address, FixedBytes, U256}, + primitives::{keccak256, Address, U256}, transports::http::{Client, Http}, }; use alloy_json_abi::JsonAbi; use eyre::{eyre, OptionExt, Result}; -use sha3::{Digest, Keccak256}; use tracing::{debug, error}; /// Create a contract instance from the ABI to interact with on-chain instance. @@ -121,9 +120,9 @@ pub async fn verify( .function( "verify", &[ - DynSolValue::Bytes(packet_header.to_vec()), // PacketHeader - DynSolValue::FixedBytes(FixedBytes(payload_hash), 32), // PayloadHash - DynSolValue::Uint(confirmations, 64), // Confirmations + DynSolValue::Bytes(packet_header.to_vec()), // PacketHeader + DynSolValue::FixedBytes(payload_hash, 32), // PayloadHash + DynSolValue::Uint(confirmations, 64), // Confirmations ], )? .call() @@ -132,14 +131,6 @@ pub async fn verify( Ok(false) } -/// Hash some data with `keccak256`. -fn keccak256(data: &[u8]) -> [u8; 32] { - let mut hasher = Keccak256::default(); - hasher.update(data); - let result = hasher.finalize(); - result.into() -} - #[cfg(test)] mod tests { use super::*; From af548f84b2c423fd61ed4591f6b8a5c87784b321 Mon Sep 17 00:00:00 2001 From: Lozano Date: Tue, 15 Oct 2024 16:48:13 +0200 Subject: [PATCH 66/96] refactor: dotenv -> dotenvy --- Cargo.lock | 164 +++++++++++++++++++++++++++++++++++++++++- workers/Cargo.toml | 3 +- workers/src/config.rs | 2 +- 3 files changed, 164 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b12968a..d2bb5800 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1770,11 +1770,38 @@ dependencies = [ "zeropool-bn", ] +[[package]] +name = "blsful" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a676ce0f93ae20ca6defc223b5ac459a6f071bd88c03100a14cb93604a5e994c" +dependencies = [ + "anyhow", + "arrayref", + "blstrs_plus", + "hex", + "hkdf", + "merlin", + "pairing", + "rand", + "rand_chacha", + "rand_core", + "serde", + "serde_bare", + "sha2", + "sha3", + "subtle", + "thiserror", + "uint-zigzag", + "vsss-rs", + "zeroize", +] + [[package]] name = "blst" -version = "0.3.13" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" +checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" dependencies = [ "cc", "glob", @@ -1782,6 +1809,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "blstrs_plus" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a16dd4b0d6b4538e1fa0388843acb186363082713a8fc8416d802a04d013818" +dependencies = [ + "arrayref", + "blst", + "elliptic-curve", + "ff", + "group", + "pairing", + "rand_core", + "serde", + "subtle", + "zeroize", +] + [[package]] name = "borsh" version = "0.9.3" @@ -2230,6 +2275,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + [[package]] name = "cpp_demangle" version = "0.3.5" @@ -2813,6 +2867,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + [[package]] name = "dunce" version = "1.0.5" @@ -2932,6 +2992,7 @@ dependencies = [ "ff", "generic-array 0.14.7", "group", + "hkdf", "pkcs8", "rand_core", "sec1", @@ -3116,6 +3177,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ + "bitvec", "rand_core", "subtle", ] @@ -3397,6 +3459,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "generic-array" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +dependencies = [ + "typenum", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -3438,7 +3509,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", + "rand", "rand_core", + "rand_xorshift", "subtle", ] @@ -3548,6 +3621,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -4370,6 +4452,18 @@ dependencies = [ "autocfg", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" @@ -5879,6 +5973,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + [[package]] name = "paperclip" version = "0.8.2" @@ -7443,6 +7546,15 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "serde_bare" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c55386eed0f1ae957b091dc2ca8122f287b60c79c774cbe3d5f2b69fded660" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.15" @@ -8005,6 +8117,26 @@ dependencies = [ "syn 2.0.82", ] +[[package]] +name = "thiserror-impl-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "thiserror-no-std" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +dependencies = [ + "thiserror-impl-no-std", +] + [[package]] name = "thread_local" version = "1.1.8" @@ -8467,6 +8599,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint-zigzag" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abbf77aed65cb885a8ba07138c365879be3d9a93dce82bf6cc50feca9138ec15" +dependencies = [ + "core2", +] + [[package]] name = "unarray" version = "0.1.4" @@ -8589,6 +8730,22 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "vsss-rs" +version = "4.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fabeca519a296f0b39428cfe496b600c0179c9498687986449d61fa40e60806" +dependencies = [ + "crypto-bigint", + "elliptic-curve", + "generic-array 1.1.0", + "rand_core", + "serde", + "sha3", + "subtle", + "thiserror-no-std", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -9450,7 +9607,8 @@ version = "0.1.0" dependencies = [ "alloy", "alloy-json-abi", - "dotenv", + "blsful", + "dotenvy", "eyre", "futures", "hex", diff --git a/workers/Cargo.toml b/workers/Cargo.toml index 711c2d12..d0531a37 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -10,7 +10,8 @@ path = "src/bin/dvn.rs" [dependencies] alloy = { version = "0.4.2", features = ["full"] } alloy-json-abi = "0.8.6" -dotenv = "0.15.0" +blsful = "2.5.7" +dotenvy = "0.15.7" eyre = "0.6.12" futures = "0.3.31" hex = "0.4.3" diff --git a/workers/src/config.rs b/workers/src/config.rs index 8737e37a..a73b6f37 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -76,7 +76,7 @@ impl DVNConfig { /// Load environment variables. pub fn load_from_env() -> Result { - dotenv::dotenv()?; + dotenvy::dotenv()?; Ok(Self { ws_rpc_url: std::env::var("WS_RPC_URL").unwrap_or_else(|_| Default::default()), From f8250368febf7756f805ec92113cde4488ba176b Mon Sep 17 00:00:00 2001 From: Lozano Date: Tue, 15 Oct 2024 16:50:25 +0200 Subject: [PATCH 67/96] chore: remove Cargo.lock --- workers/Cargo.lock | 3581 -------------------------------------------- 1 file changed, 3581 deletions(-) delete mode 100644 workers/Cargo.lock diff --git a/workers/Cargo.lock b/workers/Cargo.lock deleted file mode 100644 index 9b3ecd35..00000000 --- a/workers/Cargo.lock +++ /dev/null @@ -1,3581 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "alloy" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" -dependencies = [ - "alloy-consensus", - "alloy-contract", - "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-network", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-serde", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", -] - -[[package]] -name = "alloy-chains" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c225801d42099570d0674701dddd4142f0ef715282aeb5985042e2ec962df7" -dependencies = [ - "num_enum", - "strum", -] - -[[package]] -name = "alloy-consensus" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" -dependencies = [ - "alloy-eips", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "auto_impl", - "c-kzg", - "derive_more", - "serde", -] - -[[package]] -name = "alloy-contract" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network", - "alloy-network-primitives", - "alloy-primitives", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-types-eth", - "alloy-sol-types", - "alloy-transport", - "futures", - "futures-util", - "thiserror", -] - -[[package]] -name = "alloy-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", - "alloy-rlp", - "alloy-sol-types", -] - -[[package]] -name = "alloy-dyn-abi" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", - "const-hex", - "itoa", - "serde", - "serde_json", - "winnow", -] - -[[package]] -name = "alloy-eip2930" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "serde", -] - -[[package]] -name = "alloy-eip7702" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "k256", - "serde", -] - -[[package]] -name = "alloy-eips" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "c-kzg", - "derive_more", - "once_cell", - "serde", - "sha2", -] - -[[package]] -name = "alloy-genesis" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" -dependencies = [ - "alloy-primitives", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-json-abi" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cc0e59c803dd44d14fc0cfa9fea1f74cfa8fd9fb60ca303ced390c58c28d4e" -dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-json-rpc" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" -dependencies = [ - "alloy-primitives", - "alloy-sol-types", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "alloy-network" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "thiserror", -] - -[[package]] -name = "alloy-network-primitives" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-primitives" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a289ffd7448036f2f436b377f981c79ce0b2090877bad938d43387dc09931877" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more", - "foldhash", - "hashbrown 0.15.0", - "hex-literal", - "indexmap", - "itoa", - "k256", - "keccak-asm", - "paste", - "proptest", - "rand", - "ruint", - "rustc-hash", - "serde", - "sha3", - "tiny-keccak", -] - -[[package]] -name = "alloy-provider" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" -dependencies = [ - "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-network-primitives", - "alloy-primitives", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types-eth", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", - "async-stream", - "async-trait", - "auto_impl", - "dashmap", - "futures", - "futures-utils-wasm", - "lru", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "alloy-pubsub" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", - "bimap", - "futures", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" -dependencies = [ - "alloy-rlp-derive", - "arrayvec", - "bytes", -] - -[[package]] -name = "alloy-rlp-derive" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "alloy-rpc-client" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", - "alloy-transport-ipc", - "alloy-transport-ws", - "futures", - "pin-project", - "reqwest", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-rpc-types" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" -dependencies = [ - "alloy-primitives", - "alloy-rpc-types-engine", - "alloy-rpc-types-eth", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-rpc-types-engine" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-rlp", - "derive_more", - "strum", -] - -[[package]] -name = "alloy-rpc-types-eth" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "alloy-sol-types", - "derive_more", - "itertools 0.13.0", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-serde" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-signer" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" -dependencies = [ - "alloy-primitives", - "async-trait", - "auto_impl", - "elliptic-curve", - "k256", - "thiserror", -] - -[[package]] -name = "alloy-signer-local" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" -dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", - "async-trait", - "k256", - "rand", - "thiserror", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" -dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "alloy-sol-macro-expander" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" -dependencies = [ - "alloy-json-abi", - "alloy-sol-macro-input", - "const-hex", - "heck", - "indexmap", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.79", - "syn-solidity", - "tiny-keccak", -] - -[[package]] -name = "alloy-sol-macro-input" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" -dependencies = [ - "alloy-json-abi", - "const-hex", - "dunce", - "heck", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.79", - "syn-solidity", -] - -[[package]] -name = "alloy-sol-type-parser" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd3548d5262867c2c4be6223fe4f2583e21ade0ca1c307fd23bc7f28fca479e" -dependencies = [ - "serde", - "winnow", -] - -[[package]] -name = "alloy-sol-types" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", - "const-hex", - "serde", -] - -[[package]] -name = "alloy-transport" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" -dependencies = [ - "alloy-json-rpc", - "base64", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-transport-http" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" -dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest", - "serde_json", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-transport-ipc" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90cf9cde7f2fce617da52768ee28f522264b282d148384a4ca0ea85af04fa3a" -dependencies = [ - "alloy-json-rpc", - "alloy-pubsub", - "alloy-transport", - "bytes", - "futures", - "interprocess", - "pin-project", - "serde_json", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "alloy-transport-ws" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" -dependencies = [ - "alloy-pubsub", - "alloy-transport", - "futures", - "http", - "rustls", - "serde_json", - "tokio", - "tokio-tungstenite", - "tracing", - "ws_stream_wasm", -] - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.1", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", -] - -[[package]] -name = "auto_impl" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -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 = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "blst" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" -dependencies = [ - "serde", -] - -[[package]] -name = "c-kzg" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" -dependencies = [ - "blst", - "cc", - "glob", - "hex", - "libc", - "once_cell", - "serde", -] - -[[package]] -name = "cc" -version = "1.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "const-hex" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "unicode-xid", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "doctest-file" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "futures-utils-wasm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" -dependencies = [ - "foldhash", - "serde", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.0", - "serde", -] - -[[package]] -name = "interprocess" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f4e4a06d42fab3e85ab1b419ad32b09eab58b901d40c57935ff92db3287a13" -dependencies = [ - "doctest-file", - "futures-core", - "libc", - "recvmsg", - "tokio", - "widestring", - "windows-sys 0.52.0", -] - -[[package]] -name = "ipnet" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "keccak-asm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.159" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "lru" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" -dependencies = [ - "portable-atomic", -] - -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parity-scale-codec" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.1", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "proc-macro2" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax 0.8.5", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "serde", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "recvmsg" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "reqwest" -version = "0.12.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 1.0.1", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-registry", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "ruint" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver 1.0.23", -] - -[[package]] -name = "rustix" -version = "0.38.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "schannel" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" -dependencies = [ - "core-foundation-sys", - "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.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - -[[package]] -name = "serde" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.210" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "serde_json" -version = "1.0.128" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sha3-asm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" -dependencies = [ - "cc", - "cfg-if", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.79", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thiserror" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", -] - -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 0.1.2", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "rustls", - "rustls-pki-types", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.79", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" - -[[package]] -name = "web-sys" -version = "0.3.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.26.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[package]] -name = "workers" -version = "0.1.0" -dependencies = [ - "alloy", - "alloy-json-abi", - "dotenv", - "eyre", - "futures", - "hex", - "serde", - "serde_json", - "sha3", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", -] From 131c35172233a63b38edd551bdfcf09a6ab0c4dd Mon Sep 17 00:00:00 2001 From: Lozano Date: Tue, 15 Oct 2024 18:14:06 +0200 Subject: [PATCH 68/96] refactor: move config to `config-rs` crate --- .gitignore | 3 + Cargo.lock | 202 ++++++++++++++++++++++++++++++- workers/Cargo.toml | 3 +- workers/src/bin/dvn.rs | 49 +++++--- workers/src/chain/connections.rs | 9 +- workers/src/chain/contracts.rs | 59 +++++---- workers/src/config.rs | 100 ++++----------- 7 files changed, 290 insertions(+), 135 deletions(-) diff --git a/.gitignore b/.gitignore index d367a739..fbd735af 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ setup/plugin/config/keys/ecdsa.json # Near DA RPC libs libnear_da_rpc_sys.* +# Ignore configuration for DVN or Executor +**/config_dvn.toml +**/config_executor.toml diff --git a/Cargo.lock b/Cargo.lock index d2bb5800..01afbbc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1497,7 +1497,7 @@ checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" dependencies = [ "attohttpc", "dirs", - "rust-ini", + "rust-ini 0.18.0", "serde", "serde-xml-rs", "thiserror", @@ -1672,6 +1672,9 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -2198,6 +2201,26 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "config" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +dependencies = [ + "async-trait", + "convert_case 0.6.0", + "json5", + "lazy_static", + "nom", + "pathdiff", + "ron", + "rust-ini 0.19.0", + "serde", + "serde_json", + "toml 0.8.19", + "yaml-rust", +] + [[package]] name = "console" version = "0.15.8" @@ -2230,6 +2253,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -2242,6 +2285,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.16.2" @@ -2739,7 +2791,7 @@ version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -2849,6 +2901,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +[[package]] +name = "dlv-list" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -4077,6 +4138,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + [[package]] name = "json_comments" version = "0.2.2" @@ -4238,6 +4310,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -5931,10 +6009,20 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ - "dlv-list", + "dlv-list 0.3.0", "hashbrown 0.12.3", ] +[[package]] +name = "ordered-multimap" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +dependencies = [ + "dlv-list 0.5.2", + "hashbrown 0.13.2", +] + [[package]] name = "overload" version = "0.1.1" @@ -6177,6 +6265,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pathdiff" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -6230,6 +6324,40 @@ dependencies = [ "ucd-trie", ] +[[package]] +name = "pest_derive" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.82", +] + +[[package]] +name = "pest_meta" +version = "2.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + [[package]] name = "pharos" version = "0.5.3" @@ -6430,7 +6558,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -7098,6 +7226,18 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "ron" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +dependencies = [ + "base64 0.21.7", + "bitflags 2.6.0", + "serde", + "serde_derive", +] + [[package]] name = "ruint" version = "1.12.3" @@ -7135,7 +7275,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ "cfg-if 1.0.0", - "ordered-multimap", + "ordered-multimap 0.4.3", +] + +[[package]] +name = "rust-ini" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +dependencies = [ + "cfg-if 1.0.0", + "ordered-multimap 0.6.0", ] [[package]] @@ -7607,6 +7757,15 @@ dependencies = [ "syn 2.0.82", ] +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -8367,11 +8526,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -8380,6 +8554,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.6.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -8641,6 +8817,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "unicode-width" version = "0.1.14" @@ -9608,6 +9790,7 @@ dependencies = [ "alloy", "alloy-json-abi", "blsful", + "config", "dotenvy", "eyre", "futures", @@ -9690,6 +9873,15 @@ dependencies = [ "lzma-sys", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yansi" version = "0.5.1" diff --git a/workers/Cargo.toml b/workers/Cargo.toml index d0531a37..4b2b3c3d 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -9,8 +9,9 @@ path = "src/bin/dvn.rs" [dependencies] alloy = { version = "0.4.2", features = ["full"] } -alloy-json-abi = "0.8.6" +alloy-json-abi = "0.8.8" blsful = "2.5.7" +config = { version = "0.14.0", features = ["toml"] } dotenvy = "0.15.7" eyre = "0.6.12" futures = "0.3.31" diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 0b3913f9..60d9a5ea 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -1,5 +1,6 @@ //! Main offchain workflow for Nuff DVN. +use alloy::primitives::{Address, U256}; use eyre::Result; use futures::stream::StreamExt; use tracing::{debug, error, info}; @@ -36,7 +37,8 @@ async fn main() -> Result<()> { //let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; //let sendlib_contract = create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; - let receivelib_contract = create_contract_instance(dvn_worker.config(), http_provider, receivelib_abi)?; + let contract_address = dvn_data.config().receivelib_uln302_addr.parse::
()?; + let receivelib_contract = create_contract_instance(contract_address, http_provider, receivelib_abi)?; info!("Listening to chain events..."); @@ -60,31 +62,38 @@ async fn main() -> Result<()> { info!("DVNFeePaid event found and decoded."); let required_dvns = inner_log.inner.requiredDVNs.clone(); - if required_dvns.contains(&dvn_worker.config().dvn_addr()?) { - info!("Found DVN in required DVNs."); + info!("DVNFeePaid event found and decoded."); + let required_dvns = inner_log.inner.requiredDVNs.clone(); + let own_dvn_addr = dvn_data.config().dvn_addr.parse::
()?; - // NOTE: the docs' workflow require now to query L0's endpoint to - // get the address of the MessageLib, but we have already created - // the contract above to query it directly. + if required_dvns.contains(&own_dvn_addr) { + debug!("Found DVN in required DVNs."); let required_confirmations = query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; - let already_verified = query_already_verified( - &receivelib_contract, - dvn_worker.config().dvn_addr()?, - &[1, 2, 3], - &[1, 2, 3], - required_confirmations, - ) - .await?; + let eid = U256::from(dvn_data.config().network_id); + let required_confirmations = query_confirmations(&receivelib_contract, eid).await?; - if already_verified { - debug!("Packet already verified."); - } else { - // If the packet was stored when emited in the PacketSent event. - if let Some(packet) = dvn_worker.packet() { - dvn_worker.verifying(); + // Prepare the header + let header = packet_v1_codec::header(packet.encodedPayload.as_ref()).to_vec(); + // Prepate the payload. + let payload = packet_v1_codec::payload(packet.encodedPayload.as_ref()).to_vec(); + + // Check + let already_verified = query_already_verified( + &receivelib_contract, + own_dvn_addr, + &header, + &payload, + required_confirmations, + ) + .await?; + + if already_verified { + debug!("Packet already verified."); + } else { + dvn_data.verifying(); debug!("Packet NOT verified. Calling verification."); // FIXME: incorrect data verify( diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs index 01669a2c..3688c70c 100644 --- a/workers/src/chain/connections.rs +++ b/workers/src/chain/connections.rs @@ -6,6 +6,7 @@ use crate::{ }; use alloy::{ eips::BlockNumberOrTag, + primitives::Address, providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, pubsub::{PubSubFrontend, SubscriptionStream}, rpc::types::{Filter, Log}, @@ -22,19 +23,19 @@ pub async fn build_subscriptions( SubscriptionStream, )> { // Create the provider - let rpc_url = config.ws_rpc(); + let rpc_url = config.ws_rpc_url.clone(); let ws = WsConnect::new(rpc_url); let provider = ProviderBuilder::new().on_ws(ws).await?; // layerzero endpoint filter let packet_filter = Filter::new() - .address(config.l0_addr()?) + .address(config.l0_endpoint_addr.parse::
()?) .event(DVNEvent::PacketSent.as_ref()) .from_block(BlockNumberOrTag::Latest); // messagelib endpoint filter let fee_paid_filter = Filter::new() - .address(config.sendlib_uln302_addr()?) + .address(config.sendlib_uln302_addr.parse::
()?) .event(DVNEvent::FeePaid.as_ref()) .from_block(BlockNumberOrTag::Latest); @@ -62,6 +63,6 @@ pub fn get_abi_from_path(path: &str) -> Result { /// Construct an HTTP provider given the config. pub fn get_http_provider(config: &DVNConfig) -> Result { - let http_provider = ProviderBuilder::new().on_http(config.http_rpc()?); + let http_provider = ProviderBuilder::new().on_http(config.http_rpc_url.parse()?); Ok(http_provider) } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 2878fdb5..04c37c40 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -16,12 +16,9 @@ use eyre::{eyre, OptionExt, Result}; use tracing::{debug, error}; /// Create a contract instance from the ABI to interact with on-chain instance. -pub fn create_contract_instance(config: &DVNConfig, http_provider: HttpProvider, abi: JsonAbi) -> Result { - let contract: ContractInstance, _, Ethereum> = ContractInstance::new( - config.sendlib_uln302_addr()?, - http_provider.clone(), - Interface::new(abi), - ); +pub fn create_contract_instance(addr: Address, http_provider: HttpProvider, abi: JsonAbi) -> Result { + let contract: ContractInstance, _, Ethereum> = + ContractInstance::new(addr, http_provider.clone(), Interface::new(abi)); Ok(contract) } @@ -131,28 +128,28 @@ pub async fn verify( Ok(false) } -#[cfg(test)] -mod tests { - use super::*; - use crate::{ - chain::connections::{get_abi_from_path, get_http_provider}, - config, - }; - - #[tokio::test] - async fn test_get_confirmations() -> Result<()> { - // Set up - let config = config::DVNConfig::load_from_env()?; - let http_provider = get_http_provider(&config)?; - let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; - let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; - - // Query contract value - let required_confirmations = query_confirmations(&sendlib_contract, U256::from(30110)).await?; - - // Check the value is what we expect - assert_eq!(required_confirmations, U256::from(20)); - - Ok(()) - } -} +//#[cfg(test)] +//mod tests { +// use super::*; +// use crate::{ +// chain::connections::{get_abi_from_path, get_http_provider}, +// config, +// }; +// +// #[tokio::test] +// async fn test_get_confirmations() -> Result<()> { +// // Set up +// let config = config::DVNConfig::load_from_env()?; +// let http_provider = get_http_provider(&config)?; +// let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; +// let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; +// +// // Query contract value +// let required_confirmations = query_confirmations(&sendlib_contract, U256::from(30110)).await?; +// +// // Check the value is what we expect +// assert_eq!(required_confirmations, U256::from(20)); +// +// Ok(()) +// } +//} diff --git a/workers/src/config.rs b/workers/src/config.rs index a73b6f37..9f1d4ff2 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -1,96 +1,38 @@ //! Configuration for the DVN offchain workflow. -use alloy::{ - primitives::{Address, U256}, - transports::http::reqwest::Url, -}; +use config::Config; use eyre::Result; +use serde::Deserialize; -#[derive(Default)] +#[derive(Default, Deserialize)] pub struct DVNConfig { /// The Websocket RPC URL to connect to the Ethereum network. - ws_rpc_url: String, + pub ws_rpc_url: String, /// The HTTP RPC URL to connect to the Ethereum network. - http_rpc_url: String, + pub http_rpc_url: String, /// The LayerZero endpoint address. - l0_endpoint_addr: String, + pub l0_endpoint_addr: String, /// The SendLib Ultra Light Node 302 address. - sendlib_uln302_addr: String, + pub sendlib_uln302_addr: String, /// The ReceiveLib Ultra Light Node 302 address. - receivelib_uln302_addr: String, + pub receivelib_uln302_addr: String, /// The SendLib Ultra Light Node 301 address. - sendlib_uln301_addr: String, + pub sendlib_uln301_addr: String, /// The ReceiveLib Ultra Light Node 301 address. - receivelib_uln301_addr: String, + pub receivelib_uln301_addr: String, /// The Ethereum network ID. - network_id: u64, + pub network_id: u64, /// Own DVN address. Used to check when the DVN is assigned to a task. - dvn_addr: String, + pub dvn_addr: String, } impl DVNConfig { - /// Get the chain's RPC URL. - pub fn ws_rpc(&self) -> &str { - &self.ws_rpc_url - } - - /// Get the chain's RPC URL. - pub fn http_rpc(&self) -> Result { - Ok(self.http_rpc_url.parse::()?) - } - - /// Get the LayerZero endpoint address. - pub fn l0_addr(&self) -> Result
{ - Ok(self.l0_endpoint_addr.parse::
()?) - } - - /// Get the SendLib ULN302 address. - pub fn sendlib_uln302_addr(&self) -> Result
{ - Ok(self.sendlib_uln302_addr.parse::
()?) - } - - /// Get the ReceiveLib ULN302 address. - pub fn receivelib_uln302_addr(&self) -> Result
{ - Ok(self.receivelib_uln302_addr.parse::
()?) - } - - /// Get the SendLib ULN301 address. - pub fn sendlib_uln301_addr(&self) -> Result
{ - Ok(self.sendlib_uln301_addr.parse::
()?) - } - - /// Get the ReceiveLib ULN301 address. - pub fn receivelib_uln301_addr(&self) -> Result
{ - Ok(self.receivelib_uln301_addr.parse::
()?) - } - - /// Get the EID as U256. - pub fn eid(&self) -> U256 { - U256::from(self.network_id) - } - - /// Get the DVN address. - pub fn dvn_addr(&self) -> Result
{ - Ok(self.dvn_addr.parse::
()?) - } - /// Load environment variables. pub fn load_from_env() -> Result { - dotenvy::dotenv()?; - - Ok(Self { - ws_rpc_url: std::env::var("WS_RPC_URL").unwrap_or_else(|_| Default::default()), - http_rpc_url: std::env::var("HTTP_RPC_URL").unwrap_or_else(|_| Default::default()), - l0_endpoint_addr: std::env::var("L0_ENDPOINT_ADDR").unwrap_or_else(|_| Default::default()), - sendlib_uln302_addr: std::env::var("SENDLIB_ULN302_ADDR").unwrap_or_else(|_| Default::default()), - receivelib_uln302_addr: std::env::var("RECEIVELIB_ULN302_ADDR").unwrap_or_else(|_| Default::default()), - sendlib_uln301_addr: std::env::var("SENDLIB_ULN301_ADDR").unwrap_or_else(|_| Default::default()), - receivelib_uln301_addr: std::env::var("RECEIVELIB_ULN301_ADDR").unwrap_or_else(|_| Default::default()), - network_id: std::env::var("NETWORK_EID") - .unwrap_or_else(|_| "0".to_string()) - .parse::()?, - dvn_addr: std::env::var("DVN_ADDR").unwrap_or_else(|_| Default::default()), - }) + let settings = Config::builder() + .add_source(config::File::with_name("workers/config_dvn")) + .build()?; + Ok(settings.try_deserialize::()?) } } @@ -108,3 +50,13 @@ impl AsRef for DVNEvent { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn load_config_from_env() { + let conf = DVNConfig::load_from_env().unwrap(); + } +} From 4a5cc5ce5e5683987bb8f6de951c77d9509ec694 Mon Sep 17 00:00:00 2001 From: Lozano Date: Wed, 16 Oct 2024 17:42:05 +0200 Subject: [PATCH 69/96] refactor: move to manual decoding --- Cargo.lock | 1 + workers/Cargo.toml | 2 + workers/src/abi.rs | 6 +- workers/src/bin/dvn.rs | 17 +++-- workers/src/chain/contracts.rs | 31 +------- workers/src/codec/mod.rs | 2 + workers/src/codec/packet_v1_codec.rs | 85 +++++++++++++++++++++ workers/src/config.rs | 4 +- workers/src/data/dvn.rs | 108 ++++++++++++++++++++++++--- 9 files changed, 201 insertions(+), 55 deletions(-) create mode 100644 workers/src/codec/mod.rs create mode 100644 workers/src/codec/packet_v1_codec.rs diff --git a/Cargo.lock b/Cargo.lock index 01afbbc4..578957ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9790,6 +9790,7 @@ dependencies = [ "alloy", "alloy-json-abi", "blsful", + "bytes", "config", "dotenvy", "eyre", diff --git a/workers/Cargo.toml b/workers/Cargo.toml index 4b2b3c3d..e4414a77 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -10,7 +10,9 @@ path = "src/bin/dvn.rs" [dependencies] alloy = { version = "0.4.2", features = ["full"] } alloy-json-abi = "0.8.8" +#alloy-rlp = "0.3.8" blsful = "2.5.7" +bytes = "1.7.2" config = { version = "0.14.0", features = ["toml"] } dotenvy = "0.15.7" eyre = "0.6.12" diff --git a/workers/src/abi.rs b/workers/src/abi.rs index d352fe8f..75555bcb 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; sol!( #[allow(missing_docs)] - #[sol(rpc)] + #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] SendLibraryAbi, "abi/ArbitrumSendLibUln302.json" @@ -15,7 +15,7 @@ sol!( sol!( #[allow(missing_docs)] - #[sol(rpc)] + #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] ReceiveLibraryAbi, "abi/ArbitrumReceiveLibUln302.json" @@ -23,7 +23,7 @@ sol!( sol!( #[allow(missing_docs)] - #[sol(rpc)] + #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] L0V2EndpointAbi, "abi/ArbitrumL0V2Endpoint.json" diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 60d9a5ea..e2fbe66c 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -75,10 +75,10 @@ async fn main() -> Result<()> { let eid = U256::from(dvn_data.config().network_id); let required_confirmations = query_confirmations(&receivelib_contract, eid).await?; - // Prepare the header - let header = packet_v1_codec::header(packet.encodedPayload.as_ref()).to_vec(); - // Prepate the payload. - let payload = packet_v1_codec::payload(packet.encodedPayload.as_ref()).to_vec(); + // Prepare the header hash. + let header_hash = dvn_data.get_header_hash(); + // Prepate the payload hash. + let message_hash = dvn_data.get_message_hash(); // Check let already_verified = query_already_verified( @@ -98,14 +98,15 @@ async fn main() -> Result<()> { // FIXME: incorrect data verify( &receivelib_contract, - &packet.options, - &packet.encodedPayload, + own_dvn_addr, + header.as_ref(), + payload.as_ref(), required_confirmations, ) .await?; - } else { - debug!("No packet data found. Skipping verification."); } + } else { + dvn_data.reset_packet(); } } } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 04c37c40..88620a9f 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -1,9 +1,6 @@ //! Utilities for interacting with onchain contracts. -use crate::{ - chain::{ContractInst, HttpProvider}, - config::DVNConfig, -}; +use crate::chain::{ContractInst, HttpProvider}; use alloy::{ contract::{ContractInstance, Interface}, dyn_abi::DynSolValue, @@ -127,29 +124,3 @@ pub async fn verify( Ok(false) } - -//#[cfg(test)] -//mod tests { -// use super::*; -// use crate::{ -// chain::connections::{get_abi_from_path, get_http_provider}, -// config, -// }; -// -// #[tokio::test] -// async fn test_get_confirmations() -> Result<()> { -// // Set up -// let config = config::DVNConfig::load_from_env()?; -// let http_provider = get_http_provider(&config)?; -// let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; -// let sendlib_contract = create_contract_instance(&config, http_provider, sendlib_abi)?; -// -// // Query contract value -// let required_confirmations = query_confirmations(&sendlib_contract, U256::from(30110)).await?; -// -// // Check the value is what we expect -// assert_eq!(required_confirmations, U256::from(20)); -// -// Ok(()) -// } -//} diff --git a/workers/src/codec/mod.rs b/workers/src/codec/mod.rs new file mode 100644 index 00000000..ac6329b0 --- /dev/null +++ b/workers/src/codec/mod.rs @@ -0,0 +1,2 @@ +//pub mod bytes_utils; +//pub mod packet_v1_codec; diff --git a/workers/src/codec/packet_v1_codec.rs b/workers/src/codec/packet_v1_codec.rs new file mode 100644 index 00000000..7031caf6 --- /dev/null +++ b/workers/src/codec/packet_v1_codec.rs @@ -0,0 +1,85 @@ +use crate::abi::PacketStruct; +use crate::codec::bytes_utils::BytesUtils; + +pub const PACKET_VERSION: u8 = 1; +pub const PACKET_HEADER_SIZE: usize = 81; + +// header (version + nonce + path) +// version +const PACKET_VERSION_OFFSET: usize = 0; +// nonce +const NONCE_OFFSET: usize = 1; +// path +const SRC_EID_OFFSET: usize = 9; +const SENDER_OFFSET: usize = 13; +const DST_EID_OFFSET: usize = 45; +const RECEIVER_OFFSET: usize = 49; +// payload (guid + message) +const GUID_OFFSET: usize = 81; +const MESSAGE_OFFSET: usize = 113; + +pub fn encode(packet: &PacketStruct) -> Vec { + [ + &PACKET_VERSION.to_be_bytes()[..], + &packet.nonce.to_be_bytes()[..], + &packet.srcEid.to_be_bytes()[..], + &packet.sender.to_vec()[..], + &packet.dstEid.to_be_bytes()[..], + &packet.receiver[..], + &packet.guid[..], + &packet.message, + ] + .concat() +} + +pub fn encode_packet_header(packet: &PacketStruct) -> Vec { + [ + &PACKET_VERSION.to_be_bytes()[..], + &packet.nonce.to_be_bytes()[..], + &packet.srcEid.to_be_bytes()[..], + &packet.sender.to_vec()[..], + &packet.dstEid.to_be_bytes()[..], + &packet.receiver[..], + ] + .concat() +} + +pub fn header(packet: &[u8]) -> &[u8] { + &packet[0..GUID_OFFSET] +} + +pub fn version(packet: &[u8]) -> u8 { + packet.to_u8(PACKET_VERSION_OFFSET) +} + +pub fn nonce(packet: &[u8]) -> u64 { + packet.to_u64(NONCE_OFFSET) +} + +pub fn src_eid(packet: &[u8]) -> u32 { + packet.to_u32(SRC_EID_OFFSET) +} + +pub fn sender(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(SENDER_OFFSET) +} + +pub fn dst_eid(packet: &[u8]) -> u32 { + packet.to_u32(DST_EID_OFFSET) +} + +pub fn receiver(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(RECEIVER_OFFSET) +} + +pub fn guid(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(GUID_OFFSET) +} + +pub fn message(packet: &[u8]) -> &[u8] { + &packet[MESSAGE_OFFSET..] +} + +pub fn payload(packet: &[u8]) -> &[u8] { + &packet[GUID_OFFSET..] +} diff --git a/workers/src/config.rs b/workers/src/config.rs index 9f1d4ff2..a981249e 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -21,7 +21,7 @@ pub struct DVNConfig { /// The ReceiveLib Ultra Light Node 301 address. pub receivelib_uln301_addr: String, /// The Ethereum network ID. - pub network_id: u64, + pub network_eid: u64, /// Own DVN address. Used to check when the DVN is assigned to a task. pub dvn_addr: String, } @@ -30,7 +30,7 @@ impl DVNConfig { /// Load environment variables. pub fn load_from_env() -> Result { let settings = Config::builder() - .add_source(config::File::with_name("workers/config_dvn")) + .add_source(config::File::with_name("./config_dvn")) .build()?; Ok(settings.try_deserialize::()?) } diff --git a/workers/src/data/dvn.rs b/workers/src/data/dvn.rs index a53a0c6c..515a772a 100644 --- a/workers/src/data/dvn.rs +++ b/workers/src/data/dvn.rs @@ -1,15 +1,15 @@ use crate::abi::L0V2EndpointAbi::PacketSent; use crate::config; use crate::config::DVNConfig; +use alloy::primitives::{keccak256, FixedBytes, B256}; +use bytes::{Buf, BufMut, BytesMut}; use eyre::Result; -//use alloy::primitives::{Address, U256}; +use tracing::debug; pub struct Dvn { config: DVNConfig, status: DvnStatus, packet: Option, - //receivelib_address: Option
, - //num_confirmations: Option, } pub enum DvnStatus { @@ -25,8 +25,6 @@ impl Dvn { config, status: DvnStatus::Stopped, packet: None, - //receivelib_address: None, - //num_confirmations: None, } } @@ -46,21 +44,107 @@ impl Dvn { self.status = DvnStatus::Listening; } - pub fn stop(&mut self) { - self.status = DvnStatus::Stopped; - } - - pub fn packet_received(&mut self, packet_log: PacketSent) { - self.packet = Some(packet_log); + pub fn packet_received(&mut self, packet: PacketSent) { + self.packet = Some(packet); self.status = DvnStatus::PacketReceived; } pub fn reset_packet(&mut self) { self.packet = None; - self.status = DvnStatus::Stopped; + self.status = DvnStatus::Listening; + debug!("DVN not required, stored packet dropped") } pub fn verifying(&mut self) { self.status = DvnStatus::Verifying; } + + pub fn get_header(&self) -> Option
{ + if let Some(packet) = self.packet.as_ref() { + extract_header(packet.encodedPayload.as_ref()) + } else { + None + } + } + + pub fn get_header_hash(&self) -> Option { + if let Some(packet) = self.packet.as_ref() { + extract_header(packet.encodedPayload.as_ref()).map(|header| keccak256(header.to_slice())) + } else { + None + } + } + + pub fn get_message_hash(&self) -> Option { + if let Some(packet) = self.packet.as_ref() { + extract_message(packet.encodedPayload.as_ref()).map(|message| keccak256(message.as_slice())) + } else { + None + } + } +} + +/// Minimum length of a packet. +const MINIMUM_PACKET_LENGTH: usize = 93; // 1 + 8 + 4 + 32 + 4 + 32 + 32 + +/// The whole header from the message. +pub struct Header { + version: u8, + nonce: u64, + src_eid: u32, + sender_addr: u32, + dst_eid: u32, + rcv_addr: FixedBytes<32>, + guid: FixedBytes<32>, +} + +impl Header { + pub fn to_slice(&self) -> Vec { + let mut header = BytesMut::new(); + header.put_u8(self.version); + header.put_u64(self.nonce); + header.put_u32(self.src_eid); + header.put_u32(self.sender_addr); + header.put_u32(self.dst_eid); + header.put_slice(self.rcv_addr.as_ref()); + header.put_slice(self.guid.as_ref()); + header.to_vec() + } +} + +/// When feeded a packet, return the whole header, which is everything but the message. +pub fn extract_header(raw_packet: &[u8]) -> Option
{ + if raw_packet.len() < MINIMUM_PACKET_LENGTH { + return None; + } + let mut buffered_packet = BytesMut::from(raw_packet); + let version = buffered_packet.get_u8(); // version + let nonce = buffered_packet.get_u64(); // nonce + let src_eid = buffered_packet.get_u32(); // src_eid + let sender_addr = buffered_packet.get_u32(); // sender address + let dst_eid = buffered_packet.get_u32(); // dst_eid + let rcv_addr: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).as_ref()); + let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze().iter().as_slice()); + + Some(Header { + version, + nonce, + src_eid, + sender_addr, + dst_eid, + rcv_addr, + guid, + }) +} + +/// When feeded a packet, return the whole message, which is everything but the header. +pub fn extract_message(raw_packet: &[u8]) -> Option> { + if raw_packet.len() < MINIMUM_PACKET_LENGTH { + return None; + } + let mut buffered_packet = BytesMut::from(raw_packet); + buffered_packet.advance(81); // version + let message = buffered_packet.freeze().to_vec(); + + Some(message) } From 4894f4ad65ef623fd9be030358310570923310fc Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 10:07:59 +0200 Subject: [PATCH 70/96] chore: modularize --- .gitignore | 1 + workers/src/codec/mod.rs | 2 - workers/src/codec/packet_v1_codec.rs | 85 ---------------------------- workers/src/data/dvn.rs | 76 ++----------------------- workers/src/data/extractors.rs | 67 ++++++++++++++++++++++ workers/src/data/mod.rs | 2 +- 6 files changed, 75 insertions(+), 158 deletions(-) delete mode 100644 workers/src/codec/mod.rs delete mode 100644 workers/src/codec/packet_v1_codec.rs create mode 100644 workers/src/data/extractors.rs diff --git a/.gitignore b/.gitignore index fbd735af..fbf66b4b 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ libnear_da_rpc_sys.* # Ignore configuration for DVN or Executor **/config_dvn.toml **/config_executor.toml +**/abi/ diff --git a/workers/src/codec/mod.rs b/workers/src/codec/mod.rs deleted file mode 100644 index ac6329b0..00000000 --- a/workers/src/codec/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -//pub mod bytes_utils; -//pub mod packet_v1_codec; diff --git a/workers/src/codec/packet_v1_codec.rs b/workers/src/codec/packet_v1_codec.rs deleted file mode 100644 index 7031caf6..00000000 --- a/workers/src/codec/packet_v1_codec.rs +++ /dev/null @@ -1,85 +0,0 @@ -use crate::abi::PacketStruct; -use crate::codec::bytes_utils::BytesUtils; - -pub const PACKET_VERSION: u8 = 1; -pub const PACKET_HEADER_SIZE: usize = 81; - -// header (version + nonce + path) -// version -const PACKET_VERSION_OFFSET: usize = 0; -// nonce -const NONCE_OFFSET: usize = 1; -// path -const SRC_EID_OFFSET: usize = 9; -const SENDER_OFFSET: usize = 13; -const DST_EID_OFFSET: usize = 45; -const RECEIVER_OFFSET: usize = 49; -// payload (guid + message) -const GUID_OFFSET: usize = 81; -const MESSAGE_OFFSET: usize = 113; - -pub fn encode(packet: &PacketStruct) -> Vec { - [ - &PACKET_VERSION.to_be_bytes()[..], - &packet.nonce.to_be_bytes()[..], - &packet.srcEid.to_be_bytes()[..], - &packet.sender.to_vec()[..], - &packet.dstEid.to_be_bytes()[..], - &packet.receiver[..], - &packet.guid[..], - &packet.message, - ] - .concat() -} - -pub fn encode_packet_header(packet: &PacketStruct) -> Vec { - [ - &PACKET_VERSION.to_be_bytes()[..], - &packet.nonce.to_be_bytes()[..], - &packet.srcEid.to_be_bytes()[..], - &packet.sender.to_vec()[..], - &packet.dstEid.to_be_bytes()[..], - &packet.receiver[..], - ] - .concat() -} - -pub fn header(packet: &[u8]) -> &[u8] { - &packet[0..GUID_OFFSET] -} - -pub fn version(packet: &[u8]) -> u8 { - packet.to_u8(PACKET_VERSION_OFFSET) -} - -pub fn nonce(packet: &[u8]) -> u64 { - packet.to_u64(NONCE_OFFSET) -} - -pub fn src_eid(packet: &[u8]) -> u32 { - packet.to_u32(SRC_EID_OFFSET) -} - -pub fn sender(packet: &[u8]) -> [u8; 32] { - packet.to_byte_array(SENDER_OFFSET) -} - -pub fn dst_eid(packet: &[u8]) -> u32 { - packet.to_u32(DST_EID_OFFSET) -} - -pub fn receiver(packet: &[u8]) -> [u8; 32] { - packet.to_byte_array(RECEIVER_OFFSET) -} - -pub fn guid(packet: &[u8]) -> [u8; 32] { - packet.to_byte_array(GUID_OFFSET) -} - -pub fn message(packet: &[u8]) -> &[u8] { - &packet[MESSAGE_OFFSET..] -} - -pub fn payload(packet: &[u8]) -> &[u8] { - &packet[GUID_OFFSET..] -} diff --git a/workers/src/data/dvn.rs b/workers/src/data/dvn.rs index 515a772a..887120e4 100644 --- a/workers/src/data/dvn.rs +++ b/workers/src/data/dvn.rs @@ -1,8 +1,9 @@ -use crate::abi::L0V2EndpointAbi::PacketSent; -use crate::config; -use crate::config::DVNConfig; -use alloy::primitives::{keccak256, FixedBytes, B256}; -use bytes::{Buf, BufMut, BytesMut}; +use crate::{ + abi::L0V2EndpointAbi::PacketSent, + config::{self, DVNConfig}, + data::extractors::{extract_header, extract_message, Header}, +}; +use alloy::primitives::{keccak256, B256}; use eyre::Result; use tracing::debug; @@ -83,68 +84,3 @@ impl Dvn { } } } - -/// Minimum length of a packet. -const MINIMUM_PACKET_LENGTH: usize = 93; // 1 + 8 + 4 + 32 + 4 + 32 + 32 - -/// The whole header from the message. -pub struct Header { - version: u8, - nonce: u64, - src_eid: u32, - sender_addr: u32, - dst_eid: u32, - rcv_addr: FixedBytes<32>, - guid: FixedBytes<32>, -} - -impl Header { - pub fn to_slice(&self) -> Vec { - let mut header = BytesMut::new(); - header.put_u8(self.version); - header.put_u64(self.nonce); - header.put_u32(self.src_eid); - header.put_u32(self.sender_addr); - header.put_u32(self.dst_eid); - header.put_slice(self.rcv_addr.as_ref()); - header.put_slice(self.guid.as_ref()); - header.to_vec() - } -} - -/// When feeded a packet, return the whole header, which is everything but the message. -pub fn extract_header(raw_packet: &[u8]) -> Option
{ - if raw_packet.len() < MINIMUM_PACKET_LENGTH { - return None; - } - let mut buffered_packet = BytesMut::from(raw_packet); - let version = buffered_packet.get_u8(); // version - let nonce = buffered_packet.get_u64(); // nonce - let src_eid = buffered_packet.get_u32(); // src_eid - let sender_addr = buffered_packet.get_u32(); // sender address - let dst_eid = buffered_packet.get_u32(); // dst_eid - let rcv_addr: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).as_ref()); - let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze().iter().as_slice()); - - Some(Header { - version, - nonce, - src_eid, - sender_addr, - dst_eid, - rcv_addr, - guid, - }) -} - -/// When feeded a packet, return the whole message, which is everything but the header. -pub fn extract_message(raw_packet: &[u8]) -> Option> { - if raw_packet.len() < MINIMUM_PACKET_LENGTH { - return None; - } - let mut buffered_packet = BytesMut::from(raw_packet); - buffered_packet.advance(81); // version - let message = buffered_packet.freeze().to_vec(); - - Some(message) -} diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs new file mode 100644 index 00000000..4b454b10 --- /dev/null +++ b/workers/src/data/extractors.rs @@ -0,0 +1,67 @@ +use alloy::primitives::FixedBytes; +use bytes::{Buf, BufMut, BytesMut}; + +/// Minimum length of a packet. +const MINIMUM_PACKET_LENGTH: usize = 93; // 1 + 8 + 4 + 32 + 4 + 32 + 32 + +/// The whole header from the message. +pub struct Header { + version: u8, + nonce: u64, + src_eid: u32, + sender_addr: u32, + dst_eid: u32, + rcv_addr: FixedBytes<32>, + guid: FixedBytes<32>, +} + +impl Header { + pub fn to_slice(&self) -> Vec { + let mut header = BytesMut::new(); + header.put_u8(self.version); + header.put_u64(self.nonce); + header.put_u32(self.src_eid); + header.put_u32(self.sender_addr); + header.put_u32(self.dst_eid); + header.put_slice(self.rcv_addr.as_ref()); + header.put_slice(self.guid.as_ref()); + header.to_vec() + } +} + +/// When feeded a packet, return the whole header, which is everything but the message. +pub fn extract_header(raw_packet: &[u8]) -> Option
{ + if raw_packet.len() < MINIMUM_PACKET_LENGTH { + return None; + } + let mut buffered_packet = BytesMut::from(raw_packet); + let version = buffered_packet.get_u8(); // version + let nonce = buffered_packet.get_u64(); // nonce + let src_eid = buffered_packet.get_u32(); // src_eid + let sender_addr = buffered_packet.get_u32(); // sender address + let dst_eid = buffered_packet.get_u32(); // dst_eid + let rcv_addr: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).as_ref()); + let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze().iter().as_slice()); + + Some(Header { + version, + nonce, + src_eid, + sender_addr, + dst_eid, + rcv_addr, + guid, + }) +} + +/// When feeded a packet, return the whole message, which is everything but the header. +pub fn extract_message(raw_packet: &[u8]) -> Option> { + if raw_packet.len() < MINIMUM_PACKET_LENGTH { + return None; + } + let mut buffered_packet = BytesMut::from(raw_packet); + buffered_packet.advance(81); // version + let message = buffered_packet.freeze().to_vec(); + + Some(message) +} diff --git a/workers/src/data/mod.rs b/workers/src/data/mod.rs index 4cec19d2..037da295 100644 --- a/workers/src/data/mod.rs +++ b/workers/src/data/mod.rs @@ -1,2 +1,2 @@ pub mod dvn; - +pub mod extractors; From 290bb852b59707b0292ab012e231c36479a4de3e Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 10:30:36 +0200 Subject: [PATCH 71/96] chore: address pr comments on the worker --- workers/src/bin/dvn.rs | 19 ++++++++----------- workers/src/chain/contracts.rs | 7 +++++-- workers/src/config.rs | 2 +- workers/src/data/dvn.rs | 14 +++----------- workers/src/data/extractors.rs | 6 ++++++ 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index e2fbe66c..5f41ce6a 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -25,19 +25,19 @@ async fn main() -> Result<()> { .with_env_filter(EnvFilter::from_default_env()) .init(); - let mut dvn_worker = Dvn::new_from_env()?; + let mut dvn_data = Dvn::new_from_env()?; // Create the WS subscriptions for listening to the events. - let (_provider, mut endpoint_stream, mut sendlib_stream) = build_subscriptions(dvn_worker.config()).await?; + let (_provider, mut endpoint_stream, mut sendlib_stream) = build_subscriptions(&dvn_data.config).await?; // Create an HTTP provider to call contract functions. - let http_provider = get_http_provider(dvn_worker.config())?; + let http_provider = get_http_provider(&dvn_data.config)?; // Get the relevant contract ABI, and create contract. //let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; //let sendlib_contract = create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; - let contract_address = dvn_data.config().receivelib_uln302_addr.parse::
()?; + let contract_address = dvn_data.config.receivelib_uln302_addr.parse::
()?; let receivelib_contract = create_contract_instance(contract_address, http_provider, receivelib_abi)?; info!("Listening to chain events..."); @@ -59,20 +59,17 @@ async fn main() -> Result<()> { Some(log) = sendlib_stream.next() => { match log.log_decode::() { Ok(inner_log) => { - info!("DVNFeePaid event found and decoded."); - let required_dvns = inner_log.inner.requiredDVNs.clone(); + if dvn_data.packet.is_some() { info!("DVNFeePaid event found and decoded."); let required_dvns = inner_log.inner.requiredDVNs.clone(); - let own_dvn_addr = dvn_data.config().dvn_addr.parse::
()?; + let own_dvn_addr = dvn_data.config.dvn_addr.parse::
()?; if required_dvns.contains(&own_dvn_addr) { debug!("Found DVN in required DVNs."); - let required_confirmations = - query_confirmations(&receivelib_contract, dvn_worker.config().eid()).await?; - - let eid = U256::from(dvn_data.config().network_id); + // Query how many confirmations are required. + let eid = U256::from(dvn_data.config.network_eid); let required_confirmations = query_confirmations(&receivelib_contract, eid).await?; // Prepare the header hash. diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 88620a9f..513b6051 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -89,7 +89,10 @@ pub async fn query_already_verified( .call() .await?; - let packet_state = match contract_state[0] { + let packet_state = match contract_state + .first() + .ok_or(eyre!("Empty response when querying `_verified`"))? + { DynSolValue::Bool(b) => Ok(b), _ => { error!("Failed to parse response from ReceiveLib for `_verified`"); @@ -97,7 +100,7 @@ pub async fn query_already_verified( } }?; - Ok(packet_state) + Ok(*packet_state) } pub async fn verify( diff --git a/workers/src/config.rs b/workers/src/config.rs index a981249e..22e49351 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -57,6 +57,6 @@ mod tests { #[test] fn load_config_from_env() { - let conf = DVNConfig::load_from_env().unwrap(); + let _conf = DVNConfig::load_from_env().unwrap(); } } diff --git a/workers/src/data/dvn.rs b/workers/src/data/dvn.rs index 887120e4..35b41ae0 100644 --- a/workers/src/data/dvn.rs +++ b/workers/src/data/dvn.rs @@ -8,9 +8,9 @@ use eyre::Result; use tracing::debug; pub struct Dvn { - config: DVNConfig, - status: DvnStatus, - packet: Option, + pub config: DVNConfig, + pub status: DvnStatus, + pub packet: Option, } pub enum DvnStatus { @@ -33,14 +33,6 @@ impl Dvn { Ok(Dvn::new(config::DVNConfig::load_from_env()?)) } - pub fn packet(&self) -> Option { - self.packet.clone() - } - - pub fn config(&self) -> &DVNConfig { - &self.config - } - pub fn listening(&mut self) { self.status = DvnStatus::Listening; } diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 4b454b10..d47fa87a 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -1,3 +1,9 @@ +//! Extract data from encoded payloads. +//! +//! FIXME: couldn't make it work with `alloy`+ABI, so +//! using manual extracting for now. +//! Re-check if it can work that way. + use alloy::primitives::FixedBytes; use bytes::{Buf, BufMut, BytesMut}; From 263cb0e5cb01d39b898a4eaa23644bd973e9103a Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 12:28:41 +0200 Subject: [PATCH 72/96] chore: move some files to lib imports --- contracts/evm/src/dvn/NuffDVN.sol | 17 ++++---- .../evm/src/dvn/interfaces/INuffClient.sol | 27 ++++++++++++ .../evm/src/dvn/interfaces/IReceiveUlnE2.sol | 43 +++++++++++++++++++ contracts/evm/test/dvn/IMBToken.sol | 11 +++++ contracts/evm/test/dvn/IMRC20.sol | 12 ++++++ 5 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 contracts/evm/src/dvn/interfaces/INuffClient.sol create mode 100644 contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol create mode 100644 contracts/evm/test/dvn/IMBToken.sol create mode 100644 contracts/evm/test/dvn/IMRC20.sol diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 9a2eb907..b4dff1b2 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -5,16 +5,15 @@ import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; -import { ILayerZeroEndpointV2 } from "./interfaces/ILayerZeroEndpointV2.sol"; +import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; -import { IReceiveUlnE2, Verification, UlnConfig } from "./interfaces/IReceiveUlnE2.sol"; -import { ISendLib } from "./interfaces/ISendLib.sol"; -import { IDVNFeeLib } from "./interfaces/IDVNFeeLib.sol"; -import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; -import { IDVN } from "./interfaces/IDVN.sol"; +import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; +import { IReceiveUlnE2, Verification, UlnConfig} from "./interfaces/IReceiveUlnE2.sol"; + import "./interfaces/INuffClient.sol"; -import "./utils/PacketV1Codec.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { using PacketV1Codec for bytes; @@ -144,7 +143,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { uint64 _confirmations, address _receiver, bytes calldata _reqId, - INuffClient.SchnorrSign calldata _signature, + INuffClient.BSLSign calldata _signature, bytes calldata gatewaySignature ) external { require(_isLocal(_dstEid), "Invalid dstEid"); @@ -273,7 +272,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { function _verifyNuffSig( bytes calldata reqId, bytes32 hash, - INuffClient.SchnorrSign calldata sign, + INuffClient.BLSSign calldata sign, address nuffValidGateway, bytes calldata gatewaySignature ) internal { diff --git a/contracts/evm/src/dvn/interfaces/INuffClient.sol b/contracts/evm/src/dvn/interfaces/INuffClient.sol new file mode 100644 index 00000000..a7fd02fc --- /dev/null +++ b/contracts/evm/src/dvn/interfaces/INuffClient.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface INuffClient { + struct BLSSign { + Signature signature; + address owner; + address nonce; + } + + struct Signature { + uint[2] X; + uint[2] Y; + } + + struct PublicKey { + uint x; + uint y; + } + + function nuffVerify( + bytes calldata reqId, + uint256 hash, + BLSSign memory signature, + PublicKey memory pubKey + ) external returns (bool); +} diff --git a/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol b/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol new file mode 100644 index 00000000..ba666a3c --- /dev/null +++ b/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +struct Verification { + bool submitted; + uint64 confirmations; +} + +struct UlnConfig { + uint64 confirmations; + uint8 requiredDVNCount; + uint8 optionalDVNCount; + uint8 optionalDVNThreshold; + address[] requiredDVNs; + address[] optionalDVNs; +} + +/// @dev should be implemented by the ReceiveUln302 contract and future ReceiveUln contracts on EndpointV2 +interface IReceiveUlnE2 { + /// @notice for each dvn to verify the payload + function verify( + bytes calldata _packetHeader, + bytes32 _payloadHash, + uint64 _confirmations + ) external; + + /// @notice verify the payload at endpoint, will check if all DVNs verified + function commitVerification( + bytes calldata _packetHeader, + bytes32 _payloadHash + ) external; + + function hashLookup( + bytes32 _headerHash, + bytes32 _payloadHash, + address _dnv + ) external view returns (Verification memory); + + function getUlnConfig( + address _oapp, + uint32 _remoteEid + ) external view returns (UlnConfig memory rtnConfig); +} diff --git a/contracts/evm/test/dvn/IMBToken.sol b/contracts/evm/test/dvn/IMBToken.sol new file mode 100644 index 00000000..6d412b0b --- /dev/null +++ b/contracts/evm/test/dvn/IMBToken.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; +import {MessagingFee, SendParam, IOFT} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol"; + +interface IMBToken is IOFT { + function mint(address to, uint256 amount) external; + + function burnFrom(address from, uint256 amount) external; +} diff --git a/contracts/evm/test/dvn/IMRC20.sol b/contracts/evm/test/dvn/IMRC20.sol new file mode 100644 index 00000000..a3f03f7b --- /dev/null +++ b/contracts/evm/test/dvn/IMRC20.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +interface IMRC20 is IERC20 { + function mint(address reveiver, uint256 amount) external; + + function burn(uint256 amount) external; + + function burnFrom(address account, uint256 amount) external; +} From b9b81fbac63a61c2d4159b4a19d9cb00a69d773c Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 12:35:30 +0200 Subject: [PATCH 73/96] chore: remove unused tests for now --- contracts/evm/test/dvn/IMBToken.sol | 11 ----------- contracts/evm/test/dvn/IMRC20.sol | 12 ------------ 2 files changed, 23 deletions(-) delete mode 100644 contracts/evm/test/dvn/IMBToken.sol delete mode 100644 contracts/evm/test/dvn/IMRC20.sol diff --git a/contracts/evm/test/dvn/IMBToken.sol b/contracts/evm/test/dvn/IMBToken.sol deleted file mode 100644 index 6d412b0b..00000000 --- a/contracts/evm/test/dvn/IMBToken.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {ILayerZeroEndpointV2} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppCore.sol"; -import {MessagingFee, SendParam, IOFT} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol"; - -interface IMBToken is IOFT { - function mint(address to, uint256 amount) external; - - function burnFrom(address from, uint256 amount) external; -} diff --git a/contracts/evm/test/dvn/IMRC20.sol b/contracts/evm/test/dvn/IMRC20.sol deleted file mode 100644 index a3f03f7b..00000000 --- a/contracts/evm/test/dvn/IMRC20.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -interface IMRC20 is IERC20 { - function mint(address reveiver, uint256 amount) external; - - function burn(uint256 amount) external; - - function burnFrom(address account, uint256 amount) external; -} From 62994a81dba8ef29777e82e7f08f4dd29e567783 Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 12:38:34 +0200 Subject: [PATCH 74/96] chore: reorder imports --- contracts/evm/src/dvn/NuffDVN.sol | 6 +- contracts/evm/src/dvn/NuffDVNv2.sol | 337 ++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+), 3 deletions(-) create mode 100644 contracts/evm/src/dvn/NuffDVNv2.sol diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index b4dff1b2..48081373 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -6,13 +6,13 @@ import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; + import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; -import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; import { IReceiveUlnE2, Verification, UlnConfig} from "./interfaces/IReceiveUlnE2.sol"; - import "./interfaces/INuffClient.sol"; -import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { diff --git a/contracts/evm/src/dvn/NuffDVNv2.sol b/contracts/evm/src/dvn/NuffDVNv2.sol new file mode 100644 index 00000000..035f1a57 --- /dev/null +++ b/contracts/evm/src/dvn/NuffDVNv2.sol @@ -0,0 +1,337 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; + +import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; + +import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; +import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; +import { IReceiveUlnE2, Verification, UlnConfig} from "./interfaces/IReceiveUlnE2.sol"; +import "./interfaces/INuffClient.sol"; +import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; + +contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { + using PacketV1Codec for bytes; + using ECDSA for bytes32; + using MessageHashUtils for bytes32; + + struct Job { + address origin; + uint32 srcEid; + uint32 dstEid; + bytes packetHeader; + bytes32 payloadHash; + uint64 confirmations; + address sender; + address receiver; + bytes options; + } + + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + bytes32 public constant MESSAGE_LIB_ROLE = keccak256("MESSAGE_LIB_ROLE"); + + ILayerZeroEndpointV2 public layerZeroEndpointV2; + ILayerZeroEndpoint public layerZeroEndpointV1; + uint32 public immutable localEid; + + uint256 public lastJobId; + + uint256 public nuffAppId; + INuffClient.PublicKey public nuffPublicKey; + INuffClient public nuff; + INuffDVNConfig public dvnConfig; + + uint16 public defaultMultiplierBps; + uint64 public quorum; + address public priceFeed; + address public feeLib; + + mapping(uint256 => Job) public jobs; + + // eid => bool + mapping(uint32 => bool) public supportedDstChain; + mapping(uint32 dstEid => DstConfig) public dstConfig; + // srcEid => ( jobId => isVerified ) + mapping(uint32 => mapping(uint256 => bool)) public verifiedJobs; + + event JobAssigned(uint256 jobId); + event Verified(uint32 srcEid, uint256 jobId); + + constructor( + uint256 _nuffAppId, + INuffClient.PublicKey memory _nuffPublicKey, + address _nuff, + address _layerZeroEndpointV2, + address _layerZeroEndpointV1, + address _dvnConfig, + uint16 _defaultMultiplierBps, + uint64 _quorum, + address _priceFeed, + address _feeLib + ) { + nuffAppId = _nuffAppId; + nuffPublicKey = _nuffPublicKey; + nuff = INuffClient(_nuff); + layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); + layerZeroEndpointV1 = ILayerZeroEndpoint(_layerZeroEndpointV1); + dvnConfig = INuffDVNConfig(_dvnConfig); + localEid = layerZeroEndpointV2.eid(); + defaultMultiplierBps = _defaultMultiplierBps; + quorum = _quorum; + priceFeed = _priceFeed; + feeLib = _feeLib; + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(ADMIN_ROLE, msg.sender); + } + + function assignJob( + AssignJobParam calldata _param, + bytes calldata _options + ) + external + payable + override + onlyRole(MESSAGE_LIB_ROLE) + returns (uint256 fee) + { + require(supportedDstChain[_param.dstEid], "Unsupported chain"); + + uint256 jobId = ++lastJobId; + Job storage newJob = jobs[jobId]; + + newJob.origin = msg.sender; + newJob.srcEid = localEid; + newJob.dstEid = _param.dstEid; + newJob.packetHeader = _param.packetHeader; + newJob.payloadHash = _param.payloadHash; + newJob.confirmations = _param.confirmations; + newJob.sender = _param.sender; + newJob.receiver = address( + uint160(uint256(_param.packetHeader.receiver())) + ); + newJob.options = _options; + + IDVNFeeLib.FeeParams memory feeParams = IDVNFeeLib.FeeParams( + priceFeed, + _param.dstEid, + _param.confirmations, + _param.sender, + quorum, + defaultMultiplierBps + ); + + fee = IDVNFeeLib(feeLib).getFeeOnSend( + feeParams, + dstConfig[_param.dstEid], + _options + ); + + emit JobAssigned(jobId); + } + + function verify( + uint32 _srcEid, + uint32 _dstEid, + uint256 _jobId, + bytes memory _packetHeader, + bytes32 _payloadHash, + uint64 _confirmations, + address _receiver, + bytes calldata _reqId, + INuffClient.SchnorrSign calldata _signature, + bytes calldata gatewaySignature + ) external { + require(_isLocal(_dstEid), "Invalid dstEid"); + require( + !verifiedJobs[_srcEid][_jobId], + "src jobId is already verified" + ); + + verifiedJobs[_srcEid][_jobId] = true; + + bytes32 hash = keccak256( + abi.encodePacked( + nuffAppId, + _reqId, + _srcEid, + _dstEid, + _jobId, + _packetHeader, + _payloadHash, + _confirmations, + _receiver + ) + ); + + _verifyNuffSig( + _reqId, + hash, + _signature, + dvnConfig.shieldNodes(_receiver), + gatewaySignature + ); + + _lzVerify( + _srcEid, + _packetHeader, + _payloadHash, + _confirmations, + _receiver + ); + + emit Verified(_srcEid, _jobId); + } + + function setNuffAppId(uint256 _nuffAppId) external onlyRole(ADMIN_ROLE) { + nuffAppId = _nuffAppId; + } + + function setNuffContract(address addr) external onlyRole(ADMIN_ROLE) { + nuff = INuffClient(addr); + } + + function setNuffPubKey( + INuffClient.PublicKey memory _nuffPublicKey + ) external onlyRole(ADMIN_ROLE) { + nuffPublicKey = _nuffPublicKey; + } + + function setLzEndpointV2( + address _layerZeroEndpointV2 + ) external onlyRole(ADMIN_ROLE) { + layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); + } + + function updateSupportedDstChain( + uint32 eid, + bool status + ) external onlyRole(ADMIN_ROLE) { + supportedDstChain[eid] = status; + } + + function setPriceFeed(address _priceFeed) external onlyRole(ADMIN_ROLE) { + priceFeed = _priceFeed; + } + + function setDefaultMultiplierBps( + uint16 _multiplierBps + ) external onlyRole(ADMIN_ROLE) { + defaultMultiplierBps = _multiplierBps; + } + + function setDstConfig( + DstConfigParam[] calldata _params + ) external onlyRole(ADMIN_ROLE) { + for (uint256 i = 0; i < _params.length; ++i) { + DstConfigParam calldata param = _params[i]; + dstConfig[param.dstEid] = DstConfig( + param.gas, + param.multiplierBps, + param.floorMarginUSD + ); + } + emit SetDstConfig(_params); + } + + function setFeeLib(address _feeLib) external onlyRole(ADMIN_ROLE) { + feeLib = _feeLib; + } + + function withdrawFee( + address _lib, + address _to, + uint256 _amount + ) external onlyRole(ADMIN_ROLE) { + require(hasRole(MESSAGE_LIB_ROLE, _lib), "Invalid lib"); + ISendLib(_lib).withdrawFee(_to, _amount); + emit Withdraw(_lib, _to, _amount); + } + + function getFee( + uint32 _dstEid, + uint64 _confirmations, + address _sender, + bytes calldata _options + ) external view override returns (uint256 _fee) { + IDVNFeeLib.FeeParams memory params = IDVNFeeLib.FeeParams( + priceFeed, + _dstEid, + _confirmations, + _sender, + quorum, + defaultMultiplierBps + ); + return IDVNFeeLib(feeLib).getFee(params, dstConfig[_dstEid], _options); + } + + function _verifyNuffSig( + bytes calldata reqId, + bytes32 hash, + INuffClient.SchnorrSign calldata sign, + address nuffValidGateway, + bytes calldata gatewaySignature + ) internal { + bool verified = nuff.nuffVerify( + reqId, + uint256(hash), + sign, + nuffPublicKey + ); + require(verified, "Invalid signature!"); + + if (nuffValidGateway != address(0)) { + hash = hash.toEthSignedMessageHash(); + address gatewaySignatureSigner = hash.recover(gatewaySignature); + + require( + gatewaySignatureSigner == nuffValidGateway, + "Gateway is not valid" + ); + } + } + + function _lzVerify( + uint32 _srcEid, + bytes memory _packetHeader, + bytes32 _payloadHash, + uint64 _confirmations, + address _receiver + ) internal { + address receiverLib; + if (_isV2(_srcEid)) { + (receiverLib, ) = layerZeroEndpointV2.getReceiveLibrary( + _receiver, + _srcEid + ); + } else { + receiverLib = layerZeroEndpointV1.getReceiveLibraryAddress( + _receiver + ); + } + + IReceiveUlnE2(receiverLib).verify( + _packetHeader, + _payloadHash, + _confirmations + ); + } + + function _isLocal(uint32 _dstEid) internal view returns (bool) { + if (localEid == _dstEid || localEid == _dstEid + 30000) { + return true; + } + return false; + } + + function _isV2(uint32 _eid) internal pure returns (bool) { + if (_eid > 30000) { + return true; + } + return false; + } +} From 5da950a92430fa4c62f94cb73440255545207901 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 16 Oct 2024 09:40:24 +0200 Subject: [PATCH 75/96] wip: fix dockerfile so it doesn't break current indexer --- indexer/FastIndexer.dockerfile | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 indexer/FastIndexer.dockerfile diff --git a/indexer/FastIndexer.dockerfile b/indexer/FastIndexer.dockerfile new file mode 100644 index 00000000..5e898fec --- /dev/null +++ b/indexer/FastIndexer.dockerfile @@ -0,0 +1,47 @@ +FROM rust:1.79 AS builder +WORKDIR /tmp/indexer + +# Copy from nearcore: +# https://github.com/near/nearcore/blob/master/Dockerfile +RUN apt-get update -qq && \ + apt-get install -y \ + git \ + cmake \ + g++ \ + pkg-config \ + libssl-dev \ + curl \ + llvm \ + clang + +COPY ./Cargo.toml . +RUN mkdir ./src && echo "fn main() {}" > ./src/main.rs +RUN cargo build --release -p indexer --features use_fastnear + +COPY . . +RUN touch ./src/main.rs + +RUN cargo build --release -p indexer --features use_fastnear + +FROM debian:bookworm-slim as runtime +WORKDIR /indexer-app + +RUN apt update && apt install -yy openssl ca-certificates jq curl + +COPY --from=builder /tmp/indexer/target/release/indexer . +COPY entrypoint.sh ./entrypoint.sh +RUN chmod +x ./entrypoint.sh + +EXPOSE 3030 + +HEALTHCHECK --interval=20s --timeout=30s --retries=10000 \ + CMD (curl -f -s -X POST -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"block","params":{"finality":"optimistic"},"id":"dontcare"}' \ + http://localhost:3030 | \ + jq -es 'if . == [] then null else .[] | (now - (.result.header.timestamp / 1000000000)) < 10 end') && \ + (curl -f -s -X POST -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"status","params":[],"id":"dontcare"}' \ + http://localhost:3030 | \ + jq -es 'if . == [] then null else .[] | .result.sync_info.syncing == false end') + +ENTRYPOINT [ "./entrypoint.sh" ] From 58d24542e9267359e292e24296edfd4cafaa6ed6 Mon Sep 17 00:00:00 2001 From: Firat Sertgoz Date: Wed, 16 Oct 2024 09:43:02 +0200 Subject: [PATCH 76/96] wip: fix docker compose for setups --- setup/fastnear-indexer/docker-compose.yml | 60 ++++++++ setup/i-r-a/docker-compose.yml | 138 ++++++++++++++++++ .../docker-compose.yml | 94 ++++++++++++ 3 files changed, 292 insertions(+) create mode 100644 setup/fastnear-indexer/docker-compose.yml create mode 100644 setup/i-r-a/docker-compose.yml create mode 100644 setup/indexer-relayer-testnet/docker-compose.yml diff --git a/setup/fastnear-indexer/docker-compose.yml b/setup/fastnear-indexer/docker-compose.yml new file mode 100644 index 00000000..0285e111 --- /dev/null +++ b/setup/fastnear-indexer/docker-compose.yml @@ -0,0 +1,60 @@ +networks: + fastnear: + name: fastnear + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + profiles: [indexer] + build: + context: ../../indexer + dockerfile: FastIndexer.dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + command: + - run + - --da-contract-ids + - da.testnet + - --rollup-ids + - "2" + - --rmq-address + - "amqp://rmq:5672" + entrypoint: ["/indexer-app/indexer"] + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" \ No newline at end of file diff --git a/setup/i-r-a/docker-compose.yml b/setup/i-r-a/docker-compose.yml new file mode 100644 index 00000000..d526529f --- /dev/null +++ b/setup/i-r-a/docker-compose.yml @@ -0,0 +1,138 @@ +version: "3" + +networks: + fastnear: + name: fastnear + driver: bridge + near-sffl-relayer-rs: + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + build: + context: ../../indexer + dockerfile: FastIndexer.dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + command: + - run + - --da-contract-ids + - sfrelayer21155420-2.testnet + - --rollup-ids + - "2" + - --rmq-address + - "amqp://rmq:5672" + entrypoint: ["/indexer-app/indexer"] + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" + + relayer_11155420_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-21155420 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9094 + command: + - run-args + - --rpc-url + - wss://optimism-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer21155420-2.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer21155420-2.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-21155420:9094 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" + + operator-rs: + build: + context: ../.. # Set this to the parent directory of both operator-rs and core-rs + dockerfile: operator-rs/Dockerfile + container_name: near-sffl-operator-rs + volumes: + - ./config:/near-sffl/config + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + - ../../tests/keys/bls:/near-sffl/bls_keys + networks: + - fastnear + - near-sffl-relayer-rs + expose: + - ${OPERATOR_METRICS_PORT:-9095} + environment: + - PRODUCTION=${PRODUCTION:-false} + - ETH_RPC_URL=${ETH_RPC_URL:-https://optimism-sepolia-rpc.publicnode.com} + - ETH_WS_URL=${ETH_WS_URL:-wss://optimism-sepolia-rpc.publicnode.com} + - OPERATOR_ADDRESS=${OPERATOR_ADDRESS} + - BLS_KEY_PATH=/near-sffl/bls_keys/1/key.json + - BLS_KEY_PASSWORD_PATH=/near-sffl/bls_keys/1/password.txt + - ECDSA_KEY_PATH=${ECDSA_KEY_PATH:-/root/.near-credentials/ecdsa_key.json} + - AVS_REGISTRY_COORDINATOR_ADDRESS=${AVS_REGISTRY_COORDINATOR_ADDRESS} + - OPERATOR_STATE_RETRIEVER_ADDRESS=${OPERATOR_STATE_RETRIEVER_ADDRESS} + - AGGREGATOR_SERVER_IP_PORT=${AGGREGATOR_SERVER_IP_PORT} + - ENABLE_METRICS=${ENABLE_METRICS:-true} + - EIGEN_METRICS_IP_PORT=${EIGEN_METRICS_IP_PORT:-0.0.0.0:9095} + - NEAR_DA_INDEXER_RMQ_ADDRESS=${NEAR_DA_INDEXER_RMQ_ADDRESS:-amqp://rmq:5672} + - NEAR_DA_INDEXER_ROLLUP_IDS=${NEAR_DA_INDEXER_ROLLUP_IDS:-2} + - ROLLUP_IDS_TO_RPC_URLS=${ROLLUP_IDS_TO_RPC_URLS:-2:https://optimism-sepolia-rpc.publicnode.com} + - TASK_RESPONSE_WAIT_MS=${TASK_RESPONSE_WAIT_MS:-60000} + - TOKEN_STRATEGY_ADDR=${TOKEN_STRATEGY_ADDR:-0x0000000000000000000000000000000000000000} + command: + - run-config + - --path + - /near-sffl/config/operator.yaml + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" diff --git a/setup/indexer-relayer-testnet/docker-compose.yml b/setup/indexer-relayer-testnet/docker-compose.yml new file mode 100644 index 00000000..6962b6c8 --- /dev/null +++ b/setup/indexer-relayer-testnet/docker-compose.yml @@ -0,0 +1,94 @@ +version: "3" + +networks: + fastnear: + name: fastnear + driver: bridge + near-sffl-relayer-rs: + driver: bridge + +services: + rmq: + image: rabbitmq:3-management-alpine + container_name: rmq + user: rabbitmq + ports: + - "127.0.0.1:5672:5672" + - "127.0.0.1:15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics check_port_connectivity + interval: 1s + timeout: 3s + retries: 30 + networks: + - fastnear + + fastnear-indexer: + build: + context: ../../indexer + dockerfile: FastIndexer.dockerfile + container_name: fastnear-indexer + depends_on: + rmq: + condition: service_healthy + ports: + - "127.0.0.1:3030:3030" + - "127.0.0.1:9092:9092" + environment: + - CHAIN_ID=${NEAR_CHAIN_ID:-testnet} + volumes: + - ./:/fastnear-indexer/ + - ${NEAR_HOME_DIR:-~/.near}:/root/.near + - ${NEAR_KEYS_DIR:-~/.near-credentials}:/root/.near-credentials + command: + - run + - --da-contract-ids + - sfrelayer21155420-2.testnet + - --rollup-ids + - "2" + - --rmq-address + - "amqp://rmq:5672" + entrypoint: ["/indexer-app/indexer"] + restart: unless-stopped + networks: + - fastnear + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "10" + compress: "true" + + relayer_11155420_rs: + build: + context: ../../relayer-rs + dockerfile: Dockerfile + container_name: near-sffl-relayer-rs-21155420 + volumes: + - ${NEAR_KEYS_DIR}:/root/.near-credentials + networks: + - near-sffl-relayer-rs + expose: + - 9094 + command: + - run-args + - --rpc-url + - wss://optimism-sepolia-rpc.publicnode.com + - --da-account-id + - sfrelayer21155420-2.testnet + - --key-path + - /root/.near-credentials/${NEAR_CHAIN_ID}/sfrelayer21155420-2.testnet.json + - --network + - ${NEAR_RPC_URL} + - --metrics-ip-port-address + - near-sffl-relayer-rs-21155420:9094 + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1g" + max-file: "20" + compress: "true" \ No newline at end of file From c5359dc8155ccb447e6bab82335a4376be9731c4 Mon Sep 17 00:00:00 2001 From: firatsertgoz Date: Wed, 16 Oct 2024 10:20:01 +0200 Subject: [PATCH 77/96] wip: big cargo clean up --- Cargo.toml | 24 ++++++++++++++++++++++++ core-rs/Cargo.toml | 23 +++++++++++++++++++++++ indexer/Cargo.toml | 16 ++++++++-------- operator-rs/Cargo.toml | 36 ++++++++++++++++++++++++++++++++++++ relayer-rs/Cargo.toml | 28 ++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 core-rs/Cargo.toml create mode 100644 operator-rs/Cargo.toml create mode 100644 relayer-rs/Cargo.toml diff --git a/Cargo.toml b/Cargo.toml index 3fa805b7..9ebdd5ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,5 +13,29 @@ version = "0.0.1" edition = "2021" repository = "https://github.com/NethermindEth/near-sffl" +[workspace.dependencies] +alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde"] } +alloy-primitives = "0.8.3" +alloy-rpc-client = "0.4.2" +alloy-rpc-types = "0.4.2" +alloy-transport-ws = "0.4.2" +alloy-rlp = "0.3.8" +tokio = { version = "1.0", features = ["full"] } +prometheus = "0.13" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +anyhow = "1.0" +tracing = "0.1" +tracing-subscriber = "0.3" +futures-util = "0.3.30" +eyre = "0.6" +bincode = "1.3" +serde_yaml = "0.9" +clap = "4.5.18" +tempfile = "3.10.0" +async-trait = "0.1" +log = "0.4" +core-rs = { path = "core-rs" } + [patch.crates-io] parity-secp256k1 = { git = 'https://github.com/paritytech/rust-secp256k1.git' } diff --git a/core-rs/Cargo.toml b/core-rs/Cargo.toml new file mode 100644 index 00000000..590b9bda --- /dev/null +++ b/core-rs/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "core-rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +tokio = { workspace = true } +async-trait = { workspace = true } +thiserror = "1.0" +anyhow = { workspace = true } + +alloy = { workspace = true } +mockall = "0.13.0" + +serde = { workspace = true } +serde_json = { workspace = true } +sha2 = "0.10.6" + +log = { workspace = true } +futures-util = { workspace = true } + +[dev-dependencies] +tokio-test = "0.4" diff --git a/indexer/Cargo.toml b/indexer/Cargo.toml index 5591fee0..8d91e8a9 100644 --- a/indexer/Cargo.toml +++ b/indexer/Cargo.toml @@ -9,29 +9,29 @@ edition = "2021" actix = "0.13.1" actix-web = "4.5.1" futures = "0.3.5" -tokio = { version = "1.28.2", features = ["sync", "time"] } +tokio = { workspace = true } deadpool = "0.10.0" lapin = "2.3.1" deadpool-lapin = "0.11.0" tokio-executor-trait = "2.1.0" tokio-reactor-trait = "1.1.0" -prometheus = "0.13.3" +prometheus = { workspace = true } -clap = { version = "4.4.11", features = ["color", "derive", "env"] } +clap = { workspace = true } openssl-probe = "0.1.4" -serde = { version = "1", features = ["derive"] } -serde_json = "1.0.68" +serde = { workspace = true } +serde_json = { workspace = true } -tracing = { version = "0.1.36", features = ["std"] } +tracing = { workspace = true } thiserror = "1.0.56" -anyhow = "1.0.79" +anyhow = { workspace = true } near-indexer = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-client = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-o11y = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } near-client-primitives = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } borsh = { version = "1.0.0", features = ["derive", "rc"] } -serde_yaml = "0.9.34" +serde_yaml = { workspace = true } [dev-dependencies] near-crypto = { git = "https://github.com/near/nearcore", rev = "b3d767e7664d8e123a35313ccc66c8ac1afb2058" } diff --git a/operator-rs/Cargo.toml b/operator-rs/Cargo.toml new file mode 100644 index 00000000..3b65eeab --- /dev/null +++ b/operator-rs/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "operator-rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +alloy = { workspace = true } +alloy-primitives = { workspace = true } +alloy-rpc-client = { workspace = true } +alloy-rpc-types = { workspace = true } +alloy-transport-ws = { workspace = true } +alloy-rlp = { workspace = true } +tokio = { workspace = true } +prometheus = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +anyhow = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +futures-util = { workspace = true } +eyre = { workspace = true } +bincode = { workspace = true } +serde_yaml = { workspace = true } +clap = { workspace = true } +tempfile = { workspace = true } +core-rs = { workspace = true } + +# Dependencies specific to operator-rs +near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +warp = "0.3" +hex = "0.4" +rand = "0.8" +eigensdk = { version = "0.1.0", features = ["full", "types", "crypto-bls", "utils"] } +borsh = "1.5.1" +lapin = "2.3.1" diff --git a/relayer-rs/Cargo.toml b/relayer-rs/Cargo.toml new file mode 100644 index 00000000..0fe2c99b --- /dev/null +++ b/relayer-rs/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "relayer-rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +alloy = { workspace = true } +alloy-primitives = { workspace = true } +alloy-rpc-client = { workspace = true } +alloy-rpc-types = { workspace = true } +alloy-transport-ws = { workspace = true } +alloy-rlp = { workspace = true } +near-da-rpc = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +near-da-primitives = { git = "https://github.com/Nuffle-Labs/data-availability", branch = "main" } +tokio = { workspace = true } +prometheus = { workspace = true } +warp = "0.3" +serde = { workspace = true } +serde_json = { workspace = true } +anyhow = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } +futures-util = { workspace = true } +eyre = { workspace = true } +bincode = { workspace = true } +serde_yaml = { workspace = true } +clap = { workspace = true } +tempfile = { workspace = true } From f1624fded84db8fe2adad3c17a9855298a222de6 Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 13:27:18 +0200 Subject: [PATCH 78/96] chore: remove unused --- contracts/evm/src/dvn/NuffDVN.sol | 2 +- contracts/evm/src/dvn/interfaces/IDVN.sol | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 contracts/evm/src/dvn/interfaces/IDVN.sol diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 48081373..0830a13e 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -11,7 +11,7 @@ import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; -import { IReceiveUlnE2, Verification, UlnConfig} from "./interfaces/IReceiveUlnE2.sol"; +import { IReceiveUlnE2 } from "./interfaces/IReceiveUlnE2.sol"; import "./interfaces/INuffClient.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; diff --git a/contracts/evm/src/dvn/interfaces/IDVN.sol b/contracts/evm/src/dvn/interfaces/IDVN.sol new file mode 100644 index 00000000..d78f35a8 --- /dev/null +++ b/contracts/evm/src/dvn/interfaces/IDVN.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0; + +import { IWorker } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/interfaces/IWorker.sol"; +import {ILayerZeroDVN} from "./ILayerZeroDVN.sol"; + +interface IDVN is IWorker, ILayerZeroDVN { + struct DstConfigParam { + uint32 dstEid; + uint64 gas; + uint16 multiplierBps; + uint128 floorMarginUSD; + } + + struct DstConfig { + uint64 gas; + uint16 multiplierBps; + uint128 floorMarginUSD; // uses priceFeed PRICE_RATIO_DENOMINATOR + } + + event SetDstConfig(DstConfigParam[] params); + + function dstConfig( + uint32 _dstEid + ) external view returns (uint64, uint16, uint128); +} From 5bf79ef5fcacfd37e65d6e8fe95c5fbab1d38729 Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 16:37:59 +0200 Subject: [PATCH 79/96] chore: add tests to manual decoding --- workers/src/chain/contracts.rs | 2 +- workers/src/data/extractors.rs | 140 +++++++++++++++++++++++++++++++-- 2 files changed, 134 insertions(+), 8 deletions(-) diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 513b6051..d340fc2c 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -111,7 +111,7 @@ pub async fn verify( ) -> Result { //// Create the hash of the payload let payload_hash = keccak256(payload); - // + // Call the `verified` function on the contract let _ = contract .function( diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index d47fa87a..405dc494 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -1,7 +1,7 @@ //! Extract data from encoded payloads. //! //! FIXME: couldn't make it work with `alloy`+ABI, so -//! using manual extracting for now. +//! using manual extracting for now. Added tests. //! Re-check if it can work that way. use alloy::primitives::FixedBytes; @@ -11,13 +11,14 @@ use bytes::{Buf, BufMut, BytesMut}; const MINIMUM_PACKET_LENGTH: usize = 93; // 1 + 8 + 4 + 32 + 4 + 32 + 32 /// The whole header from the message. +#[derive(Debug)] pub struct Header { version: u8, nonce: u64, src_eid: u32, - sender_addr: u32, + sender_addr: FixedBytes<20>, dst_eid: u32, - rcv_addr: FixedBytes<32>, + rcv_addr: FixedBytes<20>, guid: FixedBytes<32>, } @@ -27,7 +28,7 @@ impl Header { header.put_u8(self.version); header.put_u64(self.nonce); header.put_u32(self.src_eid); - header.put_u32(self.sender_addr); + header.put_slice(self.sender_addr.as_ref()); header.put_u32(self.dst_eid); header.put_slice(self.rcv_addr.as_ref()); header.put_slice(self.guid.as_ref()); @@ -44,9 +45,11 @@ pub fn extract_header(raw_packet: &[u8]) -> Option
{ let version = buffered_packet.get_u8(); // version let nonce = buffered_packet.get_u64(); // nonce let src_eid = buffered_packet.get_u32(); // src_eid - let sender_addr = buffered_packet.get_u32(); // sender address + buffered_packet.advance(12); // skip padding + let sender_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); let dst_eid = buffered_packet.get_u32(); // dst_eid - let rcv_addr: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).as_ref()); + buffered_packet.advance(12); // skip padding + let rcv_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze().iter().as_slice()); Some(Header { @@ -66,8 +69,131 @@ pub fn extract_message(raw_packet: &[u8]) -> Option> { return None; } let mut buffered_packet = BytesMut::from(raw_packet); - buffered_packet.advance(81); // version + buffered_packet.advance(113); let message = buffered_packet.freeze().to_vec(); Some(message) } + +#[cfg(test)] +mod tests { + use super::*; + use alloy::hex; + + //0x010000000000001CE00000759E00000000000000000000000026DA582889F59EAAE9DA1F063BE0140CD93E6A4F0000759600000000000000000000000026DA582889F59EAAE9DA1F063BE0140CD93E6A4F58565502B0810F2B41F18679D3BFB5B703296753807465C02C37E23364EAE7D8 + + /// Test the extraction of the message from a packet. + /// + /// An encodedPayload from a transaction is used as mockup data, + /// and to test that it correctly decodes it, a LayerZero's library + /// in typescript has been used to check it: + /// + /// ```typescript + /// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; + /// + /// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); + /// + /// console.log(des); + /// ``` + /// + /// And its output is: + /// ``` + /// { + /// version: 1, + /// nonce: '76929', + /// srcEid: 30110, + /// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', + /// dstEid: 30184, + /// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', + /// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', + /// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', + /// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' + /// } + /// ``` + /// + /// The payload is the concatenation of the guid and the message. + #[test] + fn extract_msg() { + // GIVEN: a known encodedPayload + let hex_payload = "0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"; + + // WHEN: the values are extracted from it. + let payload: Vec = hex::decode(hex_payload).unwrap(); + let message = extract_message(&payload).unwrap(); + + // THEN: the message is correctly extracted. + // Check the extracted value isn't altered. + assert!(hex_payload.contains(&hex::encode(&message))); + // Check the obtained value is the same as the expected one (see above to know + // where this comes from). + let expected_message = hex::decode("0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00").unwrap(); + assert_eq!(message, expected_message); + } + + /// Test the extraction of the message from a packet. + /// + /// An encodedPayload from a transaction is used as mockup data, + /// and to test that it correctly decodes it, a LayerZero's library + /// in typescript has been used to check it: + /// + /// ```typescript + /// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; + /// + /// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); + /// + /// console.log(des); + /// ``` + /// + /// And its output is: + /// ``` + /// { + /// version: 1, + /// nonce: '76929', + /// srcEid: 30110, + /// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', + /// dstEid: 30184, + /// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', + /// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', + /// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', + /// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' + /// } + /// ``` + #[test] + fn extract_hdr() { + // GIVEN: a known encodedPayload + let payload: Vec = hex::decode("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00").unwrap(); + + // WHEN: the header is extracted from it. + let header = extract_header(&payload).unwrap(); + + // THEN: the header values are correctly extracted. + assert_eq!(header.version, 1); + assert_eq!(header.nonce, 76929); + assert_eq!(header.src_eid, 30110); + assert_eq!( + header.sender_addr, + FixedBytes::<20>::from_slice( + hex::decode("19cfce47ed54a88614648dc3f19a5980097007dd") + .unwrap() + .as_ref() + ) + ); + assert_eq!(header.dst_eid, 30184); + assert_eq!( + header.rcv_addr, + FixedBytes::<20>::from_slice( + hex::decode("5634c4a5fed09819e3c46d86a965dd9447d86e47") + .unwrap() + .as_ref() + ) + ); + assert_eq!( + header.guid, + FixedBytes::<32>::from_slice( + hex::decode("9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b") + .unwrap() + .as_ref() + ) + ); + } +} From 90c0e70023b6b4190bcbfab9179486f8e07c1aee Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 16:41:02 +0200 Subject: [PATCH 80/96] chore: use const instead of magic number --- workers/src/data/extractors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 405dc494..6c96a5e3 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -8,7 +8,7 @@ use alloy::primitives::FixedBytes; use bytes::{Buf, BufMut, BytesMut}; /// Minimum length of a packet. -const MINIMUM_PACKET_LENGTH: usize = 93; // 1 + 8 + 4 + 32 + 4 + 32 + 32 +const MINIMUM_PACKET_LENGTH: usize = 113; // 1 + 8 + 4 + 32 + 4 + 32 + 32 /// The whole header from the message. #[derive(Debug)] @@ -69,7 +69,7 @@ pub fn extract_message(raw_packet: &[u8]) -> Option> { return None; } let mut buffered_packet = BytesMut::from(raw_packet); - buffered_packet.advance(113); + buffered_packet.advance(MINIMUM_PACKET_LENGTH); let message = buffered_packet.freeze().to_vec(); Some(message) From 1433aac4c0b494de28f62e32b4b55c17a82f09ec Mon Sep 17 00:00:00 2001 From: Lozano Date: Thu, 17 Oct 2024 16:47:38 +0200 Subject: [PATCH 81/96] chore: comments --- workers/src/data/extractors.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 6c96a5e3..6a9320e5 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -65,10 +65,12 @@ pub fn extract_header(raw_packet: &[u8]) -> Option
{ /// When feeded a packet, return the whole message, which is everything but the header. pub fn extract_message(raw_packet: &[u8]) -> Option> { + // If there's no message to be loaded, return `None`. if raw_packet.len() < MINIMUM_PACKET_LENGTH { return None; } let mut buffered_packet = BytesMut::from(raw_packet); + // Skip the header. buffered_packet.advance(MINIMUM_PACKET_LENGTH); let message = buffered_packet.freeze().to_vec(); From 9293854c6e55ace92be967e6338a23dfcad684f0 Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 18 Oct 2024 01:35:05 +0200 Subject: [PATCH 82/96] chore: address pr comments --- Cargo.lock | 57 ++++++++++-- contracts/evm/src/dvn/NuffDVN.sol | 27 ++---- contracts/evm/src/dvn/NuffDVNv2.sol | 24 ++--- contracts/evm/src/dvn/interfaces/IDVN.sol | 27 ------ .../evm/src/dvn/interfaces/INuffClient.sol | 2 +- .../evm/src/dvn/interfaces/IReceiveUlnE2.sol | 43 --------- workers/Cargo.toml | 17 ++-- workers/src/bin/dvn.rs | 5 +- workers/src/data/extractors.rs | 91 ++++++------------- 9 files changed, 107 insertions(+), 186 deletions(-) delete mode 100644 contracts/evm/src/dvn/interfaces/IDVN.sol delete mode 100644 contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol diff --git a/Cargo.lock b/Cargo.lock index 578957ea..02c46931 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -358,7 +358,9 @@ dependencies = [ "alloy-core", "alloy-eips", "alloy-genesis", + "alloy-json-rpc", "alloy-network", + "alloy-node-bindings", "alloy-provider", "alloy-pubsub", "alloy-rpc-client", @@ -562,6 +564,23 @@ dependencies = [ "serde", ] +[[package]] +name = "alloy-node-bindings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1334a738aa1710cb8227441b3fcc319202ce78e967ef37406940242df4a454" +dependencies = [ + "alloy-genesis", + "alloy-primitives", + "k256", + "rand", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", +] + [[package]] name = "alloy-primitives" version = "0.8.9" @@ -602,10 +621,14 @@ dependencies = [ "alloy-json-rpc", "alloy-network", "alloy-network-primitives", + "alloy-node-bindings", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", + "alloy-rpc-types-anvil", "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-signer-local", "alloy-transport", "alloy-transport-http", "alloy-transport-ipc", @@ -702,6 +725,18 @@ dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d780adaa5d95b07ad92006b2feb68ecfa7e2015f7d5976ceaac4c906c73ebd07" +dependencies = [ + "alloy-primitives", "alloy-serde", "serde", ] @@ -739,6 +774,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "alloy-rpc-types-trace" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "alloy-serde" version = "0.4.2" @@ -2928,12 +2977,6 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - [[package]] name = "dunce" version = "1.0.5" @@ -9792,10 +9835,8 @@ dependencies = [ "blsful", "bytes", "config", - "dotenvy", "eyre", "futures", - "hex", "serde", "serde_json", "tokio", diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 0830a13e..51fc176c 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -1,21 +1,21 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import { ILayerZeroEndpoint } from "@layerzerolabs/lz-evm-v1-0.7/contracts/interfaces/ILayerZeroEndpoint.sol"; import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; -import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; -import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; -import { IReceiveUlnE2 } from "./interfaces/IReceiveUlnE2.sol"; -import "./interfaces/INuffClient.sol"; +import { INuffClient } from "./interfaces/INuffClient.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; -contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { +import { ReentrancyGuard } from "@solady/src/utils/ReentrancyGuard.sol"; + +contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { using PacketV1Codec for bytes; using ECDSA for bytes32; using MessageHashUtils for bytes32; @@ -104,6 +104,8 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { uint256 jobId = ++lastJobId; Job storage newJob = jobs[jobId]; + require(_param.sender != address(0), "Invalid sender address"); + newJob.origin = msg.sender; newJob.srcEid = localEid; newJob.dstEid = _param.dstEid; @@ -145,7 +147,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { bytes calldata _reqId, INuffClient.BSLSign calldata _signature, bytes calldata gatewaySignature - ) external { + ) external ReentrancyGuard.nonReentrant { require(_isLocal(_dstEid), "Invalid dstEid"); require( !verifiedJobs[_srcEid][_jobId], @@ -273,7 +275,6 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { bytes calldata reqId, bytes32 hash, INuffClient.BLSSign calldata sign, - address nuffValidGateway, bytes calldata gatewaySignature ) internal { bool verified = nuff.nuffVerify( @@ -283,16 +284,6 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { nuffPublicKey ); require(verified, "Invalid signature!"); - - if (nuffValidGateway != address(0)) { - hash = hash.toEthSignedMessageHash(); - address gatewaySignatureSigner = hash.recover(gatewaySignature); - - require( - gatewaySignatureSigner == nuffValidGateway, - "Gateway is not valid" - ); - } } function _lzVerify( diff --git a/contracts/evm/src/dvn/NuffDVNv2.sol b/contracts/evm/src/dvn/NuffDVNv2.sol index 035f1a57..634e3c7c 100644 --- a/contracts/evm/src/dvn/NuffDVNv2.sol +++ b/contracts/evm/src/dvn/NuffDVNv2.sol @@ -1,18 +1,19 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; +import { IDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVN.sol"; +import { ILayerZeroDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/interfaces/ILayerZeroDVN.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { IReceiveUlnE2 } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IReceiveUlnE2.sol"; +import { IDVNFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVNFeeLib.sol"; -import { ILayerZeroEndpoint } from "./interfaces/ILayerZeroEndpoint.sol"; -import { ILayerZeroDVN } from "./interfaces/ILayerZeroDVN.sol"; -import { IReceiveUlnE2, Verification, UlnConfig} from "./interfaces/IReceiveUlnE2.sol"; -import "./interfaces/INuffClient.sol"; +import { INuffClient } from "./interfaces/INuffClient.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { @@ -273,7 +274,6 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { bytes calldata reqId, bytes32 hash, INuffClient.SchnorrSign calldata sign, - address nuffValidGateway, bytes calldata gatewaySignature ) internal { bool verified = nuff.nuffVerify( @@ -283,16 +283,6 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { nuffPublicKey ); require(verified, "Invalid signature!"); - - if (nuffValidGateway != address(0)) { - hash = hash.toEthSignedMessageHash(); - address gatewaySignatureSigner = hash.recover(gatewaySignature); - - require( - gatewaySignatureSigner == nuffValidGateway, - "Gateway is not valid" - ); - } } function _lzVerify( diff --git a/contracts/evm/src/dvn/interfaces/IDVN.sol b/contracts/evm/src/dvn/interfaces/IDVN.sol deleted file mode 100644 index d78f35a8..00000000 --- a/contracts/evm/src/dvn/interfaces/IDVN.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0; - -import { IWorker } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/interfaces/IWorker.sol"; -import {ILayerZeroDVN} from "./ILayerZeroDVN.sol"; - -interface IDVN is IWorker, ILayerZeroDVN { - struct DstConfigParam { - uint32 dstEid; - uint64 gas; - uint16 multiplierBps; - uint128 floorMarginUSD; - } - - struct DstConfig { - uint64 gas; - uint16 multiplierBps; - uint128 floorMarginUSD; // uses priceFeed PRICE_RATIO_DENOMINATOR - } - - event SetDstConfig(DstConfigParam[] params); - - function dstConfig( - uint32 _dstEid - ) external view returns (uint64, uint16, uint128); -} diff --git a/contracts/evm/src/dvn/interfaces/INuffClient.sol b/contracts/evm/src/dvn/interfaces/INuffClient.sol index a7fd02fc..0b2ce1d7 100644 --- a/contracts/evm/src/dvn/interfaces/INuffClient.sol +++ b/contracts/evm/src/dvn/interfaces/INuffClient.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; interface INuffClient { struct BLSSign { diff --git a/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol b/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol deleted file mode 100644 index ba666a3c..00000000 --- a/contracts/evm/src/dvn/interfaces/IReceiveUlnE2.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0; - -struct Verification { - bool submitted; - uint64 confirmations; -} - -struct UlnConfig { - uint64 confirmations; - uint8 requiredDVNCount; - uint8 optionalDVNCount; - uint8 optionalDVNThreshold; - address[] requiredDVNs; - address[] optionalDVNs; -} - -/// @dev should be implemented by the ReceiveUln302 contract and future ReceiveUln contracts on EndpointV2 -interface IReceiveUlnE2 { - /// @notice for each dvn to verify the payload - function verify( - bytes calldata _packetHeader, - bytes32 _payloadHash, - uint64 _confirmations - ) external; - - /// @notice verify the payload at endpoint, will check if all DVNs verified - function commitVerification( - bytes calldata _packetHeader, - bytes32 _payloadHash - ) external; - - function hashLookup( - bytes32 _headerHash, - bytes32 _payloadHash, - address _dnv - ) external view returns (Verification memory); - - function getUlnConfig( - address _oapp, - uint32 _remoteEid - ) external view returns (UlnConfig memory rtnConfig); -} diff --git a/workers/Cargo.toml b/workers/Cargo.toml index e4414a77..714536d9 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -8,18 +8,15 @@ name = "dvn" path = "src/bin/dvn.rs" [dependencies] -alloy = { version = "0.4.2", features = ["full"] } +alloy.workspace = true alloy-json-abi = "0.8.8" -#alloy-rlp = "0.3.8" blsful = "2.5.7" bytes = "1.7.2" config = { version = "0.14.0", features = ["toml"] } -dotenvy = "0.15.7" -eyre = "0.6.12" +eyre.workspace = true futures = "0.3.31" -hex = "0.4.3" -serde = { version = "1.0.210", features = ["derive"] } -serde_json = "1.0.128" -tokio = { version = "1.40.0", features = ["full"] } -tracing = "0.1.40" -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } +serde.workspace = true +serde_json.workspace = true +tokio.workspace = true +tracing.workspace = true +tracing-subscriber = {workspace = true, features = ["env-filter"] } diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 5f41ce6a..f6752025 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -46,7 +46,10 @@ async fn main() -> Result<()> { dvn_worker.listening(); tokio::select! { Some(log) = endpoint_stream.next() => { - match log.log_decode::() { + match log.log_decode::() { + Err(e) => { + error!("Received a `PacketSent` event but failed to decode it: {:?}", e); + } Ok(inner_log) => { debug!("PacketSent event found and decoded."); dvn_worker.packet_received(inner_log.data().clone()); diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 6a9320e5..f154e0a2 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -10,7 +10,7 @@ use bytes::{Buf, BufMut, BytesMut}; /// Minimum length of a packet. const MINIMUM_PACKET_LENGTH: usize = 113; // 1 + 8 + 4 + 32 + 4 + 32 + 32 -/// The whole header from the message. +/// The whole header from the `Packet`. #[derive(Debug)] pub struct Header { version: u8, @@ -77,43 +77,40 @@ pub fn extract_message(raw_packet: &[u8]) -> Option> { Some(message) } +/// Test the extraction of the header and the message from a packet. +/// +/// An encodedPayload from a transaction is used as mockup data, +/// and to test that it correctly decodes it, a LayerZero's library +/// in typescript has been used to check it: +/// +/// ```typescript +/// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; +/// +/// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); +/// +/// console.log(des); +/// ``` +/// +/// And its output is: +/// ``` +/// { +/// version: 1, +/// nonce: '76929', +/// srcEid: 30110, +/// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', +/// dstEid: 30184, +/// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', +/// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', +/// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', +/// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' +/// } +/// ``` +/// Note: The payload is the concatenation of the guid and the message. #[cfg(test)] mod tests { use super::*; use alloy::hex; - //0x010000000000001CE00000759E00000000000000000000000026DA582889F59EAAE9DA1F063BE0140CD93E6A4F0000759600000000000000000000000026DA582889F59EAAE9DA1F063BE0140CD93E6A4F58565502B0810F2B41F18679D3BFB5B703296753807465C02C37E23364EAE7D8 - - /// Test the extraction of the message from a packet. - /// - /// An encodedPayload from a transaction is used as mockup data, - /// and to test that it correctly decodes it, a LayerZero's library - /// in typescript has been used to check it: - /// - /// ```typescript - /// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; - /// - /// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); - /// - /// console.log(des); - /// ``` - /// - /// And its output is: - /// ``` - /// { - /// version: 1, - /// nonce: '76929', - /// srcEid: 30110, - /// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', - /// dstEid: 30184, - /// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', - /// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', - /// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', - /// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' - /// } - /// ``` - /// - /// The payload is the concatenation of the guid and the message. #[test] fn extract_msg() { // GIVEN: a known encodedPayload @@ -132,34 +129,6 @@ mod tests { assert_eq!(message, expected_message); } - /// Test the extraction of the message from a packet. - /// - /// An encodedPayload from a transaction is used as mockup data, - /// and to test that it correctly decodes it, a LayerZero's library - /// in typescript has been used to check it: - /// - /// ```typescript - /// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; - /// - /// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); - /// - /// console.log(des); - /// ``` - /// - /// And its output is: - /// ``` - /// { - /// version: 1, - /// nonce: '76929', - /// srcEid: 30110, - /// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', - /// dstEid: 30184, - /// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', - /// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', - /// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', - /// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' - /// } - /// ``` #[test] fn extract_hdr() { // GIVEN: a known encodedPayload From ce2d6e6bfb0d465f13cd403766fcefc043fafe10 Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 18 Oct 2024 17:45:02 +0200 Subject: [PATCH 83/96] chore: address pr comments --- contracts/evm/src/dvn/NuffDVN.sol | 8 +- contracts/evm/src/dvn/NuffDVNv2.sol | 26 +++-- .../evm/src/dvn/interfaces/INuffDVNConfig.sol | 9 ++ workers/abi/ArbitrumL0V2Endpoint.json | 1 - workers/abi/ArbitrumReceiveLibUln302.json | 1 - workers/abi/ArbitrumSendLibUln302.json | 1 - workers/src/abi.rs | 6 +- workers/src/bin/dvn.rs | 104 ++++++++++-------- workers/src/chain/connections.rs | 4 +- workers/src/chain/contracts.rs | 13 ++- workers/src/data/extractors.rs | 52 ++++++++- 11 files changed, 151 insertions(+), 74 deletions(-) create mode 100644 contracts/evm/src/dvn/interfaces/INuffDVNConfig.sol delete mode 100644 workers/abi/ArbitrumL0V2Endpoint.json delete mode 100644 workers/abi/ArbitrumReceiveLibUln302.json delete mode 100644 workers/abi/ArbitrumSendLibUln302.json diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 51fc176c..197af729 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -15,7 +15,7 @@ import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; import { ReentrancyGuard } from "@solady/src/utils/ReentrancyGuard.sol"; -contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { +contract NuffDVN is ILayerZeroDVN, AccessControl, ReentrancyGuard { using PacketV1Codec for bytes; using ECDSA for bytes32; using MessageHashUtils for bytes32; @@ -51,6 +51,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { address public priceFeed; address public feeLib; + // FIXME: everything is getting stored in cold storage; use a buffer instead mapping(uint256 => Job) public jobs; // eid => bool @@ -94,6 +95,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { bytes calldata _options ) external + nonReentrant payable override onlyRole(MESSAGE_LIB_ROLE) @@ -147,7 +149,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { bytes calldata _reqId, INuffClient.BSLSign calldata _signature, bytes calldata gatewaySignature - ) external ReentrancyGuard.nonReentrant { + ) external nonReentrant { require(_isLocal(_dstEid), "Invalid dstEid"); require( !verifiedJobs[_srcEid][_jobId], @@ -259,7 +261,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, IDVN { uint64 _confirmations, address _sender, bytes calldata _options - ) external view override returns (uint256 _fee) { + ) external nonReentrant view override returns (uint256 _fee) { IDVNFeeLib.FeeParams memory params = IDVNFeeLib.FeeParams( priceFeed, _dstEid, diff --git a/contracts/evm/src/dvn/NuffDVNv2.sol b/contracts/evm/src/dvn/NuffDVNv2.sol index 634e3c7c..de254684 100644 --- a/contracts/evm/src/dvn/NuffDVNv2.sol +++ b/contracts/evm/src/dvn/NuffDVNv2.sol @@ -16,7 +16,9 @@ import { IDVNFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/in import { INuffClient } from "./interfaces/INuffClient.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; -contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { +import { ReentrancyGuard } from "@solady/src/utils/ReentrancyGuard.sol"; + +contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { using PacketV1Codec for bytes; using ECDSA for bytes32; using MessageHashUtils for bytes32; @@ -52,16 +54,15 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { address public priceFeed; address public feeLib; - mapping(uint256 => Job) public jobs; - - // eid => bool - mapping(uint32 => bool) public supportedDstChain; - mapping(uint32 dstEid => DstConfig) public dstConfig; - // srcEid => ( jobId => isVerified ) - mapping(uint32 => mapping(uint256 => bool)) public verifiedJobs; + // FIXME: everything is getting stored in cold storage; use a buffer instead + mapping(uint256 jobId => Job job) public jobs; + mapping(uint32 eid => bool isSupported) public supportedDstChain; + mapping(uint32 dstEid => DstConfig config) public dstConfig; + mapping(uint32 srcEid => mapping(uint256 jobId => bool isVerified)) public verifiedJobs; event JobAssigned(uint256 jobId); event Verified(uint32 srcEid, uint256 jobId); + event Withdraw(address lib, address to, uint256 amount); constructor( uint256 _nuffAppId, @@ -95,6 +96,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { bytes calldata _options ) external + nonReentrant payable override onlyRole(MESSAGE_LIB_ROLE) @@ -105,6 +107,8 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { uint256 jobId = ++lastJobId; Job storage newJob = jobs[jobId]; + require(_param.sender != address(0), "Invalid sender address"); + newJob.origin = msg.sender; newJob.srcEid = localEid; newJob.dstEid = _param.dstEid; @@ -146,7 +150,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { bytes calldata _reqId, INuffClient.SchnorrSign calldata _signature, bytes calldata gatewaySignature - ) external { + ) external nonReentrant { require(_isLocal(_dstEid), "Invalid dstEid"); require( !verifiedJobs[_srcEid][_jobId], @@ -258,7 +262,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { uint64 _confirmations, address _sender, bytes calldata _options - ) external view override returns (uint256 _fee) { + ) external nonReentrant view override returns (uint256 _fee) { IDVNFeeLib.FeeParams memory params = IDVNFeeLib.FeeParams( priceFeed, _dstEid, @@ -273,7 +277,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN { function _verifyNuffSig( bytes calldata reqId, bytes32 hash, - INuffClient.SchnorrSign calldata sign, + INuffClient.BLSSign calldata sign, bytes calldata gatewaySignature ) internal { bool verified = nuff.nuffVerify( diff --git a/contracts/evm/src/dvn/interfaces/INuffDVNConfig.sol b/contracts/evm/src/dvn/interfaces/INuffDVNConfig.sol new file mode 100644 index 00000000..9249853a --- /dev/null +++ b/contracts/evm/src/dvn/interfaces/INuffDVNConfig.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +interface INuffDVNConfig { + function getInfo( + address oapp, + string[] memory _configKeys + ) external view returns (string[] memory); +} diff --git a/workers/abi/ArbitrumL0V2Endpoint.json b/workers/abi/ArbitrumL0V2Endpoint.json deleted file mode 100644 index 33f4ede9..00000000 --- a/workers/abi/ArbitrumL0V2Endpoint.json +++ /dev/null @@ -1 +0,0 @@ -{"abi":[{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_AlreadyRegistered","type":"error"},{"inputs":[],"name":"LZ_ComposeExists","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_ComposeNotFound","type":"error"},{"inputs":[],"name":"LZ_DefaultReceiveLibUnavailable","type":"error"},{"inputs":[],"name":"LZ_DefaultSendLibUnavailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"requiredNative","type":"uint256"},{"internalType":"uint256","name":"suppliedNative","type":"uint256"},{"internalType":"uint256","name":"requiredLzToken","type":"uint256"},{"internalType":"uint256","name":"suppliedLzToken","type":"uint256"}],"name":"LZ_InsufficientFee","type":"error"},{"inputs":[],"name":"LZ_InvalidExpiry","type":"error"},{"inputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"LZ_InvalidNonce","type":"error"},{"inputs":[],"name":"LZ_InvalidPayloadHash","type":"error"},{"inputs":[],"name":"LZ_InvalidReceiveLibrary","type":"error"},{"inputs":[],"name":"LZ_LzTokenUnavailable","type":"error"},{"inputs":[],"name":"LZ_OnlyNonDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlyReceiveLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredOrDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlySendLib","type":"error"},{"inputs":[],"name":"LZ_PathNotInitializable","type":"error"},{"inputs":[],"name":"LZ_PathNotVerifiable","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_PayloadHashNotFound","type":"error"},{"inputs":[],"name":"LZ_SameValue","type":"error"},{"inputs":[],"name":"LZ_SendReentrancy","type":"error"},{"inputs":[],"name":"LZ_Unauthorized","type":"error"},{"inputs":[],"name":"LZ_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_UnsupportedInterface","type":"error"},{"inputs":[],"name":"LZ_ZeroLzTokenFee","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"}],"name":"ComposeDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"ComposeSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"DefaultReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultSendLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"}],"name":"DelegateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"InboundNonceSkipped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"LibraryRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzComposeAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzReceiveAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"LzTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketBurnt","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"PacketDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketNilified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"encodedPayload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"address","name":"sendLibrary","type":"address"}],"name":"PacketSent","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"ReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"timeout","type":"uint256"}],"name":"ReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"SendLibrarySet","type":"event"},{"inputs":[],"name":"EMPTY_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NIL_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockedLibrary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"clear","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint16","name":"index","type":"uint16"}],"name":"composeQueue","outputs":[{"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstEid","type":"uint32"}],"name":"defaultSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"delegate","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eid","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"config","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"}],"name":"getReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredLibraries","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSendContext","outputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"getSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"}],"name":"inboundNonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"inboundNonce","type":"uint64"}],"name":"inboundPayloadHash","outputs":[{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"initializable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"isDefaultSendLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lib","type":"address"}],"name":"isRegisteredLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSendingMessage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"address","name":"_actualReceiveLib","type":"address"}],"name":"isValidReceiveLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"lazyInboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzCompose","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzComposeAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzReceiveAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lzToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"bytes32","name":"_receiver","type":"bytes32"}],"name":"nextGuid","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"nilify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"}],"name":"outboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_sender","type":"address"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"receiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lib","type":"address"}],"name":"registerLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"sendCompose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setDefaultReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setDefaultReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setDefaultSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"}],"name":"setLzToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"skip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"}]} diff --git a/workers/abi/ArbitrumReceiveLibUln302.json b/workers/abi/ArbitrumReceiveLibUln302.json deleted file mode 100644 index 9b9ad405..00000000 --- a/workers/abi/ArbitrumReceiveLibUln302.json +++ /dev/null @@ -1 +0,0 @@ -{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidEid","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketHeader","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketVersion","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_ULN_Verifying","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"dvn","type":"address"},{"indexed":false,"internalType":"bytes","name":"header","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"confirmations","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"proofHash","type":"bytes32"}],"name":"PayloadVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"uint32","name":"_localEid","type":"uint32"}],"name":"assertHeader","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"commitVerification","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"headerHash","type":"bytes32"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"internalType":"address","name":"dvn","type":"address"}],"name":"hashLookup","outputs":[{"internalType":"bool","name":"submitted","type":"bool"},{"internalType":"uint64","name":"confirmations","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"_config","type":"tuple"},{"internalType":"bytes32","name":"_headerHash","type":"bytes32"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"},{"internalType":"uint64","name":"_confirmations","type":"uint64"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"}]} diff --git a/workers/abi/ArbitrumSendLibUln302.json b/workers/abi/ArbitrumSendLibUln302.json deleted file mode 100644 index ed8a8f21..00000000 --- a/workers/abi/ArbitrumSendLibUln302.json +++ /dev/null @@ -1 +0,0 @@ -{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"},{"internalType":"uint256","name":"_treasuryGasLimit","type":"uint256"},{"internalType":"uint256","name":"_treasuryGasForFeeCap","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DVN_InvalidDVNIdx","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"DVN_InvalidDVNOptions","type":"error"},{"inputs":[],"name":"LZ_MessageLib_CannotWithdrawAltToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"LZ_MessageLib_InvalidAmount","type":"error"},{"inputs":[],"name":"LZ_MessageLib_InvalidExecutor","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"LZ_MessageLib_InvalidMessageSize","type":"error"},{"inputs":[],"name":"LZ_MessageLib_NotTreasury","type":"error"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_MessageLib_TransferFailed","type":"error"},{"inputs":[],"name":"LZ_MessageLib_ZeroMessageSize","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType1Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType2Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[{"internalType":"uint8","name":"workerId","type":"uint8"}],"name":"LZ_ULN_InvalidWorkerId","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"LZ_ULN_InvalidWorkerOptions","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[{"internalType":"uint16","name":"optionType","type":"uint16"}],"name":"LZ_ULN_UnsupportedOptionType","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"optionalDVNs","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"fees","type":"uint256[]"}],"name":"DVNFeePaid","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultExecutorConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultExecutorConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"indexed":false,"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"name":"ExecutorConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ExecutorFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lzToken","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LzTokenFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"worker","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NativeFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTreasuryNativeFeeCap","type":"uint256"}],"name":"TreasuryNativeFeeCapSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"TreasurySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"executorConfigs","outputs":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"worker","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getExecutorConfig","outputs":[{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"send","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultExecutorConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultExecutorConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTreasuryNativeFeeCap","type":"uint256"}],"name":"setTreasuryNativeFeeCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawLzTokenFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]} diff --git a/workers/src/abi.rs b/workers/src/abi.rs index 75555bcb..3c8f6377 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -10,7 +10,7 @@ sol!( #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] SendLibraryAbi, - "abi/ArbitrumSendLibUln302.json" + "abi/SendLibUln302.json" ); sol!( @@ -18,7 +18,7 @@ sol!( #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] ReceiveLibraryAbi, - "abi/ArbitrumReceiveLibUln302.json" + "abi/ReceiveLibUln302.json" ); sol!( @@ -26,5 +26,5 @@ sol!( #[sol(abi, rpc)] #[derive(Debug, Serialize, Deserialize)] L0V2EndpointAbi, - "abi/ArbitrumL0V2Endpoint.json" + "abi/L0V2Endpoint.json" ); diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index f6752025..03e1ed53 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -1,9 +1,9 @@ //! Main offchain workflow for Nuff DVN. use alloy::primitives::{Address, U256}; -use eyre::Result; +use eyre::{OptionExt, Result}; use futures::stream::StreamExt; -use tracing::{debug, error, info}; +use tracing::{debug, error, info, warn}; use tracing_subscriber::EnvFilter; use workers::{ abi::{ @@ -34,9 +34,7 @@ async fn main() -> Result<()> { let http_provider = get_http_provider(&dvn_data.config)?; // Get the relevant contract ABI, and create contract. - //let sendlib_abi = get_abi_from_path("./abi/ArbitrumSendLibUln302.json")?; - //let sendlib_contract = create_contract_instance(&config, http_provider.clone(), sendlib_abi)?; - let receivelib_abi = get_abi_from_path("./abi/ArbitrumReceiveLibUln302.json")?; + let receivelib_abi = get_abi_from_path("./abi/ReceiveLibUln302.json")?; let contract_address = dvn_data.config.receivelib_uln302_addr.parse::
()?; let receivelib_contract = create_contract_instance(contract_address, http_provider, receivelib_abi)?; @@ -60,55 +58,69 @@ async fn main() -> Result<()> { } } Some(log) = sendlib_stream.next() => { - match log.log_decode::() { - Ok(inner_log) => { - if dvn_data.packet.is_some() { - - info!("DVNFeePaid event found and decoded."); - let required_dvns = inner_log.inner.requiredDVNs.clone(); - let own_dvn_addr = dvn_data.config.dvn_addr.parse::
()?; - - if required_dvns.contains(&own_dvn_addr) { - debug!("Found DVN in required DVNs."); - - // Query how many confirmations are required. - let eid = U256::from(dvn_data.config.network_eid); - let required_confirmations = query_confirmations(&receivelib_contract, eid).await?; - - // Prepare the header hash. - let header_hash = dvn_data.get_header_hash(); - // Prepate the payload hash. - let message_hash = dvn_data.get_message_hash(); - - // Check - let already_verified = query_already_verified( - &receivelib_contract, - own_dvn_addr, - &header, - &payload, - required_confirmations, - ) - .await?; - - if already_verified { - debug!("Packet already verified."); - } else { - dvn_data.verifying(); - debug!("Packet NOT verified. Calling verification."); - // FIXME: incorrect data - verify( + match log.log_decode::() { + Err(e) => { + error!("Received a `DVNFeePaid` event but failed to decode it: {:?}", e); + } + Ok(inner_log) if dvn_data.packet.is_some() => { + info!("DVNFeePaid event found and decoded."); + let required_dvns = &inner_log.inner.requiredDVNs; + let own_dvn_addr = dvn_data.config.dvn_addr.parse::
()?; + + if required_dvns.contains(&own_dvn_addr) { + debug!("Found DVN in required DVNs."); + + // Query how many confirmations are required. + let eid = U256::from(dvn_data.config.network_eid); + let required_confirmations = query_confirmations(&receivelib_contract, eid).await?; + + // Prepare the header hash. + let header_hash = dvn_data.get_header_hash(); + // Prepate the payload hash. + let message_hash = dvn_data.get_message_hash(); + + // Check if the info from the payload could have been extracted. + match (header_hash, message_hash) { + (Some(header_hash), Some(message_hash)) => { + let already_verified = query_already_verified( &receivelib_contract, own_dvn_addr, - header.as_ref(), - payload.as_ref(), + header_hash.as_ref(), + message_hash.as_ref(), required_confirmations, ) .await?; + + if already_verified { + debug!("Packet already verified."); + } else { + dvn_data.verifying(); + debug!("Packet NOT verified. Calling verification."); + + // FIXME: logic for NFFL verification + + verify( + &receivelib_contract, + &dvn_data.get_header().ok_or_eyre("Cannot extract header from payload")?.to_slice(), + message_hash.as_ref(), + required_confirmations, + ).await?; + } + } + (_, None) => { + error!("Cannot payload hash"); + } + (None, _) => { + error!("Cannot message hash"); } - } else { - dvn_data.reset_packet(); } + } else { + dvn_data.reset_packet(); } + + } + Ok(_)=> { + warn!("Received a `DVNFeePaid` event but don't have information about the `Packet` to be verified"); } Err(e) => { error!("Failed to decode `DVNFeePaid` event: {:?}", e); diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs index 3688c70c..fcef831f 100644 --- a/workers/src/chain/connections.rs +++ b/workers/src/chain/connections.rs @@ -12,7 +12,7 @@ use alloy::{ rpc::types::{Filter, Log}, }; use alloy_json_abi::JsonAbi; -use eyre::Result; +use eyre::{OptionExt, Result}; /// Create the subscriptions for the DVN workflow. pub async fn build_subscriptions( @@ -56,7 +56,7 @@ pub fn get_abi_from_path(path: &str) -> Result { let artifact = std::fs::read(path)?; let json: serde_json::Value = serde_json::from_slice(&artifact)?; // SAFETY: Assume `unwrap` is safe since the key has been harcoded - let abi_value = json.get("abi").unwrap(); + let abi_value = json.get("abi").ok_or_eyre("ABI not found in artifact")?; let abi = serde_json::from_str(&abi_value.to_string())?; Ok(abi) } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index d340fc2c..b75dcf9d 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -30,11 +30,14 @@ pub async fn get_messagelib_addr(contract: &ContractInst, eid: U256) -> Result Ok(address), + match receive_library + .first() + .ok_or_eyre("ReceiveLibrary not found in contract")? + { + DynSolValue::Address(address) if address.len() == 20 => Ok(*address), _ => { - error!("Failed to get address"); - Err(eyre!("Failed to get address")) + error!("Failed to get a valid address"); + Err(eyre!("Failed to get a valid address")) } } } @@ -50,7 +53,7 @@ pub async fn query_confirmations(contract: &ContractInst, eid: U256) -> Result { let value = tupled_int[0] .as_uint() diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index f154e0a2..24c979a2 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -23,6 +23,7 @@ pub struct Header { } impl Header { + /// Return the header as a collection of bytes. pub fn to_slice(&self) -> Vec { let mut header = BytesMut::new(); header.put_u8(self.version); @@ -34,6 +35,21 @@ impl Header { header.put_slice(self.guid.as_ref()); header.to_vec() } + + /// Return the header as a collection of bytes but padding the addresses to 32 bytes. + pub fn to_slice_padded(&self) -> Vec { + let mut header = BytesMut::new(); + header.put_u8(self.version); + header.put_u64(self.nonce); + header.put_u32(self.src_eid); + header.put_slice(&[0; 12]); + header.put_slice(self.sender_addr.as_ref()); + header.put_u32(self.dst_eid); + header.put_slice(&[0; 12]); + header.put_slice(self.rcv_addr.as_ref()); + header.put_slice(self.guid.as_ref()); + header.to_vec() + } } /// When feeded a packet, return the whole header, which is everything but the message. @@ -50,7 +66,7 @@ pub fn extract_header(raw_packet: &[u8]) -> Option
{ let dst_eid = buffered_packet.get_u32(); // dst_eid buffered_packet.advance(12); // skip padding let rcv_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); - let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze().iter().as_slice()); + let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze()[..]); Some(Header { version, @@ -167,4 +183,38 @@ mod tests { ) ); } + + #[test] + fn slice_header() { + let hdr = Header { + version: 1, + nonce: 1, + src_eid: 111, + sender_addr: FixedBytes::<20>::from_slice(&[1; 20]), + dst_eid: 222, + rcv_addr: FixedBytes::<20>::from_slice(&[2; 20]), + guid: FixedBytes::<32>::from_slice(&[3; 32]), + }; + let expected_hdr = vec![ + 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 222, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + ]; + let expected_padded_hdr = vec![ + 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, + ]; + + // WHEN: getting the header as a slice without padding. + let sliced_hdr = hdr.to_slice(); + // THEN: it should return the expected value. + assert_eq!(sliced_hdr, expected_hdr); + + // WHEN: getting the header as a slice with padding. + let padded_hdr = hdr.to_slice_padded(); + // THEN: it should return the expected value. + assert_eq!(padded_hdr, expected_padded_hdr); + } } From 2d9d59037d9e474fe0336c7e16708d867b63ec06 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 18 Oct 2024 13:08:39 +0200 Subject: [PATCH 84/96] Update indexer/Dockerfile Co-authored-by: Don <37594653+dndll@users.noreply.github.com> --- indexer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer/Dockerfile b/indexer/Dockerfile index 0f9cf621..09760311 100644 --- a/indexer/Dockerfile +++ b/indexer/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.79 AS builder +FROM rust:1.81 AS builder # Ensure matches rust-toolchain! WORKDIR /tmp/indexer # Copy from nearcore: From ed43e71d838c4a395bc3bdd0e0627eb5e4711d32 Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 18 Oct 2024 18:11:15 +0200 Subject: [PATCH 85/96] chore: fix after refactor --- workers/src/bin/dvn.rs | 8 ++++---- workers/src/chain/connections.rs | 10 ++++------ workers/src/config.rs | 17 +++++++++-------- workers/src/data/extractors.rs | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 03e1ed53..64e26f5a 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -1,6 +1,6 @@ //! Main offchain workflow for Nuff DVN. -use alloy::primitives::{Address, U256}; +use alloy::primitives::U256; use eyre::{OptionExt, Result}; use futures::stream::StreamExt; use tracing::{debug, error, info, warn}; @@ -35,8 +35,8 @@ async fn main() -> Result<()> { // Get the relevant contract ABI, and create contract. let receivelib_abi = get_abi_from_path("./abi/ReceiveLibUln302.json")?; - let contract_address = dvn_data.config.receivelib_uln302_addr.parse::
()?; - let receivelib_contract = create_contract_instance(contract_address, http_provider, receivelib_abi)?; + let receivelib_contract = + create_contract_instance(dvn_data.config.receivelib_uln302_addr, http_provider, receivelib_abi)?; info!("Listening to chain events..."); @@ -65,7 +65,7 @@ async fn main() -> Result<()> { Ok(inner_log) if dvn_data.packet.is_some() => { info!("DVNFeePaid event found and decoded."); let required_dvns = &inner_log.inner.requiredDVNs; - let own_dvn_addr = dvn_data.config.dvn_addr.parse::
()?; + let own_dvn_addr = dvn_data.config.dvn_addr; if required_dvns.contains(&own_dvn_addr) { debug!("Found DVN in required DVNs."); diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs index fcef831f..be660b02 100644 --- a/workers/src/chain/connections.rs +++ b/workers/src/chain/connections.rs @@ -6,7 +6,6 @@ use crate::{ }; use alloy::{ eips::BlockNumberOrTag, - primitives::Address, providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, pubsub::{PubSubFrontend, SubscriptionStream}, rpc::types::{Filter, Log}, @@ -23,19 +22,18 @@ pub async fn build_subscriptions( SubscriptionStream, )> { // Create the provider - let rpc_url = config.ws_rpc_url.clone(); - let ws = WsConnect::new(rpc_url); + let ws = WsConnect::new(config.ws_rpc_url.to_string()); let provider = ProviderBuilder::new().on_ws(ws).await?; // layerzero endpoint filter let packet_filter = Filter::new() - .address(config.l0_endpoint_addr.parse::
()?) + .address(config.l0_endpoint_addr) .event(DVNEvent::PacketSent.as_ref()) .from_block(BlockNumberOrTag::Latest); // messagelib endpoint filter let fee_paid_filter = Filter::new() - .address(config.sendlib_uln302_addr.parse::
()?) + .address(config.sendlib_uln302_addr) .event(DVNEvent::FeePaid.as_ref()) .from_block(BlockNumberOrTag::Latest); @@ -63,6 +61,6 @@ pub fn get_abi_from_path(path: &str) -> Result { /// Construct an HTTP provider given the config. pub fn get_http_provider(config: &DVNConfig) -> Result { - let http_provider = ProviderBuilder::new().on_http(config.http_rpc_url.parse()?); + let http_provider = ProviderBuilder::new().on_http(config.http_rpc_url.to_string().parse()?); Ok(http_provider) } diff --git a/workers/src/config.rs b/workers/src/config.rs index 22e49351..9b8c6425 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -1,5 +1,6 @@ //! Configuration for the DVN offchain workflow. +use alloy::primitives::Address; use config::Config; use eyre::Result; use serde::Deserialize; @@ -7,23 +8,23 @@ use serde::Deserialize; #[derive(Default, Deserialize)] pub struct DVNConfig { /// The Websocket RPC URL to connect to the Ethereum network. - pub ws_rpc_url: String, + pub ws_rpc_url: Address, /// The HTTP RPC URL to connect to the Ethereum network. - pub http_rpc_url: String, + pub http_rpc_url: Address, /// The LayerZero endpoint address. - pub l0_endpoint_addr: String, + pub l0_endpoint_addr: Address, /// The SendLib Ultra Light Node 302 address. - pub sendlib_uln302_addr: String, + pub sendlib_uln302_addr: Address, /// The ReceiveLib Ultra Light Node 302 address. - pub receivelib_uln302_addr: String, + pub receivelib_uln302_addr: Address, /// The SendLib Ultra Light Node 301 address. - pub sendlib_uln301_addr: String, + pub sendlib_uln301_addr: Address, /// The ReceiveLib Ultra Light Node 301 address. - pub receivelib_uln301_addr: String, + pub receivelib_uln301_addr: Address, /// The Ethereum network ID. pub network_eid: u64, /// Own DVN address. Used to check when the DVN is assigned to a task. - pub dvn_addr: String, + pub dvn_addr: Address, } impl DVNConfig { diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 24c979a2..cef703a7 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -66,7 +66,7 @@ pub fn extract_header(raw_packet: &[u8]) -> Option
{ let dst_eid = buffered_packet.get_u32(); // dst_eid buffered_packet.advance(12); // skip padding let rcv_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); - let guid: FixedBytes<32> = FixedBytes::from_slice(buffered_packet.split_to(32).freeze()[..]); + let guid: FixedBytes<32> = FixedBytes::from_slice(&buffered_packet.split_to(32).freeze()[..]); Some(Header { version, From 0ed696ffe407b6e8556f3a18b4ed5b9d0db98789 Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 18 Oct 2024 18:12:09 +0200 Subject: [PATCH 86/96] chore: bls bn254 signature takes two uint256 --- contracts/evm/src/dvn/interfaces/INuffClient.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/evm/src/dvn/interfaces/INuffClient.sol b/contracts/evm/src/dvn/interfaces/INuffClient.sol index 0b2ce1d7..3a3ad0bb 100644 --- a/contracts/evm/src/dvn/interfaces/INuffClient.sol +++ b/contracts/evm/src/dvn/interfaces/INuffClient.sol @@ -9,8 +9,8 @@ interface INuffClient { } struct Signature { - uint[2] X; - uint[2] Y; + uint256 X; + uint256 Y; } struct PublicKey { From ec067831d740366ee28c7833345d20be5d3f181b Mon Sep 17 00:00:00 2001 From: Lozano Date: Fri, 18 Oct 2024 18:14:04 +0200 Subject: [PATCH 87/96] chore: remove v1 contract, leaving only v2 (without version suffix) --- contracts/evm/src/dvn/NuffDVN.sol | 24 +- contracts/evm/src/dvn/NuffDVNv2.sol | 331 ---------------------------- 2 files changed, 12 insertions(+), 343 deletions(-) delete mode 100644 contracts/evm/src/dvn/NuffDVNv2.sol diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 197af729..4063403d 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -6,16 +6,19 @@ import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import { ILayerZeroEndpoint } from "@layerzerolabs/lz-evm-v1-0.7/contracts/interfaces/ILayerZeroEndpoint.sol"; -import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; +import { IDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVN.sol"; +import { ILayerZeroDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/interfaces/ILayerZeroDVN.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { IReceiveUlnE2 } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IReceiveUlnE2.sol"; +import { IDVNFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVNFeeLib.sol"; import { INuffClient } from "./interfaces/INuffClient.sol"; import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; import { ReentrancyGuard } from "@solady/src/utils/ReentrancyGuard.sol"; -contract NuffDVN is ILayerZeroDVN, AccessControl, ReentrancyGuard { +contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { using PacketV1Codec for bytes; using ECDSA for bytes32; using MessageHashUtils for bytes32; @@ -52,13 +55,10 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, ReentrancyGuard { address public feeLib; // FIXME: everything is getting stored in cold storage; use a buffer instead - mapping(uint256 => Job) public jobs; - - // eid => bool - mapping(uint32 => bool) public supportedDstChain; - mapping(uint32 dstEid => DstConfig) public dstConfig; - // srcEid => ( jobId => isVerified ) - mapping(uint32 => mapping(uint256 => bool)) public verifiedJobs; + mapping(uint256 jobId => Job job) public jobs; + mapping(uint32 eid => bool isSupported) public supportedDstChain; + mapping(uint32 dstEid => DstConfig config) public dstConfig; + mapping(uint32 srcEid => mapping(uint256 jobId => bool isVerified)) public verifiedJobs; event JobAssigned(uint256 jobId); event Verified(uint32 srcEid, uint256 jobId); @@ -95,7 +95,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, ReentrancyGuard { bytes calldata _options ) external - nonReentrant + nonReentrant payable override onlyRole(MESSAGE_LIB_ROLE) @@ -147,7 +147,7 @@ contract NuffDVN is ILayerZeroDVN, AccessControl, ReentrancyGuard { uint64 _confirmations, address _receiver, bytes calldata _reqId, - INuffClient.BSLSign calldata _signature, + INuffClient.SchnorrSign calldata _signature, bytes calldata gatewaySignature ) external nonReentrant { require(_isLocal(_dstEid), "Invalid dstEid"); diff --git a/contracts/evm/src/dvn/NuffDVNv2.sol b/contracts/evm/src/dvn/NuffDVNv2.sol deleted file mode 100644 index de254684..00000000 --- a/contracts/evm/src/dvn/NuffDVNv2.sol +++ /dev/null @@ -1,331 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import "@openzeppelin/contracts/access/AccessControl.sol"; -import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; -import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; - -import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; -import { ISendLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; -import { IDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVN.sol"; -import { ILayerZeroDVN } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/interfaces/ILayerZeroDVN.sol"; -import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; -import { IReceiveUlnE2 } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IReceiveUlnE2.sol"; -import { IDVNFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uld/interfaces/IDVNFeeLib.sol"; - -import { INuffClient } from "./interfaces/INuffClient.sol"; -import { INuffDVNConfig } from "./interfaces/INuffDVNConfig.sol"; - -import { ReentrancyGuard } from "@solady/src/utils/ReentrancyGuard.sol"; - -contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { - using PacketV1Codec for bytes; - using ECDSA for bytes32; - using MessageHashUtils for bytes32; - - struct Job { - address origin; - uint32 srcEid; - uint32 dstEid; - bytes packetHeader; - bytes32 payloadHash; - uint64 confirmations; - address sender; - address receiver; - bytes options; - } - - bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); - bytes32 public constant MESSAGE_LIB_ROLE = keccak256("MESSAGE_LIB_ROLE"); - - ILayerZeroEndpointV2 public layerZeroEndpointV2; - ILayerZeroEndpoint public layerZeroEndpointV1; - uint32 public immutable localEid; - - uint256 public lastJobId; - - uint256 public nuffAppId; - INuffClient.PublicKey public nuffPublicKey; - INuffClient public nuff; - INuffDVNConfig public dvnConfig; - - uint16 public defaultMultiplierBps; - uint64 public quorum; - address public priceFeed; - address public feeLib; - - // FIXME: everything is getting stored in cold storage; use a buffer instead - mapping(uint256 jobId => Job job) public jobs; - mapping(uint32 eid => bool isSupported) public supportedDstChain; - mapping(uint32 dstEid => DstConfig config) public dstConfig; - mapping(uint32 srcEid => mapping(uint256 jobId => bool isVerified)) public verifiedJobs; - - event JobAssigned(uint256 jobId); - event Verified(uint32 srcEid, uint256 jobId); - event Withdraw(address lib, address to, uint256 amount); - - constructor( - uint256 _nuffAppId, - INuffClient.PublicKey memory _nuffPublicKey, - address _nuff, - address _layerZeroEndpointV2, - address _layerZeroEndpointV1, - address _dvnConfig, - uint16 _defaultMultiplierBps, - uint64 _quorum, - address _priceFeed, - address _feeLib - ) { - nuffAppId = _nuffAppId; - nuffPublicKey = _nuffPublicKey; - nuff = INuffClient(_nuff); - layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); - layerZeroEndpointV1 = ILayerZeroEndpoint(_layerZeroEndpointV1); - dvnConfig = INuffDVNConfig(_dvnConfig); - localEid = layerZeroEndpointV2.eid(); - defaultMultiplierBps = _defaultMultiplierBps; - quorum = _quorum; - priceFeed = _priceFeed; - feeLib = _feeLib; - _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); - _grantRole(ADMIN_ROLE, msg.sender); - } - - function assignJob( - AssignJobParam calldata _param, - bytes calldata _options - ) - external - nonReentrant - payable - override - onlyRole(MESSAGE_LIB_ROLE) - returns (uint256 fee) - { - require(supportedDstChain[_param.dstEid], "Unsupported chain"); - - uint256 jobId = ++lastJobId; - Job storage newJob = jobs[jobId]; - - require(_param.sender != address(0), "Invalid sender address"); - - newJob.origin = msg.sender; - newJob.srcEid = localEid; - newJob.dstEid = _param.dstEid; - newJob.packetHeader = _param.packetHeader; - newJob.payloadHash = _param.payloadHash; - newJob.confirmations = _param.confirmations; - newJob.sender = _param.sender; - newJob.receiver = address( - uint160(uint256(_param.packetHeader.receiver())) - ); - newJob.options = _options; - - IDVNFeeLib.FeeParams memory feeParams = IDVNFeeLib.FeeParams( - priceFeed, - _param.dstEid, - _param.confirmations, - _param.sender, - quorum, - defaultMultiplierBps - ); - - fee = IDVNFeeLib(feeLib).getFeeOnSend( - feeParams, - dstConfig[_param.dstEid], - _options - ); - - emit JobAssigned(jobId); - } - - function verify( - uint32 _srcEid, - uint32 _dstEid, - uint256 _jobId, - bytes memory _packetHeader, - bytes32 _payloadHash, - uint64 _confirmations, - address _receiver, - bytes calldata _reqId, - INuffClient.SchnorrSign calldata _signature, - bytes calldata gatewaySignature - ) external nonReentrant { - require(_isLocal(_dstEid), "Invalid dstEid"); - require( - !verifiedJobs[_srcEid][_jobId], - "src jobId is already verified" - ); - - verifiedJobs[_srcEid][_jobId] = true; - - bytes32 hash = keccak256( - abi.encodePacked( - nuffAppId, - _reqId, - _srcEid, - _dstEid, - _jobId, - _packetHeader, - _payloadHash, - _confirmations, - _receiver - ) - ); - - _verifyNuffSig( - _reqId, - hash, - _signature, - dvnConfig.shieldNodes(_receiver), - gatewaySignature - ); - - _lzVerify( - _srcEid, - _packetHeader, - _payloadHash, - _confirmations, - _receiver - ); - - emit Verified(_srcEid, _jobId); - } - - function setNuffAppId(uint256 _nuffAppId) external onlyRole(ADMIN_ROLE) { - nuffAppId = _nuffAppId; - } - - function setNuffContract(address addr) external onlyRole(ADMIN_ROLE) { - nuff = INuffClient(addr); - } - - function setNuffPubKey( - INuffClient.PublicKey memory _nuffPublicKey - ) external onlyRole(ADMIN_ROLE) { - nuffPublicKey = _nuffPublicKey; - } - - function setLzEndpointV2( - address _layerZeroEndpointV2 - ) external onlyRole(ADMIN_ROLE) { - layerZeroEndpointV2 = ILayerZeroEndpointV2(_layerZeroEndpointV2); - } - - function updateSupportedDstChain( - uint32 eid, - bool status - ) external onlyRole(ADMIN_ROLE) { - supportedDstChain[eid] = status; - } - - function setPriceFeed(address _priceFeed) external onlyRole(ADMIN_ROLE) { - priceFeed = _priceFeed; - } - - function setDefaultMultiplierBps( - uint16 _multiplierBps - ) external onlyRole(ADMIN_ROLE) { - defaultMultiplierBps = _multiplierBps; - } - - function setDstConfig( - DstConfigParam[] calldata _params - ) external onlyRole(ADMIN_ROLE) { - for (uint256 i = 0; i < _params.length; ++i) { - DstConfigParam calldata param = _params[i]; - dstConfig[param.dstEid] = DstConfig( - param.gas, - param.multiplierBps, - param.floorMarginUSD - ); - } - emit SetDstConfig(_params); - } - - function setFeeLib(address _feeLib) external onlyRole(ADMIN_ROLE) { - feeLib = _feeLib; - } - - function withdrawFee( - address _lib, - address _to, - uint256 _amount - ) external onlyRole(ADMIN_ROLE) { - require(hasRole(MESSAGE_LIB_ROLE, _lib), "Invalid lib"); - ISendLib(_lib).withdrawFee(_to, _amount); - emit Withdraw(_lib, _to, _amount); - } - - function getFee( - uint32 _dstEid, - uint64 _confirmations, - address _sender, - bytes calldata _options - ) external nonReentrant view override returns (uint256 _fee) { - IDVNFeeLib.FeeParams memory params = IDVNFeeLib.FeeParams( - priceFeed, - _dstEid, - _confirmations, - _sender, - quorum, - defaultMultiplierBps - ); - return IDVNFeeLib(feeLib).getFee(params, dstConfig[_dstEid], _options); - } - - function _verifyNuffSig( - bytes calldata reqId, - bytes32 hash, - INuffClient.BLSSign calldata sign, - bytes calldata gatewaySignature - ) internal { - bool verified = nuff.nuffVerify( - reqId, - uint256(hash), - sign, - nuffPublicKey - ); - require(verified, "Invalid signature!"); - } - - function _lzVerify( - uint32 _srcEid, - bytes memory _packetHeader, - bytes32 _payloadHash, - uint64 _confirmations, - address _receiver - ) internal { - address receiverLib; - if (_isV2(_srcEid)) { - (receiverLib, ) = layerZeroEndpointV2.getReceiveLibrary( - _receiver, - _srcEid - ); - } else { - receiverLib = layerZeroEndpointV1.getReceiveLibraryAddress( - _receiver - ); - } - - IReceiveUlnE2(receiverLib).verify( - _packetHeader, - _payloadHash, - _confirmations - ); - } - - function _isLocal(uint32 _dstEid) internal view returns (bool) { - if (localEid == _dstEid || localEid == _dstEid + 30000) { - return true; - } - return false; - } - - function _isV2(uint32 _eid) internal pure returns (bool) { - if (_eid > 30000) { - return true; - } - return false; - } -} From 20a711c5f5e4d9ad16910b22dcec44a69cb0acd1 Mon Sep 17 00:00:00 2001 From: Lozano Date: Sun, 20 Oct 2024 18:52:49 +0200 Subject: [PATCH 88/96] chore: address comments --- contracts/evm/src/dvn/NuffDVN.sol | 2 +- workers/src/abi.rs | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index 4063403d..ae3442c3 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -147,7 +147,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { uint64 _confirmations, address _receiver, bytes calldata _reqId, - INuffClient.SchnorrSign calldata _signature, + INuffClient.BLSSign calldata _signature, bytes calldata gatewaySignature ) external nonReentrant { require(_isLocal(_dstEid), "Invalid dstEid"); diff --git a/workers/src/abi.rs b/workers/src/abi.rs index 3c8f6377..feebcf1e 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -1,6 +1,10 @@ //! Types create from the JSON ABI files. //! //! For example, to be able to decode the logs' data, or call contracts' methods. +//! +//! To obtain the corresponding ABI, there are two ways: +//! - Manually downloading the ABI from the contract's source code (we use this one for now); +//! - Using `alloy` to download the ABI from a contract's address (if possible). use alloy::sol; use serde::{Deserialize, Serialize}; @@ -13,14 +17,6 @@ sol!( "abi/SendLibUln302.json" ); -sol!( - #[allow(missing_docs)] - #[sol(abi, rpc)] - #[derive(Debug, Serialize, Deserialize)] - ReceiveLibraryAbi, - "abi/ReceiveLibUln302.json" -); - sol!( #[allow(missing_docs)] #[sol(abi, rpc)] From b19f68e5e8a881c834632a88748b680396ab5bb7 Mon Sep 17 00:00:00 2001 From: Lozano Date: Mon, 21 Oct 2024 13:17:11 +0200 Subject: [PATCH 89/96] chore: address pr comments --- contracts/evm/src/dvn/NuffDVN.sol | 4 +- workers/src/bin/dvn.rs | 1 + workers/src/chain/connections.rs | 2 +- workers/src/chain/contracts.rs | 18 ++++++++ workers/src/config.rs | 6 +-- workers/src/data/extractors.rs | 77 ++++++++++++++++++++++++------- 6 files changed, 86 insertions(+), 22 deletions(-) diff --git a/contracts/evm/src/dvn/NuffDVN.sol b/contracts/evm/src/dvn/NuffDVN.sol index ae3442c3..1e78e70b 100644 --- a/contracts/evm/src/dvn/NuffDVN.sol +++ b/contracts/evm/src/dvn/NuffDVN.sol @@ -278,7 +278,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { bytes32 hash, INuffClient.BLSSign calldata sign, bytes calldata gatewaySignature - ) internal { + ) internal nonReentrant { bool verified = nuff.nuffVerify( reqId, uint256(hash), @@ -294,7 +294,7 @@ contract NuffDVNV2 is ILayerZeroDVN, AccessControl, IDVN, ReentrancyGuard { bytes32 _payloadHash, uint64 _confirmations, address _receiver - ) internal { + ) internal nonReentrant { address receiverLib; if (_isV2(_srcEid)) { (receiverLib, ) = layerZeroEndpointV2.getReceiveLibrary( diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index 64e26f5a..f7bca716 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -40,6 +40,7 @@ async fn main() -> Result<()> { info!("Listening to chain events..."); + // FIXME: refactor the operations from this loop into smaller, testable containers. loop { dvn_worker.listening(); tokio::select! { diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs index be660b02..1d22c8ab 100644 --- a/workers/src/chain/connections.rs +++ b/workers/src/chain/connections.rs @@ -22,7 +22,7 @@ pub async fn build_subscriptions( SubscriptionStream, )> { // Create the provider - let ws = WsConnect::new(config.ws_rpc_url.to_string()); + let ws = WsConnect::new(config.ws_rpc_url.clone()); let provider = ProviderBuilder::new().on_ws(ws).await?; // layerzero endpoint filter diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index b75dcf9d..8959dcd5 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -43,6 +43,24 @@ pub async fn get_messagelib_addr(contract: &ContractInst, eid: U256) -> Result Result { // Call the `getUlnConfig` function on the contract let uln_config = contract diff --git a/workers/src/config.rs b/workers/src/config.rs index 9b8c6425..6e754aa3 100644 --- a/workers/src/config.rs +++ b/workers/src/config.rs @@ -5,12 +5,12 @@ use config::Config; use eyre::Result; use serde::Deserialize; -#[derive(Default, Deserialize)] +#[derive(Debug, Deserialize)] pub struct DVNConfig { /// The Websocket RPC URL to connect to the Ethereum network. - pub ws_rpc_url: Address, + pub ws_rpc_url: String, /// The HTTP RPC URL to connect to the Ethereum network. - pub http_rpc_url: Address, + pub http_rpc_url: String, /// The LayerZero endpoint address. pub l0_endpoint_addr: Address, /// The SendLib Ultra Light Node 302 address. diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index cef703a7..5b66f8e2 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -16,9 +16,9 @@ pub struct Header { version: u8, nonce: u64, src_eid: u32, - sender_addr: FixedBytes<20>, + sender_addr: AddressWithType, dst_eid: u32, - rcv_addr: FixedBytes<20>, + rcv_addr: AddressWithType, guid: FixedBytes<32>, } @@ -29,9 +29,9 @@ impl Header { header.put_u8(self.version); header.put_u64(self.nonce); header.put_u32(self.src_eid); - header.put_slice(self.sender_addr.as_ref()); + header.put_slice(self.sender_addr.address.as_ref()); header.put_u32(self.dst_eid); - header.put_slice(self.rcv_addr.as_ref()); + header.put_slice(self.rcv_addr.address.as_ref()); header.put_slice(self.guid.as_ref()); header.to_vec() } @@ -43,15 +43,41 @@ impl Header { header.put_u64(self.nonce); header.put_u32(self.src_eid); header.put_slice(&[0; 12]); - header.put_slice(self.sender_addr.as_ref()); + header.put_slice(self.sender_addr.address.as_ref()); header.put_u32(self.dst_eid); header.put_slice(&[0; 12]); - header.put_slice(self.rcv_addr.as_ref()); + header.put_slice(self.rcv_addr.address.as_ref()); header.put_slice(self.guid.as_ref()); header.to_vec() } } +#[derive(Debug, PartialEq)] +struct AddressWithType { + pub address: FixedBytes<32>, + pub variant: AddressType, +} + +#[derive(Debug, PartialEq)] +enum AddressType { + Ethereum, + Solana, +} + +impl AddressWithType { + /// Expect some bytes (usually, 32 bytes) thay may encode an ETH address (padded with 12 bytes) or a Solana address (non-padded). + pub fn new(bytes_addr: &[u8]) -> Self { + println!("{:?}", bytes_addr); + let variant = if bytes_addr.starts_with(&[0; 12]) { + AddressType::Ethereum + } else { + AddressType::Solana + }; + let address = FixedBytes::<32>::from_slice(bytes_addr); + Self { variant, address } + } +} + /// When feeded a packet, return the whole header, which is everything but the message. pub fn extract_header(raw_packet: &[u8]) -> Option
{ if raw_packet.len() < MINIMUM_PACKET_LENGTH { @@ -61,11 +87,9 @@ pub fn extract_header(raw_packet: &[u8]) -> Option
{ let version = buffered_packet.get_u8(); // version let nonce = buffered_packet.get_u64(); // nonce let src_eid = buffered_packet.get_u32(); // src_eid - buffered_packet.advance(12); // skip padding - let sender_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); + let sender_addr = AddressWithType::new(&buffered_packet.split_to(32)); let dst_eid = buffered_packet.get_u32(); // dst_eid - buffered_packet.advance(12); // skip padding - let rcv_addr: FixedBytes<20> = FixedBytes::from_slice(buffered_packet.split_to(20).as_ref()); + let rcv_addr = AddressWithType::new(&buffered_packet.split_to(32)); let guid: FixedBytes<32> = FixedBytes::from_slice(&buffered_packet.split_to(32).freeze()[..]); Some(Header { @@ -126,6 +150,27 @@ pub fn extract_message(raw_packet: &[u8]) -> Option> { mod tests { use super::*; use alloy::hex; + use alloy::primitives::Address; + use eyre::Result; + + impl AddressWithType { + pub fn ethereum_addr(&self) -> Result
{ + match self.variant { + AddressType::Ethereum => Ok(Address::from_slice(&self.address[12..32])), + _ => Err(eyre::eyre!("This is not an Ethereum address")), + } + } + } + + #[test] + fn addresses_with_types() { + let a = AddressWithType::new(&[1; 20]); + assert_eq!(a.variant, AddressType::Ethereum); + assert!(a.address.starts_with(&[0; 12])); + + let b = AddressWithType::new(&[1; 32]); + assert_eq!(b.variant, AddressType::Solana); + } #[test] fn extract_msg() { @@ -158,8 +203,8 @@ mod tests { assert_eq!(header.nonce, 76929); assert_eq!(header.src_eid, 30110); assert_eq!( - header.sender_addr, - FixedBytes::<20>::from_slice( + header.sender_addr.ethereum_addr().unwrap(), + Address::from_slice( hex::decode("19cfce47ed54a88614648dc3f19a5980097007dd") .unwrap() .as_ref() @@ -167,8 +212,8 @@ mod tests { ); assert_eq!(header.dst_eid, 30184); assert_eq!( - header.rcv_addr, - FixedBytes::<20>::from_slice( + header.rcv_addr.ethereum_addr().unwrap(), + Address::from_slice( hex::decode("5634c4a5fed09819e3c46d86a965dd9447d86e47") .unwrap() .as_ref() @@ -190,9 +235,9 @@ mod tests { version: 1, nonce: 1, src_eid: 111, - sender_addr: FixedBytes::<20>::from_slice(&[1; 20]), + sender_addr: AddressWithType::new(&[1; 20]), dst_eid: 222, - rcv_addr: FixedBytes::<20>::from_slice(&[2; 20]), + rcv_addr: AddressWithType::new(&[2; 20]), guid: FixedBytes::<32>::from_slice(&[3; 32]), }; let expected_hdr = vec![ From 20ef139c2d933f52dff0cda8f9469c44bcfca025 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Tue, 22 Oct 2024 14:10:49 +0200 Subject: [PATCH 90/96] chore: remove alloy-json-abi as external dep --- Cargo.lock | 1 - Cargo.toml | 2 +- workers/Cargo.toml | 1 - workers/src/chain/connections.rs | 2 +- workers/src/chain/contracts.rs | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02c46931..e42b28be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9831,7 +9831,6 @@ name = "workers" version = "0.1.0" dependencies = [ "alloy", - "alloy-json-abi", "blsful", "bytes", "config", diff --git a/Cargo.toml b/Cargo.toml index 9ebdd5ed..69a7bead 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ edition = "2021" repository = "https://github.com/NethermindEth/near-sffl" [workspace.dependencies] -alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde"] } +alloy = { version = "0.4.2", features = ["full", "node-bindings", "rpc-types-debug", "rpc-types-trace", "json-rpc", "rpc-client", "serde", "json-abi"] } alloy-primitives = "0.8.3" alloy-rpc-client = "0.4.2" alloy-rpc-types = "0.4.2" diff --git a/workers/Cargo.toml b/workers/Cargo.toml index 714536d9..69cc89a1 100644 --- a/workers/Cargo.toml +++ b/workers/Cargo.toml @@ -9,7 +9,6 @@ path = "src/bin/dvn.rs" [dependencies] alloy.workspace = true -alloy-json-abi = "0.8.8" blsful = "2.5.7" bytes = "1.7.2" config = { version = "0.14.0", features = ["toml"] } diff --git a/workers/src/chain/connections.rs b/workers/src/chain/connections.rs index 1d22c8ab..b1763323 100644 --- a/workers/src/chain/connections.rs +++ b/workers/src/chain/connections.rs @@ -6,11 +6,11 @@ use crate::{ }; use alloy::{ eips::BlockNumberOrTag, + json_abi::JsonAbi, providers::{Provider, ProviderBuilder, RootProvider, WsConnect}, pubsub::{PubSubFrontend, SubscriptionStream}, rpc::types::{Filter, Log}, }; -use alloy_json_abi::JsonAbi; use eyre::{OptionExt, Result}; /// Create the subscriptions for the DVN workflow. diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 8959dcd5..e5ed92f4 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -4,11 +4,11 @@ use crate::chain::{ContractInst, HttpProvider}; use alloy::{ contract::{ContractInstance, Interface}, dyn_abi::DynSolValue, + json_abi::JsonAbi, network::Ethereum, primitives::{keccak256, Address, U256}, transports::http::{Client, Http}, }; -use alloy_json_abi::JsonAbi; use eyre::{eyre, OptionExt, Result}; use tracing::{debug, error}; From fbedff6aba315dc25002d5f36b5dce7a272d9da9 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Tue, 22 Oct 2024 14:12:31 +0200 Subject: [PATCH 91/96] chore: broken test to share --- workers/src/abi.rs | 16 +++++++++++ workers/src/data/extractors.rs | 51 +++++++++++++++++++++++++++++++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/workers/src/abi.rs b/workers/src/abi.rs index feebcf1e..5b4eb08c 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -24,3 +24,19 @@ sol!( L0V2EndpointAbi, "abi/L0V2Endpoint.json" ); + +sol!( + #[allow(missing_docs)] + #[sol(abi)] + #[derive(Debug, PartialEq, Eq)] + struct Packet { + uint8 version; + uint64 nonce; + uint32 srcEid; + bytes32 sender; + uint32 dstEid; + bytes32 receiver; + bytes32 guid; + bytes message; + } +); diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs index 5b66f8e2..f15bef3d 100644 --- a/workers/src/data/extractors.rs +++ b/workers/src/data/extractors.rs @@ -149,8 +149,8 @@ pub fn extract_message(raw_packet: &[u8]) -> Option> { #[cfg(test)] mod tests { use super::*; - use alloy::hex; - use alloy::primitives::Address; + use crate::abi::SendLibraryAbi; + use alloy::{hex, primitives::Address, sol_types::SolType}; use eyre::Result; impl AddressWithType { @@ -162,6 +162,49 @@ mod tests { } } + #[test] + fn abi_decode() -> Result<()> { + let hex_payload = hex!("010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); + + let v = SendLibraryAbi::Packet::abi_decode(&hex_payload, true)?; + println!("{:?}", v); + + //// Similar to the Packet + //type MyTy = ( + // Uint<8>, + // Uint<64>, + // Uint<32>, + // FixedBytes<32>, + // Uint<32>, + // FixedBytes<32>, + // FixedBytes<32>, + // Bytes, + //); + //let v = MyTy::abi_decode(&hex_payload, true)?; + //println!("{:?}", v); + + //sol!( + // #[derive(Debug)] + // struct Packet { + // uint8 version; + // uint64 nonce; + // uint32 srcEid; + // bytes32 sender; + // uint32 dstEid; + // bytes32 receiver; + // bytes32 guid; + // bytes message; + // } + //); + //let v = Packet::abi_decode(&hex_payload, true)?; + //println!("{:?}", v); + + //let v = SendLibraryAbi::Packet::abi_decode(&hex_payload, true)?; + //println!("{:?}", v); + + Ok(()) + } + #[test] fn addresses_with_types() { let a = AddressWithType::new(&[1; 20]); @@ -221,7 +264,7 @@ mod tests { ); assert_eq!( header.guid, - FixedBytes::<32>::from_slice( + alloy::primitives::FixedBytes::<32>::from_slice( hex::decode("9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b") .unwrap() .as_ref() @@ -238,7 +281,7 @@ mod tests { sender_addr: AddressWithType::new(&[1; 20]), dst_eid: 222, rcv_addr: AddressWithType::new(&[2; 20]), - guid: FixedBytes::<32>::from_slice(&[3; 32]), + guid: alloy::primitives::FixedBytes::<32>::from_slice(&[3; 32]), }; let expected_hdr = vec![ 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, From 2931fee4332a8fc52d723e9b08411e6e4cc6d46b Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Tue, 22 Oct 2024 15:57:20 +0200 Subject: [PATCH 92/96] chore: fix after rebase --- Cargo.lock | 279 +++++++++++++++++---------------- workers/src/bin/dvn.rs | 21 +-- workers/src/chain/contracts.rs | 4 +- 3 files changed, 149 insertions(+), 155 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e42b28be..53379e11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,7 +105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -244,7 +244,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -255,7 +255,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -376,9 +376,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.40" +version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4932d790c723181807738cf1ac68198ab581cd699545b155601332541ee47bd" +checksum = "156bfc5dcd52ef9a5f33381701fa03310317e14c65093a9430d3e3557b08dcd3" dependencies = [ "alloy-primitives", "num_enum", @@ -424,9 +424,9 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cce174ca699ddee3bfb2ec1fbd99ad7efd05eca20c5c888d8320db41f7e8f04" +checksum = "a54c7158ea4a394bef220d82d8fdd412fb9b1ca2d6024db539070b7bc01b6401" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -437,9 +437,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5647fce5a168f9630f935bf7821c4207b1755184edaeba783cb4e11d35058484" +checksum = "e6228abfc751a29cde117b0879b805a3e0b3b641358f063272c83ca459a56886" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -506,9 +506,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b5671117c38b1c2306891f97ad3828d85487087f54ebe2c7591a055ea5bcea7" +checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -583,9 +583,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71738eb20c42c5fb149571e76536a0f309d142f3957c28791662b96baf77a3d" +checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" dependencies = [ "alloy-rlp", "bytes", @@ -688,7 +688,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -831,23 +831,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0900b83f4ee1f45c640ceee596afbc118051921b9438fdb5a3175c1a7e05f8b" +checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41b1e78dde06b5e12e6702fa8c1d30621bf07728ba75b801fb801c9c6a0ba10" +checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -857,16 +857,16 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91dc311a561a306664393407b88d3e53ae58581624128afd8a15faa5de3627dc" +checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" dependencies = [ "alloy-json-abi", "const-hex", @@ -875,15 +875,15 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.82", + "syn 2.0.79", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d1fbee9e698f3ba176b6e7a145f4aefe6d2b746b611e8bb246fe11a0e9f6c4" +checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" dependencies = [ "serde", "winnow", @@ -891,9 +891,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086f41bc6ebcd8cb15f38ba20e47be38dd03692149681ce8061c35d960dbf850" +checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -1087,9 +1087,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.90" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -1272,7 +1272,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "synstructure", ] @@ -1284,7 +1284,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -1434,7 +1434,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -1451,7 +1451,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -1495,7 +1495,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -1576,7 +1576,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.31", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -1692,7 +1692,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -1922,7 +1922,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "syn_derive", ] @@ -2017,9 +2017,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] @@ -2079,9 +2079,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "jobserver", "libc", @@ -2182,7 +2182,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2654,7 +2654,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2678,7 +2678,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2689,7 +2689,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2788,7 +2788,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2820,7 +2820,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2831,7 +2831,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2844,7 +2844,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -2864,7 +2864,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "unicode-xid", ] @@ -2935,7 +2935,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -3136,7 +3136,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -3157,7 +3157,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -3347,9 +3347,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", @@ -3482,7 +3482,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -3822,9 +3822,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.31" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -3846,9 +3846,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -3869,7 +3869,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.31", + "hyper 0.14.30", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3882,7 +3882,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.31", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", @@ -3896,7 +3896,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.0", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -3915,7 +3915,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.5.0", + "hyper 1.4.1", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -3987,9 +3987,9 @@ dependencies = [ [[package]] name = "impl-more" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" +checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" [[package]] name = "impl-trait-for-tuples" @@ -4295,9 +4295,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -4493,7 +4493,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -4698,7 +4698,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5150,7 +5150,7 @@ dependencies = [ "opentelemetry", "parking_lot 0.12.3", "pin-project", - "protobuf 3.7.1", + "protobuf 3.6.0", "protobuf-codegen", "rand", "rayon", @@ -5233,7 +5233,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5350,7 +5350,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "quote", "serde", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5360,7 +5360,7 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "near-rpc-error-core", "serde", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5638,7 +5638,7 @@ dependencies = [ "easy-ext", "futures", "hex", - "hyper 0.14.31", + "hyper 0.14.30", "hyper-tls 0.5.0", "indicatif", "near-async", @@ -5861,7 +5861,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5908,9 +5908,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if 1.0.0", @@ -5929,7 +5929,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -5949,9 +5949,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -6036,9 +6036,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.4.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" +checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" dependencies = [ "borsh 1.5.1", "num-traits", @@ -6387,7 +6387,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -6428,7 +6428,7 @@ checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -6566,12 +6566,12 @@ checksum = "aa06bd51638b6e76ac9ba9b6afb4164fa647bd2916d722f2623fbb6d1ed8bdba" [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -6656,14 +6656,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -6723,7 +6723,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -6734,9 +6734,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "protobuf" -version = "3.7.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" +checksum = "3018844a02746180074f621e847703737d27d89d7f0721a7a4da317f88b16385" dependencies = [ "once_cell", "protobuf-support", @@ -6745,13 +6745,13 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.7.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" +checksum = "411c15a212b4de05eb8bc989fd066a74c86bd3c04e27d6e86bd7703b806d7734" dependencies = [ "anyhow", "once_cell", - "protobuf 3.7.1", + "protobuf 3.6.0", "protobuf-parse", "regex", "tempfile", @@ -6760,14 +6760,14 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.7.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" +checksum = "06f45f16b522d92336e839b5e40680095a045e36a1e7f742ba682ddc85236772" dependencies = [ "anyhow", "indexmap 2.6.0", "log", - "protobuf 3.7.1", + "protobuf 3.6.0", "protobuf-support", "tempfile", "thiserror", @@ -6776,9 +6776,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.7.1" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" +checksum = "faf96d872914fcda2b66d66ea3fff2be7c66865d31c7bb2790cff32c0e714880" dependencies = [ "thiserror", ] @@ -7095,7 +7095,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.31", + "hyper 0.14.30", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -7136,7 +7136,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.0", + "hyper 1.4.1", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -7452,9 +7452,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ "once_cell", "ring 0.17.8", @@ -7710,9 +7710,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -7759,13 +7759,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -7779,9 +7779,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -7797,7 +7797,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -7848,7 +7848,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8120,7 +8120,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8161,9 +8161,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -8172,14 +8172,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5e0c2ea8db64b2898b62ea2fbd60204ca95e0b2c6bdf53ff768bbe916fbe4d" +checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8191,7 +8191,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8217,7 +8217,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8316,7 +8316,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8425,9 +8425,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -8470,7 +8470,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8617,7 +8617,7 @@ dependencies = [ "h2", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.31", + "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", @@ -8708,7 +8708,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -8835,9 +8835,12 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.8.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] [[package]] name = "unicode-bidi" @@ -8927,9 +8930,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "valuable" @@ -9023,7 +9026,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -9057,7 +9060,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9515,7 +9518,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -9947,7 +9950,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] @@ -9967,7 +9970,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.79", ] [[package]] diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index f7bca716..acea2045 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -6,15 +6,12 @@ use futures::stream::StreamExt; use tracing::{debug, error, info, warn}; use tracing_subscriber::EnvFilter; use workers::{ - abi::{ - L0V2EndpointAbi::{self}, - SendLibraryAbi, - }, + abi::{L0V2EndpointAbi::PacketSent, SendLibraryAbi::DVNFeePaid}, chain::{ connections::{build_subscriptions, get_abi_from_path, get_http_provider}, contracts::{create_contract_instance, query_already_verified, query_confirmations, verify}, }, - data::Dvn, + data::dvn::Dvn, }; #[tokio::main] @@ -42,7 +39,7 @@ async fn main() -> Result<()> { // FIXME: refactor the operations from this loop into smaller, testable containers. loop { - dvn_worker.listening(); + dvn_data.listening(); tokio::select! { Some(log) = endpoint_stream.next() => { match log.log_decode::() { @@ -51,11 +48,8 @@ async fn main() -> Result<()> { } Ok(inner_log) => { debug!("PacketSent event found and decoded."); - dvn_worker.packet_received(inner_log.data().clone()); + dvn_data.packet_received(inner_log.data().clone()); }, - Err(e) => { - error!("Failed to decode `PacketSent` event: {:?}", e); - } } } Some(log) = sendlib_stream.next() => { @@ -103,7 +97,7 @@ async fn main() -> Result<()> { verify( &receivelib_contract, &dvn_data.get_header().ok_or_eyre("Cannot extract header from payload")?.to_slice(), - message_hash.as_ref(), + &message_hash.to_vec(), required_confirmations, ).await?; } @@ -123,12 +117,9 @@ async fn main() -> Result<()> { Ok(_)=> { warn!("Received a `DVNFeePaid` event but don't have information about the `Packet` to be verified"); } - Err(e) => { - error!("Failed to decode `DVNFeePaid` event: {:?}", e); - } } }, } - dvn_worker.reset_packet(); + dvn_data.reset_packet(); } } diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index e5ed92f4..28ee012e 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -126,8 +126,8 @@ pub async fn query_already_verified( pub async fn verify( contract: &ContractInst, - packet_header: &Bytes, - payload: &Bytes, + packet_header: &Vec, + payload: &Vec, confirmations: U256, ) -> Result { //// Create the hash of the payload From 5cbfb6406b9540cbf343e070e6a74715b18bf389 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Tue, 22 Oct 2024 18:10:20 +0200 Subject: [PATCH 93/96] refactor: manual encode/decode --- workers/src/abi.rs | 29 ++-- workers/src/bin/dvn.rs | 8 +- workers/src/chain/contracts.rs | 4 +- workers/src/data/bytes_utils.rs | 202 +++++++++++++++++++++++ workers/src/data/dvn.rs | 26 ++- workers/src/data/mod.rs | 3 +- workers/src/data/packet_v1_codec.rs | 239 ++++++++++++++++++++++++++++ 7 files changed, 481 insertions(+), 30 deletions(-) create mode 100644 workers/src/data/bytes_utils.rs create mode 100644 workers/src/data/packet_v1_codec.rs diff --git a/workers/src/abi.rs b/workers/src/abi.rs index 5b4eb08c..b0170fa4 100644 --- a/workers/src/abi.rs +++ b/workers/src/abi.rs @@ -25,18 +25,17 @@ sol!( "abi/L0V2Endpoint.json" ); -sol!( - #[allow(missing_docs)] - #[sol(abi)] - #[derive(Debug, PartialEq, Eq)] - struct Packet { - uint8 version; - uint64 nonce; - uint32 srcEid; - bytes32 sender; - uint32 dstEid; - bytes32 receiver; - bytes32 guid; - bytes message; - } -); +//sol!( +// #[allow(missing_docs)] +// #[sol(abi)] +// #[derive(Debug, PartialEq, Eq)] +// struct Packet { +// uint64 nonce; +// uint32 src_eid; +// bytes32 sender; +// uint32 dst_eid; +// bytes32 receiver; +// bytes32 guid; +// bytes message; +// } +//); diff --git a/workers/src/bin/dvn.rs b/workers/src/bin/dvn.rs index acea2045..c6d3fe31 100644 --- a/workers/src/bin/dvn.rs +++ b/workers/src/bin/dvn.rs @@ -96,17 +96,17 @@ async fn main() -> Result<()> { verify( &receivelib_contract, - &dvn_data.get_header().ok_or_eyre("Cannot extract header from payload")?.to_slice(), - &message_hash.to_vec(), + dvn_data.get_header().ok_or_eyre("Cannot extract header from payload")?, + message_hash.as_ref(), required_confirmations, ).await?; } } (_, None) => { - error!("Cannot payload hash"); + error!("Cannot hash payload"); } (None, _) => { - error!("Cannot message hash"); + error!("Cannot hash message"); } } } else { diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 28ee012e..5614acdb 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -126,8 +126,8 @@ pub async fn query_already_verified( pub async fn verify( contract: &ContractInst, - packet_header: &Vec, - payload: &Vec, + packet_header: &[u8], + payload: &[u8], confirmations: U256, ) -> Result { //// Create the hash of the payload diff --git a/workers/src/data/bytes_utils.rs b/workers/src/data/bytes_utils.rs new file mode 100644 index 00000000..163c2d9b --- /dev/null +++ b/workers/src/data/bytes_utils.rs @@ -0,0 +1,202 @@ +//! Utilities for manipulating byte arrays. + +pub trait BytesUtils { + fn to_u8(&self, start: usize) -> u8; + fn to_u16(&self, start: usize) -> u16; + fn to_u32(&self, start: usize) -> u32; + fn to_u64(&self, start: usize) -> u64; + fn to_u128(&self, start: usize) -> u128; + fn to_bytes32(&self, start: usize) -> &[u8]; + fn to_byte_array(&self, start: usize) -> [u8; N]; +} + +impl BytesUtils for &[u8] { + fn to_u8(&self, start: usize) -> u8 { + self[start] + } + + fn to_u16(&self, start: usize) -> u16 { + let mut bytes: [u8; 2] = [0; 2]; + bytes.copy_from_slice(&self[start..start + 2]); + u16::from_be_bytes(bytes) + } + + fn to_u32(&self, start: usize) -> u32 { + let mut bytes: [u8; 4] = [0; 4]; + bytes.copy_from_slice(&self[start..start + 4]); + u32::from_be_bytes(bytes) + } + + fn to_u64(&self, start: usize) -> u64 { + let mut bytes: [u8; 8] = [0; 8]; + bytes.copy_from_slice(&self[start..start + 8]); + u64::from_be_bytes(bytes) + } + + fn to_u128(&self, start: usize) -> u128 { + let mut bytes: [u8; 16] = [0; 16]; + bytes.copy_from_slice(&self[start..start + 16]); + u128::from_be_bytes(bytes) + } + + fn to_bytes32(&self, start: usize) -> &[u8] { + &self[start..start + 32] + } + + fn to_byte_array(&self, start: usize) -> [u8; N] { + let mut bytes: [u8; N] = [0; N]; + bytes.copy_from_slice(&self[start..start + N]); + bytes + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_to_u8() { + let bytes = &[1_u8, 2][..]; + assert_eq!(bytes.to_u8(0), 1); + } + + #[test] + fn test_to_u8_start1() { + let bytes = &[1_u8, 2][..]; + assert_eq!(bytes.to_u8(1), 2); + } + + #[test] + fn test_to_u16() { + let bytes = &[1_u8, 1, 2][..]; + assert_eq!(bytes.to_u16(0), 2_u16.pow(8) + 1); + } + + #[test] + fn test_to_u16_start1() { + let bytes = &[1_u8, 1, 2][..]; + assert_eq!(bytes.to_u16(1), 2_u16.pow(8) + 2); + } + + #[test] + fn test_to_u32() { + let bytes = &[1_u8, 1, 1, 1, 2][..]; + assert_eq!(bytes.to_u32(0), 2_u32.pow(24) + 2_u32.pow(16) + 2_u32.pow(8) + 1); + } + + #[test] + fn test_to_u32_start1() { + let bytes = &[1_u8, 1, 1, 1, 2][..]; + assert_eq!(bytes.to_u32(1), 2_u32.pow(24) + 2_u32.pow(16) + 2_u32.pow(8) + 2); + } + + #[test] + fn test_to_u64() { + let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 2][..]; + assert_eq!( + bytes.to_u64(0), + 2_u64.pow(56) + + 2_u64.pow(48) + + 2_u64.pow(40) + + 2_u64.pow(32) + + 2_u64.pow(24) + + 2_u64.pow(16) + + 2_u64.pow(8) + + 1 + ); + } + + #[test] + fn test_to_u64_start1() { + let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 2][..]; + assert_eq!( + bytes.to_u64(1), + 2_u64.pow(56) + + 2_u64.pow(48) + + 2_u64.pow(40) + + 2_u64.pow(32) + + 2_u64.pow(24) + + 2_u64.pow(16) + + 2_u64.pow(8) + + 2 + ); + } + + #[test] + fn test_to_u128() { + let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2][..]; + assert_eq!( + bytes.to_u128(0), + 2_u128.pow(120) + + 2_u128.pow(112) + + 2_u128.pow(104) + + 2_u128.pow(96) + + 2_u128.pow(88) + + 2_u128.pow(80) + + 2_u128.pow(72) + + 2_u128.pow(64) + + 2_u128.pow(56) + + 2_u128.pow(48) + + 2_u128.pow(40) + + 2_u128.pow(32) + + 2_u128.pow(24) + + 2_u128.pow(16) + + 2_u128.pow(8) + + 1 + ); + } + + #[test] + fn test_to_u128_start1() { + let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2][..]; + assert_eq!( + bytes.to_u128(1), + 2_u128.pow(120) + + 2_u128.pow(112) + + 2_u128.pow(104) + + 2_u128.pow(96) + + 2_u128.pow(88) + + 2_u128.pow(80) + + 2_u128.pow(72) + + 2_u128.pow(64) + + 2_u128.pow(56) + + 2_u128.pow(48) + + 2_u128.pow(40) + + 2_u128.pow(32) + + 2_u128.pow(24) + + 2_u128.pow(16) + + 2_u128.pow(8) + + 2 + ); + } + + #[test] + fn test_to_bytes32() { + let bytes = &[ + 1_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ][..]; + assert_eq!(bytes.to_bytes32(0), &[1_u8; 32]); + } + + #[test] + fn test_to_bytes32_start1() { + let bytes = &[ + 2_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ][..]; + assert_eq!(bytes.to_bytes32(1), &[1_u8; 32]); + } + + #[test] + fn test_to_byte_array() { + let bytes = &[1_u8; 64][..]; + assert_eq!(bytes.to_byte_array::<32>(0), [1_u8; 32]); + } + + #[test] + fn test_to_byte_array_start1() { + let bytes = &[ + 2_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + ][..]; + assert_eq!(bytes.to_byte_array::<32>(1), [1_u8; 32]); + } +} diff --git a/workers/src/data/dvn.rs b/workers/src/data/dvn.rs index 35b41ae0..8bb28991 100644 --- a/workers/src/data/dvn.rs +++ b/workers/src/data/dvn.rs @@ -1,10 +1,10 @@ use crate::{ abi::L0V2EndpointAbi::PacketSent, config::{self, DVNConfig}, - data::extractors::{extract_header, extract_message, Header}, + data::packet_v1_codec::{header, message}, }; use alloy::primitives::{keccak256, B256}; -use eyre::Result; +use eyre::{eyre, Result}; use tracing::debug; pub struct Dvn { @@ -52,27 +52,37 @@ impl Dvn { self.status = DvnStatus::Verifying; } - pub fn get_header(&self) -> Option
{ + pub fn get_header(&self) -> Option<&[u8]> { if let Some(packet) = self.packet.as_ref() { - extract_header(packet.encodedPayload.as_ref()) + Some(header(packet.encodedPayload.as_ref())) } else { None } } pub fn get_header_hash(&self) -> Option { + self.packet + .as_ref() + .map(|packet| keccak256(header(packet.encodedPayload.as_ref()))) + } + pub fn get_header_hash_result(&self) -> Result { if let Some(packet) = self.packet.as_ref() { - extract_header(packet.encodedPayload.as_ref()).map(|header| keccak256(header.to_slice())) + Ok(keccak256(header(packet.encodedPayload.as_ref()))) } else { - None + Err(eyre!("There's no header to hash")) } } pub fn get_message_hash(&self) -> Option { + self.packet + .as_ref() + .map(|packet| keccak256(message(packet.encodedPayload.as_ref()))) + } + pub fn get_message_hash_result(&self) -> Result { if let Some(packet) = self.packet.as_ref() { - extract_message(packet.encodedPayload.as_ref()).map(|message| keccak256(message.as_slice())) + Ok(keccak256(message(packet.encodedPayload.as_ref()))) } else { - None + Err(eyre!("There's no message to hash")) } } } diff --git a/workers/src/data/mod.rs b/workers/src/data/mod.rs index 037da295..fd9b7559 100644 --- a/workers/src/data/mod.rs +++ b/workers/src/data/mod.rs @@ -1,2 +1,3 @@ +pub mod bytes_utils; pub mod dvn; -pub mod extractors; +pub mod packet_v1_codec; diff --git a/workers/src/data/packet_v1_codec.rs b/workers/src/data/packet_v1_codec.rs new file mode 100644 index 00000000..5b8dcd8b --- /dev/null +++ b/workers/src/data/packet_v1_codec.rs @@ -0,0 +1,239 @@ +//! Encoding and decoding as PacketV1Codec from LayerZero. + +use crate::data::bytes_utils::BytesUtils; + +pub const PACKET_VERSION: u8 = 1; +pub const PACKET_HEADER_SIZE: usize = 81; + +// header (version + nonce + path) +// version +const PACKET_VERSION_OFFSET: usize = 0; +// nonce +const NONCE_OFFSET: usize = 1; +// path +const SRC_EID_OFFSET: usize = 9; +const SENDER_OFFSET: usize = 13; +const DST_EID_OFFSET: usize = 45; +const RECEIVER_OFFSET: usize = 49; +// payload (guid + message) +const GUID_OFFSET: usize = 81; +const MESSAGE_OFFSET: usize = 113; + +/// Packet struct as defined in messagelib. +pub struct Packet { + pub nonce: u64, + pub src_eid: u32, + pub sender: [u8; 32], + pub dst_eid: u32, + pub receiver: [u8; 32], + pub guid: [u8; 32], + pub message: Vec, +} + +/// Encode a whole [`Packet`] into a byte array. +pub fn encode(packet: &Packet) -> Vec { + [ + &PACKET_VERSION.to_be_bytes()[..], + &packet.nonce.to_be_bytes()[..], + &packet.src_eid.to_be_bytes()[..], + &packet.sender.to_vec()[..], + &packet.dst_eid.to_be_bytes()[..], + &packet.receiver[..], + &packet.guid[..], + &packet.message, + ] + .concat() +} + +/// Encode only the [`Packet`]'s header into a byte array. +pub fn encode_packet_header(packet: &Packet) -> Vec { + [ + &PACKET_VERSION.to_be_bytes()[..], + &packet.nonce.to_be_bytes()[..], + &packet.src_eid.to_be_bytes()[..], + &packet.sender.to_vec()[..], + &packet.dst_eid.to_be_bytes()[..], + &packet.receiver[..], + ] + .concat() +} + +pub fn header(packet: &[u8]) -> &[u8] { + &packet[0..GUID_OFFSET] +} + +pub fn version(packet: &[u8]) -> u8 { + packet.to_u8(PACKET_VERSION_OFFSET) +} + +pub fn nonce(packet: &[u8]) -> u64 { + packet.to_u64(NONCE_OFFSET) +} + +pub fn src_eid(packet: &[u8]) -> u32 { + packet.to_u32(SRC_EID_OFFSET) +} + +pub fn sender(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(SENDER_OFFSET) +} + +pub fn dst_eid(packet: &[u8]) -> u32 { + packet.to_u32(DST_EID_OFFSET) +} + +pub fn receiver(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(RECEIVER_OFFSET) +} + +pub fn guid(packet: &[u8]) -> [u8; 32] { + packet.to_byte_array(GUID_OFFSET) +} + +pub fn message(packet: &[u8]) -> &[u8] { + &packet[MESSAGE_OFFSET..] +} + +pub fn payload(packet: &[u8]) -> &[u8] { + &packet[GUID_OFFSET..] +} + +#[cfg(test)] +mod tests { + use alloy::hex; + + use super::*; + + #[test] + fn test_encode() { + let packet = Packet { + nonce: 1, + src_eid: 101, + sender: [1; 32], + dst_eid: 102, + receiver: [3; 32], + guid: [2; 32], + message: vec![1, 2, 3], + }; + + let encoded = encode(&packet); + assert_eq!(version(&encoded), PACKET_VERSION); + assert_eq!(nonce(&encoded), packet.nonce); + assert_eq!(src_eid(&encoded), packet.src_eid); + assert_eq!(sender(&encoded), packet.sender); + assert_eq!(dst_eid(&encoded), packet.dst_eid); + assert_eq!(receiver(&encoded), packet.receiver); + assert_eq!(guid(&encoded), packet.guid); + assert_eq!(message(&encoded), packet.message); + + // assert payload, should equal to guid + message + let payload_bytes = [&packet.guid[..], packet.message.as_slice()].concat(); + assert_eq!(payload(&encoded), payload_bytes.as_slice()); + + // assert header, should equal to version + nonce + path + let header_bytes = [ + // version + &PACKET_VERSION.to_be_bytes()[..], + // nonce + &packet.nonce.to_be_bytes()[..], + // path + &packet.src_eid.to_be_bytes()[..], + &packet.sender[..], + &packet.dst_eid.to_be_bytes()[..], + &packet.receiver[..], + ] + .concat(); + assert_eq!(header(&encoded), header_bytes.as_slice()); + + // assert sender + assert_eq!(sender(&encoded), packet.sender); + + // assert receiver + assert_eq!(receiver(&encoded), packet.receiver); + } + + #[test] + fn test_encode_packet_header() { + let packet = Packet { + nonce: 1, + src_eid: 101, + sender: [1; 32], + dst_eid: 102, + receiver: [3; 32], + guid: [2; 32], + message: vec![1, 2, 3], + }; + + let encoded = encode_packet_header(&packet); + assert_eq!(version(&encoded), PACKET_VERSION); + assert_eq!(nonce(&encoded), packet.nonce); + assert_eq!(src_eid(&encoded), packet.src_eid); + assert_eq!(sender(&encoded), packet.sender); + assert_eq!(dst_eid(&encoded), packet.dst_eid); + assert_eq!(receiver(&encoded), packet.receiver); + + // assert header, should equal to version + nonce + path + let header_bytes = [ + // version + &PACKET_VERSION.to_be_bytes()[..], + // nonce + &packet.nonce.to_be_bytes()[..], + // path + &packet.src_eid.to_be_bytes()[..], + &packet.sender[..], + &packet.dst_eid.to_be_bytes()[..], + &packet.receiver[..], + ] + .concat(); + assert_eq!(header(&encoded), header_bytes.as_slice()); + } + + /// Fixture using Typescript package `lz-utilities-v2` from LayerZero. + #[test] + fn decode() { + let packet = hex::decode("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00").unwrap(); + + let version = version(&packet); + assert_eq!(version, PACKET_VERSION); + + let nonce = nonce(&packet); + assert_eq!(nonce, 76929); + + let src_eid = src_eid(&packet); + assert_eq!(src_eid, 30110); + + let sender = sender(&packet); + assert_eq!( + sender, + hex::decode("0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd") + .unwrap() + .as_slice() + ); + + let dst_eid = dst_eid(&packet); + assert_eq!(dst_eid, 30184); + + let receiver = receiver(&packet); + assert_eq!( + receiver, + hex::decode("0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47") + .unwrap() + .as_slice() + ); + + let guid = guid(&packet); + assert_eq!( + guid, + hex::decode("0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b") + .unwrap() + .as_slice() + ); + + let payload = payload(&packet); + assert_eq!( + payload, + hex::decode("0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00") + .unwrap().as_slice() + ); + } +} From 22af924379a73cfe9b25ec2d6fef5462ac8afad3 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Wed, 23 Oct 2024 08:57:22 +0200 Subject: [PATCH 94/96] chore: remove unused --- workers/src/data/extractors.rs | 308 --------------------------------- 1 file changed, 308 deletions(-) delete mode 100644 workers/src/data/extractors.rs diff --git a/workers/src/data/extractors.rs b/workers/src/data/extractors.rs deleted file mode 100644 index f15bef3d..00000000 --- a/workers/src/data/extractors.rs +++ /dev/null @@ -1,308 +0,0 @@ -//! Extract data from encoded payloads. -//! -//! FIXME: couldn't make it work with `alloy`+ABI, so -//! using manual extracting for now. Added tests. -//! Re-check if it can work that way. - -use alloy::primitives::FixedBytes; -use bytes::{Buf, BufMut, BytesMut}; - -/// Minimum length of a packet. -const MINIMUM_PACKET_LENGTH: usize = 113; // 1 + 8 + 4 + 32 + 4 + 32 + 32 - -/// The whole header from the `Packet`. -#[derive(Debug)] -pub struct Header { - version: u8, - nonce: u64, - src_eid: u32, - sender_addr: AddressWithType, - dst_eid: u32, - rcv_addr: AddressWithType, - guid: FixedBytes<32>, -} - -impl Header { - /// Return the header as a collection of bytes. - pub fn to_slice(&self) -> Vec { - let mut header = BytesMut::new(); - header.put_u8(self.version); - header.put_u64(self.nonce); - header.put_u32(self.src_eid); - header.put_slice(self.sender_addr.address.as_ref()); - header.put_u32(self.dst_eid); - header.put_slice(self.rcv_addr.address.as_ref()); - header.put_slice(self.guid.as_ref()); - header.to_vec() - } - - /// Return the header as a collection of bytes but padding the addresses to 32 bytes. - pub fn to_slice_padded(&self) -> Vec { - let mut header = BytesMut::new(); - header.put_u8(self.version); - header.put_u64(self.nonce); - header.put_u32(self.src_eid); - header.put_slice(&[0; 12]); - header.put_slice(self.sender_addr.address.as_ref()); - header.put_u32(self.dst_eid); - header.put_slice(&[0; 12]); - header.put_slice(self.rcv_addr.address.as_ref()); - header.put_slice(self.guid.as_ref()); - header.to_vec() - } -} - -#[derive(Debug, PartialEq)] -struct AddressWithType { - pub address: FixedBytes<32>, - pub variant: AddressType, -} - -#[derive(Debug, PartialEq)] -enum AddressType { - Ethereum, - Solana, -} - -impl AddressWithType { - /// Expect some bytes (usually, 32 bytes) thay may encode an ETH address (padded with 12 bytes) or a Solana address (non-padded). - pub fn new(bytes_addr: &[u8]) -> Self { - println!("{:?}", bytes_addr); - let variant = if bytes_addr.starts_with(&[0; 12]) { - AddressType::Ethereum - } else { - AddressType::Solana - }; - let address = FixedBytes::<32>::from_slice(bytes_addr); - Self { variant, address } - } -} - -/// When feeded a packet, return the whole header, which is everything but the message. -pub fn extract_header(raw_packet: &[u8]) -> Option
{ - if raw_packet.len() < MINIMUM_PACKET_LENGTH { - return None; - } - let mut buffered_packet = BytesMut::from(raw_packet); - let version = buffered_packet.get_u8(); // version - let nonce = buffered_packet.get_u64(); // nonce - let src_eid = buffered_packet.get_u32(); // src_eid - let sender_addr = AddressWithType::new(&buffered_packet.split_to(32)); - let dst_eid = buffered_packet.get_u32(); // dst_eid - let rcv_addr = AddressWithType::new(&buffered_packet.split_to(32)); - let guid: FixedBytes<32> = FixedBytes::from_slice(&buffered_packet.split_to(32).freeze()[..]); - - Some(Header { - version, - nonce, - src_eid, - sender_addr, - dst_eid, - rcv_addr, - guid, - }) -} - -/// When feeded a packet, return the whole message, which is everything but the header. -pub fn extract_message(raw_packet: &[u8]) -> Option> { - // If there's no message to be loaded, return `None`. - if raw_packet.len() < MINIMUM_PACKET_LENGTH { - return None; - } - let mut buffered_packet = BytesMut::from(raw_packet); - // Skip the header. - buffered_packet.advance(MINIMUM_PACKET_LENGTH); - let message = buffered_packet.freeze().to_vec(); - - Some(message) -} - -/// Test the extraction of the header and the message from a packet. -/// -/// An encodedPayload from a transaction is used as mockup data, -/// and to test that it correctly decodes it, a LayerZero's library -/// in typescript has been used to check it: -/// -/// ```typescript -/// import { PacketSerializer } from "@layerzerolabs/lz-v2-utilities"; -/// -/// const des = PacketSerializer.deserialize("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); -/// -/// console.log(des); -/// ``` -/// -/// And its output is: -/// ``` -/// { -/// version: 1, -/// nonce: '76929', -/// srcEid: 30110, -/// sender: '0x00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd', -/// dstEid: 30184, -/// receiver: '0x0000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e47', -/// guid: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b', -/// message: '0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00', -/// payload: '0x9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00' -/// } -/// ``` -/// Note: The payload is the concatenation of the guid and the message. -#[cfg(test)] -mod tests { - use super::*; - use crate::abi::SendLibraryAbi; - use alloy::{hex, primitives::Address, sol_types::SolType}; - use eyre::Result; - - impl AddressWithType { - pub fn ethereum_addr(&self) -> Result
{ - match self.variant { - AddressType::Ethereum => Ok(Address::from_slice(&self.address[12..32])), - _ => Err(eyre::eyre!("This is not an Ethereum address")), - } - } - } - - #[test] - fn abi_decode() -> Result<()> { - let hex_payload = hex!("010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"); - - let v = SendLibraryAbi::Packet::abi_decode(&hex_payload, true)?; - println!("{:?}", v); - - //// Similar to the Packet - //type MyTy = ( - // Uint<8>, - // Uint<64>, - // Uint<32>, - // FixedBytes<32>, - // Uint<32>, - // FixedBytes<32>, - // FixedBytes<32>, - // Bytes, - //); - //let v = MyTy::abi_decode(&hex_payload, true)?; - //println!("{:?}", v); - - //sol!( - // #[derive(Debug)] - // struct Packet { - // uint8 version; - // uint64 nonce; - // uint32 srcEid; - // bytes32 sender; - // uint32 dstEid; - // bytes32 receiver; - // bytes32 guid; - // bytes message; - // } - //); - //let v = Packet::abi_decode(&hex_payload, true)?; - //println!("{:?}", v); - - //let v = SendLibraryAbi::Packet::abi_decode(&hex_payload, true)?; - //println!("{:?}", v); - - Ok(()) - } - - #[test] - fn addresses_with_types() { - let a = AddressWithType::new(&[1; 20]); - assert_eq!(a.variant, AddressType::Ethereum); - assert!(a.address.starts_with(&[0; 12])); - - let b = AddressWithType::new(&[1; 32]); - assert_eq!(b.variant, AddressType::Solana); - } - - #[test] - fn extract_msg() { - // GIVEN: a known encodedPayload - let hex_payload = "0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00"; - - // WHEN: the values are extracted from it. - let payload: Vec = hex::decode(hex_payload).unwrap(); - let message = extract_message(&payload).unwrap(); - - // THEN: the message is correctly extracted. - // Check the extracted value isn't altered. - assert!(hex_payload.contains(&hex::encode(&message))); - // Check the obtained value is the same as the expected one (see above to know - // where this comes from). - let expected_message = hex::decode("0x0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00").unwrap(); - assert_eq!(message, expected_message); - } - - #[test] - fn extract_hdr() { - // GIVEN: a known encodedPayload - let payload: Vec = hex::decode("0x010000000000012c810000759e00000000000000000000000019cfce47ed54a88614648dc3f19a5980097007dd000075e80000000000000000000000005634c4a5fed09819e3c46d86a965dd9447d86e479527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b0200000000000000000000000000000000000000000000000000002d79883d2000000d00000000000000000000000051a9ffd0c6026dcd59b5f2f42cc119deaa7347d0000000000000000e00000d0000000000000000000000005c8fbdbbc01d3474e7e40de14538e1e58fd485b3000000000000206b00").unwrap(); - - // WHEN: the header is extracted from it. - let header = extract_header(&payload).unwrap(); - - // THEN: the header values are correctly extracted. - assert_eq!(header.version, 1); - assert_eq!(header.nonce, 76929); - assert_eq!(header.src_eid, 30110); - assert_eq!( - header.sender_addr.ethereum_addr().unwrap(), - Address::from_slice( - hex::decode("19cfce47ed54a88614648dc3f19a5980097007dd") - .unwrap() - .as_ref() - ) - ); - assert_eq!(header.dst_eid, 30184); - assert_eq!( - header.rcv_addr.ethereum_addr().unwrap(), - Address::from_slice( - hex::decode("5634c4a5fed09819e3c46d86a965dd9447d86e47") - .unwrap() - .as_ref() - ) - ); - assert_eq!( - header.guid, - alloy::primitives::FixedBytes::<32>::from_slice( - hex::decode("9527645d4aecaa3325a0225a2b593eea5f0d26a44b97af7276bc0a80ed43047b") - .unwrap() - .as_ref() - ) - ); - } - - #[test] - fn slice_header() { - let hdr = Header { - version: 1, - nonce: 1, - src_eid: 111, - sender_addr: AddressWithType::new(&[1; 20]), - dst_eid: 222, - rcv_addr: AddressWithType::new(&[2; 20]), - guid: alloy::primitives::FixedBytes::<32>::from_slice(&[3; 32]), - }; - let expected_hdr = vec![ - 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 0, 222, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - ]; - let expected_padded_hdr = vec![ - 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, - ]; - - // WHEN: getting the header as a slice without padding. - let sliced_hdr = hdr.to_slice(); - // THEN: it should return the expected value. - assert_eq!(sliced_hdr, expected_hdr); - - // WHEN: getting the header as a slice with padding. - let padded_hdr = hdr.to_slice_padded(); - // THEN: it should return the expected value. - assert_eq!(padded_hdr, expected_padded_hdr); - } -} From bbba6d45b4e9a2f953bdcafaa36147f24d404794 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Wed, 23 Oct 2024 11:47:53 +0200 Subject: [PATCH 95/96] chore: address pr comments --- .gitignore | 1 - workers/abi/L0V2Endpoint.json | 1 + workers/abi/ReceiveLibUln302.json | 1 + workers/abi/SendLibUln302.json | 1 + workers/src/chain/contracts.rs | 11 ++--- workers/src/data/bytes_utils.rs | 74 ------------------------------- 6 files changed, 6 insertions(+), 83 deletions(-) create mode 100644 workers/abi/L0V2Endpoint.json create mode 100644 workers/abi/ReceiveLibUln302.json create mode 100644 workers/abi/SendLibUln302.json diff --git a/.gitignore b/.gitignore index fbf66b4b..fbd735af 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,3 @@ libnear_da_rpc_sys.* # Ignore configuration for DVN or Executor **/config_dvn.toml **/config_executor.toml -**/abi/ diff --git a/workers/abi/L0V2Endpoint.json b/workers/abi/L0V2Endpoint.json new file mode 100644 index 00000000..33f4ede9 --- /dev/null +++ b/workers/abi/L0V2Endpoint.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_AlreadyRegistered","type":"error"},{"inputs":[],"name":"LZ_ComposeExists","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_ComposeNotFound","type":"error"},{"inputs":[],"name":"LZ_DefaultReceiveLibUnavailable","type":"error"},{"inputs":[],"name":"LZ_DefaultSendLibUnavailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"requiredNative","type":"uint256"},{"internalType":"uint256","name":"suppliedNative","type":"uint256"},{"internalType":"uint256","name":"requiredLzToken","type":"uint256"},{"internalType":"uint256","name":"suppliedLzToken","type":"uint256"}],"name":"LZ_InsufficientFee","type":"error"},{"inputs":[],"name":"LZ_InvalidExpiry","type":"error"},{"inputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"LZ_InvalidNonce","type":"error"},{"inputs":[],"name":"LZ_InvalidPayloadHash","type":"error"},{"inputs":[],"name":"LZ_InvalidReceiveLibrary","type":"error"},{"inputs":[],"name":"LZ_LzTokenUnavailable","type":"error"},{"inputs":[],"name":"LZ_OnlyNonDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlyReceiveLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredLib","type":"error"},{"inputs":[],"name":"LZ_OnlyRegisteredOrDefaultLib","type":"error"},{"inputs":[],"name":"LZ_OnlySendLib","type":"error"},{"inputs":[],"name":"LZ_PathNotInitializable","type":"error"},{"inputs":[],"name":"LZ_PathNotVerifiable","type":"error"},{"inputs":[{"internalType":"bytes32","name":"expected","type":"bytes32"},{"internalType":"bytes32","name":"actual","type":"bytes32"}],"name":"LZ_PayloadHashNotFound","type":"error"},{"inputs":[],"name":"LZ_SameValue","type":"error"},{"inputs":[],"name":"LZ_SendReentrancy","type":"error"},{"inputs":[],"name":"LZ_Unauthorized","type":"error"},{"inputs":[],"name":"LZ_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_UnsupportedInterface","type":"error"},{"inputs":[],"name":"LZ_ZeroLzTokenFee","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"}],"name":"ComposeDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"ComposeSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"expiry","type":"uint256"}],"name":"DefaultReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"DefaultSendLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"delegate","type":"address"}],"name":"DelegateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"}],"name":"InboundNonceSkipped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"LibraryRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint16","name":"index","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzComposeAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"reason","type":"bytes"}],"name":"LzReceiveAlert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"LzTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketBurnt","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"PacketDelivered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketNilified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"encodedPayload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"address","name":"sendLibrary","type":"address"}],"name":"PacketSent","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"indexed":false,"internalType":"struct Origin","name":"origin","type":"tuple"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"name":"PacketVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"ReceiveLibrarySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"oldLib","type":"address"},{"indexed":false,"internalType":"uint256","name":"timeout","type":"uint256"}],"name":"ReceiveLibraryTimeoutSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"address","name":"newLib","type":"address"}],"name":"SendLibrarySet","type":"event"},{"inputs":[],"name":"EMPTY_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NIL_PAYLOAD_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockedLibrary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"clear","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint16","name":"index","type":"uint16"}],"name":"composeQueue","outputs":[{"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"defaultReceiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"dstEid","type":"uint32"}],"name":"defaultSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"delegate","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eid","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"config","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"}],"name":"getReceiveLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegisteredLibraries","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSendContext","outputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"getSendLibrary","outputs":[{"internalType":"address","name":"lib","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"}],"name":"inboundNonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"inboundNonce","type":"uint64"}],"name":"inboundPayloadHash","outputs":[{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"initializable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"isDefaultSendLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lib","type":"address"}],"name":"isRegisteredLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSendingMessage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"address","name":"_actualReceiveLib","type":"address"}],"name":"isValidReceiveLibrary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"lazyInboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzCompose","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzComposeAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint256","name":"_gas","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_extraData","type":"bytes"},{"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"lzReceiveAlert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lzToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"bytes32","name":"_receiver","type":"bytes32"}],"name":"nextGuid","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"nilify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"}],"name":"outboundNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_sender","type":"address"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint32","name":"srcEid","type":"uint32"}],"name":"receiveLibraryTimeout","outputs":[{"internalType":"address","name":"lib","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lib","type":"address"}],"name":"registerLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"bool","name":"payInLzToken","type":"bool"}],"internalType":"struct MessagingParams","name":"_params","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"uint16","name":"_index","type":"uint16"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"sendCompose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"address","name":"_lib","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setDefaultReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setDefaultReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setDefaultSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"}],"name":"setLzToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"},{"internalType":"uint256","name":"_gracePeriod","type":"uint256"}],"name":"setReceiveLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_lib","type":"address"},{"internalType":"uint256","name":"_expiry","type":"uint256"}],"name":"setReceiveLibraryTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_newLib","type":"address"}],"name":"setSendLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_srcEid","type":"uint32"},{"internalType":"bytes32","name":"_sender","type":"bytes32"},{"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"skip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"}]} diff --git a/workers/abi/ReceiveLibUln302.json b/workers/abi/ReceiveLibUln302.json new file mode 100644 index 00000000..9b9ad405 --- /dev/null +++ b/workers/abi/ReceiveLibUln302.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidEid","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketHeader","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidPacketVersion","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[],"name":"LZ_ULN_Verifying","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"dvn","type":"address"},{"indexed":false,"internalType":"bytes","name":"header","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"confirmations","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"proofHash","type":"bytes32"}],"name":"PayloadVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"uint32","name":"_localEid","type":"uint32"}],"name":"assertHeader","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"commitVerification","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"headerHash","type":"bytes32"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"},{"internalType":"address","name":"dvn","type":"address"}],"name":"hashLookup","outputs":[{"internalType":"bool","name":"submitted","type":"bool"},{"internalType":"uint64","name":"confirmations","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"_config","type":"tuple"},{"internalType":"bytes32","name":"_headerHash","type":"bytes32"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"verifiable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_packetHeader","type":"bytes"},{"internalType":"bytes32","name":"_payloadHash","type":"bytes32"},{"internalType":"uint64","name":"_confirmations","type":"uint64"}],"name":"verify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"}]} diff --git a/workers/abi/SendLibUln302.json b/workers/abi/SendLibUln302.json new file mode 100644 index 00000000..ed8a8f21 --- /dev/null +++ b/workers/abi/SendLibUln302.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"},{"internalType":"uint256","name":"_treasuryGasLimit","type":"uint256"},{"internalType":"uint256","name":"_treasuryGasForFeeCap","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DVN_InvalidDVNIdx","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"DVN_InvalidDVNOptions","type":"error"},{"inputs":[],"name":"LZ_MessageLib_CannotWithdrawAltToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"requested","type":"uint256"},{"internalType":"uint256","name":"available","type":"uint256"}],"name":"LZ_MessageLib_InvalidAmount","type":"error"},{"inputs":[],"name":"LZ_MessageLib_InvalidExecutor","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"LZ_MessageLib_InvalidMessageSize","type":"error"},{"inputs":[],"name":"LZ_MessageLib_NotTreasury","type":"error"},{"inputs":[],"name":"LZ_MessageLib_OnlyEndpoint","type":"error"},{"inputs":[],"name":"LZ_MessageLib_TransferFailed","type":"error"},{"inputs":[],"name":"LZ_MessageLib_ZeroMessageSize","type":"error"},{"inputs":[],"name":"LZ_ULN_AtLeastOneDVN","type":"error"},{"inputs":[{"internalType":"uint32","name":"configType","type":"uint32"}],"name":"LZ_ULN_InvalidConfigType","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidConfirmations","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType1Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidLegacyType2Option","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error"},{"inputs":[],"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error"},{"inputs":[{"internalType":"uint8","name":"workerId","type":"uint8"}],"name":"LZ_ULN_InvalidWorkerId","type":"error"},{"inputs":[{"internalType":"uint256","name":"cursor","type":"uint256"}],"name":"LZ_ULN_InvalidWorkerOptions","type":"error"},{"inputs":[],"name":"LZ_ULN_Unsorted","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"LZ_ULN_UnsupportedEid","type":"error"},{"inputs":[{"internalType":"uint16","name":"optionType","type":"uint16"}],"name":"LZ_ULN_UnsupportedOptionType","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer_NativeFailed","type":"error"},{"inputs":[],"name":"Transfer_ToAddressIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"optionalDVNs","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"fees","type":"uint256[]"}],"name":"DVNFeePaid","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultExecutorConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultExecutorConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"indexed":false,"internalType":"struct SetDefaultUlnConfigParam[]","name":"params","type":"tuple[]"}],"name":"DefaultUlnConfigsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"indexed":false,"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"name":"ExecutorConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ExecutorFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lzToken","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LzTokenFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"worker","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NativeFeeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTreasuryNativeFeeCap","type":"uint256"}],"name":"TreasuryNativeFeeCapSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"TreasurySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oapp","type":"address"},{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"indexed":false,"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"name":"UlnConfigSet","type":"event"},{"inputs":[{"internalType":"address","name":"oapp","type":"address"},{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"executorConfigs","outputs":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"worker","type":"address"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getAppUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_configType","type":"uint32"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getExecutorConfig","outputs":[{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"internalType":"uint32","name":"_remoteEid","type":"uint32"}],"name":"getUlnConfig","outputs":[{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"rtnConfig","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"isSupportedEid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageLibType","outputs":[{"internalType":"enum MessageLibType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quote","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct Packet","name":"_packet","type":"tuple"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"send","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oapp","type":"address"},{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint32","name":"configType","type":"uint32"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct SetConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint32","name":"maxMessageSize","type":"uint32"},{"internalType":"address","name":"executor","type":"address"}],"internalType":"struct ExecutorConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultExecutorConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultExecutorConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"components":[{"internalType":"uint64","name":"confirmations","type":"uint64"},{"internalType":"uint8","name":"requiredDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNCount","type":"uint8"},{"internalType":"uint8","name":"optionalDVNThreshold","type":"uint8"},{"internalType":"address[]","name":"requiredDVNs","type":"address[]"},{"internalType":"address[]","name":"optionalDVNs","type":"address[]"}],"internalType":"struct UlnConfig","name":"config","type":"tuple"}],"internalType":"struct SetDefaultUlnConfigParam[]","name":"_params","type":"tuple[]"}],"name":"setDefaultUlnConfigs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTreasuryNativeFeeCap","type":"uint256"}],"name":"setTreasuryNativeFeeCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint64","name":"major","type":"uint64"},{"internalType":"uint8","name":"minor","type":"uint8"},{"internalType":"uint8","name":"endpointVersion","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lzToken","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawLzTokenFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]} diff --git a/workers/src/chain/contracts.rs b/workers/src/chain/contracts.rs index 5614acdb..51d44c80 100644 --- a/workers/src/chain/contracts.rs +++ b/workers/src/chain/contracts.rs @@ -15,7 +15,7 @@ use tracing::{debug, error}; /// Create a contract instance from the ABI to interact with on-chain instance. pub fn create_contract_instance(addr: Address, http_provider: HttpProvider, abi: JsonAbi) -> Result { let contract: ContractInstance, _, Ethereum> = - ContractInstance::new(addr, http_provider.clone(), Interface::new(abi)); + ContractInstance::new(addr, http_provider, Interface::new(abi)); Ok(contract) } @@ -124,12 +124,7 @@ pub async fn query_already_verified( Ok(*packet_state) } -pub async fn verify( - contract: &ContractInst, - packet_header: &[u8], - payload: &[u8], - confirmations: U256, -) -> Result { +pub async fn verify(contract: &ContractInst, packet_header: &[u8], payload: &[u8], confirmations: U256) -> Result<()> { //// Create the hash of the payload let payload_hash = keccak256(payload); @@ -146,5 +141,5 @@ pub async fn verify( .call() .await?; - Ok(false) + Ok(()) } diff --git a/workers/src/data/bytes_utils.rs b/workers/src/data/bytes_utils.rs index 163c2d9b..ade89725 100644 --- a/workers/src/data/bytes_utils.rs +++ b/workers/src/data/bytes_utils.rs @@ -2,10 +2,8 @@ pub trait BytesUtils { fn to_u8(&self, start: usize) -> u8; - fn to_u16(&self, start: usize) -> u16; fn to_u32(&self, start: usize) -> u32; fn to_u64(&self, start: usize) -> u64; - fn to_u128(&self, start: usize) -> u128; fn to_bytes32(&self, start: usize) -> &[u8]; fn to_byte_array(&self, start: usize) -> [u8; N]; } @@ -15,12 +13,6 @@ impl BytesUtils for &[u8] { self[start] } - fn to_u16(&self, start: usize) -> u16 { - let mut bytes: [u8; 2] = [0; 2]; - bytes.copy_from_slice(&self[start..start + 2]); - u16::from_be_bytes(bytes) - } - fn to_u32(&self, start: usize) -> u32 { let mut bytes: [u8; 4] = [0; 4]; bytes.copy_from_slice(&self[start..start + 4]); @@ -33,12 +25,6 @@ impl BytesUtils for &[u8] { u64::from_be_bytes(bytes) } - fn to_u128(&self, start: usize) -> u128 { - let mut bytes: [u8; 16] = [0; 16]; - bytes.copy_from_slice(&self[start..start + 16]); - u128::from_be_bytes(bytes) - } - fn to_bytes32(&self, start: usize) -> &[u8] { &self[start..start + 32] } @@ -66,18 +52,6 @@ mod tests { assert_eq!(bytes.to_u8(1), 2); } - #[test] - fn test_to_u16() { - let bytes = &[1_u8, 1, 2][..]; - assert_eq!(bytes.to_u16(0), 2_u16.pow(8) + 1); - } - - #[test] - fn test_to_u16_start1() { - let bytes = &[1_u8, 1, 2][..]; - assert_eq!(bytes.to_u16(1), 2_u16.pow(8) + 2); - } - #[test] fn test_to_u32() { let bytes = &[1_u8, 1, 1, 1, 2][..]; @@ -122,54 +96,6 @@ mod tests { ); } - #[test] - fn test_to_u128() { - let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2][..]; - assert_eq!( - bytes.to_u128(0), - 2_u128.pow(120) - + 2_u128.pow(112) - + 2_u128.pow(104) - + 2_u128.pow(96) - + 2_u128.pow(88) - + 2_u128.pow(80) - + 2_u128.pow(72) - + 2_u128.pow(64) - + 2_u128.pow(56) - + 2_u128.pow(48) - + 2_u128.pow(40) - + 2_u128.pow(32) - + 2_u128.pow(24) - + 2_u128.pow(16) - + 2_u128.pow(8) - + 1 - ); - } - - #[test] - fn test_to_u128_start1() { - let bytes = &[1_u8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2][..]; - assert_eq!( - bytes.to_u128(1), - 2_u128.pow(120) - + 2_u128.pow(112) - + 2_u128.pow(104) - + 2_u128.pow(96) - + 2_u128.pow(88) - + 2_u128.pow(80) - + 2_u128.pow(72) - + 2_u128.pow(64) - + 2_u128.pow(56) - + 2_u128.pow(48) - + 2_u128.pow(40) - + 2_u128.pow(32) - + 2_u128.pow(24) - + 2_u128.pow(16) - + 2_u128.pow(8) - + 2 - ); - } - #[test] fn test_to_bytes32() { let bytes = &[ From 99ad04b1b2fe5c926c91114a919da43ddfbe04b9 Mon Sep 17 00:00:00 2001 From: Pablo Lozano Date: Wed, 23 Oct 2024 12:11:40 +0200 Subject: [PATCH 96/96] chore: solve conflicts --- Cargo.lock | 6143 ++++++++++++++++++++++++++------ Cargo.toml | 3 + indexer/FastIndexer.dockerfile | 2 +- 3 files changed, 5092 insertions(+), 1056 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 53379e11..bd16fd65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "actix" version = "0.13.5" @@ -24,7 +34,7 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", - "tokio-util", + "tokio-util 0.7.12", ] [[package]] @@ -40,7 +50,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -79,7 +89,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2", + "h2 0.3.26", "http 0.2.12", "httparse", "httpdate", @@ -89,13 +99,13 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "sha1", "smallvec", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", - "zstd", + "zstd 0.13.2", ] [[package]] @@ -105,7 +115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -179,7 +189,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-openssl", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -244,7 +254,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -255,7 +265,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -269,11 +279,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ - "gimli 0.31.1", + "gimli 0.31.0", ] [[package]] @@ -289,7 +299,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if 1.0.0", - "cipher", + "cipher 0.4.4", "cpufeatures", ] @@ -299,7 +309,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -311,7 +321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -353,70 +363,102 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "056f2c01b2aed86e15b43c47d109bfc8b82553dc34e66452875e51247ec31ab2" dependencies = [ - "alloy-consensus", - "alloy-contract", + "alloy-consensus 0.4.2", + "alloy-contract 0.4.2", "alloy-core", - "alloy-eips", + "alloy-eips 0.4.2", "alloy-genesis", - "alloy-json-rpc", - "alloy-network", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", "alloy-node-bindings", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-serde", - "alloy-signer", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-provider 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-signer-local 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.4.2", ] [[package]] name = "alloy-chains" -version = "0.1.38" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "156bfc5dcd52ef9a5f33381701fa03310317e14c65093a9430d3e3557b08dcd3" +checksum = "8158b4878c67837e5413721cc44298e6a2d88d39203175ea025e51892a16ba4c" dependencies = [ - "alloy-primitives", "num_enum", "strum 0.26.3", ] +[[package]] +name = "alloy-consensus" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da374e868f54c7f4ad2ad56829827badca388efd645f8cf5fccc61c2b5343504" +dependencies = [ + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "serde", +] + [[package]] name = "alloy-consensus" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "705687d5bfd019fee57cf9e206b27b30a9a9617535d5590a02b171e813208f8e" dependencies = [ - "alloy-eips", - "alloy-primitives", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.4.2", "auto_impl", "c-kzg", "derive_more 1.0.0", "serde", ] +[[package]] +name = "alloy-contract" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dc6957ff706f9e5f6fd42f52a93e4bce476b726c92d077b348de28c4a76730c" +dependencies = [ + "alloy-dyn-abi 0.7.7", + "alloy-json-abi 0.7.7", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-sol-types 0.7.7", + "alloy-transport 0.1.4", + "futures", + "futures-util", + "thiserror", +] + [[package]] name = "alloy-contract" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917f7d12cf3971dc8c11c9972f732b35ccb9aaaf5f28f2f87e9e6523bee3a8ad" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-network", + "alloy-dyn-abi 0.8.5", + "alloy-json-abi 0.8.5", + "alloy-network 0.4.2", "alloy-network-primitives", - "alloy-primitives", - "alloy-provider", - "alloy-pubsub", - "alloy-rpc-types-eth", - "alloy-sol-types", - "alloy-transport", + "alloy-primitives 0.8.5", + "alloy-provider 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-rpc-types-eth 0.4.2", + "alloy-sol-types 0.8.5", + "alloy-transport 0.4.2", "futures", "futures-util", "thiserror", @@ -424,27 +466,44 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.8" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54c7158ea4a394bef220d82d8fdd412fb9b1ca2d6024db539070b7bc01b6401" +checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", + "alloy-dyn-abi 0.8.5", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-sol-types", + "alloy-sol-types 0.8.5", +] + +[[package]] +name = "alloy-dyn-abi" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413902aa18a97569e60f679c23f46a18db1656d87ab4d4e49d0e1e52042f66df" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", + "alloy-sol-types 0.7.7", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.8" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6228abfc751a29cde117b0879b805a3e0b3b641358f063272c83ca459a56886" +checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", + "alloy-sol-type-parser 0.8.5", + "alloy-sol-types 0.8.5", "const-hex", "itoa", "serde", @@ -458,7 +517,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", "serde", ] @@ -469,12 +528,27 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", "k256", "serde", ] +[[package]] +name = "alloy-eips" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76ecab54890cdea1e4808fc0891c7e6cfcf71fe1a9fe26810c7280ef768f4ed" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "c-kzg", + "once_cell", + "serde", + "sha2", +] + [[package]] name = "alloy-eips" version = "0.4.2" @@ -483,9 +557,9 @@ checksum = "6ffb906284a1e1f63c4607da2068c8197458a352d0b3e9796e67353d72a9be85" dependencies = [ "alloy-eip2930", "alloy-eip7702", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", + "alloy-serde 0.4.2", "c-kzg", "derive_more 1.0.0", "once_cell", @@ -499,21 +573,46 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8429cf4554eed9b40feec7f4451113e76596086447550275e3def933faf47ce3" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc05b04ac331a9f07e3a4036ef7926e49a8bf84a99a1ccfc7e2ab55a5fcbb372" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-sol-type-parser 0.7.7", "serde", + "serde_json", ] [[package]] name = "alloy-json-abi" -version = "0.8.8" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a438d4486b5d525df3b3004188f9d5cd1d65cd30ecc41e5a3ccef6f6342e8af9" +dependencies = [ + "alloy-primitives 0.8.5", + "alloy-sol-type-parser 0.8.5", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d46eb5871592c216d39192499c95a99f7175cb94104f88c307e6dc960676d9f1" +checksum = "6d6f34930b7e3e2744bcc79056c217f00cb2abb33bc5d4ff88da7623c5bb078b" dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", + "alloy-primitives 0.7.7", "serde", "serde_json", + "thiserror", + "tracing", ] [[package]] @@ -522,29 +621,49 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fa8a1a3c4cbd221f2b8e3693aeb328fca79a757fe556ed08e47bbbc2a70db7" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.8.5", + "alloy-sol-types 0.8.5", "serde", "serde_json", "thiserror", "tracing", ] +[[package]] +name = "alloy-network" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f6895fc31b48fa12306ef9b4f78b7764f8bd6d7d91cdb0a40e233704a0f23f" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", + "alloy-signer 0.1.4", + "alloy-sol-types 0.7.7", + "async-trait", + "auto_impl", + "futures-utils-wasm", + "thiserror", +] + [[package]] name = "alloy-network" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85fa23a6a9d612b52e402c995f2d582c25165ec03ac6edf64c861a76bc5b87cd" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", + "alloy-signer 0.4.2", + "alloy-sol-types 0.8.5", "async-trait", "auto_impl", "futures-utils-wasm", @@ -557,10 +676,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "801492711d4392b2ccf5fc0bc69e299fa1aab15167d74dcaa9aab96a54f684bd" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-serde", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", "serde", ] @@ -571,9 +690,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f1334a738aa1710cb8227441b3fcc319202ce78e967ef37406940242df4a454" dependencies = [ "alloy-genesis", - "alloy-primitives", + "alloy-primitives 0.8.5", "k256", - "rand", + "rand 0.8.5", "serde_json", "tempfile", "thiserror", @@ -583,25 +702,46 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.8" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if 1.0.0", + "const-hex", + "derive_more 0.99.18", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-primitives" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f35429a652765189c1c5092870d8360ee7b7769b09b06d89ebaefd34676446" +checksum = "260d3ff3bff0bb84599f032a2f2c6828180b0ea0cd41fdaf44f39cef3ba41861" dependencies = [ "alloy-rlp", "bytes", "cfg-if 1.0.0", "const-hex", "derive_more 1.0.0", - "foldhash", - "hashbrown 0.15.0", + "hashbrown 0.14.5", "hex-literal", - "indexmap 2.6.0", + "indexmap 2.5.0", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand", + "rand 0.8.5", "ruint", "rustc-hash 2.0.0", "serde", @@ -609,6 +749,40 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-provider" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c538bfa893d07e27cb4f3c1ab5f451592b7c526d511d62b576a2ce59e146e4a" +dependencies = [ + "alloy-chains", + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-pubsub 0.1.4", + "alloy-rpc-client 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "async-stream", + "async-trait", + "auto_impl", + "dashmap 5.5.3", + "futures", + "futures-utils-wasm", + "lru 0.12.4", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "tokio", + "tracing", + "url", +] + [[package]] name = "alloy-provider" version = "0.4.2" @@ -616,30 +790,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcfaa4ffec0af04e3555686b8aacbcdf7d13638133a0672749209069750f78a6" dependencies = [ "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-json-rpc 0.4.2", + "alloy-network 0.4.2", "alloy-network-primitives", "alloy-node-bindings", - "alloy-primitives", - "alloy-pubsub", - "alloy-rpc-client", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.4.2", + "alloy-rpc-client 0.4.2", "alloy-rpc-types-anvil", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.4.2", "alloy-rpc-types-trace", - "alloy-signer-local", - "alloy-transport", - "alloy-transport-http", + "alloy-signer-local 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.4.2", "async-stream", "async-trait", "auto_impl", - "dashmap", + "dashmap 6.1.0", "futures", "futures-utils-wasm", - "lru 0.12.5", + "lru 0.12.4", "pin-project", "reqwest 0.12.8", "serde", @@ -650,15 +824,34 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-pubsub" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7341322d9bc0e49f6e9fd9f2eb8e30f73806f2dd12cbb3d6bab2694c921f87" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-transport 0.1.4", + "bimap", + "futures", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", +] + [[package]] name = "alloy-pubsub" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f32cef487122ae75c91eb50154c70801d71fabdb976fec6c49e0af5e6486ab15" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.5", + "alloy-transport 0.4.2", "bimap", "futures", "serde", @@ -688,7 +881,31 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "alloy-rpc-client" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba31bae67773fd5a60020bea900231f8396202b7feca4d0c70c6b59308ab4a8" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-pubsub 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "futures", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tracing", + "url", ] [[package]] @@ -697,13 +914,13 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "370143ed581aace6e663342d21d209c6b2e34ee6142f7d6675adb518deeaf0dc" dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-pubsub", - "alloy-transport", - "alloy-transport-http", + "alloy-json-rpc 0.4.2", + "alloy-primitives 0.8.5", + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", + "alloy-transport-http 0.4.2", "alloy-transport-ipc", - "alloy-transport-ws", + "alloy-transport-ws 0.4.2", "futures", "pin-project", "reqwest 0.12.8", @@ -716,17 +933,27 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-rpc-types" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "184a7a42c7ba9141cc9e76368356168c282c3bc3d9e5d78f3556bdfe39343447" +dependencies = [ + "alloy-rpc-types-eth 0.1.4", + "alloy-serde 0.1.4", +] + [[package]] name = "alloy-rpc-types" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ffc534b7919e18f35e3aa1f507b6f3d9d92ec298463a9f6beaac112809d8d06" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rpc-types-engine", - "alloy-rpc-types-eth", + "alloy-rpc-types-eth 0.4.2", "alloy-rpc-types-trace", - "alloy-serde", + "alloy-serde 0.4.2", "serde", ] @@ -736,8 +963,8 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d780adaa5d95b07ad92006b2feb68ecfa7e2015f7d5976ceaac4c906c73ebd07" dependencies = [ - "alloy-primitives", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-serde 0.4.2", "serde", ] @@ -747,27 +974,49 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0285c4c09f838ab830048b780d7f4a4f460f309aa1194bb049843309524c64c" dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", + "alloy-primitives 0.8.5", "alloy-rlp", + "alloy-serde 0.4.2", "derive_more 1.0.0", + "jsonwebtoken 9.3.0", + "rand 0.8.5", + "serde", "strum 0.26.3", ] +[[package]] +name = "alloy-rpc-types-eth" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab4123ee21f99ba4bd31bfa36ba89112a18a500f8b452f02b35708b1b951e2b9" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rlp", + "alloy-serde 0.1.4", + "alloy-sol-types 0.7.7", + "itertools 0.13.0", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "alloy-rpc-types-eth" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413f4aa3ccf2c3e4234a047c5fa4727916d7daf25a89f9b765df0ba09784fd87" dependencies = [ - "alloy-consensus", - "alloy-eips", + "alloy-consensus 0.4.2", + "alloy-eips 0.4.2", "alloy-network-primitives", - "alloy-primitives", + "alloy-primitives 0.8.5", "alloy-rlp", - "alloy-serde", - "alloy-sol-types", + "alloy-serde 0.4.2", + "alloy-sol-types 0.8.5", "derive_more 1.0.0", "itertools 0.13.0", "serde", @@ -780,32 +1029,57 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "017cad3e5793c5613588c1f9732bcbad77e820ba7d0feaba3527749f856fdbc5" dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", + "alloy-primitives 0.8.5", + "alloy-rpc-types-eth 0.4.2", + "alloy-serde 0.4.2", "serde", "serde_json", "thiserror", ] +[[package]] +name = "alloy-serde" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9416c52959e66ead795a11f4a86c248410e9e368a0765710e57055b8a1774dd6" +dependencies = [ + "alloy-primitives 0.7.7", + "serde", + "serde_json", +] + [[package]] name = "alloy-serde" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dff0ab1cdd43ca001e324dc27ee0e8606bd2161d6623c63e0e0b8c4dfc13600" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "serde", "serde_json", ] +[[package]] +name = "alloy-signer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b33753c09fa1ad85e5b092b8dc2372f1e337a42e84b9b4cff9fede75ba4adb32" +dependencies = [ + "alloy-primitives 0.7.7", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] + [[package]] name = "alloy-signer" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd4e0ad79c81a27ca659be5d176ca12399141659fef2bcbfdc848da478f4504" dependencies = [ - "alloy-primitives", + "alloy-primitives 0.8.5", "async-trait", "auto_impl", "elliptic-curve", @@ -813,102 +1087,228 @@ dependencies = [ "thiserror", ] +[[package]] +name = "alloy-signer-aws" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ce17bfd5aa38e14b9c83b553d93c76e1bd5641a2db45f381f81619fd3e54ca" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-signer 0.1.4", + "async-trait", + "aws-sdk-kms", + "k256", + "spki", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-signer-local" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dfc9c26fe6c6f1bad818c9a976de9044dd12e1f75f1f156a801ee3e8148c1b6" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-signer 0.1.4", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + [[package]] name = "alloy-signer-local" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494e0a256f3e99f2426f994bcd1be312c02cb8f88260088dacb33a8b8936475f" dependencies = [ - "alloy-consensus", - "alloy-network", - "alloy-primitives", - "alloy-signer", + "alloy-consensus 0.4.2", + "alloy-network 0.4.2", + "alloy-primitives 0.8.5", + "alloy-signer 0.4.2", "async-trait", "k256", - "rand", + "rand 0.8.5", "thiserror", ] [[package]] name = "alloy-sol-macro" -version = "0.8.8" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +dependencies = [ + "alloy-sol-macro-expander 0.7.7", + "alloy-sol-macro-input 0.7.7", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2395336745358cc47207442127c47c63801a7065ecc0aa928da844f8bb5576" +checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", + "alloy-sol-macro-expander 0.8.5", + "alloy-sol-macro-input 0.8.5", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-sol-macro-input 0.7.7", + "const-hex", + "heck 0.5.0", + "indexmap 2.5.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.77", + "syn-solidity 0.7.7", + "tiny-keccak", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.8" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed5047c9a241df94327879c2b0729155b58b941eae7805a7ada2e19436e6b39" +checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" dependencies = [ - "alloy-json-abi", - "alloy-sol-macro-input", + "alloy-json-abi 0.8.5", + "alloy-sol-macro-input 0.8.5", "const-hex", "heck 0.5.0", - "indexmap 2.6.0", + "indexmap 2.5.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.79", - "syn-solidity", + "syn 2.0.77", + "syn-solidity 0.8.5", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.8" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" +dependencies = [ + "alloy-json-abi 0.7.7", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", + "syn-solidity 0.7.7", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dee02a81f529c415082235129f0df8b8e60aa1601b9c9298ffe54d75f57210b" +checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" dependencies = [ - "alloy-json-abi", + "alloy-json-abi 0.8.5", "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", "serde_json", - "syn 2.0.79", - "syn-solidity", + "syn 2.0.77", + "syn-solidity 0.8.5", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.8" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f631f0bd9a9d79619b27c91b6b1ab2c4ef4e606a65192369a1ee05d40dcf81cc" +checksum = "cbcba3ca07cf7975f15d871b721fb18031eec8bce51103907f6dcce00b255d98" dependencies = [ "serde", "winnow", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +dependencies = [ + "alloy-json-abi 0.7.7", + "alloy-primitives 0.7.7", + "alloy-sol-macro 0.7.7", + "const-hex", + "serde", +] + [[package]] name = "alloy-sol-types" -version = "0.8.8" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2841af22d99e2c0f82a78fe107b6481be3dd20b89bfb067290092794734343a" +checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", + "alloy-json-abi 0.8.5", + "alloy-primitives 0.8.5", + "alloy-sol-macro 0.8.5", "const-hex", "serde", ] +[[package]] +name = "alloy-transport" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b51a291f949f755e6165c3ed562883175c97423703703355f4faa4b7d0a57c" +dependencies = [ + "alloy-json-rpc 0.1.4", + "base64 0.22.1", + "futures-util", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ac3e97dad3d31770db0fc89bd6a63b789fbae78963086733f960cf32c483904" dependencies = [ - "alloy-json-rpc", + "alloy-json-rpc 0.4.2", "base64 0.22.1", "futures-util", "futures-utils-wasm", @@ -921,14 +1321,29 @@ dependencies = [ "url", ] +[[package]] +name = "alloy-transport-http" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d65871f9f1cafe1ed25cde2f1303be83e6473e995a2d56c275ae4fcce6119c" +dependencies = [ + "alloy-json-rpc 0.1.4", + "alloy-transport 0.1.4", + "reqwest 0.12.8", + "serde_json", + "tower 0.4.13", + "tracing", + "url", +] + [[package]] name = "alloy-transport-http" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b367dcccada5b28987c2296717ee04b9a5637aacd78eacb1726ef211678b5212" dependencies = [ - "alloy-json-rpc", - "alloy-transport", + "alloy-json-rpc 0.4.2", + "alloy-transport 0.4.2", "reqwest 0.12.8", "serde_json", "tower 0.5.1", @@ -942,17 +1357,35 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b90cf9cde7f2fce617da52768ee28f522264b282d148384a4ca0ea85af04fa3a" dependencies = [ - "alloy-json-rpc", - "alloy-pubsub", - "alloy-transport", + "alloy-json-rpc 0.4.2", + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", "bytes", "futures", "interprocess", "pin-project", "serde_json", "tokio", - "tokio-util", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "alloy-transport-ws" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec83fd052684556c78c54df111433493267234d82321c2236560c752f595f20" +dependencies = [ + "alloy-pubsub 0.1.4", + "alloy-transport 0.1.4", + "futures", + "http 1.1.0", + "rustls 0.23.13", + "serde_json", + "tokio", + "tokio-tungstenite 0.23.1", "tracing", + "ws_stream_wasm", ] [[package]] @@ -961,23 +1394,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7153b88690de6a50bba81c11e1d706bc41dbb90126d607404d60b763f6a3947f" dependencies = [ - "alloy-pubsub", - "alloy-transport", + "alloy-pubsub 0.4.2", + "alloy-transport 0.4.2", "futures", "http 1.1.0", - "rustls", + "rustls 0.23.13", "serde_json", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "tracing", "ws_stream_wasm", ] [[package]] name = "amq-protocol" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a41c091e49edfcc098b4f90d4d7706a8cf9158034e84ebfee7ff346092f67c" +checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -989,9 +1422,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed7a4a662472f88823ed2fc81babb0b00562f2c54284e3e7bffc02b6df649bf" +checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -1000,9 +1433,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6484fdc918c1b6e2ae8eda2914d19a5873e1975f93ad8d33d6a24d1d98df05" +checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" dependencies = [ "cookie-factory", "nom", @@ -1012,9 +1445,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.2.2" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7f2da69e0e1182765bf33407cd8a843f20791b5af2b57a2645818c4776c56c" +checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -1106,6 +1539,34 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -1189,6 +1650,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", +] + [[package]] name = "ark-serialize" version = "0.3.0" @@ -1205,11 +1679,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ + "ark-serialize-derive", "ark-std 0.4.0", "digest 0.10.7", "num-bigint 0.4.6", ] +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-std" version = "0.3.0" @@ -1217,7 +1703,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -1227,7 +1713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -1248,6 +1734,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "asn1-rs" version = "0.6.2" @@ -1272,7 +1767,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "synstructure", ] @@ -1284,7 +1779,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1293,6 +1788,18 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-broadcast" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +dependencies = [ + "event-listener 5.3.1", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-channel" version = "2.3.1" @@ -1335,9 +1842,9 @@ dependencies = [ [[package]] name = "async-global-executor-trait" -version = "2.1.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f19936c1a84fb48ceb8899b642d2a72572587d1021cc561bfb24de9f33ee89" +checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75" dependencies = [ "async-global-executor", "async-trait", @@ -1417,9 +1924,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", @@ -1428,13 +1935,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1445,13 +1952,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -1495,14 +2002,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "awc" @@ -1523,7 +2030,7 @@ dependencies = [ "derive_more 0.99.18", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "itoa", "log", @@ -1531,13 +2038,25 @@ dependencies = [ "openssl", "percent-encoding", "pin-project-lite", - "rand", + "rand 0.8.5", "serde", "serde_json", "serde_urlencoded", "tokio", ] +[[package]] +name = "aws-credential-types" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + [[package]] name = "aws-creds" version = "0.30.0" @@ -1545,8 +2064,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aeeee1a5defa63cba39097a510dfe63ef53658fc8995202a610f6a8a4d03639" dependencies = [ "attohttpc", - "dirs", - "rust-ini 0.18.0", + "dirs 4.0.0", + "rust-ini", "serde", "serde-xml-rs", "thiserror", @@ -1554,6 +2073,33 @@ dependencies = [ "url", ] +[[package]] +name = "aws-lc-rs" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd82dba44d209fddb11c190e0a94b78651f95299598e472215667417a03ff1d" +dependencies = [ + "aws-lc-sys", + "mirai-annotations", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df7a4168111d7eb622a31b214057b8509c0a7e1794f44c546d742330dc793972" +dependencies = [ + "bindgen 0.69.4", + "cc", + "cmake", + "dunce", + "fs_extra", + "libc", + "paste", +] + [[package]] name = "aws-region" version = "0.25.5" @@ -1564,94 +2110,298 @@ dependencies = [ ] [[package]] -name = "axum" -version = "0.6.20" +name = "aws-runtime" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes", - "futures-util", + "fastrand 2.1.1", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", - "itoa", - "matchit", - "memchr", - "mime", + "once_cell", "percent-encoding", "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper 0.1.2", - "tower 0.4.13", - "tower-layer", - "tower-service", + "tracing", + "uuid 1.10.0", ] [[package]] -name = "axum-core" -version = "0.3.4" +name = "aws-sdk-kms" +version = "1.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "e33590e8d45206fdc4273ded8a1f292bcceaadd513037aa790fc67b237bc30ee" dependencies = [ - "async-trait", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes", - "futures-util", "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", + "once_cell", + "regex-lite", + "tracing", ] [[package]] -name = "backtrace" -version = "0.3.74" +name = "aws-sigv4" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "cc8db6904450bafe7473c6ca9123f88cc11089e41a025408f992db4e22d3be68" dependencies = [ - "addr2line 0.24.2", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object 0.36.5", - "rustc-demangle", - "windows-targets 0.52.6", + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.1.0", + "once_cell", + "percent-encoding", + "sha2", + "time", + "tracing", ] [[package]] -name = "base16ct" -version = "0.2.0" +name = "aws-smithy-async" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] [[package]] -name = "base64" -version = "0.12.3" +name = "aws-smithy-http" +version = "0.60.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http-body 0.4.6", + "once_cell", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] [[package]] -name = "base64" -version = "0.13.1" +name = "aws-smithy-json" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +dependencies = [ + "aws-smithy-types", +] [[package]] -name = "base64" -version = "0.21.7" +name = "aws-smithy-runtime" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "d1ce695746394772e7000b39fe073095db6d45a862d0767dd5ad0ac0d7f8eb87" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand 2.1.1", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "http-body 1.0.1", + "httparse", + "hyper 0.14.30", + "hyper-rustls 0.24.2", + "once_cell", + "pin-project-lite", + "pin-utils", + "rustls 0.21.12", + "tokio", + "tracing", +] [[package]] -name = "base64" -version = "0.22.1" +name = "aws-smithy-runtime-api" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "e086682a53d3aa241192aa110fa8dfce98f2f5ac2ead0de84d41582c7e8fdb96" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.1.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147100a7bea70fa20ef224a6bad700358305f5dc0f84649c53769761395b355b" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.1.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util 0.7.12", +] + +[[package]] +name = "aws-types" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version 0.4.1", + "tracing", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 0.1.2", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line 0.24.1", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object 0.36.4", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] [[package]] name = "base64ct" @@ -1659,6 +2409,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "bimap" version = "0.6.3" @@ -1692,7 +2448,30 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.6.0", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn 2.0.77", + "which", ] [[package]] @@ -1721,9 +2500,6 @@ name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -dependencies = [ - "serde", -] [[package]] name = "bitmaps" @@ -1746,6 +2522,17 @@ dependencies = [ "wyz", ] +[[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 = "blake2" version = "0.10.6" @@ -1816,67 +2603,72 @@ name = "bls-utils" version = "0.1.0" dependencies = [ "clap", - "rand", + "rand 0.8.5", "serde", "serde_json", "zeropool-bn", ] [[package]] -name = "blsful" -version = "2.5.7" +name = "blst" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a676ce0f93ae20ca6defc223b5ac459a6f071bd88c03100a14cb93604a5e994c" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ - "anyhow", - "arrayref", - "blstrs_plus", - "hex", - "hkdf", - "merlin", - "pairing", - "rand", - "rand_chacha", - "rand_core", - "serde", - "serde_bare", - "sha2", - "sha3", - "subtle", - "thiserror", - "uint-zigzag", - "vsss-rs", + "cc", + "glob", + "threadpool", "zeroize", ] [[package]] -name = "blst" -version = "0.3.12" +name = "bollard" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +checksum = "0aed08d3adb6ebe0eff737115056652670ae290f177759aac19c30456135f94c" dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", + "base64 0.22.1", + "bollard-stubs", + "bytes", + "futures-core", + "futures-util", + "hex", + "home", + "http 1.1.0", + "http-body-util", + "hyper 1.4.1", + "hyper-named-pipe", + "hyper-rustls 0.26.0", + "hyper-util", + "hyperlocal-next", + "log", + "pin-project-lite", + "rustls 0.22.4", + "rustls-native-certs 0.7.3", + "rustls-pemfile 2.1.3", + "rustls-pki-types", + "serde", + "serde_derive", + "serde_json", + "serde_repr", + "serde_urlencoded", + "thiserror", + "tokio", + "tokio-util 0.7.12", + "tower-service", + "url", + "winapi", ] [[package]] -name = "blstrs_plus" -version = "0.8.18" +name = "bollard-stubs" +version = "1.44.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a16dd4b0d6b4538e1fa0388843acb186363082713a8fc8416d802a04d013818" +checksum = "709d9aa1c37abb89d40f19f5d0ad6f0d88cb1581264e571c9350fc5bb89cf1c5" dependencies = [ - "arrayref", - "blst", - "elliptic-curve", - "ff", - "group", - "pairing", - "rand_core", "serde", - "subtle", - "zeroize", + "serde_repr", + "serde_with", ] [[package]] @@ -1922,7 +2714,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "syn_derive", ] @@ -1975,6 +2767,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -2017,13 +2819,23 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "bytesize" version = "1.3.0" @@ -2042,6 +2854,16 @@ dependencies = [ "bytes", ] +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" @@ -2069,28 +2891,89 @@ dependencies = [ ] [[package]] -name = "cbc" -version = "0.1.2" +name = "c2-chacha" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" dependencies = [ - "cipher", + "cipher 0.2.5", + "ppv-lite86", ] [[package]] -name = "cc" -version = "1.1.30" +name = "camino" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ - "jobserver", - "libc", - "shlex", + "serde", ] [[package]] -name = "cexpr" -version = "0.6.0" +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "cbindgen" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" +dependencies = [ + "clap", + "heck 0.4.1", + "indexmap 2.5.0", + "log", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.77", + "tempfile", + "toml 0.8.19", +] + +[[package]] +name = "cc" +version = "1.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ @@ -2130,6 +3013,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "cipher" version = "0.4.4" @@ -2153,9 +3045,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -2163,9 +3055,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -2182,7 +3074,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2204,7 +3096,7 @@ dependencies = [ "dotenv", "futures-util", "hex", - "jsonwebtoken", + "jsonwebtoken 7.2.0", "lazy_static", "openssl", "percent-encoding", @@ -2223,6 +3115,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "cmake" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +dependencies = [ + "cc", +] + [[package]] name = "cms" version = "0.2.3" @@ -2235,6 +3136,58 @@ dependencies = [ "x509-cert", ] +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58 0.5.1", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58 0.5.1", + "digest 0.10.7", + "generic-array 0.14.7", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + [[package]] name = "colorchoice" version = "1.0.2" @@ -2250,26 +3203,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "config" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" -dependencies = [ - "async-trait", - "convert_case 0.6.0", - "json5", - "lazy_static", - "nom", - "pathdiff", - "ron", - "rust-ini 0.19.0", - "serde", - "serde_json", - "toml 0.8.19", - "yaml-rust", -] - [[package]] name = "console" version = "0.15.8" @@ -2285,9 +3218,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.13.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -2302,26 +3235,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", -] - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -2334,15 +3247,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "cookie" version = "0.16.2" @@ -2377,12 +3281,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +name = "core-rs" +version = "0.1.0" dependencies = [ - "memchr", + "alloy", + "anyhow", + "async-trait", + "futures-util", + "log", + "mockall", + "serde", + "serde_json", + "sha2", + "thiserror", + "tokio", + "tokio-test", ] [[package]] @@ -2605,7 +3518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -2630,6 +3543,35 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctor" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" +dependencies = [ + "quote", + "syn 2.0.77", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "ctrlc" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" +dependencies = [ + "nix 0.29.0", + "windows-sys 0.59.0", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -2641,6 +3583,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", + "rand_core 0.6.4", "rustc_version 0.4.1", "subtle", "zeroize", @@ -2654,7 +3597,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2678,7 +3621,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2689,7 +3632,20 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown 0.14.5", + "lock_api 0.4.12", + "once_cell", + "parking_lot_core 0.9.10", ] [[package]] @@ -2750,7 +3706,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid", + "uuid 1.10.0", ] [[package]] @@ -2788,7 +3744,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2820,7 +3776,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2831,7 +3787,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2840,11 +3796,11 @@ version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "convert_case 0.4.0", + "convert_case", "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2864,7 +3820,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "unicode-xid", ] @@ -2874,7 +3830,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -2913,7 +3869,26 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] @@ -2927,6 +3902,29 @@ dependencies = [ "winapi", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -2935,7 +3933,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -2950,21 +3948,23 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" -[[package]] -name = "dlv-list" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -dependencies = [ - "const-random", -] - [[package]] name = "doc-comment" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "docker_credential" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31951f49556e34d90ed28342e1df7e1cb7a229c4cab0aecc627b5d91edd41d07" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + [[package]] name = "doctest-file" version = "1.0.0" @@ -2977,6 +3977,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "dunce" version = "1.0.5" @@ -3073,37 +4079,395 @@ checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core", + "rand_core 0.6.4", "sha2", "subtle", ] [[package]] -name = "either" -version = "1.13.0" +name = "eigen-chainio-txmanager" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "92a9242f761ef1403ada3fc268d5373b977c32cf755560019a211d881b343135" +dependencies = [ + "alloy-eips 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types-eth 0.1.4", + "alloy-signer-local 0.1.4", + "alloy-transport-http 0.1.4", + "eigen-logging", + "eigen-signer", + "k256", + "reqwest 0.12.8", + "thiserror", +] [[package]] -name = "elliptic-curve" -version = "0.13.8" +name = "eigen-client-avsregistry" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "26b545b7b3bb97aa6f769fa329c43e121d3d3ef2c700528c51493d14b7ca4c2b" dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array 0.14.7", - "group", - "hkdf", - "pkcs8", - "rand_core", + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "alloy-signer 0.1.4", + "alloy-signer-local 0.1.4", + "ark-ff 0.4.2", + "async-trait", + "eigen-client-elcontracts", + "eigen-crypto-bls", + "eigen-logging", + "eigen-types", + "eigen-utils", + "num-bigint 0.4.6", + "thiserror", + "tracing", +] + +[[package]] +name = "eigen-client-elcontracts" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46b72f6b15b8e641b4b43c1dced1df39cd1b4bcc6ce943ab1ce2280cba6e486f" +dependencies = [ + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "eigen-logging", + "eigen-types", + "eigen-utils", + "thiserror", + "tracing", +] + +[[package]] +name = "eigen-client-eth" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc00e0508a9137355212339d6bc0b83b3ceb7dc4f541ec920e66171295bd9c3" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-eips 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-pubsub 0.1.4", + "alloy-rlp", + "alloy-rpc-types-eth 0.1.4", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "alloy-transport-ws 0.1.4", + "async-trait", + "eigen-logging", + "eigen-metrics-collectors-rpc-calls", + "hex", + "thiserror", + "url", +] + +[[package]] +name = "eigen-client-fireblocks" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0327abf48cd09e672456be65e640ee609d23a1989ea1d310b0585e333829f124" +dependencies = [ + "alloy-contract 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "chrono", + "eigen-utils", + "hex", + "jsonwebtoken 7.2.0", + "mime", + "once_cell", + "reqwest 0.11.27", + "serde", + "serde_json", + "sha2", + "thiserror", + "uuid 1.10.0", +] + +[[package]] +name = "eigen-contract-bindings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a99d2a3c6b116d4013121fc20ff2a2f4e884475f6327c7d8300b175683fcb4" + +[[package]] +name = "eigen-crypto-bls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4016b25de0e41e5f4a8b8c495cef35cbdf5d1946021b472a0ce10b656956465f" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "eigen-crypto-bn254", + "eigen-utils", + "serde", + "thiserror", +] + +[[package]] +name = "eigen-crypto-bn254" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab240b582aa622c9a94e12bc7ac6fb65380b85053e1b0db08c8478c618a84a0" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "num-bigint 0.4.6", + "rust-bls-bn254", +] + +[[package]] +name = "eigen-logging" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "858b74ed2efc43af7de8db0f04e7c5d5b348aa8755c1a9000eb03d36f442c690" +dependencies = [ + "ctor", + "once_cell", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "eigen-metrics" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e0fbdbdb429d03ff6f0be07abe4d58a942d6069328f7827938ca57157766df" +dependencies = [ + "eigen-logging", + "metrics", + "metrics-exporter-prometheus", + "metrics-util", +] + +[[package]] +name = "eigen-metrics-collectors-rpc-calls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67563f8a7d1e242f8cab846729a4fec5d299c2e57abea66732400749c265ab92" +dependencies = [ + "eigen-logging", + "metrics", +] + +[[package]] +name = "eigen-nodeapi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d53c0275e3e0c8afc1358c0a3d1c781ac9815aadb0463a7d8e8cdc832569dca" +dependencies = [ + "ntex", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "eigen-services-avsregistry" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b8a3bf7010289fcac159db5a5d89fb3879236ac3c84e7c389366269d512c1da" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "async-trait", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-services-operatorsinfo", + "eigen-types", + "eigen-utils", +] + +[[package]] +name = "eigen-services-blsaggregation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ccce420984d12deb996b6d85580f0080e5b8f6dc10c8858622c24f23953453b" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-bn254", + "ark-ec", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-crypto-bn254", + "eigen-services-avsregistry", + "eigen-types", + "parking_lot 0.12.3", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "eigen-services-operatorsinfo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc37b203588165d466fbff505e474b7fdfd4bfdd9095171f171209aeaf57919d" +dependencies = [ + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-rpc-types 0.1.4", + "anyhow", + "async-trait", + "eigen-client-avsregistry", + "eigen-crypto-bls", + "eigen-logging", + "eigen-types", + "eigen-utils", + "futures-util", + "thiserror", + "tokio", + "tokio-util 0.7.12", +] + +[[package]] +name = "eigen-signer" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e981bde69979d705dbac089181df625f7e54ec01898983a8a1d8d1144b67b83b" +dependencies = [ + "alloy-consensus 0.1.4", + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-rpc-client 0.1.4", + "alloy-signer 0.1.4", + "alloy-signer-aws", + "alloy-signer-local 0.1.4", + "async-trait", + "aws-sdk-kms", + "eth-keystore", + "serde", + "thiserror", + "url", +] + +[[package]] +name = "eigen-testing-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b14a2ba9fbb5585ce0b3170243db2dfc551383ea7a46114a2c3f748da4515a" +dependencies = [ + "alloy-network 0.1.4", + "alloy-primitives 0.7.7", + "alloy-provider 0.1.4", + "alloy-transport-http 0.1.4", + "eigen-utils", + "once_cell", + "serde", + "serde_json", + "testcontainers", + "tokio", +] + +[[package]] +name = "eigen-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59467c722b271730a065a401002a6d3e7f6861233cf6241fda3a94bf863b4d74" +dependencies = [ + "alloy-primitives 0.7.7", + "ark-serialize 0.4.2", + "eigen-crypto-bls", + "ethers", + "num-bigint 0.4.6", + "thiserror", + "tokio", +] + +[[package]] +name = "eigen-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781a0d9bc2ab3d3709a1d6b23dfca5c2ef2da29b38f10a04bf7f1991bb53293e" +dependencies = [ + "alloy-contract 0.1.4", + "alloy-json-rpc 0.1.4", + "alloy-network 0.1.4", + "alloy-provider 0.1.4", + "alloy-pubsub 0.1.4", + "alloy-signer-local 0.1.4", + "alloy-sol-types 0.7.7", + "alloy-transport 0.1.4", + "alloy-transport-http 0.1.4", + "reqwest 0.12.8", +] + +[[package]] +name = "eigensdk" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8683d526d79c3d8deaed773e0dd9a18383e0f710fa2d182615142ce26b448338" +dependencies = [ + "eigen-chainio-txmanager", + "eigen-client-avsregistry", + "eigen-client-elcontracts", + "eigen-client-eth", + "eigen-client-fireblocks", + "eigen-contract-bindings", + "eigen-crypto-bls", + "eigen-crypto-bn254", + "eigen-logging", + "eigen-metrics", + "eigen-nodeapi", + "eigen-services-avsregistry", + "eigen-services-blsaggregation", + "eigen-services-operatorsinfo", + "eigen-signer", + "eigen-testing-utils", + "eigen-types", + "eigen-utils", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", ] +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -3119,6 +4483,42 @@ dependencies = [ "cfg-if 1.0.0", ] +[[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.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "enum-map" version = "2.7.3" @@ -3136,7 +4536,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -3157,7 +4557,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -3178,23 +4578,341 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.9" +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt 0.10.0", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid 0.8.2", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "syn 2.0.77", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.77", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec 0.7.6", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array 0.14.7", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.26.3", + "syn 2.0.77", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken 8.3.0", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite 0.20.1", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" dependencies = [ - "libc", - "windows-sys 0.52.0", + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2", + "thiserror", + "tracing", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "ethers-solc" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" dependencies = [ - "cc", - "libc", + "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", ] [[package]] @@ -3226,9 +4944,9 @@ dependencies = [ [[package]] name = "executor-trait" -version = "2.1.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c39dff9342e4e0e16ce96be751eb21a94e94a87bb2f6e63ad1961c2ce109bf" +checksum = "1a1052dd43212a7777ec6a69b117da52f5e52f07aec47d00c1a2b33b85d06b08" dependencies = [ "async-trait", ] @@ -3281,8 +4999,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -3324,11 +5041,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flagset" version = "0.4.6" @@ -3337,9 +5060,9 @@ checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -3362,12 +5085,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - [[package]] name = "foreign-types" version = "0.3.2" @@ -3392,6 +5109,28 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -3400,9 +5139,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -3415,9 +5154,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -3425,15 +5164,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -3442,9 +5181,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -3474,34 +5213,54 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-timer" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -3564,12 +5323,14 @@ dependencies = [ ] [[package]] -name = "generic-array" -version = "1.1.0" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "typenum", + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -3579,8 +5340,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -3590,15 +5353,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 2.6.0", + "indexmap 2.5.0", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.31.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -3606,6 +5369,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[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 = "group" version = "0.13.0" @@ -3613,9 +5388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand", - "rand_core", - "rand_xorshift", + "rand_core 0.6.4", "subtle", ] @@ -3631,10 +5404,29 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.6.0", + "indexmap 2.5.0", + "slab", + "tokio", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.5.0", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -3672,18 +5464,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", + "allocator-api2", + "serde", ] [[package]] -name = "hashbrown" -version = "0.15.0" +name = "hashers" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", - "serde", + "fxhash", +] + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 0.2.12", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.12", +] + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", ] [[package]] @@ -3725,6 +5549,51 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "hickory-proto" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +dependencies = [ + "async-trait", + "cfg-if 1.0.0", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28757f23aa75c98f254cf0405e6d8c25b831b32921b050a66692427679b1f243" +dependencies = [ + "cfg-if 1.0.0", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.3", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -3752,6 +5621,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[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.12" @@ -3810,9 +5690,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3830,7 +5710,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -3840,27 +5720,99 @@ dependencies = [ "socket2 0.5.7", "tokio", "tower-service", - "tracing", - "want", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-named-pipe" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278" +dependencies = [ + "hex", + "hyper 1.4.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", + "winapi", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.30", + "log", + "rustls 0.21.12", + "rustls-native-certs 0.6.3", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "log", + "rustls 0.22.4", + "rustls-native-certs 0.7.3", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", ] [[package]] -name = "hyper" -version = "1.4.1" +name = "hyper-rustls" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ - "bytes", - "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.1", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", + "hyper 1.4.1", + "hyper-util", + "log", + "rustls 0.23.13", + "rustls-native-certs 0.8.0", + "rustls-pki-types", "tokio", - "want", + "tokio-rustls 0.26.0", + "tower-service", + "webpki-roots 0.26.6", ] [[package]] @@ -3923,6 +5875,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "hyperlocal-next" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acf569d43fa9848e510358c07b80f4adf34084ddc28c6a4a651ee8474c070dcc" +dependencies = [ + "hex", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "iana-time-zone" version = "0.1.61" @@ -3952,6 +5919,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -3969,7 +5946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core", + "rand_core 0.6.4", "rand_xoshiro", "sized-chunks", "typenum", @@ -3991,6 +5968,24 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -4023,11 +6018,12 @@ dependencies = [ "lapin", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-indexer", - "near-o11y", + "near-o11y 2.2.1-rc.1", "openssl-probe", "prometheus", + "reqwest 0.12.8", "serde", "serde_json", "serde_yaml", @@ -4051,12 +6047,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.14.5", "serde", ] @@ -4118,11 +6114,23 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2 0.5.7", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + [[package]] name = "ipnet" -version = "2.10.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -4139,6 +6147,15 @@ 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 = "itertools" version = "0.12.1" @@ -4174,24 +6191,13 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json5" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" -dependencies = [ - "pest", - "pest_derive", - "serde", -] - [[package]] name = "json_comments" version = "0.2.2" @@ -4205,24 +6211,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afabcc15e437a6484fc4f12d0fd63068fe457bf93f1c148d3d9649c60b103f32" dependencies = [ "base64 0.12.3", - "pem", + "pem 0.8.3", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1 0.4.1", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", - "simple_asn1", + "simple_asn1 0.6.2", +] + +[[package]] +name = "jsonwebtoken" +version = "9.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +dependencies = [ + "base64 0.21.7", + "js-sys", + "pem 3.0.4", + "ring 0.17.8", + "serde", + "serde_json", + "simple_asn1 0.6.2", ] [[package]] name = "k256" -version = "0.13.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if 1.0.0", "ecdsa", "elliptic-curve", "once_cell", "sha2", + "signature", ] [[package]] @@ -4244,6 +6280,36 @@ dependencies = [ "sha3-asm", ] +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.8.4", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata 0.4.7", +] + [[package]] name = "language-tags" version = "0.3.2" @@ -4295,9 +6361,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -4331,7 +6397,7 @@ version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ - "bindgen", + "bindgen 0.65.1", "bzip2-sys", "cc", "glob", @@ -4413,6 +6479,26 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "loupe" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6a72dfa44fe15b5e76b94307eeb2ff995a8c5b283b55008940c02e0c5b634d" +dependencies = [ + "loupe-derive", + "rustversion", +] + +[[package]] +name = "loupe-derive" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fbfc88337168279f2e9ae06e157cfed4efd3316e14dc96ed074d4f2e6c5952" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "lru" version = "0.7.8" @@ -4424,18 +6510,27 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.5" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" dependencies = [ - "hashbrown 0.15.0", + "linked-hash-map", ] [[package]] name = "lz4-sys" -version = "1.11.1+lz4-1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +checksum = "fcb44a01837a858d47e5a630d2ccf304c8efcc4b83b8f9f75b7a9ee4fcc6e57d" dependencies = [ "cc", "libc", @@ -4470,6 +6565,12 @@ 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" @@ -4493,7 +6594,7 @@ checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -4574,15 +6675,53 @@ dependencies = [ ] [[package]] -name = "merlin" -version = "3.0.0" +name = "metrics" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" dependencies = [ - "byteorder", - "keccak", - "rand_core", - "zeroize", + "ahash 0.8.11", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" +dependencies = [ + "base64 0.22.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls 0.27.3", + "hyper-util", + "indexmap 2.5.0", + "ipnet", + "metrics", + "metrics-util", + "quanta", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "metrics-util" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828" +dependencies = [ + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.14.5", + "indexmap 2.5.0", + "metrics", + "num_cpus", + "ordered-float", + "quanta", + "radix_trie", + "sketches-ddsketch", ] [[package]] @@ -4634,16 +6773,78 @@ dependencies = [ "hermit-abi 0.3.9", "libc", "log", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] +[[package]] +name = "mirai-annotations" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" + +[[package]] +name = "mockall" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "more-asserts" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +[[package]] +name = "multer" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 0.2.12", + "httparse", + "log", + "memchr", + "mime", + "spin 0.9.8", + "version_check", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" + [[package]] name = "native-tls" version = "0.2.12" @@ -4680,7 +6881,7 @@ dependencies = [ "derive_more 0.99.18", "futures", "near-async-derive", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-time", "once_cell", @@ -4698,7 +6899,16 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "near-cache" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b222afeb8daa3849626f0ce713806ce8be2b33e4aac54913dc7ef1db1fa83d7" +dependencies = [ + "lru 0.7.8", ] [[package]] @@ -4706,7 +6916,7 @@ name = "near-cache" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "lru 0.12.5", + "lru 0.12.4", ] [[package]] @@ -4724,36 +6934,59 @@ dependencies = [ "enum-map", "itertools 0.10.5", "itoa", - "lru 0.12.5", + "lru 0.12.4", "near-async", - "near-cache", - "near-chain-configs", + "near-cache 2.2.1-rc.1", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-mainnet-res", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "node-runtime", "num-rational", "once_cell", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rayon", "strum 0.24.1", "tempfile", "thiserror", "time", "tracing", - "yansi", + "yansi", +] + +[[package]] +name = "near-chain-configs" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac5ca8d44a732193603e117f57d490b8c29b1e8e756abb3f12d4eb19443cd1d" +dependencies = [ + "anyhow", + "bytesize", + "chrono", + "derive_more 0.99.18", + "near-config-utils 0.21.2", + "near-crypto 0.21.2", + "near-parameters 0.21.2", + "near-primitives 0.21.2", + "num-rational", + "once_cell", + "serde", + "serde_json", + "sha2", + "smart-default", + "tracing", ] [[package]] @@ -4765,11 +6998,11 @@ dependencies = [ "bytesize", "chrono", "derive_more 0.99.18", - "near-config-utils", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives", + "near-config-utils 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "num-rational", "once_cell", @@ -4786,8 +7019,8 @@ name = "near-chain-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "thiserror", "time", @@ -4805,23 +7038,23 @@ dependencies = [ "derive_more 0.99.18", "futures", "itertools 0.10.5", - "lru 0.12.5", + "lru 0.12.4", "near-async", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chunks-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-epoch-manager", "near-network", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", - "rand", - "reed-solomon-erasure", + "rand 0.8.5", + "reed-solomon-erasure 6.0.0", "strum 0.24.1", "time", "tracing", @@ -4833,7 +7066,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-chain-primitives", - "near-primitives", + "near-primitives 2.2.1-rc.1", ] [[package]] @@ -4852,33 +7085,33 @@ dependencies = [ "derive_more 0.99.18", "futures", "itertools 0.10.5", - "lru 0.12.5", + "lru 0.12.4", "near-async", - "near-cache", + "near-cache 2.2.1-rc.1", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-chunks", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "near-telemetry", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "num-rational", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "regex", "reqwest 0.11.27", "rust-s3", @@ -4901,11 +7134,11 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "actix", "chrono", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", "near-chunks-primitives", - "near-crypto", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "serde", "serde_json", @@ -4916,6 +7149,18 @@ dependencies = [ "yansi", ] +[[package]] +name = "near-config-utils" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1c9ff519efa8c778d341fa34971dee93e8adf4e8ae51feaefaa63bdf7e496a" +dependencies = [ + "anyhow", + "json_comments", + "thiserror", + "tracing", +] + [[package]] name = "near-config-utils" version = "2.2.1-rc.1" @@ -4927,24 +7172,51 @@ dependencies = [ "tracing", ] +[[package]] +name = "near-crypto" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d927e95742aea981b9fd60996fbeba3b61e90acafd54c2c3c2a4ed40065ff03" +dependencies = [ + "blake2 0.9.2", + "borsh 1.5.1", + "bs58 0.4.0", + "c2-chacha", + "curve25519-dalek", + "derive_more 0.99.18", + "ed25519-dalek", + "hex", + "near-account-id", + "near-config-utils 0.21.2", + "near-stdx 0.21.2", + "once_cell", + "primitive-types 0.10.1", + "rand 0.7.3", + "secp256k1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + [[package]] name = "near-crypto" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "blake2", + "blake2 0.10.6", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "curve25519-dalek", "derive_more 0.99.18", "ed25519-dalek", "hex", "near-account-id", - "near-config-utils", - "near-stdx", + "near-config-utils 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "once_cell", "primitive-types 0.10.1", - "rand", + "rand 0.8.5", "secp256k1", "serde", "serde_json", @@ -4952,16 +7224,50 @@ dependencies = [ "thiserror", ] +[[package]] +name = "near-da-primitives" +version = "0.4.0" +source = "git+https://github.com/Nuffle-Labs/data-availability?branch=main#e182622aa50d4b1bee09f4cda85a2cc2b585f066" +dependencies = [ + "borsh 1.5.1", + "serde", + "serde_with", +] + +[[package]] +name = "near-da-rpc" +version = "0.4.0" +source = "git+https://github.com/Nuffle-Labs/data-availability?branch=main#e182622aa50d4b1bee09f4cda85a2cc2b585f066" +dependencies = [ + "async-trait", + "borsh 1.5.1", + "cbindgen", + "eyre", + "futures", + "near-crypto 0.21.2", + "near-da-primitives", + "near-jsonrpc-client 0.9.0", + "near-jsonrpc-primitives 0.21.2", + "near-primitives 0.21.2", + "serde", + "serde_json", + "serde_with", + "tokio", + "tracing", + "url", + "which", +] + [[package]] name = "near-dyn-configs" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-chain-configs", - "near-crypto", - "near-o11y", - "near-primitives", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-time", "once_cell", "prometheus", @@ -4979,29 +7285,38 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "borsh 1.5.1", "itertools 0.10.5", - "near-cache", - "near-chain-configs", + "near-cache 2.2.1-rc.1", + "near-chain-configs 2.2.1-rc.1", "near-chain-primitives", - "near-crypto", - "near-o11y", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-store", "num-rational", "once_cell", "primitive-types 0.10.1", - "rand", - "rand_hc", + "rand 0.8.5", + "rand_hc 0.3.2", "serde_json", "smart-default", "tracing", ] +[[package]] +name = "near-fmt" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a9aa862014eeedb79df494b1b8080c5b51cd014f978183e08a7918a50350558" +dependencies = [ + "near-primitives-core 0.21.2", +] + [[package]] name = "near-fmt" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", ] [[package]] @@ -5013,14 +7328,14 @@ dependencies = [ "anyhow", "futures", "lazy_static", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-indexer-primitives", - "near-o11y", - "near-parameters", - "near-primitives", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "near-store", "nearcore", "node-runtime", @@ -5037,7 +7352,7 @@ name = "near-indexer-primitives" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-primitives", + "near-primitives 2.2.1-rc.1", "serde", "serde_json", ] @@ -5050,21 +7365,21 @@ dependencies = [ "actix", "actix-cors", "actix-web", - "bs58", + "bs58 0.4.0", "derive_more 0.99.18", "easy-ext", "futures", "hex", "near-async", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", "near-client-primitives", - "near-jsonrpc-client", - "near-jsonrpc-primitives", + "near-jsonrpc-client 2.2.1-rc.1", + "near-jsonrpc-primitives 2.2.1-rc.1", "near-network", - "near-o11y", - "near-primitives", - "near-rpc-error-macro", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "once_cell", "serde", "serde_json", @@ -5074,6 +7389,25 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "near-jsonrpc-client" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5225c0f97a61fd4534dee3169959dd91bb812be7d0573c1130a3cf86fd16b3e" +dependencies = [ + "borsh 1.5.1", + "lazy_static", + "log", + "near-chain-configs 0.21.2", + "near-crypto 0.21.2", + "near-jsonrpc-primitives 0.21.2", + "near-primitives 0.21.2", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "near-jsonrpc-client" version = "2.2.1-rc.1" @@ -5082,10 +7416,26 @@ dependencies = [ "actix-http", "awc", "futures", - "near-jsonrpc-primitives", - "near-primitives", + "near-jsonrpc-primitives 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "serde", + "serde_json", +] + +[[package]] +name = "near-jsonrpc-primitives" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63ba17af2bc4208fdc4f6a8088842ad1f0165ac46d8259db6a2719f15d039e06" +dependencies = [ + "arbitrary", + "near-chain-configs 0.21.2", + "near-crypto 0.21.2", + "near-primitives 0.21.2", + "near-rpc-error-macro 0.21.2", "serde", "serde_json", + "thiserror", ] [[package]] @@ -5094,11 +7444,11 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "arbitrary", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client-primitives", - "near-crypto", - "near-primitives", - "near-rpc-error-macro", + "near-crypto 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", "serde", "serde_json", "thiserror", @@ -5111,8 +7461,8 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "near-account-id", - "near-chain-configs", - "near-primitives", + "near-chain-configs 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "serde_json", ] @@ -5136,25 +7486,25 @@ dependencies = [ "futures-util", "im", "itertools 0.10.5", - "lru 0.12.5", + "lru 0.12.4", "near-async", - "near-chain-configs", - "near-crypto", - "near-fmt", - "near-o11y", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-store", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "parking_lot 0.12.3", "pin-project", - "protobuf 3.6.0", + "protobuf 3.5.1", "protobuf-codegen", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "serde", "sha2", "smart-default", @@ -5164,8 +7514,36 @@ dependencies = [ "time", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "near-o11y" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b64d008979998e436ac5ad2e60326d1a7f2d30dcb5a22c1a4657159f7f284342" +dependencies = [ + "actix", + "base64 0.21.7", + "clap", + "near-crypto 0.21.2", + "near-fmt 0.21.2", + "near-primitives-core 0.21.2", + "once_cell", + "opentelemetry 0.17.0", + "opentelemetry-otlp 0.10.0", + "opentelemetry-semantic-conventions 0.9.0", + "prometheus", + "serde", + "serde_json", + "strum 0.24.1", + "thiserror", + "tokio", "tracing", + "tracing-appender", + "tracing-opentelemetry 0.17.4", + "tracing-subscriber", ] [[package]] @@ -5176,12 +7554,12 @@ dependencies = [ "actix", "base64 0.21.7", "clap", - "near-crypto", - "near-primitives-core", + "near-crypto 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "once_cell", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", + "opentelemetry 0.22.0", + "opentelemetry-otlp 0.15.0", + "opentelemetry-semantic-conventions 0.14.0", "opentelemetry_sdk", "prometheus", "serde", @@ -5190,10 +7568,29 @@ dependencies = [ "tokio", "tracing", "tracing-appender", - "tracing-opentelemetry", + "tracing-opentelemetry 0.23.0", "tracing-subscriber", ] +[[package]] +name = "near-parameters" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996c8654020f7eb3c11039cb39123fd4cd78654fde4c9e7c3fd6d092c84f342" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "enum-map", + "near-account-id", + "near-primitives-core 0.21.2", + "num-rational", + "serde", + "serde_repr", + "serde_yaml", + "strum 0.24.1", + "thiserror", +] + [[package]] name = "near-parameters" version = "2.2.1-rc.1" @@ -5202,7 +7599,7 @@ dependencies = [ "borsh 1.5.1", "enum-map", "near-account-id", - "near-primitives-core", + "near-primitives-core 2.2.1-rc.1", "num-rational", "serde", "serde_repr", @@ -5223,7 +7620,7 @@ dependencies = [ "libc", "once_cell", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tracing", ] @@ -5233,7 +7630,7 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5242,11 +7639,53 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", - "near-o11y", - "near-primitives", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "once_cell", + "rand 0.8.5", +] + +[[package]] +name = "near-primitives" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c880397c022d3b8f592cef18f85fd6e79181a2a04c31154afb1730f9fa21098" +dependencies = [ + "arbitrary", + "base64 0.21.7", + "borsh 1.5.1", + "bytesize", + "cfg-if 1.0.0", + "chrono", + "derive_more 0.99.18", + "easy-ext", + "enum-map", + "hex", + "near-crypto 0.21.2", + "near-fmt 0.21.2", + "near-o11y 0.21.2", + "near-parameters 0.21.2", + "near-primitives-core 0.21.2", + "near-rpc-error-macro 0.21.2", + "near-stdx 0.21.2", + "near-vm-runner 0.21.2", + "num-rational", "once_cell", - "rand", + "primitive-types 0.10.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reed-solomon-erasure 4.0.2", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "sha3", + "smart-default", + "strum 0.24.1", + "thiserror", + "time", + "tracing", ] [[package]] @@ -5266,21 +7705,21 @@ dependencies = [ "enum-map", "hex", "itertools 0.10.5", - "near-crypto", - "near-fmt", - "near-parameters", - "near-primitives-core", - "near-rpc-error-macro", - "near-stdx", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", + "near-rpc-error-macro 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "near-structs-checker-lib", "near-time", "num-rational", "once_cell", "ordered-float", "primitive-types 0.10.1", - "rand", - "rand_chacha", - "reed-solomon-erasure", + "rand 0.8.5", + "rand_chacha 0.3.1", + "reed-solomon-erasure 6.0.0", "serde", "serde_json", "serde_with", @@ -5289,7 +7728,29 @@ dependencies = [ "strum 0.24.1", "thiserror", "tracing", - "zstd", + "zstd 0.13.2", +] + +[[package]] +name = "near-primitives-core" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "082b1d3f6c7e273ec5cd9588e00bdbfc51be6cc9a3a7ec31fc899b4b7d2d3f9d" +dependencies = [ + "arbitrary", + "base64 0.21.7", + "borsh 1.5.1", + "bs58 0.4.0", + "derive_more 0.99.18", + "enum-map", + "near-account-id", + "num-rational", + "serde", + "serde_repr", + "serde_with", + "sha2", + "strum 0.24.1", + "thiserror", ] [[package]] @@ -5300,7 +7761,7 @@ dependencies = [ "arbitrary", "base64 0.21.7", "borsh 1.5.1", - "bs58", + "bs58 0.4.0", "derive_more 0.99.18", "enum-map", "near-account-id", @@ -5326,14 +7787,14 @@ dependencies = [ "futures", "hex", "near-account-id", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-client", "near-client-primitives", - "near-crypto", + "near-crypto 2.2.1-rc.1", "near-network", - "near-o11y", - "near-parameters", - "near-primitives", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", "node-runtime", "paperclip", "serde", @@ -5343,6 +7804,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "near-rpc-error-core" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3610517a56329b7cce0c8c4cf2686fc4bbe0b155181b118acf20d2a301bf29b6" +dependencies = [ + "quote", + "serde", + "syn 2.0.77", +] + [[package]] name = "near-rpc-error-core" version = "2.2.1-rc.1" @@ -5350,7 +7822,19 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "quote", "serde", - "syn 2.0.79", + "syn 2.0.77", +] + +[[package]] +name = "near-rpc-error-macro" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8db2fd2a6dbab8c56908e983f41570341e391daddb0d4c430746c6971107e3" +dependencies = [ + "fs2", + "near-rpc-error-core 0.21.2", + "serde", + "syn 2.0.77", ] [[package]] @@ -5358,11 +7842,17 @@ name = "near-rpc-error-macro" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ - "near-rpc-error-core", + "near-rpc-error-core 2.2.1-rc.1", "serde", - "syn 2.0.79", + "syn 2.0.77", ] +[[package]] +name = "near-stdx" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a697f311c110d0fabae6c8c49ab0a8eff0ec37df82cc860deba92156e77c43" + [[package]] name = "near-stdx" version = "2.2.1-rc.1" @@ -5385,21 +7875,21 @@ dependencies = [ "hex", "itertools 0.10.5", "itoa", - "lru 0.12.5", - "near-chain-configs", - "near-crypto", - "near-fmt", - "near-o11y", - "near-parameters", - "near-primitives", - "near-stdx", + "lru 0.12.4", + "near-chain-configs 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", + "near-fmt 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", "near-time", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "num_cpus", "once_cell", - "rand", + "rand 0.8.5", "rayon", - "reed-solomon-erasure", + "reed-solomon-erasure 6.0.0", "rlimit", "rocksdb", "serde", @@ -5440,7 +7930,7 @@ dependencies = [ "awc", "futures", "near-async", - "near-o11y", + "near-o11y 2.2.1-rc.1", "near-performance-metrics", "near-performance-metrics-macros", "near-time", @@ -5462,6 +7952,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "near-vm-compiler" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d6c12977e11cbc33921c367a8ae949317d099025c96531702d3afed6e5f44ce" +dependencies = [ + "enumset", + "finite-wasm", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "rkyv", + "smallvec", + "target-lexicon 0.12.16", + "thiserror", + "tracing", + "wasmparser 0.99.0", +] + [[package]] name = "near-vm-compiler" version = "2.2.1-rc.1" @@ -5469,8 +7977,8 @@ source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c dependencies = [ "enumset", "finite-wasm", - "near-vm-types", - "near-vm-vm", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "rkyv", "target-lexicon 0.12.16", "thiserror", @@ -5478,6 +7986,28 @@ dependencies = [ "wasmparser 0.99.0", ] +[[package]] +name = "near-vm-compiler-singlepass" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f883363f5d05502035f0f6c0416078fdf535557dbffc1b4177aaab87bd448528" +dependencies = [ + "dynasm 2.0.0", + "dynasmrt 2.0.0", + "enumset", + "finite-wasm", + "lazy_static", + "memoffset 0.8.0", + "more-asserts", + "near-vm-compiler 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "rayon", + "smallvec", + "strum 0.24.1", + "tracing", +] + [[package]] name = "near-vm-compiler-singlepass" version = "2.2.1-rc.1" @@ -5490,15 +8020,39 @@ dependencies = [ "lazy_static", "memoffset 0.8.0", "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "rayon", "smallvec", "strum 0.24.1", "tracing", ] +[[package]] +name = "near-vm-engine" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c758c7ad8d551eafefd783aa286c2fa95f4ad6e89efedf1bd5f8629efd529ac" +dependencies = [ + "backtrace", + "cfg-if 1.0.0", + "enumset", + "finite-wasm", + "lazy_static", + "memmap2", + "more-asserts", + "near-vm-compiler 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "region", + "rkyv", + "rustc-demangle", + "target-lexicon 0.12.16", + "thiserror", + "tracing", +] + [[package]] name = "near-vm-engine" version = "2.2.1-rc.1" @@ -5508,18 +8062,71 @@ dependencies = [ "cfg-if 1.0.0", "enumset", "finite-wasm", - "lazy_static", - "more-asserts", - "near-vm-compiler", - "near-vm-types", - "near-vm-vm", - "region", - "rkyv", - "rustc-demangle", - "rustix 0.38.37", - "target-lexicon 0.12.16", + "lazy_static", + "more-asserts", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", + "region", + "rkyv", + "rustc-demangle", + "rustix 0.38.37", + "target-lexicon 0.12.16", + "thiserror", + "tracing", +] + +[[package]] +name = "near-vm-runner" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20569500ca56e161c6ed81da9a24c7bf7b974c4238b2f08b2582113b66fa0060" +dependencies = [ + "anyhow", + "base64 0.21.7", + "borsh 1.5.1", + "ed25519-dalek", + "enum-map", + "finite-wasm", + "loupe", + "memoffset 0.8.0", + "near-cache 0.21.2", + "near-crypto 0.21.2", + "near-parameters 0.21.2", + "near-primitives-core 0.21.2", + "near-stdx 0.21.2", + "near-vm-compiler 0.21.2", + "near-vm-compiler-singlepass 0.21.2", + "near-vm-engine 0.21.2", + "near-vm-types 0.21.2", + "near-vm-vm 0.21.2", + "num-rational", + "once_cell", + "parity-wasm 0.41.0", + "parity-wasm 0.42.2", + "prefix-sum-vec", + "pwasm-utils", + "ripemd", + "serde", + "serde_repr", + "serde_with", + "sha2", + "sha3", + "strum 0.24.1", "thiserror", "tracing", + "wasm-encoder 0.27.0", + "wasmer-compiler-near", + "wasmer-compiler-singlepass-near", + "wasmer-engine-near", + "wasmer-engine-universal-near", + "wasmer-runtime-core-near", + "wasmer-runtime-near", + "wasmer-types-near", + "wasmer-vm-near", + "wasmparser 0.78.2", + "wasmtime", + "zeropool-bn", ] [[package]] @@ -5534,18 +8141,18 @@ dependencies = [ "ed25519-dalek", "enum-map", "finite-wasm", - "lru 0.12.5", + "lru 0.12.4", "memoffset 0.8.0", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives-core", - "near-stdx", - "near-vm-compiler", - "near-vm-compiler-singlepass", - "near-vm-engine", - "near-vm-types", - "near-vm-vm", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", + "near-stdx 2.2.1-rc.1", + "near-vm-compiler 2.2.1-rc.1", + "near-vm-compiler-singlepass 2.2.1-rc.1", + "near-vm-engine 2.2.1-rc.1", + "near-vm-types 2.2.1-rc.1", + "near-vm-vm 2.2.1-rc.1", "num-rational", "once_cell", "parity-wasm 0.41.0", @@ -5577,6 +8184,18 @@ dependencies = [ "zeropool-bn", ] +[[package]] +name = "near-vm-types" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e894a085d2a9ed4e8f10ae8766c95fa77b5aa47d3c0e85b89af22d5b253491" +dependencies = [ + "indexmap 1.9.3", + "num-traits", + "rkyv", + "thiserror", +] + [[package]] name = "near-vm-types" version = "2.2.1-rc.1" @@ -5588,6 +8207,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "near-vm-vm" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c98a68706832b567cafa03375d40512bba8d95ae6d3b760f340b22a4b97893" +dependencies = [ + "backtrace", + "cc", + "cfg-if 1.0.0", + "finite-wasm", + "indexmap 1.9.3", + "libc", + "memoffset 0.8.0", + "more-asserts", + "near-vm-types 0.21.2", + "region", + "rkyv", + "thiserror", + "tracing", + "wasmparser 0.99.0", + "winapi", +] + [[package]] name = "near-vm-vm" version = "2.2.1-rc.1" @@ -5601,7 +8243,7 @@ dependencies = [ "libc", "memoffset 0.8.0", "more-asserts", - "near-vm-types", + "near-vm-types 2.2.1-rc.1", "region", "rkyv", "thiserror", @@ -5615,8 +8257,8 @@ version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "anyhow", - "near-primitives-core", - "near-vm-runner", + "near-primitives-core 2.2.1-rc.1", + "near-vm-runner 2.2.1-rc.1", "once_cell", ] @@ -5634,7 +8276,7 @@ dependencies = [ "bytesize", "chrono", "cloud-storage", - "dirs", + "dirs 4.0.0", "easy-ext", "futures", "hex", @@ -5643,31 +8285,31 @@ dependencies = [ "indicatif", "near-async", "near-chain", - "near-chain-configs", + "near-chain-configs 2.2.1-rc.1", "near-chunks", "near-client", "near-client-primitives", - "near-config-utils", - "near-crypto", + "near-config-utils 2.2.1-rc.1", + "near-crypto 2.2.1-rc.1", "near-dyn-configs", "near-epoch-manager", "near-jsonrpc", - "near-jsonrpc-primitives", + "near-jsonrpc-primitives 2.2.1-rc.1", "near-mainnet-res", "near-network", - "near-o11y", - "near-parameters", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", "near-performance-metrics", "near-pool", - "near-primitives", + "near-primitives 2.2.1-rc.1", "near-rosetta-rpc", "near-store", "near-telemetry", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "node-runtime", "num-rational", "once_cell", - "rand", + "rand 0.8.5", "rayon", "regex", "reqwest 0.11.27", @@ -5685,6 +8327,21 @@ dependencies = [ "xz2", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + [[package]] name = "nix" version = "0.15.0" @@ -5710,24 +8367,36 @@ dependencies = [ "memoffset 0.6.5", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags 2.6.0", + "cfg-if 1.0.0", + "cfg_aliases", + "libc", +] + [[package]] name = "node-runtime" version = "2.2.1-rc.1" source = "git+https://github.com/near/nearcore?rev=b3d767e7664d8e123a35313ccc66c8ac1afb2058#b3d767e7664d8e123a35313ccc66c8ac1afb2058" dependencies = [ "borsh 1.5.1", - "near-crypto", - "near-o11y", - "near-parameters", - "near-primitives", - "near-primitives-core", + "near-crypto 2.2.1-rc.1", + "near-o11y 2.2.1-rc.1", + "near-parameters 2.2.1-rc.1", + "near-primitives 2.2.1-rc.1", + "near-primitives-core 2.2.1-rc.1", "near-store", - "near-vm-runner", + "near-vm-runner 2.2.1-rc.1", "near-wallet-contract", "num-bigint 0.3.3", "num-traits", "once_cell", - "rand", + "rand 0.8.5", "rayon", "serde_json", "sha2", @@ -5754,6 +8423,244 @@ dependencies = [ "winapi", ] +[[package]] +name = "ntex" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93daf570cdedb9a01a3020ccd367b2ff37402b30c979aff2da23e3e84d2b6cfc" +dependencies = [ + "base64 0.22.1", + "bitflags 2.6.0", + "bytes", + "encoding_rs", + "httparse", + "httpdate", + "log", + "mime", + "nanorand", + "ntex-bytes", + "ntex-codec", + "ntex-h2", + "ntex-http", + "ntex-io", + "ntex-macros", + "ntex-net", + "ntex-router", + "ntex-rt", + "ntex-server", + "ntex-service", + "ntex-tls", + "ntex-util", + "percent-encoding", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "sha-1", + "thiserror", +] + +[[package]] +name = "ntex-bytes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffd6ac357a3fd885753ddeb4130ec92474e79d013362532eba4778854466981" +dependencies = [ + "bitflags 2.6.0", + "bytes", + "futures-core", + "serde", +] + +[[package]] +name = "ntex-codec" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a7e111d946bb915d712df496728ca2a120b1b5643f66c580f13023bce46fda" +dependencies = [ + "ntex-bytes", +] + +[[package]] +name = "ntex-h2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98763f0ee78f247c02fe1bcdf6380f306a08d95169f9c2d83619d5e1cb26c738" +dependencies = [ + "bitflags 2.6.0", + "fxhash", + "log", + "nanorand", + "ntex-bytes", + "ntex-codec", + "ntex-http", + "ntex-io", + "ntex-net", + "ntex-service", + "ntex-util", + "pin-project-lite", + "thiserror", +] + +[[package]] +name = "ntex-http" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81e205c980c693cb426f55669078bc311973f7e27a34f7ea4d0ce4069dedd05" +dependencies = [ + "fxhash", + "http 1.1.0", + "itoa", + "log", + "ntex-bytes", + "serde", +] + +[[package]] +name = "ntex-io" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec68a2766bcc47426631e3461c8d7994f6eec194445f394ab61f83d92756ad12" +dependencies = [ + "bitflags 2.6.0", + "log", + "ntex-bytes", + "ntex-codec", + "ntex-service", + "ntex-util", + "pin-project-lite", +] + +[[package]] +name = "ntex-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50a359f2a10c712b0446675070c22b1437d57a7cf08139f6a229e1e80817ed84" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ntex-net" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02f3d87616c8fc39c41d432402d98a118861e8e144df30037fe1400cdd29ac35" +dependencies = [ + "log", + "ntex-bytes", + "ntex-http", + "ntex-io", + "ntex-rt", + "ntex-service", + "ntex-tokio", + "ntex-util", + "thiserror", +] + +[[package]] +name = "ntex-router" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb9c68c26a87ffca54339be5f95223339db3e7bcc5d64733fef20812970a746f" +dependencies = [ + "http 1.1.0", + "log", + "ntex-bytes", + "regex", + "serde", +] + +[[package]] +name = "ntex-rt" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d24cfad65aab77e56ee1f1a218ca248c141a22f6f65aba8ed56037ec3c6f3a4" +dependencies = [ + "async-channel", + "futures-core", + "log", + "oneshot", + "tokio", +] + +[[package]] +name = "ntex-server" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9c3f4b038d1bcc3aff4e457a4b8258828b8e119c9ef4fd1e42c8df5e732cee" +dependencies = [ + "async-broadcast", + "async-channel", + "ctrlc", + "log", + "ntex-bytes", + "ntex-net", + "ntex-rt", + "ntex-service", + "ntex-util", + "oneshot", + "polling 3.7.3", + "signal-hook", + "socket2 0.5.7", +] + +[[package]] +name = "ntex-service" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2cc8f131d5fed702d758485fdc45a41dfab69d8ed71b84e2b910b4ea39f795" +dependencies = [ + "slab", +] + +[[package]] +name = "ntex-tls" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e08948d9a1d27d11c474c374e6b8c0eee7e2dd4a288967d5dcce13d7adbd80e" +dependencies = [ + "log", + "ntex-bytes", + "ntex-io", + "ntex-net", + "ntex-service", + "ntex-util", +] + +[[package]] +name = "ntex-tokio" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "623868ff022f737d7b94212dc85e471f895e58f6c59c72552cdc9a22c5f167ed" +dependencies = [ + "log", + "ntex-bytes", + "ntex-io", + "ntex-util", + "tokio", +] + +[[package]] +name = "ntex-util" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f0cf57859407e61c61a7e131cd339b05537046580b65abbf0a817f46917be" +dependencies = [ + "bitflags 2.6.0", + "futures-core", + "futures-sink", + "futures-timer", + "fxhash", + "log", + "ntex-rt", + "ntex-service", + "pin-project-lite", + "slab", +] + [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -5794,6 +8701,7 @@ checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", + "serde", ] [[package]] @@ -5859,9 +8767,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5878,15 +8787,15 @@ checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "crc32fast", "hashbrown 0.14.5", - "indexmap 2.6.0", + "indexmap 2.5.0", "memchr", ] [[package]] name = "object" -version = "0.36.5" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -5895,16 +8804,53 @@ dependencies = [ name = "oid-registry" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oneshot" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e296cf87e61c9cfc1a61c3c63a0f7f286ed4554e0e22be84e8a38e1d264a2a29" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" dependencies = [ - "asn1-rs", + "arrayvec 0.7.6", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", ] [[package]] -name = "once_cell" -version = "1.20.2" +name = "open-fastrlp-derive" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "openssl" @@ -5929,7 +8875,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -5960,6 +8906,27 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", + "tokio", + "tokio-stream", +] + [[package]] name = "opentelemetry" version = "0.22.0" @@ -5975,6 +8942,24 @@ dependencies = [ "urlencoding", ] +[[package]] +name = "opentelemetry-otlp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" +dependencies = [ + "async-trait", + "futures", + "futures-util", + "http 0.2.12", + "opentelemetry 0.17.0", + "prost 0.9.0", + "thiserror", + "tokio", + "tonic 0.6.2", + "tonic-build", +] + [[package]] name = "opentelemetry-otlp" version = "0.15.0" @@ -5984,14 +8969,14 @@ dependencies = [ "async-trait", "futures-core", "http 0.2.12", - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry-proto", - "opentelemetry-semantic-conventions", + "opentelemetry-semantic-conventions 0.14.0", "opentelemetry_sdk", - "prost", + "prost 0.12.6", "thiserror", "tokio", - "tonic", + "tonic 0.11.0", ] [[package]] @@ -6000,10 +8985,19 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" dependencies = [ - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry_sdk", - "prost", - "tonic", + "prost 0.12.6", + "tonic 0.11.0", +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" +dependencies = [ + "opentelemetry 0.17.0", ] [[package]] @@ -6025,24 +9019,64 @@ dependencies = [ "futures-util", "glob", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "ordered-float", "percent-encoding", - "rand", + "rand 0.8.5", "thiserror", "tokio", "tokio-stream", ] +[[package]] +name = "operator-rs" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-transport-ws 0.4.2", + "anyhow", + "bincode", + "borsh 1.5.1", + "clap", + "core-rs", + "eigensdk", + "eyre", + "futures-util", + "hex", + "lapin", + "near-da-primitives", + "near-da-rpc", + "prometheus", + "rand 0.8.5", + "serde", + "serde_json", + "serde_yaml", + "tempfile", + "tokio", + "tracing", + "tracing-subscriber", + "warp", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "ordered-float" -version = "4.3.0" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" +checksum = "4a91171844676f8c7990ce64959210cd2eaef32c2612c50f9fae9f8aaa6065a6" dependencies = [ "borsh 1.5.1", "num-traits", - "rand", + "rand 0.8.5", "serde", ] @@ -6052,19 +9086,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ - "dlv-list 0.3.0", + "dlv-list", "hashbrown 0.12.3", ] [[package]] -name = "ordered-multimap" -version = "0.6.0" +name = "outref" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" -dependencies = [ - "dlv-list 0.5.2", - "hashbrown 0.13.2", -] +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" [[package]] name = "overload" @@ -6086,7 +9116,7 @@ dependencies = [ "hmac", "pkcs12", "pkcs5", - "rand", + "rand 0.8.5", "rc2", "sha1", "sha2", @@ -6104,15 +9134,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - [[package]] name = "paperclip" version = "0.8.2" @@ -6170,9 +9191,9 @@ dependencies = [ [[package]] name = "paperclip-macros" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6e25ce2c5362c8d48dc89e0f9ca076d507f7c1eabd04f0d593cdf5addff90c" +checksum = "0385be5ae9c886c46688290534363a229f2531aa2c5c2bfc3b3ddafed5143aaa" dependencies = [ "heck 0.4.1", "http 0.2.12", @@ -6297,11 +9318,58 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.4", "smallvec", "windows-targets 0.52.6", ] +[[package]] +name = "parse-display" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914a1c2265c98e2446911282c6ac86d8524f495792c38c5bd884f80499c7538a" +dependencies = [ + "parse-display-derive", + "regex", + "regex-syntax 0.8.4", +] + +[[package]] +name = "parse-display-derive" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae7800a4c974efd12df917266338e79a7a74415173caf7e70aa0a0707345281" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "regex-syntax 0.8.4", + "structmeta", + "syn 2.0.77", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "paste" version = "1.0.15" @@ -6309,10 +9377,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "pathdiff" -version = "0.2.2" +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash 0.4.2", + "sha2", +] [[package]] name = "pbkdf2" @@ -6341,6 +9421,25 @@ dependencies = [ "regex", ] +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64 0.22.1", + "serde", +] + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -6358,9 +9457,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -6368,67 +9467,94 @@ dependencies = [ ] [[package]] -name = "pest_derive" -version = "2.7.14" +name = "petgraph" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "pest", - "pest_generator", + "fixedbitset", + "indexmap 2.5.0", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", ] [[package]] -name = "pest_generator" -version = "2.7.14" +name = "phf" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "pest", - "pest_meta", + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] -name = "pest_meta" -version = "2.7.14" +name = "phf_shared" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "once_cell", - "pest", - "sha2", + "siphasher", ] [[package]] -name = "pharos" -version = "0.5.3" +name = "phf_shared" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "futures", - "rustc_version 0.4.1", + "siphasher", ] [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6490,8 +9616,8 @@ dependencies = [ "aes", "cbc", "der", - "pbkdf2", - "scrypt", + "pbkdf2 0.12.2", + "scrypt 0.11.0", "sha2", "spki", ] @@ -6508,9 +9634,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" @@ -6543,6 +9669,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -6558,6 +9690,38 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "predicates" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" + +[[package]] +name = "predicates-tree" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "prefix-sum-vec" version = "0.1.2" @@ -6571,7 +9735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -6592,6 +9756,9 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", "uint", ] @@ -6656,14 +9823,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -6694,15 +9861,25 @@ dependencies = [ "bitflags 2.6.0", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", ] +[[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.6" @@ -6710,7 +9887,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", +] + +[[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 0.10.5", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.9.0", + "prost-types", + "regex", + "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 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -6723,7 +9933,17 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", +] + +[[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]] @@ -6734,9 +9954,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "protobuf" -version = "3.6.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3018844a02746180074f621e847703737d27d89d7f0721a7a4da317f88b16385" +checksum = "0bcc343da15609eaecd65f8aa76df8dc4209d325131d8219358c0aaaebab0bf6" dependencies = [ "once_cell", "protobuf-support", @@ -6745,13 +9965,13 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.6.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c15a212b4de05eb8bc989fd066a74c86bd3c04e27d6e86bd7703b806d7734" +checksum = "c4d0cde5642ea4df842b13eb9f59ea6fafa26dcb43e3e1ee49120e9757556189" dependencies = [ "anyhow", "once_cell", - "protobuf 3.6.0", + "protobuf 3.5.1", "protobuf-parse", "regex", "tempfile", @@ -6760,14 +9980,14 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.6.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06f45f16b522d92336e839b5e40680095a045e36a1e7f742ba682ddc85236772" +checksum = "1b0e9b447d099ae2c4993c0cbb03c7a9d6c937b17f2d56cfc0b1550e6fcfdb76" dependencies = [ "anyhow", - "indexmap 2.6.0", + "indexmap 2.5.0", "log", - "protobuf 3.6.0", + "protobuf 3.5.1", "protobuf-support", "tempfile", "thiserror", @@ -6776,9 +9996,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.6.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf96d872914fcda2b66d66ea3fff2be7c66865d31c7bb2790cff32c0e714880" +checksum = "f0766e3675a627c327e4b3964582594b0e8741305d628a98a5de75a1d15f99b9" dependencies = [ "thiserror", ] @@ -6823,12 +10043,75 @@ dependencies = [ "parity-wasm 0.41.0", ] +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls 0.23.13", + "socket2 0.5.7", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.17.8", + "rustc-hash 2.0.0", + "rustls 0.23.13", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2 0.5.7", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.37" @@ -6844,6 +10127,29 @@ 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.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + [[package]] name = "rand" version = "0.8.5" @@ -6851,11 +10157,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", "serde", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -6863,7 +10179,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", ] [[package]] @@ -6872,17 +10197,26 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "rand_hc" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b363d4f6370f88d62bf586c80405657bde0f0e1b8945d47d2ad59b906cb4f54" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6891,7 +10225,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6900,7 +10234,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags 2.6.0", ] [[package]] @@ -6929,7 +10272,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" dependencies = [ - "cipher", + "cipher 0.4.4", ] [[package]] @@ -6966,9 +10309,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -6979,11 +10322,20 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom", + "getrandom 0.2.15", "libredox", "thiserror", ] +[[package]] +name = "reed-solomon-erasure" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] + [[package]] name = "reed-solomon-erasure" version = "6.0.0" @@ -7012,14 +10364,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -7033,13 +10385,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax 0.8.4", ] [[package]] @@ -7056,9 +10408,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "region" @@ -7072,6 +10424,34 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "relayer-rs" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-primitives 0.8.5", + "alloy-rlp", + "alloy-rpc-client 0.4.2", + "alloy-rpc-types 0.4.2", + "alloy-transport-ws 0.4.2", + "anyhow", + "bincode", + "clap", + "eyre", + "futures-util", + "near-da-primitives", + "near-da-rpc", + "prometheus", + "serde", + "serde_json", + "serde_yaml", + "tempfile", + "tokio", + "tracing", + "tracing-subscriber", + "warp", +] + [[package]] name = "rend" version = "0.4.2" @@ -7092,10 +10472,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", + "hyper-rustls 0.24.2", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -7105,21 +10486,24 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 0.1.2", - "system-configuration", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", - "tokio-util", + "tokio-rustls 0.24.1", + "tokio-util 0.7.12", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", + "webpki-roots 0.25.4", "winreg", ] @@ -7131,12 +10515,16 @@ checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", + "h2 0.4.6", + "hickory-resolver", "http 1.1.0", "http-body 1.0.1", "http-body-util", "hyper 1.4.1", + "hyper-rustls 0.27.3", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -7147,21 +10535,38 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.2.0", + "quinn", + "rustls 0.23.13", + "rustls-native-certs 0.8.0", + "rustls-pemfile 2.1.3", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", + "tokio-rustls 0.26.0", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 0.26.6", "windows-registry", ] +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -7195,7 +10600,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7226,7 +10631,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid", + "uuid 1.10.0", ] [[package]] @@ -7256,29 +10661,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] [[package]] -name = "rocksdb" -version = "0.21.0" +name = "rlp-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "libc", - "librocksdb-sys", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "ron" -version = "0.8.1" +name = "rocksdb" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ - "base64 0.21.7", - "bitflags 2.6.0", - "serde", - "serde_derive", + "libc", + "librocksdb-sys", ] [[package]] @@ -7297,7 +10702,7 @@ dependencies = [ "parity-scale-codec", "primitive-types 0.12.2", "proptest", - "rand", + "rand 0.8.5", "rlp", "ruint-macro", "serde", @@ -7312,23 +10717,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] -name = "rust-ini" -version = "0.18.0" +name = "rust-bls-bn254" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "24ee74e41c4bdfb5720a8d5743e089cb7c7b3ea7dfed73de1fe0a02c5fe744f9" dependencies = [ - "cfg-if 1.0.0", - "ordered-multimap 0.4.3", + "aes", + "ark-bn254", + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "ctr", + "hex", + "hkdf", + "num-bigint 0.4.6", + "num-traits", + "pbkdf2 0.12.2", + "rand 0.8.5", + "scrypt 0.11.0", + "serde", + "serde_json", + "sha2", + "thiserror", + "unicode-normalization", + "uuid 0.8.2", ] [[package]] name = "rust-ini" -version = "0.19.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ "cfg-if 1.0.0", - "ordered-multimap 0.6.0", + "ordered-multimap", ] [[package]] @@ -7452,14 +10875,42 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ + "aws-lc-rs", + "log", "once_cell", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -7471,10 +10922,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", - "rustls", - "rustls-native-certs", + "rustls 0.23.13", + "rustls-native-certs 0.7.3", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.8", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", ] [[package]] @@ -7484,7 +10947,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.2.0", + "rustls-pemfile 2.1.3", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.3", "rustls-pki-types", "schannel", "security-framework", @@ -7501,18 +10977,29 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.2.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] [[package]] name = "rustls-webpki" @@ -7520,6 +11007,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", @@ -7527,9 +11015,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -7572,35 +11060,97 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if 1.0.0", + "derive_more 0.99.18", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + [[package]] name = "scrypt" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ - "pbkdf2", + "password-hash 0.5.0", + "pbkdf2 0.12.2", "salsa20", "sha2", ] +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "seahash" version = "4.1.0" @@ -7627,7 +11177,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "rand", + "rand 0.8.5", "secp256k1-sys", ] @@ -7655,9 +11205,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -7686,6 +11236,9 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "semver-parser" @@ -7702,6 +11255,12 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "send_wrapper" version = "0.6.0" @@ -7739,15 +11298,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "serde_bare" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51c55386eed0f1ae957b091dc2ca8122f287b60c79c774cbe3d5f2b69fded660" -dependencies = [ - "serde", -] - [[package]] name = "serde_bytes" version = "0.11.15" @@ -7765,7 +11315,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -7797,14 +11347,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -7823,15 +11373,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.11.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.6.0", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -7841,14 +11391,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -7857,13 +11407,24 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.5.0", "itoa", "ryu", "serde", "unsafe-libyaml", ] +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha1" version = "0.10.6" @@ -7921,6 +11482,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -7937,14 +11508,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] name = "simdutf8" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "simple_asn1" @@ -7957,6 +11528,24 @@ dependencies = [ "num-traits", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "sized-chunks" version = "0.6.5" @@ -7967,6 +11556,12 @@ dependencies = [ "typenum", ] +[[package]] +name = "sketches-ddsketch" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" + [[package]] name = "slab" version = "0.4.9" @@ -8030,6 +11625,20 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + [[package]] name = "spin" version = "0.5.2" @@ -8073,12 +11682,48 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.3", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "structmeta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive", + "syn 2.0.77", +] + +[[package]] +name = "structmeta-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "strum" version = "0.24.1" @@ -8120,7 +11765,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8133,7 +11778,7 @@ dependencies = [ "crc", "lazy_static", "md-5", - "rand", + "rand 0.8.5", "ring 0.16.20", "subtle", "thiserror", @@ -8148,6 +11793,26 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs 5.0.1", + "fs2", + "hex", + "once_cell", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.109" @@ -8161,9 +11826,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -8172,14 +11837,26 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.8" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.77", +] + +[[package]] +name = "syn-solidity" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebfc1bfd06acc78f16d8fd3ef846bc222ee7002468d10a7dce8d703d6eab89a3" +checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8191,7 +11868,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8217,7 +11894,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8243,7 +11920,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -8256,6 +11944,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -8283,14 +11981,14 @@ dependencies = [ "cfg-if 1.0.0", "p12-keystore", "rustls-connector", - "rustls-pemfile 2.2.0", + "rustls-pemfile 2.1.3", ] [[package]] name = "tempfile" -version = "3.13.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if 1.0.0", "fastrand 2.1.1", @@ -8300,43 +11998,69 @@ dependencies = [ ] [[package]] -name = "thiserror" -version = "1.0.64" +name = "term" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ - "thiserror-impl", + "dirs-next", + "rustversion", + "winapi", ] [[package]] -name = "thiserror-impl" -version = "1.0.64" +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "testcontainers" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "725cbe485aafddfd8b2d01665937c95498d894c07fabd9c4e06a53c7da4ccc56" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", + "async-trait", + "bollard", + "bollard-stubs", + "bytes", + "dirs 5.0.1", + "docker_credential", + "either", + "futures", + "log", + "memchr", + "parse-display", + "pin-project-lite", + "reqwest 0.12.8", + "serde", + "serde_json", + "serde_with", + "thiserror", + "tokio", + "tokio-stream", + "tokio-util 0.7.12", + "url", ] [[package]] -name = "thiserror-impl-no-std" -version = "2.0.2" +name = "thiserror" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e6318948b519ba6dc2b442a6d0b904ebfb8d411a3ad3e07843615a72249758" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "thiserror-impl", ] [[package]] -name = "thiserror-no-std" -version = "2.0.2" +name = "thiserror-impl" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ad459d94dd517257cc96add8a43190ee620011bb6e6cdc82dafd97dfafafea" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ - "thiserror-impl-no-std", + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] @@ -8443,9 +12167,9 @@ dependencies = [ [[package]] name = "tokio-executor-trait" -version = "2.1.3" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a1593beae7759f592e1100c5997fe9e9ebf4b5968062f1fbcd807989cd1b79" +checksum = "802ccf58e108fe16561f35348fabe15ff38218968f033d587e399a84937533cc" dependencies = [ "async-trait", "executor-trait", @@ -8470,7 +12194,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8508,13 +12232,34 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls", + "rustls 0.23.13", "rustls-pki-types", "tokio", ] @@ -8528,7 +12273,63 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", - "tokio-util", + "tokio-util 0.7.12", +] + +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", + "tungstenite 0.20.1", + "webpki-roots 0.25.4", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.21.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" +dependencies = [ + "futures-util", + "log", + "rustls 0.23.13", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tungstenite 0.23.0", + "webpki-roots 0.26.6", ] [[package]] @@ -8537,14 +12338,28 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ - "futures-util", + "futures-util", + "log", + "rustls 0.23.13", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tungstenite 0.24.0", + "webpki-roots 0.26.6", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", "log", - "rustls", - "rustls-pki-types", + "pin-project-lite", "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", ] [[package]] @@ -8592,17 +12407,48 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", "winnow", ] +[[package]] +name = "tonic" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.13.1", + "bytes", + "futures-core", + "futures-util", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.9.0", + "prost-derive 0.9.0", + "tokio", + "tokio-stream", + "tokio-util 0.6.10", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + [[package]] name = "tonic" version = "0.11.0" @@ -8614,14 +12460,14 @@ dependencies = [ "axum", "base64 0.21.7", "bytes", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.12.6", "tokio", "tokio-stream", "tower 0.4.13", @@ -8630,6 +12476,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757" +dependencies = [ + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] + [[package]] name = "tower" version = "0.4.13" @@ -8641,10 +12499,10 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand", + "rand 0.8.5", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.12", "tower-layer", "tower-service", "tracing", @@ -8708,7 +12566,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -8721,6 +12579,27 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -8732,6 +12611,20 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry 0.17.0", + "tracing", + "tracing-core", + "tracing-log 0.1.4", + "tracing-subscriber", +] + [[package]] name = "tracing-opentelemetry" version = "0.23.0" @@ -8740,16 +12633,26 @@ checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" dependencies = [ "js-sys", "once_cell", - "opentelemetry", + "opentelemetry 0.22.0", "opentelemetry_sdk", "smallvec", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", "tracing-subscriber", "web-time", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -8760,12 +12663,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.2.0", + "tracing-serde", ] [[package]] @@ -8774,6 +12680,65 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.21.12", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "tungstenite" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand 0.8.5", + "rustls 0.23.13", + "rustls-pki-types", + "sha1", + "thiserror", + "utf-8", +] + [[package]] name = "tungstenite" version = "0.24.0" @@ -8786,8 +12751,8 @@ dependencies = [ "http 1.1.0", "httparse", "log", - "rand", - "rustls", + "rand 0.8.5", + "rustls 0.23.13", "rustls-pki-types", "sha1", "thiserror", @@ -8802,9 +12767,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -8818,15 +12783,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint-zigzag" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbf77aed65cb885a8ba07138c365879be3d9a93dce82bf6cc50feca9138ec15" -dependencies = [ - "core2", -] - [[package]] name = "unarray" version = "0.1.4" @@ -8844,9 +12800,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.17" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -8856,9 +12812,9 @@ checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -8871,9 +12827,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -8906,8 +12862,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", - "idna", + "idna 0.5.0", "percent-encoding", + "serde", ] [[package]] @@ -8928,11 +12885,24 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "uuid" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom 0.2.15", +] [[package]] name = "valuable" @@ -8959,20 +12929,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] -name = "vsss-rs" -version = "4.3.8" +name = "vsimd" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fabeca519a296f0b39428cfe496b600c0179c9498687986449d61fa40e60806" -dependencies = [ - "crypto-bigint", - "elliptic-curve", - "generic-array 1.1.0", - "rand_core", - "serde", - "sha3", - "subtle", - "thiserror-no-std", -] +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "wait-timeout" @@ -8989,6 +12949,16 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -8998,6 +12968,41 @@ dependencies = [ "try-lock", ] +[[package]] +name = "warp" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "headers", + "http 0.2.12", + "hyper 0.14.30", + "log", + "mime", + "mime_guess", + "multer", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-tungstenite 0.21.0", + "tokio-util 0.7.12", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9006,9 +13011,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -9017,24 +13022,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -9044,9 +13049,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9054,22 +13059,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-encoder" @@ -9091,9 +13096,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -9308,7 +13313,7 @@ version = "0.115.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" dependencies = [ - "indexmap 2.6.0", + "indexmap 2.5.0", "semver 1.0.23", ] @@ -9333,7 +13338,7 @@ dependencies = [ "bumpalo", "cfg-if 1.0.0", "fxprof-processed-profile", - "indexmap 2.6.0", + "indexmap 2.5.0", "libc", "log", "object 0.32.2", @@ -9412,7 +13417,7 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli 0.28.1", - "indexmap 2.6.0", + "indexmap 2.5.0", "log", "object 0.32.2", "serde", @@ -9478,14 +13483,14 @@ dependencies = [ "anyhow", "cc", "cfg-if 1.0.0", - "indexmap 2.6.0", + "indexmap 2.5.0", "libc", "log", "mach", "memfd", "memoffset 0.9.1", "paste", - "rand", + "rand 0.8.5", "rustix 0.38.37", "sptr", "wasm-encoder 0.35.0", @@ -9518,7 +13523,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9529,9 +13534,9 @@ checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658" [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -9547,6 +13552,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + [[package]] name = "webpki-roots" version = "0.26.6" @@ -9571,7 +13582,7 @@ dependencies = [ "libc", "log", "nix 0.24.3", - "rand", + "rand 0.8.5", "thiserror", "tokio", "winapi", @@ -9597,9 +13608,9 @@ checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "wildmatch" -version = "2.4.0" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" +checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" [[package]] name = "winapi" @@ -9617,6 +13628,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -9812,9 +13832,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -9829,23 +13849,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "workers" -version = "0.1.0" -dependencies = [ - "alloy", - "blsful", - "bytes", - "config", - "eyre", - "futures", - "serde", - "serde_json", - "tokio", - "tracing", - "tracing-subscriber", -] - [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -9858,7 +13861,7 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.1", - "send_wrapper", + "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -9917,15 +13920,6 @@ dependencies = [ "lzma-sys", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yansi" version = "0.5.1" @@ -9950,7 +13944,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9970,7 +13964,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.77", ] [[package]] @@ -9983,17 +13977,56 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand", + "rand 0.8.5", "rustc-hex", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + [[package]] name = "zstd" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe", + "zstd-safe 7.2.1", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 69a7bead..9e8147bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,9 @@ resolver = "2" members = [ "indexer", "contracts/evm/test/ffi/bls-utils", + "relayer-rs", + "operator-rs", + "core-rs", "workers", ] diff --git a/indexer/FastIndexer.dockerfile b/indexer/FastIndexer.dockerfile index 5e898fec..dbb21b9e 100644 --- a/indexer/FastIndexer.dockerfile +++ b/indexer/FastIndexer.dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.79 AS builder +FROM rust:1.79-bookworm AS builder WORKDIR /tmp/indexer # Copy from nearcore: