diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7d60962..584827d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,7 +40,7 @@ jobs: latest:dev - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} diff --git a/.github/workflows/gen-binaries.yml b/.github/workflows/gen-binaries.yml index ae58573..3fefb26 100644 --- a/.github/workflows/gen-binaries.yml +++ b/.github/workflows/gen-binaries.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Rust uses: actions-rs/toolchain@v1 with: @@ -28,7 +28,7 @@ jobs: run: | cargo build --release - name: Upload Ubuntu binary - uses: actions/upload-release-asset@v1.0.1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} with: @@ -39,19 +39,19 @@ jobs: build-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Rust uses: actions-rs/toolchain@v1 with: toolchain: stable - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: "1.19.5" - name: Build release binary run: | cargo build --release - name: Upload MacOS binary - uses: actions/upload-release-asset@v1.0.1 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb09f54..4e365c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: submodules: true - name: Checkout submodules run: git submodule update --init --recursive - - uses: actions/setup-go@v3 # we need go to build go-waku + - uses: actions/setup-go@v4 # we need go to build go-waku with: go-version: "1.19" - uses: actions-rs/toolchain@v1 @@ -55,7 +55,7 @@ jobs: submodules: true - name: Checkout submodules run: git submodule update --init --recursive - - uses: actions/setup-go@v3 # we need go to build go-waku + - uses: actions/setup-go@v4 # we need go to build go-waku with: go-version: "1.19" - uses: actions-rs/toolchain@v1 @@ -83,7 +83,7 @@ jobs: submodules: true - name: Checkout submodules run: git submodule update --init --recursive - - uses: actions/setup-go@v3 # we need go to build go-waku + - uses: actions/setup-go@v4 # we need go to build go-waku with: go-version: "1.19" - uses: actions-rs/toolchain@v1 @@ -115,7 +115,7 @@ jobs: submodules: true - name: Checkout submodules run: git submodule update --init --recursive - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: "1.19" - uses: actions-rs/toolchain@v1 diff --git a/Cargo.lock b/Cargo.lock index aeb1db5..b2bb384 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,7 +68,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.10", + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", "once_cell", "version_check", ] @@ -155,27 +166,6 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" -[[package]] -name = "assert-json-diff" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - [[package]] name = "async-graphql" version = "4.0.16" @@ -360,8 +350,8 @@ dependencies = [ "metrics-exporter-prometheus", "once_cell", "opentelemetry-prometheus", - "opentelemetry_api", - "opentelemetry_sdk", + "opentelemetry_api 0.18.0", + "opentelemetry_sdk 0.18.0", "prometheus", ] @@ -844,7 +834,7 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -870,7 +860,7 @@ dependencies = [ "bs58", "coins-core", "digest 0.10.7", - "getrandom 0.2.10", + "getrandom", "hmac", "k256 0.13.1", "lazy_static", @@ -887,11 +877,11 @@ checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" dependencies = [ "bitvec 0.17.4", "coins-bip32", - "getrandom 0.2.10", + "getrandom", "hmac", "once_cell", "pbkdf2 0.12.2", - "rand 0.8.5", + "rand", "sha2 0.10.7", "thiserror", ] @@ -929,15 +919,6 @@ dependencies = [ "unreachable", ] -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "const-oid" version = "0.9.4" @@ -1121,7 +1102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1133,7 +1114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1145,7 +1126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "typenum", ] @@ -1277,25 +1258,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "deadpool" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421fe0f90f2ab22016f32a9881be5134fdd71c65298917084b0c7477cbc3856e" -dependencies = [ - "async-trait", - "deadpool-runtime", - "num_cpus", - "retain_mut", - "tokio", -] - -[[package]] -name = "deadpool-runtime" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" - [[package]] name = "der" version = "0.6.1" @@ -1388,12 +1350,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "dotenv" version = "0.15.0" @@ -1461,7 +1417,7 @@ dependencies = [ "generic-array", "group 0.12.1", "pkcs8 0.9.0", - "rand_core 0.6.4", + "rand_core", "sec1 0.3.0", "subtle", "zeroize", @@ -1480,7 +1436,7 @@ dependencies = [ "generic-array", "group 0.13.0", "pkcs8 0.10.2", - "rand_core 0.6.4", + "rand_core", "sec1 0.7.2", "subtle", "zeroize", @@ -1516,7 +1472,7 @@ dependencies = [ "hex", "k256 0.11.6", "log", - "rand 0.8.5", + "rand", "rlp", "secp256k1 0.24.3", "serde", @@ -1535,7 +1491,7 @@ dependencies = [ "hex", "k256 0.13.1", "log", - "rand 0.8.5", + "rand", "rlp", "serde", "sha3", @@ -1591,7 +1547,7 @@ dependencies = [ "hex", "hmac", "pbkdf2 0.11.0", - "rand 0.8.5", + "rand", "scrypt", "serde", "serde_json", @@ -1755,7 +1711,7 @@ dependencies = [ "once_cell", "open-fastrlp", "proc-macro2", - "rand 0.8.5", + "rand", "rlp", "rlp-derive", "serde", @@ -1785,7 +1741,7 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand 0.8.5", + "rand", "rlp", "serde", "serde_json", @@ -1901,7 +1857,7 @@ dependencies = [ "eth-keystore", "ethers-core 2.0.7", "hex", - "rand 0.8.5", + "rand", "sha2 0.10.7", "thiserror", "tracing", @@ -1938,12 +1894,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "eyre" version = "0.6.8" @@ -1954,28 +1904,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "fast_chemail" version = "0.9.6" @@ -2000,7 +1928,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2010,7 +1938,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2021,7 +1949,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -2136,21 +2064,6 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-locks" version = "0.7.1" @@ -2233,17 +2146,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -2309,7 +2211,7 @@ dependencies = [ "ethers-contract", "ethers-core 2.0.7", "ethers-derive-eip712", - "graphql_client 0.12.0", + "graphql_client", "lazy_static", "num-bigint", "num-traits", @@ -2334,15 +2236,6 @@ dependencies = [ "waku-bindings", ] -[[package]] -name = "graphql-introspection-query" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610aac641dbd2a457ad4cef34aa2827dae3f035fd214cb38c2d62d8543f3973f" -dependencies = [ - "serde", -] - [[package]] name = "graphql-introspection-query" version = "0.2.0" @@ -2352,16 +2245,6 @@ dependencies = [ "serde", ] -[[package]] -name = "graphql-parser" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5613c31f18676f164112732202124f373bb2103ff017b3b85ca954ea6a66ada" -dependencies = [ - "combine", - "failure", -] - [[package]] name = "graphql-parser" version = "0.4.0" @@ -2372,45 +2255,15 @@ dependencies = [ "thiserror", ] -[[package]] -name = "graphql_client" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bb4f09181e4f80018d01c612125b07e0156f3753bfac37055fe2a25e031ca8" -dependencies = [ - "doc-comment", - "graphql_query_derive 0.9.0", - "serde", - "serde_json", -] - [[package]] name = "graphql_client" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa61bb9dc6d373a8b465a5da17b62809483e8527a34b0e9034dc0915b09e160a" dependencies = [ - "graphql_query_derive 0.12.0", - "serde", - "serde_json", -] - -[[package]] -name = "graphql_client_codegen" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e304c223c809b3bff4614018f8e6d9edb176b31d64ed9ea48b6ae8b1a03abb9" -dependencies = [ - "failure", - "graphql-introspection-query 0.1.0", - "graphql-parser 0.2.3", - "heck 0.3.3", - "lazy_static", - "proc-macro2", - "quote", + "graphql_query_derive", "serde", "serde_json", - "syn 1.0.109", ] [[package]] @@ -2419,9 +2272,9 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e55df64cc702c4ad6647f8df13a799ad11688a3781fadf5045f7ba12733fa9b" dependencies = [ - "graphql-introspection-query 0.2.0", - "graphql-parser 0.4.0", - "heck 0.4.1", + "graphql-introspection-query", + "graphql-parser", + "heck", "lazy_static", "proc-macro2", "quote", @@ -2430,25 +2283,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "graphql_query_derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f6b14d5ce549227aa9e649cd9d36d008b91021275a8e0a67d71cef815adc2f" -dependencies = [ - "failure", - "graphql_client_codegen 0.9.0", - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "graphql_query_derive" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52fc9cde811f44b15ec0692b31e56a3067f6f431c5ace712f286e47c1dacc98" dependencies = [ - "graphql_client_codegen 0.12.0", + "graphql_client_codegen", "proc-macro2", "syn 1.0.109", ] @@ -2460,7 +2301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2471,7 +2312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -2506,7 +2347,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -2549,15 +2390,6 @@ dependencies = [ "http", ] -[[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" @@ -2631,27 +2463,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" -[[package]] -name = "http-types" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" -dependencies = [ - "anyhow", - "async-channel", - "base64 0.13.1", - "futures-lite", - "http", - "infer", - "pin-project-lite", - "rand 0.7.3", - "serde", - "serde_json", - "serde_qs", - "serde_urlencoded", - "url", -] - [[package]] name = "httparse" version = "1.8.0" @@ -2821,12 +2632,6 @@ dependencies = [ "hashbrown 0.14.0", ] -[[package]] -name = "infer" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e9829a50b42bb782c1df523f78d332fe371b10c661e78b7a3c34b0198e9fac" - [[package]] name = "inout" version = "0.1.3" @@ -3095,28 +2900,35 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b9b8653cec6897f73b519a43fba5ee3d50f62fe9af80b428accdcc093b4a849" dependencies = [ - "ahash", - "metrics-macros", + "ahash 0.7.6", + "metrics-macros 0.6.0", "portable-atomic 0.3.20", ] +[[package]] +name = "metrics" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" +dependencies = [ + "ahash 0.8.3", + "metrics-macros 0.7.0", + "portable-atomic 1.4.0", +] + [[package]] name = "metrics-exporter-prometheus" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8603921e1f54ef386189335f288441af761e0fc61bcb552168d9cedfe63ebc70" dependencies = [ - "hyper", "indexmap 1.9.3", - "ipnet", - "metrics", + "metrics 0.20.1", "metrics-util", "parking_lot", "portable-atomic 0.3.20", "quanta", "thiserror", - "tokio", - "tracing", ] [[package]] @@ -3130,6 +2942,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "metrics-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.25", +] + [[package]] name = "metrics-util" version = "0.14.0" @@ -3139,7 +2962,7 @@ dependencies = [ "crossbeam-epoch", "crossbeam-utils", "hashbrown 0.12.3", - "metrics", + "metrics 0.20.1", "num_cpus", "parking_lot", "portable-atomic 0.3.20", @@ -3405,47 +3228,22 @@ name = "one-shot" version = "0.3.6" dependencies = [ "anyhow", - "async-graphql", - "async-graphql-axum", - "autometrics", - "axum 0.5.17", "cargo-husky", "chrono", "clap", "derive-getters", "dotenv", "ethers", - "ethers-contract", - "ethers-core 2.0.7", - "ethers-derive-eip712", "graphcast-sdk", - "graphql_client 0.9.0", - "hex", - "metrics", - "metrics-exporter-prometheus", - "num-bigint", - "num-traits", "once_cell", - "opentelemetry", "partial_application", - "prometheus", - "prost", - "rand 0.8.5", - "regex", - "reqwest", - "secp256k1 0.25.0", "serde", - "serde_derive", "serde_json", - "sha3", "subgraph-radio", "thiserror", "tokio", - "tower-http 0.4.1", "tracing", - "tracing-opentelemetry", "tracing-subscriber", - "wiremock", ] [[package]] @@ -3535,8 +3333,18 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69d6c3d7288a106c0a363e4b0e8d308058d56902adefb16f4936f417ffef086e" dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", + "opentelemetry_api 0.18.0", + "opentelemetry_sdk 0.18.0", +] + +[[package]] +name = "opentelemetry" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" +dependencies = [ + "opentelemetry_api 0.19.0", + "opentelemetry_sdk 0.19.0", ] [[package]] @@ -3545,7 +3353,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06c3d833835a53cf91331d2cfb27e9121f5a95261f31f08a1f79ab31688b8da8" dependencies = [ - "opentelemetry", + "opentelemetry 0.18.0", "prometheus", "protobuf", ] @@ -3566,6 +3374,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "opentelemetry_api" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed41783a5bf567688eb38372f2b7a8530f5a607a4b49d38dd7573236c23ca7e2" +dependencies = [ + "futures-channel", + "futures-util", + "indexmap 1.9.3", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", +] + [[package]] name = "opentelemetry_sdk" version = "0.18.0" @@ -3580,9 +3403,27 @@ dependencies = [ "futures-executor", "futures-util", "once_cell", - "opentelemetry_api", + "opentelemetry_api 0.18.0", + "percent-encoding", + "rand", + "thiserror", +] + +[[package]] +name = "opentelemetry_sdk" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b3a2a91fdbfdd4d212c0dcc2ab540de2c2bcbbd90be17de7a7daf8822d010c1" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "once_cell", + "opentelemetry_api 0.19.0", "percent-encoding", - "rand 0.8.5", + "rand", "thiserror", "tokio", "tokio-stream", @@ -3626,12 +3467,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - [[package]] name = "parking_lot" version = "0.12.1" @@ -3668,7 +3503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3759,7 +3594,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", - "rand 0.8.5", + "rand", ] [[package]] @@ -4079,19 +3914,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", -] - [[package]] name = "rand" version = "0.8.5" @@ -4099,18 +3921,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]] @@ -4120,16 +3932,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]] @@ -4138,16 +3941,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", -] - -[[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]] @@ -4214,7 +4008,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.10", + "getrandom", "redox_syscall 0.2.16", "thiserror", ] @@ -4308,12 +4102,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "retain_mut" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" - [[package]] name = "rfc6979" version = "0.3.1" @@ -4647,22 +4435,13 @@ dependencies = [ "secp256k1-sys 0.6.1", ] -[[package]] -name = "secp256k1" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "550fc3b723a478be77bf74718947cdcdd75144d508aaa70f0a320036905df2a8" -dependencies = [ - "secp256k1-sys 0.7.0", -] - [[package]] name = "secp256k1" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4124a35fe33ae14259c490fd70fa199a32b9ce9502f2ee6bc4f81ec06fa65894" dependencies = [ - "rand 0.8.5", + "rand", "secp256k1-sys 0.8.1", "serde", ] @@ -4685,15 +4464,6 @@ dependencies = [ "cc", ] -[[package]] -name = "secp256k1-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8058e28ae464daf5ac14c5c0f78110b58616e796c4e4e28cfcca38fdb13d8f22" -dependencies = [ - "cc", -] - [[package]] name = "secp256k1-sys" version = "0.8.1" @@ -4788,17 +4558,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_qs" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7715380eec75f029a4ef7de39a9200e0a63823176b759d055b613f5a87df6a6" -dependencies = [ - "percent-encoding", - "serde", - "thiserror", -] - [[package]] name = "serde_spanned" version = "0.6.3" @@ -4953,7 +4712,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -4963,7 +4722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -5009,7 +4768,7 @@ dependencies = [ "hyper-rustls", "lazy_static", "mime", - "rand 0.8.5", + "rand", "ring", "rsb_derive", "rvstruct", @@ -5167,7 +4926,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", @@ -5176,7 +4935,7 @@ dependencies = [ [[package]] name = "subgraph-radio" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "async-graphql", @@ -5195,32 +4954,27 @@ dependencies = [ "ethers-core 2.0.7", "ethers-derive-eip712", "graphcast-sdk", - "graphql_client 0.9.0", + "graphql_client", "hex", - "metrics", - "metrics-exporter-prometheus", - "num-bigint", + "metrics 0.21.1", "num-traits", "once_cell", - "opentelemetry", + "opentelemetry 0.19.0", "partial_application", "prometheus", "prost", - "rand 0.8.5", - "regex", + "rand", "reqwest", - "secp256k1 0.25.0", + "secp256k1 0.27.0", "serde", "serde_derive", "serde_json", "sha3", "thiserror", "tokio", - "tower-http 0.4.1", "tracing", "tracing-opentelemetry", "tracing-subscriber", - "wiremock", ] [[package]] @@ -5404,7 +5158,7 @@ dependencies = [ "axum 0.5.17", "chrono", "graphcast-sdk", - "rand 0.8.5", + "rand", "serde", "serde_json", "subgraph-radio", @@ -5454,7 +5208,7 @@ dependencies = [ "ethers-derive-eip712", "graphcast-sdk", "prost", - "rand 0.8.5", + "rand", "serde", "serde_derive", "serde_json", @@ -5851,7 +5605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21ebb87a95ea13271332df069020513ab70bdb5637ca42d6e492dc3bbbad48de" dependencies = [ "once_cell", - "opentelemetry", + "opentelemetry 0.18.0", "tracing", "tracing-core", "tracing-log", @@ -5907,7 +5661,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", "thiserror", "url", @@ -5926,7 +5680,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "rustls", "sha1", "thiserror", @@ -6050,6 +5804,12 @@ dependencies = [ "serde", ] +[[package]] +name = "urlencoding" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" + [[package]] name = "utf-8" version = "0.7.6" @@ -6062,7 +5822,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.10", + "getrandom", "serde", ] @@ -6072,7 +5832,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ - "getrandom 0.2.10", + "getrandom", ] [[package]] @@ -6099,12 +5859,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "waku-bindings" version = "0.1.1" @@ -6117,7 +5871,7 @@ dependencies = [ "hex", "multiaddr", "once_cell", - "rand 0.8.5", + "rand", "secp256k1 0.26.0", "serde", "serde_json", @@ -6155,12 +5909,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.10.2+wasi-snapshot-preview1" @@ -6425,28 +6173,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wiremock" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f71803d3a1c80377a06221e0530be02035d5b3e854af56c6ece7ac20ac441d" -dependencies = [ - "assert-json-diff", - "async-trait", - "base64 0.21.2", - "deadpool", - "futures", - "futures-timer", - "http-types", - "hyper", - "log", - "once_cell", - "regex", - "serde", - "serde_json", - "tokio", -] - [[package]] name = "ws_stream_wasm" version = "0.7.4" diff --git a/one-shot/Cargo.toml b/one-shot/Cargo.toml index 2c96239..ee60d9f 100644 --- a/one-shot/Cargo.toml +++ b/one-shot/Cargo.toml @@ -12,32 +12,17 @@ categories = ["network-programming", "web-programming::http-client"] [dependencies] graphcast-sdk = "0.4.0" subgraph-radio = { path = "../subgraph-radio" } -prost = "0.11" once_cell = "1.17" chrono = "0.4" serde = { version = "1.0.163", features = ["rc"] } serde_json = "1.0.96" -sha3 = "0.10.8" derive-getters = "0.2.1" tokio = { version = "1.28.1", features = ["full", "rt"] } anyhow = "1.0" -graphql_client = "0.9.0" -serde_derive = "1.0" -reqwest = { version = "0.11.17", features = ["json"] } thiserror = "1.0.40" -regex = "1.8.1" ethers = "2.0.4" -ethers-contract = "2.0.4" -ethers-core = "2.0.4" -ethers-derive-eip712 = "1.0.2" partial_application = "0.2.1" -num-bigint = "0.4.3" -num-traits = "0.2.15" -wiremock = "0.5.18" dotenv = "0.15" -rand = "0.8.5" -secp256k1 = "0.25.0" -hex = "0.4.3" tracing = "0.1" tracing-subscriber = { version = "0.3", features = [ "env-filter", @@ -46,16 +31,6 @@ tracing-subscriber = { version = "0.3", features = [ "std", "json", ] } -autometrics = { version = "0.3.3", features = ["prometheus-exporter"] } -axum = "0.5" -prometheus = "0.13.3" -tower-http = { version = "0.4.0", features = ["trace", "cors"] } -async-graphql = "4.0.16" -async-graphql-axum = "4.0.16" -metrics = "0.20.1" -metrics-exporter-prometheus = "0.11.0" -opentelemetry = { version = "0.18.0", features = ["rt-tokio"] } -tracing-opentelemetry = "0.18.0" clap = { version = "3.2.25", features = ["derive", "env"] } [dev-dependencies.cargo-husky] diff --git a/subgraph-radio/Cargo.toml b/subgraph-radio/Cargo.toml index f0e98e9..a8e8352 100644 --- a/subgraph-radio/Cargo.toml +++ b/subgraph-radio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subgraph-radio" -version = "0.1.0" +version = "0.1.1" edition = "2021" authors = ["GraphOps (axiomatic-aardvark, hopeyen)"] description = "Subgraph Radio monitors subgraph Public PoI and version upgrades messages in real time using Graphcast SDK" @@ -20,22 +20,19 @@ sha3 = "0.10.8" derive-getters = "0.2.1" tokio = { version = "1.28.1", features = ["full", "rt"] } anyhow = "1.0" -graphql_client = "0.9.0" +graphql_client = "0.12.0" serde_derive = "1.0" reqwest = { version = "0.11.17", features = ["json"] } thiserror = "1.0.40" -regex = "1.8.1" ethers = "2.0.4" ethers-contract = "2.0.4" ethers-core = "2.0.4" ethers-derive-eip712 = "1.0.2" partial_application = "0.2.1" -num-bigint = "0.4.3" num-traits = "0.2.15" -wiremock = "0.5.18" dotenv = "0.15" rand = "0.8.5" -secp256k1 = "0.25.0" +secp256k1 = "0.27.0" hex = "0.4.3" tracing = "0.1" tracing-subscriber = { version = "0.3", features = [ @@ -48,13 +45,11 @@ tracing-subscriber = { version = "0.3", features = [ autometrics = { version = "0.3.3", features = ["prometheus-exporter"] } axum = "0.5" prometheus = "0.13.3" -tower-http = { version = "0.4.0", features = ["trace", "cors"] } async-graphql = "4.0.16" async-graphql-axum = "4.0.16" async-trait = "0.1.71" -metrics = "0.20.1" -metrics-exporter-prometheus = "0.11.0" -opentelemetry = { version = "0.18.0", features = ["rt-tokio"] } +metrics = "0.21.0" +opentelemetry = { version = "0.19.0", features = ["rt-tokio", "trace"] } tracing-opentelemetry = "0.18.0" clap = { version = "3.2.25", features = ["derive", "env"] } diff --git a/subgraph-radio/src/server/routes/mod.rs b/subgraph-radio/src/server/routes/mod.rs index f553b9a..016dd38 100644 --- a/subgraph-radio/src/server/routes/mod.rs +++ b/subgraph-radio/src/server/routes/mod.rs @@ -6,11 +6,9 @@ use axum::{ response::{Html, IntoResponse}, Json, }; -use opentelemetry::trace::TraceContextExt; use serde::Serialize; use std::sync::Arc; use tracing::{span, trace, Instrument, Level}; -use tracing_opentelemetry::OpenTelemetrySpanExt; use super::model::SubgraphRadioContext; use crate::server::model::SubgraphRadioSchema; @@ -47,13 +45,5 @@ pub(crate) async fn graphql_handler( trace!("Processing GraphQL request finished"); - response - .extension( - "traceId", - async_graphql::Value::String(format!( - "{}", - span.context().span().span_context().trace_id() - )), - ) - .into() + response.into() }