diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..ce406c26 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ + +## Current Behavior + + + + +## New Behavior + + + +## Breaking Changes + + + + +## Observations + + + diff --git a/.github/workflows/compose-test.yml b/.github/workflows/compose-test.yml new file mode 100644 index 00000000..f67ec19e --- /dev/null +++ b/.github/workflows/compose-test.yml @@ -0,0 +1,128 @@ +name: Docker Compose Test + +on: + push: + branches: + - main + pull_request: + +jobs: + run-docker-compose: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Docker Compose + run: | + sudo apt-get update + sudo apt-get install docker-compose -y + + - name: Build indexer container + uses: docker/build-push-action@v5 + with: + load: true + context: . + file: ./indexer/Dockerfile + tags: near-sffl-indexer + cache-from: type=gha,scope=indexer + cache-to: type=gha,mode=max,scope=indexer + + - name: Build relayer container + uses: docker/build-push-action@v5 + with: + load: true + context: . + file: ./relayer/cmd/Dockerfile + tags: near-sffl-test-relayer + cache-from: type=gha,scope=relayer + cache-to: type=gha,mode=max,scope=relayer + + - name: Build aggregator container + uses: docker/build-push-action@v5 + with: + load: true + context: . + file: ./aggregator/cmd/Dockerfile + tags: near-sffl-aggregator + cache-from: type=gha,scope=aggregator + cache-to: type=gha,mode=max,scope=aggregator + + - name: Build operator container + uses: docker/build-push-action@v5 + with: + load: true + context: . + file: ./operator/cmd/Dockerfile + tags: near-sffl-operator + cache-from: type=gha,scope=operator + cache-to: type=gha,mode=max,scope=operator + + - name: Build and start Docker Compose services + run: docker-compose -f ./docker-compose.yml up --build -d + + - name: Wait for 5 minutes + run: sleep 300 + + - name: List running containers + run: | + echo "Running containers:" + docker ps --format "{{.Names}}" + + - name: Ensure containers are running + run: | + containers=( + "near-sffl_operator1-health_1" + "near-sffl-operator1" + "near-sffl_operator0-health_1" + "near-sffl-operator0" + "rollup1-relayer" + "rollup0-relayer" + "near-sffl-indexer" + "near-sffl-aggregator" + "near-sffl_agreator-health_1" + "mainnet-anvil" + "prometheus" + "rollup0-anvil" + "rmq" + "rollup1-anvil" + "grafana" + ) # List of container names + for container in "${containers[@]}"; do + if docker inspect -f '{{.State.Running}}' "$container" >/dev/null 2>&1; then + echo "$container is running" + else + echo "$container is not running" + exit 1 + fi + done + + + - name: Check health status + run: | + services=( + "near-sffl_operator1-health_1" + "near-sffl_operator0-health_1" + "near-sffl_agreator-health_1" + "rollup1-anvil" + "rollup0-anvil" + "mainnet-anvil" + "rmq" + ) # List of services names + for service in "${services[@]}"; do + status=$(docker inspect -f '{{.State.Health.Status}}' $service) + if [ "$status" != "healthy" ]; then + echo "Service $service is not healthy" + docker-compose -f ./docker-compose.yml logs $service + exit 1 + else + echo "Service $service is healthy" + fi + done + + - name: Tear down Docker Compose services + run: docker-compose -f ./docker-compose.yml down diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000..00770b05 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,3 @@ +run: + # TODO: We want to eventually enable linting for all files, including test code + tests: false diff --git a/Cargo.lock b/Cargo.lock index 5630fc4a..07c15592 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +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" - [[package]] name = "actix" version = "0.13.1" @@ -30,7 +24,7 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", - "tokio-util 0.7.10", + "tokio-util", ] [[package]] @@ -46,7 +40,7 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tracing", ] @@ -95,13 +89,13 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "sha1", "smallvec", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tracing", - "zstd 0.13.1", + "zstd", ] [[package]] @@ -184,7 +178,7 @@ dependencies = [ "rustls-webpki", "tokio", "tokio-openssl", - "tokio-util 0.7.10", + "tokio-util", "tracing", ] @@ -267,7 +261,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.1", + "gimli", ] [[package]] @@ -276,24 +270,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", - "cpufeatures", -] - [[package]] name = "ahash" version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom", "once_cell", "version_check", ] @@ -305,7 +288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.11", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -341,91 +324,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "alloy-json-abi" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c5aecfe87e06da0e760840974c6e3cc19d4247be17a3172825fbbe759c8e60" -dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", - "serde", -] - -[[package]] -name = "alloy-primitives" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b6fb2b432ff223d513db7f908937f63c252bee0af9b82bfd25b0a5dd1eb0d8" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if 1.0.0", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand 0.8.5", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "arrayvec 0.7.4", - "bytes", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0b5ab0cb07c21adf9d72e988b34e8200ce648c2bba8d009183bb1c50fb1216" -dependencies = [ - "alloy-json-abi", - "const-hex", - "dunce", - "heck 0.4.1", - "indexmap 2.2.6", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.47", - "syn-solidity", - "tiny-keccak", -] - -[[package]] -name = "alloy-sol-type-parser" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd124ec0a456ec5e9dcca5b6e8b011bc723cc410d4d9a66bf032770feaeef4b" -dependencies = [ - "winnow", -] - -[[package]] -name = "alloy-sol-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c08f62ded7ce03513bfb60ef5cad4fff5d4f67eac6feb4df80426b7b9ffb06e" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", - "const-hex", - "serde", -] - [[package]] name = "amq-protocol" version = "7.1.2" @@ -558,130 +456,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" -[[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.4", - "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", - "num-bigint 0.4.4", - "num-traits", - "paste", - "rustc_version 0.4.0", - "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.4", - "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.4", - "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.4", -] - -[[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.7" @@ -694,12 +468,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "assert_matches" version = "1.5.0" @@ -891,28 +659,6 @@ dependencies = [ "wildmatch", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "auto_impl" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.47", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -946,7 +692,7 @@ dependencies = [ "openssl", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "serde", "serde_json", "serde_urlencoded", @@ -1038,18 +784,6 @@ dependencies = [ "rustc-demangle", ] -[[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" @@ -1068,30 +802,6 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "binary-install" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bff426ff93f3610dd2b946f3eb8cb2d1285ca8682834d43be531a3f93db2ff" -dependencies = [ - "anyhow", - "dirs-next", - "flate2", - "fs2", - "hex", - "is_executable", - "siphasher", - "tar", - "ureq", - "zip 0.6.6", -] - [[package]] name = "bincode" version = "1.3.3" @@ -1122,21 +832,6 @@ dependencies = [ "syn 2.0.47", ] -[[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" @@ -1158,28 +853,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", + "wyz", ] [[package]] @@ -1200,7 +883,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" dependencies = [ "arrayref", - "arrayvec 0.5.2", + "arrayvec", "cc", "cfg-if 0.1.10", "constant_time_eq", @@ -1208,15 +891,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" @@ -1265,8 +939,8 @@ dependencies = [ name = "bls-utils" version = "0.1.0" dependencies = [ - "clap 4.4.11", - "rand 0.8.5", + "clap", + "rand", "serde", "serde_json", "zeropool-bn", @@ -1282,16 +956,6 @@ dependencies = [ "hashbrown 0.11.2", ] -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - [[package]] name = "borsh" version = "1.3.0" @@ -1308,21 +972,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", "syn 1.0.109", @@ -1353,17 +1004,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "borsh-schema-derive-internal" version = "0.9.3" @@ -1375,17 +1015,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "brotli" version = "3.4.0" @@ -1407,42 +1036,18 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "brownstone" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ea61398f34f1395ccbeb046fb68c87b631d1f34567fed0f0f11fa35d18d8d" -dependencies = [ - "arrayvec 0.7.4", -] - [[package]] name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" -[[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.11" @@ -1476,9 +1081,6 @@ name = "bytes" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] [[package]] name = "bytesize" @@ -1498,16 +1100,6 @@ 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" @@ -1519,79 +1111,13 @@ 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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-near" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f73eb01da3b6737778d2006645533e75563d1080c64bf714bfb88d3fb0ac09b" -dependencies = [ - "anyhow", - "atty", - "bs58 0.4.0", - "camino", - "cargo_metadata", - "clap 3.2.25", - "colored", - "env_logger", - "libloading", - "log", - "near-abi", - "rustc_version 0.4.0", - "schemars", - "serde_json", - "sha2 0.10.8", - "symbolic-debuginfo", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "cargo-platform" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.20", - "serde", - "serde_json", -] - [[package]] name = "cbc" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1646,15 +1172,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[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" @@ -1676,23 +1193,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - [[package]] name = "clap" version = "4.4.11" @@ -1700,7 +1200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive", ] [[package]] @@ -1711,44 +1211,22 @@ checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", + "clap_lex", "strsim", ] -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "clap_derive" version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "syn 2.0.47", ] -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "clap_lex" version = "0.6.0" @@ -1793,16 +1271,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "concurrent-queue" version = "2.4.0" @@ -1825,25 +1293,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "const-hex" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" -dependencies = [ - "cfg-if 1.0.0", - "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 = "constant_time_eq" version = "0.1.5" @@ -1929,7 +1378,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.28.1", + "gimli", "hashbrown 0.14.3", "log", "regalloc2", @@ -2112,18 +1561,6 @@ 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" @@ -2144,19 +1581,6 @@ dependencies = [ "subtle", ] -[[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.1" @@ -2169,7 +1593,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rand_core 0.6.4", + "rand_core", "rustc_version 0.4.0", "subtle", "zeroize", @@ -2253,32 +1677,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "debugid" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730" -dependencies = [ - "uuid 0.8.2", -] - [[package]] name = "debugid" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid 1.6.1", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", + "uuid", ] [[package]] @@ -2291,17 +1696,6 @@ 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_arbitrary" version = "1.3.2" @@ -2332,7 +1726,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -2359,8 +1753,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", - "const-oid", + "block-buffer", "crypto-common", "subtle", ] @@ -2374,16 +1767,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -2395,17 +1778,6 @@ dependencies = [ "winapi", ] -[[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 = "dissimilar" version = "1.0.7" @@ -2418,12 +1790,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" -[[package]] -name = "dmsort" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0bc8fbe9441c17c9f46f75dfe27fa1ddb6c68a461ccaed0481419219d4f10d3" - [[package]] name = "doc-comment" version = "0.3.3" @@ -2436,18 +1802,6 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "dyn-clone" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" - [[package]] name = "dynasm" version = "1.2.3" @@ -2507,50 +1861,13 @@ 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 2.2.0", - "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]] @@ -2559,10 +1876,10 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.1.1", - "ed25519 2.2.3", - "rand_core 0.6.4", - "sha2 0.10.8", + "curve25519-dalek", + "ed25519", + "rand_core", + "sha2", "subtle", ] @@ -2581,35 +1898,6 @@ dependencies = [ "heapsize", ] -[[package]] -name = "elementtree" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6319c9433cf1e95c60c8533978bccf0614f27f03bb4e514253468eeeaa7fe3" -dependencies = [ - "string_cache", - "xml-rs", -] - -[[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 = "encode_unicode" version = "0.3.6" @@ -2666,19 +1954,6 @@ dependencies = [ "syn 2.0.47", ] -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -2752,12 +2027,6 @@ dependencies = [ "async-trait", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fallible-iterator" version = "0.3.0" @@ -2779,52 +2048,19 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec 0.7.4", - "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 0.6.4", - "subtle", -] - [[package]] name = "fiat-crypto" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - [[package]] name = "finite-wasm" 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", @@ -2840,30 +2076,9 @@ 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 = "flate2" version = "1.0.28" @@ -2925,22 +2140,6 @@ 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" @@ -3080,7 +2279,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ "bitflags 2.4.1", - "debugid 0.8.0", + "debugid", "fxhash", "serde", "serde_json", @@ -3103,18 +2302,6 @@ 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]] @@ -3124,20 +2311,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" -dependencies = [ - "fallible-iterator 0.2.0", - "stable_deref_trait", + "wasi", ] [[package]] @@ -3146,7 +2321,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ - "fallible-iterator 0.3.0", + "fallible-iterator", "indexmap 2.2.6", "stable_deref_trait", ] @@ -3157,28 +2332,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "goblin" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll 0.11.0", -] - -[[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" @@ -3194,7 +2347,7 @@ dependencies = [ "indexmap 2.2.6", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tracing", ] @@ -3244,30 +2397,12 @@ dependencies = [ "winapi", ] -[[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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.3" @@ -3283,12 +2418,6 @@ 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" @@ -3341,12 +2470,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.28" @@ -3442,54 +2565,19 @@ 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.9", -] - [[package]] name = "impl-more" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" -[[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 = "indent_write" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" - [[package]] name = "indexer" version = "0.0.1" @@ -3498,16 +2586,16 @@ dependencies = [ "actix-web", "anyhow", "borsh 1.3.0", - "clap 4.4.11", + "clap", "deadpool", "deadpool-lapin", "futures", "lapin", "near-client", "near-client-primitives", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-indexer", - "near-o11y 1.40.0-rc.1", + "near-o11y", "openssl-probe", "prometheus", "serde", @@ -3580,7 +2668,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -3591,15 +2679,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is_executable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d553b8abc8187beb7d663e34c065ac4570b273bc9511a50e940e99409c577" -dependencies = [ - "winapi", -] - [[package]] name = "itertools" version = "0.10.5" @@ -3624,12 +2703,6 @@ dependencies = [ "libc", ] -[[package]] -name = "joinery" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" - [[package]] name = "js-sys" version = "0.3.66" @@ -3639,18 +2712,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json-patch" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff", -] - [[package]] name = "json_comments" version = "0.2.2" @@ -3671,20 +2732,6 @@ dependencies = [ "simple_asn1", ] -[[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]] name = "keccak" version = "0.1.4" @@ -3694,16 +2741,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "keccak-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - [[package]] name = "language-tags" version = "0.3.2" @@ -3769,12 +2806,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "libredox" version = "0.0.1" @@ -4019,12 +3050,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" @@ -4073,7 +3098,7 @@ checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -4083,12 +3108,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" -[[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.11" @@ -4107,38 +3126,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.20", - "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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0cb40869cab7f5232f934f45db35bffe0f2d2a7cb0cd0346202fbe4ebf2dd7" -dependencies = [ - "borsh 0.10.3", - "serde", -] - [[package]] name = "near-account-id" version = "1.0.0-alpha.4" @@ -4158,7 +3145,7 @@ dependencies = [ "derive_more", "futures", "near-async-derive", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-performance-metrics", "once_cell", "serde", @@ -4203,56 +3190,34 @@ dependencies = [ "lru 0.7.8", "near-async", "near-cache", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chain-primitives", "near-client-primitives", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-epoch-manager", "near-mainnet-res", "near-network", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-parameters", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 1.40.0-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", + "strum", "tempfile", "thiserror", "tracing", "yansi", ] -[[package]] -name = "near-chain-configs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f9a1c805846237d56f99b328ba6ab77e5d43ef59aaaf8d2a41d42fdc708a7b" -dependencies = [ - "anyhow", - "chrono", - "derive_more", - "near-config-utils 0.17.0", - "near-crypto 0.17.0", - "near-o11y 0.17.0", - "near-primitives 0.17.0", - "num-rational", - "once_cell", - "serde", - "serde_json", - "sha2 0.10.8", - "smart-default", - "tracing", -] - [[package]] name = "near-chain-configs" version = "1.40.0-rc.1" @@ -4263,16 +3228,16 @@ dependencies = [ "chrono", "derive_more", "near-async", - "near-config-utils 1.40.0-rc.1", - "near-crypto 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", + "near-config-utils", + "near-crypto", + "near-o11y", "near-parameters", - "near-primitives 1.40.0-rc.1", + "near-primitives", "num-rational", "once_cell", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "smart-default", "time", "tracing", @@ -4284,8 +3249,8 @@ version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ "near-async", - "near-crypto 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-crypto", + "near-primitives", "thiserror", "time", "tracing", @@ -4305,21 +3270,21 @@ dependencies = [ "lru 0.7.8", "near-async", "near-chain", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chunks-primitives", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-epoch-manager", "near-network", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 1.40.0-rc.1", + "near-primitives", "near-store", "once_cell", - "rand 0.8.5", + "rand", "reed-solomon-erasure", - "strum 0.24.1", + "strum", "time", "tracing", ] @@ -4330,7 +3295,7 @@ version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ "near-chain-primitives", - "near-primitives 1.40.0-rc.1", + "near-primitives", ] [[package]] @@ -4353,27 +3318,27 @@ dependencies = [ "near-async", "near-cache", "near-chain", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chain-primitives", "near-chunks", "near-client-primitives", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-dyn-configs", "near-epoch-manager", "near-network", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-parameters", "near-performance-metrics", "near-performance-metrics-macros", "near-pool", - "near-primitives 1.40.0-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", "regex", @@ -4381,7 +3346,7 @@ dependencies = [ "rust-s3", "serde", "serde_json", - "strum 0.24.1", + "strum", "sysinfo", "tempfile", "thiserror", @@ -4398,32 +3363,20 @@ dependencies = [ "actix", "chrono", "near-async", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chain-primitives", "near-chunks-primitives", - "near-crypto 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-crypto", + "near-primitives", "serde", "serde_json", - "strum 0.24.1", + "strum", "thiserror", "time", "tracing", "yansi", ] -[[package]] -name = "near-config-utils" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5523e7dce493c45bc3241eb3100d943ec471852f9b1f84b46a34789eadf17031" -dependencies = [ - "anyhow", - "json_comments", - "thiserror", - "tracing", -] - [[package]] name = "near-config-utils" version = "1.40.0-rc.1" @@ -4435,59 +3388,6 @@ 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", - "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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6b382b626e7e0cd372d027c6672ac97b4b6ee6114288c9e58d8180b935d315" -dependencies = [ - "blake2", - "borsh 0.10.3", - "bs58 0.4.0", - "c2-chacha", - "curve25519-dalek 3.2.0", - "derive_more", - "ed25519-dalek 1.0.1", - "hex", - "near-account-id 0.17.0", - "near-config-utils 0.17.0", - "near-stdx 0.17.0", - "once_cell", - "primitive-types 0.10.1", - "rand 0.7.3", - "secp256k1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - [[package]] name = "near-crypto" version = "1.40.0-rc.1" @@ -4495,16 +3395,16 @@ source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed dependencies = [ "blake2", "borsh 1.3.0", - "bs58 0.4.0", - "curve25519-dalek 4.1.1", + "bs58", + "curve25519-dalek", "derive_more", - "ed25519-dalek 2.1.0", + "ed25519-dalek", "hex", - "near-account-id 1.0.0-alpha.4", - "near-config-utils 1.40.0-rc.1", - "near-stdx 1.40.0-rc.1", + "near-account-id", + "near-config-utils", + "near-stdx", "once_cell", - "primitive-types 0.10.1", + "primitive-types", "secp256k1", "serde", "serde_json", @@ -4519,9 +3419,9 @@ source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed dependencies = [ "anyhow", "near-async", - "near-chain-configs 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-chain-configs", + "near-o11y", + "near-primitives", "once_cell", "prometheus", "serde", @@ -4539,48 +3439,28 @@ dependencies = [ "borsh 1.3.0", "itertools", "near-cache", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chain-primitives", - "near-crypto 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-crypto", + "near-o11y", + "near-primitives", "near-store", "num-rational", "once_cell", - "primitive-types 0.10.1", - "rand 0.8.5", - "rand_hc 0.3.2", + "primitive-types", + "rand", + "rand_hc", "serde_json", "smart-default", "tracing", ] -[[package]] -name = "near-fmt" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44c842c6cfcd9b8c387cccd4cd0619a5f21920cde5d5c292af3cc5d40510672" -dependencies = [ - "near-primitives-core 0.17.0", -] - [[package]] name = "near-fmt" version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ - "near-primitives-core 1.40.0-rc.1", -] - -[[package]] -name = "near-gas" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e75c875026229902d065e4435804497337b631ec69ba746b102954273e9ad1" -dependencies = [ - "borsh 1.3.0", - "schemars", - "serde", + "near-primitives-core", ] [[package]] @@ -4592,14 +3472,14 @@ dependencies = [ "anyhow", "futures", "lazy_static", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-client", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-dyn-configs", "near-indexer-primitives", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-parameters", - "near-primitives 1.40.0-rc.1", + "near-primitives", "near-store", "nearcore", "node-runtime", @@ -4616,7 +3496,7 @@ name = "near-indexer-primitives" version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ - "near-primitives 1.40.0-rc.1", + "near-primitives", "serde", "serde_json", ] @@ -4629,21 +3509,21 @@ dependencies = [ "actix", "actix-cors", "actix-web", - "bs58 0.4.0", + "bs58", "derive_more", "easy-ext", "futures", "hex", "near-async", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-client", "near-client-primitives", - "near-jsonrpc-client 1.40.0-rc.1", - "near-jsonrpc-primitives 1.40.0-rc.1", + "near-jsonrpc-client", + "near-jsonrpc-primitives", "near-network", - "near-o11y 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", - "near-rpc-error-macro 1.40.0-rc.1", + "near-o11y", + "near-primitives", + "near-rpc-error-macro", "once_cell", "serde", "serde_json", @@ -4653,25 +3533,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "near-jsonrpc-client" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118f44c02ad211db805c1370ad3ff26576af6ff554093c9fece1b835d29d233a" -dependencies = [ - "borsh 0.10.3", - "lazy_static", - "log", - "near-chain-configs 0.17.0", - "near-crypto 0.17.0", - "near-jsonrpc-primitives 0.17.0", - "near-primitives 0.17.0", - "reqwest", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "near-jsonrpc-client" version = "1.40.0-rc.1" @@ -4680,39 +3541,23 @@ dependencies = [ "actix-http", "awc", "futures", - "near-jsonrpc-primitives 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-jsonrpc-primitives", + "near-primitives", "serde", "serde_json", ] -[[package]] -name = "near-jsonrpc-primitives" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b2934b5ab243e25e951c984525ba0aff0e719ed915c988c5195405aa0f6987" -dependencies = [ - "arbitrary", - "near-chain-configs 0.17.0", - "near-crypto 0.17.0", - "near-primitives 0.17.0", - "near-rpc-error-macro 0.17.0", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "near-jsonrpc-primitives" version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ "arbitrary", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-client-primitives", - "near-crypto 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", - "near-rpc-error-macro 1.40.0-rc.1", + "near-crypto", + "near-primitives", + "near-rpc-error-macro", "serde", "serde_json", "thiserror", @@ -4724,9 +3569,9 @@ name = "near-mainnet-res" version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ - "near-account-id 1.0.0-alpha.4", - "near-chain-configs 1.40.0-rc.1", - "near-primitives 1.40.0-rc.1", + "near-account-id", + "near-chain-configs", + "near-primitives", "serde_json", ] @@ -4751,58 +3596,32 @@ dependencies = [ "itertools", "lru 0.7.8", "near-async", - "near-crypto 1.40.0-rc.1", - "near-fmt 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", + "near-crypto", + "near-fmt", + "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", - "near-primitives 1.40.0-rc.1", + "near-primitives", "near-store", "once_cell", - "opentelemetry 0.22.0", + "opentelemetry", "parking_lot 0.12.1", "pin-project", "protobuf 3.3.0", "protobuf-codegen", - "rand 0.8.5", + "rand", "rayon", "serde", - "sha2 0.10.8", + "sha2", "smart-default", - "strum 0.24.1", + "strum", "stun", "thiserror", "time", "tokio", "tokio-stream", - "tokio-util 0.7.10", - "tracing", -] - -[[package]] -name = "near-o11y" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7d35397b02b131c188c72f3885e97daeccab134ec2fc8cc0073a94cf1cfe19" -dependencies = [ - "actix", - "atty", - "clap 4.4.11", - "near-crypto 0.17.0", - "near-primitives-core 0.17.0", - "once_cell", - "opentelemetry 0.17.0", - "opentelemetry-otlp 0.10.0", - "opentelemetry-semantic-conventions 0.9.0", - "prometheus", - "serde", - "strum 0.24.1", - "thiserror", - "tokio", + "tokio-util", "tracing", - "tracing-appender", - "tracing-opentelemetry 0.17.4", - "tracing-subscriber", ] [[package]] @@ -4812,13 +3631,13 @@ source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed dependencies = [ "actix", "base64 0.21.5", - "clap 4.4.11", - "near-crypto 1.40.0-rc.1", - "near-primitives-core 1.40.0-rc.1", + "clap", + "near-crypto", + "near-primitives-core", "once_cell", - "opentelemetry 0.22.0", - "opentelemetry-otlp 0.15.0", - "opentelemetry-semantic-conventions 0.14.0", + "opentelemetry", + "opentelemetry-otlp", + "opentelemetry-semantic-conventions", "opentelemetry_sdk", "prometheus", "serde", @@ -4827,7 +3646,7 @@ dependencies = [ "tokio", "tracing", "tracing-appender", - "tracing-opentelemetry 0.23.0", + "tracing-opentelemetry", "tracing-subscriber", ] @@ -4838,13 +3657,13 @@ source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed dependencies = [ "borsh 1.3.0", "enum-map", - "near-account-id 1.0.0-alpha.4", - "near-primitives-core 1.40.0-rc.1", + "near-account-id", + "near-primitives-core", "num-rational", "serde", "serde_repr", "serde_yaml", - "strum 0.24.1", + "strum", "thiserror", ] @@ -4860,7 +3679,7 @@ dependencies = [ "libc", "once_cell", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tracing", ] @@ -4879,77 +3698,11 @@ version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ "borsh 1.3.0", - "near-crypto 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", - "near-primitives 1.40.0-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 0.14.0", - "num-rational", - "once_cell", - "primitive-types 0.10.1", - "rand 0.7.3", - "reed-solomon-erasure", - "serde", - "serde_json", - "smart-default", - "strum 0.24.1", - "thiserror", -] - -[[package]] -name = "near-primitives" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f7051aaf199adc4d068620fca6d5f70f906a1540d03a8bb3701271f8881835" -dependencies = [ - "arbitrary", - "borsh 0.10.3", - "bytesize", - "cfg-if 1.0.0", - "chrono", - "derive_more", - "easy-ext", - "enum-map", - "hex", - "near-crypto 0.17.0", - "near-fmt 0.17.0", - "near-primitives-core 0.17.0", - "near-rpc-error-macro 0.17.0", - "near-stdx 0.17.0", - "near-vm-errors 0.17.0", - "num-rational", + "near-crypto", + "near-o11y", + "near-primitives", "once_cell", - "primitive-types 0.10.1", - "rand 0.8.5", - "reed-solomon-erasure", - "serde", - "serde_json", - "serde_with", - "serde_yaml", - "smart-default", - "strum 0.24.1", - "thiserror", - "time", - "tracing", + "rand", ] [[package]] @@ -4970,18 +3723,18 @@ dependencies = [ "hex", "itertools", "near-async", - "near-crypto 1.40.0-rc.1", - "near-fmt 1.40.0-rc.1", + "near-crypto", + "near-fmt", "near-parameters", - "near-primitives-core 1.40.0-rc.1", - "near-rpc-error-macro 1.40.0-rc.1", - "near-stdx 1.40.0-rc.1", + "near-primitives-core", + "near-rpc-error-macro", + "near-stdx", "near-vm-runner", "num-rational", "once_cell", - "primitive-types 0.10.1", - "rand 0.8.5", - "rand_chacha 0.3.1", + "primitive-types", + "rand", + "rand_chacha", "reed-solomon-erasure", "serde", "serde_json", @@ -4989,49 +3742,10 @@ dependencies = [ "serde_yaml", "sha3", "smart-default", - "strum 0.24.1", + "strum", "thiserror", "tracing", - "zstd 0.13.1", -] - -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775fec19ef51a341abdbf792a9dda5b4cb89f488f681b2fd689b9321d24db47b" -dependencies = [ - "arbitrary", - "base64 0.21.5", - "borsh 0.10.3", - "bs58 0.4.0", - "derive_more", - "enum-map", - "near-account-id 0.17.0", - "num-rational", - "serde", - "serde_repr", - "serde_with", - "sha2 0.10.8", - "strum 0.24.1", - "thiserror", + "zstd", ] [[package]] @@ -5042,14 +3756,14 @@ dependencies = [ "arbitrary", "base64 0.21.5", "borsh 1.3.0", - "bs58 0.4.0", + "bs58", "derive_more", "enum-map", - "near-account-id 1.0.0-alpha.4", + "near-account-id", "num-rational", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "thiserror", ] @@ -5066,46 +3780,24 @@ dependencies = [ "derive_more", "futures", "hex", - "near-account-id 1.0.0-alpha.4", - "near-chain-configs 1.40.0-rc.1", + "near-account-id", + "near-chain-configs", "near-client", "near-client-primitives", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-network", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-parameters", - "near-primitives 1.40.0-rc.1", + "near-primitives", "node-runtime", "paperclip", "serde", "serde_json", - "strum 0.24.1", + "strum", "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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c1eda300e2e78f4f945ae58117d49e806899f4a51ee2faa09eda5ebc2e6571" -dependencies = [ - "quote", - "serde", - "syn 2.0.47", -] - [[package]] name = "near-rpc-error-core" version = "1.40.0-rc.1" @@ -5116,120 +3808,16 @@ dependencies = [ "syn 2.0.47", ] -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d2dadd765101c77e664029dd6fbec090e696877d4ae903c620d02ceda4969a" -dependencies = [ - "fs2", - "near-rpc-error-core 0.17.0", - "serde", - "syn 2.0.47", -] - [[package]] name = "near-rpc-error-macro" version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ - "near-rpc-error-core 1.40.0-rc.1", - "serde", - "syn 2.0.47", -] - -[[package]] -name = "near-sandbox-utils" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de216bb0152bfb64f59016d9e6a5b1ac56dd85f729e5fde08461571e2182c8f" -dependencies = [ - "anyhow", - "binary-install", - "chrono", - "fs2", - "home", - "tokio", -] - -[[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", + "near-rpc-error-core", "serde", - "serde_json", - "wee_alloc", -] - -[[package]] -name = "near-sdk-contract-tools" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90458c4ad63ff557303de40e90494811fb9b308a3ee7346ac14d01f133d93ef" -dependencies = [ - "near-sdk", - "near-sdk-contract-tools-macros", - "thiserror", -] - -[[package]] -name = "near-sdk-contract-tools-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0647bf0273ce9407b650e7f0cf777b7052325648a4d03c8a8993a6a5c5c17411" -dependencies = [ - "darling", - "heck 0.4.1", - "proc-macro2", - "quote", - "strum 0.25.0", - "strum_macros 0.25.3", "syn 2.0.47", ] -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6540152fba5e96fe5d575b79e8cd244cf2add747bb01362426bdc069bc3a23bc" - [[package]] name = "near-stdx" version = "1.40.0-rc.1" @@ -5254,35 +3842,29 @@ dependencies = [ "itoa", "lru 0.7.8", "near-async", - "near-chain-configs 1.40.0-rc.1", - "near-crypto 1.40.0-rc.1", - "near-fmt 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", + "near-chain-configs", + "near-crypto", + "near-fmt", + "near-o11y", "near-parameters", - "near-primitives 1.40.0-rc.1", - "near-stdx 1.40.0-rc.1", + "near-primitives", + "near-stdx", "near-vm-runner", "num_cpus", "once_cell", - "rand 0.8.5", + "rand", "rayon", "rlimit", "rocksdb", "serde", "serde_json", - "strum 0.24.1", + "strum", "tempfile", "thiserror", "tokio", "tracing", ] -[[package]] -name = "near-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397688591acf8d3ebf2c2485ba32d4b24fc10aad5334e3ad8ec0b7179bfdf06b" - [[package]] name = "near-telemetry" version = "1.40.0-rc.1" @@ -5292,7 +3874,7 @@ dependencies = [ "awc", "futures", "near-async", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-performance-metrics", "near-performance-metrics-macros", "once_cell", @@ -5302,15 +3884,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-token" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b68f3f8a2409f72b43efdbeff8e820b81e70824c49fee8572979d789d1683fb" -dependencies = [ - "serde", -] - [[package]] name = "near-vm-compiler" version = "1.40.0-rc.1" @@ -5344,7 +3917,7 @@ dependencies = [ "near-vm-vm", "rayon", "smallvec", - "strum 0.24.1", + "strum", "tracing", ] @@ -5371,54 +3944,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-errors" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec545d1bede0579e7c15dd2dce9b998dc975c52f2165702ff40bec7ff69728bb" -dependencies = [ - "borsh 0.10.3", - "near-account-id 0.17.0", - "near-rpc-error-macro 0.17.0", - "serde", - "strum 0.24.1", - "thiserror", -] - -[[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 0.14.0", - "ripemd", - "serde", - "sha2 0.10.8", - "sha3", - "zeropool-bn", -] - [[package]] name = "near-vm-runner" version = "1.40.0-rc.1" @@ -5427,15 +3952,15 @@ dependencies = [ "anyhow", "base64 0.21.5", "borsh 1.3.0", - "ed25519-dalek 2.1.0", + "ed25519-dalek", "enum-map", "finite-wasm", "lru 0.12.3", "memoffset 0.8.0", - "near-crypto 1.40.0-rc.1", + "near-crypto", "near-parameters", - "near-primitives-core 1.40.0-rc.1", - "near-stdx 1.40.0-rc.1", + "near-primitives-core", + "near-stdx", "near-vm-compiler", "near-vm-compiler-singlepass", "near-vm-engine", @@ -5451,9 +3976,9 @@ dependencies = [ "rustix 0.38.28", "serde", "serde_repr", - "sha2 0.10.8", + "sha2", "sha3", - "strum 0.24.1", + "strum", "tempfile", "thiserror", "tracing", @@ -5509,47 +4034,10 @@ version = "1.40.0-rc.1" source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed1f0d3ee233c#08941a3c070eca2e6163a4ad1eaed1f0d3ee233c" dependencies = [ "anyhow", - "near-primitives-core 1.40.0-rc.1", + "near-primitives-core", "near-vm-runner", ] -[[package]] -name = "near-workspaces" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a14e772e49ba9644c06dad20f635b6463f74d378fa19822bfc35fef479c72e5" -dependencies = [ - "async-trait", - "base64 0.21.5", - "borsh 0.10.3", - "bs58 0.5.0", - "cargo-near", - "chrono", - "fs2", - "json-patch", - "libc", - "near-account-id 0.17.0", - "near-crypto 0.17.0", - "near-gas", - "near-jsonrpc-client 0.6.0", - "near-jsonrpc-primitives 0.17.0", - "near-primitives 0.17.0", - "near-sandbox-utils", - "near-sdk", - "near-token", - "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "sha2 0.10.8", - "tempfile", - "thiserror", - "tokio", - "tokio-retry", - "tracing", - "url", -] - [[package]] name = "nearcore" version = "1.40.0-rc.1" @@ -5573,23 +4061,23 @@ dependencies = [ "indicatif", "near-async", "near-chain", - "near-chain-configs 1.40.0-rc.1", + "near-chain-configs", "near-chunks", "near-client", "near-client-primitives", - "near-config-utils 1.40.0-rc.1", - "near-crypto 1.40.0-rc.1", + "near-config-utils", + "near-crypto", "near-dyn-configs", "near-epoch-manager", "near-jsonrpc", - "near-jsonrpc-primitives 1.40.0-rc.1", + "near-jsonrpc-primitives", "near-mainnet-res", "near-network", - "near-o11y 1.40.0-rc.1", + "near-o11y", "near-parameters", "near-performance-metrics", "near-pool", - "near-primitives 1.40.0-rc.1", + "near-primitives", "near-rosetta-rpc", "near-store", "near-telemetry", @@ -5597,7 +4085,7 @@ dependencies = [ "node-runtime", "num-rational", "once_cell", - "rand 0.8.5", + "rand", "rayon", "regex", "reqwest", @@ -5607,7 +4095,7 @@ dependencies = [ "serde_ignored", "serde_json", "smart-default", - "strum 0.24.1", + "strum", "tempfile", "thiserror", "tokio", @@ -5615,12 +4103,6 @@ dependencies = [ "xz2", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - [[package]] name = "nix" version = "0.15.0" @@ -5653,12 +4135,12 @@ source = "git+https://github.com/near/nearcore?rev=08941a3c070eca2e6163a4ad1eaed dependencies = [ "borsh 1.3.0", "hex", - "near-chain-configs 1.40.0-rc.1", - "near-crypto 1.40.0-rc.1", - "near-o11y 1.40.0-rc.1", + "near-chain-configs", + "near-crypto", + "near-o11y", "near-parameters", - "near-primitives 1.40.0-rc.1", - "near-primitives-core 1.40.0-rc.1", + "near-primitives", + "near-primitives-core", "near-store", "near-vm-runner", "near-wallet-contract", @@ -5666,11 +4148,11 @@ dependencies = [ "num-rational", "num-traits", "once_cell", - "rand 0.8.5", + "rand", "rayon", "serde", "serde_json", - "sha2 0.10.8", + "sha2", "thiserror", "tracing", ] @@ -5685,19 +4167,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom-supreme" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aadc66631948f6b65da03be4c4cd8bd104d481697ecbb9bbd65719b1ec60bc9f" -dependencies = [ - "brownstone", - "indent_write", - "joinery", - "memchr", - "nom", -] - [[package]] name = "ntapi" version = "0.3.7" @@ -5739,17 +4208,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.45" @@ -5780,7 +4238,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -5789,7 +4246,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -5877,27 +4334,6 @@ 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" @@ -5913,24 +4349,6 @@ 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", - "opentelemetry 0.17.0", - "prost 0.9.0", - "thiserror", - "tokio", - "tonic 0.6.2", - "tonic-build", -] - [[package]] name = "opentelemetry-otlp" version = "0.15.0" @@ -5940,14 +4358,14 @@ dependencies = [ "async-trait", "futures-core", "http", - "opentelemetry 0.22.0", + "opentelemetry", "opentelemetry-proto", - "opentelemetry-semantic-conventions 0.14.0", + "opentelemetry-semantic-conventions", "opentelemetry_sdk", - "prost 0.12.6", + "prost", "thiserror", "tokio", - "tonic 0.11.0", + "tonic", ] [[package]] @@ -5956,19 +4374,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a8fddc9b68f5b80dae9d6f510b88e02396f006ad48cac349411fbecc80caae4" dependencies = [ - "opentelemetry 0.22.0", + "opentelemetry", "opentelemetry_sdk", - "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", + "prost", + "tonic", ] [[package]] @@ -5990,10 +4399,10 @@ dependencies = [ "futures-util", "glob", "once_cell", - "opentelemetry 0.22.0", + "opentelemetry", "ordered-float", "percent-encoding", - "rand 0.8.5", + "rand", "thiserror", "tokio", "tokio-stream", @@ -6018,12 +4427,6 @@ dependencies = [ "hashbrown 0.12.3", ] -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "overload" version = "0.1.1" @@ -6037,9 +4440,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" dependencies = [ "cbc", - "cipher 0.4.4", + "cipher", "des", - "getrandom 0.2.11", + "getrandom", "hmac", "lazy_static", "rc2", @@ -6118,81 +4521,18 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6e25ce2c5362c8d48dc89e0f9ca076d507f7c1eabd04f0d593cdf5addff90c" dependencies = [ - "heck 0.4.1", + "heck", "http", "lazy_static", "mime", "proc-macro-error", "proc-macro2", "quote", - "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.4", - "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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec 0.7.4", - "bitvec 1.0.1", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.9", - "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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" -dependencies = [ - "proc-macro-crate 2.0.1", - "proc-macro2", - "quote", + "strum", + "strum_macros", "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" @@ -6258,46 +4598,12 @@ dependencies = [ "windows-targets 0.48.5", ] -[[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.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[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 = "pdb" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f4d162ecaaa1467de5afbe62d597757b674b51da8bb4e587430c5fdb2af7aa" -dependencies = [ - "fallible-iterator 0.2.0", - "scroll 0.10.2", - "uuid 0.8.2", -] - [[package]] name = "peeking_take_while" version = "0.1.2" @@ -6321,36 +4627,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pest" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.2.6", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.3" @@ -6406,28 +4682,12 @@ dependencies = [ "futures-io", ] -[[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.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "platforms" version = "3.2.0" @@ -6476,12 +4736,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[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" @@ -6504,19 +4758,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ - "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", + "fixed-hash", "uint", ] @@ -6529,16 +4771,6 @@ dependencies = [ "toml", ] -[[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 = "2.0.1" @@ -6546,7 +4778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -6597,36 +4829,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.1", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.8.2", - "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" @@ -6634,40 +4836,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "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", - "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", - "proc-macro2", - "quote", - "syn 1.0.109", + "prost-derive", ] [[package]] @@ -6683,16 +4852,6 @@ dependencies = [ "syn 2.0.47", ] -[[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" @@ -6790,26 +4949,14 @@ 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.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" +dependencies = [ + "proc-macro2", +] [[package]] name = "radium" @@ -6817,19 +4964,6 @@ 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" @@ -6837,18 +4971,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[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", + "rand_chacha", + "rand_core", ] [[package]] @@ -6858,16 +4982,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]] @@ -6876,16 +4991,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", -] - -[[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", + "getrandom", ] [[package]] @@ -6894,16 +5000,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b363d4f6370f88d62bf586c80405657bde0f0e1b8945d47d2ad59b906cb4f54" dependencies = [ - "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", + "rand_core", ] [[package]] @@ -6912,7 +5009,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]] @@ -6941,7 +5038,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -6976,7 +5073,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom", "libredox", "thiserror", ] @@ -7098,7 +5195,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-util 0.7.10", + "tokio-util", "tower-service", "url", "wasm-bindgen", @@ -7108,16 +5205,6 @@ dependencies = [ "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" @@ -7140,7 +5227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7162,7 +5249,7 @@ version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" dependencies = [ - "bitvec 1.0.1", + "bitvec", "bytecheck", "bytes", "hashbrown 0.12.3", @@ -7171,7 +5258,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.6.1", + "uuid", ] [[package]] @@ -7194,16 +5281,6 @@ 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" @@ -7214,36 +5291,6 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "ruint" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint 0.4.4", - "num-traits", - "parity-scale-codec 3.6.9", - "primitive-types 0.12.2", - "proptest", - "rand 0.8.5", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" - [[package]] name = "rust-ini" version = "0.18.0" @@ -7278,7 +5325,7 @@ dependencies = [ "serde", "serde-xml-rs", "serde_derive", - "sha2 0.10.8", + "sha2", "thiserror", "time", "tokio", @@ -7313,15 +5360,6 @@ 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.0" @@ -7419,18 +5457,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[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" version = "0.9.1" @@ -7454,20 +5480,6 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "sandbox" -version = "1.0.0" -dependencies = [ - "alloy-primitives", - "alloy-sol-macro", - "alloy-sol-types", - "k256", - "near-workspaces", - "serde", - "serde_json", - "tokio", -] - [[package]] name = "schannel" version = "0.1.22" @@ -7477,62 +5489,12 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "schemars" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" - -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.47", -] - [[package]] name = "sct" version = "0.7.1" @@ -7549,27 +5511,13 @@ 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 0.8.5", + "rand", "secp256k1-sys", ] @@ -7611,16 +5559,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "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", + "semver-parser", ] [[package]] @@ -7628,9 +5567,6 @@ name = "semver" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] [[package]] name = "semver-parser" @@ -7638,15 +5574,6 @@ 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 = "serde" version = "1.0.196" @@ -7698,17 +5625,6 @@ dependencies = [ "syn 2.0.47", ] -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "serde_ignored" version = "0.1.9" @@ -7794,20 +5710,6 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sffl-agreement-registry" -version = "1.0.0" -dependencies = [ - "alloy-primitives", - "alloy-sol-macro", - "alloy-sol-types", - "getrandom 0.2.11", - "k256", - "near-sdk", - "near-sdk-contract-tools", - "uint", -] - [[package]] name = "sha1" version = "0.10.6" @@ -7819,19 +5721,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" @@ -7853,16 +5742,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sha3-asm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" -dependencies = [ - "cc", - "cfg-if 1.0.0", -] - [[package]] name = "sharded-slab" version = "0.1.7" @@ -7887,21 +5766,11 @@ 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" @@ -7920,12 +5789,6 @@ dependencies = [ "num-traits", ] -[[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" @@ -8014,16 +5877,6 @@ dependencies = [ "lock_api 0.4.11", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "sptr" version = "0.3.2" @@ -8042,20 +5895,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.1", - "phf_shared", - "precomputed-hash", - "serde", -] - [[package]] name = "strsim" version = "0.10.0" @@ -8068,41 +5907,22 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros 0.24.3", + "strum_macros", ] -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" - [[package]] name = "strum_macros" version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", "syn 1.0.109", ] -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.47", -] - [[package]] name = "stun" version = "0.4.4" @@ -8113,7 +5933,7 @@ dependencies = [ "crc", "lazy_static", "md-5", - "rand 0.8.5", + "rand", "ring 0.16.20", "subtle", "thiserror", @@ -8128,48 +5948,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "symbolic-common" -version = "8.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551f902d5642e58039aee6a9021a61037926af96e071816361644983966f540" -dependencies = [ - "debugid 0.7.3", - "memmap2", - "stable_deref_trait", - "uuid 0.8.2", -] - -[[package]] -name = "symbolic-debuginfo" -version = "8.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165dabf9fc1d6bb6819c2c0e27c8dd0e3068d2c53cf186d319788e96517f0d6" -dependencies = [ - "bitvec 1.0.1", - "dmsort", - "elementtree", - "fallible-iterator 0.2.0", - "flate2", - "gimli 0.26.2", - "goblin", - "lazy_static", - "lazycell", - "nom", - "nom-supreme", - "parking_lot 0.12.1", - "pdb", - "regex", - "scroll 0.11.0", - "serde", - "serde_json", - "smallvec", - "symbolic-common", - "thiserror", - "wasmparser 0.83.0", - "zip 0.5.13", -] - [[package]] name = "syn" version = "1.0.109" @@ -8182,26 +5960,14 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1726efe18f42ae774cc644f330953a5e7b3c3003d3edcecf18850fe9d4dd9afb" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "0.6.2" +name = "syn" +version = "2.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bef2e2c735acbc06874eca3a8506f02a3c4700e6e748afc92cc2e4220e8a03" +checksum = "1726efe18f42ae774cc644f330953a5e7b3c3003d3edcecf18850fe9d4dd9afb" dependencies = [ - "paste", "proc-macro2", "quote", - "syn 2.0.47", + "unicode-ident", ] [[package]] @@ -8264,17 +6030,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "target-lexicon" version = "0.10.0" @@ -8312,21 +6067,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "termcolor" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - [[package]] name = "thiserror" version = "1.0.56" @@ -8396,15 +6136,6 @@ 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.6.0" @@ -8507,17 +6238,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "tokio-retry" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" -dependencies = [ - "pin-project", - "rand 0.8.5", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.14" @@ -8529,20 +6249,6 @@ dependencies = [ "tokio", ] -[[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.10" @@ -8572,17 +6278,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.20.2" @@ -8594,37 +6289,6 @@ 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", - "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" @@ -8643,7 +6307,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.12.6", + "prost", "tokio", "tokio-stream", "tower", @@ -8652,18 +6316,6 @@ 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" @@ -8675,10 +6327,10 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -8741,27 +6393,6 @@ 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" @@ -8773,20 +6404,6 @@ 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" @@ -8795,12 +6412,12 @@ checksum = "a9be14ba1bbe4ab79e9229f7f89fab8d120b865859f10527f31c033e599d2284" dependencies = [ "js-sys", "once_cell", - "opentelemetry 0.22.0", + "opentelemetry", "opentelemetry_sdk", "smallvec", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", "tracing-subscriber", "web-time", ] @@ -8820,16 +6437,7 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", -] - -[[package]] -name = "treediff" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" -dependencies = [ - "serde_json", + "tracing-log", ] [[package]] @@ -8844,12 +6452,6 @@ 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" @@ -8862,12 +6464,6 @@ 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" @@ -8898,12 +6494,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - [[package]] name = "unicode-width" version = "0.1.11" @@ -8928,22 +6518,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" -dependencies = [ - "base64 0.21.5", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-webpki", - "url", - "webpki-roots", -] - [[package]] name = "url" version = "2.5.0" @@ -8953,7 +6527,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -8968,12 +6541,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - [[package]] name = "uuid" version = "1.6.1" @@ -9004,15 +6571,6 @@ 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.1.1" @@ -9028,12 +6586,6 @@ dependencies = [ "try-lock", ] -[[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" @@ -9317,12 +6869,6 @@ version = "0.78.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" -[[package]] -name = "wasmparser" -version = "0.83.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" - [[package]] name = "wasmparser" version = "0.99.0" @@ -9417,7 +6963,7 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.28.1", + "gimli", "log", "object", "target-lexicon 0.12.12", @@ -9438,7 +6984,7 @@ dependencies = [ "cranelift-codegen", "cranelift-control", "cranelift-native", - "gimli 0.28.1", + "gimli", "object", "target-lexicon 0.12.12", "wasmtime-environ", @@ -9452,7 +6998,7 @@ checksum = "fb6a445ce2b2810127caee6c1b79b8da4ae57712b05556a674592c18b7500a14" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.28.1", + "gimli", "indexmap 2.2.6", "log", "object", @@ -9475,7 +7021,7 @@ dependencies = [ "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli 0.28.1", + "gimli", "log", "object", "rustc-demangle", @@ -9526,7 +7072,7 @@ dependencies = [ "memfd", "memoffset 0.9.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.38.28", "sptr", "wasm-encoder 0.35.0", @@ -9588,12 +7134,6 @@ 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" @@ -9609,24 +7149,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" @@ -9661,15 +7189,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -9902,12 +7421,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[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" @@ -9917,17 +7430,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xattr" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914566e6413e7fa959cc394fb30e563ba80f3541fbd40816d4c05a0fc3f2a0f1" -dependencies = [ - "libc", - "linux-raw-sys 0.4.12", - "rustix 0.38.28", -] - [[package]] name = "xml-rs" version = "0.8.19" @@ -9980,20 +7482,6 @@ name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -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.47", -] [[package]] name = "zeropool-bn" @@ -10005,68 +7493,17 @@ dependencies = [ "byteorder", "crunchy", "lazy_static", - "rand 0.8.5", + "rand", "rustc-hex", ] -[[package]] -name = "zip" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" -dependencies = [ - "byteorder", - "crc32fast", - "flate2", - "thiserror", -] - -[[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", - "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.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ - "zstd-safe 7.1.0", -] - -[[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]] @@ -10087,3 +7524,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/Cargo.toml b/Cargo.toml index 1b946dd7..388cb0ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,6 @@ resolver = "2" members = [ "indexer", "contracts/evm/test/ffi/bls-utils", - "contracts/near/sffl-agreement-registry", - "contracts/near/sffl-agreement-registry/sandbox-rs" ] [workspace.package] diff --git a/Makefile b/Makefile index b8ff8fcf..9f3d6019 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,9 @@ INDEXER_NEAR_CLI_LOCALNET_KEY_PATH=${HOME}/.near/localnet/validator_key.json CHAINID=31337 DEPLOYMENT_FILES_DIR=contracts/evm/script/output/${CHAINID} ------------------------------: ## +-----------------------------: ## -___CONTRACTS___: ## +___CONTRACTS___: ## deploy-eigenlayer-contracts-to-anvil-and-save-state: ## Deploy eigenlayer ./tests/anvil/deploy-eigenlayer-save-anvil-state.sh @@ -26,7 +26,7 @@ deploy-eigenlayer-contracts-to-anvil-and-save-state: ## Deploy eigenlayer deploy-sffl-contracts-to-anvil-and-save-state: ## Deploy avs ./tests/anvil/deploy-avs-save-anvil-state.sh -deploy-all-to-anvil-and-save-state: deploy-eigenlayer-contracts-to-anvil-and-save-state deploy-sffl-contracts-to-anvil-and-save-state ## deploy eigenlayer, shared avs contracts, and inc-sq contracts +deploy-all-to-anvil-and-save-state: deploy-eigenlayer-contracts-to-anvil-and-save-state deploy-sffl-contracts-to-anvil-and-save-state ## deploy eigenlayer, shared avs contracts, and inc-sq contracts start-anvil-chain-with-el-and-avs-deployed: ## starts anvil from a saved state file (with el and avs contracts deployed) ./tests/anvil/start-anvil-chain-with-el-and-avs-deployed.sh @@ -59,35 +59,32 @@ docker-build-images: docker-build-indexer docker-build-relayer docker-build-aggr docker-start-everything: docker-build-images ## starts aggregator and operator docker containers docker compose up -__CLI__: ## +__CLI__: ## cli-setup-operator: export OPERATOR_BLS_KEY_PASSWORD=$(OPERATOR_BLS_KEY_PASS) cli-setup-operator: export OPERATOR_ECDSA_KEY_PASSWORD=$(OPERATOR_ECDSA_KEY_PASS) -cli-setup-operator: send-fund cli-register-operator-with-eigenlayer cli-deposit-into-mocktoken-strategy cli-register-operator-with-avs ## registers operator with eigenlayer and avs +cli-setup-operator: send-fund cli-register-operator-with-eigenlayer cli-register-operator-with-avs ## registers operator with eigenlayer and avs cli-register-operator-with-eigenlayer: ## registers operator with delegationManager go run cli/main.go --config config-files/operator.anvil.yaml register-operator-with-eigenlayer -cli-deposit-into-mocktoken-strategy: ## - ./scripts/deposit-into-mocktoken-strategy.sh - -cli-register-operator-with-avs: ## +cli-register-operator-with-avs: ## go run cli/main.go --config config-files/operator.anvil.yaml register-operator-with-avs -cli-deregister-operator-with-avs: ## +cli-deregister-operator-with-avs: ## go run cli/main.go --config config-files/operator.anvil.yaml deregister-operator-with-avs -cli-print-operator-status: ## +cli-print-operator-status: ## go run cli/main.go --config config-files/operator.anvil.yaml print-operator-status send-fund: ## sends fund to the first operator saved in tests/keys/ecdsa/* cast send 0xD5A0359da7B310917d7760385516B2426E86ab7f --value 10ether --private-key 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 --rpc-url http://127.0.0.1:8545 ------------------------------: ## +-----------------------------: ## # We pipe all zapper logs through https://github.com/maoueh/zap-pretty so make sure to install it # TODO: piping to zap-pretty only works when zapper environment is set to production, unsure why -____OFFCHAIN_SOFTWARE___: ## -start-aggregator: ## +____OFFCHAIN_SOFTWARE___: ## +start-aggregator: ## go run aggregator/cmd/main.go --config config-files/aggregator.yaml \ --sffl-deployment ${DEPLOYMENT_FILES_DIR}/sffl_avs_deployment_output.json \ --ecdsa-private-key ${AGGREGATOR_ECDSA_PRIV_KEY} \ @@ -95,33 +92,43 @@ start-aggregator: ## start-operator: export OPERATOR_BLS_KEY_PASSWORD=fDUMDLmBROwlzzPXyIcy start-operator: export OPERATOR_ECDSA_KEY_PASSWORD=EnJuncq01CiVk9UbuBYl -start-operator: ## +start-operator: ## go run operator/cmd/main.go --config config-files/operator.anvil.yaml \ 2>&1 | zap-pretty -start-indexer: ## +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-test-relayer: ## go run relayer/cmd/main.go --rpc-url ws://127.0.0.1:8546 --da-account-id da.test.near -run-plugin: ## +run-plugin: ## go run plugin/cmd/main.go --config config-files/operator.anvil.yaml ------------------------------: ## -_____HELPER_____: ## +-----------------------------: ## +_____HELPER_____: ## mocks: ## generates mocks for tests go install go.uber.org/mock/mockgen@v0.3.0 go generate ./... tests-unit: ## runs all unit tests - go test $$(go list ./... | grep -v /integration) -coverprofile=coverage.out -covermode=atomic + go test $$(go list ./... | grep -v /integration) -race -count=1 -coverprofile=coverage.out -covermode=atomic go tool cover -html=coverage.out -o coverage.html tests-contract: ## runs all forge tests - cd contracts/evm && forge test + cd contracts/evm && forge test --ffi +# TODO: Currently we cannot use the race detector with `integration_test.go` tests-integration: ## runs all integration tests go test ./tests/integration/integration_test.go -v -count=1 - go test ./tests/integration/registration_test.go -v -count=1 + go test ./tests/integration/registration_test.go -v -race -count=1 + +## runs slither for solidity files +## You can install Slither by following the guide at https://github.com/crytic/slither/tree/master?tab=readme-ov-file#how-to-install +slither: + cd contracts/evm && slither . +## runs linter on all files +## TODO: For now, only Go files are linted +lint: + golangci-lint run diff --git a/README.md b/README.md index 98ae9a51..e0046fdc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Super Fast Finality Layer - SFFL +# Nuffle Fast Finality Layer - NFFL ## Introduction @@ -8,7 +8,7 @@ However, as the ecosystem continues to evolve towards a rollup-centric roadmap, it confronts new challenges such as state and liquidity fragmentation and extended finality time. -In order to solve this problem, the NEAR Super Fast Finality Layer (SFFL) was +In order to solve this problem, the Nuffle Fast Finality Layer (NFFL, formerly SFFL) was designed. Through it, various chains can, while supplying block data to [NEAR DA](https://github.com/near/rollup-data-availability), rely on the economic security of an [EigenLayer](https://www.eigenlayer.xyz) AVS to provide @@ -19,8 +19,8 @@ This universal, secure and fast finality leads to major advancements in interoperability protocols, enabling or improving designs such as general bridging and chain abstraction. -For more details, refer to the [Documentation](https://near-sffl.nethermind.io). -SFFL is under active development and is not yet available on any publicly +For more details, refer to the [Documentation](https://nffl.nethermind.io/). +NFFL is under active development and is not yet available on any publicly accessible environments. ## Getting Started @@ -141,7 +141,7 @@ docker compose down ## More Details -For more details, refer to the [Documentation](https://near-sffl.nethermind.io). +For more details, refer to the [Documentation](https://nffl.nethermind.io/). The AVS implementation was based on the [Incredible Squaring AVS](https://github.com/Layr-Labs/incredible-squaring-avs) diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 6aa946c5..869d8613 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -4,12 +4,13 @@ import ( "context" "errors" "math/big" + "strings" "sync" "time" - eigenclients "github.com/Layr-Labs/eigensdk-go/chainio/clients" "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" + "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/Layr-Labs/eigensdk-go/metrics" "github.com/Layr-Labs/eigensdk-go/services/avsregistry" @@ -38,6 +39,37 @@ const ( avsName = "super-fast-finality-layer" ) +var ( + // RPC errors + DigestError = errors.New("Failed to get message digest") + TaskResponseDigestError = errors.New("Failed to get task response digest") + GetOperatorSetUpdateBlockError = errors.New("Failed to get operator set update block") + OperatorNotFoundError = errors.New("Operator not found") + InvalidSignatureError = errors.New("Invalid signature") + + // REST errors + StateRootUpdateNotFoundError = errors.New("StateRootUpdate not found") + StateRootAggNotFoundError = errors.New("StateRootUpdate aggregation not found") + OperatorSetNotFoundError = errors.New("OperatorSetUpdate not found") + OperatorAggNotFoundError = errors.New("OperatorSetUpdate aggregation not found") + CheckpointNotFoundError = errors.New("CheckpointMessages not found") +) + +type RpcAggregatorer interface { + ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse) error + ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage) error + ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage) error + GetAggregatedCheckpointMessages(fromTimestamp, toTimestamp uint64) (*messages.CheckpointMessages, error) + GetRegistryCoordinatorAddress(reply *string) error + GetOperatorInfoById(ctx context.Context, operatorId eigentypes.OperatorId) (eigentypes.OperatorInfo, bool) +} + +type RestAggregatorer interface { + GetStateRootUpdateAggregation(rollupId uint32, blockHeight uint64) (*types.GetStateRootUpdateAggregationResponse, error) + GetOperatorSetUpdateAggregation(id uint64) (*types.GetOperatorSetUpdateAggregationResponse, error) + GetCheckpointMessages(fromTimestamp, toTimestamp uint64) (*types.GetCheckpointMessagesResponse, error) +} + // Aggregator sends checkpoint tasks onchain, then listens for operator signed TaskResponses. // It aggregates responses signatures, and if any of the TaskResponses reaches the QuorumThreshold for each quorum // (currently we only use a single quorum of the ERC20Mock token), it sends the aggregated TaskResponse and signature onchain. @@ -86,8 +118,6 @@ type Aggregator struct { // TODO(edwin): once rpc & rest decouple from aggregator fome it with them registry *prometheus.Registry metrics metrics.Metrics - rpcListener RpcEventListener - restListener RestEventListener aggregatorListener AggregatorEventListener operatorRegistrationsService OperatorRegistrationsService @@ -106,45 +136,24 @@ type Aggregator struct { } var _ core.Metricable = (*Aggregator)(nil) +var _ RpcAggregatorer = (*Aggregator)(nil) +var _ RestAggregatorer = (*Aggregator)(nil) // NewAggregator creates a new Aggregator with the provided config. -// TODO: Remove this context once OperatorPubkeysServiceInMemory's API is -// changed and we can gracefully exit otherwise -func NewAggregator(ctx context.Context, config *config.Config, logger logging.Logger) (*Aggregator, error) { - chainioConfig := eigenclients.BuildAllConfig{ - EthHttpUrl: config.EthHttpRpcUrl, - EthWsUrl: config.EthWsRpcUrl, - RegistryCoordinatorAddr: config.SFFLRegistryCoordinatorAddr.String(), - OperatorStateRetrieverAddr: config.OperatorStateRetrieverAddr.String(), - AvsName: avsName, - PromMetricsIpPortAddress: config.MetricsIpPortAddress, - } - clients, err := eigenclients.BuildAll(chainioConfig, config.EcdsaPrivateKey, logger) - if err != nil { - logger.Error("Cannot create sdk clients", "err", err) - return nil, err - } - registry := clients.PrometheusRegistry - - ethHttpClient, err := core.CreateEthClientWithCollector( - AggregatorNamespace, - config.EthHttpRpcUrl, - config.EnableMetrics, - registry, - logger, - ) +func NewAggregator( + // TODO: Remove `ctx` once OperatorsInfoServiceInMemory's API is changed and we can gracefully exit otherwise + ctx context.Context, + config *config.Config, + registry *prometheus.Registry, + logger logging.Logger, +) (*Aggregator, error) { + ethHttpClient, err := core.CreateEthClientWithCollector(AggregatorNamespace, config.EthHttpRpcUrl, config.EnableMetrics, registry, logger) if err != nil { logger.Error("Cannot create http ethclient", "err", err) return nil, err } - ethWsClient, err := core.CreateEthClientWithCollector( - AggregatorNamespace, - config.EthWsRpcUrl, - config.EnableMetrics, - registry, - logger, - ) + ethWsClient, err := core.CreateEthClientWithCollector(AggregatorNamespace, config.EthWsRpcUrl, config.EnableMetrics, registry, logger) if err != nil { logger.Error("Cannot create ws ethclient", "err", err) return nil, err @@ -207,8 +216,8 @@ func NewAggregator(ctx context.Context, config *config.Config, logger logging.Lo avsRegistryService := avsregistry.NewAvsRegistryServiceChainCaller(avsReader, operatorRegistrationsService, logger) taskBlsAggregationService := blsagg.NewBlsAggregatorService(avsRegistryService, logger) - stateRootUpdateBlsAggregationService := NewMessageBlsAggregatorService(avsRegistryService, clients.EthHttpClient, logger) - operatorSetUpdateBlsAggregationService := NewMessageBlsAggregatorService(avsRegistryService, clients.EthHttpClient, logger) + stateRootUpdateBlsAggregationService := NewMessageBlsAggregatorService(avsRegistryService, ethHttpClient, logger) + operatorSetUpdateBlsAggregationService := NewMessageBlsAggregatorService(avsRegistryService, ethHttpClient, logger) agg := &Aggregator{ config: config, @@ -230,16 +239,16 @@ func NewAggregator(ctx context.Context, config *config.Config, logger logging.Lo taskResponses: make(map[coretypes.TaskIndex]map[eigentypes.TaskResponseDigest]messages.CheckpointTaskResponse), stateRootUpdates: make(map[coretypes.MessageDigest]messages.StateRootUpdateMessage), operatorSetUpdates: make(map[coretypes.MessageDigest]messages.OperatorSetUpdateMessage), - restListener: &SelectiveRestListener{}, - rpcListener: &SelectiveRpcListener{}, aggregatorListener: &SelectiveAggregatorListener{}, } if config.EnableMetrics { + eigenMetrics := metrics.NewEigenMetrics(avsName, config.MetricsIpPortAddress, registry, logger) if err = agg.EnableMetrics(registry); err != nil { return nil, err } - agg.metrics = clients.Metrics + + agg.metrics = eigenMetrics agg.registry = registry } @@ -249,18 +258,6 @@ func NewAggregator(ctx context.Context, config *config.Config, logger logging.Lo } func (agg *Aggregator) EnableMetrics(registry *prometheus.Registry) error { - restListener, err := MakeRestServerMetrics(registry) - if err != nil { - return err - } - agg.restListener = restListener - - rpcListener, err := MakeRpcServerMetrics(registry) - if err != nil { - return err - } - agg.rpcListener = rpcListener - aggregatorListener, err := MakeAggregatorMetrics(registry) if err != nil { return err @@ -281,12 +278,6 @@ func (agg *Aggregator) Start(ctx context.Context) error { agg.metrics.Start(ctx, agg.registry) } - agg.logger.Info("Starting aggregator rpc server.") - go agg.startServer() - - agg.logger.Info("Starting aggregator REST API.") - go agg.startRestServer() - ticker := time.NewTicker(agg.checkpointInterval) agg.logger.Info("Aggregator set to send new task", "interval", agg.checkpointInterval.String()) defer ticker.Stop() @@ -330,7 +321,7 @@ func (agg *Aggregator) Close() error { func (agg *Aggregator) sendAggregatedResponseToContract(blsAggServiceResp blsagg.BlsAggregationServiceResponse) { if blsAggServiceResp.Err != nil { agg.aggregatorListener.IncErroredSubmissions() - if errors.Is(blsAggServiceResp.Err, blsagg.TaskExpiredError) { + if strings.Contains(blsAggServiceResp.Err.Error(), "expired") { agg.aggregatorListener.IncExpiredTasks() } @@ -528,3 +519,225 @@ func (agg *Aggregator) handleOperatorSetUpdateReachedQuorum(ctx context.Context, return } } + +func (agg *Aggregator) ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse) error { + err := agg.verifySignature(signedCheckpointTaskResponse) + if err != nil { + return err + } + + taskIndex := signedCheckpointTaskResponse.TaskResponse.ReferenceTaskIndex + taskResponseDigest, err := signedCheckpointTaskResponse.TaskResponse.Digest() + if err != nil { + agg.logger.Error("Failed to get task response digest", "err", err) + return TaskResponseDigestError + } + + err = agg.taskBlsAggregationService.ProcessNewSignature( + context.Background(), taskIndex, taskResponseDigest, + &signedCheckpointTaskResponse.BlsSignature, signedCheckpointTaskResponse.OperatorId, + ) + if err != nil { + return err + } + + agg.taskResponsesLock.Lock() + if _, ok := agg.taskResponses[taskIndex]; !ok { + agg.taskResponses[taskIndex] = make(map[eigentypes.TaskResponseDigest]messages.CheckpointTaskResponse) + } + if _, ok := agg.taskResponses[taskIndex][taskResponseDigest]; !ok { + agg.taskResponses[taskIndex][taskResponseDigest] = signedCheckpointTaskResponse.TaskResponse + } + agg.taskResponsesLock.Unlock() + + return nil +} + +// Rpc request handlers +func (agg *Aggregator) ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage) error { + err := agg.verifySignature(signedStateRootUpdateMessage) + if err != nil { + return err + } + + messageDigest, err := signedStateRootUpdateMessage.Message.Digest() + if err != nil { + agg.logger.Error("Failed to get message digest", "err", err) + return DigestError + } + + err = agg.stateRootUpdateBlsAggregationService.InitializeMessageIfNotExists( + messageDigest, + coretypes.QUORUM_NUMBERS, + []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, + types.MESSAGE_TTL, + types.MESSAGE_BLS_AGGREGATION_TIMEOUT, + 0, + ) + if err != nil { + return err + } + + agg.stateRootUpdatesLock.Lock() + agg.stateRootUpdates[messageDigest] = signedStateRootUpdateMessage.Message + agg.stateRootUpdatesLock.Unlock() + + err = agg.stateRootUpdateBlsAggregationService.ProcessNewSignature( + context.Background(), messageDigest, + &signedStateRootUpdateMessage.BlsSignature, signedStateRootUpdateMessage.OperatorId, + ) + return err +} + +func (agg *Aggregator) ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage) error { + err := agg.verifySignature(signedOperatorSetUpdateMessage) + if err != nil { + return err + } + + messageDigest, err := signedOperatorSetUpdateMessage.Message.Digest() + if err != nil { + agg.logger.Error("Failed to get message digest", "err", err) + return DigestError + } + + blockNumber, err := agg.avsReader.GetOperatorSetUpdateBlock(context.Background(), signedOperatorSetUpdateMessage.Message.Id) + if err != nil { + agg.logger.Error("Failed to get operator set update block", "err", err) + return GetOperatorSetUpdateBlockError + } + + err = agg.operatorSetUpdateBlsAggregationService.InitializeMessageIfNotExists( + messageDigest, + coretypes.QUORUM_NUMBERS, + []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, + types.MESSAGE_TTL, + types.MESSAGE_BLS_AGGREGATION_TIMEOUT, + uint64(blockNumber)-1, + ) + if err != nil { + return err + } + + agg.operatorSetUpdatesLock.Lock() + agg.operatorSetUpdates[messageDigest] = signedOperatorSetUpdateMessage.Message + agg.operatorSetUpdatesLock.Unlock() + + err = agg.operatorSetUpdateBlsAggregationService.ProcessNewSignature( + context.Background(), messageDigest, + &signedOperatorSetUpdateMessage.BlsSignature, signedOperatorSetUpdateMessage.OperatorId, + ) + + return err +} + +func (agg *Aggregator) GetAggregatedCheckpointMessages(fromTimestamp, toTimestamp uint64) (*messages.CheckpointMessages, error) { + checkpointMessages, err := agg.msgDb.FetchCheckpointMessages(fromTimestamp, toTimestamp) + if err != nil { + return nil, err + } + + return checkpointMessages, nil +} + +func (agg *Aggregator) GetRegistryCoordinatorAddress(reply *string) error { + *reply = agg.config.SFFLRegistryCoordinatorAddr.String() + return nil +} + +// Rest requests +func (agg *Aggregator) GetStateRootUpdateAggregation(rollupId uint32, blockHeight uint64) (*types.GetStateRootUpdateAggregationResponse, error) { + message, err := agg.msgDb.FetchStateRootUpdate(uint32(rollupId), blockHeight) + if err != nil { + return nil, StateRootUpdateNotFoundError + } + + aggregation, err := agg.msgDb.FetchStateRootUpdateAggregation(uint32(rollupId), blockHeight) + if err != nil { + return nil, StateRootAggNotFoundError + } + + return &types.GetStateRootUpdateAggregationResponse{ + Message: *message, + Aggregation: *aggregation, + }, nil +} + +func (agg *Aggregator) GetOperatorSetUpdateAggregation(id uint64) (*types.GetOperatorSetUpdateAggregationResponse, error) { + message, err := agg.msgDb.FetchOperatorSetUpdate(id) + if err != nil { + return nil, OperatorSetNotFoundError + } + + aggregation, err := agg.msgDb.FetchOperatorSetUpdateAggregation(id) + if err != nil { + return nil, OperatorAggNotFoundError + } + + return &types.GetOperatorSetUpdateAggregationResponse{ + Message: *message, + Aggregation: *aggregation, + }, nil +} + +func (agg *Aggregator) GetCheckpointMessages(fromTimestamp, toTimestamp uint64) (*types.GetCheckpointMessagesResponse, error) { + checkpointMessages, err := agg.msgDb.FetchCheckpointMessages(fromTimestamp, toTimestamp) + if err != nil { + return nil, CheckpointNotFoundError + } + + return &types.GetCheckpointMessagesResponse{ + CheckpointMessages: *checkpointMessages, + }, nil +} + +func (agg *Aggregator) GetOperatorInfoById(ctx context.Context, operatorId eigentypes.OperatorId) (eigentypes.OperatorInfo, bool) { + operatorInfo, ok := agg.operatorRegistrationsService.GetOperatorInfoById(ctx, operatorId) + return operatorInfo, ok +} + +func (agg *Aggregator) verifySignature(signedMessage interface{}) error { + var operatorId eigentypes.OperatorId + var signature bls.Signature + var digest [32]byte + var err error + + switch signedMessage := signedMessage.(type) { + case *messages.SignedCheckpointTaskResponse: + operatorId = signedMessage.OperatorId + signature = signedMessage.BlsSignature + digest, err = signedMessage.TaskResponse.Digest() + if err != nil { + return TaskResponseDigestError + } + case *messages.SignedStateRootUpdateMessage: + operatorId = signedMessage.OperatorId + signature = signedMessage.BlsSignature + digest, err = signedMessage.Message.Digest() + if err != nil { + return DigestError + } + case *messages.SignedOperatorSetUpdateMessage: + operatorId = signedMessage.OperatorId + signature = signedMessage.BlsSignature + digest, err = signedMessage.Message.Digest() + if err != nil { + return DigestError + } + } + + operatorInfo, ok := agg.GetOperatorInfoById(context.Background(), operatorId) + if !ok { + return OperatorNotFoundError + } + + ok, err = signature.Verify(operatorInfo.Pubkeys.G2Pubkey, digest) + if err != nil { + return InvalidSignatureError + } + if !ok { + return InvalidSignatureError + } + + return nil +} diff --git a/aggregator/aggregator_test.go b/aggregator/aggregator_test.go index 12676b05..45ec3288 100644 --- a/aggregator/aggregator_test.go +++ b/aggregator/aggregator_test.go @@ -180,8 +180,6 @@ func createMockAggregator( rollupBroadcaster: mockRollupBroadcaster, httpClient: mockClient, wsClient: mockClient, - rpcListener: &SelectiveRpcListener{}, - restListener: &SelectiveRestListener{}, aggregatorListener: &SelectiveAggregatorListener{}, } return aggregator, mockAvsReader, mockAvsWriter, mockTaskBlsAggregationService, mockStateRootUpdateBlsAggregationService, mockOperatorSetUpdateBlsAggregationService, mockOperatorRegistrationsService, mockMsgDb, mockRollupBroadcaster, mockClient, nil diff --git a/aggregator/cmd/main.go b/aggregator/cmd/main.go index 265fdff2..a9ad7736 100644 --- a/aggregator/cmd/main.go +++ b/aggregator/cmd/main.go @@ -8,9 +8,12 @@ import ( "os" sdklogging "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/prometheus/client_golang/prometheus" "github.com/urfave/cli" "github.com/NethermindEth/near-sffl/aggregator" + restserver "github.com/NethermindEth/near-sffl/aggregator/rest_server" + rpcserver "github.com/NethermindEth/near-sffl/aggregator/rpc_server" "github.com/NethermindEth/near-sffl/core/config" ) @@ -64,11 +67,31 @@ func aggregatorMain(ctx *cli.Context) error { } bgCtx := context.Background() - agg, err := aggregator.NewAggregator(bgCtx, config, logger) + var optRegistry *prometheus.Registry + if config.EnableMetrics { + optRegistry = prometheus.NewRegistry() + } + agg, err := aggregator.NewAggregator(bgCtx, config, optRegistry, logger) if err != nil { return err } + rpcServer := rpcserver.NewRpcServer(config.AggregatorServerIpPortAddr, agg, logger) + if optRegistry != nil { + if err = rpcServer.EnableMetrics(optRegistry); err != nil { + return err + } + } + go rpcServer.Start() + + restServer := restserver.NewRestServer(config.AggregatorRestServerIpPortAddr, agg, logger) + if optRegistry != nil { + if err = restServer.EnableMetrics(optRegistry); err != nil { + return err + } + } + go restServer.Start() + err = agg.Start(bgCtx) if err != nil { return err diff --git a/aggregator/database/database.go b/aggregator/database/database.go index c05d5da2..4904066e 100644 --- a/aggregator/database/database.go +++ b/aggregator/database/database.go @@ -1,6 +1,7 @@ package database import ( + "context" "errors" "log" "math" @@ -62,11 +63,21 @@ func NewDatabase(dbPath string) (*Database, error) { return nil, err } - db.AutoMigrate( + err = db.AutoMigrate( &models.MessageBlsAggregation{}, &models.StateRootUpdateMessage{}, &models.OperatorSetUpdateMessage{}, ) + if err != nil { + return nil, err + } + + underlyingDb, err := db.DB() + if err != nil { + return nil, err + } + + underlyingDb.SetMaxOpenConns(1) return &Database{ db: db, @@ -255,6 +266,10 @@ func (d *Database) FetchCheckpointMessages(fromTimestamp uint64, toTimestamp uin return nil, errors.New("timestamp does not fit in int64") } + if (toTimestamp < fromTimestamp) { + return nil, errors.New("toTimestamp is less than fromTimestamp") + } + start := time.Now() defer func() { d.listener.OnFetch(time.Since(start)) }() @@ -288,6 +303,10 @@ func (d *Database) FetchCheckpointMessages(fromTimestamp uint64, toTimestamp uin operatorSetUpdateMessageAggregations := make([]messages.MessageBlsAggregation, 0, len(operatorSetUpdates)) for _, stateRootUpdate := range stateRootUpdates { + if stateRootUpdate.Aggregation == nil { + d.db.Logger.Warn(context.Background(), "Aggregation is nil for stateRootUpdate: %v", stateRootUpdate) + continue + } agg := stateRootUpdate.Aggregation stateRootUpdateMessages = append(stateRootUpdateMessages, stateRootUpdate.ToMessage()) @@ -295,6 +314,10 @@ func (d *Database) FetchCheckpointMessages(fromTimestamp uint64, toTimestamp uin } for _, operatorSetUpdate := range operatorSetUpdates { + if operatorSetUpdate.Aggregation == nil { + d.db.Logger.Warn(context.Background(), "Aggregation is nil for operatorSetUpdate: %v", operatorSetUpdate) + continue + } agg := operatorSetUpdate.Aggregation operatorSetUpdateMessages = append(operatorSetUpdateMessages, operatorSetUpdate.ToMessage()) diff --git a/aggregator/database/database_test.go b/aggregator/database/database_test.go index dfb4fdce..bc3336cb 100644 --- a/aggregator/database/database_test.go +++ b/aggregator/database/database_test.go @@ -1,6 +1,7 @@ package database_test import ( + "math" "math/big" "testing" @@ -313,3 +314,59 @@ func TestFetchCheckpointMessages(t *testing.T) { OperatorSetUpdateMessageAggregations: []messages.MessageBlsAggregation{}, }) } + +func TestFetchCheckpointMessages_TimestampTooLarge(t *testing.T) { + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + db, err := database.NewDatabase(":memory:") + assert.Nil(t, err) + + t.Run("fromTimestamp too large", func(t *testing.T) { + _, err := db.FetchCheckpointMessages(uint64(0x8000000000000000), 0) + assert.NotNil(t, err) + }) + + t.Run("toTimestamp too large", func(t *testing.T) { + _, err := db.FetchCheckpointMessages(0, uint64(0x8000000000000000)) + assert.NotNil(t, err) + }) +} + +func TestFetchCheckpointMessages_InvalidRange(t *testing.T) { + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + db, err := database.NewDatabase(":memory:") + assert.Nil(t, err) + + _, err = db.FetchCheckpointMessages(101, 100) + assert.NotNil(t, err) +} + +func TestStoreStateRootUpdate_LargeMsgValues(t *testing.T) { + t.Skip("Currently impossible to store all uint64 values in the DB") + + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + db, err := database.NewDatabase(":memory:") + assert.Nil(t, err) + + msg := messages.StateRootUpdateMessage{ + RollupId: math.MaxUint32, + BlockHeight: math.MaxUint64, // TODO: Cannot be stored, maximum possible value is `math.MaxInt64` + Timestamp: math.MaxUint64, // TODO: Cannot be stored, maximum possible value is `math.MaxInt64` + NearDaTransactionId: [32]byte{0xFF}, + NearDaCommitment: [32]byte{0xFF}, + StateRoot: [32]byte{0xFF}, + } + err = db.StoreStateRootUpdate(msg) + assert.Nil(t, err) + + stored, err := db.FetchStateRootUpdate(math.MaxUint32, math.MaxUint64) + assert.NotNil(t, stored) + assert.Nil(t, err) + + assert.Equal(t, &msg, stored) +} diff --git a/aggregator/gen.go b/aggregator/gen.go index 24bc3fc5..decc384c 100644 --- a/aggregator/gen.go +++ b/aggregator/gen.go @@ -1,5 +1,6 @@ package aggregator +//go:generate mockgen -destination=./mocks/rest_aggregator.go -package=mocks github.com/NethermindEth/near-sffl/aggregator RestAggregatorer //go:generate mockgen -destination=./mocks/message_blsagg.go -package=mocks github.com/NethermindEth/near-sffl/aggregator MessageBlsAggregationService //go:generate mockgen -destination=./mocks/rollup_broadcaster.go -package=mocks github.com/NethermindEth/near-sffl/aggregator RollupBroadcasterer //go:generate mockgen -destination=./mocks/operator_registrations_inmemory.go -package=mocks github.com/NethermindEth/near-sffl/aggregator OperatorRegistrationsService diff --git a/aggregator/message_blsagg.go b/aggregator/message_blsagg.go index cb5537f4..16509d44 100644 --- a/aggregator/message_blsagg.go +++ b/aggregator/message_blsagg.go @@ -25,14 +25,14 @@ import ( var ( MessageAlreadyInitializedErrorFn = func(messageDigest coretypes.MessageDigest) error { - return fmt.Errorf("message %x already initialized", messageDigest) + return fmt.Errorf("message 0x%x already initialized", messageDigest) } MessageExpiredError = fmt.Errorf("message expired") MessageNotFoundErrorFn = func(messageDigest coretypes.MessageDigest) error { - return fmt.Errorf("message %x not initialized or already completed", messageDigest) + return fmt.Errorf("message 0x%x not initialized or already completed", messageDigest) } OperatorNotPartOfMessageQuorumErrorFn = func(operatorId eigentypes.OperatorId, messageDigest coretypes.MessageDigest) error { - return fmt.Errorf("operator %x not part of message %x's quorum", operatorId, messageDigest) + return fmt.Errorf("operator 0x%x not part of message 0x%x's quorum", operatorId, messageDigest) } SignatureVerificationError = func(err error) error { return fmt.Errorf("Failed to verify signature: %w", err) @@ -232,6 +232,7 @@ func (mbas *MessageBlsAggregatorService) handleSignedMessagePreThreshold( return false } case <-messageExpiredTimer.C: + mbas.logger.Debug("Message expired", "messageDigest", messageDigest) mbas.aggregatedResponsesC <- types.MessageBlsAggregationServiceResponse{ MessageBlsAggregation: messages.MessageBlsAggregation{ MessageDigest: messageDigest, @@ -273,6 +274,7 @@ func (mbas *MessageBlsAggregatorService) handleSignedMessageThresholdReached( return } case <-thresholdReachedTimer.C: + mbas.logger.Debug("Message expired", "messageDigest", messageDigest) mbas.aggregatedResponsesC <- mbas.getMessageBlsAggregationResponse(messageDigest, validationInfo, true) return } @@ -347,14 +349,14 @@ func (mbas *MessageBlsAggregatorService) handleSignedMessageDigest(signedMessage if !ok { digestAggregatedOperators = AggregatedOperators{ // we've already verified that the operator is part of the task's quorum, so we don't need checks here - signersApkG2: bls.NewZeroG2Point().Add(validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].Pubkeys.G2Pubkey), + signersApkG2: bls.NewZeroG2Point().Add(validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].OperatorInfo.Pubkeys.G2Pubkey), signersAggSigG1: signedMessageDigest.BlsSignature, signersOperatorIdsSet: map[eigentypes.OperatorId]bool{signedMessageDigest.OperatorId: true}, signersTotalStakePerQuorum: validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].StakePerQuorum, } } else { digestAggregatedOperators.signersAggSigG1.Add(signedMessageDigest.BlsSignature) - digestAggregatedOperators.signersApkG2.Add(validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].Pubkeys.G2Pubkey) + digestAggregatedOperators.signersApkG2.Add(validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].OperatorInfo.Pubkeys.G2Pubkey) digestAggregatedOperators.signersOperatorIdsSet[signedMessageDigest.OperatorId] = true for quorumNum, stake := range validationInfo.operatorsAvsStateDict[signedMessageDigest.OperatorId].StakePerQuorum { if _, ok := digestAggregatedOperators.signersTotalStakePerQuorum[quorumNum]; !ok { @@ -470,12 +472,12 @@ func (mbas *MessageBlsAggregatorService) verifySignature( ) error { _, ok := operatorsAvsStateDict[signedMessageDigest.OperatorId] if !ok { - mbas.logger.Warn("Operator not found. Skipping message", "operator", fmt.Sprintf("%#v", signedMessageDigest.OperatorId)) + mbas.logger.Warn("Operator not found. Skipping message", "operator", signedMessageDigest.OperatorId) return OperatorNotPartOfMessageQuorumErrorFn(signedMessageDigest.OperatorId, signedMessageDigest.MessageDigest) } // 0. verify that the msg actually came from the correct operator - operatorG2Pubkey := operatorsAvsStateDict[signedMessageDigest.OperatorId].Pubkeys.G2Pubkey + operatorG2Pubkey := operatorsAvsStateDict[signedMessageDigest.OperatorId].OperatorInfo.Pubkeys.G2Pubkey if operatorG2Pubkey == nil { mbas.logger.Fatal("Operator G2 pubkey not found") } @@ -527,7 +529,7 @@ func getG1PubkeysOfNonSigners(signersOperatorIdsSet map[eigentypes.OperatorId]bo nonSignersG1Pubkeys := []*bls.G1Point{} for operatorId, operator := range operatorAvsStateDict { if _, operatorSigned := signersOperatorIdsSet[operatorId]; !operatorSigned { - nonSignersG1Pubkeys = append(nonSignersG1Pubkeys, operator.Pubkeys.G1Pubkey) + nonSignersG1Pubkeys = append(nonSignersG1Pubkeys, operator.OperatorInfo.Pubkeys.G1Pubkey) } } return nonSignersG1Pubkeys diff --git a/aggregator/metrics.go b/aggregator/metrics.go index b5a0c50e..0d6c90cb 100644 --- a/aggregator/metrics.go +++ b/aggregator/metrics.go @@ -7,120 +7,9 @@ import ( ) const ( - AggregatorNamespace = "sffl_aggregator" - StateRootUpdateMessageLabel = "state_root_update_message" - OperatorSetUpdateMessageLabel = "operator_set_update_message" - CheckpointTaskResponseLabel = "checkpoint_task_response" + AggregatorNamespace = "sffl_aggregator" ) -type RpcEventListener interface { - IncOperatorInitializations(operatorId [32]byte) - IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool) - IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) - IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool) - IncTotalSignedCheckpointTaskResponse() - IncTotalSignedStateRootUpdateMessage() - IncTotalSignedOperatorSetUpdateMessage() - ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string) -} - -type SelectiveRpcListener struct { - IncOperatorInitializationsCb func(operatorId [32]byte) - IncSignedCheckpointTaskResponseCb func(operatorId [32]byte, errored, notFound bool) - IncSignedStateRootUpdateMessageCb func(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) - IncSignedOperatorSetUpdateMessageCb func(operatorId [32]byte, errored bool) - IncTotalSignedCheckpointTaskResponseCb func() - IncTotalSignedStateRootUpdateMessageCb func() - IncTotalSignedOperatorSetUpdateMessageCb func() - ObserveLastMessageReceivedTimeCb func(operatorId [32]byte, messageType string) -} - -func (l *SelectiveRpcListener) IncOperatorInitializations(operatorId [32]byte) { - if l.IncOperatorInitializationsCb != nil { - l.IncOperatorInitializationsCb(operatorId) - } -} - -func (l *SelectiveRpcListener) IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool) { - if l.IncSignedCheckpointTaskResponseCb != nil { - l.IncSignedCheckpointTaskResponseCb(operatorId, errored, notFound) - } -} - -func (l *SelectiveRpcListener) IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) { - if l.IncSignedStateRootUpdateMessageCb != nil { - l.IncSignedStateRootUpdateMessageCb(operatorId, rollupId, errored, hasNearDa) - } -} - -func (l *SelectiveRpcListener) IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool) { - if l.IncSignedOperatorSetUpdateMessageCb != nil { - l.IncSignedOperatorSetUpdateMessageCb(operatorId, errored) - } -} - -func (l *SelectiveRpcListener) IncTotalSignedCheckpointTaskResponse() { - if l.IncTotalSignedCheckpointTaskResponseCb != nil { - l.IncTotalSignedCheckpointTaskResponseCb() - } -} - -func (l *SelectiveRpcListener) IncTotalSignedStateRootUpdateMessage() { - if l.IncTotalSignedStateRootUpdateMessageCb != nil { - l.IncTotalSignedStateRootUpdateMessageCb() - } -} - -func (l *SelectiveRpcListener) IncTotalSignedOperatorSetUpdateMessage() { - if l.IncTotalSignedOperatorSetUpdateMessageCb != nil { - l.IncTotalSignedOperatorSetUpdateMessageCb() - } -} - -func (l *SelectiveRpcListener) ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string) { - if l.ObserveLastMessageReceivedTimeCb != nil { - l.ObserveLastMessageReceivedTimeCb(operatorId, messageType) - } -} - -type RestEventListener interface { - IncStateRootUpdateRequests() - IncOperatorSetUpdateRequests() - IncCheckpointMessagesRequests() - APIErrors() -} - -type SelectiveRestListener struct { - IncStateRootUpdateRequestsCb func() - IncOperatorSetUpdateRequestsCb func() - IncCheckpointMessagesRequestsCb func() - APIErrorsCb func() -} - -func (l *SelectiveRestListener) IncStateRootUpdateRequests() { - if l.IncStateRootUpdateRequestsCb != nil { - l.IncStateRootUpdateRequestsCb() - } -} - -func (l *SelectiveRestListener) IncOperatorSetUpdateRequests() { - if l.IncOperatorSetUpdateRequestsCb != nil { - l.IncOperatorSetUpdateRequestsCb() - } -} - -func (l *SelectiveRestListener) IncCheckpointMessagesRequests() { - if l.IncCheckpointMessagesRequestsCb != nil { - l.IncCheckpointMessagesRequestsCb() - } -} - -func (l *SelectiveRestListener) APIErrors() { - if l.APIErrorsCb != nil { - l.APIErrorsCb() - } -} - type AggregatorEventListener interface { ObserveLastStateRootUpdateAggregated(rollupId uint32, blockNumber uint64) ObserveLastStateRootUpdateReceived(rollupId uint32, blockNumber uint64) @@ -215,139 +104,6 @@ func (l *SelectiveAggregatorListener) ObserveLastCheckpointTaskReferenceAggregat } } -func MakeRestServerMetrics(registry *prometheus.Registry) (RestEventListener, error) { - stateRootUpdateRequests := prometheus.NewCounter(prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "state_root_update_requests_total", - Help: "Total number of state root update requests received", - }) - if err := registry.Register(stateRootUpdateRequests); err != nil { - return nil, fmt.Errorf("error registering stateRootUpdateRequests counter: %w", err) - } - - operatorSetUpdateRequests := prometheus.NewCounter(prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "operator_set_update_requests_total", - Help: "Total number of operator set update requests received", - }) - if err := registry.Register(operatorSetUpdateRequests); err != nil { - return nil, fmt.Errorf("error registering operatorSetUpdateRequests counter: %w", err) - } - - checkpointMessagesRequests := prometheus.NewCounter(prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "checkpoint_messages_requests_total", - Help: "Total number of checkpoint messages requests received", - }) - if err := registry.Register(checkpointMessagesRequests); err != nil { - return nil, fmt.Errorf("error registering checkpointMessagesRequests counter: %w", err) - } - - apiErrors := prometheus.NewCounter(prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "api_errors_total", - Help: "Total number of API errors", - }) - if err := registry.Register(apiErrors); err != nil { - return nil, fmt.Errorf("error registering apiErrors counter: %w", err) - } - - return &SelectiveRestListener{ - IncStateRootUpdateRequestsCb: func() { - stateRootUpdateRequests.Inc() - }, - IncOperatorSetUpdateRequestsCb: func() { - operatorSetUpdateRequests.Inc() - }, - IncCheckpointMessagesRequestsCb: func() { - checkpointMessagesRequests.Inc() - }, - APIErrorsCb: func() { - apiErrors.Inc() - }, - }, nil -} - -func MakeRpcServerMetrics(registry *prometheus.Registry) (RpcEventListener, error) { - operatorInitializationsTotal := prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "operator_initializations_total", - Help: "Total number of operator initializations", - }, - []string{"operator_id"}, - ) - if err := registry.Register(operatorInitializationsTotal); err != nil { - return nil, fmt.Errorf("error registering operatorInitializationsTotal counter: %w", err) - } - - signedCheckpointTaskResponsesTotal := prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "signed_checkpoint_task_responses_total", - Help: "Total number of signed checkpoint task responses received per operator", - }, - []string{"operator_id", "errored", "not_found"}, - ) - if err := registry.Register(signedCheckpointTaskResponsesTotal); err != nil { - return nil, fmt.Errorf("error registering signedCheckpointTaskResponsesTotal counter: %w", err) - } - - signedStateRootUpdateMessagesTotal := prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "signed_state_root_update_messages_total", - Help: "Total number of signed state root update messages received per operator", - }, - []string{"operator_id", "rollup_id", "errored", "has_near_da"}, - ) - if err := registry.Register(signedStateRootUpdateMessagesTotal); err != nil { - return nil, fmt.Errorf("error registering signedStateRootUpdateMessagesTotal counter: %w", err) - } - - signedOperatorSetUpdateMessagesTotal := prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: AggregatorNamespace, - Name: "signed_operator_set_update_messages_total", - Help: "Total number of signed operator set update messages received per operator", - }, - []string{"operator_id", "errored"}, - ) - if err := registry.Register(signedOperatorSetUpdateMessagesTotal); err != nil { - return nil, fmt.Errorf("error registering signedOperatorSetUpdateMessagesTotal counter: %w", err) - } - - lastMessageReceivedTime := prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Namespace: AggregatorNamespace, - Name: "last_message_received_time", - Help: "Timestamp of the last message received per operator and message type", - }, - []string{"operator_id", "message_type"}, - ) - if err := registry.Register(lastMessageReceivedTime); err != nil { - return nil, fmt.Errorf("error registering lastMessageReceivedTime gauge: %w", err) - } - - return &SelectiveRpcListener{ - IncOperatorInitializationsCb: func(operatorId [32]byte) { - operatorInitializationsTotal.WithLabelValues(fmt.Sprintf("%x", operatorId)).Inc() - }, - IncSignedCheckpointTaskResponseCb: func(operatorId [32]byte, errored, expired bool) { - signedCheckpointTaskResponsesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%t", errored), fmt.Sprintf("%t", expired)).Inc() - }, - IncSignedStateRootUpdateMessageCb: func(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) { - signedStateRootUpdateMessagesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%d", rollupId), fmt.Sprintf("%t", errored), fmt.Sprintf("%t", hasNearDa)).Inc() - }, - IncSignedOperatorSetUpdateMessageCb: func(operatorId [32]byte, errored bool) { - signedOperatorSetUpdateMessagesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%t", errored)).Inc() - }, - ObserveLastMessageReceivedTimeCb: func(operatorId [32]byte, messageType string) { - lastMessageReceivedTime.WithLabelValues(fmt.Sprintf("%x", operatorId), messageType).SetToCurrentTime() - }, - }, nil -} - func MakeAggregatorMetrics(registry *prometheus.Registry) (AggregatorEventListener, error) { lastStateRootUpdateAggregated := prometheus.NewGaugeVec( prometheus.GaugeOpts{ diff --git a/aggregator/mocks/operator_registrations_inmemory.go b/aggregator/mocks/operator_registrations_inmemory.go index ed7642c3..16fddc21 100644 --- a/aggregator/mocks/operator_registrations_inmemory.go +++ b/aggregator/mocks/operator_registrations_inmemory.go @@ -40,32 +40,32 @@ func (m *MockOperatorRegistrationsService) EXPECT() *MockOperatorRegistrationsSe return m.recorder } -// GetOperatorPubkeys mocks base method. -func (m *MockOperatorRegistrationsService) GetOperatorPubkeys(arg0 context.Context, arg1 common.Address) (types.OperatorPubkeys, bool) { +// GetOperatorInfo mocks base method. +func (m *MockOperatorRegistrationsService) GetOperatorInfo(arg0 context.Context, arg1 common.Address) (types.OperatorInfo, bool) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOperatorPubkeys", arg0, arg1) - ret0, _ := ret[0].(types.OperatorPubkeys) + ret := m.ctrl.Call(m, "GetOperatorInfo", arg0, arg1) + ret0, _ := ret[0].(types.OperatorInfo) ret1, _ := ret[1].(bool) return ret0, ret1 } -// GetOperatorPubkeys indicates an expected call of GetOperatorPubkeys. -func (mr *MockOperatorRegistrationsServiceMockRecorder) GetOperatorPubkeys(arg0, arg1 any) *gomock.Call { +// GetOperatorInfo indicates an expected call of GetOperatorInfo. +func (mr *MockOperatorRegistrationsServiceMockRecorder) GetOperatorInfo(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorPubkeys", reflect.TypeOf((*MockOperatorRegistrationsService)(nil).GetOperatorPubkeys), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorInfo", reflect.TypeOf((*MockOperatorRegistrationsService)(nil).GetOperatorInfo), arg0, arg1) } -// GetOperatorPubkeysById mocks base method. -func (m *MockOperatorRegistrationsService) GetOperatorPubkeysById(arg0 context.Context, arg1 types.Bytes32) (types.OperatorPubkeys, bool) { +// GetOperatorInfoById mocks base method. +func (m *MockOperatorRegistrationsService) GetOperatorInfoById(arg0 context.Context, arg1 types.Bytes32) (types.OperatorInfo, bool) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOperatorPubkeysById", arg0, arg1) - ret0, _ := ret[0].(types.OperatorPubkeys) + ret := m.ctrl.Call(m, "GetOperatorInfoById", arg0, arg1) + ret0, _ := ret[0].(types.OperatorInfo) ret1, _ := ret[1].(bool) return ret0, ret1 } -// GetOperatorPubkeysById indicates an expected call of GetOperatorPubkeysById. -func (mr *MockOperatorRegistrationsServiceMockRecorder) GetOperatorPubkeysById(arg0, arg1 any) *gomock.Call { +// GetOperatorInfoById indicates an expected call of GetOperatorInfoById. +func (mr *MockOperatorRegistrationsServiceMockRecorder) GetOperatorInfoById(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorPubkeysById", reflect.TypeOf((*MockOperatorRegistrationsService)(nil).GetOperatorPubkeysById), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorInfoById", reflect.TypeOf((*MockOperatorRegistrationsService)(nil).GetOperatorInfoById), arg0, arg1) } diff --git a/aggregator/mocks/rest_aggregator.go b/aggregator/mocks/rest_aggregator.go new file mode 100644 index 00000000..95c9b132 --- /dev/null +++ b/aggregator/mocks/rest_aggregator.go @@ -0,0 +1,84 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/NethermindEth/near-sffl/aggregator (interfaces: RestAggregatorer) +// +// Generated by this command: +// +// mockgen -destination=./mocks/rest_aggregator.go -package=mocks github.com/NethermindEth/near-sffl/aggregator RestAggregatorer +// +// Package mocks is a generated GoMock package. +package mocks + +import ( + reflect "reflect" + + types "github.com/NethermindEth/near-sffl/aggregator/types" + gomock "go.uber.org/mock/gomock" +) + +// MockRestAggregatorer is a mock of RestAggregatorer interface. +type MockRestAggregatorer struct { + ctrl *gomock.Controller + recorder *MockRestAggregatorerMockRecorder +} + +// MockRestAggregatorerMockRecorder is the mock recorder for MockRestAggregatorer. +type MockRestAggregatorerMockRecorder struct { + mock *MockRestAggregatorer +} + +// NewMockRestAggregatorer creates a new mock instance. +func NewMockRestAggregatorer(ctrl *gomock.Controller) *MockRestAggregatorer { + mock := &MockRestAggregatorer{ctrl: ctrl} + mock.recorder = &MockRestAggregatorerMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRestAggregatorer) EXPECT() *MockRestAggregatorerMockRecorder { + return m.recorder +} + +// GetCheckpointMessages mocks base method. +func (m *MockRestAggregatorer) GetCheckpointMessages(arg0, arg1 uint64) (*types.GetCheckpointMessagesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetCheckpointMessages", arg0, arg1) + ret0, _ := ret[0].(*types.GetCheckpointMessagesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetCheckpointMessages indicates an expected call of GetCheckpointMessages. +func (mr *MockRestAggregatorerMockRecorder) GetCheckpointMessages(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCheckpointMessages", reflect.TypeOf((*MockRestAggregatorer)(nil).GetCheckpointMessages), arg0, arg1) +} + +// GetOperatorSetUpdateAggregation mocks base method. +func (m *MockRestAggregatorer) GetOperatorSetUpdateAggregation(arg0 uint64) (*types.GetOperatorSetUpdateAggregationResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetOperatorSetUpdateAggregation", arg0) + ret0, _ := ret[0].(*types.GetOperatorSetUpdateAggregationResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetOperatorSetUpdateAggregation indicates an expected call of GetOperatorSetUpdateAggregation. +func (mr *MockRestAggregatorerMockRecorder) GetOperatorSetUpdateAggregation(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorSetUpdateAggregation", reflect.TypeOf((*MockRestAggregatorer)(nil).GetOperatorSetUpdateAggregation), arg0) +} + +// GetStateRootUpdateAggregation mocks base method. +func (m *MockRestAggregatorer) GetStateRootUpdateAggregation(arg0 uint32, arg1 uint64) (*types.GetStateRootUpdateAggregationResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStateRootUpdateAggregation", arg0, arg1) + ret0, _ := ret[0].(*types.GetStateRootUpdateAggregationResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStateRootUpdateAggregation indicates an expected call of GetStateRootUpdateAggregation. +func (mr *MockRestAggregatorerMockRecorder) GetStateRootUpdateAggregation(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRootUpdateAggregation", reflect.TypeOf((*MockRestAggregatorer)(nil).GetStateRootUpdateAggregation), arg0, arg1) +} diff --git a/aggregator/operator_registrations_inmemory.go b/aggregator/operator_registrations_inmemory.go index 32fbbe99..f6b687ec 100644 --- a/aggregator/operator_registrations_inmemory.go +++ b/aggregator/operator_registrations_inmemory.go @@ -7,15 +7,15 @@ import ( "github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/Layr-Labs/eigensdk-go/services/operatorpubkeys" + "github.com/Layr-Labs/eigensdk-go/services/operatorsinfo" "github.com/Layr-Labs/eigensdk-go/types" "github.com/ethereum/go-ethereum/common" ) type OperatorRegistrationsService interface { - operatorpubkeys.OperatorPubkeysService + operatorsinfo.OperatorsInfoService - GetOperatorPubkeysById(ctx context.Context, operatorId types.OperatorId) (operatorPubkeys types.OperatorPubkeys, operatorFound bool) + GetOperatorInfoById(ctx context.Context, operatorId types.OperatorId) (operatorInfo types.OperatorInfo, operatorFound bool) } type OperatorRegistrationsServiceInMemory struct { @@ -24,32 +24,30 @@ type OperatorRegistrationsServiceInMemory struct { logger logging.Logger queryByAddrC chan<- queryByAddr queryByIdC chan<- queryById + + idToAddr map[types.OperatorId]common.Address + addrToId map[common.Address]types.OperatorId + pubkeysByAddr map[common.Address]types.OperatorPubkeys + socketsByAddr map[common.Address]types.Socket } type queryByAddr struct { operatorAddr common.Address - // channel through which to receive the response (operator pubkeys) - respC chan<- resp + respC chan<- resp } + type queryById struct { operatorId types.OperatorId - // channel through which to receive the response (operator pubkeys) - respC chan<- resp + respC chan<- resp } type resp struct { - operatorPubkeys types.OperatorPubkeys - // false if operators were not present in the pubkey dict + operatorInfo types.OperatorInfo operatorExists bool } -var _ operatorpubkeys.OperatorPubkeysService = (*OperatorRegistrationsServiceInMemory)(nil) +var _ OperatorRegistrationsService = (*OperatorRegistrationsServiceInMemory)(nil) -// NewOperatorRegistrationsServiceInMemory constructs a OperatorRegistrationsServiceInMemory and starts it in a goroutine. -// It takes a context as argument because the "backfilling" of the database is done inside this constructor, -// so we wait for all past NewPubkeyRegistration events to be queried and the db to be filled before returning the service. -// The constructor is thus following a RAII-like pattern, of initializing the serving during construction. -// Using a separate initialize() function might lead to some users forgetting to call it and the service not behaving properly. func NewOperatorRegistrationsServiceInMemory( ctx context.Context, avsRegistrySubscriber avsregistry.AvsRegistrySubscriber, @@ -65,6 +63,10 @@ func NewOperatorRegistrationsServiceInMemory( logger: logger, queryByAddrC: queryByAddrC, queryByIdC: queryByIdC, + idToAddr: make(map[types.OperatorId]common.Address), + addrToId: make(map[common.Address]types.OperatorId), + pubkeysByAddr: make(map[common.Address]types.OperatorPubkeys), + socketsByAddr: make(map[common.Address]types.Socket), } err := ors.asyncInit(ctx, queryByAddrC, queryByIdC) if err != nil { @@ -74,8 +76,6 @@ func NewOperatorRegistrationsServiceInMemory( return ors, nil } -// asyncInit parks caller & schedules initialization of the inmemory pubkey dict, -// which requires querying the past events of the pubkey registration contract func (ors *OperatorRegistrationsServiceInMemory) asyncInit(ctx context.Context, queryByAddrC chan queryByAddr, queryByIdC chan queryById) error { wg := sync.WaitGroup{} defer wg.Wait() @@ -90,7 +90,7 @@ func (ors *OperatorRegistrationsServiceInMemory) startServiceInGoroutine(ctx con wg.Add(1) go func() { - ors.logger.Debug("Subscribing to new pubkey registration events on blsApkRegistry contract", "service", "OperatorRegistrationsServiceInMemory") + ors.logger.Debug("Subscribing to new pubkey and socket registration events", "service", "OperatorRegistrationsServiceInMemory") newPubkeyRegistrationC, newPubkeyRegistrationSub, err := ors.avsRegistrySubscriber.SubscribeToNewPubkeyRegistrations() if err != nil { ors.logger.Error("Error opening websocket subscription for new pubkey registrations", "err", err, "service", "OperatorRegistrationsServiceInMemory") @@ -99,14 +99,20 @@ func (ors *OperatorRegistrationsServiceInMemory) startServiceInGoroutine(ctx con return } - pubkeyByAddrDict, pubkeyByIdDict, err := ors.queryPastRegisteredOperators(ctx) + newSocketRegistrationC, newSocketRegistrationSub, err := ors.avsRegistrySubscriber.SubscribeToOperatorSocketUpdates() + if err != nil { + ors.logger.Error("Error opening websocket subscription for new socket registrations", "err", err, "service", "OperatorRegistrationsServiceInMemory") + wg.Done() + initErrC <- err + return + } + + err = ors.queryPastRegisteredOperators(ctx) if err != nil { wg.Done() initErrC <- err return } - // The constructor can return after we have backfilled the db by querying the events of operators that have registered with the blsApkRegistry - // before the block at which we started the ws subscription above wg.Done() close(initErrC) @@ -116,90 +122,115 @@ func (ors *OperatorRegistrationsServiceInMemory) startServiceInGoroutine(ctx con ors.logger.Info("OperatorRegistrationsServiceInMemory: Context cancelled, exiting") return - // This shall not really happen unless ctx was canceled & this came first. case err := <-newPubkeyRegistrationSub.Err(): - // Just report newPubkeyRegistrationSub.Unsubscribe() - ors.logger.Error("Error in safe client subscription", "err", err, "service", "OperatorRegistrationsServiceInMemory") + ors.logger.Error("Error in websocket subscription for new pubkey registration events", "err", err, "service", "OperatorRegistrationsServiceInMemory") + + case err := <-newSocketRegistrationSub.Err(): + newSocketRegistrationSub.Unsubscribe() + ors.logger.Error("Error in websocket subscription for new socket registration events", "err", err, "service", "OperatorRegistrationsServiceInMemory") case newPubkeyRegistrationEvent := <-newPubkeyRegistrationC: pubkeys := types.OperatorPubkeys{ G1Pubkey: bls.NewG1Point(newPubkeyRegistrationEvent.PubkeyG1.X, newPubkeyRegistrationEvent.PubkeyG1.Y), G2Pubkey: bls.NewG2Point(newPubkeyRegistrationEvent.PubkeyG2.X, newPubkeyRegistrationEvent.PubkeyG2.Y), } - operatorId := types.OperatorIdFromPubkey(pubkeys.G1Pubkey) + operatorId := types.OperatorIdFromG1Pubkey(pubkeys.G1Pubkey) operatorAddr := newPubkeyRegistrationEvent.Operator - pubkeyByAddrDict[operatorAddr] = pubkeys - pubkeyByIdDict[operatorId] = pubkeys + ors.idToAddr[operatorId] = operatorAddr + ors.addrToId[operatorAddr] = operatorId + ors.pubkeysByAddr[operatorAddr] = pubkeys - ors.logger.Debug("Added operator pubkeys to pubkey dict", + ors.logger.Debug("Added operator info to dict", "service", "OperatorRegistrationsServiceInMemory", "block", newPubkeyRegistrationEvent.Raw.BlockNumber, "operatorAddr", operatorAddr, "operatorId", operatorId, - "G1pubkey", pubkeyByAddrDict[operatorAddr].G1Pubkey, - "G2pubkey", pubkeyByAddrDict[operatorAddr].G2Pubkey, + "G1pubkey", pubkeys.G1Pubkey, + "G2pubkey", pubkeys.G2Pubkey, ) - // Receive a queryByAddr from GetOperatorPubkeys - case operatorPubkeyQuery := <-queryByAddrC: - pubkeys, ok := pubkeyByAddrDict[operatorPubkeyQuery.operatorAddr] - operatorPubkeyQuery.respC <- resp{pubkeys, ok} + case newSocketRegistrationEvent := <-newSocketRegistrationC: + operatorId := types.OperatorId(newSocketRegistrationEvent.OperatorId) + socket := types.Socket(newSocketRegistrationEvent.Socket) + ors.logger.Debug("Received new socket registration event", "service", "OperatorRegistrationsServiceInMemory", "operatorId", operatorId, "socket", socket) - // Receive a queryById from GetOperatorPubkeysById - case operatorPubkeyQuery := <-queryByIdC: - pubkeys, ok := pubkeyByIdDict[operatorPubkeyQuery.operatorId] - operatorPubkeyQuery.respC <- resp{pubkeys, ok} + if addr, exists := ors.idToAddr[operatorId]; exists { + ors.socketsByAddr[addr] = socket + } + + case q := <-queryByAddrC: + pubkeys, pubkeysExist := ors.pubkeysByAddr[q.operatorAddr] + socket, socketExists := ors.socketsByAddr[q.operatorAddr] + + operatorInfo := types.OperatorInfo{ + Pubkeys: pubkeys, + Socket: socket, + } + q.respC <- resp{operatorInfo, pubkeysExist && socketExists} + + case q := <-queryByIdC: + addr, exists := ors.idToAddr[q.operatorId] + pubkeys, pubkeysExist := ors.pubkeysByAddr[addr] + socket, socketExists := ors.socketsByAddr[addr] + + operatorInfo := types.OperatorInfo{ + Pubkeys: pubkeys, + Socket: socket, + } + q.respC <- resp{operatorInfo, exists && pubkeysExist && socketExists} } } }() } -func (ors *OperatorRegistrationsServiceInMemory) queryPastRegisteredOperators(ctx context.Context) (map[common.Address]types.OperatorPubkeys, map[types.OperatorId]types.OperatorPubkeys, error) { - // Querying with nil startBlock and stopBlock will return all events. It doesn't matter if we queryByAddr some events that we will receive again in the websocket, - // since we will just overwrite the pubkey dict with the same values. +func (ors *OperatorRegistrationsServiceInMemory) queryPastRegisteredOperators(ctx context.Context) error { alreadyRegisteredOperatorAddrs, alreadyRegisteredOperatorPubkeys, err := ors.avsRegistryReader.QueryExistingRegisteredOperatorPubKeys(ctx, nil, nil) if err != nil { ors.logger.Error("Error querying existing registered operators", "err", err, "service", "OperatorRegistrationsServiceInMemory") - return nil, nil, err + return err } - ors.logger.Debug("List of queried operator registration events in blsApkRegistry", "alreadyRegisteredOperatorAddr", alreadyRegisteredOperatorAddrs, "service", "OperatorRegistrationsServiceInMemory") + socketById, err := ors.avsRegistryReader.QueryExistingRegisteredOperatorSockets(ctx, nil, nil) + if err != nil { + ors.logger.Error("Error querying existing registered operator sockets", "err", err, "service", "OperatorRegistrationsServiceInMemory") + return err + } - pubkeyByAddrDict := make(map[common.Address]types.OperatorPubkeys) - pubkeyByIdDict := make(map[types.OperatorId]types.OperatorPubkeys) for i, operatorAddr := range alreadyRegisteredOperatorAddrs { operatorPubkeys := alreadyRegisteredOperatorPubkeys[i] - pubkeyByAddrDict[operatorAddr] = operatorPubkeys + operatorId := types.OperatorIdFromG1Pubkey(operatorPubkeys.G1Pubkey) - operatorId := types.OperatorIdFromPubkey(operatorPubkeys.G1Pubkey) - pubkeyByIdDict[operatorId] = operatorPubkeys + ors.idToAddr[operatorId] = operatorAddr + ors.addrToId[operatorAddr] = operatorId + ors.pubkeysByAddr[operatorAddr] = operatorPubkeys + ors.socketsByAddr[operatorAddr] = socketById[operatorId] } - return pubkeyByAddrDict, pubkeyByIdDict, nil + return nil } -func (ors *OperatorRegistrationsServiceInMemory) GetOperatorPubkeys(ctx context.Context, operator common.Address) (types.OperatorPubkeys, bool) { +func (ors *OperatorRegistrationsServiceInMemory) GetOperatorInfo(ctx context.Context, operator common.Address) (types.OperatorInfo, bool) { respC := make(chan resp) ors.queryByAddrC <- queryByAddr{operator, respC} select { case <-ctx.Done(): - return types.OperatorPubkeys{}, false + return types.OperatorInfo{}, false case resp := <-respC: - return resp.operatorPubkeys, resp.operatorExists + return resp.operatorInfo, resp.operatorExists } } -func (ors *OperatorRegistrationsServiceInMemory) GetOperatorPubkeysById(ctx context.Context, operatorId types.OperatorId) (types.OperatorPubkeys, bool) { +func (ors *OperatorRegistrationsServiceInMemory) GetOperatorInfoById(ctx context.Context, operatorId types.OperatorId) (types.OperatorInfo, bool) { respC := make(chan resp) ors.queryByIdC <- queryById{operatorId, respC} select { case <-ctx.Done(): - return types.OperatorPubkeys{}, false + return types.OperatorInfo{}, false case resp := <-respC: - return resp.operatorPubkeys, resp.operatorExists + return resp.operatorInfo, resp.operatorExists } } diff --git a/aggregator/rest_server.go b/aggregator/rest_server.go deleted file mode 100644 index c9f818fc..00000000 --- a/aggregator/rest_server.go +++ /dev/null @@ -1,141 +0,0 @@ -package aggregator - -import ( - "encoding/json" - "net/http" - "strconv" - - "github.com/gorilla/mux" - - aggtypes "github.com/NethermindEth/near-sffl/aggregator/types" -) - -func (agg *Aggregator) startRestServer() error { - router := mux.NewRouter() - router.HandleFunc("/aggregation/state-root-update", wrapRequest(agg.restListener.APIErrors, agg.handleGetStateRootUpdateAggregation)).Methods("GET") - router.HandleFunc("/aggregation/operator-set-update", wrapRequest(agg.restListener.APIErrors, agg.handleGetOperatorSetUpdateAggregation)).Methods("GET") - router.HandleFunc("/checkpoint/messages", wrapRequest(agg.restListener.APIErrors, agg.handleGetCheckpointMessages)).Methods("GET") - - err := http.ListenAndServe(agg.restServerIpPortAddr, router) - if err != nil { - agg.logger.Fatal("ListenAndServe", "err", err) - } - - return nil -} - -func wrapRequest(errorHandler func(), requestCallback func(w http.ResponseWriter, r *http.Request) error) func(w http.ResponseWriter, r *http.Request) { - if errorHandler == nil { - return func(w http.ResponseWriter, r *http.Request) { - _ = requestCallback(w, r) - } - } - - return func(w http.ResponseWriter, r *http.Request) { - err := requestCallback(w, r) - if err != nil { - errorHandler() - } - } -} - -func (agg *Aggregator) handleGetStateRootUpdateAggregation(w http.ResponseWriter, r *http.Request) error { - agg.restListener.IncStateRootUpdateRequests() - - params := r.URL.Query() - rollupId, err := strconv.ParseUint(params.Get("rollupId"), 10, 32) - if err != nil { - http.Error(w, "Invalid rollupId", http.StatusBadRequest) - return err - } - - blockHeight, err := strconv.ParseUint(params.Get("blockHeight"), 10, 64) - if err != nil { - http.Error(w, "Invalid blockHeight", http.StatusBadRequest) - return err - } - - message, err := agg.msgDb.FetchStateRootUpdate(uint32(rollupId), blockHeight) - if err != nil { - http.Error(w, "StateRootUpdate not found", http.StatusNotFound) - return err - } - - aggregation, err := agg.msgDb.FetchStateRootUpdateAggregation(uint32(rollupId), blockHeight) - if err != nil { - http.Error(w, "StateRootUpdate aggregation not found", http.StatusNotFound) - return err - } - - w.WriteHeader(http.StatusOK) - w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(aggtypes.GetStateRootUpdateAggregationResponse{ - Message: *message, - Aggregation: *aggregation, - }) - - return nil -} - -func (agg *Aggregator) handleGetOperatorSetUpdateAggregation(w http.ResponseWriter, r *http.Request) error { - agg.restListener.IncOperatorSetUpdateRequests() - - params := r.URL.Query() - id, err := strconv.ParseUint(params.Get("id"), 10, 64) - if err != nil { - http.Error(w, "Invalid id", http.StatusBadRequest) - return err - } - - message, err := agg.msgDb.FetchOperatorSetUpdate(id) - if err != nil { - http.Error(w, "OperatorSetUpdate not found", http.StatusNotFound) - return err - } - - aggregation, err := agg.msgDb.FetchOperatorSetUpdateAggregation(id) - if err != nil { - http.Error(w, "OperatorSetUpdate aggregation not found", http.StatusNotFound) - return err - } - - w.WriteHeader(http.StatusOK) - w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(aggtypes.GetOperatorSetUpdateAggregationResponse{ - Message: *message, - Aggregation: *aggregation, - }) - - return nil -} - -func (agg *Aggregator) handleGetCheckpointMessages(w http.ResponseWriter, r *http.Request) error { - agg.restListener.IncCheckpointMessagesRequests() - params := r.URL.Query() - - fromTimestamp, err := strconv.ParseUint(params.Get("fromTimestamp"), 10, 64) - if err != nil { - http.Error(w, "Invalid fromTimestamp", http.StatusBadRequest) - return err - } - - toTimestamp, err := strconv.ParseUint(params.Get("toTimestamp"), 10, 64) - if err != nil { - http.Error(w, "Invalid toTimestamp", http.StatusBadRequest) - return err - } - - checkpointMessages, err := agg.msgDb.FetchCheckpointMessages(fromTimestamp, toTimestamp) - if err != nil { - http.Error(w, "CheckpointMessages not found", http.StatusNotFound) - return err - } - - w.WriteHeader(http.StatusOK) - w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(aggtypes.GetCheckpointMessagesResponse{ - CheckpointMessages: *checkpointMessages, - }) - - return nil -} diff --git a/aggregator/rest_server/metrics.go b/aggregator/rest_server/metrics.go new file mode 100644 index 00000000..44497ee4 --- /dev/null +++ b/aggregator/rest_server/metrics.go @@ -0,0 +1,99 @@ +package rest_server + +import ( + "fmt" + + "github.com/NethermindEth/near-sffl/aggregator" + "github.com/prometheus/client_golang/prometheus" +) + +type EventListener interface { + IncStateRootUpdateRequests() + IncOperatorSetUpdateRequests() + IncCheckpointMessagesRequests() + APIErrors() +} + +type SelectiveListener struct { + IncStateRootUpdateRequestsCb func() + IncOperatorSetUpdateRequestsCb func() + IncCheckpointMessagesRequestsCb func() + APIErrorsCb func() +} + +func (l *SelectiveListener) IncStateRootUpdateRequests() { + if l.IncStateRootUpdateRequestsCb != nil { + l.IncStateRootUpdateRequestsCb() + } +} + +func (l *SelectiveListener) IncOperatorSetUpdateRequests() { + if l.IncOperatorSetUpdateRequestsCb != nil { + l.IncOperatorSetUpdateRequestsCb() + } +} + +func (l *SelectiveListener) IncCheckpointMessagesRequests() { + if l.IncCheckpointMessagesRequestsCb != nil { + l.IncCheckpointMessagesRequestsCb() + } +} + +func (l *SelectiveListener) APIErrors() { + if l.APIErrorsCb != nil { + l.APIErrorsCb() + } +} + +func MakeServerMetrics(registry *prometheus.Registry) (EventListener, error) { + stateRootUpdateRequests := prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "state_root_update_requests_total", + Help: "Total number of state root update requests received", + }) + if err := registry.Register(stateRootUpdateRequests); err != nil { + return nil, fmt.Errorf("error registering stateRootUpdateRequests counter: %w", err) + } + + operatorSetUpdateRequests := prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "operator_set_update_requests_total", + Help: "Total number of operator set update requests received", + }) + if err := registry.Register(operatorSetUpdateRequests); err != nil { + return nil, fmt.Errorf("error registering operatorSetUpdateRequests counter: %w", err) + } + + checkpointMessagesRequests := prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "checkpoint_messages_requests_total", + Help: "Total number of checkpoint messages requests received", + }) + if err := registry.Register(checkpointMessagesRequests); err != nil { + return nil, fmt.Errorf("error registering checkpointMessagesRequests counter: %w", err) + } + + apiErrors := prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "api_errors_total", + Help: "Total number of API errors", + }) + if err := registry.Register(apiErrors); err != nil { + return nil, fmt.Errorf("error registering apiErrors counter: %w", err) + } + + return &SelectiveListener{ + IncStateRootUpdateRequestsCb: func() { + stateRootUpdateRequests.Inc() + }, + IncOperatorSetUpdateRequestsCb: func() { + operatorSetUpdateRequests.Inc() + }, + IncCheckpointMessagesRequestsCb: func() { + checkpointMessagesRequests.Inc() + }, + APIErrorsCb: func() { + apiErrors.Inc() + }, + }, nil +} diff --git a/aggregator/rest_server/server.go b/aggregator/rest_server/server.go new file mode 100644 index 00000000..7a2b9d13 --- /dev/null +++ b/aggregator/rest_server/server.go @@ -0,0 +1,167 @@ +package rest_server + +import ( + "encoding/json" + "net/http" + "strconv" + + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/gorilla/mux" + "github.com/prometheus/client_golang/prometheus" + + "github.com/NethermindEth/near-sffl/aggregator" + "github.com/NethermindEth/near-sffl/core" +) + +var ( + errorToCode = map[error]int{ + aggregator.StateRootUpdateNotFoundError: http.StatusNotFound, + aggregator.StateRootAggNotFoundError: http.StatusNotFound, + aggregator.OperatorSetNotFoundError: http.StatusNotFound, + aggregator.OperatorAggNotFoundError: http.StatusNotFound, + } +) + +type RestServer struct { + serverIpPortAddr string + app aggregator.RestAggregatorer + + logger logging.Logger + listener EventListener +} + +var _ core.Metricable = (*RestServer)(nil) + +func NewRestServer(serverIpPortAddr string, app aggregator.RestAggregatorer, logger logging.Logger) *RestServer { + return &RestServer{ + serverIpPortAddr: serverIpPortAddr, + app: app, + logger: logger, + listener: &SelectiveListener{}, + } +} + +func (s *RestServer) EnableMetrics(registry *prometheus.Registry) error { + listener, err := MakeServerMetrics(registry) + if err != nil { + return err + } + + s.listener = listener + return nil +} + +func (s *RestServer) Start() error { + s.logger.Info("Starting aggregator REST API.") + + router := mux.NewRouter() + router.HandleFunc("/aggregation/state-root-update", wrapRequest(s.listener.APIErrors, s.handleGetStateRootUpdateAggregation)).Methods("GET") + router.HandleFunc("/aggregation/operator-set-update", wrapRequest(s.listener.APIErrors, s.handleGetOperatorSetUpdateAggregation)).Methods("GET") + router.HandleFunc("/checkpoint/messages", wrapRequest(s.listener.APIErrors, s.handleGetCheckpointMessages)).Methods("GET") + + err := http.ListenAndServe(s.serverIpPortAddr, router) + if err != nil { + s.logger.Fatal("ListenAndServe", "err", err) + } + + return nil +} + +func wrapRequest(errorHandler func(), requestCallback func(w http.ResponseWriter, r *http.Request) error) func(w http.ResponseWriter, r *http.Request) { + if errorHandler == nil { + return func(w http.ResponseWriter, r *http.Request) { + _ = requestCallback(w, r) + } + } + + return func(w http.ResponseWriter, r *http.Request) { + err := requestCallback(w, r) + if err != nil { + errorHandler() + } + } +} + +func (s *RestServer) handleGetStateRootUpdateAggregation(w http.ResponseWriter, r *http.Request) error { + s.listener.IncStateRootUpdateRequests() + + params := r.URL.Query() + rollupId, err := strconv.ParseUint(params.Get("rollupId"), 10, 32) + if err != nil { + http.Error(w, "Invalid rollupId", http.StatusBadRequest) + return err + } + + blockHeight, err := strconv.ParseUint(params.Get("blockHeight"), 10, 64) + if err != nil { + http.Error(w, "Invalid blockHeight", http.StatusBadRequest) + return err + } + + response, err := s.app.GetStateRootUpdateAggregation(uint32(rollupId), blockHeight) + if err != nil { + http.Error(w, err.Error(), mapErrorToCode(err)) + return err + } + + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json") + return json.NewEncoder(w).Encode(*response) +} + +func (s *RestServer) handleGetOperatorSetUpdateAggregation(w http.ResponseWriter, r *http.Request) error { + s.listener.IncOperatorSetUpdateRequests() + + params := r.URL.Query() + id, err := strconv.ParseUint(params.Get("id"), 10, 64) + if err != nil { + http.Error(w, "Invalid id", http.StatusBadRequest) + return err + } + + response, err := s.app.GetOperatorSetUpdateAggregation(id) + if err != nil { + http.Error(w, err.Error(), mapErrorToCode(err)) + return err + } + + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json") + return json.NewEncoder(w).Encode(*response) +} + +func (s *RestServer) handleGetCheckpointMessages(w http.ResponseWriter, r *http.Request) error { + s.listener.IncCheckpointMessagesRequests() + params := r.URL.Query() + + fromTimestamp, err := strconv.ParseUint(params.Get("fromTimestamp"), 10, 64) + if err != nil { + http.Error(w, "Invalid fromTimestamp", http.StatusBadRequest) + return err + } + + toTimestamp, err := strconv.ParseUint(params.Get("toTimestamp"), 10, 64) + if err != nil { + http.Error(w, "Invalid toTimestamp", http.StatusBadRequest) + return err + } + + response, err := s.app.GetCheckpointMessages(fromTimestamp, toTimestamp) + if err != nil { + http.Error(w, err.Error(), mapErrorToCode(err)) + return err + } + + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json") + return json.NewEncoder(w).Encode(*response) +} + +func mapErrorToCode(err error) int { + status, ok := errorToCode[err] + if !ok { + return http.StatusInternalServerError + } + + return status +} diff --git a/aggregator/rest_server/server_test.go b/aggregator/rest_server/server_test.go new file mode 100644 index 00000000..a512b84a --- /dev/null +++ b/aggregator/rest_server/server_test.go @@ -0,0 +1,161 @@ +package rest_server + +import ( + "encoding/json" + "fmt" + sdklogging "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/NethermindEth/near-sffl/aggregator/mocks" + "github.com/NethermindEth/near-sffl/core/types/messages" + "github.com/NethermindEth/near-sffl/tests" + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" + "go.uber.org/mock/gomock" + + aggtypes "github.com/NethermindEth/near-sffl/aggregator/types" +) + +func TestGetStateRootUpdateAggregation(t *testing.T) { + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + logger := sdklogging.NewNoopLogger() + aggregator := mocks.NewMockRestAggregatorer(mockCtrl) + restServer := NewRestServer("", aggregator, logger) + + msg := messages.StateRootUpdateMessage{ + RollupId: 1, + BlockHeight: 2, + Timestamp: 3, + NearDaCommitment: tests.Keccak256(4), + NearDaTransactionId: tests.Keccak256(5), + StateRoot: tests.Keccak256(6), + } + msgDigest, err := msg.Digest() + assert.Nil(t, err) + + response := aggtypes.GetStateRootUpdateAggregationResponse{ + Message: msg, + Aggregation: messages.MessageBlsAggregation{ + MessageDigest: msgDigest, + }, + } + aggregator.EXPECT().GetStateRootUpdateAggregation(msg.RollupId, msg.BlockHeight).Return(&response, nil) + + req, err := http.NewRequest( + "GET", + fmt.Sprintf("/aggregation/state-root-update?rollupId=%d&blockHeight=%d", msg.RollupId, msg.BlockHeight), + nil, + ) + assert.Nil(t, err) + + recorder := httptest.NewRecorder() + err = restServer.handleGetStateRootUpdateAggregation(recorder, req) + assert.Nil(t, err) + assert.Equal(t, recorder.Code, http.StatusOK) + + var body aggtypes.GetStateRootUpdateAggregationResponse + err = json.Unmarshal(recorder.Body.Bytes(), &body) + assert.Nil(t, err) + assert.Equal(t, body, response) +} + +func TestGetOperatorSetUpdateAggregation(t *testing.T) { + mockCtrl := gomock.NewController(t) + + logger := sdklogging.NewNoopLogger() + aggregator := mocks.NewMockRestAggregatorer(mockCtrl) + restServer := NewRestServer("", aggregator, logger) + + msg := messages.OperatorSetUpdateMessage{ + Id: 1, + Timestamp: 2, + } + digest, err := msg.Digest() + assert.Nil(t, err) + + response := aggtypes.GetOperatorSetUpdateAggregationResponse{ + Message: msg, + Aggregation: messages.MessageBlsAggregation{ + MessageDigest: digest, + }, + } + + aggregator.EXPECT().GetOperatorSetUpdateAggregation(msg.Id).Return(&response, nil) + + req, err := http.NewRequest( + "GET", + fmt.Sprintf("/aggregation/operator-set-update?id=%d", msg.Id), + nil, + ) + assert.Nil(t, err) + + recorder := httptest.NewRecorder() + err = restServer.handleGetOperatorSetUpdateAggregation(recorder, req) + assert.Nil(t, err) + assert.Equal(t, recorder.Code, http.StatusOK) + + var actual aggtypes.GetOperatorSetUpdateAggregationResponse + err = json.Unmarshal(recorder.Body.Bytes(), &actual) + assert.Nil(t, err) + assert.Equal(t, response, actual) +} + +func TestGetCheckpointMessages(t *testing.T) { + mockCtrl := gomock.NewController(t) + + logger := sdklogging.NewNoopLogger() + aggregator := mocks.NewMockRestAggregatorer(mockCtrl) + restServer := NewRestServer("", aggregator, logger) + + stateRootMessage := messages.StateRootUpdateMessage{ + RollupId: 1, + BlockHeight: 2, + Timestamp: 3, + } + stateRootDigest, err := stateRootMessage.Digest() + assert.Nil(t, err) + stateRootAggregation := messages.MessageBlsAggregation{ + MessageDigest: stateRootDigest, + } + + operatorSetMesssage := messages.OperatorSetUpdateMessage{ + Id: 1, + Timestamp: 2, + } + operatorSetDigest, err := operatorSetMesssage.Digest() + assert.Nil(t, err) + operatorSetAggregation := messages.MessageBlsAggregation{ + MessageDigest: operatorSetDigest, + } + + var fromTimestamp, toTimestamp uint64 = 0, 3 + response := aggtypes.GetCheckpointMessagesResponse{ + CheckpointMessages: messages.CheckpointMessages{ + StateRootUpdateMessages: []messages.StateRootUpdateMessage{stateRootMessage}, + StateRootUpdateMessageAggregations: []messages.MessageBlsAggregation{stateRootAggregation}, + OperatorSetUpdateMessages: []messages.OperatorSetUpdateMessage{operatorSetMesssage}, + OperatorSetUpdateMessageAggregations: []messages.MessageBlsAggregation{operatorSetAggregation}, + }, + } + aggregator.EXPECT().GetCheckpointMessages(fromTimestamp, toTimestamp).Return(&response, nil) + + req, err := http.NewRequest( + "GET", + fmt.Sprintf("/checkpoint/messages?fromTimestamp=%d&toTimestamp=%d", fromTimestamp, toTimestamp), + nil, + ) + assert.Nil(t, err) + + recorder := httptest.NewRecorder() + err = restServer.handleGetCheckpointMessages(recorder, req) + assert.Nil(t, err) + assert.Equal(t, recorder.Code, http.StatusOK) + + var actual aggtypes.GetCheckpointMessagesResponse + err = json.Unmarshal(recorder.Body.Bytes(), &actual) + assert.Nil(t, err) + assert.Equal(t, response, actual) +} diff --git a/aggregator/rest_server_test.go b/aggregator/rest_server_test.go deleted file mode 100644 index ebc95d39..00000000 --- a/aggregator/rest_server_test.go +++ /dev/null @@ -1,199 +0,0 @@ -package aggregator - -import ( - "encoding/json" - "fmt" - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/assert" - "go.uber.org/mock/gomock" - - aggtypes "github.com/NethermindEth/near-sffl/aggregator/types" - "github.com/NethermindEth/near-sffl/core/types/messages" -) - -func TestGetStateRootUpdateAggregation(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - aggregator, _, _, _, _, _, _, mockDb, _, _, err := createMockAggregator(mockCtrl, MOCK_OPERATOR_PUBKEY_DICT) - assert.Nil(t, err) - - go aggregator.startRestServer() - - msg := messages.StateRootUpdateMessage{ - RollupId: 1, - BlockHeight: 2, - Timestamp: 3, - NearDaCommitment: keccak256(4), - NearDaTransactionId: keccak256(5), - StateRoot: keccak256(6), - } - msgDigest, err := msg.Digest() - assert.Nil(t, err) - - aggregation := aggtypes.MessageBlsAggregationServiceResponse{ - MessageBlsAggregation: messages.MessageBlsAggregation{ - MessageDigest: msgDigest, - }, - } - - mockDb.EXPECT().FetchStateRootUpdate(msg.RollupId, msg.BlockHeight).Return(&msg, nil) - - mockDb.EXPECT().FetchStateRootUpdateAggregation(msg.RollupId, msg.BlockHeight).Return(&aggregation.MessageBlsAggregation, nil) - - req, err := http.NewRequest( - "GET", - fmt.Sprintf("/aggregation/state-root-update?rollupId=%d&blockHeight=%d", msg.RollupId, msg.BlockHeight), - nil, - ) - assert.Nil(t, err) - - recorder := httptest.NewRecorder() - - aggregator.handleGetStateRootUpdateAggregation(recorder, req) - - expectedBody := aggtypes.GetStateRootUpdateAggregationResponse{ - Message: msg, - Aggregation: aggregation.MessageBlsAggregation, - } - var body aggtypes.GetStateRootUpdateAggregationResponse - - assert.Equal(t, recorder.Code, http.StatusOK) - - if recorder.Code != http.StatusOK { - fmt.Printf("HTTP Error: %s", recorder.Body.Bytes()) - } - - err = json.Unmarshal(recorder.Body.Bytes(), &body) - assert.Nil(t, err) - - assert.Equal(t, body, expectedBody) -} - -func TestGetOperatorSetUpdateAggregation(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - aggregator, _, _, _, _, _, _, mockDb, _, _, err := createMockAggregator(mockCtrl, MOCK_OPERATOR_PUBKEY_DICT) - assert.Nil(t, err) - - go aggregator.startRestServer() - - msg := messages.OperatorSetUpdateMessage{ - Id: 1, - Timestamp: 2, - } - msgDigest, err := msg.Digest() - assert.Nil(t, err) - - aggregation := messages.MessageBlsAggregation{ - MessageDigest: msgDigest, - } - - mockDb.EXPECT().FetchOperatorSetUpdate(msg.Id).Return(&msg, nil) - - mockDb.EXPECT().FetchOperatorSetUpdateAggregation(msg.Id).Return(&aggregation, nil) - - req, err := http.NewRequest( - "GET", - fmt.Sprintf("/aggregation/operator-set-update?id=%d", msg.Id), - nil, - ) - assert.Nil(t, err) - - recorder := httptest.NewRecorder() - - aggregator.handleGetOperatorSetUpdateAggregation(recorder, req) - - expectedBody := aggtypes.GetOperatorSetUpdateAggregationResponse{ - Message: msg, - Aggregation: aggregation, - } - var body aggtypes.GetOperatorSetUpdateAggregationResponse - - assert.Equal(t, recorder.Code, http.StatusOK) - - if recorder.Code != http.StatusOK { - fmt.Printf("HTTP Error: %s", recorder.Body.Bytes()) - } - - err = json.Unmarshal(recorder.Body.Bytes(), &body) - assert.Nil(t, err) - - assert.Equal(t, body, expectedBody) -} - -func TestGetCheckpointMessages(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - aggregator, _, _, _, _, _, _, mockDb, _, _, err := createMockAggregator(mockCtrl, MOCK_OPERATOR_PUBKEY_DICT) - assert.Nil(t, err) - - go aggregator.startRestServer() - - msg := messages.StateRootUpdateMessage{ - RollupId: 1, - BlockHeight: 2, - Timestamp: 3, - } - msgDigest, err := msg.Digest() - assert.Nil(t, err) - - aggregation := messages.MessageBlsAggregation{ - MessageDigest: msgDigest, - } - - msg2 := messages.OperatorSetUpdateMessage{ - Id: 1, - Timestamp: 2, - } - msgDigest2, err := msg2.Digest() - assert.Nil(t, err) - - aggregation2 := messages.MessageBlsAggregation{ - MessageDigest: msgDigest2, - } - - mockDb.EXPECT().FetchCheckpointMessages(uint64(0), uint64(3)).Return(&messages.CheckpointMessages{ - StateRootUpdateMessages: []messages.StateRootUpdateMessage{msg}, - StateRootUpdateMessageAggregations: []messages.MessageBlsAggregation{aggregation}, - OperatorSetUpdateMessages: []messages.OperatorSetUpdateMessage{msg2}, - OperatorSetUpdateMessageAggregations: []messages.MessageBlsAggregation{aggregation2}, - }, nil) - - req, err := http.NewRequest( - "GET", - fmt.Sprintf("/checkpoint/messages?fromTimestamp=%d&toTimestamp=%d", 0, 3), - nil, - ) - assert.Nil(t, err) - - recorder := httptest.NewRecorder() - - aggregator.handleGetCheckpointMessages(recorder, req) - - expectedBody := aggtypes.GetCheckpointMessagesResponse{ - CheckpointMessages: messages.CheckpointMessages{ - StateRootUpdateMessages: []messages.StateRootUpdateMessage{msg}, - StateRootUpdateMessageAggregations: []messages.MessageBlsAggregation{aggregation}, - OperatorSetUpdateMessages: []messages.OperatorSetUpdateMessage{msg2}, - OperatorSetUpdateMessageAggregations: []messages.MessageBlsAggregation{aggregation2}, - }, - } - var body aggtypes.GetCheckpointMessagesResponse - - assert.Equal(t, recorder.Code, http.StatusOK) - - if recorder.Code != http.StatusOK { - fmt.Printf("HTTP Error: %s", recorder.Body.Bytes()) - } - - err = json.Unmarshal(recorder.Body.Bytes(), &body) - assert.Nil(t, err) - - assert.Equal(t, body, expectedBody) -} diff --git a/aggregator/rpc_server.go b/aggregator/rpc_server.go deleted file mode 100644 index ed9f905b..00000000 --- a/aggregator/rpc_server.go +++ /dev/null @@ -1,255 +0,0 @@ -package aggregator - -import ( - "context" - "errors" - "fmt" - "net/http" - "net/rpc" - "strings" - - "github.com/Layr-Labs/eigensdk-go/crypto/bls" - eigentypes "github.com/Layr-Labs/eigensdk-go/types" - - "github.com/NethermindEth/near-sffl/aggregator/types" - coretypes "github.com/NethermindEth/near-sffl/core/types" - "github.com/NethermindEth/near-sffl/core/types/messages" -) - -var ( - TaskNotFoundError400 = errors.New("400. Task not found") - OperatorNotPartOfTaskQuorum400 = errors.New("400. Operator not part of quorum") - TaskResponseDigestNotFoundError500 = errors.New("500. Failed to get task response digest") - MessageDigestNotFoundError500 = errors.New("500. Failed to get message digest") - OperatorSetUpdateBlockNotFoundError500 = errors.New("500. Failed to get operator set update block") - UnknownErrorWhileVerifyingSignature400 = errors.New("400. Failed to verify signature") - SignatureVerificationFailed400 = errors.New("400. Signature verification failed") - CallToGetCheckSignaturesIndicesFailed500 = errors.New("500. Failed to get check signatures indices") -) - -func (agg *Aggregator) startServer() error { - err := rpc.Register(agg) - if err != nil { - agg.logger.Fatal("Format of service TaskManager isn't correct. ", "err", err) - } - rpc.HandleHTTP() - err = http.ListenAndServe(agg.serverIpPortAddr, nil) - if err != nil { - agg.logger.Fatal("ListenAndServe", "err", err) - } - - return nil -} - -func (agg *Aggregator) verifyOperatorIdRegistered(operatorId eigentypes.OperatorId, messageDigest [32]byte, signature bls.Signature) (bool, error) { - operatorPubkeys, ok := agg.operatorRegistrationsService.GetOperatorPubkeysById(context.Background(), operatorId) - if !ok { - return false, OperatorNotPartOfTaskQuorum400 - } - - ok, err := signature.Verify(operatorPubkeys.G2Pubkey, messageDigest) - if err != nil { - return false, UnknownErrorWhileVerifyingSignature400 - } - - return ok, nil -} - -// rpc endpoint which is called by operator -// reply doesn't need to be checked. If there are no errors, the task response is accepted -// rpc framework forces a reply type to exist, so we put bool as a placeholder -func (agg *Aggregator) ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse, reply *bool) error { - agg.logger.Info("Received signed task response", "response", fmt.Sprintf("%#v", signedCheckpointTaskResponse)) - taskResponseDigest, err := signedCheckpointTaskResponse.TaskResponse.Digest() - if err != nil { - agg.logger.Error("Failed to get task response digest", "err", err) - return TaskResponseDigestNotFoundError500 - } - - operatorId := signedCheckpointTaskResponse.OperatorId - signature := signedCheckpointTaskResponse.BlsSignature - ok, err := agg.verifyOperatorIdRegistered(operatorId, taskResponseDigest, signature) - if err != nil { - agg.logger.Error("Failed to verify message", "err", err) - return err - } - if !ok { - agg.logger.Info("Invalid operator signature", "err", err) - return SignatureVerificationFailed400 - } - - agg.rpcListener.IncTotalSignedCheckpointTaskResponse() - agg.rpcListener.ObserveLastMessageReceivedTime(signedCheckpointTaskResponse.OperatorId, CheckpointTaskResponseLabel) - - taskIndex := signedCheckpointTaskResponse.TaskResponse.ReferenceTaskIndex - err = agg.taskBlsAggregationService.ProcessNewSignature( - context.Background(), taskIndex, taskResponseDigest, - &signature, signedCheckpointTaskResponse.OperatorId, - ) - if err != nil { - agg.rpcListener.IncSignedCheckpointTaskResponse( - signedCheckpointTaskResponse.OperatorId, - true, - strings.Contains(err.Error(), "not initialized"), - ) - return err - } - - agg.taskResponsesLock.Lock() - if _, ok := agg.taskResponses[taskIndex]; !ok { - agg.taskResponses[taskIndex] = make(map[eigentypes.TaskResponseDigest]messages.CheckpointTaskResponse) - } - if _, ok := agg.taskResponses[taskIndex][taskResponseDigest]; !ok { - agg.taskResponses[taskIndex][taskResponseDigest] = signedCheckpointTaskResponse.TaskResponse - } - agg.taskResponsesLock.Unlock() - - agg.rpcListener.IncSignedCheckpointTaskResponse(operatorId, false, false) - - return nil -} - -func (agg *Aggregator) ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage, reply *bool) error { - messageDigest, err := signedStateRootUpdateMessage.Message.Digest() - if err != nil { - agg.logger.Error("Failed to get message digest", "err", err) - return TaskResponseDigestNotFoundError500 - } - - operatorId := signedStateRootUpdateMessage.OperatorId - signature := signedStateRootUpdateMessage.BlsSignature - ok, err := agg.verifyOperatorIdRegistered(operatorId, messageDigest, signature) - if err != nil { - agg.logger.Error("Failed to verify message", "err", err) - return err - } - if !ok { - agg.logger.Info("Invalid operator signature", "err", err) - return SignatureVerificationFailed400 - } - - agg.logger.Info("Received signed state root update message", "updateMessage", fmt.Sprintf("%#v", signedStateRootUpdateMessage) , "messageDigest", fmt.Sprintf("%#v", messageDigest)) - - agg.rpcListener.IncTotalSignedCheckpointTaskResponse() - agg.rpcListener.ObserveLastMessageReceivedTime(operatorId, StateRootUpdateMessageLabel) - - rollupId := signedStateRootUpdateMessage.Message.RollupId - hasNearDaCommitment := signedStateRootUpdateMessage.Message.HasNearDaCommitment() - err = agg.stateRootUpdateBlsAggregationService.InitializeMessageIfNotExists( - messageDigest, - coretypes.QUORUM_NUMBERS, - []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, - types.MESSAGE_TTL, - types.MESSAGE_BLS_AGGREGATION_TIMEOUT, - 0, - ) - if err != nil { - agg.rpcListener.IncSignedStateRootUpdateMessage(operatorId, rollupId, true, hasNearDaCommitment) - return err - } - - agg.stateRootUpdatesLock.Lock() - agg.stateRootUpdates[messageDigest] = signedStateRootUpdateMessage.Message - agg.stateRootUpdatesLock.Unlock() - - err = agg.stateRootUpdateBlsAggregationService.ProcessNewSignature( - context.Background(), messageDigest, - &signature, signedStateRootUpdateMessage.OperatorId, - ) - if err != nil { - agg.rpcListener.IncSignedStateRootUpdateMessage(operatorId, rollupId, true, hasNearDaCommitment) - return err - } - - agg.rpcListener.IncSignedStateRootUpdateMessage(operatorId, rollupId, false, hasNearDaCommitment) - - return nil -} - -func (agg *Aggregator) ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage, reply *bool) error { - messageDigest, err := signedOperatorSetUpdateMessage.Message.Digest() - if err != nil { - agg.logger.Error("Failed to get message digest", "err", err) - return TaskResponseDigestNotFoundError500 - } - - operatorId := signedOperatorSetUpdateMessage.OperatorId - signature := signedOperatorSetUpdateMessage.BlsSignature - ok, err := agg.verifyOperatorIdRegistered(operatorId, messageDigest, signature) - if err != nil { - agg.logger.Error("Failed to verify message", "err", err) - return err - } - if !ok { - agg.logger.Info("Invalid operator signature", "err", err) - return SignatureVerificationFailed400 - } - - agg.logger.Info("Received signed operator set update message", "message", fmt.Sprintf("%#v", signedOperatorSetUpdateMessage)) - - agg.rpcListener.IncTotalSignedOperatorSetUpdateMessage() - agg.rpcListener.ObserveLastMessageReceivedTime(operatorId, OperatorSetUpdateMessageLabel) - - blockNumber, err := agg.avsReader.GetOperatorSetUpdateBlock(context.Background(), signedOperatorSetUpdateMessage.Message.Id) - if err != nil { - agg.rpcListener.IncSignedOperatorSetUpdateMessage(operatorId, true) - - agg.logger.Error("Failed to get operator set update block", "err", err) - return OperatorSetUpdateBlockNotFoundError500 - } - - err = agg.operatorSetUpdateBlsAggregationService.InitializeMessageIfNotExists( - messageDigest, - coretypes.QUORUM_NUMBERS, - []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, - types.MESSAGE_TTL, - types.MESSAGE_BLS_AGGREGATION_TIMEOUT, - uint64(blockNumber)-1, - ) - if err != nil { - agg.rpcListener.IncSignedOperatorSetUpdateMessage(operatorId, true) - return err - } - - agg.operatorSetUpdatesLock.Lock() - agg.operatorSetUpdates[messageDigest] = signedOperatorSetUpdateMessage.Message - agg.operatorSetUpdatesLock.Unlock() - - err = agg.operatorSetUpdateBlsAggregationService.ProcessNewSignature( - context.Background(), messageDigest, - &signature, signedOperatorSetUpdateMessage.OperatorId, - ) - if err != nil { - agg.rpcListener.IncSignedOperatorSetUpdateMessage(operatorId, true) - return err - } - - agg.rpcListener.IncSignedOperatorSetUpdateMessage(operatorId, false) - - return nil -} - -type GetAggregatedCheckpointMessagesArgs struct { - FromTimestamp, ToTimestamp uint64 -} - -func (agg *Aggregator) GetAggregatedCheckpointMessages(args *GetAggregatedCheckpointMessagesArgs, reply *messages.CheckpointMessages) error { - checkpointMessages, err := agg.msgDb.FetchCheckpointMessages(args.FromTimestamp, args.ToTimestamp) - if err != nil { - return err - } - - *reply = *checkpointMessages - - return nil -} - -func (agg *Aggregator) GetRegistryCoordinatorAddress(_ *struct{}, reply *string) error { - *reply = agg.config.SFFLRegistryCoordinatorAddr.String() - return nil -} - -func (agg *Aggregator) NotifyOperatorInitialization(operatorId eigentypes.OperatorId, reply *bool) error { - agg.rpcListener.IncOperatorInitializations(operatorId) - return nil -} diff --git a/aggregator/rpc_server/metrics.go b/aggregator/rpc_server/metrics.go new file mode 100644 index 00000000..67c725d1 --- /dev/null +++ b/aggregator/rpc_server/metrics.go @@ -0,0 +1,163 @@ +package rpc_server + +import ( + "fmt" + "github.com/NethermindEth/near-sffl/aggregator" + "github.com/prometheus/client_golang/prometheus" +) + +const ( + OperatorSetUpdateMessageLabel = "operator_set_update_message" + StateRootUpdateMessageLabel = "state_root_update_message" + CheckpointTaskResponseLabel = "checkpoint_task_response" +) + +type EventListener interface { + IncOperatorInitializations(operatorId [32]byte) + IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool) + IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) + IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool) + IncTotalSignedCheckpointTaskResponse() + IncTotalSignedStateRootUpdateMessage() + IncTotalSignedOperatorSetUpdateMessage() + ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string) +} + +type SelectiveRpcListener struct { + IncOperatorInitializationsCb func(operatorId [32]byte) + IncSignedCheckpointTaskResponseCb func(operatorId [32]byte, errored, notFound bool) + IncSignedStateRootUpdateMessageCb func(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) + IncSignedOperatorSetUpdateMessageCb func(operatorId [32]byte, errored bool) + IncTotalSignedCheckpointTaskResponseCb func() + IncTotalSignedStateRootUpdateMessageCb func() + IncTotalSignedOperatorSetUpdateMessageCb func() + ObserveLastMessageReceivedTimeCb func(operatorId [32]byte, messageType string) +} + +func (l *SelectiveRpcListener) IncOperatorInitializations(operatorId [32]byte) { + if l.IncOperatorInitializationsCb != nil { + l.IncOperatorInitializationsCb(operatorId) + } +} + +func (l *SelectiveRpcListener) IncSignedCheckpointTaskResponse(operatorId [32]byte, errored, notFound bool) { + if l.IncSignedCheckpointTaskResponseCb != nil { + l.IncSignedCheckpointTaskResponseCb(operatorId, errored, notFound) + } +} + +func (l *SelectiveRpcListener) IncSignedStateRootUpdateMessage(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) { + if l.IncSignedStateRootUpdateMessageCb != nil { + l.IncSignedStateRootUpdateMessageCb(operatorId, rollupId, errored, hasNearDa) + } +} + +func (l *SelectiveRpcListener) IncSignedOperatorSetUpdateMessage(operatorId [32]byte, errored bool) { + if l.IncSignedOperatorSetUpdateMessageCb != nil { + l.IncSignedOperatorSetUpdateMessageCb(operatorId, errored) + } +} + +func (l *SelectiveRpcListener) ObserveLastMessageReceivedTime(operatorId [32]byte, messageType string) { + if l.ObserveLastMessageReceivedTimeCb != nil { + l.ObserveLastMessageReceivedTimeCb(operatorId, messageType) + } +} + +func (l *SelectiveRpcListener) IncTotalSignedCheckpointTaskResponse() { + if l.IncTotalSignedCheckpointTaskResponseCb != nil { + l.IncTotalSignedCheckpointTaskResponseCb() + } +} + +func (l *SelectiveRpcListener) IncTotalSignedStateRootUpdateMessage() { + if l.IncTotalSignedStateRootUpdateMessageCb != nil { + l.IncTotalSignedStateRootUpdateMessageCb() + } +} + +func (l *SelectiveRpcListener) IncTotalSignedOperatorSetUpdateMessage() { + if l.IncTotalSignedOperatorSetUpdateMessageCb != nil { + l.IncTotalSignedOperatorSetUpdateMessageCb() + } +} + +func MakeRpcServerMetrics(registry *prometheus.Registry) (EventListener, error) { + operatorInitializationsTotal := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "operator_initializations_total", + Help: "Total number of operator initializations", + }, + []string{"operator_id"}, + ) + if err := registry.Register(operatorInitializationsTotal); err != nil { + return nil, fmt.Errorf("error registering operatorInitializationsTotal counter: %w", err) + } + + signedCheckpointTaskResponsesTotal := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "signed_checkpoint_task_responses_total", + Help: "Total number of signed checkpoint task responses received per operator", + }, + []string{"operator_id", "errored", "not_found"}, + ) + if err := registry.Register(signedCheckpointTaskResponsesTotal); err != nil { + return nil, fmt.Errorf("error registering signedCheckpointTaskResponsesTotal counter: %w", err) + } + + signedStateRootUpdateMessagesTotal := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "signed_state_root_update_messages_total", + Help: "Total number of signed state root update messages received per operator", + }, + []string{"operator_id", "rollup_id", "errored", "has_near_da"}, + ) + if err := registry.Register(signedStateRootUpdateMessagesTotal); err != nil { + return nil, fmt.Errorf("error registering signedStateRootUpdateMessagesTotal counter: %w", err) + } + + signedOperatorSetUpdateMessagesTotal := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "signed_operator_set_update_messages_total", + Help: "Total number of signed operator set update messages received per operator", + }, + []string{"operator_id", "errored"}, + ) + if err := registry.Register(signedOperatorSetUpdateMessagesTotal); err != nil { + return nil, fmt.Errorf("error registering signedOperatorSetUpdateMessagesTotal counter: %w", err) + } + + lastMessageReceivedTime := prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Namespace: aggregator.AggregatorNamespace, + Name: "last_message_received_time", + Help: "Timestamp of the last message received per operator and message type", + }, + []string{"operator_id", "message_type"}, + ) + if err := registry.Register(lastMessageReceivedTime); err != nil { + return nil, fmt.Errorf("error registering lastMessageReceivedTime gauge: %w", err) + } + + return &SelectiveRpcListener{ + IncOperatorInitializationsCb: func(operatorId [32]byte) { + operatorInitializationsTotal.WithLabelValues(fmt.Sprintf("%x", operatorId)).Inc() + }, + IncSignedCheckpointTaskResponseCb: func(operatorId [32]byte, errored, expired bool) { + signedCheckpointTaskResponsesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%t", errored), fmt.Sprintf("%t", expired)).Inc() + }, + IncSignedStateRootUpdateMessageCb: func(operatorId [32]byte, rollupId uint32, errored, hasNearDa bool) { + signedStateRootUpdateMessagesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%d", rollupId), fmt.Sprintf("%t", errored), fmt.Sprintf("%t", hasNearDa)).Inc() + }, + IncSignedOperatorSetUpdateMessageCb: func(operatorId [32]byte, errored bool) { + signedOperatorSetUpdateMessagesTotal.WithLabelValues(fmt.Sprintf("%x", operatorId), fmt.Sprintf("%t", errored)).Inc() + }, + ObserveLastMessageReceivedTimeCb: func(operatorId [32]byte, messageType string) { + lastMessageReceivedTime.WithLabelValues(fmt.Sprintf("%x", operatorId), messageType).SetToCurrentTime() + }, + }, nil +} diff --git a/aggregator/rpc_server/server.go b/aggregator/rpc_server/server.go new file mode 100644 index 00000000..7d451e01 --- /dev/null +++ b/aggregator/rpc_server/server.go @@ -0,0 +1,173 @@ +package rpc_server + +import ( + "errors" + "net/http" + "net/rpc" + "strings" + + "github.com/NethermindEth/near-sffl/core" + "github.com/prometheus/client_golang/prometheus" + + "github.com/Layr-Labs/eigensdk-go/logging" + eigentypes "github.com/Layr-Labs/eigensdk-go/types" + + "github.com/NethermindEth/near-sffl/aggregator" + "github.com/NethermindEth/near-sffl/core/types/messages" +) + +var ( + TaskNotFoundError400 = errors.New("400. Task not found") + OperatorNotPartOfTaskQuorum400 = errors.New("400. Operator not part of quorum") + OperatorNotFoundError400 = errors.New("400. Operator not found") + TaskResponseDigestNotFoundError500 = errors.New("500. Failed to get task response digest") + MessageDigestNotFoundError500 = errors.New("500. Failed to get message digest") + OperatorSetUpdateBlockNotFoundError500 = errors.New("500. Failed to get operator set update block") + UnknownErrorWhileVerifyingSignature400 = errors.New("400. Failed to verify signature") + InvalidSignatureError400 = errors.New("400. Invalid signature") + CallToGetCheckSignaturesIndicesFailed500 = errors.New("500. Failed to get check signatures indices") + UnknownError400 = errors.New("400. Unknown error") + + errorsMap = map[error]error{ + aggregator.DigestError: MessageDigestNotFoundError500, + aggregator.TaskResponseDigestError: TaskResponseDigestNotFoundError500, + aggregator.GetOperatorSetUpdateBlockError: OperatorSetUpdateBlockNotFoundError500, + aggregator.InvalidSignatureError: InvalidSignatureError400, + aggregator.OperatorNotFoundError: OperatorNotFoundError400, + } +) + +type RpcServer struct { + serverIpPortAddr string + app aggregator.RpcAggregatorer + + logger logging.Logger + listener EventListener +} + +var _ core.Metricable = (*RpcServer)(nil) + +func NewRpcServer(serverIpPortAddr string, app aggregator.RpcAggregatorer, logger logging.Logger) *RpcServer { + return &RpcServer{ + serverIpPortAddr: serverIpPortAddr, + app: app, + logger: logger, + listener: &SelectiveRpcListener{}, + } +} + +func (s *RpcServer) EnableMetrics(registry *prometheus.Registry) error { + listener, err := MakeRpcServerMetrics(registry) + if err != nil { + return err + } + + s.listener = listener + return nil +} + +func (s *RpcServer) Start() error { + s.logger.Info("Starting aggregator rpc server.") + + err := rpc.RegisterName("Aggregator", s) + if err != nil { + s.logger.Fatal("Format of service TaskManager isn't correct. ", "err", err) + } + rpc.HandleHTTP() + err = http.ListenAndServe(s.serverIpPortAddr, nil) + if err != nil { + s.logger.Fatal("ListenAndServe", "err", err) + } + + return nil +} + +func mapErrors(err error) error { + mappedErr, ok := errorsMap[err] + if !ok { + return err + } + + return mappedErr +} + +// rpc endpoint which is called by operator +// reply doesn't need to be checked. If there are no errors, the task response is accepted +// rpc framework forces a reply type to exist, so we put bool as a placeholder +func (s *RpcServer) ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse, reply *bool) error { + s.logger.Info("Received signed task response", "response", signedCheckpointTaskResponse) + s.listener.IncTotalSignedCheckpointTaskResponse() + s.listener.ObserveLastMessageReceivedTime(signedCheckpointTaskResponse.OperatorId, CheckpointTaskResponseLabel) + + err := s.app.ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse) + if err != nil { + s.listener.IncSignedCheckpointTaskResponse( + signedCheckpointTaskResponse.OperatorId, + true, + strings.Contains(err.Error(), "not initialized"), + ) + return err + } + + s.listener.IncSignedCheckpointTaskResponse(signedCheckpointTaskResponse.OperatorId, false, false) + + return nil +} + +func (s *RpcServer) ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage, reply *bool) error { + s.logger.Info("Received signed state root update message", "updateMessage", signedStateRootUpdateMessage) + s.listener.IncTotalSignedCheckpointTaskResponse() + s.listener.ObserveLastMessageReceivedTime(signedStateRootUpdateMessage.OperatorId, StateRootUpdateMessageLabel) + + hasNearDaCommitment := signedStateRootUpdateMessage.Message.HasNearDaCommitment() + operatorId := signedStateRootUpdateMessage.OperatorId + rollupId := signedStateRootUpdateMessage.Message.RollupId + + err := s.app.ProcessSignedStateRootUpdateMessage(signedStateRootUpdateMessage) + s.listener.IncSignedStateRootUpdateMessage(operatorId, rollupId, err != nil, hasNearDaCommitment) + if err != nil { + return mapErrors(err) + } + + return nil +} + +func (s *RpcServer) ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage, reply *bool) error { + s.logger.Info("Received signed operator set update message", "message", signedOperatorSetUpdateMessage) + + operatorId := signedOperatorSetUpdateMessage.OperatorId + s.listener.ObserveLastMessageReceivedTime(operatorId, OperatorSetUpdateMessageLabel) + s.listener.IncTotalSignedOperatorSetUpdateMessage() + + err := s.app.ProcessSignedOperatorSetUpdateMessage(signedOperatorSetUpdateMessage) + s.listener.IncSignedOperatorSetUpdateMessage(operatorId, err != nil) + if err != nil { + return mapErrors(err) + } + + return nil +} + +type GetAggregatedCheckpointMessagesArgs struct { + FromTimestamp, ToTimestamp uint64 +} + +func (s *RpcServer) GetAggregatedCheckpointMessages(args *GetAggregatedCheckpointMessagesArgs, reply *messages.CheckpointMessages) error { + result, err := s.app.GetAggregatedCheckpointMessages(args.FromTimestamp, args.ToTimestamp) + if err != nil { + return mapErrors(err) + } + + *reply = *result + + return nil +} + +func (s *RpcServer) GetRegistryCoordinatorAddress(_ *struct{}, reply *string) error { + return s.app.GetRegistryCoordinatorAddress(reply) +} + +func (s *RpcServer) NotifyOperatorInitialization(operatorId eigentypes.OperatorId, reply *bool) error { + s.listener.IncOperatorInitializations(operatorId) + return nil +} diff --git a/aggregator/rpc_server_test.go b/aggregator/rpc_server_test.go index d7120c68..55aeafee 100644 --- a/aggregator/rpc_server_test.go +++ b/aggregator/rpc_server_test.go @@ -46,9 +46,9 @@ func TestProcessSignedCheckpointTaskResponse(t *testing.T) { ctx := context.Background() mockBlsAggServ.EXPECT().ProcessNewSignature(ctx, TASK_INDEX, signedCheckpointTaskResponseDigest, &signedCheckpointTaskResponse.BlsSignature, signedCheckpointTaskResponse.OperatorId) - mockOperatorRegistrationsServ.EXPECT().GetOperatorPubkeysById(ctx, signedCheckpointTaskResponse.OperatorId).Return(MOCK_OPERATOR_PUBKEYS, true) + mockOperatorRegistrationsServ.EXPECT().GetOperatorInfoById(ctx, signedCheckpointTaskResponse.OperatorId).Return(eigentypes.OperatorInfo{Pubkeys: MOCK_OPERATOR_PUBKEYS}, true) - err = aggregator.ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse, nil) + err = aggregator.ProcessSignedCheckpointTaskResponse(signedCheckpointTaskResponse) assert.Nil(t, err) } @@ -76,9 +76,9 @@ func TestProcessSignedStateRootUpdateMessage(t *testing.T) { mockMessageBlsAggServ.EXPECT().ProcessNewSignature(context.Background(), messageDigest, &signedMessage.BlsSignature, signedMessage.OperatorId) mockMessageBlsAggServ.EXPECT().InitializeMessageIfNotExists(messageDigest, coretypes.QUORUM_NUMBERS, []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, types.MESSAGE_TTL, types.MESSAGE_BLS_AGGREGATION_TIMEOUT, uint64(0)) - mockOperatorRegistrationsServ.EXPECT().GetOperatorPubkeysById(context.Background(), signedMessage.OperatorId).Return(MOCK_OPERATOR_PUBKEYS, true) + mockOperatorRegistrationsServ.EXPECT().GetOperatorInfoById(context.Background(), signedMessage.OperatorId).Return(eigentypes.OperatorInfo{Pubkeys: MOCK_OPERATOR_PUBKEYS}, true) - err = aggregator.ProcessSignedStateRootUpdateMessage(signedMessage, nil) + err = aggregator.ProcessSignedStateRootUpdateMessage(signedMessage) assert.Nil(t, err) } @@ -102,9 +102,9 @@ func TestProcessInvalidSignedStateRootUpdateMessage(t *testing.T) { assert.Nil(t, err) invalidateSignature(&signedMessage.BlsSignature) - mockOperatorRegistrationsServ.EXPECT().GetOperatorPubkeysById(context.Background(), signedMessage.OperatorId).Return(MOCK_OPERATOR_PUBKEYS, true) - err = aggregator.ProcessSignedStateRootUpdateMessage(signedMessage, nil) - assert.Equal(t, err.Error(), "400. Signature verification failed") + mockOperatorRegistrationsServ.EXPECT().GetOperatorInfoById(context.Background(), signedMessage.OperatorId).Return(eigentypes.OperatorInfo{Pubkeys: MOCK_OPERATOR_PUBKEYS}, true) + err = aggregator.ProcessSignedStateRootUpdateMessage(signedMessage) + assert.Equal(t, err.Error(), "Invalid signature") } func TestProcessOperatorSetUpdateMessage(t *testing.T) { @@ -133,9 +133,9 @@ func TestProcessOperatorSetUpdateMessage(t *testing.T) { mockMessageBlsAggServ.EXPECT().ProcessNewSignature(ctx, messageDigest, &signedMessage.BlsSignature, signedMessage.OperatorId) mockMessageBlsAggServ.EXPECT().InitializeMessageIfNotExists(messageDigest, coretypes.QUORUM_NUMBERS, []eigentypes.QuorumThresholdPercentage{types.MESSAGE_AGGREGATION_QUORUM_THRESHOLD}, types.MESSAGE_TTL, types.MESSAGE_BLS_AGGREGATION_TIMEOUT, uint64(9)) - mockOperatorRegistrationsServ.EXPECT().GetOperatorPubkeysById(ctx, signedMessage.OperatorId).Return(MOCK_OPERATOR_PUBKEYS, true) + mockOperatorRegistrationsServ.EXPECT().GetOperatorInfoById(context.Background(), signedMessage.OperatorId).Return(eigentypes.OperatorInfo{Pubkeys: MOCK_OPERATOR_PUBKEYS}, true) - err = aggregator.ProcessSignedOperatorSetUpdateMessage(signedMessage, nil) + err = aggregator.ProcessSignedOperatorSetUpdateMessage(signedMessage) assert.Nil(t, err) } @@ -147,9 +147,8 @@ func TestGetAggregatedCheckpointMessages(t *testing.T) { assert.Nil(t, err) var checkpointMessages messages.CheckpointMessages - mockDb.EXPECT().FetchCheckpointMessages(uint64(1), uint64(2)).Return(&checkpointMessages, nil) - err = aggregator.GetAggregatedCheckpointMessages(&GetAggregatedCheckpointMessagesArgs{uint64(1), uint64(2)}, &checkpointMessages) + _, err = aggregator.GetAggregatedCheckpointMessages(uint64(1), uint64(2)) assert.Nil(t, err) } diff --git a/contracts/evm/README.md b/contracts/evm/README.md index c7614668..366fe26d 100644 --- a/contracts/evm/README.md +++ b/contracts/evm/README.md @@ -1,6 +1,6 @@ -## SFFL Foreign Contracts +## NFFL Foreign Contracts -This Foundry project contains SFFL's _foreign_ contracts, which store state +This Foundry project contains NFFL's _foreign_ contracts, which store state roots for various rollups on request, allowing cross-chain messaging through verification of storage proofs. @@ -12,7 +12,7 @@ storing the rollups' states. The Ethereum contracts properly manage the on-chain portion of the Eigenlayer AVS, providing a service manager that keeps track of the operator set and related functionalities. Besides the state root storage, it also includes -periodic checkpoints tasks, in which the operators submit the current SFFL +periodic checkpoints tasks, in which the operators submit the current NFFL state through aggregated messages, making it permanently available on Ethereum. The rollup contracts, in turn, only manage state root agreements. Since the diff --git a/contracts/evm/slither.config.json b/contracts/evm/slither.config.json new file mode 100644 index 00000000..fb2decd5 --- /dev/null +++ b/contracts/evm/slither.config.json @@ -0,0 +1,6 @@ +{ + "detectors_to_run": "all", + "exclude_informational": true, + "exclude_low": true, + "filter_paths": "node_modules|lib" +} diff --git a/contracts/evm/test/ffi/bls-utils/src/main.rs b/contracts/evm/test/ffi/bls-utils/src/main.rs index 1d7fdc9c..80ca059c 100644 --- a/contracts/evm/test/ffi/bls-utils/src/main.rs +++ b/contracts/evm/test/ffi/bls-utils/src/main.rs @@ -120,9 +120,6 @@ impl Into for AffineG2 { } } -#[derive(Copy, Clone)] -struct CopiablePublicKeyG1(G1); - impl Into for KeyPair { fn into(self) -> SolidityKeyPair { let mut priv_key_bytes = [0; 32]; diff --git a/contracts/evm/test/utils/BLSUtilsFFI.sol b/contracts/evm/test/utils/BLSUtilsFFI.sol index d9715476..05ee8a9b 100644 --- a/contracts/evm/test/utils/BLSUtilsFFI.sol +++ b/contracts/evm/test/utils/BLSUtilsFFI.sol @@ -52,7 +52,7 @@ contract BLSUtilsFFI is Test { function _ffi(string[] memory command) internal returns (bytes memory) { string[] memory inputs = new string[](command.length + 1); - inputs[0] = "./test/ffi/bls-utils/target/debug/bls-utils"; + inputs[0] = "../../target/debug/bls-utils"; for (uint256 i = 0; i < command.length; i++) { inputs[i + 1] = command[i]; } diff --git a/contracts/generate-go-bindings.sh b/contracts/generate-go-bindings.sh index 473786ff..c768ddd6 100755 --- a/contracts/generate-go-bindings.sh +++ b/contracts/generate-go-bindings.sh @@ -19,6 +19,7 @@ function create_binding { rm -rf tmp } +(cd ./evm && npm ci) rm -rf bindings/* forge build --root ./evm diff --git a/contracts/near/sffl-agreement-registry/.cargo/config b/contracts/near/sffl-agreement-registry/.cargo/config deleted file mode 100644 index 4b3b21ff..00000000 --- a/contracts/near/sffl-agreement-registry/.cargo/config +++ /dev/null @@ -1,10 +0,0 @@ -[build] -rustflags = ["-C", "link-args=-s"] - -[profile.release] -codegen-units = 1 -opt-level = "z" -lto = true -debug = false -panic = "abort" -overflow-checks = true diff --git a/contracts/near/sffl-agreement-registry/.gitignore b/contracts/near/sffl-agreement-registry/.gitignore deleted file mode 100644 index 306d9c0d..00000000 --- a/contracts/near/sffl-agreement-registry/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.DS_Store - -/neardev -/target -/deploy diff --git a/contracts/near/sffl-agreement-registry/Cargo.lock b/contracts/near/sffl-agreement-registry/Cargo.lock deleted file mode 100644 index 18f865e2..00000000 --- a/contracts/near/sffl-agreement-registry/Cargo.lock +++ /dev/null @@ -1,5571 +0,0 @@ -# This file is automatically @generated by Cargo. -# 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" - -[[package]] -name = "actix" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba56612922b907719d4a01cf11c8d5b458e7d3dba946d0435f20f58d6795ed2" -dependencies = [ - "actix-macros", - "actix-rt", - "actix_derive", - "bitflags 2.4.2", - "bytes", - "crossbeam-channel", - "futures-core", - "futures-sink", - "futures-task", - "futures-util", - "log", - "once_cell", - "parking_lot", - "pin-project-lite", - "smallvec", - "tokio", - "tokio-util 0.7.10", -] - -[[package]] -name = "actix-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" -dependencies = [ - "quote", - "syn 2.0.48", -] - -[[package]] -name = "actix-rt" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" -dependencies = [ - "futures-core", - "tokio", -] - -[[package]] -name = "actix_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.12", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloy-json-abi" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b07fb0de8c985deebc60b97fc8c45fd45c101822c3241c1f389e9f9a557dd7" -dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", - "serde", -] - -[[package]] -name = "alloy-primitives" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3729132072f369bc4e8e6e070f9cf4deb3490fc9b9eea6f71f75ec19406df811" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if 1.0.0", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand 0.8.5", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "arrayvec 0.7.4", - "bytes", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5531f0a16e36c547e68c73a1638bea1f26237ee8ae785527190c4e4f9fecd2c5" -dependencies = [ - "alloy-json-abi", - "const-hex", - "dunce", - "heck 0.4.1", - "indexmap 2.1.0", - "proc-macro-error", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.48", - "syn-solidity", - "tiny-keccak", -] - -[[package]] -name = "alloy-sol-type-parser" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6958f72e4aa4acc979ea70bca59204336c0686e92b26d02d48244cf25b0dabb0" -dependencies = [ - "winnow", -] - -[[package]] -name = "alloy-sol-types" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783eb720b73d38f9d4c1fb9890e4db6bc8c708f7aa77d3071a19e06091ecd1c9" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", - "const-hex", - "serde", -] - -[[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.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" -dependencies = [ - "derive_arbitrary", -] - -[[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.4", - "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", - "num-bigint 0.4.4", - "num-traits", - "paste", - "rustc_version 0.4.0", - "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.4", - "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.4", - "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.4", -] - -[[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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[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.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 = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "binary-install" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bff426ff93f3610dd2b946f3eb8cb2d1285ca8682834d43be531a3f93db2ff" -dependencies = [ - "anyhow", - "dirs-next", - "flate2", - "fs2", - "hex", - "is_executable", - "siphasher", - "tar", - "ureq", - "zip 0.6.6", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[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", - "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", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[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 = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" -dependencies = [ - "borsh-derive 1.3.1", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" -dependencies = [ - "once_cell", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.48", - "syn_derive", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "brownstone" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ea61398f34f1395ccbeb046fb68c87b631d1f34567fed0f0f11fa35d18d8d" -dependencies = [ - "arrayvec 0.7.4", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[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.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "bytesize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" -dependencies = [ - "serde", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-near" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f73eb01da3b6737778d2006645533e75563d1080c64bf714bfb88d3fb0ac09b" -dependencies = [ - "anyhow", - "atty", - "bs58 0.4.0", - "camino", - "cargo_metadata", - "clap 3.2.25", - "colored", - "env_logger", - "libloading", - "log", - "near-abi", - "rustc_version 0.4.0", - "schemars", - "serde_json", - "sha2 0.10.8", - "symbolic-debuginfo", - "zstd", -] - -[[package]] -name = "cargo-platform" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.21", - "serde", - "serde_json", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.48.5", -] - -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "atty", - "bitflags 1.3.2", - "clap_derive 3.2.25", - "clap_lex 0.2.4", - "indexmap 1.9.3", - "once_cell", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" -dependencies = [ - "clap_builder", - "clap_derive 4.4.7", -] - -[[package]] -name = "clap_builder" -version = "4.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" -dependencies = [ - "anstream", - "anstyle", - "clap_lex 0.6.0", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "const-hex" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" -dependencies = [ - "cfg-if 1.0.0", - "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 = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[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 0.6.4", - "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 = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[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 = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.48", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "debugid" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ee87af31d84ef885378aebca32be3d682b0e0dc119d5b4860a2c5bb5046730" -dependencies = [ - "uuid", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[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]] -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 = "dmsort" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0bc8fbe9441c17c9f46f75dfe27fa1ddb6c68a461ccaed0481419219d4f10d3" - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "dyn-clone" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" - -[[package]] -name = "easy-ext" -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 2.2.0", - "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-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elementtree" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6319c9433cf1e95c60c8533978bccf0614f27f03bb4e514253468eeeaa7fe3" -dependencies = [ - "string_cache", - "xml-rs", -] - -[[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 0.6.4", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if 1.0.0", -] - -[[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.48", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec 0.7.4", - "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 0.6.4", - "subtle", -] - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "windows-sys 0.52.0", -] - -[[package]] -name = "fixed-hash" -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 = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[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.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.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] - -[[package]] -name = "goblin" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" -dependencies = [ - "log", - "plain", - "scroll 0.11.0", -] - -[[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.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 2.1.0", - "slab", - "tokio", - "tokio-util 0.7.10", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.7", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.7", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" - -[[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 = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.5.5", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper", - "pin-project-lite", - "tokio", - "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", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[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.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.9", -] - -[[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 = "indent_write" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", - "serde", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is_executable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d553b8abc8187beb7d663e34c065ac4570b273bc9511a50e940e99409c577" -dependencies = [ - "winapi", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "joinery" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" - -[[package]] -name = "js-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff", -] - -[[package]] -name = "json_comments" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbbfed4e59ba9750e15ba154fdfd9329cee16ff3df539c2666b70f58cc32105" - -[[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]] -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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.2", - "libc", - "redox_syscall", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[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.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "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.21", - "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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0cb40869cab7f5232f934f45db35bffe0f2d2a7cb0cd0346202fbe4ebf2dd7" -dependencies = [ - "borsh 0.10.3", - "serde", -] - -[[package]] -name = "near-chain-configs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f9a1c805846237d56f99b328ba6ab77e5d43ef59aaaf8d2a41d42fdc708a7b" -dependencies = [ - "anyhow", - "chrono", - "derive_more", - "near-config-utils", - "near-crypto 0.17.0", - "near-o11y", - "near-primitives 0.17.0", - "num-rational", - "once_cell", - "serde", - "serde_json", - "sha2 0.10.8", - "smart-default", - "tracing", -] - -[[package]] -name = "near-config-utils" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5523e7dce493c45bc3241eb3100d943ec471852f9b1f84b46a34789eadf17031" -dependencies = [ - "anyhow", - "json_comments", - "thiserror", - "tracing", -] - -[[package]] -name = "near-crypto" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e75673d69fd7365508f3d32483669fe45b03bfb34e4d9363e90adae9dfb416c" -dependencies = [ - "arrayref", - "blake2", - "borsh 0.9.3", - "bs58 0.4.0", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6b382b626e7e0cd372d027c6672ac97b4b6ee6114288c9e58d8180b935d315" -dependencies = [ - "blake2", - "borsh 0.10.3", - "bs58 0.4.0", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "hex", - "near-account-id 0.17.0", - "near-config-utils", - "near-stdx", - "once_cell", - "primitive-types 0.10.1", - "rand 0.7.3", - "secp256k1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - -[[package]] -name = "near-fmt" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44c842c6cfcd9b8c387cccd4cd0619a5f21920cde5d5c292af3cc5d40510672" -dependencies = [ - "near-primitives-core 0.17.0", -] - -[[package]] -name = "near-gas" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e75c875026229902d065e4435804497337b631ec69ba746b102954273e9ad1" -dependencies = [ - "borsh 1.3.1", - "schemars", - "serde", -] - -[[package]] -name = "near-jsonrpc-client" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118f44c02ad211db805c1370ad3ff26576af6ff554093c9fece1b835d29d233a" -dependencies = [ - "borsh 0.10.3", - "lazy_static", - "log", - "near-chain-configs", - "near-crypto 0.17.0", - "near-jsonrpc-primitives", - "near-primitives 0.17.0", - "reqwest", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "near-jsonrpc-primitives" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b2934b5ab243e25e951c984525ba0aff0e719ed915c988c5195405aa0f6987" -dependencies = [ - "arbitrary", - "near-chain-configs", - "near-crypto 0.17.0", - "near-primitives 0.17.0", - "near-rpc-error-macro 0.17.0", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "near-o11y" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7d35397b02b131c188c72f3885e97daeccab134ec2fc8cc0073a94cf1cfe19" -dependencies = [ - "actix", - "atty", - "clap 4.4.18", - "near-crypto 0.17.0", - "near-primitives-core 0.17.0", - "once_cell", - "opentelemetry", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "prometheus", - "serde", - "strum 0.24.1", - "thiserror", - "tokio", - "tracing", - "tracing-appender", - "tracing-opentelemetry", - "tracing-subscriber", -] - -[[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 0.14.0", - "num-rational", - "once_cell", - "primitive-types 0.10.1", - "rand 0.7.3", - "reed-solomon-erasure", - "serde", - "serde_json", - "smart-default", - "strum 0.24.1", - "thiserror", -] - -[[package]] -name = "near-primitives" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f7051aaf199adc4d068620fca6d5f70f906a1540d03a8bb3701271f8881835" -dependencies = [ - "arbitrary", - "borsh 0.10.3", - "bytesize", - "cfg-if 1.0.0", - "chrono", - "derive_more", - "easy-ext", - "enum-map", - "hex", - "near-crypto 0.17.0", - "near-fmt", - "near-primitives-core 0.17.0", - "near-rpc-error-macro 0.17.0", - "near-stdx", - "near-vm-errors 0.17.0", - "num-rational", - "once_cell", - "primitive-types 0.10.1", - "rand 0.8.5", - "reed-solomon-erasure", - "serde", - "serde_json", - "serde_with", - "serde_yaml", - "smart-default", - "strum 0.24.1", - "thiserror", - "time", - "tracing", -] - -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775fec19ef51a341abdbf792a9dda5b4cb89f488f681b2fd689b9321d24db47b" -dependencies = [ - "arbitrary", - "base64 0.21.7", - "borsh 0.10.3", - "bs58 0.4.0", - "derive_more", - "enum-map", - "near-account-id 0.17.0", - "num-rational", - "serde", - "serde_repr", - "serde_with", - "sha2 0.10.8", - "strum 0.24.1", - "thiserror", -] - -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c1eda300e2e78f4f945ae58117d49e806899f4a51ee2faa09eda5ebc2e6571" -dependencies = [ - "quote", - "serde", - "syn 2.0.48", -] - -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d2dadd765101c77e664029dd6fbec090e696877d4ae903c620d02ceda4969a" -dependencies = [ - "fs2", - "near-rpc-error-core 0.17.0", - "serde", - "syn 2.0.48", -] - -[[package]] -name = "near-sandbox-utils" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de216bb0152bfb64f59016d9e6a5b1ac56dd85f729e5fde08461571e2182c8f" -dependencies = [ - "anyhow", - "binary-install", - "chrono", - "fs2", - "home", - "tokio", -] - -[[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-contract-tools" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90458c4ad63ff557303de40e90494811fb9b308a3ee7346ac14d01f133d93ef" -dependencies = [ - "near-sdk", - "near-sdk-contract-tools-macros", - "thiserror", -] - -[[package]] -name = "near-sdk-contract-tools-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0647bf0273ce9407b650e7f0cf777b7052325648a4d03c8a8993a6a5c5c17411" -dependencies = [ - "darling", - "heck 0.4.1", - "proc-macro2", - "quote", - "strum 0.25.0", - "strum_macros 0.25.3", - "syn 2.0.48", -] - -[[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 = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6540152fba5e96fe5d575b79e8cd244cf2add747bb01362426bdc069bc3a23bc" - -[[package]] -name = "near-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397688591acf8d3ebf2c2485ba32d4b24fc10aad5334e3ad8ec0b7179bfdf06b" - -[[package]] -name = "near-token" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b68f3f8a2409f72b43efdbeff8e820b81e70824c49fee8572979d789d1683fb" -dependencies = [ - "serde", -] - -[[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-errors" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec545d1bede0579e7c15dd2dce9b998dc975c52f2165702ff40bec7ff69728bb" -dependencies = [ - "borsh 0.10.3", - "near-account-id 0.17.0", - "near-rpc-error-macro 0.17.0", - "serde", - "strum 0.24.1", - "thiserror", -] - -[[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 0.14.0", - "ripemd", - "serde", - "sha2 0.10.8", - "sha3", - "zeropool-bn", -] - -[[package]] -name = "near-workspaces" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a14e772e49ba9644c06dad20f635b6463f74d378fa19822bfc35fef479c72e5" -dependencies = [ - "async-trait", - "base64 0.21.7", - "borsh 0.10.3", - "bs58 0.5.0", - "cargo-near", - "chrono", - "fs2", - "json-patch", - "libc", - "near-account-id 0.17.0", - "near-crypto 0.17.0", - "near-gas", - "near-jsonrpc-client", - "near-jsonrpc-primitives", - "near-primitives 0.17.0", - "near-sandbox-utils", - "near-sdk", - "near-token", - "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "sha2 0.10.8", - "tempfile", - "thiserror", - "tokio", - "tokio-retry", - "tracing", - "url", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nom-supreme" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aadc66631948f6b65da03be4c4cd8bd104d481697ecbb9bbd65719b1ec60bc9f" -dependencies = [ - "brownstone", - "indent_write", - "joinery", - "memchr", - "nom", -] - -[[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.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-bigint 0.3.3", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -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 0.3.4", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.2", - "cfg-if 1.0.0", - "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.48", -] - -[[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.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "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-otlp" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a" -dependencies = [ - "async-trait", - "futures", - "futures-util", - "http", - "opentelemetry", - "prost", - "thiserror", - "tokio", - "tonic", - "tonic-build", -] - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd" -dependencies = [ - "opentelemetry", -] - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[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 = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.4", - "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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec 0.7.4", - "bitvec 1.0.1", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 3.6.9", - "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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" -dependencies = [ - "proc-macro-crate 2.0.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 = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[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.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[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 = "pdb" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f4d162ecaaa1467de5afbe62d597757b674b51da8bb4e587430c5fdb2af7aa" -dependencies = [ - "fallible-iterator", - "scroll 0.10.2", - "uuid", -] - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.1.0", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[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.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "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", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[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 = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.0", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prometheus" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "memchr", - "parking_lot", - "protobuf", - "thiserror", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.4.2", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.8.2", - "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", -] - -[[package]] -name = "prost-build" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" -dependencies = [ - "bytes", - "heck 0.3.3", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost", - "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", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-types" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[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.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -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", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[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" -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", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.12", -] - -[[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_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom 0.2.12", - "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 = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.3", - "regex-syntax 0.8.2", -] - -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "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.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" -dependencies = [ - "cc", - "getrandom 0.2.12", - "libc", - "spin 0.9.8", - "untrusted", - "windows-sys 0.48.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[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.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint 0.4.4", - "num-traits", - "parity-scale-codec 3.6.9", - "primitive-types 0.12.2", - "proptest", - "rand 0.8.5", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" - -[[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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.21", -] - -[[package]] -name = "rustix" -version = "0.38.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[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.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "sandbox" -version = "1.0.0" -dependencies = [ - "alloy-primitives", - "alloy-sol-macro", - "alloy-sol-types", - "k256", - "near-workspaces", - "serde", - "serde_json", - "tokio", -] - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "schemars" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" - -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[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 = "secp256k1" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" -dependencies = [ - "rand 0.8.5", - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" -dependencies = [ - "cc", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -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.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[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 = "serde_with" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" -dependencies = [ - "base64 0.21.7", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.1.0", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_yaml" -version = "0.9.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" -dependencies = [ - "indexmap 2.1.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sffl-agreement-registry" -version = "1.0.0" -dependencies = [ - "alloy-primitives", - "alloy-sol-macro", - "alloy-sol-types", - "getrandom 0.2.12", - "k256", - "near-sdk", - "near-sdk-contract-tools", - "uint", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if 1.0.0", - "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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" -dependencies = [ - "cc", - "cfg-if 1.0.0", -] - -[[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 = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -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 = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "smart-default" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[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 = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "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", - "phf_shared", - "precomputed-hash", - "serde", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.48", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "symbolic-common" -version = "8.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551f902d5642e58039aee6a9021a61037926af96e071816361644983966f540" -dependencies = [ - "debugid", - "memmap2", - "stable_deref_trait", - "uuid", -] - -[[package]] -name = "symbolic-debuginfo" -version = "8.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165dabf9fc1d6bb6819c2c0e27c8dd0e3068d2c53cf186d319788e96517f0d6" -dependencies = [ - "bitvec 1.0.1", - "dmsort", - "elementtree", - "fallible-iterator", - "flate2", - "gimli", - "goblin", - "lazy_static", - "lazycell", - "nom", - "nom-supreme", - "parking_lot", - "pdb", - "regex", - "scroll 0.11.0", - "serde", - "serde_json", - "smallvec", - "symbolic-common", - "thiserror", - "wasmparser", - "zip 0.5.13", -] - -[[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.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cfbd642e1748fd9e47951973abfa78f825b11fbf68af9e6b9db4c983a770166" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tempfile" -version = "3.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" - -[[package]] -name = "thiserror" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" -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.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -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.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" -dependencies = [ - "autocfg", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.4.10", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[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-retry" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" -dependencies = [ - "pin-project", - "rand 0.8.5", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap 2.1.0", - "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", - "http", - "http-body", - "hyper", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost", - "prost-derive", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", - "tower", - "tower-layer", - "tower-service", - "tracing", - "tracing-futures", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util 0.7.10", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror", - "time", - "tracing-subscriber", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[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-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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "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", - "tracing", - "tracing-core", - "tracing-log 0.1.4", - "tracing-subscriber", -] - -[[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 0.2.0", -] - -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" -dependencies = [ - "base64 0.21.7", - "flate2", - "log", - "once_cell", - "rustls", - "rustls-webpki", - "url", - "webpki-roots", -] - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[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.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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" - -[[package]] -name = "wasmparser" -version = "0.83.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" - -[[package]] -name = "web-sys" -version = "0.3.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[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-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[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-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - -[[package]] -name = "xml-rs" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -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.48", -] - -[[package]] -name = "zeropool-bn" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e61de68ede9ffdd69c01664f65a178c5188b73f78faa21f0936016a888ff7c" -dependencies = [ - "borsh 0.9.3", - "byteorder", - "crunchy", - "lazy_static", - "rand 0.8.5", - "rustc-hex", -] - -[[package]] -name = "zip" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" -dependencies = [ - "byteorder", - "crc32fast", - "flate2", - "thiserror", -] - -[[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", - "sha1", - "time", - "zstd", -] - -[[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", -] - -[[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]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/contracts/near/sffl-agreement-registry/Cargo.toml b/contracts/near/sffl-agreement-registry/Cargo.toml deleted file mode 100644 index 5e5c94ed..00000000 --- a/contracts/near/sffl-agreement-registry/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "sffl-agreement-registry" -version = "1.0.0" -authors = ["Near.org "] -edition = "2021" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -alloy-primitives = { version = "0.6.0", features = ["serde"] } -alloy-sol-macro = { version = "0.6.0", features = ["json"] } -alloy-sol-types = { version = "0.6.0", features = ["json", "eip712-serde"] } -near-sdk = { version = "4.1.1", features = ["unstable"] } -near-sdk-contract-tools = "2.1.0" -uint = { version = "0.9.3", default-features = false } - -[dev-dependencies] -k256 = "0.13.3" -getrandom = { version = "0.2", features = ["js"] } diff --git a/contracts/near/sffl-agreement-registry/README.md b/contracts/near/sffl-agreement-registry/README.md deleted file mode 100644 index 74ec4fe4..00000000 --- a/contracts/near/sffl-agreement-registry/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# SFFL Agreement Registry - -> [!NOTE] -> This contract is not being used in the current phase. - -This contract is a prototype of how SFFL attestations could be done using a -NEAR smart contract. - -Through this contract, operators can link their Ethereum addresses to a NEAR -account by signing an [EIP712](https://eips.ethereum.org/EIPS/eip-712) message, -and can then submit their BLS signatures to SFFL messages and tasks to NEAR, -which will be available for any external actors. - -The aggregation step could be then done by an off-chain actor, or, which would -be even more ideal, in a NEAR smart contract itself. - -## Build -To build the contract you can execute the `./build.sh` script, which will in turn run: - -```bash -rustup target add wasm32-unknown-unknown -cargo build --target wasm32-unknown-unknown --release -``` - -## Test -You can also run the `./test.sh` script, which will execute: -```bash -cargo test - -./build.sh -cd sandbox-rs -cargo run --example sandbox "../../../../target/wasm32-unknown-unknown/release/sffl_agreement_registry.wasm" -``` - -## Deploy -To deploy, run the `./deploy.sh` script, which will in turn run: - -```bash -near dev-deploy --wasmFile ../../../target/wasm32-unknown-unknown/release/sffl_agreement_registry.wasm -``` - -the command [`near dev-deploy`](https://docs.near.org/tools/near-cli#near-dev-deploy) automatically creates an account in the NEAR testnet, and deploys the compiled contract on it. - -Once finished, check the `./neardev/dev-account` file to find the address in which the contract was deployed: - -```bash -cat ./neardev/dev-account -# e.g. dev-1659899566943-21539992274727 -``` \ No newline at end of file diff --git a/contracts/near/sffl-agreement-registry/build.sh b/contracts/near/sffl-agreement-registry/build.sh deleted file mode 100755 index 243f2da6..00000000 --- a/contracts/near/sffl-agreement-registry/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -rustup target add wasm32-unknown-unknown -cargo build --target wasm32-unknown-unknown --release \ No newline at end of file diff --git a/contracts/near/sffl-agreement-registry/deploy.sh b/contracts/near/sffl-agreement-registry/deploy.sh deleted file mode 100755 index a5c66fad..00000000 --- a/contracts/near/sffl-agreement-registry/deploy.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -near dev-deploy --wasmFile ../../../target/wasm32-unknown-unknown/release/sffl_agreement_registry.wasm \ No newline at end of file diff --git a/contracts/near/sffl-agreement-registry/rust-toolchain.toml b/contracts/near/sffl-agreement-registry/rust-toolchain.toml deleted file mode 100644 index e46a3013..00000000 --- a/contracts/near/sffl-agreement-registry/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "1.77" -targets = ["wasm32-unknown-unknown"] diff --git a/contracts/near/sffl-agreement-registry/sandbox-rs/Cargo.toml b/contracts/near/sffl-agreement-registry/sandbox-rs/Cargo.toml deleted file mode 100644 index 37572082..00000000 --- a/contracts/near/sffl-agreement-registry/sandbox-rs/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "sandbox" -version = "1.0.0" -publish = false -edition = "2021" - -[dev-dependencies] -serde_json = { version = "1.0", features = ["arbitrary_precision"] } -alloy-primitives = { version = "0.6.0", features = ["serde"] } -alloy-sol-macro = { version = "0.6.0", features = ["json"] } -alloy-sol-types = { version = "0.6.0", features = ["json", "eip712-serde"] } -serde = { version = "1.0.195", features = ["derive"] } -near-workspaces = "0.9.0" -tokio = { version = "1.28.2", features = ["full"] } -k256 = "0.13.3" - -[[example]] -name = "sandbox" -path = "src/tests.rs" diff --git a/contracts/near/sffl-agreement-registry/sandbox-rs/src/tests.rs b/contracts/near/sffl-agreement-registry/sandbox-rs/src/tests.rs deleted file mode 100644 index a92cdaec..00000000 --- a/contracts/near/sffl-agreement-registry/sandbox-rs/src/tests.rs +++ /dev/null @@ -1,195 +0,0 @@ -use alloy_primitives::{hex, keccak256, Address, FixedBytes}; -use alloy_sol_types::{eip712_domain, sol, Eip712Domain, SolStruct, SolValue}; -use k256::{ecdsa::SigningKey, elliptic_curve::sec1::ToEncodedPoint, AffinePoint}; -use near_workspaces::{types::NearToken, Account, AccountId, Contract}; -use serde::{Deserialize, Serialize}; -use serde_json::json; -use std::{env, fs}; - -sol! { - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct StateRootUpdateMessage { - uint32 rollupId; - uint64 blockHeight; - uint64 timestamp; - bytes32 stateRoot; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct G1Point { - uint256 X; - uint256 Y; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct Operator { - G1Point pubkey; - uint128 weight; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct OperatorSetUpdateMessage { - uint64 id; - uint64 timestamp; - Operator[] operators; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct CheckpointTaskResponseMessage { - uint32 referenceTaskIndex; - bytes32 stateRootUpdatesRoot; - bytes32 operatorSetUpdatesRoot; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - struct EthNearAccountLink { - address ethAddress; - string nearAccountId; - } -} - -const DOMAIN: Eip712Domain = eip712_domain!( - name: "SFFL", - version: "0", -); - -fn secret_key_to_address(secret_key: &SigningKey) -> Address { - let public_key = secret_key.verifying_key(); - let affine: &AffinePoint = public_key.as_ref(); - let encoded = affine.to_encoded_point(false); - - Address::from_raw_public_key(&encoded.as_bytes()[1..]) -} - -#[tokio::main] -async fn main() -> Result<(), Box> { - let wasm_arg: &str = &(env::args().nth(1).unwrap()); - let wasm_filepath = fs::canonicalize(env::current_dir()?.join(wasm_arg))?; - - let worker = near_workspaces::sandbox().await?; - let wasm = std::fs::read(wasm_filepath)?; - let contract = worker.dev_deploy(&wasm).await?; - - let account = worker.dev_create_account().await?; - let alice = account - .create_subaccount("alice") - .initial_balance(NearToken::from_near(30)) - .transact() - .await? - .into_result()?; - - let _ = alice.call(contract.id(), "new").transact().await?.into_result()?; - - let _ = alice - .call(contract.id(), "storage_deposit") - .args_json(json!({ "account_id": None::, "registration_only": None:: })) - .deposit(NearToken::from_near(1)) - .transact() - .await? - .into_result()?; - - let test_private_key = hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"); - - test_operator_setup(&alice, &contract, &test_private_key).await?; - test_message_submission(&alice, &contract).await?; - - Ok(()) -} - -async fn test_operator_setup( - account: &Account, - contract: &Contract, - private_key: &[u8; 32], -) -> Result<(), Box> { - let signing_key: SigningKey = SigningKey::from_bytes(private_key.into())?; - let eth_address = secret_key_to_address(&signing_key); - - let msg = EthNearAccountLink { - ethAddress: eth_address, - nearAccountId: account.id().to_string(), - }; - - let signing_hash = msg.eip712_signing_hash(&DOMAIN); - let (signature, recid) = signing_key.sign_prehash_recoverable(signing_hash.as_slice()).unwrap(); - - let _ = account - .call(contract.id(), "init_operator") - .args_json(json!({ - "msg": msg, - "signature": FixedBytes::<64>::from_slice(signature.to_bytes().as_slice()), - "v": u8::from(recid), - })) - .transact() - .await?; - - let stored_eth_address = account - .call(contract.id(), "get_eth_address") - .args_json(json!({"account_id": account.id() })) - .view() - .await? - .json::>()? - .expect("Stored Ethereum address is None"); - - assert_eq!( - eth_address, stored_eth_address, - "The Ethereum address should match the initialized value" - ); - println!("Passed ✅ operator setup"); - - Ok(()) -} - -async fn test_message_submission(account: &Account, contract: &Contract) -> Result<(), Box> { - let msg = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 3, - stateRoot: FixedBytes::<32>::ZERO, - }; - - let mock_signature = FixedBytes::<64>::left_padding_from(&hex!("def1")); - - let _ = account - .call(contract.id(), "post_state_root_update_signature") - .args_json(json!({ "msg": msg, "signature": mock_signature.clone() })) - .transact() - .await?; - - let eth_address = account - .call(contract.id(), "get_eth_address") - .args_json(json!({"account_id": account.id() })) - .view() - .await? - .json::>()? - .expect("Stored Ethereum address is None"); - - let stored_messages = account - .call(contract.id(), "get_state_root_updates") - .args_json(json!({"rollup_id": msg.rollupId, "block_height": msg.blockHeight })) - .view() - .await? - .json::>>()? - .expect("Stored state root update messasges is None"); - - let stored_signature = account - .call(contract.id(), "get_message_signature") - .args_json(json!({"msg_hash": keccak256(&msg.abi_encode()), "eth_address": ð_address })) - .view() - .await? - .json::>>()? - .expect("Stored signature is None"); - - assert_eq!( - stored_messages, - vec![msg], - "The stored messages vector should be exactly the message that was included" - ); - assert_eq!( - stored_signature, mock_signature, - "The stored signature should be the one used in the message submission" - ); - - println!("Passed ✅ message submission"); - - Ok(()) -} diff --git a/contracts/near/sffl-agreement-registry/src/lib.rs b/contracts/near/sffl-agreement-registry/src/lib.rs deleted file mode 100644 index 08153942..00000000 --- a/contracts/near/sffl-agreement-registry/src/lib.rs +++ /dev/null @@ -1,1034 +0,0 @@ -use std::str::FromStr; - -use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; -use near_sdk::json_types::U128; -use near_sdk::serde::{Deserialize, Serialize}; -use near_sdk::store::{LookupMap, Vector}; -use near_sdk::{env, near_bindgen, AccountId, PanicOnDefault}; - -use alloy_primitives::{Address, FixedBytes}; -use alloy_sol_types::{eip712_domain, sol, Eip712Domain, SolStruct, SolValue}; -use near_sdk_contract_tools::{ - hook::Hook, standard::nep145::hooks::PredecessorStorageAccountingHook, standard::nep145::*, Nep145, -}; - -sol! { - #[derive(Serialize, Deserialize, PartialEq, Debug)] - #[serde(crate = "near_sdk::serde")] - struct StateRootUpdateMessage { - uint32 rollupId; - uint64 blockHeight; - uint64 timestamp; - bytes32 stateRoot; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - #[serde(crate = "near_sdk::serde")] - struct G1Point { - uint256 X; - uint256 Y; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - #[serde(crate = "near_sdk::serde")] - struct Operator { - G1Point pubkey; - uint128 weight; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - #[serde(crate = "near_sdk::serde")] - struct OperatorSetUpdateMessage { - uint64 id; - uint64 timestamp; - Operator[] operators; - } - - #[derive(Serialize, Deserialize, PartialEq, Debug)] - #[serde(crate = "near_sdk::serde")] - struct CheckpointTaskResponseMessage { - uint32 referenceTaskIndex; - bytes32 stateRootUpdatesRoot; - bytes32 operatorSetUpdatesRoot; - } - - #[derive(Serialize, Deserialize)] - #[serde(crate = "near_sdk::serde")] - struct EthNearAccountLink { - address ethAddress; - string nearAccountId; - } -} - -const DOMAIN: Eip712Domain = eip712_domain!( - name: "SFFL", - version: "0", -); - -macro_rules! sol_type_borsh { - ($name: ident) => { - impl BorshSerialize for $name { - #[inline] - fn serialize(&self, writer: &mut W) -> Result<(), std::io::Error> { - BorshSerialize::serialize(&$name::abi_encode(self), writer)?; - Ok(()) - } - } - - impl BorshDeserialize for $name { - #[inline] - fn deserialize(buf: &mut &[u8]) -> Result { - let encoded: Vec = BorshDeserialize::deserialize(buf)?; - let value = $name::abi_decode(encoded.as_slice(), true) - .map_err(|err| std::io::Error::new(std::io::ErrorKind::InvalidInput, err))?; - Ok(value) - } - } - }; -} - -sol_type_borsh!(StateRootUpdateMessage); -sol_type_borsh!(OperatorSetUpdateMessage); -sol_type_borsh!(CheckpointTaskResponseMessage); -sol_type_borsh!(EthNearAccountLink); - -#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault, Nep145)] -#[nep145] -#[near_bindgen] -pub struct SFFLAgreementRegistry { - operator_eth_address: LookupMap, - state_root_updates: LookupMap<(u32, u64), Vector>, - operator_set_updates: LookupMap>, - checkpoint_task_responses: LookupMap>, - message_signatures: LookupMap<[u8; 32], LookupMap<[u8; 20], [u8; 64]>>, -} - -#[near_bindgen] -impl SFFLAgreementRegistry { - #[init] - pub fn new() -> Self { - let mut _self = Self { - operator_eth_address: LookupMap::new(b"operator_eth_address".to_vec()), - state_root_updates: LookupMap::new(b"state_root_updates".to_vec()), - operator_set_updates: LookupMap::new(b"operator_set_updates".to_vec()), - checkpoint_task_responses: LookupMap::new(b"checkpoint_task_responses".to_vec()), - message_signatures: LookupMap::new(b"message_signatures".to_vec()), - }; - - Nep145Controller::set_storage_balance_bounds( - &mut _self, - &StorageBalanceBounds { - min: U128(0), - max: None, - }, - ); - - _self - } - - #[payable] - pub fn init_operator(&mut self, msg: &EthNearAccountLink, signature: &FixedBytes<64>, v: u8) { - PredecessorStorageAccountingHook::hook(self, &(), |contract| { - let signing_hash = msg.eip712_signing_hash(&DOMAIN); - let address = contract.ecrecover(&signing_hash, signature, v, true); - - if address != msg.ethAddress { - std::panic!("Wrong message address: expected {}, found {}", msg.ethAddress, address); - } - - let account_id = - AccountId::from_str(&msg.nearAccountId).unwrap_or_else(|_| std::panic!("Invalid account ID")); - - contract.operator_eth_address.insert(account_id, address.0 .0); - }) - } - - #[payable] - pub fn post_state_root_update_signature(&mut self, msg: StateRootUpdateMessage, signature: &FixedBytes<64>) { - PredecessorStorageAccountingHook::hook(self, &(), |contract| { - let eth_address = contract.caller_eth_address(); - let msg_hash = env::keccak256_array(&msg.abi_encode()); - - if !contract.push_bls_signature(&msg_hash, ð_address, &signature.0) { - let vec = contract.get_and_init_state_root_updates(msg.rollupId, msg.blockHeight); - vec.push(msg); - } - }) - } - - #[private] - fn get_and_init_state_root_updates( - &mut self, - rollup_id: u32, - block_height: u64, - ) -> &mut Vector { - self.state_root_updates - .entry((rollup_id, block_height)) - .or_insert_with(|| { - let prefix: Vec = [ - b"state_root_updates_vec".as_slice(), - rollup_id.to_be_bytes().as_slice(), - block_height.to_be_bytes().as_slice(), - ] - .concat(); - - Vector::new(prefix) - }) - } - - pub fn post_operator_set_update_signature(&mut self, msg: OperatorSetUpdateMessage, signature: &FixedBytes<64>) { - PredecessorStorageAccountingHook::hook(self, &(), |contract| { - let eth_address = contract.caller_eth_address(); - let msg_hash = env::keccak256_array(&msg.abi_encode()); - - if !contract.push_bls_signature(&msg_hash, ð_address, &signature.0) { - let vec = contract.get_and_init_operator_set_updates(msg.id); - vec.push(msg); - } - }) - } - - #[private] - fn get_and_init_operator_set_updates(&mut self, id: u64) -> &mut Vector { - self.operator_set_updates.entry(id).or_insert_with(|| { - let prefix: Vec = [b"operator_set_updates_vec".as_slice(), id.to_be_bytes().as_slice()].concat(); - - Vector::new(prefix) - }) - } - - pub fn post_checkpoint_signature(&mut self, msg: CheckpointTaskResponseMessage, signature: &FixedBytes<64>) { - PredecessorStorageAccountingHook::hook(self, &(), |contract| { - let eth_address = contract.caller_eth_address(); - let msg_hash = env::keccak256_array(&msg.abi_encode()); - - if !contract.push_bls_signature(&msg_hash, ð_address, &signature.0) { - let vec = contract.get_and_init_checkpoint_task_responses(msg.referenceTaskIndex); - vec.push(msg); - } - }) - } - - #[private] - fn get_and_init_checkpoint_task_responses( - &mut self, - reference_task_index: u32, - ) -> &mut Vector { - self.checkpoint_task_responses - .entry(reference_task_index) - .or_insert_with(|| { - let prefix: Vec = [ - b"checkpoint_task_responses_vec".as_slice(), - reference_task_index.to_be_bytes().as_slice(), - ] - .concat(); - - Vector::new(prefix) - }) - } - - pub fn get_eth_address(&self, account_id: &AccountId) -> Option
{ - self.operator_eth_address.get(&account_id).map(Address::from) - } - - pub fn get_state_root_updates(&self, rollup_id: u32, block_height: u64) -> Option> { - self.state_root_updates - .get(&(rollup_id, block_height)) - .and_then(|vector| Some(vector.iter().collect())) - } - - pub fn get_operator_set_updates(&self, id: u64) -> Option> { - self.operator_set_updates - .get(&id) - .and_then(|vector| Some(vector.iter().collect())) - } - - pub fn get_checkpoint_task_responses(&self, task_id: u32) -> Option> { - self.checkpoint_task_responses - .get(&task_id) - .and_then(|vector| Some(vector.iter().collect())) - } - - pub fn get_message_signature(&self, msg_hash: &FixedBytes<32>, eth_address: &Address) -> Option> { - self.message_signatures - .get(&msg_hash.0) - .and_then(|addr_to_sig| addr_to_sig.get(ð_address.0 .0)) - .map(FixedBytes::from) - } - - #[private] - fn caller_eth_address(&self) -> [u8; 20] { - *self - .operator_eth_address - .get(&env::predecessor_account_id()) - .unwrap_or_else(|| std::panic!("No known ethereum address")) - } - - #[private] - fn push_bls_signature(&mut self, msg_hash: &[u8; 32], eth_address: &[u8; 20], signature: &[u8; 64]) -> bool { - let mut had_key = true; - - let map = self.message_signatures.entry(*msg_hash).or_insert_with(|| { - had_key = false; - - let prefix: Vec = [b"message_signatures_map".as_slice(), msg_hash.as_slice()].concat(); - - LookupMap::new(prefix) - }); - - map.insert(*eth_address, signature.clone()); - - had_key - } - - #[private] - fn ecrecover( - &self, - msg_hash: &FixedBytes<32>, - signature: &FixedBytes<64>, - v: u8, - malleability_flag: bool, - ) -> Address { - match env::ecrecover(msg_hash.as_slice(), signature.as_slice(), v, malleability_flag) { - Some(pubkey) => { - let hash = env::keccak256_array(&pubkey); - - Address::from_slice(&hash[12..32]) - } - None => std::panic!("Invalid signature"), - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - use alloy_primitives::{hex, U256}; - use k256::{ecdsa::SigningKey, elliptic_curve::sec1::ToEncodedPoint, AffinePoint}; - use near_sdk::test_utils::VMContextBuilder; - use near_sdk::{testing_env, VMContext, ONE_NEAR}; - - fn secret_key_to_address(secret_key: &SigningKey) -> Address { - let public_key = secret_key.verifying_key(); - let affine: &AffinePoint = public_key.as_ref(); - let encoded = affine.to_encoded_point(false); - - Address::from_raw_public_key(&encoded.as_bytes()[1..]) - } - - fn get_context(account_id: AccountId) -> VMContext { - VMContextBuilder::new() - .predecessor_account_id(account_id) - .attached_deposit(ONE_NEAR) - .build() - } - - fn _storage_deposit(contract: &mut SFFLAgreementRegistry) { - contract.storage_deposit(None, None); - } - - fn _init_operator( - contract: &mut SFFLAgreementRegistry, - account_id: AccountId, - private_key: &[u8; 32], - msg: Option<&EthNearAccountLink>, - ) -> Address { - let signing_key = SigningKey::from_bytes(private_key.into()).unwrap(); - let eth_address = secret_key_to_address(&signing_key); - - let init_msg = EthNearAccountLink { - ethAddress: eth_address, - nearAccountId: account_id.to_string(), - }; - - let msg = msg.unwrap_or(&init_msg); - - let signing_hash = msg.eip712_signing_hash(&DOMAIN); - let (signature, recid) = signing_key.sign_prehash_recoverable(signing_hash.as_slice()).unwrap(); - - _storage_deposit(contract); - contract.init_operator( - &msg.clone(), - &FixedBytes::<64>::from_slice(signature.to_bytes().as_slice()), - u8::from(recid), - ); - - msg.ethAddress - } - - #[test] - fn init_operator() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - assert_eq!(contract.get_eth_address(&"alice.near".parse().unwrap()), None); - - let eth_address = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - assert_eq!( - contract.get_eth_address(&"alice.near".parse().unwrap()), - Some(eth_address) - ); - } - - #[test] - #[should_panic( - expected = "Wrong message address: expected 0x0000000000000000000000000000000000000000, found 0x2c7536E3605D9C16a7a3D7b1898e529396a65c23" - )] - fn init_operator_wrong_address() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let msg = EthNearAccountLink { - ethAddress: Address::ZERO, - nearAccountId: "alice.near".to_string(), - }; - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - Some(&msg), - ); - } - - #[test] - #[should_panic(expected = "Invalid account ID")] - fn init_operator_invalid_account_id() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let signing_key = - SigningKey::from_bytes(&hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318").into()) - .unwrap(); - let eth_address = secret_key_to_address(&signing_key); - - let msg = EthNearAccountLink { - ethAddress: eth_address, - nearAccountId: String::from_str("").unwrap(), - }; - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - Some(&msg), - ); - } - - #[test] - #[should_panic(expected = "No known ethereum address")] - fn post_state_root_update_signature_no_eth_address() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let msg = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 3, - stateRoot: FixedBytes::<32>::ZERO, - }; - - _storage_deposit(&mut contract); - contract.post_state_root_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - } - - #[test] - fn post_state_root_update_signature_unexisting_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let eth_address = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 3, - stateRoot: FixedBytes::<32>::ZERO, - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!(contract.get_state_root_updates(msg.rollupId, msg.blockHeight), None); - - contract.post_state_root_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!( - contract.get_state_root_updates(msg.rollupId, msg.blockHeight), - Some(vec![&msg]) - ); - } - - #[test] - fn post_state_root_update_signature_existing_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 3, - stateRoot: FixedBytes::<32>::ZERO, - }; - - contract.post_state_root_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_state_root_updates(msg.rollupId, msg.blockHeight), - Some(vec![&msg]) - ); - - contract.post_state_root_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!( - contract.get_state_root_updates(msg.rollupId, msg.blockHeight), - Some(vec![&msg]) - ); - } - - #[test] - fn post_state_root_update_signature_existing_header() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 3, - stateRoot: FixedBytes::<32>::ZERO, - }; - - contract.post_state_root_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - let msg2 = StateRootUpdateMessage { - rollupId: 1, - blockHeight: 2, - timestamp: 4, - stateRoot: FixedBytes::<32>::left_padding_from(&hex!("f00d")), - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_state_root_updates(msg.rollupId, msg.blockHeight), - Some(vec![&msg]) - ); - - let mock_sig = FixedBytes::<64>::left_padding_from(&hex!("abcd")); - - contract.post_state_root_update_signature(msg2.clone(), &mock_sig); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - Some(mock_sig) - ); - assert_eq!( - contract.get_state_root_updates(msg.rollupId, msg.blockHeight), - Some(vec![&msg.clone(), &msg2]) - ); - } - - #[test] - #[should_panic(expected = "No known ethereum address")] - fn post_operator_set_update_signature_no_eth_address() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let msg = OperatorSetUpdateMessage { - id: 1, - timestamp: 2, - operators: vec![], - }; - - _storage_deposit(&mut contract); - contract.post_operator_set_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - } - - #[test] - fn post_operator_set_update_signature_unexisting_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let eth_address = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = OperatorSetUpdateMessage { - id: 1, - timestamp: 2, - operators: vec![], - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!(contract.get_operator_set_updates(msg.id), None); - - contract.post_operator_set_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!(contract.get_operator_set_updates(msg.id), Some(vec![&msg])); - } - - #[test] - fn post_operator_set_update_signature_existing_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = OperatorSetUpdateMessage { - id: 1, - timestamp: 2, - operators: vec![], - }; - - contract.post_operator_set_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!(contract.get_operator_set_updates(msg.id), Some(vec![&msg])); - - contract.post_operator_set_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!(contract.get_operator_set_updates(msg.id), Some(vec![&msg])); - } - - #[test] - fn post_operator_set_update_signature_existing_header() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = OperatorSetUpdateMessage { - id: 1, - timestamp: 2, - operators: vec![], - }; - - contract.post_operator_set_update_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - let msg2 = OperatorSetUpdateMessage { - id: 1, - timestamp: 3, - operators: vec![Operator { - pubkey: G1Point { - X: U256::ZERO, - Y: U256::ZERO, - }, - weight: 0, - }], - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - None - ); - assert_eq!(contract.get_operator_set_updates(msg.id), Some(vec![&msg])); - - let mock_sig = FixedBytes::<64>::left_padding_from(&hex!("abcd")); - - contract.post_operator_set_update_signature(msg2.clone(), &mock_sig); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - Some(mock_sig) - ); - assert_eq!( - contract.get_operator_set_updates(msg.id), - Some(vec![&msg.clone(), &msg2]) - ); - } - - #[test] - #[should_panic(expected = "No known ethereum address")] - fn post_checkpoint_signature_no_eth_address() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let msg = CheckpointTaskResponseMessage { - referenceTaskIndex: 1, - stateRootUpdatesRoot: FixedBytes::<32>::ZERO, - operatorSetUpdatesRoot: FixedBytes::<32>::ZERO, - }; - - _storage_deposit(&mut contract); - contract.post_checkpoint_signature(msg.clone(), &FixedBytes::<64>::ZERO); - } - - #[test] - fn post_checkpoint_signature_unexisting_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let eth_address = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = CheckpointTaskResponseMessage { - referenceTaskIndex: 1, - stateRootUpdatesRoot: FixedBytes::<32>::ZERO, - operatorSetUpdatesRoot: FixedBytes::<32>::ZERO, - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!(contract.get_checkpoint_task_responses(msg.referenceTaskIndex), None); - - contract.post_checkpoint_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!( - contract.get_checkpoint_task_responses(msg.referenceTaskIndex), - Some(vec![&msg]) - ); - } - - #[test] - fn post_checkpoint_signature_existing_message() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = CheckpointTaskResponseMessage { - referenceTaskIndex: 1, - stateRootUpdatesRoot: FixedBytes::<32>::ZERO, - operatorSetUpdatesRoot: FixedBytes::<32>::ZERO, - }; - - contract.post_checkpoint_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_checkpoint_task_responses(msg.referenceTaskIndex), - Some(vec![&msg]) - ); - - contract.post_checkpoint_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - Some(FixedBytes::<64>::ZERO) - ); - assert_eq!( - contract.get_checkpoint_task_responses(msg.referenceTaskIndex), - Some(vec![&msg]) - ); - } - - #[test] - fn post_checkpoint_signature_existing_header() { - let context = get_context("alice.near".parse().unwrap()); - testing_env!(context); - - let mut contract = SFFLAgreementRegistry::new(); - - let _ = _init_operator( - &mut contract, - "alice.near".parse().unwrap(), - &hex!("4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"), - None, - ); - - let msg = CheckpointTaskResponseMessage { - referenceTaskIndex: 1, - stateRootUpdatesRoot: FixedBytes::<32>::ZERO, - operatorSetUpdatesRoot: FixedBytes::<32>::ZERO, - }; - - contract.post_checkpoint_signature(msg.clone(), &FixedBytes::<64>::ZERO); - - let context = get_context("bob.near".parse().unwrap()); - testing_env!(context); - - let eth_address = _init_operator( - &mut contract, - "bob.near".parse().unwrap(), - &hex!("24341428553285e10e74a5f26f4638ac53afb28c032aff1a04900e6eb115a404"), - None, - ); - - let msg2 = CheckpointTaskResponseMessage { - referenceTaskIndex: 1, - stateRootUpdatesRoot: FixedBytes::<32>::left_padding_from(&hex!("def1")), - operatorSetUpdatesRoot: FixedBytes::<32>::left_padding_from(&hex!("f00d")), - }; - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_checkpoint_task_responses(msg.referenceTaskIndex), - Some(vec![&msg]) - ); - - let mock_sig = FixedBytes::<64>::left_padding_from(&hex!("abcd")); - - contract.post_checkpoint_signature(msg2.clone(), &mock_sig); - - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg.abi_encode())), - ð_address - ), - None - ); - assert_eq!( - contract.get_message_signature( - &FixedBytes::<32>::from(env::keccak256_array(&msg2.abi_encode())), - ð_address - ), - Some(mock_sig) - ); - assert_eq!( - contract.get_checkpoint_task_responses(msg.referenceTaskIndex), - Some(vec![&msg.clone(), &msg2]) - ); - } -} diff --git a/contracts/near/sffl-agreement-registry/test.sh b/contracts/near/sffl-agreement-registry/test.sh deleted file mode 100755 index 7e705af7..00000000 --- a/contracts/near/sffl-agreement-registry/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# unit testing -cargo test - -# sandbox testing -./build.sh -cd sandbox-rs -cargo run --example sandbox "../../../../target/wasm32-unknown-unknown/release/sffl_agreement_registry.wasm" \ No newline at end of file diff --git a/core/chainio/avs_subscriber.go b/core/chainio/avs_subscriber.go index e1dd5c99..b11f9557 100644 --- a/core/chainio/avs_subscriber.go +++ b/core/chainio/avs_subscriber.go @@ -40,7 +40,7 @@ func BuildAvsSubscriber(registryCoordinatorAddr, blsOperatorStateRetrieverAddr g return nil, err } - avsRegistrySubscriber, err := avsregistry.NewAvsRegistryChainSubscriber(avsContractBindings.BlsApkRegistry, logger) + avsRegistrySubscriber, err := avsregistry.NewAvsRegistryChainSubscriber(logger, avsContractBindings.RegistryCoordinator, avsContractBindings.BlsApkRegistry) if err != nil { logger.Error("Failed to create chain registry subscriber", "err", err) return nil, err diff --git a/core/chainio/bindings.go b/core/chainio/bindings.go index 8d1e5cb4..98305f73 100644 --- a/core/chainio/bindings.go +++ b/core/chainio/bindings.go @@ -3,19 +3,21 @@ package chainio import ( "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" blsapkreg "github.com/Layr-Labs/eigensdk-go/contracts/bindings/BLSApkRegistry" + regcoord "github.com/Layr-Labs/eigensdk-go/contracts/bindings/RegistryCoordinator" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" erc20mock "github.com/NethermindEth/near-sffl/contracts/bindings/ERC20Mock" opsetupdatereg "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLOperatorSetUpdateRegistry" - regcoord "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLRegistryCoordinator" + sfflregcoord "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLRegistryCoordinator" csservicemanager "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLServiceManager" taskmanager "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLTaskManager" ) type AvsManagersBindings struct { - RegistryCoordinator *regcoord.ContractSFFLRegistryCoordinator + RegistryCoordinator *regcoord.ContractRegistryCoordinator + SFFLRegistryCoordinator *sfflregcoord.ContractSFFLRegistryCoordinator OperatorSetUpdateRegistry *opsetupdatereg.ContractSFFLOperatorSetUpdateRegistry TaskManager *taskmanager.ContractSFFLTaskManager ServiceManager *csservicemanager.ContractSFFLServiceManager @@ -25,7 +27,12 @@ type AvsManagersBindings struct { } func NewAvsManagersBindings(registryCoordinatorAddr, operatorStateRetrieverAddr common.Address, ethclient eth.Client, logger logging.Logger) (*AvsManagersBindings, error) { - contractRegistryCoordinator, err := regcoord.NewContractSFFLRegistryCoordinator(registryCoordinatorAddr, ethclient) + contractSfflRegistryCoordinator, err := sfflregcoord.NewContractSFFLRegistryCoordinator(registryCoordinatorAddr, ethclient) + if err != nil { + return nil, err + } + + contractRegistryCoordinator, err := regcoord.NewContractRegistryCoordinator(registryCoordinatorAddr, ethclient) if err != nil { return nil, err } @@ -52,7 +59,7 @@ func NewAvsManagersBindings(registryCoordinatorAddr, operatorStateRetrieverAddr return nil, err } - operatorSetUpdateRegistryAddr, err := contractRegistryCoordinator.OperatorSetUpdateRegistry(&bind.CallOpts{}) + operatorSetUpdateRegistryAddr, err := contractSfflRegistryCoordinator.OperatorSetUpdateRegistry(&bind.CallOpts{}) if err != nil { return nil, err } @@ -75,6 +82,7 @@ func NewAvsManagersBindings(registryCoordinatorAddr, operatorStateRetrieverAddr return &AvsManagersBindings{ RegistryCoordinator: contractRegistryCoordinator, + SFFLRegistryCoordinator: contractSfflRegistryCoordinator, OperatorSetUpdateRegistry: contractOperatorSetUpdateRegistry, ServiceManager: contractServiceManager, TaskManager: contractTaskManager, diff --git a/core/chainio/el_reader.go b/core/chainio/el_reader.go new file mode 100644 index 00000000..37d06f98 --- /dev/null +++ b/core/chainio/el_reader.go @@ -0,0 +1,53 @@ +package chainio + +import ( + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" + "github.com/Layr-Labs/eigensdk-go/chainio/utils" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +func BuildElReader( + registryCoordinatorAddress common.Address, + operatorStateRetrieverAddress common.Address, + ethHttpClient eth.Client, + logger logging.Logger, +) (*elcontracts.ELChainReader, error) { + avsRegistryContractBindings, err := utils.NewAVSRegistryContractBindings(registryCoordinatorAddress, operatorStateRetrieverAddress, ethHttpClient, logger) + if err != nil { + return nil, err + } + + delegationManagerAddr, err := avsRegistryContractBindings.StakeRegistry.Delegation(&bind.CallOpts{}) + if err != nil { + return nil, err + } + + avsDirectoryAddr, err := avsRegistryContractBindings.ServiceManager.AvsDirectory(&bind.CallOpts{}) + if err != nil { + return nil, err + } + + elContractBindings, err := utils.NewEigenlayerContractBindings( + delegationManagerAddr, + avsDirectoryAddr, + ethHttpClient, + logger, + ) + if err != nil { + return nil, err + } + + elChainReader := elcontracts.NewELChainReader( + elContractBindings.Slasher, + elContractBindings.DelegationManager, + elContractBindings.StrategyManager, + elContractBindings.AvsDirectory, + logger, + ethHttpClient, + ) + + return elChainReader, nil +} diff --git a/core/chainio/el_writer.go b/core/chainio/el_writer.go new file mode 100644 index 00000000..9e3ea89d --- /dev/null +++ b/core/chainio/el_writer.go @@ -0,0 +1,67 @@ +package chainio + +import ( + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" + "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" + "github.com/Layr-Labs/eigensdk-go/chainio/utils" + "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +func BuildElWriter( + registryCoordinatorAddress common.Address, + operatorStateRetrieverAddress common.Address, + txMgr *txmgr.SimpleTxManager, + ethHttpClient eth.Client, + logger logging.Logger, +) (*elcontracts.ELChainWriter, error) { + avsRegistryContractBindings, err := utils.NewAVSRegistryContractBindings(registryCoordinatorAddress, operatorStateRetrieverAddress, ethHttpClient, logger) + if err != nil { + return nil, err + } + + delegationManagerAddr, err := avsRegistryContractBindings.StakeRegistry.Delegation(&bind.CallOpts{}) + if err != nil { + return nil, err + } + + avsDirectoryAddr, err := avsRegistryContractBindings.ServiceManager.AvsDirectory(&bind.CallOpts{}) + if err != nil { + return nil, err + } + + elContractBindings, err := utils.NewEigenlayerContractBindings( + delegationManagerAddr, + avsDirectoryAddr, + ethHttpClient, + logger, + ) + if err != nil { + return nil, err + } + + elChainReader := elcontracts.NewELChainReader( + elContractBindings.Slasher, + elContractBindings.DelegationManager, + elContractBindings.StrategyManager, + elContractBindings.AvsDirectory, + logger, + ethHttpClient, + ) + + elChainWriter := elcontracts.NewELChainWriter( + elContractBindings.Slasher, + elContractBindings.DelegationManager, + elContractBindings.StrategyManager, + elContractBindings.StrategyManagerAddr, + elChainReader, + ethHttpClient, + logger, + nil, + txMgr, + ) + + return elChainWriter, nil +} diff --git a/core/chainio/mocks/avs_reader.go b/core/chainio/mocks/avs_reader.go index c220990b..0ff5beeb 100644 --- a/core/chainio/mocks/avs_reader.go +++ b/core/chainio/mocks/avs_reader.go @@ -334,3 +334,18 @@ func (mr *MockAvsReadererMockRecorder) QueryExistingRegisteredOperatorPubKeys(ar mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryExistingRegisteredOperatorPubKeys", reflect.TypeOf((*MockAvsReaderer)(nil).QueryExistingRegisteredOperatorPubKeys), arg0, arg1, arg2) } + +// QueryExistingRegisteredOperatorSockets mocks base method. +func (m *MockAvsReaderer) QueryExistingRegisteredOperatorSockets(arg0 context.Context, arg1, arg2 *big.Int) (map[types.Bytes32]types.Socket, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryExistingRegisteredOperatorSockets", arg0, arg1, arg2) + ret0, _ := ret[0].(map[types.Bytes32]types.Socket) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryExistingRegisteredOperatorSockets indicates an expected call of QueryExistingRegisteredOperatorSockets. +func (mr *MockAvsReadererMockRecorder) QueryExistingRegisteredOperatorSockets(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryExistingRegisteredOperatorSockets", reflect.TypeOf((*MockAvsReaderer)(nil).QueryExistingRegisteredOperatorSockets), arg0, arg1, arg2) +} diff --git a/core/chainio/mocks/avs_subscriber.go b/core/chainio/mocks/avs_subscriber.go index 53966183..e858c7a5 100644 --- a/core/chainio/mocks/avs_subscriber.go +++ b/core/chainio/mocks/avs_subscriber.go @@ -11,6 +11,8 @@ package mocks import ( reflect "reflect" + contractBLSApkRegistry "github.com/Layr-Labs/eigensdk-go/contracts/bindings/BLSApkRegistry" + contractRegistryCoordinator "github.com/Layr-Labs/eigensdk-go/contracts/bindings/RegistryCoordinator" contractSFFLOperatorSetUpdateRegistry "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLOperatorSetUpdateRegistry" contractSFFLTaskManager "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLTaskManager" types "github.com/ethereum/go-ethereum/core/types" @@ -56,6 +58,22 @@ func (mr *MockAvsSubscribererMockRecorder) ParseCheckpointTaskResponded(arg0 any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseCheckpointTaskResponded", reflect.TypeOf((*MockAvsSubscriberer)(nil).ParseCheckpointTaskResponded), arg0) } +// SubscribeToNewPubkeyRegistrations mocks base method. +func (m *MockAvsSubscriberer) SubscribeToNewPubkeyRegistrations() (chan *contractBLSApkRegistry.ContractBLSApkRegistryNewPubkeyRegistration, event.Subscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeToNewPubkeyRegistrations") + ret0, _ := ret[0].(chan *contractBLSApkRegistry.ContractBLSApkRegistryNewPubkeyRegistration) + ret1, _ := ret[1].(event.Subscription) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// SubscribeToNewPubkeyRegistrations indicates an expected call of SubscribeToNewPubkeyRegistrations. +func (mr *MockAvsSubscribererMockRecorder) SubscribeToNewPubkeyRegistrations() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeToNewPubkeyRegistrations", reflect.TypeOf((*MockAvsSubscriberer)(nil).SubscribeToNewPubkeyRegistrations)) +} + // SubscribeToNewTasks mocks base method. func (m *MockAvsSubscriberer) SubscribeToNewTasks(arg0 chan *contractSFFLTaskManager.ContractSFFLTaskManagerCheckpointTaskCreated) (event.Subscription, error) { m.ctrl.T.Helper() @@ -86,6 +104,22 @@ func (mr *MockAvsSubscribererMockRecorder) SubscribeToOperatorSetUpdates(arg0 an return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeToOperatorSetUpdates", reflect.TypeOf((*MockAvsSubscriberer)(nil).SubscribeToOperatorSetUpdates), arg0) } +// SubscribeToOperatorSocketUpdates mocks base method. +func (m *MockAvsSubscriberer) SubscribeToOperatorSocketUpdates() (chan *contractRegistryCoordinator.ContractRegistryCoordinatorOperatorSocketUpdate, event.Subscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeToOperatorSocketUpdates") + ret0, _ := ret[0].(chan *contractRegistryCoordinator.ContractRegistryCoordinatorOperatorSocketUpdate) + ret1, _ := ret[1].(event.Subscription) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// SubscribeToOperatorSocketUpdates indicates an expected call of SubscribeToOperatorSocketUpdates. +func (mr *MockAvsSubscribererMockRecorder) SubscribeToOperatorSocketUpdates() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeToOperatorSocketUpdates", reflect.TypeOf((*MockAvsSubscriberer)(nil).SubscribeToOperatorSocketUpdates)) +} + // SubscribeToTaskResponses mocks base method. func (m *MockAvsSubscriberer) SubscribeToTaskResponses(arg0 chan *contractSFFLTaskManager.ContractSFFLTaskManagerCheckpointTaskResponded) (event.Subscription, error) { m.ctrl.T.Helper() diff --git a/core/config/config.go b/core/config/config.go index d7f1f48c..83245507 100644 --- a/core/config/config.go +++ b/core/config/config.go @@ -119,7 +119,11 @@ func NewConfig(ctx *cli.Context, configRaw ConfigRaw, logger sdklogging.Logger) if _, err := os.Stat(sfflDeploymentFilePath); errors.Is(err, os.ErrNotExist) { panic("Path " + sfflDeploymentFilePath + " does not exist") } - sdkutils.ReadJsonConfig(sfflDeploymentFilePath, &sfflDeploymentRaw) + err := sdkutils.ReadJsonConfig(sfflDeploymentFilePath, &sfflDeploymentRaw) + if err != nil { + logger.Error("Cannot read JSON config", "err", err) + return nil, err + } ecdsaPrivateKeyString := ctx.GlobalString(EcdsaPrivateKeyFlag.Name) if ecdsaPrivateKeyString[:2] == "0x" { diff --git a/core/safeclient/client_test.go b/core/safeclient/client_test.go index a4f97d4d..47e6facb 100644 --- a/core/safeclient/client_test.go +++ b/core/safeclient/client_test.go @@ -24,6 +24,7 @@ import ( type MockNetwork struct { blockTicker *time.Ticker blockNum uint64 + blockNumLock sync.Mutex blockSubscribers []chan<- uint64 blockSubscribersLock sync.Mutex } @@ -44,12 +45,14 @@ func NewMockNetwork(ctx context.Context, mockCtrl *gomock.Controller) *MockNetwo case <-ctx.Done(): return case <-mockNetwork.blockTicker.C: + mockNetwork.blockNumLock.Lock() mockNetwork.blockNum++ + mockNetwork.blockNumLock.Unlock() + + mockNetwork.blockSubscribersLock.Lock() for _, ch := range mockNetwork.blockSubscribers { ch <- mockNetwork.blockNum } - - mockNetwork.blockSubscribersLock.Lock() mockNetwork.blockSubscribers = nil mockNetwork.blockSubscribersLock.Unlock() } @@ -72,11 +75,15 @@ func (m *MockNetwork) ResumeBlockProduction() { } func (m *MockNetwork) BlockNumber() uint64 { + m.blockNumLock.Lock() + defer m.blockNumLock.Unlock() + return m.blockNum } type MockEthClient struct { *mocks.MockEthClient + stateLock sync.Mutex isClosed bool isPaused bool closeSubscribers []chan<- bool @@ -113,14 +120,23 @@ func (m *MockNetwork) SubscribeToBlocks() <-chan uint64 { } func (m *MockEthClient) ReopenConnection() { + m.stateLock.Lock() + defer m.stateLock.Unlock() + m.isClosed = false } func (m *MockEthClient) PauseHeaderSubscriptions() { + m.stateLock.Lock() + defer m.stateLock.Unlock() + m.isPaused = true } func (m *MockEthClient) ResumeHeaderSubscriptions() { + m.stateLock.Lock() + defer m.stateLock.Unlock() + m.isPaused = false } @@ -143,7 +159,11 @@ func NewMockEthClientFromNetwork(ctx context.Context, mockCtrl *gomock.Controlle mockClient.EXPECT().SubscribeNewHead(gomock.Any(), gomock.Any()).DoAndReturn( func(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) { - if mockClient.isClosed { + mockClient.stateLock.Lock() + isClosed := mockClient.isClosed + mockClient.stateLock.Unlock() + + if isClosed { return nil, errors.New("connection refused") } @@ -175,15 +195,20 @@ func NewMockEthClientFromNetwork(ctx context.Context, mockCtrl *gomock.Controlle subErrCh <- errors.New("connection refused") } case blockNum := <-blockCh: - fmt.Println("header block", blockNum, "closed", mockClient.isClosed, "paused", mockClient.isPaused) + mockClient.stateLock.Lock() + isClosed := mockClient.isClosed + isPaused := mockClient.isPaused + mockClient.stateLock.Unlock() + + fmt.Println("header block", blockNum, "closed", isClosed, "paused", isPaused) blockCh = mockNetwork.SubscribeToBlocks() - if mockClient.isClosed { + if isClosed { continue } - if !mockClient.isPaused { + if !isPaused { ch <- &types.Header{Number: big.NewInt(int64(blockNum))} } } @@ -195,7 +220,10 @@ func NewMockEthClientFromNetwork(ctx context.Context, mockCtrl *gomock.Controlle mockClient.EXPECT().SubscribeFilterLogs(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn( func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { - if mockClient.isClosed { + mockClient.stateLock.Lock() + isClosed := mockClient.isClosed + mockClient.stateLock.Unlock() + if isClosed { return nil, errors.New("connection refused") } @@ -234,7 +262,10 @@ func NewMockEthClientFromNetwork(ctx context.Context, mockCtrl *gomock.Controlle blockCh = mockNetwork.SubscribeToBlocks() - if mockClient.isClosed { + mockClient.stateLock.Lock() + isClosed := mockClient.isClosed + mockClient.stateLock.Unlock() + if isClosed { continue } @@ -250,6 +281,9 @@ func NewMockEthClientFromNetwork(ctx context.Context, mockCtrl *gomock.Controlle mockClient.EXPECT().BlockNumber(gomock.Any()).DoAndReturn( func(ctx context.Context) (uint64, error) { + mockNetwork.blockNumLock.Lock() + defer mockNetwork.blockNumLock.Unlock() + return mockNetwork.blockNum, nil }, ).AnyTimes() @@ -414,8 +448,7 @@ func TestSubscribeNewHead(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger, err := logging.NewZapLogger("development") - assert.NoError(t, err) + logger := logging.NewNoopLogger() mockNetwork := NewMockNetwork(ctx, mockCtrl) @@ -427,13 +460,17 @@ func TestSubscribeNewHead(t *testing.T) { mockClient := client.Client.(*MockEthClient) headCh := make(chan *types.Header) - flushHeadCh := func() { - select { - case <-headCh: - case <-time.After(100 * time.Millisecond): + flushHeadCh := func() int { + headCount := 0 + for { + select { + case <-headCh: + headCount++ + case <-time.After(2 * time.Second): + return headCount + } } } - _, err = client.SubscribeNewHead(ctx, headCh) assert.NoError(t, err) @@ -454,7 +491,8 @@ func TestSubscribeNewHead(t *testing.T) { mockNetwork.PauseBlockProduction() block := mockNetwork.BlockNumber() - flushHeadCh() + flushedHeadCount := flushHeadCh() + fmt.Println("flushed", flushedHeadCount) mockNetwork.ResumeBlockProduction() for i := block + 1; i <= block+3; i++ { @@ -470,7 +508,8 @@ func TestSubscribeNewHead(t *testing.T) { mockNetwork.PauseBlockProduction() block = mockNetwork.BlockNumber() - flushHeadCh() + flushedHeadCount = flushHeadCh() + fmt.Println("flushed", flushedHeadCount) mockNetwork.ResumeBlockProduction() for i := block + 1; i <= block+3; i++ { @@ -486,7 +525,8 @@ func TestSubscribeNewHead(t *testing.T) { mockNetwork.PauseBlockProduction() block = mockNetwork.BlockNumber() - flushHeadCh() + flushedHeadCount = flushHeadCh() + fmt.Println("flushed", flushedHeadCount) mockNetwork.ResumeBlockProduction() for i := block + 1; i <= block+3; i++ { @@ -504,8 +544,7 @@ func TestSubscribeFilterLogs(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger, err := logging.NewZapLogger("development") - assert.NoError(t, err) + logger := logging.NewNoopLogger() mockNetwork := NewMockNetwork(ctx, mockCtrl) @@ -517,10 +556,15 @@ func TestSubscribeFilterLogs(t *testing.T) { mockClient := client.Client.(*MockEthClient) logCh := make(chan types.Log) - flushLogCh := func() { - select { - case <-logCh: - case <-time.After(100 * time.Millisecond): + flushLogCh := func() int { + logCount := 0 + for { + select { + case <-logCh: + logCount++ + case <-time.After(2 * time.Second): + return logCount + } } } @@ -540,7 +584,9 @@ func TestSubscribeFilterLogs(t *testing.T) { mockNetwork.PauseBlockProduction() block := mockNetwork.BlockNumber() - flushLogCh() + fmt.Println("network paused", "block", block) + flushedLogCount := flushLogCh() + fmt.Println("flushed", flushedLogCount) mockNetwork.ResumeBlockProduction() for i := block + 1; i <= block+3; i++ { @@ -556,7 +602,9 @@ func TestSubscribeFilterLogs(t *testing.T) { mockNetwork.PauseBlockProduction() block = mockNetwork.BlockNumber() - flushLogCh() + fmt.Println("Network paused at block number", block) + flushedLogCount = flushLogCh() + fmt.Println("flushLogCh", "flushed", flushedLogCount, "logs") mockNetwork.ResumeBlockProduction() for i := block + 1; i <= block+3; i++ { @@ -574,8 +622,7 @@ func TestLogCache(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - logger, err := logging.NewZapLogger("development") - assert.NoError(t, err) + logger := logging.NewNoopLogger() blockNum := uint64(0) headerProxyC := make(chan *types.Header) @@ -617,3 +664,101 @@ func TestLogCache(t *testing.T) { log = <-logCh assert.Equal(t, uint64(2), log.BlockNumber) } + +func TestSubscribeFilterLogs_Unsubscribe(t *testing.T) { + logger, err := logging.NewZapLogger("development") + assert.NoError(t, err) + + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + mockClient := mocks.NewMockEthClient(mockCtrl) + mockClient.EXPECT().BlockNumber(gomock.Any()).Return(uint64(1_000), nil) + mockClient.EXPECT().SubscribeFilterLogs(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn( + func(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { + errChann := make(chan error) + + sub := mocks.NewMockSubscription(mockCtrl) + sub.EXPECT().Unsubscribe().Do(func() { close(errChann) }) + sub.EXPECT().Err().Return(errChann) + + return sub, nil + }, + ) + + client, err := safeclient.NewSafeEthClient("", logger, safeclient.WithCustomCreateClient(func(string, logging.Logger) (eth.Client, error) { return mockClient, nil })) + assert.NoError(t, err) + assert.NotNil(t, client) + defer client.Close() + + filterQuery := ethereum.FilterQuery{ + FromBlock: big.NewInt(900), + ToBlock: big.NewInt(1_100), + } + logCh := make(chan types.Log) + + sub, err := client.SubscribeFilterLogs(context.Background(), filterQuery, logCh) + assert.NoError(t, err) + assert.NotNil(t, sub) +} + +func TestSubscribeFilterLogs_ErrorInSubscription_Resubscribe(t *testing.T) { + logger, err := logging.NewZapLogger("development") + assert.NoError(t, err) + + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + mockClient := mocks.NewMockEthClient(mockCtrl) + mockClient.EXPECT().BlockNumber(gomock.Any()).Return(uint64(1_000), nil).Times(2) + + var triggerError func() + mockClient.EXPECT().SubscribeFilterLogs(gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn( + func(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { + sub := mocks.NewMockSubscription(mockCtrl) + errChan := make(chan error) + triggerError = func() { + errChan <- errors.New("error") + } + sub.EXPECT().Unsubscribe().Do(func() { close(errChan) }) + sub.EXPECT().Err().Return(errChan) + + return sub, nil + }, + ).Times(2) // First subscription + one resubscription + + client, err := safeclient.NewSafeEthClient("", logger, safeclient.WithCustomCreateClient(func(string, logging.Logger) (eth.Client, error) { return mockClient, nil })) + assert.NoError(t, err) + assert.NotNil(t, client) + defer client.Close() + + filterQuery := ethereum.FilterQuery{ + FromBlock: big.NewInt(900), + ToBlock: big.NewInt(1_100), + } + logCh := make(chan types.Log) + + sub, err := client.SubscribeFilterLogs(context.Background(), filterQuery, logCh) + assert.NoError(t, err) + assert.NotNil(t, sub) + + triggerError() +} + +func TestSafeSubscription_ConcurrentUnsubscribe(t *testing.T) { + mockCtrl := gomock.NewController(t) + sub := mocks.NewMockSubscription(mockCtrl) + sub.EXPECT().Unsubscribe().Times(1) + + safeSub := safeclient.NewSafeSubscription(sub) + + var wg sync.WaitGroup + for i := 1; i <= 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + safeSub.Unsubscribe() + }() + } + wg.Wait() +} diff --git a/docker-compose.yml b/docker-compose.yml index 27b82cbd..5368de28 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,9 +35,9 @@ services: command: --host 0.0.0.0 --port 8545 --chain-id 1 --block-time 5 --load-state /root/.anvil/state.json healthcheck: test: ["CMD", "nc", "-zv", "0.0.0.0", "8545"] - interval: 2s - timeout: 30s - retries: 15 + interval: 15s + timeout: 10s + retries: 5 networks: - near-sffl @@ -69,9 +69,9 @@ services: command: --host 0.0.0.0 --port 8546 --chain-id 2 --block-time 5 --load-state /root/.anvil/state.json healthcheck: test: ["CMD", "nc", "-zv", "0.0.0.0", "8546"] - interval: 2s - timeout: 30s - retries: 15 + interval: 15s + timeout: 10s + retries: 5 networks: - near-sffl @@ -219,6 +219,20 @@ services: networks: - near-sffl + agreator-health: + image: debian:bookworm + depends_on: + aggregator: + condition: service_started + command: sh -c "apt update && apt install -y netcat-traditional && sleep infinity" + healthcheck: + test: ["CMD", "nc", "-zv", "near-sffl-aggregator", "9091"] + interval: 15s + timeout: 10s + retries: 5 + networks: + - near-sffl + operator0: image: near-sffl-operator container_name: near-sffl-operator0 @@ -249,9 +263,9 @@ services: command: sh -c "apt update && apt install -y netcat-traditional && sleep infinity" healthcheck: test: ["CMD", "nc", "-zv", "near-sffl-operator0", "9090"] - interval: 5s - timeout: 75s - retries: 15 + interval: 15s + timeout: 10s + retries: 5 networks: - near-sffl @@ -281,9 +295,9 @@ services: command: sh -c "apt update && apt install -y netcat-traditional && sleep infinity" healthcheck: test: ["CMD", "nc", "-zv", "near-sffl-operator1", "9091"] - interval: 5s - timeout: 75s - retries: 15 + interval: 15s + timeout: 10s + retries: 5 networks: - near-sffl diff --git a/docs/docs/deployments.md b/docs/docs/deployments.md index 45cbc6b9..2c2309a0 100644 --- a/docs/docs/deployments.md +++ b/docs/docs/deployments.md @@ -8,7 +8,7 @@ sidebar_position: 5 :::info -While the opt-in process for NEAR SFFL is currently underway - see +While the opt-in process for NEAR NFFL is currently underway - see [Registration](./operator/registration) - the testnet is not completely operational just yet. diff --git a/docs/docs/design/faults.md b/docs/docs/design/faults.md index b034c95d..ad8445b3 100644 --- a/docs/docs/design/faults.md +++ b/docs/docs/design/faults.md @@ -84,7 +84,7 @@ its own flow. An operator set update message is invalid when the operator set update delta for a specific update ID either does not exist (the ID itself is invalid) or -is wrong. This is directly done through the SFFL contracts, which include +is wrong. This is directly done through the NFFL contracts, which include methods for examining operator set updates individually, and does not require any extra parameters. diff --git a/docs/docs/design/incentives.md b/docs/docs/design/incentives.md index ce208bc9..b76d83b0 100644 --- a/docs/docs/design/incentives.md +++ b/docs/docs/design/incentives.md @@ -15,12 +15,12 @@ discuss the factors that will inform the reward scheme and slashing design. ## Operating the Network -To design the optimal incentive structure for SFFL AVS, we must understand the -costs of the SFFL nodes to run the protocol. +To design the optimal incentive structure for NFFL AVS, we must understand the +costs of the NFFL nodes to run the protocol. -The SFFL nodes stake Ethereum by getting delegations from staked Ethereum +The NFFL nodes stake Ethereum by getting delegations from staked Ethereum holders. In addition to the stake run off-chain software, namely 1) rollup full -nodes 2) SFFL nodes and 3) Aggregator node. As such, it's vital for the +nodes 2) NFFL nodes and 3) Aggregator node. As such, it's vital for the protocol to reward the Operators accordingly. The calculation for the rewards for an Operator must be based on the signed @@ -44,7 +44,7 @@ Relayer at the least need to compensate the Relayer's fee expenditure. In this specific case, it should be a reasonable approach that each network incentivises their Relayers independently, as it's effectively an extra DA layer for the network - so it's directly beneficial for it. However, a -mechanism for SFFL itself to reward Relayers could also be implemented. +mechanism for NFFL itself to reward Relayers could also be implemented. ## Pushing Operator Set Updates to Networks diff --git a/docs/docs/design/messaging_and_checkpoints.md b/docs/docs/design/messaging_and_checkpoints.md index 65d0280e..5f9530df 100644 --- a/docs/docs/design/messaging_and_checkpoints.md +++ b/docs/docs/design/messaging_and_checkpoints.md @@ -12,7 +12,7 @@ Please refer to [Overview](./overview.md) for an introduction. ## Terminology -There are two types of units of work that SFFL Operators must complete: +There are two types of units of work that NFFL Operators must complete: _Messages_ and _Tasks_. _Messages_ are: @@ -36,15 +36,15 @@ _Tasks_ are: EigenLayer's implementation of a Task is really similar to the definition above. However, EigenLayer Task is not a good choice for keeping track of the -work done by the SFFL nodes. The main job of the SFFL node is to agree on state +work done by the NFFL nodes. The main job of the NFFL node is to agree on state root updates - i.e. block based progression of each participant network. If -each of those updates was an (on-chain) Task, the SFFL would most likely not be +each of those updates was an (on-chain) Task, the NFFL would most likely not be feasible in terms of operation cost and would also suffer a great blow in terms of a _faster_ finality. With this problem in mind, _Message_ was defined. It then enables high throughput and most importantly essentially off-chain operations. However, it's -still necessary to formalize an on-chain unit of work - not only so the SFFL +still necessary to formalize an on-chain unit of work - not only so the NFFL progress is available on-chain but also to allow for fair slashing and payment designs. @@ -57,7 +57,7 @@ A Checkpoint Task is, essentially, comprised of the submission of a merkle root of the attested _Messages_ during a time range. Checkpoint Task are submitted at a regular cadence. Checkpoint Task not only provides a safe ledger to the AVS state, but also allows for establishing slashing and payment processes -while keeping the SFFL cost of operation cheap. +while keeping the NFFL cost of operation cheap. To facilitate the Checkpoint Task, the operators must then agree on all the Messages sent in that time period e.g. daily, and aggregate them into a [Sparse @@ -67,9 +67,9 @@ non-membership for any Message. This way, any Message that should've been attested can be verified and any message that shouldn't have been attested can also be verified - leading to both punishments and also liveness tracking. -## SFFL Messages +## NFFL Messages -There are two Messages in SFFL: +There are two Messages in NFFL: * `StateRootUpdateMessage`: A state root update Message attests to the state root of a network at a specific block height and timestamp. diff --git a/docs/docs/design/network_management.md b/docs/docs/design/network_management.md index da1c8d77..ddff425a 100644 --- a/docs/docs/design/network_management.md +++ b/docs/docs/design/network_management.md @@ -10,7 +10,7 @@ Please refer to [Overview](./overview.md) for an introduction. ::: -The SFFL manages a network set, and a number of processes are actually related +The NFFL manages a network set, and a number of processes are actually related to the network set - the number of rollup networks and also the specifics of each network. @@ -18,7 +18,7 @@ each network. In the current design, only EVM rollups are supported as participant networks. However, in terms of non-EVM rollups, the challenge is the state verification -process is different. It is necessary to integrate it in the SFFL contracts +process is different. It is necessary to integrate it in the NFFL contracts and, depending on the network, potentially adapt the `StateRootUpdateMessage` format. @@ -32,5 +32,5 @@ This is not ideal and will be tackled in the next phase of development. Currently, all AVS nodes are uniform - i.e. support the same rollup virtual machine. A considerable improvement would be making it so each AVS operator -could select the networks to be supported, this allows the SFFL node operators +could select the networks to be supported, this allows the NFFL node operators to choose rollups based on their risk profile. diff --git a/docs/docs/design/operator_set_tracking.md b/docs/docs/design/operator_set_tracking.md index c4b962d5..5cf0663a 100644 --- a/docs/docs/design/operator_set_tracking.md +++ b/docs/docs/design/operator_set_tracking.md @@ -13,7 +13,7 @@ Please refer to [Overview](./overview.md) for an introduction. ## Operator Set Updates Operator set updates are block-based changes in the operator set which are used -by the SFFL operators in order to update networks' operator sets. +by the NFFL operators in order to update networks' operator sets. An operator set update is comprised of all the updates in operator weights in one block, and as such happens at most once a block. It also has an diff --git a/docs/docs/design/overview.md b/docs/docs/design/overview.md index 2ae9c498..79f73a6a 100644 --- a/docs/docs/design/overview.md +++ b/docs/docs/design/overview.md @@ -4,11 +4,11 @@ sidebar_position: 1 # Overview -The NEAR Super Fast Finality Layer (SFFL) aims to provide a fast settlement +The Nuffle Fast Finality Layer (NFFL, formerly SFFL) aims to provide a fast settlement layer that allows participating networks to quickly access information from other networks in a safe way. -In order to achieve this, SFFL leverages both [NEAR](https://near.org) and +In order to achieve this, NFFL leverages both [NEAR](https://near.org) and [EigenLayer](https://www.eigenlayer.xyz), providing not only a way for protocols to provide interoperability features by verifying state attestations secured by staked ETH. @@ -16,16 +16,16 @@ secured by staked ETH. The architecture is comprised of two off-chain actors, the _Operators_ and the _Aggregator_, the AVS nodes, and multiple on-chain contracts: -* on Ethereum Mainnet, there's the SFFL AVS contract set, which interacts +* on Ethereum Mainnet, there's the NFFL AVS contract set, which interacts directly with EigenLayer contracts. -* on rollup networks, there are SFFL verifier contracts to check +* on rollup networks, there are NFFL verifier contracts to check network state attestations. * on NEAR, there is a NEAR DA contract for each participating rollup network which serves as a medium for storing historical block data. ## Architecture -Below is a diagram representation of SFFL's architecture. Let's consider, as an +Below is a diagram representation of NFFL's architecture. Let's consider, as an example, `HelloProtocol`, a very primitive protocol in which users want to send and receive _hello_ from one network to another. In abstract terms, this is the base feature of every bridging protocol. It's a good idea to refer to this @@ -35,21 +35,21 @@ diagram whenever any of the interactions seems unclear. ### Ethereum -SFFL's is enabled to provide the fast finality guarantees by leveraging the -architecture of EigenLayer \_Actively _Valildated Service_. EigenLayer AVS +NFFL's is enabled to provide the fast finality guarantees by leveraging the +architecture of EigenLayer _Actively Valildated Service_. EigenLayer AVS allows the coordination of validators in distributed network towards a common goal. EigenLayer allows validators to reuse Ethereum stake as the mechanism for incentivization. -In order for SFFL to have economic security, users must first restake ETH into -EigenLayer, becoming _Restakers_. This means the SFFL architecture actually +In order for NFFL to have economic security, users must first restake ETH into +EigenLayer, becoming _Restakers_. This means the NFFL architecture actually starts on Ethereum, as the [EigenLayer core contracts](https://github.com/Layr-Labs/eigenlayer-contracts/tree/dev/docs) live there. -The SFFL has a set of smart contracts which, in EigenLayer terms, are called +The NFFL has a set of smart contracts which, in EigenLayer terms, are called _middleware_. The _middleware_ contracts are directly connected to the EigenLayer core contracts. The AVS contracts facilitate the interaction between the off-chain node with the EigenLayer protocol. Operations such as registering @@ -80,13 +80,13 @@ There's an example Relayer implementation, but it should slightly change depending on the specific network and stack, as it should ideally be operated by the sequencer. -### SFFL off-chain nodes +### NFFL off-chain nodes -SFFL nodes attest to the state root of rollup after executing the block. The +NFFL nodes attest to the state root of rollup after executing the block. The individual signatures are aggregated off-chain and submitted to Ethereum and participating rollups. -An SFFL Operator, runs a full node for each of the participant networks +An NFFL Operator, runs a full node for each of the participant networks (including Ethereum), as well as a NEAR full node and a NEAR DA indexer. The simplified flow can be described through the following: @@ -96,13 +96,13 @@ simplified flow can be described through the following: 1. The operator node checks the block is the same as the one in their self-hosted network full node. 1. If the blocks do not match, then the block posted by the Relayer are - wrong and the SFFL nodes do not sign any state root. + wrong and the NFFL nodes do not sign any state root. 1. The operator node, through their BLS keypair, signs a message attesting that for the network in question in that block height, the state root is the one that was fetched. 1. The operator sends the signed message to the Aggregator. -The Aggregator collects BLS signatures from multiple SFFL nodes. When +The Aggregator collects BLS signatures from multiple NFFL nodes. When the desired quorum of operator power (i.e. restaked amount) is reached, then all of the signatures are aggregated into one and made available through an API. @@ -113,7 +113,7 @@ agreed that, for network `N`, at block height `H`, the state root is `S`_". By verifying the aggregated signatures a rollup can be sure of other rollup, allowing seamless cross-chain interoperability! -Apart from voting on the state roots of rollups, SFFL operators also track +Apart from voting on the state roots of rollups, NFFL operators also track operator set updates on the AVS contracts and emit attestations for those in a somehow similar process - instead of expecting block data externally, it simply subscribes to Ethereum updates through its full node. The importance of that @@ -124,7 +124,7 @@ For more details on the messaging flow, please read ### Network Registry -The _Registry_ contract is a vital component of the SFFL architecture. +The _Registry_ contract is a vital component of the NFFL architecture. There is a _Registry_ contract on each rollup. This contract is used to verify the state root attestations. @@ -132,7 +132,7 @@ In order to verify the signature, the Registry contract have access to the AVS operator set - otherwise, it can't know if a signer is an operator or not, much less whether the attestation has passed quorum or not. -In fact SFFL Registry contracts have two roles - 1) store a copy of the +In fact NFFL Registry contracts have two roles - 1) store a copy of the operator set and 2) verifying attestations. To keep the operator set up to date, the Registry contract accepts attestations for operator set updates. @@ -153,8 +153,8 @@ AVS operation should be represented in terms of units of work called _Tasks_. These tasks are defined in the AVS contracts on Ethereum. The AVS payment and slashing are based on the operators fulfilling these tasks in a correct manner. -In the SFFL architecture, the attestations defined above are not defined as a -_Task_ - rather, they are defined as \_Message_s. The _Task_ for SFFL nodes is +In the NFFL architecture, the attestations defined above are not defined as a +_Task_ - rather, they are defined as _Messages_. The _Task_ for NFFL nodes is defined as the amalgamation of all the _Message_ types, specifically the unit of work required from all validators is to attest on the aggregation (more specifically _Merkleization_) of messages in a time range. @@ -169,31 +169,31 @@ For more details on checkpoints, refer to ### User Flow -Finally - how can SFFL be used by a user or protocol? The integration is +Finally - how can NFFL be used by a user or protocol? The integration is actually quite simple. Let's follow the HelloProtocol example: consider a user had sent a "hello!" message on Network #2 to Network #1, recording it on Network #2's state. Eventually, the block in which the message was submitted gets considered in -SFFL and a state root attestation was collected for the Network #2's state. +NFFL and a state root attestation was collected for the Network #2's state. Through it, anyone can submit the attestation to any network, not only Network #1, making Network #2's state available on it. -The HelloProtocol (off-chain) app would then keep track of SFFL's state and, +The HelloProtocol (off-chain) app would then keep track of NFFL's state and, as such, would be able to fetch this attestation as soon as it's available. This complexity can be simply abstracted from the user. When the attestation is done, the protocol lets the user consume the "hello!" on Network #1 by sumbitting a transaction that indicates the storage proof -of the message on Network #2 and the attestation from SFFL. Again, the UX is +of the message on Network #2 and the attestation from NFFL. Again, the UX is not really impacted - the proof should also be generated in the background. -This data is then relayed by the HelloProtocol contract to the SFFL Registry +This data is then relayed by the HelloProtocol contract to the NFFL Registry contract, which validates the attestation and checks the storage proof - and there is our "hello!"! In easier terms, in UX terms, all of the parts of this integration that, to the user, may seem strange, can be simply abstracted from them. In implementation terms, it's a matter of fetching the attestation and the proof, -as well as linking the protocol's contracts to SFFL's and relaying the fetched +as well as linking the protocol's contracts to NFFL's and relaying the fetched data. diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md index 27dd3a12..a8e14124 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -3,7 +3,7 @@ sidebar_position: 1 slug: / --- -# Super Fast Finality Layer - SFFL +# Nuffle Fast Finality Layer - NFFL ## Introduction @@ -13,7 +13,7 @@ However, as the ecosystem continues to evolve towards a rollup-centric roadmap, it confronts new challenges such as state and liquidity fragmentation and extended finality time. -In order to solve this problem, the NEAR Super Fast Finality Layer (SFFL) was +In order to solve this problem, the Nuffle Fast Finality Layer (NFFL, formerly SFFL) was designed. Through it, various chains can, while supplying block data to [NEAR DA](https://github.com/near/rollup-data-availability), rely on the economic security of an [EigenLayer](https://www.eigenlayer.xyz) AVS to provide @@ -24,7 +24,7 @@ This universal, secure and fast finality leads to major advancements in interoperability protocols, enabling or improving designs such as general bridging and chain abstraction. -For more details, refer to [Protocol Design](./design/overview.md). SFFL is +For more details, refer to [Protocol Design](./design/overview.md). NFFL is under active development and is not yet available on any publicly accessible environments. diff --git a/docs/docs/operator/registration.md b/docs/docs/operator/registration.md index bea1b7ef..eb51e9f2 100644 --- a/docs/docs/operator/registration.md +++ b/docs/docs/operator/registration.md @@ -4,7 +4,7 @@ sidebar_position: 1 # Registration -Here we'll go step-by-step on how to opt-in into NEAR SFFL. It's a quick and +Here we'll go step-by-step on how to opt-in into NEAR NFFL. It's a quick and easy process that will allow you to start contributing to the network once the testnet starts functioning. @@ -20,7 +20,7 @@ the operator in the future, you can follow the hardware requirements on :::note At this initial testnet stage, operators need to be whitelisted. If you are -interested and have not already been whitelisted, please contact the SFFL +interested and have not already been whitelisted, please contact the NFFL team! ::: @@ -33,9 +33,9 @@ Complete the EigenLayer CLI installation and registration [here](https://docs.ei Install [Docker Engine on Linux](https://docs.docker.com/engine/install/ubuntu/). -### Step 3: Prepare Local SFFL files +### Step 3: Prepare Local NFFL files -Clone the SFFL repository and execute the following. +Clone the NFFL repository and execute the following. ```bash git clone https://github.com/NethermindEth/near-sffl.git @@ -91,4 +91,4 @@ other important fields. Now, simply run `./register.sh`! This will fetch our latest operator plugin container and run it with the `--operation-type opt-in` flag. It will -opt-in your operator into SFFL. +opt-in your operator into NFFL. diff --git a/docs/docs/operator/setup.md b/docs/docs/operator/setup.md index de7e2cfb..0d1ed695 100644 --- a/docs/docs/operator/setup.md +++ b/docs/docs/operator/setup.md @@ -6,7 +6,7 @@ sidebar_position: 2 :::info -While the opt-in process for NEAR SFFL is currently underway - see +While the opt-in process for NEAR NFFL is currently underway - see [Registration](./registration) - the testnet is not completely operational just yet, so it's currently not required that operators run a node. Keep an eye out for updates! @@ -14,7 +14,7 @@ eye out for updates! ::: This guide will walk you through the steps required to set up your operator -node on the NEAR SFFL testnet. The testnet serves as a sandbox environment +node on the NEAR NFFL testnet. The testnet serves as a sandbox environment for testing and development, allowing you to test both the AVS smart contracts and off-chain services. As the network is under active development, it's crucial to stay updated with the latest changes and keep your node in sync @@ -22,7 +22,7 @@ with the network. ## Hardware Requirements -A NEAR SFFL operator node consists of two main components: the AVS node +A NEAR NFFL operator node consists of two main components: the AVS node software and a NEAR DA indexer. The AVS node software is a Go implementation of the AVS protocol, while the NEAR DA indexer is essentially a NEAR full node that indexes NEAR DA submissions on the NEAR blockchain. @@ -50,7 +50,7 @@ lscpu | grep -P '(?=.*avx )(?=.*sse4.2 )(?=.*cx16 )(?=.*popcnt )' > /dev/null \ :::note At this initial testnet stage, operators need to be whitelisted. If you are -interested and have not already been whitelisted, please contact the SFFL +interested and have not already been whitelisted, please contact the NFFL team! ::: @@ -63,9 +63,9 @@ Complete the EigenLayer CLI installation and registration [here](https://docs.ei Install [Docker Engine on Linux](https://docs.docker.com/engine/install/ubuntu/). -### Step 3: Prepare Local SFFL files +### Step 3: Prepare Local NFFL files -Clone the SFFL repository and execute the following. +Clone the NFFL repository and execute the following. ```bash git clone https://github.com/NethermindEth/near-sffl.git diff --git a/go.mod b/go.mod index d33fd1ff..1563bbe9 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.21 toolchain go1.21.0 require ( - github.com/Layr-Labs/eigensdk-go v0.1.4 - github.com/ethereum/go-ethereum v1.13.14 + github.com/Layr-Labs/eigensdk-go v0.1.7 + github.com/ethereum/go-ethereum v1.14.0 github.com/gorilla/mux v1.8.1 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/near/borsh-go v0.3.1 @@ -14,28 +14,43 @@ require ( github.com/pokt-network/smt v0.9.2 github.com/prometheus/client_golang v1.19.0 github.com/stretchr/testify v1.9.0 - github.com/testcontainers/testcontainers-go v0.29.1 + github.com/testcontainers/testcontainers-go v0.30.0 github.com/urfave/cli v1.22.14 go.uber.org/mock v0.4.0 - golang.org/x/crypto v0.18.0 + golang.org/x/crypto v0.22.0 gorm.io/driver/sqlite v1.5.5 gorm.io/gorm v1.25.7 ) require ( + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect + github.com/lmittmann/tint v1.0.4 // indirect github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/moby/sys/user v0.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect ) require ( @@ -54,18 +69,18 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect + github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/docker/docker v25.0.3+incompatible // indirect + github.com/docker/docker v25.0.5+incompatible // indirect github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/holiman/uint256 v1.2.4 // indirect @@ -99,14 +114,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/tools v0.20.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/grpc v1.58.3 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 53e8ab4f..b019395f 100644 --- a/go.sum +++ b/go.sum @@ -9,12 +9,42 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Layr-Labs/eigensdk-go v0.1.4 h1:ROup2RMNrgLKNmWkic+pNHirR5pFyBFJ9FhnbY+i7hk= github.com/Layr-Labs/eigensdk-go v0.1.4/go.mod h1:HOSNuZcwaKbP4cnNk9c1hK2B2RitcMQ36Xj2msBBBpE= +github.com/Layr-Labs/eigensdk-go v0.1.7 h1:2qC3Wl2gKw/mJJfESeXTH7bKoHWqQCFz6qKO3Ny7TDI= +github.com/Layr-Labs/eigensdk-go v0.1.7/go.mod h1:OF9lmS/57MKxS0xpSpX0qHZl0SKkDRpvJIvsGvMN1y8= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/kms v1.31.0 h1:yl7wcqbisxPzknJVfWTLnK83McUvXba+pz2+tPbIUmQ= +github.com/aws/aws-sdk-go-v2/service/kms v1.31.0/go.mod h1:2snWQJQUKsbN66vAawJuOGX7dr37pfOq9hb0tZDGIqQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= @@ -31,12 +61,15 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -58,6 +91,8 @@ github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUp github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= +github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -73,16 +108,24 @@ github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/docker v25.0.3+incompatible h1:D5fy/lYmY7bvZa0XTZ5/UJPljor41F+vdyJG5luQLfQ= github.com/docker/docker v25.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE= +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= +github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= +github.com/ethereum/go-ethereum v1.14.0 h1:xRWC5NlB6g1x7vNy4HDBLuqVNbtLrc7v8S6+Uxim1LU= +github.com/ethereum/go-ethereum v1.14.0/go.mod h1:1STrq471D0BQbCX9He0hUj4bHxX2k6mt5nOQJhDNOJ8= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -94,6 +137,8 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -110,6 +155,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -161,6 +208,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= +github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -253,6 +302,8 @@ github.com/taco-paco/rollup-data-availability v0.0.0-20240409111524-c9ec12924b27 github.com/taco-paco/rollup-data-availability v0.0.0-20240409111524-c9ec12924b27/go.mod h1:kzQi3/MdPKkid8rxflyA9oEBlaLAewXJMqCBXStBxQo= github.com/testcontainers/testcontainers-go v0.29.1 h1:z8kxdFlovA2y97RWx98v/TQ+tR+SXZm6p35M+xB92zk= github.com/testcontainers/testcontainers-go v0.29.1/go.mod h1:SnKnKQav8UcgtKqjp/AD8bE1MqZm+3TDb/B8crE3XnI= +github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E= +github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0= github.com/testcontainers/testcontainers-go/modules/rabbitmq v0.26.0 h1:fRSWNIeEJxTRO7HEyJ96EU7MgrpkUWmPYgfM5/KA4DU= github.com/testcontainers/testcontainers-go/modules/rabbitmq v0.26.0/go.mod h1:IuuO+wXjjHDYr2GwzlKAY+8MsY/l3U6hgj0OSGugzOs= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= @@ -275,18 +326,26 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= @@ -303,23 +362,31 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -333,18 +400,23 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -360,6 +432,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/operator/attestor/attestor.go b/operator/attestor/attestor.go index 94aae972..77e4c84c 100644 --- a/operator/attestor/attestor.go +++ b/operator/attestor/attestor.go @@ -105,6 +105,11 @@ func NewAttestor(config *optypes.NodeConfig, blsKeypair *bls.KeyPair, operatorId attestor.clients[rollupId] = client attestor.rpcCallsCollectors[rollupId] = rpcCallsCollector + + logger.Debug("New Attestor for rollup", + "rollupId", rollupId, + "rollupIdsToUrls", url, + ) } return &attestor, nil diff --git a/operator/attestor/notifier_test.go b/operator/attestor/notifier_test.go index f1295497..f30f2f33 100644 --- a/operator/attestor/notifier_test.go +++ b/operator/attestor/notifier_test.go @@ -37,11 +37,7 @@ func subscribe(notifier *Notifier, blocks []consumer.BlockData, subscribedWg *sy go func(block consumer.BlockData, notifier *Notifier) { predicate := func(mqBlock consumer.BlockData) bool { - if block.Block.Header().Number.Cmp(mqBlock.Block.Header().Number) != 0 { - return false - } - - return true + return block.Block.Header().Number.Cmp(mqBlock.Block.Header().Number) == 0 } blocksC, id := notifier.Subscribe(block.RollupId, predicate) @@ -107,11 +103,7 @@ func TestNotifierSubscribeAndUnsubscribe(t *testing.T) { notifier := NewNotifier() predicate := func(mqBlock consumer.BlockData) bool { - if block.Block.Header().Number.Cmp(mqBlock.Block.Header().Number) != 0 { - return false - } - - return true + return block.Block.Header().Number.Cmp(mqBlock.Block.Header().Number) == 0 } _, id := notifier.Subscribe(block.RollupId, predicate) assert.Equal(t, notifier.rollupIdsToSubscribers[block.RollupId].Len(), 1) diff --git a/operator/avs_manager.go b/operator/avs_manager.go index 5018c5d8..5c905fc6 100644 --- a/operator/avs_manager.go +++ b/operator/avs_manager.go @@ -7,7 +7,6 @@ import ( "math/big" "time" - "github.com/Layr-Labs/eigensdk-go/chainio/clients" "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" @@ -61,7 +60,7 @@ type AvsManager struct { var _ AvsManagerer = (*AvsManager)(nil) -func NewAvsManager(config *optypes.NodeConfig, ethRpcClient eth.Client, ethWsClient eth.Client, sdkClients *clients.Clients, txManager txmgr.TxManager, logger sdklogging.Logger) (*AvsManager, error) { +func NewAvsManager(config *optypes.NodeConfig, ethRpcClient eth.Client, ethWsClient eth.Client, elChainReader *elcontracts.ELChainReader, elChainWriter *elcontracts.ELChainWriter, txManager txmgr.TxManager, logger sdklogging.Logger) (*AvsManager, error) { avsWriter, err := chainio.BuildAvsWriter( txManager, common.HexToAddress(config.AVSRegistryCoordinatorAddress), common.HexToAddress(config.OperatorStateRetrieverAddress), ethRpcClient, logger, @@ -92,8 +91,8 @@ func NewAvsManager(config *optypes.NodeConfig, ethRpcClient eth.Client, ethWsCli avsReader: avsReader, avsWriter: avsWriter, avsSubscriber: avsSubscriber, - eigenlayerReader: sdkClients.ElChainReader, - eigenlayerWriter: sdkClients.ElChainWriter, + eigenlayerReader: elChainReader, + eigenlayerWriter: elChainWriter, checkpointTaskCreatedChan: make(chan *taskmanager.ContractSFFLTaskManagerCheckpointTaskCreated), operatorSetUpdateChan: make(chan *opsetupdatereg.ContractSFFLOperatorSetUpdateRegistryOperatorSetUpdatedAtBlock), operatorSetUpdateMessageChan: make(chan messages.OperatorSetUpdateMessage), @@ -206,6 +205,10 @@ func (avsManager *AvsManager) DepositIntoStrategy(operatorAddr common.Address, s return err } txOpts, err := avsManager.avsWriter.TxMgr.GetNoSendTxOpts() + if err != nil { + avsManager.logger.Error("Error getting tx options") + return err + } tx, err := contractErc20Mock.Mint(txOpts, operatorAddr, amount) if err != nil { avsManager.logger.Error("Error assembling Mint tx") @@ -260,7 +263,7 @@ func (avsManager *AvsManager) RegisterOperatorWithAvs( return err } - operatorId := eigentypes.OperatorIdFromPubkey(blsKeyPair.GetPubKeyG1()) + operatorId := eigentypes.OperatorIdFromG1Pubkey(blsKeyPair.GetPubKeyG1()) sigValidForSeconds := int64(1_000_000) operatorToAvsRegistrationSigExpiry := big.NewInt(int64(curBlock.Time()) + sigValidForSeconds) diff --git a/operator/operator.go b/operator/operator.go index b3ebba41..a3649ab1 100644 --- a/operator/operator.go +++ b/operator/operator.go @@ -10,7 +10,6 @@ import ( "os" "time" - "github.com/Layr-Labs/eigensdk-go/chainio/clients" "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" "github.com/Layr-Labs/eigensdk-go/crypto/bls" @@ -27,6 +26,7 @@ import ( taskmanager "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLTaskManager" "github.com/NethermindEth/near-sffl/core" + "github.com/NethermindEth/near-sffl/core/chainio" "github.com/NethermindEth/near-sffl/core/safeclient" "github.com/NethermindEth/near-sffl/core/types/messages" "github.com/NethermindEth/near-sffl/operator/attestor" @@ -90,6 +90,8 @@ func NewOperatorFromConfig(c optypes.NodeConfig) (*Operator, error) { return nil, err } + logger.Debug("Creating operator from config", "config", c) + // Setup Node Api nodeApi := nodeapi.NewNodeApi(AVS_NAME, SEM_VER, c.NodeApiIpPortAddress, logger) blsKeyPassword, ok := os.LookupEnv("OPERATOR_BLS_KEY_PASSWORD") @@ -103,41 +105,24 @@ func NewOperatorFromConfig(c optypes.NodeConfig) (*Operator, error) { return nil, err } - operatorId := eigentypes.OperatorIdFromPubkey(blsKeyPair.GetPubKeyG1()) + operatorId := eigentypes.OperatorIdFromG1Pubkey(blsKeyPair.GetPubKeyG1()) ecdsaKeyPassword, ok := os.LookupEnv("OPERATOR_ECDSA_KEY_PASSWORD") if !ok { logger.Warn("OPERATOR_ECDSA_KEY_PASSWORD env var not set. using empty string") } - ecdsaPrivateKey, err := sdkecdsa.ReadKey(c.EcdsaPrivateKeyStorePath, ecdsaKeyPassword) - if err != nil { - logger.Error("Failed to read ecdsa private key", "err", err) - return nil, err - } - - chainioConfig := clients.BuildAllConfig{ - EthHttpUrl: c.EthRpcUrl, - EthWsUrl: c.EthWsUrl, - RegistryCoordinatorAddr: c.AVSRegistryCoordinatorAddress, - OperatorStateRetrieverAddr: c.OperatorStateRetrieverAddress, - AvsName: AVS_NAME, - PromMetricsIpPortAddress: c.EigenMetricsIpPortAddress, - } - sdkClients, err := clients.BuildAll(chainioConfig, ecdsaPrivateKey, logger) - if err != nil { - panic(err) - } - reg := sdkClients.PrometheusRegistry - + reg := prometheus.NewRegistry() id := c.OperatorAddress + OperatorSubsytem - ethRpcClient, err := core.CreateEthClientWithCollector(id, c.EthRpcUrl, c.EnableMetrics, reg, logger) + ethHttpClient, err := core.CreateEthClientWithCollector(id, c.EthRpcUrl, c.EnableMetrics, reg, logger) if err != nil { + logger.Error("Cannot create http ethclient", "err", err) return nil, err } ethWsClient, err := core.CreateEthClientWithCollector(id, c.EthWsUrl, c.EnableMetrics, reg, logger) if err != nil { + logger.Error("Cannot create ws ethclient", "err", err) return nil, err } @@ -145,7 +130,7 @@ func NewOperatorFromConfig(c optypes.NodeConfig) (*Operator, error) { // TODO(samlaf): should we add the chainId to the config instead? // this way we can prevent creating a signer that signs on mainnet by mistake // if the config says chainId=5, then we can only create a goerli signer - chainId, err := ethRpcClient.ChainID(context.Background()) + chainId, err := ethHttpClient.ChainID(context.Background()) if err != nil { logger.Error("Cannot get chainId", "err", err) return nil, err @@ -159,25 +144,42 @@ func NewOperatorFromConfig(c optypes.NodeConfig) (*Operator, error) { panic(err) } - txSender, err := wallet.NewPrivateKeyWallet(ethRpcClient, signerV2, common.HexToAddress(c.OperatorAddress), logger) + txSender, err := wallet.NewPrivateKeyWallet(ethHttpClient, signerV2, common.HexToAddress(c.OperatorAddress), logger) if err != nil { logger.Error("Failed to create transaction sender", "err", err) return nil, err } - txMgr := txmgr.NewSimpleTxManager(txSender, ethRpcClient, logger, common.HexToAddress(c.OperatorAddress)).WithGasLimitMultiplier(1.5) - - // Use eigen registry - reg = sdkClients.PrometheusRegistry + txMgr := txmgr.NewSimpleTxManager(txSender, ethHttpClient, logger, common.HexToAddress(c.OperatorAddress)).WithGasLimitMultiplier(1.5) registryCoordinatorAddress := common.HexToAddress(c.AVSRegistryCoordinatorAddress) + operatorStateRetrieverAddress := common.HexToAddress(c.OperatorStateRetrieverAddress) + + avsReader, err := chainio.BuildAvsReader(registryCoordinatorAddress, operatorStateRetrieverAddress, ethHttpClient, logger) + if err != nil { + logger.Error("Failed to create AvsReader", "err", err) + return nil, err + } + + elChainReader, err := chainio.BuildElReader(registryCoordinatorAddress, operatorStateRetrieverAddress, ethHttpClient, logger) + if err != nil { + logger.Error("Failed to create ElChainReader", "err", err) + return nil, err + } + + elChainWriter, err := chainio.BuildElWriter(registryCoordinatorAddress, operatorStateRetrieverAddress, txMgr, ethHttpClient, logger) + if err != nil { + logger.Error("Failed to create ElChainWriter", "err", err) + return nil, err + } + aggregatorRpcClient, err := NewAggregatorRpcClient(c.AggregatorServerIpPortAddress, operatorId, registryCoordinatorAddress, logger) if err != nil { logger.Error("Cannot create AggregatorRpcClient. Is aggregator running?", "err", err) return nil, err } - avsManager, err := NewAvsManager(&c, ethRpcClient, ethWsClient, sdkClients, txMgr, logger) + avsManager, err := NewAvsManager(&c, ethHttpClient, ethWsClient, elChainReader, elChainWriter, txMgr, logger) if err != nil { logger.Error("Cannot create AvsManager", "err", err) return nil, err @@ -189,17 +191,28 @@ func NewOperatorFromConfig(c optypes.NodeConfig) (*Operator, error) { 0: "quorum0", } economicMetricsCollector := economic.NewCollector( - sdkClients.ElChainReader, sdkClients.AvsRegistryChainReader, - AVS_NAME, logger, common.HexToAddress(c.OperatorAddress), quorumNames) + elChainReader, + avsReader, + AVS_NAME, + logger, + common.HexToAddress(c.OperatorAddress), + quorumNames, + ) reg.MustRegister(economicMetricsCollector) + var optionalMetrics metrics.Metrics + if c.EnableMetrics { + optionalMetrics = metrics.NewEigenMetrics(AVS_NAME, c.EigenMetricsIpPortAddress, reg, logger) + } else { + optionalMetrics = metrics.NewNoopMetrics() + } + operator := &Operator{ - config: c, - logger: logger, - ethClient: ethRpcClient, - metricsReg: reg, - // TODO: replace with noop in case not enabled - metrics: sdkClients.Metrics, + config: c, + logger: logger, + ethClient: ethHttpClient, + metricsReg: reg, + metrics: optionalMetrics, listener: &SelectiveOperatorListener{}, nodeApi: nodeApi, avsManager: avsManager, diff --git a/operator/rpc_client.go b/operator/rpc_client.go index 0f2749a2..5563d00b 100644 --- a/operator/rpc_client.go +++ b/operator/rpc_client.go @@ -2,7 +2,6 @@ package operator import ( "errors" - "fmt" "net" "net/rpc" "sync" @@ -153,12 +152,10 @@ func isShutdownOrNetworkError(err error) bool { return false } -func (c *AggregatorRpcClient) handleRpcError(err error) error { +func (c *AggregatorRpcClient) handleRpcError(err error) { if isShutdownOrNetworkError(err) { go c.handleRpcShutdown() } - - return nil } func (c *AggregatorRpcClient) handleRpcShutdown() { @@ -272,7 +269,7 @@ func (c *AggregatorRpcClient) tryResendFromDeque() { entry.Retries++ if entry.Retries >= MaxRetries { - c.logger.Error("Max retries reached, dropping message", "message", fmt.Sprintf("%#v", message)) + c.logger.Error("Max retries reached, dropping message", "message", message) continue } @@ -291,9 +288,10 @@ func (c *AggregatorRpcClient) sendOperatorMessage(sendCb func() error, message i appendProtected := func() { c.unsentMessagesLock.Lock() + defer c.unsentMessagesLock.Unlock() + c.unsentMessages = append(c.unsentMessages, unsentRpcMessage{Message: message}) c.listener.ObserveResendQueueSize(len(c.unsentMessages)) - c.unsentMessagesLock.Unlock() } if c.rpcClient == nil { @@ -332,7 +330,7 @@ func (c *AggregatorRpcClient) sendRequest(sendCb func() error) error { } func (c *AggregatorRpcClient) SendSignedCheckpointTaskResponseToAggregator(signedCheckpointTaskResponse *messages.SignedCheckpointTaskResponse) { - c.logger.Info("Sending signed task response header to aggregator", "signedCheckpointTaskResponse", fmt.Sprintf("%#v", signedCheckpointTaskResponse)) + c.logger.Info("Sending signed task response header to aggregator", "signedCheckpointTaskResponse", signedCheckpointTaskResponse) c.sendOperatorMessage(func() error { var reply bool @@ -354,7 +352,7 @@ func (c *AggregatorRpcClient) SendSignedCheckpointTaskResponseToAggregator(signe } func (c *AggregatorRpcClient) SendSignedStateRootUpdateToAggregator(signedStateRootUpdateMessage *messages.SignedStateRootUpdateMessage) { - c.logger.Info("Sending signed state root update message to aggregator", "signedStateRootUpdateMessage", fmt.Sprintf("%#v", signedStateRootUpdateMessage)) + c.logger.Info("Sending signed state root update message to aggregator", "signedStateRootUpdateMessage", signedStateRootUpdateMessage) c.sendOperatorMessage(func() error { var reply bool @@ -375,7 +373,7 @@ func (c *AggregatorRpcClient) SendSignedStateRootUpdateToAggregator(signedStateR } func (c *AggregatorRpcClient) SendSignedOperatorSetUpdateToAggregator(signedOperatorSetUpdateMessage *messages.SignedOperatorSetUpdateMessage) { - c.logger.Info("Sending operator set update message to aggregator", "signedOperatorSetUpdateMessage", fmt.Sprintf("%#v", signedOperatorSetUpdateMessage)) + c.logger.Info("Sending operator set update message to aggregator", "signedOperatorSetUpdateMessage", signedOperatorSetUpdateMessage) c.sendOperatorMessage(func() error { var reply bool diff --git a/plugin/cmd/operator_plugin.go b/plugin/cmd/operator_plugin.go index ca51bdc5..abd6a96d 100644 --- a/plugin/cmd/operator_plugin.go +++ b/plugin/cmd/operator_plugin.go @@ -5,7 +5,7 @@ import ( "errors" "math/big" - sdkclients "github.com/Layr-Labs/eigensdk-go/chainio/clients" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" @@ -15,6 +15,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/signerv2" "github.com/Layr-Labs/eigensdk-go/utils" "github.com/NethermindEth/near-sffl/core/chainio" + "github.com/NethermindEth/near-sffl/core/safeclient" "github.com/NethermindEth/near-sffl/operator" optypes "github.com/NethermindEth/near-sffl/operator/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -25,7 +26,8 @@ import ( type CliOperatorPlugin struct { ecdsaKeyPassword string ethHttpClient eth.Client - clients *sdkclients.Clients + elChainReader *elcontracts.ELChainReader + elChainWriter *elcontracts.ELChainWriter avsConfig optypes.NodeConfig avsManager *operator.AvsManager avsReader *chainio.AvsReader @@ -51,16 +53,13 @@ func NewOperatorPluginFromCLIContext(ctx *cli.Context) (*CliOperatorPlugin, erro ecdsaKeyPassword := ctx.GlobalString(EcdsaKeyPasswordFlag.Name) - buildClientConfig := sdkclients.BuildAllConfig{ - EthHttpUrl: avsConfig.EthRpcUrl, - EthWsUrl: avsConfig.EthWsUrl, - RegistryCoordinatorAddr: avsConfig.AVSRegistryCoordinatorAddress, - OperatorStateRetrieverAddr: avsConfig.OperatorStateRetrieverAddress, - AvsName: "super-fast-finality-layer", - PromMetricsIpPortAddress: "127.0.0.1:9090", + ethHttpClient, err := safeclient.NewSafeEthClient(avsConfig.EthRpcUrl, logger) + if err != nil { + logger.Error("Failed to connect to eth client", "err", err) + return nil, err } - ethHttpClient, err := eth.NewClient(avsConfig.EthRpcUrl) + ethWsClient, err := safeclient.NewSafeEthClient(avsConfig.EthWsUrl, logger) if err != nil { logger.Error("Failed to connect to eth client", "err", err) return nil, err @@ -81,21 +80,12 @@ func NewOperatorPluginFromCLIContext(ctx *cli.Context) (*CliOperatorPlugin, erro return nil, err } - ecdsaPrivateKey, err := sdkecdsa.ReadKey(avsConfig.EcdsaPrivateKeyStorePath, ecdsaKeyPassword) - if err != nil { - logger.Error("Failed to read ecdsa private key", "err", err) - return nil, err - } - - clients, err := sdkclients.BuildAll(buildClientConfig, ecdsaPrivateKey, logger) - if err != nil { - logger.Error("Failed to create sdk clients", "err", err) - return nil, err - } + avsRegistryCoordinatorAddress := common.HexToAddress(avsConfig.AVSRegistryCoordinatorAddress) + operatorStateRetrieverAddress := common.HexToAddress(avsConfig.OperatorStateRetrieverAddress) avsReader, err := chainio.BuildAvsReader( - common.HexToAddress(avsConfig.AVSRegistryCoordinatorAddress), - common.HexToAddress(avsConfig.OperatorStateRetrieverAddress), + avsRegistryCoordinatorAddress, + operatorStateRetrieverAddress, ethHttpClient, logger, ) @@ -111,10 +101,11 @@ func NewOperatorPluginFromCLIContext(ctx *cli.Context) (*CliOperatorPlugin, erro } txMgr := txmgr.NewSimpleTxManager(txSender, ethHttpClient, logger, common.HexToAddress(avsConfig.OperatorAddress)).WithGasLimitMultiplier(1.5) + avsWriter, err := chainio.BuildAvsWriter( txMgr, - common.HexToAddress(avsConfig.AVSRegistryCoordinatorAddress), - common.HexToAddress(avsConfig.OperatorStateRetrieverAddress), + avsRegistryCoordinatorAddress, + operatorStateRetrieverAddress, ethHttpClient, logger, ) @@ -123,7 +114,26 @@ func NewOperatorPluginFromCLIContext(ctx *cli.Context) (*CliOperatorPlugin, erro return nil, err } - avsManager, err := operator.NewAvsManager(&avsConfig, clients.EthHttpClient, clients.EthWsClient, clients, txMgr, logger) + elChainReader, err := chainio.BuildElReader(avsRegistryCoordinatorAddress, operatorStateRetrieverAddress, ethHttpClient, logger) + if err != nil { + logger.Error("Failed to create ElChainReader", "err", err) + return nil, err + } + + elChainWriter, err := chainio.BuildElWriter(avsRegistryCoordinatorAddress, operatorStateRetrieverAddress, txMgr, ethHttpClient, logger) + if err != nil { + logger.Error("Failed to create ElChainWriter", "err", err) + return nil, err + } + + avsManager, err := operator.NewAvsManager( + &avsConfig, + ethHttpClient, + ethWsClient, + elChainReader, + elChainWriter, + txMgr, logger, + ) if err != nil { logger.Error("Failed to create avs manager", "err", err) return nil, err @@ -132,7 +142,8 @@ func NewOperatorPluginFromCLIContext(ctx *cli.Context) (*CliOperatorPlugin, erro return &CliOperatorPlugin{ ecdsaKeyPassword: ecdsaKeyPassword, ethHttpClient: ethHttpClient, - clients: clients, + elChainReader: elChainReader, + elChainWriter: elChainWriter, avsConfig: avsConfig, avsManager: avsManager, avsReader: avsReader, @@ -194,7 +205,7 @@ func (o *CliOperatorPlugin) Deposit(ctx *cli.Context) error { } strategyAddr := common.HexToAddress(ctx.GlobalString(StrategyAddrFlag.Name)) - _, tokenAddr, err := o.clients.ElChainReader.GetStrategyAndUnderlyingToken(&bind.CallOpts{}, strategyAddr) + _, tokenAddr, err := o.elChainReader.GetStrategyAndUnderlyingToken(&bind.CallOpts{}, strategyAddr) if err != nil { o.logger.Error("Failed to fetch strategy contract", "err", err) return err @@ -225,7 +236,7 @@ func (o *CliOperatorPlugin) Deposit(ctx *cli.Context) error { return err } - _, err = o.clients.ElChainWriter.DepositERC20IntoStrategy(context.Background(), strategyAddr, amount) + _, err = o.elChainWriter.DepositERC20IntoStrategy(context.Background(), strategyAddr, amount) if err != nil { o.logger.Error("Failed to deposit into strategy", "err", err) return err diff --git a/scripts/deposit-into-mocktoken-strategy.sh b/scripts/deposit-into-mocktoken-strategy.sh deleted file mode 100755 index c3724f6d..00000000 --- a/scripts/deposit-into-mocktoken-strategy.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -RPC_URL=http://localhost:8545 -PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - -# cd to the directory of this script so that this can be run from anywhere -parent_path=$( - cd "$(dirname "${BASH_SOURCE[0]}")" - pwd -P -) -cd $parent_path/.. - -CHAINID=31337 -DEPLOYMENT_OUTPUT_FILE=./contracts/evm/script/output/${CHAINID}/sffl_avs_deployment_output.json -STRATEGY_ADDRESS=$(jq -r '.addresses.erc20MockStrategy' $DEPLOYMENT_OUTPUT_FILE) - -go run cli/main.go --config config-files/operator.anvil.yaml deposit-into-strategy --strategy-addr ${STRATEGY_ADDRESS} --amount 100 diff --git a/tests/anvil/deploy-rollup-avs-save-anvil-state.sh b/tests/anvil/deploy-rollup-avs-save-anvil-state.sh deleted file mode 100755 index e2dac8df..00000000 --- a/tests/anvil/deploy-rollup-avs-save-anvil-state.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -RPC_URL=http://localhost:8545 -PRIVATE_KEY=0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 - -# cd to the directory of this script so that this can be run from anywhere -parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$parent_path" - -# start an anvil instance in the background that has eigenlayer contracts deployed -anvil --dump-state data/rollup-avs-deployed-anvil-state.json & -cd ../../contracts/evm -forge script script/deploy/devnet/SFFLDeployerRollup.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast -v - -# kill anvil to save its state -pkill anvil diff --git a/tests/anvil/operator-registration.sh b/tests/anvil/operator-registration.sh deleted file mode 100644 index 9b313fd1..00000000 --- a/tests/anvil/operator-registration.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -cd ../../ && make cli-setup-operator \ No newline at end of file diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 7aaa4026..8d7d49b9 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -25,12 +25,15 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/modules/rabbitmq" "github.com/testcontainers/testcontainers-go/wait" "github.com/NethermindEth/near-sffl/aggregator" + restserver "github.com/NethermindEth/near-sffl/aggregator/rest_server" + rpcserver "github.com/NethermindEth/near-sffl/aggregator/rpc_server" aggtypes "github.com/NethermindEth/near-sffl/aggregator/types" registryrollup "github.com/NethermindEth/near-sffl/contracts/bindings/SFFLRegistryRollup" transparentproxy "github.com/NethermindEth/near-sffl/contracts/bindings/TransparentUpgradeableProxy" @@ -290,11 +293,33 @@ func startOperator(t *testing.T, ctx context.Context, nodeConfig optypes.NodeCon func startAggregator(t *testing.T, ctx context.Context, config *config.Config, logger sdklogging.Logger) *aggregator.Aggregator { t.Log("starting aggregator for integration tests") - agg, err := aggregator.NewAggregator(ctx, config, logger) + var optRegistry *prometheus.Registry + if config.EnableMetrics { + optRegistry = prometheus.NewRegistry() + } + agg, err := aggregator.NewAggregator(ctx, config, nil, logger) if err != nil { t.Fatalf("Failed to create aggregator: %s", err.Error()) } + rpcServer := rpcserver.NewRpcServer(config.AggregatorServerIpPortAddr, agg, logger) + if optRegistry != nil { + err = rpcServer.EnableMetrics(optRegistry) + if err != nil { + t.Fatalf("Failed to create metrics for rpc server: %s", err.Error()) + } + } + go rpcServer.Start() + + restServer := restserver.NewRestServer(config.AggregatorRestServerIpPortAddr, agg, logger) + if optRegistry != nil { + err = restServer.EnableMetrics(optRegistry) + if err != nil { + t.Fatalf("Failed to create metrics for rest server: %s", err.Error()) + } + } + go restServer.Start() + go agg.Start(ctx) t.Log("Started aggregator. Sleeping 20 seconds to give operator time to answer task 1...") diff --git a/tests/integration/registration_test.go b/tests/integration/registration_test.go index 065f0fc8..a12c5152 100644 --- a/tests/integration/registration_test.go +++ b/tests/integration/registration_test.go @@ -2,17 +2,23 @@ package integration import ( "context" + "crypto/ecdsa" "os" "path/filepath" "testing" "time" - sdkclients "github.com/Layr-Labs/eigensdk-go/chainio/clients" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" + "github.com/Layr-Labs/eigensdk-go/chainio/clients/wallet" + "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" sdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa" "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/Layr-Labs/eigensdk-go/signerv2" "github.com/Layr-Labs/eigensdk-go/types" sdkutils "github.com/Layr-Labs/eigensdk-go/utils" "github.com/NethermindEth/near-sffl/core/chainio" + "github.com/NethermindEth/near-sffl/core/safeclient" optypes "github.com/NethermindEth/near-sffl/operator/types" "github.com/NethermindEth/near-sffl/tests/integration/utils" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -75,21 +81,23 @@ func TestRegistration(t *testing.T) { t.Fatalf("Error reading ecdsa private key: %s", err.Error()) } - buildClientConfig := sdkclients.BuildAllConfig{ - EthHttpUrl: mainnetAnvil.HttpUrl, - EthWsUrl: mainnetAnvil.WsUrl, - RegistryCoordinatorAddr: nodeConfig.AVSRegistryCoordinatorAddress, - OperatorStateRetrieverAddr: nodeConfig.OperatorStateRetrieverAddress, - AvsName: "super-fast-finality-layer", - PromMetricsIpPortAddress: "127.0.0.1:9090", + ethHttpClient, err := safeclient.NewSafeEthClient(mainnetAnvil.HttpUrl, logger) + if err != nil { + t.Fatalf("Error building ethHttpClient: %s", err.Error()) } - clients, err := sdkclients.BuildAll(buildClientConfig, ecdsaPrivateKey, logger) + elChainWriter, err := buildElChainWriter( + common.HexToAddress(nodeConfig.AVSRegistryCoordinatorAddress), + common.HexToAddress(nodeConfig.OperatorStateRetrieverAddress), + ecdsaPrivateKey, + ethHttpClient, + logger, + ) if err != nil { - t.Fatalf("Error building clients: %s", err.Error()) + t.Fatalf("Error building ElChainWriter: %s", err.Error()) } - _, err = clients.ElChainWriter.RegisterAsOperator(ctx, types.Operator{Address: operatorAddr.String(), EarningsReceiverAddress: operatorAddr.String()}) + _, err = elChainWriter.RegisterAsOperator(ctx, types.Operator{Address: operatorAddr.String(), EarningsReceiverAddress: operatorAddr.String()}) if err != nil { t.Fatalf("Error registering operator: %s", err.Error()) } @@ -188,3 +196,37 @@ func runOperatorPluginContainer(t *testing.T, ctx context.Context, name, network return container } + +func buildElChainWriter( + avsRegistryCoordinatorAddress common.Address, + operatorStateRetrieverAddress common.Address, + ecdsaPrivateKey *ecdsa.PrivateKey, + ethHttpClient eth.Client, + logger logging.Logger, +) (*elcontracts.ELChainWriter, error) { + rpcCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + chainid, err := ethHttpClient.ChainID(rpcCtx) + if err != nil { + return nil, err + } + + signerV2, addr, err := signerv2.SignerFromConfig(signerv2.Config{PrivateKey: ecdsaPrivateKey}, chainid) + if err != nil { + return nil, err + } + + pkWallet, err := wallet.NewPrivateKeyWallet(ethHttpClient, signerV2, addr, logger) + if err != nil { + return nil, err + } + + txMgr := txmgr.NewSimpleTxManager(pkWallet, ethHttpClient, logger, addr).WithGasLimitMultiplier(1.5) + + elChainWriter, err := chainio.BuildElWriter(avsRegistryCoordinatorAddress, operatorStateRetrieverAddress, txMgr, ethHttpClient, logger) + if err != nil { + return nil, err + } + + return elChainWriter, nil +} diff --git a/tests/integration/utils/containers.go b/tests/integration/utils/containers.go index bf8a317a..ebab433d 100644 --- a/tests/integration/utils/containers.go +++ b/tests/integration/utils/containers.go @@ -236,7 +236,10 @@ func StartAnvilTestContainer(t *testing.T, ctx context.Context, name, exposedPor } if isMainnet { - anvil.Mine(big.NewInt(100), big.NewInt(1)) + err := anvil.Mine(big.NewInt(100), big.NewInt(1)) + if err != nil { + t.Fatalf("Anvil failed to Mine: %s", err.Error()) + } } return anvil