From 65ea9ede8cb37b7da3c337ad5a6942753c18758b Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 30 Sep 2024 14:01:59 +0200 Subject: [PATCH 01/17] feat(da-clients): add Celestia client --- Cargo.lock | 2726 +++++++++++------ Cargo.toml | 4 + core/bin/zksync_server/src/main.rs | 11 +- core/bin/zksync_server/src/node_builder.rs | 11 +- core/lib/basic_types/src/lib.rs | 2 +- .../src/{seed_phrase.rs => secrets.rs} | 17 + .../lib/config/src/configs/da_client/avail.rs | 6 +- .../config/src/configs/da_client/celestia.rs | 13 + core/lib/config/src/configs/da_client/mod.rs | 5 +- core/lib/config/src/configs/mod.rs | 4 +- core/lib/config/src/configs/secrets.rs | 6 +- core/lib/config/src/lib.rs | 4 +- core/lib/config/src/testonly.rs | 18 +- core/lib/env_config/src/da_client.rs | 81 +- core/lib/env_config/src/database.rs | 19 +- core/lib/env_config/src/utils.rs | 17 + core/lib/protobuf_config/src/da_client.rs | 47 +- .../src/proto/config/da_client.proto | 6 + .../src/proto/config/secrets.proto | 11 +- core/lib/protobuf_config/src/secrets.rs | 57 +- core/node/da_clients/Cargo.toml | 8 +- core/node/da_clients/src/avail/client.rs | 17 +- core/node/da_clients/src/avail/sdk.rs | 2 +- core/node/da_clients/src/celestia/client.rs | 93 + core/node/da_clients/src/celestia/mod.rs | 3 + core/node/da_clients/src/lib.rs | 2 + core/node/da_clients/src/utils.rs | 8 + .../layers/da_clients/celestia.rs | 46 + .../implementations/layers/da_clients/mod.rs | 1 + 29 files changed, 2132 insertions(+), 1113 deletions(-) rename core/lib/basic_types/src/{seed_phrase.rs => secrets.rs} (53%) create mode 100644 core/lib/config/src/configs/da_client/celestia.rs create mode 100644 core/node/da_clients/src/celestia/client.rs create mode 100644 core/node/da_clients/src/celestia/mod.rs create mode 100644 core/node/da_clients/src/utils.rs create mode 100644 core/node/node_framework/src/implementations/layers/da_clients/celestia.rs diff --git a/Cargo.lock b/Cargo.lock index 66ae5dc37446..2820c2dd2749 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,18 +15,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -88,18 +88,28 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "alloy-rlp" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" +dependencies = [ + "arrayvec 0.7.6", + "bytes", +] [[package]] name = "android-tzdata" @@ -133,57 +143,182 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote 1.0.37", + "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 1.0.37", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote 1.0.37", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] [[package]] name = "arr_macro" @@ -202,15 +337,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0609c78bd572f4edc74310dfb63a01f5609d53fa8b4dd7c4d98aef3b3e8d72d1" dependencies = [ "proc-macro-hack", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -229,9 +364,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert_matches" @@ -318,9 +453,9 @@ dependencies = [ [[package]] name = "async-process" -version = "2.2.4" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ "async-channel", "async-io", @@ -333,7 +468,6 @@ dependencies = [ "futures-lite", "rustix", "tracing", - "windows-sys 0.59.0", ] [[package]] @@ -343,8 +477,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -383,8 +517,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -395,13 +529,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -436,17 +570,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.79", +] + [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a47f2fb521b70c11ce7369a6c5fa4bd6af7e5d62ec06303875bafe7c6ba245" +checksum = "2f95446d919226d587817a7d21379e6eb099b97b45110a7f272a444ca5c54070" dependencies = [ "aws-lc-sys", "mirai-annotations", @@ -456,9 +601,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.19.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2927c7af777b460b7ccd95f8b67acd7b4c04ec8896bf0c8e80ba30523cffc057" +checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" dependencies = [ "bindgen 0.69.4", "cc", @@ -471,18 +616,18 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", "axum-core", "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "itoa", "matchit", @@ -498,7 +643,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -506,20 +651,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -539,19 +684,25 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] +[[package]] +name = "base-x" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" + [[package]] name = "base16ct" version = "0.1.1" @@ -578,9 +729,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -595,13 +746,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "basic-toml" -version = "0.1.4" +name = "bech32" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bfc506e7a2370ec239e1d072507b2a80c833083699d3c6fa176fbb4de8448c6" -dependencies = [ - "serde", -] +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "beef" @@ -648,11 +796,11 @@ dependencies = [ "peeking_take_while", "prettyplease", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] @@ -664,17 +812,17 @@ dependencies = [ "bitflags 2.6.0", "cexpr", "clang-sys", - "itertools 0.12.0", + "itertools 0.12.1", "lazy_static", "lazycell", "log", "prettyplease", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.72", + "syn 2.0.79", "which", ] @@ -797,7 +945,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "constant_time_eq 0.3.1", ] @@ -842,7 +990,7 @@ name = "block_reverter" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.5.18", "serde_json", "tokio", "zksync_block_reverter", @@ -869,6 +1017,18 @@ dependencies = [ "piper", ] +[[package]] +name = "blockstore" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7679095248a6dc7555fae81154ed1baef264383c16621ef881a219576c72a9be" +dependencies = [ + "cid", + "dashmap 6.1.0", + "multihash", + "thiserror", +] + [[package]] name = "blst" version = "0.3.13" @@ -887,13 +1047,13 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ec2f007ff8f90cc459f03e9f30ca1065440170f013c868823646e2e48d0234" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bincode", "blake2 0.10.6", "const_format", "convert_case 0.6.0", "crossbeam", - "crypto-bigint 0.5.3", + "crypto-bigint 0.5.5", "derivative", "ethereum-types", "firestorm", @@ -914,9 +1074,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", "cfg_aliases", @@ -924,15 +1084,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", "syn_derive", ] @@ -953,9 +1113,9 @@ checksum = "225eb82ce9e70dcc0cfa6e404d0f353326b6e163bf500ec4711cec317d11935c" [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -965,9 +1125,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -976,12 +1136,12 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1002,6 +1162,9 @@ name = "bytes" version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +dependencies = [ + "serde", +] [[package]] name = "bytesize" @@ -1022,18 +1185,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -1046,7 +1209,7 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.23", "serde", "serde_json", ] @@ -1059,15 +1222,117 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.14" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" dependencies = [ "jobserver", "libc", "shlex", ] +[[package]] +name = "celestia-proto" +version = "0.3.1" +source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +dependencies = [ + "anyhow", + "celestia-tendermint-proto", + "prost 0.12.6", + "prost-build", + "prost-types", + "serde", +] + +[[package]] +name = "celestia-rpc" +version = "0.4.1" +source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +dependencies = [ + "async-trait", + "celestia-types", + "http 1.1.0", + "jsonrpsee 0.24.5", + "serde", + "thiserror", + "tracing", +] + +[[package]] +name = "celestia-tendermint" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8c92a01145f79a0f3ac7c44a43a9b5ee58e8a4c716b56d98833a3848db1afd" +dependencies = [ + "bytes", + "celestia-tendermint-proto", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures 0.3.30", + "num-traits", + "once_cell", + "prost 0.12.6", + "prost-types", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature 2.2.0", + "subtle", + "subtle-encoding", + "time", + "zeroize", +] + +[[package]] +name = "celestia-tendermint-proto" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a95746c5221a74d7b913a415fdbb9e7c90e1b4d818dbbff59bddc034cfce2ec" +dependencies = [ + "bytes", + "flex-error", + "num-derive 0.3.3", + "num-traits", + "prost 0.12.6", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "celestia-types" +version = "0.5.0" +source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +dependencies = [ + "base64 0.22.1", + "bech32", + "blockstore", + "bytes", + "celestia-proto", + "celestia-tendermint", + "celestia-tendermint-proto", + "cid", + "const_format", + "enum_dispatch", + "leopard-codec", + "libp2p-identity", + "multiaddr", + "multihash", + "nmt-rs", + "ruint", + "serde", + "serde_repr", + "sha2 0.10.8", + "thiserror", + "time", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -1091,9 +1356,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chacha20" @@ -1136,9 +1401,9 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -1147,20 +1412,32 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", ] +[[package]] +name = "cid" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3147d8272e8fa0ccd29ce51194dd98f79ddfb8191ba9e3409884e751798acf3a" +dependencies = [ + "core2", + "multibase", + "multihash", + "unsigned-varint 0.8.0", +] + [[package]] name = "cipher" version = "0.4.4" @@ -1174,38 +1451,38 @@ dependencies = [ [[package]] name = "circuit_encodings" -version = "0.140.1" +version = "0.140.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8438d7af992b730143b679e2c6938cb9e0193897ecaf668c59189af8ac296b7" +checksum = "cf6b7cc842eadb4c250cdc6a8bc1dd97624d9f08bbe54db3e11fb23c3a72be07" dependencies = [ "derivative", "serde", "zk_evm 0.140.0", - "zkevm_circuits 0.140.2", + "zkevm_circuits 0.140.3", ] [[package]] name = "circuit_encodings" -version = "0.141.1" +version = "0.141.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a2fcc80e97682104f355dd819cb4972583828a6c0f65ec26889a78a84b0c56" +checksum = "7898ffbf3cd413576b4b674fe1545a35488c67eb16bd5a4148425e42c2a2b65b" dependencies = [ "derivative", "serde", "zk_evm 0.141.0", - "zkevm_circuits 0.141.1", + "zkevm_circuits 0.141.2", ] [[package]] name = "circuit_encodings" -version = "0.142.1" +version = "0.142.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94be7afb5ace6024d6e3c105d521b4b9b563bac14a92c2f59c4683e9169a25d8" +checksum = "8364ecafcc4b2c896023f8d3af952c52a500aa55f14fd268bb5d9ab07f837369" dependencies = [ "derivative", "serde", "zk_evm 0.141.0", - "zkevm_circuits 0.141.1", + "zkevm_circuits 0.141.2", ] [[package]] @@ -1239,7 +1516,7 @@ version = "0.140.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa5f22311ce609d852d7d9f4943535ea4610aeb785129ae6ff83d5201c4fb387" dependencies = [ - "circuit_encodings 0.140.1", + "circuit_encodings 0.140.3", "derivative", "rayon", "serde", @@ -1253,7 +1530,7 @@ version = "0.141.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c47c71d6ba83a8beb0af13af70beffd627f5497caf3d44c6f96363e788b07ea" dependencies = [ - "circuit_encodings 0.141.1", + "circuit_encodings 0.141.2", "derivative", "rayon", "serde", @@ -1267,7 +1544,7 @@ version = "0.142.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e264723359e6a1aad98110bdccf1ae3ad596e93e7d31da9e40f6adc07e4add54" dependencies = [ - "circuit_encodings 0.142.1", + "circuit_encodings 0.142.2", "derivative", "rayon", "serde", @@ -1290,9 +1567,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -1323,14 +1600,14 @@ dependencies = [ "bitflags 1.3.2", "clap_lex 0.2.4", "indexmap 1.9.3", - "textwrap 0.16.0", + "textwrap 0.16.1", ] [[package]] name = "clap" -version = "4.4.6" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -1338,26 +1615,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", - "strsim 0.10.0", + "clap_lex 0.7.2", + "strsim 0.11.1", ] [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -1371,15 +1648,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" dependencies = [ "cc", ] @@ -1395,9 +1672,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -1426,40 +1703,40 @@ dependencies = [ [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "unicode-xid 0.2.4", + "quote 1.0.37", + "unicode-xid 0.2.6", ] [[package]] @@ -1501,24 +1778,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] [[package]] name = "cpufeatures" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -1531,9 +1817,9 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1650,9 +1936,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -1681,26 +1967,14 @@ dependencies = [ "subtle", ] -[[package]] -name = "cs_derive" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24cf603ca4299c6e20e644da88897f7b81d688510f4887e818b0bfe0b792081b" -dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 1.0.109", -] - [[package]] name = "ctor" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -1714,12 +1988,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.1" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ "nix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1733,7 +2007,7 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "rustc_version", + "rustc_version 0.4.1", "subtle", "zeroize", ] @@ -1745,8 +2019,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", ] [[package]] @@ -1788,7 +2075,7 @@ dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "strsim 0.10.0", "syn 1.0.109", ] @@ -1802,7 +2089,7 @@ dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "strsim 0.10.0", "syn 1.0.109", ] @@ -1816,9 +2103,9 @@ dependencies = [ "fnv", "ident_case", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "strsim 0.11.1", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] @@ -1828,7 +2115,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core 0.13.4", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1839,7 +2126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core 0.14.4", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1850,8 +2137,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -1867,6 +2154,46 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "data-encoding-macro" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" +dependencies = [ + "data-encoding", + "data-encoding-macro-internal", +] + +[[package]] +name = "data-encoding-macro-internal" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" +dependencies = [ + "data-encoding", + "syn 1.0.109", +] + [[package]] name = "debugid" version = "0.8.0" @@ -1889,9 +2216,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -1900,9 +2227,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1915,7 +2242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -1927,9 +2254,9 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case 0.4.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "rustc_version", - "syn 2.0.72", + "quote 1.0.37", + "rustc_version 0.4.1", + "syn 2.0.79", ] [[package]] @@ -1948,9 +2275,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", - "unicode-xid 0.2.4", + "quote 1.0.37", + "syn 2.0.79", + "unicode-xid 0.2.6", ] [[package]] @@ -2000,9 +2327,9 @@ checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecdsa" @@ -2022,12 +2349,12 @@ version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.8", + "der 0.7.9", "digest 0.10.7", "elliptic-curve 0.13.8", "rfc6979 0.4.0", "signature 2.2.0", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -2040,17 +2367,31 @@ dependencies = [ "signature 2.2.0", ] +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", + "subtle", "zeroize", ] @@ -2071,9 +2412,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -2105,7 +2446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.3", + "crypto-bigint 0.5.5", "digest 0.10.7", "ff 0.13.0", "generic-array", @@ -2120,9 +2461,9 @@ dependencies = [ [[package]] name = "elsa" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714f766f3556b44e7e4776ad133fcc3445a489517c25c704ace411bb14790194" +checksum = "d98e71ae4df57d214182a2e5cb90230c0192c6ddfcaa05c36453d46a54713e10" dependencies = [ "stable_deref_trait", ] @@ -2135,9 +2476,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -2150,25 +2491,27 @@ checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", ] [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ + "anstream", + "anstyle", "env_filter", "log", ] @@ -2293,11 +2636,32 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "fastrlp" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", +] [[package]] name = "ff" @@ -2321,9 +2685,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.3" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f69037fe1b785e84986b4f2cbcf647381876a00671d25ceef715d7812dd7e1dd" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "findshlibs" @@ -2337,12 +2701,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "firestorm" version = "0.5.1" @@ -2369,14 +2727,24 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", ] +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] + [[package]] name = "flume" version = "0.11.0" @@ -2471,7 +2839,7 @@ dependencies = [ "itertools 0.10.5", "lazy_static", "num-bigint 0.4.6", - "num-derive", + "num-derive 0.2.5", "num-integer", "num-traits", "rand 0.4.6", @@ -2588,8 +2956,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -2606,9 +2974,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" dependencies = [ "gloo-timers", "send_wrapper", @@ -2649,7 +3017,7 @@ name = "genesis_generator" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.5.18", "futures 0.3.30", "serde", "serde_json", @@ -2670,9 +3038,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2693,9 +3061,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -2703,9 +3071,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -2723,7 +3091,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 0.2.9", + "http 0.2.12", "js-sys", "pin-project", "serde", @@ -2766,12 +3134,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1112c453c2e155b3e683204ffff52bcc6d6495d04b68d9e90cd24161270c5058" dependencies = [ "async-trait", - "base64 0.21.5", + "base64 0.21.7", "google-cloud-metadata", "google-cloud-token", "home", "jsonwebtoken", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "serde_json", "thiserror", @@ -2787,7 +3155,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" dependencies = [ - "reqwest 0.12.5", + "reqwest 0.12.7", "thiserror", "tokio", ] @@ -2801,7 +3169,7 @@ dependencies = [ "anyhow", "async-stream", "async-trait", - "base64 0.21.5", + "base64 0.21.7", "bytes", "futures-util", "google-cloud-auth", @@ -2812,7 +3180,7 @@ dependencies = [ "percent-encoding", "pkcs8 0.10.2", "regex", - "reqwest 0.12.5", + "reqwest 0.12.7", "reqwest-middleware", "ring", "serde", @@ -2840,7 +3208,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19775995ee20209163239355bc3ad2f33f83da35d9ef72dea26e5af753552c87" dependencies = [ - "dashmap", + "dashmap 5.5.3", "futures 0.3.30", "futures-timer", "no-std-compat", @@ -2884,8 +3252,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.9", - "indexmap 2.1.0", + "http 0.2.12", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2894,9 +3262,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -2904,7 +3272,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.1.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2913,9 +3281,13 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", +] [[package]] name = "handlebars" @@ -2937,7 +3309,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] @@ -2946,7 +3318,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.11", "allocator-api2", "serde", ] @@ -3010,9 +3382,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -3049,11 +3421,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3069,9 +3441,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -3096,15 +3468,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.9", + "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http 1.1.0", @@ -3119,15 +3491,15 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -3137,16 +3509,16 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2 0.3.26", - "http 0.2.9", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", @@ -3161,16 +3533,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", @@ -3187,8 +3559,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.9", - "hyper 0.14.29", + "http 0.2.12", + "hyper 0.14.30", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -3198,16 +3570,16 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "log", - "rustls 0.23.10", + "rustls 0.23.13", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -3220,7 +3592,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "tokio", @@ -3234,7 +3606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.29", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", @@ -3248,7 +3620,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -3258,20 +3630,19 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -3284,9 +3655,9 @@ checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678" [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3369,10 +3740,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.3" @@ -3385,9 +3762,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -3410,16 +3787,15 @@ dependencies = [ [[package]] name = "insta" -version = "1.34.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" +checksum = "6593a41c7a73841868772495db7dc1e8ecab43bb5c0b6da2059246c4b506ab60" dependencies = [ "console", "lazy_static", "linked-hash-map", "serde", "similar", - "yaml-rust", ] [[package]] @@ -3433,9 +3809,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "ipnetwork" @@ -3446,6 +3822,12 @@ dependencies = [ "serde", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -3457,18 +3839,27 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jni" @@ -3501,9 +3892,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -3529,15 +3920,29 @@ dependencies = [ "jsonrpsee-client-transport 0.23.2", "jsonrpsee-core 0.23.2", "jsonrpsee-http-client 0.23.2", - "jsonrpsee-proc-macros", + "jsonrpsee-proc-macros 0.23.2", "jsonrpsee-server", "jsonrpsee-types 0.23.2", "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", + "jsonrpsee-ws-client 0.23.2", "tokio", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126b48a5acc3c52fbd5381a77898cb60e145123179588a29e7ac48f9c06e401b" +dependencies = [ + "jsonrpsee-core 0.24.5", + "jsonrpsee-http-client 0.24.5", + "jsonrpsee-proc-macros 0.24.5", + "jsonrpsee-types 0.24.5", + "jsonrpsee-ws-client 0.24.5", + "tracing", +] + [[package]] name = "jsonrpsee-client-transport" version = "0.21.0" @@ -3545,10 +3950,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9f9ed46590a8d5681975f126e22531698211b926129a40a2db47cbca429220" dependencies = [ "futures-util", - "http 0.2.9", + "http 0.2.12", "jsonrpsee-core 0.21.0", "pin-project", - "rustls-native-certs 0.7.0", + "rustls-native-certs 0.7.3", "rustls-pki-types", "soketto 0.7.1", "thiserror", @@ -3572,7 +3977,30 @@ dependencies = [ "http 1.1.0", "jsonrpsee-core 0.23.2", "pin-project", - "rustls 0.23.10", + "rustls 0.23.13", + "rustls-pki-types", + "rustls-platform-verifier", + "soketto 0.8.0", + "thiserror", + "tokio", + "tokio-rustls 0.26.0", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf679a8e0e083c77997f7c4bb4ca826577105906027ae462aac70ff348d02c6a" +dependencies = [ + "base64 0.22.1", + "futures-util", + "http 1.1.0", + "jsonrpsee-core 0.24.5", + "pin-project", + "rustls 0.23.13", "rustls-pki-types", "rustls-platform-verifier", "soketto 0.8.0", @@ -3596,10 +4024,10 @@ dependencies = [ "beef", "futures-timer", "futures-util", - "hyper 0.14.29", + "hyper 0.14.30", "jsonrpsee-types 0.21.0", "pin-project", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "thiserror", @@ -3621,13 +4049,13 @@ dependencies = [ "futures-timer", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "jsonrpsee-types 0.23.2", "parking_lot", "pin-project", "rand 0.8.5", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "thiserror", @@ -3637,6 +4065,30 @@ dependencies = [ "wasm-bindgen-futures", ] +[[package]] +name = "jsonrpsee-core" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e503369a76e195b65af35058add0e6900b794a4e9a9316900ddd3a87a80477" +dependencies = [ + "async-trait", + "bytes", + "futures-timer", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "jsonrpsee-types 0.24.5", + "pin-project", + "rustc-hash 2.0.0", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + [[package]] name = "jsonrpsee-http-client" version = "0.21.0" @@ -3644,7 +4096,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b7de9f3219d95985eb77fd03194d7c1b56c19bce1abfcc9d07462574b15572" dependencies = [ "async-trait", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-rustls 0.24.2", "jsonrpsee-core 0.21.0", "jsonrpsee-types 0.21.0", @@ -3652,7 +4104,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", "tracing", "url", ] @@ -3665,19 +4117,44 @@ checksum = "2d90064e04fb9d7282b1c71044ea94d0bbc6eff5621c66f1a0bce9e9de7cf3ac" dependencies = [ "async-trait", "base64 0.22.1", - "http-body 1.0.0", - "hyper 1.3.1", - "hyper-rustls 0.27.2", + "http-body 1.0.1", + "hyper 1.4.1", + "hyper-rustls 0.27.3", "hyper-util", "jsonrpsee-core 0.23.2", "jsonrpsee-types 0.23.2", - "rustls 0.23.10", + "rustls 0.23.13", + "rustls-platform-verifier", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower 0.4.13", + "tracing", + "url", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2c0caba4a6a8efbafeec9baa986aa22a75a96c29d3e4b0091b0098d6470efb5" +dependencies = [ + "async-trait", + "base64 0.22.1", + "http-body 1.0.1", + "hyper 1.4.1", + "hyper-rustls 0.27.3", + "hyper-util", + "jsonrpsee-core 0.24.5", + "jsonrpsee-types 0.24.5", + "rustls 0.23.13", "rustls-platform-verifier", "serde", "serde_json", "thiserror", "tokio", - "tower", + "tower 0.4.13", "tracing", "url", ] @@ -3689,10 +4166,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" dependencies = [ "heck 0.5.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.79", +] + +[[package]] +name = "jsonrpsee-proc-macros" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc660a9389e2748e794a40673a4155d501f32db667757cdb80edeff0306b489b" +dependencies = [ + "heck 0.5.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -3704,9 +4194,9 @@ dependencies = [ "anyhow", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "jsonrpsee-core 0.23.2", "jsonrpsee-types 0.23.2", @@ -3719,7 +4209,7 @@ dependencies = [ "tokio", "tokio-stream", "tokio-util", - "tower", + "tower 0.4.13", "tracing", ] @@ -3749,6 +4239,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-types" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb16314327cbc94fdf7965ef7e4422509cd5597f76d137bd104eb34aeede67" +dependencies = [ + "http 1.1.0", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee-wasm-client" version = "0.23.2" @@ -3773,13 +4275,26 @@ dependencies = [ "url", ] +[[package]] +name = "jsonrpsee-ws-client" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39aabf5d6c6f22da8d5b808eea1fab0736059f11fb42f71f141b14f404e5046a" +dependencies = [ + "http 1.1.0", + "jsonrpsee-client-transport 0.24.5", + "jsonrpsee-core 0.24.5", + "jsonrpsee-types 0.24.5", + "url", +] + [[package]] name = "jsonwebtoken" version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "js-sys", "pem", "ring", @@ -3802,9 +4317,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa 0.16.9", @@ -3816,9 +4331,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3844,20 +4359,31 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "leopard-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee58dbc414bd23885d7da915e0457618b36d1fc950a6169ef2cb29829d1b1a1d" +dependencies = [ + "bytes", + "lazy_static", + "thiserror", +] + [[package]] name = "libc" -version = "0.2.155" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.6", ] [[package]] @@ -3866,6 +4392,21 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +[[package]] +name = "libp2p-identity" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" +dependencies = [ + "bs58", + "hkdf", + "multihash", + "quick-protobuf", + "sha2 0.10.8", + "thiserror", + "tracing", +] + [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -3943,9 +4484,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "pkg-config", @@ -3977,7 +4518,7 @@ dependencies = [ "once_cell", "rand 0.8.5", "regex", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "serde_json", "static_assertions", @@ -3998,9 +4539,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -4008,9 +4549,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "logos" @@ -4030,9 +4571,9 @@ dependencies = [ "beef", "fnv", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "regex-syntax 0.6.29", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] @@ -4046,18 +4587,18 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ "hashbrown 0.14.5", ] [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" dependencies = [ "cc", "libc", @@ -4105,16 +4646,16 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "merkle_tree_consistency_checker" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.5.18", "tracing", "zksync_config", "zksync_env_config", @@ -4155,8 +4696,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -4167,9 +4708,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -4177,13 +4718,13 @@ dependencies = [ [[package]] name = "mini-moka" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e0b72e7c9042467008b10279fc732326bd605459ae03bda88825909dd19b56" +checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" dependencies = [ "crossbeam-channel", "crossbeam-utils", - "dashmap", + "dashmap 5.5.3", "skeptic", "smallvec", "tagptr", @@ -4198,18 +4739,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi 0.3.9", "libc", @@ -4240,19 +4781,58 @@ dependencies = [ "version_check", ] +[[package]] +name = "multiaddr" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +dependencies = [ + "arrayref", + "byteorder", + "data-encoding", + "libp2p-identity", + "multibase", + "multihash", + "percent-encoding", + "serde", + "static_assertions", + "unsigned-varint 0.8.0", + "url", +] + +[[package]] +name = "multibase" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint 0.7.2", +] + [[package]] name = "multimap" -version = "0.8.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -4266,15 +4846,28 @@ dependencies = [ [[package]] name = "nix" -version = "0.27.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", "cfg-if", + "cfg_aliases", "libc", ] +[[package]] +name = "nmt-rs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e408e823bdc9b4bb525a61b44e846239833a8f9bd86c03a43e4ca314a5497582" +dependencies = [ + "borsh", + "bytes", + "serde", + "sha2 0.10.8", +] + [[package]] name = "no-std-compat" version = "0.4.1" @@ -4399,6 +4992,17 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 1.0.109", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -4472,11 +5076,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -4487,48 +5091,51 @@ checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "object" -version = "0.32.1" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" @@ -4552,8 +5159,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -4610,7 +5217,7 @@ dependencies = [ "bytes", "http 1.1.0", "opentelemetry", - "reqwest 0.12.5", + "reqwest 0.12.7", ] [[package]] @@ -4626,8 +5233,8 @@ dependencies = [ "opentelemetry-http", "opentelemetry-proto", "opentelemetry_sdk", - "prost 0.13.1", - "reqwest 0.12.5", + "prost 0.13.3", + "reqwest 0.12.7", "thiserror", "tokio", "tonic", @@ -4641,7 +5248,7 @@ checksum = "30ee9f20bff9c984511a02f082dc8ede839e4a9bf15cc2487c8d6fea5ad850d9" dependencies = [ "opentelemetry", "opentelemetry_sdk", - "prost 0.13.1", + "prost 0.13.3", "tonic", ] @@ -4683,13 +5290,13 @@ dependencies = [ [[package]] name = "os_info" -version = "3.7.0" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", "serde", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -4722,7 +5329,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", @@ -4736,23 +5343,23 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -4760,22 +5367,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -4819,9 +5426,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.6" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -4830,9 +5437,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.6" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" dependencies = [ "pest", "pest_generator", @@ -4840,22 +5447,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.6" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "pest_meta" -version = "2.7.6" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" dependencies = [ "once_cell", "pest", @@ -4864,39 +5471,39 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.5.0", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -4921,9 +5528,9 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der 0.7.8", + "der 0.7.9", "pkcs8 0.10.2", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -4942,21 +5549,21 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "der 0.7.9", + "spki 0.7.3", ] [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -4967,15 +5574,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -5008,9 +5615,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -5018,6 +5625,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -5026,15 +5639,18 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -5042,12 +5658,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2 1.0.86", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] @@ -5085,20 +5701,11 @@ dependencies = [ [[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.2", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.22", ] [[package]] @@ -5109,7 +5716,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", "version_check", ] @@ -5121,7 +5728,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "version_check", ] @@ -5151,9 +5758,9 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" +checksum = "504ee9ff529add891127c4827eb481bd69dc0ebc72e9a682e187db4caa60c3ca" dependencies = [ "dtoa", "itoa", @@ -5168,76 +5775,91 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", +] + +[[package]] +name = "proptest" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +dependencies = [ + "bitflags 2.6.0", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.5", + "unarray", ] [[package]] name = "prost" -version = "0.12.1" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive 0.12.1", + "prost-derive 0.12.6", ] [[package]] name = "prost" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13db3d3fde688c61e2446b4d843bc27a7e8af269a69440c0308021dc92333cc" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", - "prost-derive 0.13.1", + "prost-derive 0.13.3", ] [[package]] name = "prost-build" -version = "0.12.1" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", - "heck 0.4.1", - "itertools 0.10.5", + "heck 0.5.0", + "itertools 0.12.1", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost 0.12.1", + "prost 0.12.6", "prost-types", "regex", - "syn 2.0.72", + "syn 2.0.79", "tempfile", - "which", ] [[package]] name = "prost-derive" -version = "0.12.1" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.12.1", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "prost-derive" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18bec9b0adc4eba778b33684b7ba3e7137789434769ee3ce3930463ef904cfca" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.12.0", + "itertools 0.13.0", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -5246,11 +5868,11 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "057237efdb71cf4b3f9396302a3d6599a92fa94063ba537b66130980ea9909f3" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "logos", "miette", "once_cell", - "prost 0.12.1", + "prost 0.12.6", "prost-types", "serde", "serde-value", @@ -5258,11 +5880,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.12.1" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost 0.12.1", + "prost 0.12.6", ] [[package]] @@ -5273,7 +5895,7 @@ checksum = "00bb76c5f6221de491fe2c8f39b106330bbd9762c6511119c07940e10eb9ff11" dependencies = [ "bytes", "miette", - "prost 0.12.1", + "prost 0.12.6", "prost-reflect", "prost-types", "protox-parse", @@ -5308,17 +5930,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "memchr", "unicase", ] @@ -5365,9 +5987,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2 1.0.86", ] @@ -5436,6 +6058,15 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rand_xoshiro" version = "0.6.0" @@ -5485,23 +6116,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.2", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -5515,13 +6146,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -5532,34 +6163,34 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", "h2 0.3.26", - "http 0.2.9", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -5569,10 +6200,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", "tower-service", @@ -5580,14 +6213,14 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.50.0", + "winreg", ] [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", @@ -5595,12 +6228,12 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", - "hyper-rustls 0.27.2", + "hyper 1.4.1", + "hyper-rustls 0.27.3", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -5612,12 +6245,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.0.0", + "rustls-pemfile 2.1.3", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.1", - "system-configuration", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", "tokio-util", @@ -5627,19 +6260,19 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "windows-registry", ] [[package]] name = "reqwest-middleware" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39346a33ddfe6be00cbc17a34ce996818b97b230b87229f10114693becca1268" +checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", "http 1.1.0", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "thiserror", "tower-service", @@ -5652,7 +6285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82900c877a0ba5362ac5756efbd82c5b795dc509011c1253e2389d8708f1389d" dependencies = [ "addchain", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "blake2 0.10.6", "byteorder", "derivative", @@ -5693,23 +6326,24 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rkyv" -version = "0.7.43" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", @@ -5725,12 +6359,12 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -5762,9 +6396,9 @@ checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" [[package]] name = "rsa" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6c4b23d99685a1408194da11270ef8e9809aff951cc70ec9b17350b087e474" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ "const-oid", "digest 0.10.7", @@ -5775,18 +6409,48 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "signature 2.2.0", - "spki 0.7.2", + "spki 0.7.3", "subtle", "zeroize", ] +[[package]] +name = "ruint" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint 0.4.6", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rust_decimal" -version = "1.33.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "borsh", "bytes", "num-traits", @@ -5798,9 +6462,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -5808,6 +6472,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -5816,18 +6486,27 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -5857,23 +6536,23 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.10" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -5892,12 +6571,12 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.0.0", + "rustls-pemfile 2.1.3", "rustls-pki-types", "schannel", "security-framework", @@ -5909,40 +6588,40 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] name = "rustls-pemfile" -version = "2.0.0" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-platform-verifier" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3beb939bcd33c269f4bf946cc829fcd336370267c4a927ac0399c84a3151a1" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" dependencies = [ "core-foundation", "core-foundation-sys", "jni", "log", "once_cell", - "rustls 0.23.10", - "rustls-native-certs 0.7.0", + "rustls 0.23.13", + "rustls-native-certs 0.7.3", "rustls-platform-verifier-android", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.8", "security-framework", "security-framework-sys", "webpki-roots", @@ -5951,9 +6630,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier-android" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84e217e7fdc8466b5b35d30f8c0a30febd29173df4a3a0c2115d306b9c4117ad" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" @@ -5967,9 +6646,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "aws-lc-rs", "ring", @@ -5979,9 +6658,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ruzstd" @@ -5996,9 +6675,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -6044,7 +6723,7 @@ dependencies = [ "darling 0.14.4", "proc-macro-crate 1.3.1", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -6072,7 +6751,7 @@ dependencies = [ "darling 0.14.4", "proc-macro-crate 1.3.1", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -6096,9 +6775,9 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -6109,9 +6788,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00860983481ac590ac87972062909bef0d6a658013b592ccc0f2feb272feab11" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "scale-info", - "syn 2.0.72", + "syn 2.0.79", "thiserror", ] @@ -6137,11 +6816,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -6152,7 +6831,7 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "curve25519-dalek", "getrandom_or_panic", "merlin", @@ -6206,7 +6885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.8", + "der 0.7.9", "generic-array", "pkcs8 0.10.2", "subtle", @@ -6243,9 +6922,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -6257,9 +6936,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -6270,7 +6949,7 @@ name = "selector_generator" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.5.18", "ethabi", "glob", "hex", @@ -6279,6 +6958,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.23" @@ -6288,6 +6976,15 @@ 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 = "send_wrapper" version = "0.4.0" @@ -6296,13 +6993,13 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "sentry" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0097a48cd1999d983909f07cb03b15241c5af29e5e679379efac1c06296abecc" +checksum = "6ce4b57f1b521f674df7a1d200be8ff5d74e3712020ee25b553146657b5377d5" dependencies = [ "httpdate", "native-tls", - "reqwest 0.11.22", + "reqwest 0.11.27", "sentry-backtrace", "sentry-contexts", "sentry-core", @@ -6315,9 +7012,9 @@ dependencies = [ [[package]] name = "sentry-backtrace" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a7b80fa1dd6830a348d38a8d3a9761179047757b7dca29aef82db0118b9670" +checksum = "58cc8d4e04a73de8f718dc703943666d03f25d3e9e4d0fb271ca0b8c76dfa00e" dependencies = [ "backtrace", "once_cell", @@ -6327,23 +7024,23 @@ dependencies = [ [[package]] name = "sentry-contexts" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7615dc588930f1fd2e721774f25844ae93add2dbe2d3c2f995ce5049af898147" +checksum = "6436c1bad22cdeb02179ea8ef116ffc217797c028927def303bc593d9320c0d1" dependencies = [ "hostname", "libc", "os_info", - "rustc_version", + "rustc_version 0.4.1", "sentry-core", "uname", ] [[package]] name = "sentry-core" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f51264e4013ed9b16558cce43917b983fa38170de2ca480349ceb57d71d6053" +checksum = "901f761681f97db3db836ef9e094acdd8756c40215326c194201941947164ef1" dependencies = [ "once_cell", "rand 0.8.5", @@ -6354,9 +7051,9 @@ dependencies = [ [[package]] name = "sentry-debug-images" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fe6180fa564d40bb942c9f0084ffb5de691c7357ead6a2b7a3154fae9e401dd" +checksum = "afdb263e73d22f39946f6022ed455b7561b22ff5553aca9be3c6a047fa39c328" dependencies = [ "findshlibs", "once_cell", @@ -6365,9 +7062,9 @@ dependencies = [ [[package]] name = "sentry-panic" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "323160213bba549f9737317b152af116af35c0410f4468772ee9b606d3d6e0fa" +checksum = "74fbf1c163f8b6a9d05912e1b272afa27c652e8b47ea60cb9a57ad5e481eea99" dependencies = [ "sentry-backtrace", "sentry-core", @@ -6375,9 +7072,9 @@ dependencies = [ [[package]] name = "sentry-tracing" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38033822128e73f7b6ca74c1631cef8868890c6cb4008a291cf73530f87b4eac" +checksum = "82eabcab0a047040befd44599a1da73d3adb228ff53b5ed9795ae04535577704" dependencies = [ "sentry-backtrace", "sentry-core", @@ -6387,9 +7084,9 @@ dependencies = [ [[package]] name = "sentry-types" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e663b3eb62ddfc023c9cf5432daf5f1a4f6acb1df4d78dd80b740b32dd1a740" +checksum = "da956cca56e0101998c8688bc65ce1a96f00673a0e58e663664023d4c7911e82" dependencies = [ "debugid", "hex", @@ -6443,8 +7140,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -6461,11 +7158,31 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2 1.0.86", + "quote 1.0.37", + "syn 2.0.79", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ - "itoa", "serde", ] @@ -6501,17 +7218,17 @@ checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling 0.13.4", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -6626,9 +7343,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -6655,15 +7372,15 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "simple_asn1" @@ -6719,9 +7436,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] @@ -6749,10 +7466,10 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "async-lock", "atomic-take", - "base64 0.21.5", + "base64 0.21.7", "bip39", "blake2-rfc", "bs58", @@ -6768,7 +7485,7 @@ dependencies = [ "hashbrown 0.14.5", "hex", "hmac 0.12.1", - "itertools 0.12.0", + "itertools 0.12.1", "libm", "libsecp256k1", "merlin", @@ -6806,7 +7523,7 @@ checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7" dependencies = [ "async-channel", "async-lock", - "base64 0.21.5", + "base64 0.21.7", "blake2-rfc", "derive_more 0.99.18", "either", @@ -6817,7 +7534,7 @@ dependencies = [ "futures-util", "hashbrown 0.14.5", "hex", - "itertools 0.12.0", + "itertools 0.12.1", "log", "lru", "no-std-net", @@ -6866,19 +7583,19 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek", "rand_core 0.6.4", - "rustc_version", + "rustc_version 0.4.1", "sha2 0.10.8", "subtle", ] [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -6947,12 +7664,12 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.8", + "der 0.7.9", ] [[package]] @@ -6963,20 +7680,19 @@ checksum = "c85070f382340e8b23a75808e83573ddf65f9ad9143df9573ca37c1ed2ee956a" [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ - "itertools 0.12.0", "nom", "unicode_categories", ] [[package]] name = "sqlx" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfa89bea9500db4a0d038513d7a060566bfc51d46d1c014847049a45cce85e8" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -6987,9 +7703,9 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06e2f2bd861719b1f3f0c7dbe1d80c30bf59e76cf019f07d9014ed7eefb8e08" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ "atoi", "bigdecimal", @@ -7008,7 +7724,7 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.1.0", + "indexmap 2.5.0", "ipnetwork", "log", "memchr", @@ -7031,22 +7747,22 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f998a9defdbd48ed005a89362bd40dd2117502f15294f61c8d47034107dbbdc" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "sqlx-core", "sqlx-macros-core", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] name = "sqlx-macros-core" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d100558134176a2629d46cec0c8891ba0be8910f7896abfdb75ef4ab6f4e7ce" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", @@ -7054,7 +7770,7 @@ dependencies = [ "hex", "once_cell", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "serde", "serde_json", "sha2 0.10.8", @@ -7062,7 +7778,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.72", + "syn 2.0.79", "tempfile", "tokio", "url", @@ -7070,9 +7786,9 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cac0ab331b14cb3921c62156d913e4c15b74fb6ec0f3146bd4ef6e4fb3c12" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", "base64 0.22.1", @@ -7115,9 +7831,9 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9734dbce698c67ecf67c442f768a5e90a49b2a4d61a9f1d59f73874bd4cf0710" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", "base64 0.22.1", @@ -7158,9 +7874,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75b419c3c1b1697833dd927bdc4c6545a620bc1bbafabd44e1efbe9afcd337e" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" dependencies = [ "atoi", "chrono", @@ -7194,13 +7910,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -7241,7 +7957,7 @@ dependencies = [ "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -7262,16 +7978,31 @@ checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck 0.5.0", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "rustversion", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "subxt" @@ -7321,11 +8052,11 @@ dependencies = [ "jsonrpsee 0.21.0", "parity-scale-codec", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "scale-info", "scale-typegen", "subxt-metadata", - "syn 2.0.72", + "syn 2.0.79", "thiserror", "tokio", ] @@ -7356,10 +8087,10 @@ dependencies = [ "darling 0.20.10", "parity-scale-codec", "proc-macro-error", - "quote 1.0.36", + "quote 1.0.37", "scale-typegen", "subxt-codegen", - "syn 2.0.72", + "syn 2.0.79", ] [[package]] @@ -7414,18 +8145,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.72" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "unicode-ident", ] @@ -7437,8 +8168,8 @@ checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ "proc-macro-error", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -7452,6 +8183,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" @@ -7461,7 +8195,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -7474,6 +8219,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-constants-generator" version = "0.1.0" @@ -7502,14 +8257,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7523,43 +8279,44 @@ dependencies = [ [[package]] name = "test-casing" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2378d657757969a2cec9ec4eb616be8f01be98c21c6467991f91cb182e4653b" +checksum = "f4d233764420cbfe244e6a50177798a01b20184df210eb626898cd1b20c06633" dependencies = [ "test-casing-macro", ] [[package]] name = "test-casing-macro" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfbe7811249c4c914b06141b8ac0f2cee2733fb883d05eb19668a45fc60c3d5" +checksum = "f9b53c7124dd88026d5d98a1eb1fd062a578b7d783017c9298825526c7fb6427" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "test-log" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b319995299c65d522680decf80f2c108d85b861d81dfe340a10d16cee29d9e6" +checksum = "3dffced63c2b5c7be278154d76b479f9f9920ed34e7574201407f0b14e2bbb93" dependencies = [ "env_logger", "test-log-macros", + "tracing-subscriber", ] [[package]] name = "test-log-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8f546451eaa38373f549093fe9fd05e7d2bade739e2ddf834b9968621d60107" +checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -7573,35 +8330,35 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -7697,9 +8454,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -7725,9 +8482,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.1" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d040ac2b29ab03b09d4129c2f5bbd012a3ac2f79d38ff506a4bf8dd34b0eac8a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -7748,8 +8505,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -7789,16 +8546,16 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.10", + "rustls 0.23.13", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -7821,69 +8578,75 @@ dependencies = [ ] [[package]] -name = "toml_datetime" -version = "0.6.6" +name = "toml" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.22", +] [[package]] -name = "toml_edit" -version = "0.19.15" +name = "toml_datetime" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", + "serde", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.5.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.5.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.20", ] [[package]] name = "tonic" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38659f4a91aba8598d27821589f5db7dddd94601e7a01b1e485a50e5484c7401" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", "base64 0.22.1", "bytes", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", - "prost 0.13.1", + "prost 0.13.3", "socket2", "tokio", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -7909,6 +8672,22 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.5.2" @@ -7918,7 +8697,7 @@ dependencies = [ "bitflags 2.6.0", "bytes", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "pin-project-lite", "tokio", @@ -7928,15 +8707,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -7957,8 +8736,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -7971,17 +8750,6 @@ dependencies = [ "valuable", ] -[[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" @@ -8006,7 +8774,7 @@ dependencies = [ "smallvec", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", "tracing-subscriber", "web-time", ] @@ -8023,9 +8791,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", @@ -8039,35 +8807,34 @@ dependencies = [ "time", "tracing", "tracing-core", - "tracing-log 0.1.4", + "tracing-log", "tracing-serde", ] [[package]] name = "triomphe" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.86" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419ecd263363827c5730386f418715766f584e2f874d32c23c5b00bd9727e7e" +checksum = "207aa50d36c4be8d8c6ea829478be44a372c6a77669937bb39c698e52f1491e8" dependencies = [ - "basic-toml", "glob", - "once_cell", "serde", "serde_derive", "serde_json", "termcolor", + "toml", ] [[package]] @@ -8095,9 +8862,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" @@ -8120,6 +8887,12 @@ dependencies = [ "libc", ] +[[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" @@ -8131,15 +8904,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" @@ -8150,17 +8923,23 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" + [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" @@ -8170,9 +8949,9 @@ checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -8196,15 +8975,27 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ad948c1cb799b1a70f836077721a92a35ac177d4daddf4c20a633786d4cf618" dependencies = [ - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "unsigned-varint" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" [[package]] name = "untrusted" @@ -8214,11 +9005,11 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.8.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "log", "native-tls", "once_cell", @@ -8245,15 +9036,15 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "serde", ] @@ -8291,9 +9082,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vise" @@ -8315,7 +9106,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "671d3b894d5d0849f0a597f56bf071f42d4f2a1cbcf2f78ca21f870ab7c0cc2b" dependencies = [ - "hyper 0.14.29", + "hyper 0.14.30", "once_cell", "tokio", "tracing", @@ -8329,8 +9120,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a511871dc5de990a3b2a0e715facfbc5da848c0c0395597a1415029fb7c250a" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -8353,9 +9144,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -8390,34 +9181,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -8427,38 +9219,38 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ - "quote 1.0.36", + "quote 1.0.37", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" dependencies = [ "futures-util", "js-sys", @@ -8509,9 +9301,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -8529,9 +9321,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.0" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de2cfda980f21be5a7ed2eadb3e6fe074d56022bea2cdeb1a62eb220fc04188" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -8550,9 +9342,9 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ "redox_syscall", "wasite", @@ -8576,11 +9368,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -8591,20 +9383,41 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] -name = "windows-sys" -version = "0.45.0" +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.42.2", + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -8634,21 +9447,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -8680,12 +9478,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -8698,12 +9490,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -8716,12 +9502,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -8740,12 +9520,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -8758,12 +9532,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -8776,12 +9544,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -8794,12 +9556,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -8814,28 +9570,27 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", ] [[package]] name = "winreg" -version = "0.52.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -8862,20 +9617,11 @@ dependencies = [ "zeroize", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yap" @@ -8885,29 +9631,30 @@ checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" [[package]] name = "zerocopy" -version = "0.7.31" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.31" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -8919,8 +9666,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -9045,14 +9792,13 @@ dependencies = [ [[package]] name = "zkevm_circuits" -version = "0.140.2" +version = "0.140.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8beed4cc1ab1f9d99a694506d18705e10059534b30742832be49637c4775e1f8" +checksum = "e3c365c801e0c6eda83fbd153df45575172beb406bfb663d386f9154b4325eda" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bincode", "boojum", - "cs_derive", "derivative", "hex", "itertools 0.10.5", @@ -9063,18 +9809,18 @@ dependencies = [ "serde_json", "smallvec", "zkevm_opcode_defs 0.132.0", + "zksync_cs_derive", ] [[package]] name = "zkevm_circuits" -version = "0.141.1" +version = "0.141.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20f1a64d256cc5f5c58d19cf976cb45973df54e4e3010ca4a3e6fafe9f06075e" +checksum = "2ccd0352e122a4e6f0046d2163b7e692e627b23fc3264faa77331a21b65833fd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bincode", "boojum", - "cs_derive", "derivative", "hex", "itertools 0.10.5", @@ -9085,6 +9831,7 @@ dependencies = [ "serde_json", "smallvec", "zkevm_opcode_defs 0.141.0", + "zksync_cs_derive", ] [[package]] @@ -9093,7 +9840,7 @@ version = "0.150.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784fa7cfb51e17c5ced112bca43da30b3468b2347b7af0427ad9638759fb140e" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "boojum", "derivative", "hex", @@ -9143,7 +9890,7 @@ dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", "ethereum-types", - "k256 0.13.3", + "k256 0.13.4", "lazy_static", "sha2 0.10.8", "sha3 0.10.8", @@ -9158,7 +9905,7 @@ dependencies = [ "bitflags 2.6.0", "blake2 0.10.6", "ethereum-types", - "k256 0.13.3", + "k256 0.13.4", "lazy_static", "p256", "serde", @@ -9198,7 +9945,7 @@ dependencies = [ "chrono", "ethabi", "hex", - "num_enum 0.7.2", + "num_enum 0.7.3", "secrecy", "serde", "serde_json", @@ -9215,7 +9962,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ffa03efe9bdb137a4b36b97d1a74237e18c9ae42b755163d903a9d48c1a5d80" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bit-vec", "blake2s_simd", "byteorder", @@ -9373,7 +10120,7 @@ dependencies = [ "ed25519-dalek", "elliptic-curve 0.13.8", "hex", - "k256 0.13.3", + "k256 0.13.4", "num-bigint 0.4.6", "num-traits", "rand 0.8.5", @@ -9392,7 +10139,7 @@ dependencies = [ "anyhow", "async-trait", "rand 0.8.5", - "semver", + "semver 1.0.23", "tracing", "vise", "zksync_concurrency", @@ -9417,14 +10164,14 @@ dependencies = [ "build_html", "bytesize", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "im", "once_cell", "pin-project", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", - "semver", + "semver 1.0.23", "snow", "thiserror", "tls-listener", @@ -9451,7 +10198,7 @@ dependencies = [ "bit-vec", "hex", "num-bigint 0.4.6", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", "serde", "thiserror", @@ -9471,7 +10218,7 @@ checksum = "ff43cfd03ea205c763e74362dc6ec5a4d74b6b1baef0fb134dde92a8880397f7" dependencies = [ "anyhow", "async-trait", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", "thiserror", "tracing", @@ -9567,7 +10314,7 @@ dependencies = [ "hex", "lazy_static", "regex", - "semver", + "semver 1.0.23", "serde", "serde_json", "tempfile", @@ -9635,7 +10382,7 @@ checksum = "5939e2df4288c263c706ff18ac718e984149223ad4289d6d957d767dcfc04c81" dependencies = [ "proc-macro-error", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "syn 1.0.109", ] @@ -9655,8 +10402,11 @@ dependencies = [ "anyhow", "async-trait", "base58", + "bincode", "blake2 0.10.6", "blake2b_simd", + "celestia-rpc", + "celestia-types", "flate2", "futures 0.3.30", "hex", @@ -9704,7 +10454,7 @@ dependencies = [ "chrono", "hex", "itertools 0.10.5", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", "serde", "serde_json", @@ -9848,10 +10598,10 @@ dependencies = [ "anyhow", "assert_matches", "async-trait", - "clap 4.4.6", + "clap 4.5.18", "envy", "futures 0.3.30", - "rustc_version", + "rustc_version 0.4.1", "serde", "serde_json", "tempfile", @@ -9907,7 +10657,7 @@ dependencies = [ "chrono", "fraction", "rand 0.8.5", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "tokio", "url", @@ -9956,7 +10706,7 @@ dependencies = [ "num-integer", "num-traits", "proc-macro2 1.0.86", - "quote 1.0.36", + "quote 1.0.37", "serde", "syn 1.0.109", ] @@ -10051,7 +10801,7 @@ version = "0.1.0" dependencies = [ "anyhow", "assert_matches", - "clap 4.4.6", + "clap 4.5.18", "insta", "leb128", "once_cell", @@ -10086,7 +10836,7 @@ dependencies = [ "futures 0.3.30", "itertools 0.10.5", "once_cell", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "serde_json", "tempfile", @@ -10180,7 +10930,7 @@ dependencies = [ "thiserror", "thread_local", "tokio", - "tower", + "tower 0.4.13", "tower-http", "tracing", "vise", @@ -10215,7 +10965,7 @@ dependencies = [ "async-trait", "rand 0.8.5", "secrecy", - "semver", + "semver 1.0.23", "tempfile", "test-casing", "thiserror", @@ -10302,7 +11052,7 @@ dependencies = [ "ctrlc", "futures 0.3.30", "pin-project-lite", - "semver", + "semver 1.0.23", "thiserror", "tokio", "tracing", @@ -10358,8 +11108,8 @@ name = "zksync_node_framework_derive" version = "0.1.0" dependencies = [ "proc-macro2 1.0.86", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -10465,9 +11215,9 @@ dependencies = [ "google-cloud-auth", "google-cloud-storage", "http 1.1.0", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde_json", "tempfile", "tokio", @@ -10498,10 +11248,10 @@ dependencies = [ "anyhow", "axum", "chrono", - "hyper 1.3.1", + "hyper 1.4.1", "serde_json", "tokio", - "tower", + "tower 0.4.13", "tracing", "vise", "zksync_basic_types", @@ -10523,7 +11273,7 @@ dependencies = [ "anyhow", "bit-vec", "once_cell", - "prost 0.12.1", + "prost 0.12.6", "prost-reflect", "quick-protobuf", "rand 0.8.5", @@ -10548,8 +11298,8 @@ dependencies = [ "prost-build", "prost-reflect", "protox", - "quote 1.0.36", - "syn 2.0.72", + "quote 1.0.37", + "syn 2.0.79", ] [[package]] @@ -10558,7 +11308,7 @@ version = "0.1.0" dependencies = [ "anyhow", "hex", - "prost 0.12.1", + "prost 0.12.6", "rand 0.8.5", "secrecy", "serde_json", @@ -10626,7 +11376,7 @@ name = "zksync_server" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.6", + "clap 4.5.18", "futures 0.3.30", "serde_json", "tikv-jemallocator", @@ -10656,7 +11406,7 @@ dependencies = [ name = "zksync_shared_metrics" version = "0.1.0" dependencies = [ - "rustc_version", + "rustc_version 0.4.1", "tracing", "vise", "zksync_dal", @@ -10797,7 +11547,7 @@ dependencies = [ "anyhow", "async-trait", "envy", - "reqwest 0.12.5", + "reqwest 0.12.7", "secp256k1", "serde", "thiserror", @@ -10880,9 +11630,9 @@ dependencies = [ "hex", "itertools 0.10.5", "num", - "num_enum 0.7.2", + "num_enum 0.7.3", "once_cell", - "prost 0.12.1", + "prost 0.12.6", "rlp", "secp256k1", "serde", @@ -10916,7 +11666,7 @@ dependencies = [ "num", "once_cell", "rand 0.8.5", - "reqwest 0.12.5", + "reqwest 0.12.7", "serde", "serde_json", "thiserror", @@ -11015,7 +11765,7 @@ dependencies = [ "assert_matches", "async-trait", "backon", - "dashmap", + "dashmap 5.5.3", "futures 0.3.30", "once_cell", "rand 0.8.5", @@ -11054,7 +11804,7 @@ dependencies = [ "pin-project-lite", "rand 0.8.5", "rlp", - "rustls 0.23.10", + "rustls 0.23.13", "serde", "serde_json", "test-casing", @@ -11068,9 +11818,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index d5ccff6eb1cf..cf2f2d79efb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -208,6 +208,10 @@ subxt-metadata = "0.34.0" parity-scale-codec = { version = "3.6.9", default-features = false } subxt-signer = { version = "0.34", default-features = false } +# Celestia +celestia-rpc = { git = "https://github.com/S1nus/lumina.git", rev = "8c8e53aaf7f976d10a71eba670f23e5ba38997c6" } +celestia-types = { git = "https://github.com/S1nus/lumina.git", rev = "8c8e53aaf7f976d10a71eba670f23e5ba38997c6" } + # Here and below: # We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. # However, for the historical version of protocol crates, we have lax requirements. Otherwise, diff --git a/core/bin/zksync_server/src/main.rs b/core/bin/zksync_server/src/main.rs index da0a93f624df..35d6cd708981 100644 --- a/core/bin/zksync_server/src/main.rs +++ b/core/bin/zksync_server/src/main.rs @@ -11,12 +11,11 @@ use zksync_config::{ }, fri_prover_group::FriProverGroupConfig, house_keeper::HouseKeeperConfig, - secrets::DataAvailabilitySecrets, - BasicWitnessInputProducerConfig, ContractsConfig, DatabaseSecrets, ExperimentalVmConfig, - ExternalPriceApiClientConfig, FriProofCompressorConfig, FriProverConfig, - FriProverGatewayConfig, FriWitnessGeneratorConfig, FriWitnessVectorGeneratorConfig, - L1Secrets, ObservabilityConfig, PrometheusConfig, ProofDataHandlerConfig, - ProtectiveReadsWriterConfig, Secrets, + BasicWitnessInputProducerConfig, ContractsConfig, DataAvailabilitySecrets, DatabaseSecrets, + ExperimentalVmConfig, ExternalPriceApiClientConfig, FriProofCompressorConfig, + FriProverConfig, FriProverGatewayConfig, FriWitnessGeneratorConfig, + FriWitnessVectorGeneratorConfig, L1Secrets, ObservabilityConfig, PrometheusConfig, + ProofDataHandlerConfig, ProtectiveReadsWriterConfig, Secrets, }, ApiConfig, BaseTokenAdjusterConfig, ContractVerifierConfig, DAClientConfig, DADispatcherConfig, DBConfig, EthConfig, EthWatchConfig, ExternalProofIntegrationApiConfig, GasAdjusterConfig, diff --git a/core/bin/zksync_server/src/node_builder.rs b/core/bin/zksync_server/src/node_builder.rs index 4600b0f9e543..560b7fb8f5a8 100644 --- a/core/bin/zksync_server/src/node_builder.rs +++ b/core/bin/zksync_server/src/node_builder.rs @@ -1,7 +1,7 @@ //! This module provides a "builder" for the main node, //! as well as an interface to run the node with the specified components. -use anyhow::Context; +use anyhow::{bail, Context}; use zksync_config::{ configs::{ da_client::DAClientConfig, eth_sender::PubdataSendingMode, @@ -28,7 +28,7 @@ use zksync_node_framework::{ consensus::MainNodeConsensusLayer, contract_verification_api::ContractVerificationApiLayer, da_clients::{ - avail::AvailWiringLayer, no_da::NoDAClientWiringLayer, + avail::AvailWiringLayer, celestia::CelestiaWiringLayer, no_da::NoDAClientWiringLayer, object_store::ObjectStorageClientWiringLayer, }, da_dispatcher::DataAvailabilityDispatcherLayer, @@ -510,16 +510,21 @@ impl MainNodeBuilder { }; let secrets = try_load_config!(self.secrets.data_availability); - match (da_client_config, secrets) { (DAClientConfig::Avail(config), DataAvailabilitySecrets::Avail(secret)) => { self.node.add_layer(AvailWiringLayer::new(config, secret)); } + (DAClientConfig::Celestia(config), DataAvailabilitySecrets::Celestia(secret)) => { + self.node + .add_layer(CelestiaWiringLayer::new(config, secret)); + } + (DAClientConfig::ObjectStore(config), _) => { self.node .add_layer(ObjectStorageClientWiringLayer::new(config)); } + _ => bail!("invalid pair of da_client and da_secrets"), } Ok(self) diff --git a/core/lib/basic_types/src/lib.rs b/core/lib/basic_types/src/lib.rs index 8b6a7f949dd1..9c7127c27baa 100644 --- a/core/lib/basic_types/src/lib.rs +++ b/core/lib/basic_types/src/lib.rs @@ -28,7 +28,7 @@ pub mod commitment; pub mod network; pub mod protocol_version; pub mod prover_dal; -pub mod seed_phrase; +pub mod secrets; pub mod settlement; pub mod tee_types; pub mod url; diff --git a/core/lib/basic_types/src/seed_phrase.rs b/core/lib/basic_types/src/secrets.rs similarity index 53% rename from core/lib/basic_types/src/seed_phrase.rs rename to core/lib/basic_types/src/secrets.rs index 332bfd585945..c6313ec2aa05 100644 --- a/core/lib/basic_types/src/seed_phrase.rs +++ b/core/lib/basic_types/src/secrets.rs @@ -18,3 +18,20 @@ impl FromStr for SeedPhrase { Ok(SeedPhrase(s.parse()?)) } } + +#[derive(Debug, Clone)] +pub struct PrivateKey(pub Secret); + +impl PartialEq for PrivateKey { + fn eq(&self, other: &Self) -> bool { + self.0.expose_secret().eq(other.0.expose_secret()) + } +} + +impl FromStr for PrivateKey { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { + Ok(PrivateKey(s.parse()?)) + } +} diff --git a/core/lib/config/src/configs/da_client/avail.rs b/core/lib/config/src/configs/da_client/avail.rs index 590dc5fef18a..aed100a30878 100644 --- a/core/lib/config/src/configs/da_client/avail.rs +++ b/core/lib/config/src/configs/da_client/avail.rs @@ -1,7 +1,7 @@ use serde::Deserialize; -use zksync_basic_types::seed_phrase::SeedPhrase; +use zksync_basic_types::secrets::SeedPhrase; -#[derive(Clone, Debug, PartialEq, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Deserialize)] pub struct AvailConfig { pub api_node_url: String, pub bridge_api_url: String, @@ -12,5 +12,5 @@ pub struct AvailConfig { #[derive(Clone, Debug, PartialEq)] pub struct AvailSecrets { - pub seed_phrase: Option, + pub seed_phrase: SeedPhrase, } diff --git a/core/lib/config/src/configs/da_client/celestia.rs b/core/lib/config/src/configs/da_client/celestia.rs new file mode 100644 index 000000000000..a0c1cb7e35cc --- /dev/null +++ b/core/lib/config/src/configs/da_client/celestia.rs @@ -0,0 +1,13 @@ +use serde::Deserialize; +use zksync_basic_types::secrets::PrivateKey; + +#[derive(Clone, Debug, Default, PartialEq, Deserialize)] +pub struct CelestiaConfig { + pub api_node_url: String, + pub namespace: String, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct CelestiaSecrets { + pub private_key: PrivateKey, +} diff --git a/core/lib/config/src/configs/da_client/mod.rs b/core/lib/config/src/configs/da_client/mod.rs index 406305a77b16..4806d7ed0996 100644 --- a/core/lib/config/src/configs/da_client/mod.rs +++ b/core/lib/config/src/configs/da_client/mod.rs @@ -1,12 +1,15 @@ -use crate::{AvailConfig, ObjectStoreConfig}; +use crate::{AvailConfig, CelestiaConfig, ObjectStoreConfig}; pub mod avail; +pub mod celestia; pub const AVAIL_CLIENT_CONFIG_NAME: &str = "Avail"; +pub const CELESTIA_CLIENT_CONFIG_NAME: &str = "Celestia"; pub const OBJECT_STORE_CLIENT_CONFIG_NAME: &str = "ObjectStore"; #[derive(Debug, Clone, PartialEq)] pub enum DAClientConfig { Avail(AvailConfig), + Celestia(CelestiaConfig), ObjectStore(ObjectStoreConfig), } diff --git a/core/lib/config/src/configs/mod.rs b/core/lib/config/src/configs/mod.rs index 1ad503e0687f..64f0d440b269 100644 --- a/core/lib/config/src/configs/mod.rs +++ b/core/lib/config/src/configs/mod.rs @@ -5,7 +5,7 @@ pub use self::{ commitment_generator::CommitmentGeneratorConfig, contract_verifier::ContractVerifierConfig, contracts::{ContractsConfig, EcosystemContracts}, - da_client::{avail::AvailConfig, DAClientConfig}, + da_client::{avail::AvailConfig, celestia::CelestiaConfig, DAClientConfig}, da_dispatcher::DADispatcherConfig, database::{DBConfig, PostgresConfig}, eth_sender::{EthConfig, GasAdjusterConfig}, @@ -25,7 +25,7 @@ pub use self::{ proof_data_handler::ProofDataHandlerConfig, prover_job_monitor::ProverJobMonitorConfig, pruning::PruningConfig, - secrets::{DatabaseSecrets, L1Secrets, Secrets}, + secrets::{DataAvailabilitySecrets, DatabaseSecrets, L1Secrets, Secrets}, snapshot_recovery::SnapshotRecoveryConfig, snapshots_creator::SnapshotsCreatorConfig, utils::PrometheusConfig, diff --git a/core/lib/config/src/configs/secrets.rs b/core/lib/config/src/configs/secrets.rs index 779bad370659..4d95ae4d1ede 100644 --- a/core/lib/config/src/configs/secrets.rs +++ b/core/lib/config/src/configs/secrets.rs @@ -1,7 +1,10 @@ use anyhow::Context; use zksync_basic_types::url::SensitiveUrl; -use crate::configs::{consensus::ConsensusSecrets, da_client::avail::AvailSecrets}; +use crate::configs::{ + consensus::ConsensusSecrets, + da_client::{avail::AvailSecrets, celestia::CelestiaSecrets}, +}; #[derive(Debug, Clone, PartialEq)] pub struct DatabaseSecrets { @@ -18,6 +21,7 @@ pub struct L1Secrets { #[derive(Debug, Clone, PartialEq)] pub enum DataAvailabilitySecrets { Avail(AvailSecrets), + Celestia(CelestiaSecrets), } #[derive(Debug, Clone, PartialEq)] diff --git a/core/lib/config/src/lib.rs b/core/lib/config/src/lib.rs index 9191edc39822..c02f3e531b34 100644 --- a/core/lib/config/src/lib.rs +++ b/core/lib/config/src/lib.rs @@ -1,8 +1,8 @@ #![allow(clippy::upper_case_acronyms, clippy::derive_partial_eq_without_eq)] pub use crate::configs::{ - ApiConfig, AvailConfig, BaseTokenAdjusterConfig, ContractVerifierConfig, ContractsConfig, - DAClientConfig, DADispatcherConfig, DBConfig, EthConfig, EthWatchConfig, + ApiConfig, AvailConfig, BaseTokenAdjusterConfig, CelestiaConfig, ContractVerifierConfig, + ContractsConfig, DAClientConfig, DADispatcherConfig, DBConfig, EthConfig, EthWatchConfig, ExternalProofIntegrationApiConfig, GasAdjusterConfig, GenesisConfig, ObjectStoreConfig, PostgresConfig, SnapshotsCreatorConfig, }; diff --git a/core/lib/config/src/testonly.rs b/core/lib/config/src/testonly.rs index dbcccfe52ca1..03f1470db3a4 100644 --- a/core/lib/config/src/testonly.rs +++ b/core/lib/config/src/testonly.rs @@ -7,7 +7,7 @@ use zksync_basic_types::{ commitment::L1BatchCommitmentMode, network::Network, protocol_version::{ProtocolSemanticVersion, ProtocolVersionId, VersionPatch}, - seed_phrase::SeedPhrase, + secrets::SeedPhrase, vm::FastVmMode, L1BatchNumber, L1ChainId, L2ChainId, }; @@ -870,6 +870,14 @@ impl Distribution for EncodeDist { } } +impl Distribution for EncodeDist { + fn sample(&self, rng: &mut R) -> configs::secrets::DataAvailabilitySecrets { + configs::secrets::DataAvailabilitySecrets::Avail(configs::da_client::avail::AvailSecrets { + seed_phrase: SeedPhrase(Secret::new(self.sample(rng))), + }) + } +} + impl Distribution for EncodeDist { fn sample(&self, rng: &mut R) -> configs::wallets::Wallet { configs::wallets::Wallet::new(K256PrivateKey::from_bytes(rng.gen()).unwrap()) @@ -947,14 +955,6 @@ impl Distribution for EncodeDist { } } -impl Distribution for EncodeDist { - fn sample(&self, rng: &mut R) -> configs::secrets::DataAvailabilitySecrets { - configs::secrets::DataAvailabilitySecrets::Avail(configs::da_client::avail::AvailSecrets { - seed_phrase: Some(SeedPhrase(Secret::new(self.sample(rng)))), - }) - } -} - impl Distribution for EncodeDist { fn sample(&self, rng: &mut R) -> configs::da_dispatcher::DADispatcherConfig { configs::da_dispatcher::DADispatcherConfig { diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index 0fc3ad216f87..178c1bfbe811 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -2,8 +2,8 @@ use std::env; use zksync_config::configs::{ da_client::{ - avail::AvailSecrets, DAClientConfig, AVAIL_CLIENT_CONFIG_NAME, - OBJECT_STORE_CLIENT_CONFIG_NAME, + avail::AvailSecrets, celestia::CelestiaSecrets, DAClientConfig, AVAIL_CLIENT_CONFIG_NAME, + CELESTIA_CLIENT_CONFIG_NAME, OBJECT_STORE_CLIENT_CONFIG_NAME, }, secrets::DataAvailabilitySecrets, }; @@ -12,9 +12,10 @@ use crate::{envy_load, FromEnv}; impl FromEnv for DAClientConfig { fn from_env() -> anyhow::Result { - let client_tag = std::env::var("DA_CLIENT")?; + let client_tag = env::var("DA_CLIENT")?; let config = match client_tag.as_str() { AVAIL_CLIENT_CONFIG_NAME => Self::Avail(envy_load("da_avail_config", "DA_")?), + CELESTIA_CLIENT_CONFIG_NAME => Self::Celestia(envy_load("da_celestia_config", "DA_")?), OBJECT_STORE_CLIENT_CONFIG_NAME => { Self::ObjectStore(envy_load("da_object_store", "DA_")?) } @@ -31,11 +32,20 @@ impl FromEnv for DataAvailabilitySecrets { let secrets = match client_tag.as_str() { AVAIL_CLIENT_CONFIG_NAME => { let seed_phrase = env::var("DA_SECRETS_SEED_PHRASE") - .ok() - .map(|s| s.parse()) - .transpose()?; + .map_err(|e| anyhow::format_err!("seed phrase not found: {}", e))? + .parse() + .map_err(|e| anyhow::format_err!("failed to parse the seed phrase: {}", e))?; + Self::Avail(AvailSecrets { seed_phrase }) } + CELESTIA_CLIENT_CONFIG_NAME => { + let private_key = env::var("DA_SECRETS_PRIVATE_KEY") + .map_err(|e| anyhow::format_err!("private key not found: {}", e))? + .parse() + .map_err(|e| anyhow::format_err!("failed to parse the private key: {}", e))?; + Self::Celestia(CelestiaSecrets { private_key }) + } + _ => anyhow::bail!("Unknown DA client name: {}", client_tag), }; @@ -50,7 +60,7 @@ mod tests { da_client::{DAClientConfig, DAClientConfig::ObjectStore}, object_store::ObjectStoreMode::GCS, }, - AvailConfig, ObjectStoreConfig, + AvailConfig, CelestiaConfig, ObjectStoreConfig, }; use super::*; @@ -112,6 +122,8 @@ mod tests { DA_APP_ID="1" DA_TIMEOUT="2" DA_MAX_RETRIES="3" + + DA_SECRETS_SEED_PHRASE="bottom drive obey lake curtain smoke basket hold race lonely fit walk" "#; lock.set_env(config); @@ -139,15 +151,62 @@ mod tests { lock.set_env(config); - let actual = match DataAvailabilitySecrets::from_env().unwrap() { - DataAvailabilitySecrets::Avail(avail) => avail.seed_phrase, + let DataAvailabilitySecrets::Avail(actual) = DataAvailabilitySecrets::from_env().unwrap() + else { + panic!("expected Avail config") }; - assert_eq!( - actual.unwrap(), + actual.seed_phrase, "bottom drive obey lake curtain smoke basket hold race lonely fit walk" .parse() .unwrap() ); } + + fn expected_celestia_da_layer_config(api_node_url: &str, namespace: &str) -> DAClientConfig { + DAClientConfig::Celestia(CelestiaConfig { + api_node_url: api_node_url.to_string(), + namespace: namespace.to_string(), + }) + } + + #[test] + fn from_env_celestia_client() { + let mut lock = MUTEX.lock(); + let config = r#" + DA_CLIENT="Celestia" + DA_API_NODE_URL="localhost:12345" + DA_NAMESPACE="0x1234567890abcdef" + "#; + lock.set_env(config); + + let actual = DAClientConfig::from_env().unwrap(); + assert_eq!( + actual, + expected_celestia_da_layer_config("localhost:12345", "0x1234567890abcdef") + ); + } + + #[test] + fn from_env_celestia_secrets() { + let mut lock = MUTEX.lock(); + let config = r#" + DA_CLIENT="Celestia" + DA_SECRETS_PRIVATE_KEY="0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" + "#; + + lock.set_env(config); + + let DataAvailabilitySecrets::Celestia(actual) = + DataAvailabilitySecrets::from_env().unwrap() + else { + panic!("expected Celestia config") + }; + assert_eq!( + actual.private_key, + "0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" + .parse() + .unwrap() + ); + } } diff --git a/core/lib/env_config/src/database.rs b/core/lib/env_config/src/database.rs index c067c96de73e..119d64b7738c 100644 --- a/core/lib/env_config/src/database.rs +++ b/core/lib/env_config/src/database.rs @@ -1,23 +1,8 @@ -use std::{env, error, str::FromStr}; +use std::env; -use anyhow::Context as _; use zksync_config::{configs::DatabaseSecrets, DBConfig, PostgresConfig}; -use crate::{envy_load, FromEnv}; - -fn parse_optional_var(name: &str) -> anyhow::Result> -where - T: FromStr, - T::Err: 'static + error::Error + Send + Sync, -{ - env::var(name) - .ok() - .map(|val| { - val.parse() - .with_context(|| format!("failed to parse env variable {name}")) - }) - .transpose() -} +use crate::{envy_load, utils::parse_optional_var, FromEnv}; impl FromEnv for DBConfig { fn from_env() -> anyhow::Result { diff --git a/core/lib/env_config/src/utils.rs b/core/lib/env_config/src/utils.rs index 211e73ae2b17..9f363777bf69 100644 --- a/core/lib/env_config/src/utils.rs +++ b/core/lib/env_config/src/utils.rs @@ -1,3 +1,6 @@ +use std::{env, error, str::FromStr}; + +use anyhow::Context; use zksync_config::configs::PrometheusConfig; use crate::{envy_load, FromEnv}; @@ -7,3 +10,17 @@ impl FromEnv for PrometheusConfig { envy_load("prometheus", "API_PROMETHEUS_") } } + +pub fn parse_optional_var(name: &str) -> anyhow::Result> +where + T: FromStr, + T::Err: 'static + error::Error + Send + Sync, +{ + env::var(name) + .ok() + .map(|val| { + val.parse() + .with_context(|| format!("failed to parse env variable {name}")) + }) + .transpose() +} diff --git a/core/lib/protobuf_config/src/da_client.rs b/core/lib/protobuf_config/src/da_client.rs index 1499e88efb4c..c844dfc2b269 100644 --- a/core/lib/protobuf_config/src/da_client.rs +++ b/core/lib/protobuf_config/src/da_client.rs @@ -1,10 +1,10 @@ use anyhow::Context; use zksync_config::{ configs::{ - da_client::DAClientConfig::{Avail, ObjectStore}, + da_client::DAClientConfig::{Avail, Celestia, ObjectStore}, {self}, }, - AvailConfig, + AvailConfig, CelestiaConfig, }; use zksync_protobuf::{required, ProtoRepr}; @@ -28,6 +28,10 @@ impl ProtoRepr for proto::DataAvailabilityClient { timeout: *required(&conf.timeout).context("timeout")? as usize, max_retries: *required(&conf.max_retries).context("max_retries")? as usize, }), + proto::data_availability_client::Config::Celestia(conf) => Celestia(CelestiaConfig { + api_node_url: required(&conf.api_node_url).context("namespace")?.clone(), + namespace: required(&conf.namespace).context("namespace")?.clone(), + }), proto::data_availability_client::Config::ObjectStore(conf) => { ObjectStore(object_store_proto::ObjectStore::read(conf)?) } @@ -37,23 +41,28 @@ impl ProtoRepr for proto::DataAvailabilityClient { } fn build(this: &Self::Type) -> Self { - match &this { - Avail(config) => Self { - config: Some(proto::data_availability_client::Config::Avail( - proto::AvailConfig { - api_node_url: Some(config.api_node_url.clone()), - bridge_api_url: Some(config.bridge_api_url.clone()), - app_id: Some(config.app_id), - timeout: Some(config.timeout as u64), - max_retries: Some(config.max_retries as u64), - }, - )), - }, - ObjectStore(config) => Self { - config: Some(proto::data_availability_client::Config::ObjectStore( - object_store_proto::ObjectStore::build(config), - )), - }, + let config = match &this { + Avail(config) => proto::data_availability_client::Config::Avail(proto::AvailConfig { + api_node_url: Some(config.api_node_url.clone()), + bridge_api_url: Some(config.bridge_api_url.clone()), + app_id: Some(config.app_id), + timeout: Some(config.timeout as u64), + max_retries: Some(config.max_retries as u64), + }), + + Celestia(config) => { + proto::data_availability_client::Config::Celestia(proto::CelestiaConfig { + api_node_url: Some(config.api_node_url.clone()), + namespace: Some(config.namespace.clone()), + }) + } + ObjectStore(config) => proto::data_availability_client::Config::ObjectStore( + object_store_proto::ObjectStore::build(config), + ), + }; + + Self { + config: Some(config), } } } diff --git a/core/lib/protobuf_config/src/proto/config/da_client.proto b/core/lib/protobuf_config/src/proto/config/da_client.proto index d01bda2c8470..83eaafce345c 100644 --- a/core/lib/protobuf_config/src/proto/config/da_client.proto +++ b/core/lib/protobuf_config/src/proto/config/da_client.proto @@ -13,10 +13,16 @@ message AvailConfig { reserved 3; reserved "seed"; } +message CelestiaConfig { + optional string api_node_url = 1; + optional string namespace = 2; +} + message DataAvailabilityClient { // oneof in protobuf allows for None oneof config { AvailConfig avail = 1; object_store.ObjectStore object_store = 2; + CelestiaConfig celestia = 3; } } diff --git a/core/lib/protobuf_config/src/proto/config/secrets.proto b/core/lib/protobuf_config/src/proto/config/secrets.proto index 17b915b3f087..040e12969fa2 100644 --- a/core/lib/protobuf_config/src/proto/config/secrets.proto +++ b/core/lib/protobuf_config/src/proto/config/secrets.proto @@ -19,13 +19,18 @@ message ConsensusSecrets { optional string attester_key = 3; // required for attester nodes; AttesterSecretKey } -message AvailSecret { +message AvailSecrets { optional string seed_phrase = 1; } +message CelestiaSecrets { + optional string private_key = 1; +} + message DataAvailabilitySecrets { oneof da_secrets { - AvailSecret avail = 1; + AvailSecrets avail = 1; + CelestiaSecrets celestia = 2; } } @@ -33,5 +38,5 @@ message Secrets { optional DatabaseSecrets database = 1; // optional secrets for database optional L1Secrets l1 = 2; // optional secrets for l1 communication optional ConsensusSecrets consensus = 3; // optional secrets for consensus - optional DataAvailabilitySecrets da = 4; // optional secrets for data availability + optional DataAvailabilitySecrets data_availability = 4; // optional secrets for data availability } diff --git a/core/lib/protobuf_config/src/secrets.rs b/core/lib/protobuf_config/src/secrets.rs index 587351480078..9f74819e6350 100644 --- a/core/lib/protobuf_config/src/secrets.rs +++ b/core/lib/protobuf_config/src/secrets.rs @@ -2,20 +2,20 @@ use std::str::FromStr; use anyhow::Context; use secrecy::ExposeSecret; -use zksync_basic_types::{seed_phrase::SeedPhrase, url::SensitiveUrl}; +use zksync_basic_types::{ + secrets::{PrivateKey, SeedPhrase}, + url::SensitiveUrl, +}; use zksync_config::configs::{ consensus::{AttesterSecretKey, ConsensusSecrets, NodeSecretKey, ValidatorSecretKey}, - da_client::avail::AvailSecrets, + da_client::{avail::AvailSecrets, celestia::CelestiaSecrets}, secrets::{DataAvailabilitySecrets, Secrets}, DatabaseSecrets, L1Secrets, }; use zksync_protobuf::{required, ProtoRepr}; use crate::{ - proto::{ - secrets as proto, - secrets::{data_availability_secrets::DaSecrets, AvailSecret}, - }, + proto::{secrets as proto, secrets::data_availability_secrets::DaSecrets}, read_optional_repr, }; @@ -27,7 +27,7 @@ impl ProtoRepr for proto::Secrets { consensus: read_optional_repr(&self.consensus), database: read_optional_repr(&self.database), l1: read_optional_repr(&self.l1), - data_availability: read_optional_repr(&self.da), + data_availability: read_optional_repr(&self.data_availability), }) } @@ -36,7 +36,7 @@ impl ProtoRepr for proto::Secrets { database: this.database.as_ref().map(ProtoRepr::build), l1: this.l1.as_ref().map(ProtoRepr::build), consensus: this.consensus.as_ref().map(ProtoRepr::build), - da: this.data_availability.as_ref().map(ProtoRepr::build), + data_availability: this.data_availability.as_ref().map(ProtoRepr::build), } } } @@ -103,13 +103,17 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { let secrets = required(&self.da_secrets).context("config")?; let client = match secrets { - DaSecrets::Avail(avail_secret) => DataAvailabilitySecrets::Avail(AvailSecrets { - seed_phrase: Some( - SeedPhrase::from_str( - required(&avail_secret.seed_phrase).context("seed_phrase")?, - ) - .unwrap(), - ), + DaSecrets::Avail(avail) => DataAvailabilitySecrets::Avail(AvailSecrets { + seed_phrase: SeedPhrase::from_str( + required(&avail.seed_phrase).context("seed_phrase")?, + ) + .unwrap(), + }), + DaSecrets::Celestia(celestia) => DataAvailabilitySecrets::Celestia(CelestiaSecrets { + private_key: PrivateKey::from_str( + required(&celestia.private_key).context("private_key")?, + ) + .unwrap(), }), }; @@ -118,22 +122,13 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { fn build(this: &Self::Type) -> Self { let secrets = match &this { - DataAvailabilitySecrets::Avail(config) => { - let seed_phrase = if config.seed_phrase.is_some() { - Some( - config - .clone() - .seed_phrase - .unwrap() - .0 - .expose_secret() - .to_string(), - ) - } else { - None - }; - - Some(DaSecrets::Avail(AvailSecret { seed_phrase })) + DataAvailabilitySecrets::Avail(config) => Some(DaSecrets::Avail(proto::AvailSecrets { + seed_phrase: Some(config.seed_phrase.0.expose_secret().to_string()), + })), + DataAvailabilitySecrets::Celestia(config) => { + Some(DaSecrets::Celestia(proto::CelestiaSecrets { + private_key: Some(config.private_key.0.expose_secret().to_string()), + })) } }; diff --git a/core/node/da_clients/Cargo.toml b/core/node/da_clients/Cargo.toml index 60b65067f48d..15d4cca3e986 100644 --- a/core/node/da_clients/Cargo.toml +++ b/core/node/da_clients/Cargo.toml @@ -33,7 +33,11 @@ base58.workspace = true serde_json.workspace = true hex.workspace = true blake2b_simd.workspace = true - -jsonrpsee = { workspace = true, features = ["ws-client"] } parity-scale-codec = { workspace = true, features = ["derive"] } subxt-signer = { workspace = true, features = ["sr25519", "native"] } +jsonrpsee = { workspace = true, features = ["ws-client"] } + +# Celestia dependencies +celestia-rpc.workspace = true +celestia-types.workspace = true +bincode.workspace = true diff --git a/core/node/da_clients/src/avail/client.rs b/core/node/da_clients/src/avail/client.rs index 7718691bf185..eef90917820a 100644 --- a/core/node/da_clients/src/avail/client.rs +++ b/core/node/da_clients/src/avail/client.rs @@ -9,7 +9,7 @@ use zksync_da_client::{ DataAvailabilityClient, }; -use crate::avail::sdk::RawAvailClient; +use crate::{avail::sdk::RawAvailClient, utils::to_non_retriable_da_error}; /// An implementation of the `DataAvailabilityClient` trait that interacts with the Avail network. #[derive(Debug, Clone)] @@ -20,13 +20,11 @@ pub struct AvailClient { impl AvailClient { pub async fn new(config: AvailConfig, secrets: AvailSecrets) -> anyhow::Result { - let seed_phrase = secrets - .seed_phrase - .ok_or_else(|| anyhow::anyhow!("seed phrase"))?; - let sdk_client = RawAvailClient::new(config.app_id, seed_phrase.0.expose_secret()).await?; + let sdk_client = + RawAvailClient::new(config.app_id, secrets.seed_phrase.0.expose_secret()).await?; Ok(Self { - config, + config: config.clone(), sdk_client: Arc::new(sdk_client), }) } @@ -80,10 +78,3 @@ impl DataAvailabilityClient for AvailClient { Some(RawAvailClient::MAX_BLOB_SIZE) } } - -pub fn to_non_retriable_da_error(error: impl Into) -> DAError { - DAError { - error: error.into(), - is_retriable: false, - } -} diff --git a/core/node/da_clients/src/avail/sdk.rs b/core/node/da_clients/src/avail/sdk.rs index 002422109d05..f25d5aaa9d8c 100644 --- a/core/node/da_clients/src/avail/sdk.rs +++ b/core/node/da_clients/src/avail/sdk.rs @@ -14,7 +14,7 @@ use subxt_signer::{ sr25519::{Keypair, Signature}, }; -use crate::avail::client::to_non_retriable_da_error; +use crate::utils::to_non_retriable_da_error; const PROTOCOL_VERSION: u8 = 4; diff --git a/core/node/da_clients/src/celestia/client.rs b/core/node/da_clients/src/celestia/client.rs new file mode 100644 index 000000000000..eb4f391dbade --- /dev/null +++ b/core/node/da_clients/src/celestia/client.rs @@ -0,0 +1,93 @@ +use std::{ + fmt::{Debug, Formatter}, + sync::Arc, +}; + +use async_trait::async_trait; +use celestia_rpc::{BlobClient, Client}; +use celestia_types::{blob::Commitment, nmt::Namespace, Blob, TxConfig}; +use serde::{Deserialize, Serialize}; +use subxt_signer::ExposeSecret; +use zksync_config::configs::da_client::celestia::{CelestiaConfig, CelestiaSecrets}; +use zksync_da_client::{ + types::{DAError, DispatchResponse, InclusionData}, + DataAvailabilityClient, +}; + +use crate::utils::to_non_retriable_da_error; + +/// An implementation of the `DataAvailabilityClient` trait that interacts with the Avail network. +#[derive(Clone)] +pub struct CelestiaClient { + config: CelestiaConfig, + client: Arc, +} + +impl CelestiaClient { + pub async fn new(config: CelestiaConfig, secrets: CelestiaSecrets) -> anyhow::Result { + let client = Client::new( + &config.api_node_url, + Some(secrets.private_key.0.expose_secret()), + ) + .await + .expect("could not create Celestia client"); + + Ok(Self { + config: config.clone(), + client: Arc::new(client), + }) + } +} +#[derive(Serialize, Deserialize)] +pub struct BlobId { + pub commitment: Commitment, + pub height: u64, +} + +#[async_trait] +impl DataAvailabilityClient for CelestiaClient { + async fn dispatch_blob( + &self, + _: u32, // batch number + data: Vec, + ) -> Result { + let namespace = Namespace::new_v0(self.config.namespace.as_bytes()) + .map_err(to_non_retriable_da_error)?; + let blob = Blob::new(namespace, data).map_err(to_non_retriable_da_error)?; + + let commitment = blob.commitment.clone(); + let height = self + .client + .blob_submit(&[blob], TxConfig::default()) + .await + .map_err(to_non_retriable_da_error)?; + + let blob_id = BlobId { commitment, height }; + let blob_bytes = bincode::serialize(&blob_id).map_err(to_non_retriable_da_error)?; + + Ok(DispatchResponse { + blob_id: hex::encode(&blob_bytes), + }) + } + + async fn get_inclusion_data(&self, _: &str) -> Result, DAError> { + Ok(Some(InclusionData { data: vec![] })) + } + + fn clone_boxed(&self) -> Box { + Box::new(self.clone()) + } + + fn blob_size_limit(&self) -> Option { + Some(1973786) // almost 2MB + } +} + +impl Debug for CelestiaClient { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.debug_struct("CelestiaClient") + .field("config.api_node_url", &self.config.api_node_url) + .field("config.namespace", &self.config.namespace) + .finish() + } +} diff --git a/core/node/da_clients/src/celestia/mod.rs b/core/node/da_clients/src/celestia/mod.rs new file mode 100644 index 000000000000..862e6e4c3902 --- /dev/null +++ b/core/node/da_clients/src/celestia/mod.rs @@ -0,0 +1,3 @@ +mod client; + +pub use self::client::CelestiaClient; diff --git a/core/node/da_clients/src/lib.rs b/core/node/da_clients/src/lib.rs index 48311ce4c3f2..8515c128ff3f 100644 --- a/core/node/da_clients/src/lib.rs +++ b/core/node/da_clients/src/lib.rs @@ -1,3 +1,5 @@ pub mod avail; +pub mod celestia; pub mod no_da; pub mod object_store; +mod utils; diff --git a/core/node/da_clients/src/utils.rs b/core/node/da_clients/src/utils.rs new file mode 100644 index 000000000000..69ee5ca6b67e --- /dev/null +++ b/core/node/da_clients/src/utils.rs @@ -0,0 +1,8 @@ +use zksync_da_client::types::DAError; + +pub fn to_non_retriable_da_error(error: impl Into) -> DAError { + DAError { + error: error.into(), + is_retriable: false, + } +} diff --git a/core/node/node_framework/src/implementations/layers/da_clients/celestia.rs b/core/node/node_framework/src/implementations/layers/da_clients/celestia.rs new file mode 100644 index 000000000000..69f5553d4da8 --- /dev/null +++ b/core/node/node_framework/src/implementations/layers/da_clients/celestia.rs @@ -0,0 +1,46 @@ +use zksync_config::{configs::da_client::celestia::CelestiaSecrets, CelestiaConfig}; +use zksync_da_client::DataAvailabilityClient; +use zksync_da_clients::celestia::CelestiaClient; + +use crate::{ + implementations::resources::da_client::DAClientResource, + wiring_layer::{WiringError, WiringLayer}, + IntoContext, +}; + +#[derive(Debug)] +pub struct CelestiaWiringLayer { + config: CelestiaConfig, + secrets: CelestiaSecrets, +} + +impl CelestiaWiringLayer { + pub fn new(config: CelestiaConfig, secrets: CelestiaSecrets) -> Self { + Self { config, secrets } + } +} + +#[derive(Debug, IntoContext)] +#[context(crate = crate)] +pub struct Output { + pub client: DAClientResource, +} + +#[async_trait::async_trait] +impl WiringLayer for CelestiaWiringLayer { + type Input = (); + type Output = Output; + + fn layer_name(&self) -> &'static str { + "celestia_client_layer" + } + + async fn wire(self, _input: Self::Input) -> Result { + let client: Box = + Box::new(CelestiaClient::new(self.config, self.secrets).await?); + + Ok(Self::Output { + client: DAClientResource(client), + }) + } +} diff --git a/core/node/node_framework/src/implementations/layers/da_clients/mod.rs b/core/node/node_framework/src/implementations/layers/da_clients/mod.rs index 48311ce4c3f2..6bb6ce4fb877 100644 --- a/core/node/node_framework/src/implementations/layers/da_clients/mod.rs +++ b/core/node/node_framework/src/implementations/layers/da_clients/mod.rs @@ -1,3 +1,4 @@ pub mod avail; +pub mod celestia; pub mod no_da; pub mod object_store; From fc9e53ef2b3870b653756ec91319d22cc30935e7 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 30 Sep 2024 14:13:51 +0200 Subject: [PATCH 02/17] fix proto --- .../lib/protobuf_config/src/proto/config/secrets.proto | 10 +++++----- core/lib/protobuf_config/src/secrets.rs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/lib/protobuf_config/src/proto/config/secrets.proto b/core/lib/protobuf_config/src/proto/config/secrets.proto index 040e12969fa2..9b5383a733df 100644 --- a/core/lib/protobuf_config/src/proto/config/secrets.proto +++ b/core/lib/protobuf_config/src/proto/config/secrets.proto @@ -19,18 +19,18 @@ message ConsensusSecrets { optional string attester_key = 3; // required for attester nodes; AttesterSecretKey } -message AvailSecrets { +message AvailSecret { optional string seed_phrase = 1; } -message CelestiaSecrets { +message CelestiaSecret { optional string private_key = 1; } message DataAvailabilitySecrets { oneof da_secrets { - AvailSecrets avail = 1; - CelestiaSecrets celestia = 2; + AvailSecret avail = 1; + CelestiaSecret celestia = 2; } } @@ -38,5 +38,5 @@ message Secrets { optional DatabaseSecrets database = 1; // optional secrets for database optional L1Secrets l1 = 2; // optional secrets for l1 communication optional ConsensusSecrets consensus = 3; // optional secrets for consensus - optional DataAvailabilitySecrets data_availability = 4; // optional secrets for data availability + optional DataAvailabilitySecrets da = 4; // optional secrets for data availability } diff --git a/core/lib/protobuf_config/src/secrets.rs b/core/lib/protobuf_config/src/secrets.rs index 9f74819e6350..7e7fa07f9517 100644 --- a/core/lib/protobuf_config/src/secrets.rs +++ b/core/lib/protobuf_config/src/secrets.rs @@ -27,7 +27,7 @@ impl ProtoRepr for proto::Secrets { consensus: read_optional_repr(&self.consensus), database: read_optional_repr(&self.database), l1: read_optional_repr(&self.l1), - data_availability: read_optional_repr(&self.data_availability), + data_availability: read_optional_repr(&self.da), }) } @@ -36,7 +36,7 @@ impl ProtoRepr for proto::Secrets { database: this.database.as_ref().map(ProtoRepr::build), l1: this.l1.as_ref().map(ProtoRepr::build), consensus: this.consensus.as_ref().map(ProtoRepr::build), - data_availability: this.data_availability.as_ref().map(ProtoRepr::build), + da: this.data_availability.as_ref().map(ProtoRepr::build), } } } @@ -122,11 +122,11 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { fn build(this: &Self::Type) -> Self { let secrets = match &this { - DataAvailabilitySecrets::Avail(config) => Some(DaSecrets::Avail(proto::AvailSecrets { + DataAvailabilitySecrets::Avail(config) => Some(DaSecrets::Avail(proto::AvailSecret { seed_phrase: Some(config.seed_phrase.0.expose_secret().to_string()), })), DataAvailabilitySecrets::Celestia(config) => { - Some(DaSecrets::Celestia(proto::CelestiaSecrets { + Some(DaSecrets::Celestia(proto::CelestiaSecret { private_key: Some(config.private_key.0.expose_secret().to_string()), })) } From ed703ade22e20796d4be976b11ba85c9be38a41c Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 30 Sep 2024 14:59:20 +0200 Subject: [PATCH 03/17] fix lint --- core/node/da_clients/src/celestia/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/node/da_clients/src/celestia/client.rs b/core/node/da_clients/src/celestia/client.rs index eb4f391dbade..e9d1ad01b8d6 100644 --- a/core/node/da_clients/src/celestia/client.rs +++ b/core/node/da_clients/src/celestia/client.rs @@ -55,7 +55,7 @@ impl DataAvailabilityClient for CelestiaClient { .map_err(to_non_retriable_da_error)?; let blob = Blob::new(namespace, data).map_err(to_non_retriable_da_error)?; - let commitment = blob.commitment.clone(); + let commitment = blob.commitment; let height = self .client .blob_submit(&[blob], TxConfig::default()) From 22bf19bda354997a1501c640e682716ef94212a6 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 30 Sep 2024 17:54:57 +0200 Subject: [PATCH 04/17] fix namespace parsing --- core/node/da_clients/src/celestia/client.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/node/da_clients/src/celestia/client.rs b/core/node/da_clients/src/celestia/client.rs index e9d1ad01b8d6..d4f53fad440e 100644 --- a/core/node/da_clients/src/celestia/client.rs +++ b/core/node/da_clients/src/celestia/client.rs @@ -51,8 +51,10 @@ impl DataAvailabilityClient for CelestiaClient { _: u32, // batch number data: Vec, ) -> Result { - let namespace = Namespace::new_v0(self.config.namespace.as_bytes()) - .map_err(to_non_retriable_da_error)?; + let namespace_bytes = + hex::decode(&self.config.namespace).map_err(to_non_retriable_da_error)?; + let namespace = + Namespace::new_v0(namespace_bytes.as_bytes()).map_err(to_non_retriable_da_error)?; let blob = Blob::new(namespace, data).map_err(to_non_retriable_da_error)?; let commitment = blob.commitment; From 87af640aea82a4ad2b2b435f0743e78021574eef Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 30 Sep 2024 21:03:03 +0200 Subject: [PATCH 05/17] use upstream celestia deps --- Cargo.lock | 9 ++++++--- Cargo.toml | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12f74393b600..cb8218aaa79b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1234,7 +1234,8 @@ dependencies = [ [[package]] name = "celestia-proto" version = "0.3.1" -source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cde2c574760f88d5a6da8dfc55dbb79d91f4da15aa87b9e0d57d4d3a8fa5687" dependencies = [ "anyhow", "celestia-tendermint-proto", @@ -1247,7 +1248,8 @@ dependencies = [ [[package]] name = "celestia-rpc" version = "0.4.1" -source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d646d10aab818ffd785f841f42e16ed5875358f4e51d98a47a14ce07f093b3fc" dependencies = [ "async-trait", "celestia-types", @@ -1308,7 +1310,8 @@ dependencies = [ [[package]] name = "celestia-types" version = "0.5.0" -source = "git+https://github.com/S1nus/lumina.git?rev=8c8e53aaf7f976d10a71eba670f23e5ba38997c6#8c8e53aaf7f976d10a71eba670f23e5ba38997c6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ef03ae3e0ee840d5629414d58cfe822cef0d4ab92e04f4441b39f658d87d9" dependencies = [ "base64 0.22.1", "bech32", diff --git a/Cargo.toml b/Cargo.toml index cf2f2d79efb5..eb283a5e37c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -209,8 +209,8 @@ parity-scale-codec = { version = "3.6.9", default-features = false } subxt-signer = { version = "0.34", default-features = false } # Celestia -celestia-rpc = { git = "https://github.com/S1nus/lumina.git", rev = "8c8e53aaf7f976d10a71eba670f23e5ba38997c6" } -celestia-types = { git = "https://github.com/S1nus/lumina.git", rev = "8c8e53aaf7f976d10a71eba670f23e5ba38997c6" } +celestia-rpc = "0.4.1" +celestia-types = "0.5.0" # Here and below: # We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. From a8398d175b0cff1ca84c2dbbfded38e346df0b15 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Tue, 1 Oct 2024 17:29:58 +0200 Subject: [PATCH 06/17] change private_key to auth_token --- core/lib/basic_types/src/secrets.rs | 8 ++++---- core/lib/config/src/configs/da_client/celestia.rs | 4 ++-- core/lib/env_config/src/da_client.rs | 12 ++++++------ .../protobuf_config/src/proto/config/secrets.proto | 2 +- core/lib/protobuf_config/src/secrets.rs | 8 ++++---- core/node/da_clients/src/celestia/client.rs | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/lib/basic_types/src/secrets.rs b/core/lib/basic_types/src/secrets.rs index c6313ec2aa05..d34482a043ad 100644 --- a/core/lib/basic_types/src/secrets.rs +++ b/core/lib/basic_types/src/secrets.rs @@ -20,18 +20,18 @@ impl FromStr for SeedPhrase { } #[derive(Debug, Clone)] -pub struct PrivateKey(pub Secret); +pub struct AuthToken(pub Secret); -impl PartialEq for PrivateKey { +impl PartialEq for AuthToken { fn eq(&self, other: &Self) -> bool { self.0.expose_secret().eq(other.0.expose_secret()) } } -impl FromStr for PrivateKey { +impl FromStr for AuthToken { type Err = anyhow::Error; fn from_str(s: &str) -> Result { - Ok(PrivateKey(s.parse()?)) + Ok(AuthToken(s.parse()?)) } } diff --git a/core/lib/config/src/configs/da_client/celestia.rs b/core/lib/config/src/configs/da_client/celestia.rs index a0c1cb7e35cc..de107a58b761 100644 --- a/core/lib/config/src/configs/da_client/celestia.rs +++ b/core/lib/config/src/configs/da_client/celestia.rs @@ -1,5 +1,5 @@ use serde::Deserialize; -use zksync_basic_types::secrets::PrivateKey; +use zksync_basic_types::secrets::AuthToken; #[derive(Clone, Debug, Default, PartialEq, Deserialize)] pub struct CelestiaConfig { @@ -9,5 +9,5 @@ pub struct CelestiaConfig { #[derive(Clone, Debug, PartialEq)] pub struct CelestiaSecrets { - pub private_key: PrivateKey, + pub auth_token: AuthToken, } diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index 178c1bfbe811..875be2e4c8b5 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -39,11 +39,11 @@ impl FromEnv for DataAvailabilitySecrets { Self::Avail(AvailSecrets { seed_phrase }) } CELESTIA_CLIENT_CONFIG_NAME => { - let private_key = env::var("DA_SECRETS_PRIVATE_KEY") - .map_err(|e| anyhow::format_err!("private key not found: {}", e))? + let auth_token = env::var("DA_SECRETS_AUTH_TOKEN") + .map_err(|e| anyhow::format_err!("auth token not found: {}", e))? .parse() - .map_err(|e| anyhow::format_err!("failed to parse the private key: {}", e))?; - Self::Celestia(CelestiaSecrets { private_key }) + .map_err(|e| anyhow::format_err!("failed to parse the auth token: {}", e))?; + Self::Celestia(CelestiaSecrets { auth_token }) } _ => anyhow::bail!("Unknown DA client name: {}", client_tag), @@ -192,7 +192,7 @@ mod tests { let mut lock = MUTEX.lock(); let config = r#" DA_CLIENT="Celestia" - DA_SECRETS_PRIVATE_KEY="0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" + DA_SECRETS_AUTH_TOKEN="0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" "#; lock.set_env(config); @@ -203,7 +203,7 @@ mod tests { panic!("expected Celestia config") }; assert_eq!( - actual.private_key, + actual.auth_token, "0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" .parse() .unwrap() diff --git a/core/lib/protobuf_config/src/proto/config/secrets.proto b/core/lib/protobuf_config/src/proto/config/secrets.proto index 9b5383a733df..ce308bd2220e 100644 --- a/core/lib/protobuf_config/src/proto/config/secrets.proto +++ b/core/lib/protobuf_config/src/proto/config/secrets.proto @@ -24,7 +24,7 @@ message AvailSecret { } message CelestiaSecret { - optional string private_key = 1; + optional string auth_token = 1; } message DataAvailabilitySecrets { diff --git a/core/lib/protobuf_config/src/secrets.rs b/core/lib/protobuf_config/src/secrets.rs index 7e7fa07f9517..5e52cdde3a99 100644 --- a/core/lib/protobuf_config/src/secrets.rs +++ b/core/lib/protobuf_config/src/secrets.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use anyhow::Context; use secrecy::ExposeSecret; use zksync_basic_types::{ - secrets::{PrivateKey, SeedPhrase}, + secrets::{AuthToken, SeedPhrase}, url::SensitiveUrl, }; use zksync_config::configs::{ @@ -110,8 +110,8 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { .unwrap(), }), DaSecrets::Celestia(celestia) => DataAvailabilitySecrets::Celestia(CelestiaSecrets { - private_key: PrivateKey::from_str( - required(&celestia.private_key).context("private_key")?, + auth_token: AuthToken::from_str( + required(&celestia.auth_token).context("auth_token")?, ) .unwrap(), }), @@ -127,7 +127,7 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { })), DataAvailabilitySecrets::Celestia(config) => { Some(DaSecrets::Celestia(proto::CelestiaSecret { - private_key: Some(config.private_key.0.expose_secret().to_string()), + auth_token: Some(config.auth_token.0.expose_secret().to_string()), })) } }; diff --git a/core/node/da_clients/src/celestia/client.rs b/core/node/da_clients/src/celestia/client.rs index d4f53fad440e..e0187569a5b2 100644 --- a/core/node/da_clients/src/celestia/client.rs +++ b/core/node/da_clients/src/celestia/client.rs @@ -27,7 +27,7 @@ impl CelestiaClient { pub async fn new(config: CelestiaConfig, secrets: CelestiaSecrets) -> anyhow::Result { let client = Client::new( &config.api_node_url, - Some(secrets.private_key.0.expose_secret()), + Some(secrets.auth_token.0.expose_secret()), ) .await .expect("could not create Celestia client"); @@ -54,7 +54,7 @@ impl DataAvailabilityClient for CelestiaClient { let namespace_bytes = hex::decode(&self.config.namespace).map_err(to_non_retriable_da_error)?; let namespace = - Namespace::new_v0(namespace_bytes.as_bytes()).map_err(to_non_retriable_da_error)?; + Namespace::new_v0(namespace_bytes.as_slice()).map_err(to_non_retriable_da_error)?; let blob = Blob::new(namespace, data).map_err(to_non_retriable_da_error)?; let commitment = blob.commitment; From 2bd8e5efd6a713dc932abfe6b42d0f42d49b6108 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Thu, 10 Oct 2024 13:57:26 +0200 Subject: [PATCH 07/17] use a client that doesn't require light node --- Cargo.lock | 342 +++++----- Cargo.toml | 10 +- core/lib/basic_types/src/secrets.rs | 8 +- .../config/src/configs/da_client/celestia.rs | 6 +- core/lib/env_config/src/da_client.rs | 30 +- core/lib/protobuf_config/src/da_client.rs | 4 + .../src/proto/config/da_client.proto | 2 + .../src/proto/config/secrets.proto | 2 +- core/lib/protobuf_config/src/secrets.rs | 8 +- core/node/da_clients/Cargo.toml | 10 +- core/node/da_clients/src/celestia/README.md | 16 + core/node/da_clients/src/celestia/client.rs | 38 +- .../celestia/generated/celestia.blob.v1.rs | 200 ++++++ .../celestia/generated/cosmos.auth.v1beta1.rs | 257 ++++++++ .../generated/cosmos.base.abci.v1beta1.rs | 125 ++++ .../generated/cosmos.base.node.v1beta1.rs | 146 +++++ .../celestia/generated/cosmos.base.v1beta1.rs | 19 + .../cosmos.crypto.multisig.v1beta1.rs | 40 ++ .../generated/cosmos.crypto.secp256k1.rs | 21 + .../generated/cosmos.tx.signing.v1beta1.rs | 72 +++ .../celestia/generated/cosmos.tx.v1beta1.rs | 553 ++++++++++++++++ .../src/celestia/generated/tendermint.abci.rs | 42 ++ .../celestia/generated/tendermint.types.rs | 48 ++ core/node/da_clients/src/celestia/mod.rs | 55 ++ core/node/da_clients/src/celestia/sdk.rs | 601 ++++++++++++++++++ core/node/eth_watch/src/tests.rs | 2 +- 26 files changed, 2454 insertions(+), 203 deletions(-) create mode 100644 core/node/da_clients/src/celestia/README.md create mode 100644 core/node/da_clients/src/celestia/generated/celestia.blob.v1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.auth.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.base.abci.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.base.node.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.base.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.crypto.multisig.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.crypto.secp256k1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.tx.signing.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/cosmos.tx.v1beta1.rs create mode 100644 core/node/da_clients/src/celestia/generated/tendermint.abci.rs create mode 100644 core/node/da_clients/src/celestia/generated/tendermint.types.rs create mode 100644 core/node/da_clients/src/celestia/sdk.rs diff --git a/Cargo.lock b/Cargo.lock index cb8218aaa79b..7b9fbdf34a8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -614,6 +614,34 @@ dependencies = [ "paste", ] +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core 0.3.4", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 0.1.2", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + [[package]] name = "axum" version = "0.7.7" @@ -621,7 +649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.4.5", "bytes", "futures-util", "http 1.1.0", @@ -649,6 +677,23 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-core" version = "0.4.5" @@ -798,7 +843,7 @@ dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", "syn 2.0.79", ] @@ -820,7 +865,7 @@ dependencies = [ "proc-macro2 1.0.86", "quote 1.0.37", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", "syn 2.0.79", "which", @@ -1233,9 +1278,9 @@ dependencies = [ [[package]] name = "celestia-proto" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cde2c574760f88d5a6da8dfc55dbb79d91f4da15aa87b9e0d57d4d3a8fa5687" +checksum = "c0b0bdbe83a9c86b61cb24a6144fb26c2f3e4125f2f1a95c84a3305c8ef18e60" dependencies = [ "anyhow", "celestia-tendermint-proto", @@ -1245,21 +1290,6 @@ dependencies = [ "serde", ] -[[package]] -name = "celestia-rpc" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d646d10aab818ffd785f841f42e16ed5875358f4e51d98a47a14ce07f093b3fc" -dependencies = [ - "async-trait", - "celestia-types", - "http 1.1.0", - "jsonrpsee 0.24.5", - "serde", - "thiserror", - "tracing", -] - [[package]] name = "celestia-tendermint" version = "0.32.2" @@ -1309,9 +1339,9 @@ dependencies = [ [[package]] name = "celestia-types" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ef03ae3e0ee840d5629414d58cfe822cef0d4ab92e04f4441b39f658d87d9" +checksum = "8def831ad47624c7043d95f1e0ed67b2a5b61191b1e8d9c6217bda73d5aaf057" dependencies = [ "base64 0.22.1", "bech32", @@ -3589,6 +3619,18 @@ dependencies = [ "tower-service", ] +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper 0.14.30", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-timeout" version = "0.5.1" @@ -3840,6 +3882,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.12.1" @@ -3923,29 +3974,15 @@ dependencies = [ "jsonrpsee-client-transport 0.23.2", "jsonrpsee-core 0.23.2", "jsonrpsee-http-client 0.23.2", - "jsonrpsee-proc-macros 0.23.2", + "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types 0.23.2", "jsonrpsee-wasm-client", - "jsonrpsee-ws-client 0.23.2", + "jsonrpsee-ws-client", "tokio", "tracing", ] -[[package]] -name = "jsonrpsee" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126b48a5acc3c52fbd5381a77898cb60e145123179588a29e7ac48f9c06e401b" -dependencies = [ - "jsonrpsee-core 0.24.5", - "jsonrpsee-http-client 0.24.5", - "jsonrpsee-proc-macros 0.24.5", - "jsonrpsee-types 0.24.5", - "jsonrpsee-ws-client 0.24.5", - "tracing", -] - [[package]] name = "jsonrpsee-client-transport" version = "0.21.0" @@ -3992,29 +4029,6 @@ dependencies = [ "url", ] -[[package]] -name = "jsonrpsee-client-transport" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf679a8e0e083c77997f7c4bb4ca826577105906027ae462aac70ff348d02c6a" -dependencies = [ - "base64 0.22.1", - "futures-util", - "http 1.1.0", - "jsonrpsee-core 0.24.5", - "pin-project", - "rustls 0.23.13", - "rustls-pki-types", - "rustls-platform-verifier", - "soketto 0.8.0", - "thiserror", - "tokio", - "tokio-rustls 0.26.0", - "tokio-util", - "tracing", - "url", -] - [[package]] name = "jsonrpsee-core" version = "0.21.0" @@ -4030,7 +4044,7 @@ dependencies = [ "hyper 0.14.30", "jsonrpsee-types 0.21.0", "pin-project", - "rustc-hash 1.1.0", + "rustc-hash", "serde", "serde_json", "thiserror", @@ -4058,7 +4072,7 @@ dependencies = [ "parking_lot", "pin-project", "rand 0.8.5", - "rustc-hash 1.1.0", + "rustc-hash", "serde", "serde_json", "thiserror", @@ -4068,30 +4082,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "jsonrpsee-core" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0e503369a76e195b65af35058add0e6900b794a4e9a9316900ddd3a87a80477" -dependencies = [ - "async-trait", - "bytes", - "futures-timer", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "http-body-util", - "jsonrpsee-types 0.24.5", - "pin-project", - "rustc-hash 2.0.0", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tracing", -] - [[package]] name = "jsonrpsee-http-client" version = "0.21.0" @@ -4137,31 +4127,6 @@ dependencies = [ "url", ] -[[package]] -name = "jsonrpsee-http-client" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c0caba4a6a8efbafeec9baa986aa22a75a96c29d3e4b0091b0098d6470efb5" -dependencies = [ - "async-trait", - "base64 0.22.1", - "http-body 1.0.1", - "hyper 1.4.1", - "hyper-rustls 0.27.3", - "hyper-util", - "jsonrpsee-core 0.24.5", - "jsonrpsee-types 0.24.5", - "rustls 0.23.13", - "rustls-platform-verifier", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower 0.4.13", - "tracing", - "url", -] - [[package]] name = "jsonrpsee-proc-macros" version = "0.23.2" @@ -4175,19 +4140,6 @@ dependencies = [ "syn 2.0.79", ] -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc660a9389e2748e794a40673a4155d501f32db667757cdb80edeff0306b489b" -dependencies = [ - "heck 0.5.0", - "proc-macro-crate 3.2.0", - "proc-macro2 1.0.86", - "quote 1.0.37", - "syn 2.0.79", -] - [[package]] name = "jsonrpsee-server" version = "0.23.2" @@ -4242,18 +4194,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "jsonrpsee-types" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8fb16314327cbc94fdf7965ef7e4422509cd5597f76d137bd104eb34aeede67" -dependencies = [ - "http 1.1.0", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "jsonrpsee-wasm-client" version = "0.23.2" @@ -4278,19 +4218,6 @@ dependencies = [ "url", ] -[[package]] -name = "jsonrpsee-ws-client" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39aabf5d6c6f22da8d5b808eea1fab0736059f11fb42f71f141b14f404e5046a" -dependencies = [ - "http 1.1.0", - "jsonrpsee-client-transport 0.24.5", - "jsonrpsee-core 0.24.5", - "jsonrpsee-types 0.24.5", - "url", -] - [[package]] name = "jsonwebtoken" version = "9.3.0" @@ -5240,7 +5167,7 @@ dependencies = [ "reqwest 0.12.8", "thiserror", "tokio", - "tonic", + "tonic 0.12.3", ] [[package]] @@ -5252,7 +5179,7 @@ dependencies = [ "opentelemetry", "opentelemetry_sdk", "prost 0.13.3", - "tonic", + "tonic 0.12.3", ] [[package]] @@ -5387,6 +5314,43 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pbjson" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1030c719b0ec2a2d25a5df729d6cff1acf3cc230bf766f4f97833591f7577b90" +dependencies = [ + "base64 0.21.7", + "serde", +] + +[[package]] +name = "pbjson-build" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" +dependencies = [ + "heck 0.4.1", + "itertools 0.11.0", + "prost 0.12.6", + "prost-types", +] + +[[package]] +name = "pbjson-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18f596653ba4ac51bdecbb4ef6773bc7f56042dc13927910de1684ad3d32aa12" +dependencies = [ + "bytes", + "chrono", + "pbjson", + "pbjson-build", + "prost 0.12.6", + "prost-build", + "serde", +] + [[package]] name = "pbkdf2" version = "0.12.2" @@ -6342,6 +6306,15 @@ dependencies = [ "windows-sys 0.52.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 = "rkyv" version = "0.7.45" @@ -6475,12 +6448,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustc-hash" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" - [[package]] name = "rustc-hex" version = "2.1.0" @@ -8500,6 +8467,16 @@ dependencies = [ "windows-sys 0.52.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.4.0" @@ -8624,6 +8601,33 @@ dependencies = [ "winnow 0.6.20", ] +[[package]] +name = "tonic" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +dependencies = [ + "async-stream", + "async-trait", + "axum 0.6.20", + "base64 0.21.7", + "bytes", + "h2 0.3.26", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-timeout 0.4.1", + "percent-encoding", + "pin-project", + "prost 0.12.6", + "tokio", + "tokio-stream", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tonic" version = "0.12.3" @@ -8632,7 +8636,7 @@ checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", - "axum", + "axum 0.7.7", "base64 0.22.1", "bytes", "h2 0.4.6", @@ -8640,7 +8644,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "hyper 1.4.1", - "hyper-timeout", + "hyper-timeout 0.5.1", "hyper-util", "percent-encoding", "pin-project", @@ -10274,7 +10278,7 @@ name = "zksync_contract_verification_server" version = "0.1.0" dependencies = [ "anyhow", - "axum", + "axum 0.7.7", "serde", "serde_json", "tokio", @@ -10404,22 +10408,28 @@ dependencies = [ "anyhow", "async-trait", "base58", + "bech32", "bincode", "blake2 0.10.6", "blake2b_simd", - "celestia-rpc", "celestia-types", "flate2", "futures 0.3.30", "hex", + "http 1.1.0", "jsonrpsee 0.23.2", + "k256 0.13.4", "parity-scale-codec", + "pbjson-types", + "prost 0.12.6", + "ripemd", "scale-encode", "serde", "serde_json", "subxt-metadata", "subxt-signer", "tokio", + "tonic 0.11.0", "tracing", "zksync_config", "zksync_da_client", @@ -10673,7 +10683,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "axum", + "axum 0.7.7", "bincode", "thiserror", "tokio", @@ -10834,7 +10844,7 @@ dependencies = [ "anyhow", "assert_matches", "async-trait", - "axum", + "axum 0.7.7", "futures 0.3.30", "itertools 0.10.5", "once_cell", @@ -10914,7 +10924,7 @@ dependencies = [ "anyhow", "assert_matches", "async-trait", - "axum", + "axum 0.7.7", "chrono", "futures 0.3.30", "governor", @@ -11248,7 +11258,7 @@ name = "zksync_proof_data_handler" version = "0.1.0" dependencies = [ "anyhow", - "axum", + "axum 0.7.7", "chrono", "hyper 1.4.1", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index eb283a5e37c0..e5b16b8f7796 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -148,7 +148,7 @@ opentelemetry-semantic-conventions = "0.16.0" opentelemetry-appender-tracing = "0.5" pin-project-lite = "0.2.13" pretty_assertions = "1" -prost = "0.12.1" +prost = "0.12.6" rand = "0.8" rayon = "1.3.1" regex = "1" @@ -209,8 +209,12 @@ parity-scale-codec = { version = "3.6.9", default-features = false } subxt-signer = { version = "0.34", default-features = false } # Celestia -celestia-rpc = "0.4.1" -celestia-types = "0.5.0" +celestia-types = "0.6.0" +bech32 = "0.11.0" +ripemd = "0.1.3" +k256 = "0.13.4" +tonic = "0.11.0" +pbjson-types = "0.6.0" # Here and below: # We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. diff --git a/core/lib/basic_types/src/secrets.rs b/core/lib/basic_types/src/secrets.rs index d34482a043ad..c6313ec2aa05 100644 --- a/core/lib/basic_types/src/secrets.rs +++ b/core/lib/basic_types/src/secrets.rs @@ -20,18 +20,18 @@ impl FromStr for SeedPhrase { } #[derive(Debug, Clone)] -pub struct AuthToken(pub Secret); +pub struct PrivateKey(pub Secret); -impl PartialEq for AuthToken { +impl PartialEq for PrivateKey { fn eq(&self, other: &Self) -> bool { self.0.expose_secret().eq(other.0.expose_secret()) } } -impl FromStr for AuthToken { +impl FromStr for PrivateKey { type Err = anyhow::Error; fn from_str(s: &str) -> Result { - Ok(AuthToken(s.parse()?)) + Ok(PrivateKey(s.parse()?)) } } diff --git a/core/lib/config/src/configs/da_client/celestia.rs b/core/lib/config/src/configs/da_client/celestia.rs index de107a58b761..45810e0381e8 100644 --- a/core/lib/config/src/configs/da_client/celestia.rs +++ b/core/lib/config/src/configs/da_client/celestia.rs @@ -1,13 +1,15 @@ use serde::Deserialize; -use zksync_basic_types::secrets::AuthToken; +use zksync_basic_types::secrets::PrivateKey; #[derive(Clone, Debug, Default, PartialEq, Deserialize)] pub struct CelestiaConfig { pub api_node_url: String, pub namespace: String, + pub chain_id: String, + pub timeout_ms: u64, } #[derive(Clone, Debug, PartialEq)] pub struct CelestiaSecrets { - pub auth_token: AuthToken, + pub private_key: PrivateKey, } diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index 875be2e4c8b5..75ed0e64ab24 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -39,11 +39,11 @@ impl FromEnv for DataAvailabilitySecrets { Self::Avail(AvailSecrets { seed_phrase }) } CELESTIA_CLIENT_CONFIG_NAME => { - let auth_token = env::var("DA_SECRETS_AUTH_TOKEN") - .map_err(|e| anyhow::format_err!("auth token not found: {}", e))? + let private_key = env::var("DA_SECRETS_PRIVATE_KEY") + .map_err(|e| anyhow::format_err!("private key not found: {}", e))? .parse() .map_err(|e| anyhow::format_err!("failed to parse the auth token: {}", e))?; - Self::Celestia(CelestiaSecrets { auth_token }) + Self::Celestia(CelestiaSecrets { private_key }) } _ => anyhow::bail!("Unknown DA client name: {}", client_tag), @@ -163,10 +163,17 @@ mod tests { ); } - fn expected_celestia_da_layer_config(api_node_url: &str, namespace: &str) -> DAClientConfig { + fn expected_celestia_da_layer_config( + api_node_url: &str, + namespace: &str, + chain_id: &str, + timeout_ms: u64, + ) -> DAClientConfig { DAClientConfig::Celestia(CelestiaConfig { api_node_url: api_node_url.to_string(), namespace: namespace.to_string(), + chain_id: chain_id.to_string(), + timeout_ms, }) } @@ -177,13 +184,20 @@ mod tests { DA_CLIENT="Celestia" DA_API_NODE_URL="localhost:12345" DA_NAMESPACE="0x1234567890abcdef" + DA_CHAIN_ID="mocha-4" + DA_TIMEOUT_MS="7000" "#; lock.set_env(config); let actual = DAClientConfig::from_env().unwrap(); assert_eq!( actual, - expected_celestia_da_layer_config("localhost:12345", "0x1234567890abcdef") + expected_celestia_da_layer_config( + "localhost:12345", + "0x1234567890abcdef", + "mocha-4", + 7000 + ) ); } @@ -192,7 +206,7 @@ mod tests { let mut lock = MUTEX.lock(); let config = r#" DA_CLIENT="Celestia" - DA_SECRETS_AUTH_TOKEN="0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" + DA_SECRETS_PRIVATE_KEY="f55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" "#; lock.set_env(config); @@ -203,8 +217,8 @@ mod tests { panic!("expected Celestia config") }; assert_eq!( - actual.auth_token, - "0xf55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" + actual.private_key, + "f55baf7c0e4e33b1d78fbf52f069c426bc36cff1aceb9bc8f45d14c07f034d73" .parse() .unwrap() ); diff --git a/core/lib/protobuf_config/src/da_client.rs b/core/lib/protobuf_config/src/da_client.rs index c844dfc2b269..a6a85271e362 100644 --- a/core/lib/protobuf_config/src/da_client.rs +++ b/core/lib/protobuf_config/src/da_client.rs @@ -31,6 +31,8 @@ impl ProtoRepr for proto::DataAvailabilityClient { proto::data_availability_client::Config::Celestia(conf) => Celestia(CelestiaConfig { api_node_url: required(&conf.api_node_url).context("namespace")?.clone(), namespace: required(&conf.namespace).context("namespace")?.clone(), + chain_id: required(&conf.chain_id).context("chain_id")?.clone(), + timeout_ms: *required(&conf.timeout_ms).context("timeout_ms")?, }), proto::data_availability_client::Config::ObjectStore(conf) => { ObjectStore(object_store_proto::ObjectStore::read(conf)?) @@ -54,6 +56,8 @@ impl ProtoRepr for proto::DataAvailabilityClient { proto::data_availability_client::Config::Celestia(proto::CelestiaConfig { api_node_url: Some(config.api_node_url.clone()), namespace: Some(config.namespace.clone()), + chain_id: Some(config.chain_id.clone()), + timeout_ms: Some(config.timeout_ms), }) } ObjectStore(config) => proto::data_availability_client::Config::ObjectStore( diff --git a/core/lib/protobuf_config/src/proto/config/da_client.proto b/core/lib/protobuf_config/src/proto/config/da_client.proto index 83eaafce345c..0f4b8a240537 100644 --- a/core/lib/protobuf_config/src/proto/config/da_client.proto +++ b/core/lib/protobuf_config/src/proto/config/da_client.proto @@ -16,6 +16,8 @@ message AvailConfig { message CelestiaConfig { optional string api_node_url = 1; optional string namespace = 2; + optional string chain_id = 3; + optional uint64 timeout_ms = 4; } message DataAvailabilityClient { diff --git a/core/lib/protobuf_config/src/proto/config/secrets.proto b/core/lib/protobuf_config/src/proto/config/secrets.proto index ce308bd2220e..9b5383a733df 100644 --- a/core/lib/protobuf_config/src/proto/config/secrets.proto +++ b/core/lib/protobuf_config/src/proto/config/secrets.proto @@ -24,7 +24,7 @@ message AvailSecret { } message CelestiaSecret { - optional string auth_token = 1; + optional string private_key = 1; } message DataAvailabilitySecrets { diff --git a/core/lib/protobuf_config/src/secrets.rs b/core/lib/protobuf_config/src/secrets.rs index 5e52cdde3a99..7e7fa07f9517 100644 --- a/core/lib/protobuf_config/src/secrets.rs +++ b/core/lib/protobuf_config/src/secrets.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use anyhow::Context; use secrecy::ExposeSecret; use zksync_basic_types::{ - secrets::{AuthToken, SeedPhrase}, + secrets::{PrivateKey, SeedPhrase}, url::SensitiveUrl, }; use zksync_config::configs::{ @@ -110,8 +110,8 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { .unwrap(), }), DaSecrets::Celestia(celestia) => DataAvailabilitySecrets::Celestia(CelestiaSecrets { - auth_token: AuthToken::from_str( - required(&celestia.auth_token).context("auth_token")?, + private_key: PrivateKey::from_str( + required(&celestia.private_key).context("private_key")?, ) .unwrap(), }), @@ -127,7 +127,7 @@ impl ProtoRepr for proto::DataAvailabilitySecrets { })), DataAvailabilitySecrets::Celestia(config) => { Some(DaSecrets::Celestia(proto::CelestiaSecret { - auth_token: Some(config.auth_token.0.expose_secret().to_string()), + private_key: Some(config.private_key.0.expose_secret().to_string()), })) } }; diff --git a/core/node/da_clients/Cargo.toml b/core/node/da_clients/Cargo.toml index 15d4cca3e986..96779c175fdd 100644 --- a/core/node/da_clients/Cargo.toml +++ b/core/node/da_clients/Cargo.toml @@ -38,6 +38,12 @@ subxt-signer = { workspace = true, features = ["sr25519", "native"] } jsonrpsee = { workspace = true, features = ["ws-client"] } # Celestia dependencies -celestia-rpc.workspace = true -celestia-types.workspace = true +http.workspace = true bincode.workspace = true +celestia-types.workspace = true +k256.workspace = true +prost.workspace = true +bech32.workspace = true +ripemd.workspace = true +tonic.workspace = true +pbjson-types.workspace = true diff --git a/core/node/da_clients/src/celestia/README.md b/core/node/da_clients/src/celestia/README.md new file mode 100644 index 000000000000..bd2414659c34 --- /dev/null +++ b/core/node/da_clients/src/celestia/README.md @@ -0,0 +1,16 @@ +# Celestia client + +--- +This is an implementation of the Celestia client capable of sending the blobs to DA layer. +Normally, the light client is required to send the blobs to Celestia, but +this implementation is capable of sending the blobs to DA layer directly. + +This is a simplified and adapted version of astria's code, look +[here](https://github.com/astriaorg/astria/tree/main/crates/astria-sequencer-relayer) for original implementation. + +The generated files are copied from [here](https://github.com/astriaorg/astria/tree/main/crates/astria-core/src/generated), which is +not perfect, but allows us to use them without adding the proto files and the infrastructure to generate the `.rs`. + +While moving the files, the `#[cfg(feature = "client")]` annotations were removed for simplicity, so client code is available by default. + +If there is a need to generate the files from the proto files, the `tools/protobuf-compiler` from astria's repo can be used. diff --git a/core/node/da_clients/src/celestia/client.rs b/core/node/da_clients/src/celestia/client.rs index e0187569a5b2..df0735d4e1e4 100644 --- a/core/node/da_clients/src/celestia/client.rs +++ b/core/node/da_clients/src/celestia/client.rs @@ -1,39 +1,46 @@ use std::{ fmt::{Debug, Formatter}, + str::FromStr, sync::Arc, + time, }; use async_trait::async_trait; -use celestia_rpc::{BlobClient, Client}; -use celestia_types::{blob::Commitment, nmt::Namespace, Blob, TxConfig}; +use celestia_types::{blob::Commitment, nmt::Namespace, Blob}; use serde::{Deserialize, Serialize}; use subxt_signer::ExposeSecret; +use tonic::transport::Endpoint; use zksync_config::configs::da_client::celestia::{CelestiaConfig, CelestiaSecrets}; use zksync_da_client::{ types::{DAError, DispatchResponse, InclusionData}, DataAvailabilityClient, }; -use crate::utils::to_non_retriable_da_error; +use crate::{ + celestia::sdk::{BlobTxHash, RawCelestiaClient}, + utils::to_non_retriable_da_error, +}; /// An implementation of the `DataAvailabilityClient` trait that interacts with the Avail network. #[derive(Clone)] pub struct CelestiaClient { config: CelestiaConfig, - client: Arc, + client: Arc, } impl CelestiaClient { pub async fn new(config: CelestiaConfig, secrets: CelestiaSecrets) -> anyhow::Result { - let client = Client::new( - &config.api_node_url, - Some(secrets.auth_token.0.expose_secret()), - ) - .await - .expect("could not create Celestia client"); + let grpc_channel = Endpoint::from_str(config.api_node_url.clone().as_str())? + .timeout(time::Duration::from_millis(config.timeout_ms)) + .connect() + .await?; + + let private_key = secrets.private_key.0.expose_secret().to_string(); + let client = RawCelestiaClient::new(grpc_channel, private_key, config.chain_id.clone()) + .expect("could not create Celestia client"); Ok(Self { - config: config.clone(), + config, client: Arc::new(client), }) } @@ -58,9 +65,16 @@ impl DataAvailabilityClient for CelestiaClient { let blob = Blob::new(namespace, data).map_err(to_non_retriable_da_error)?; let commitment = blob.commitment; + let blob_tx = self + .client + .prepare(vec![blob]) + .await + .map_err(to_non_retriable_da_error)?; + + let blob_tx_hash = BlobTxHash::compute(&blob_tx); let height = self .client - .blob_submit(&[blob], TxConfig::default()) + .submit(blob_tx_hash, blob_tx) .await .map_err(to_non_retriable_da_error)?; diff --git a/core/node/da_clients/src/celestia/generated/celestia.blob.v1.rs b/core/node/da_clients/src/celestia/generated/celestia.blob.v1.rs new file mode 100644 index 000000000000..ee6ed85655e2 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/celestia.blob.v1.rs @@ -0,0 +1,200 @@ +// This file is @generated by prost-build. +/// Params defines the parameters for the module. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Params { + #[prost(uint32, tag = "1")] + pub gas_per_blob_byte: u32, + #[prost(uint64, tag = "2")] + pub gov_max_square_size: u64, +} +impl ::prost::Name for Params { + const NAME: &'static str = "Params"; + const PACKAGE: &'static str = "celestia.blob.v1"; + fn full_name() -> ::prost::alloc::string::String { + "celestia.blob.v1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/celestia.blob.v1.Params".into() + } +} +/// QueryParamsRequest is the request type for the Query/Params RPC method. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "celestia.blob.v1"; + fn full_name() -> ::prost::alloc::string::String { + "celestia.blob.v1.QueryParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/celestia.blob.v1.QueryParamsRequest".into() + } +} +/// QueryParamsResponse is the response type for the Query/Params RPC method. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "celestia.blob.v1"; + fn full_name() -> ::prost::alloc::string::String { + "celestia.blob.v1.QueryParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/celestia.blob.v1.QueryParamsResponse".into() + } +} +/// Generated client implementations. +pub mod query_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query defines the gRPC query service. + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Params queries the parameters of the module. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/celestia.blob.v1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("celestia.blob.v1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + } +} + +/// MsgPayForBlobs pays for the inclusion of a blob in the block. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayForBlobs { + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// namespaces is a list of namespaces that the blobs are associated with. A + /// namespace is a byte slice of length 29 where the first byte is the + /// namespaceVersion and the subsequent 28 bytes are the namespaceId. + #[prost(bytes = "bytes", repeated, tag = "2")] + pub namespaces: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, + #[prost(uint32, repeated, tag = "3")] + pub blob_sizes: ::prost::alloc::vec::Vec, + /// share_commitments is a list of share commitments (one per blob). + #[prost(bytes = "bytes", repeated, tag = "4")] + pub share_commitments: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, + /// share_versions are the versions of the share format that the blobs + /// associated with this message should use when included in a block. The + /// share_versions specified must match the share_versions used to generate the + /// share_commitment in this message. + #[prost(uint32, repeated, tag = "8")] + pub share_versions: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgPayForBlobs { + const NAME: &'static str = "MsgPayForBlobs"; + const PACKAGE: &'static str = "celestia.blob.v1"; + fn full_name() -> ::prost::alloc::string::String { + "celestia.blob.v1.MsgPayForBlobs".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/celestia.blob.v1.MsgPayForBlobs".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.auth.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.auth.v1beta1.rs new file mode 100644 index 000000000000..98314985a8e6 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.auth.v1beta1.rs @@ -0,0 +1,257 @@ +// This file is @generated by prost-build. +/// BaseAccount defines a base account type. It contains all the necessary fields +/// for basic account functionality. Any custom account type should extend this +/// type for additional functionality (e.g. vesting). +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BaseAccount { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub pub_key: ::core::option::Option<::pbjson_types::Any>, + #[prost(uint64, tag = "3")] + pub account_number: u64, + #[prost(uint64, tag = "4")] + pub sequence: u64, +} +impl ::prost::Name for BaseAccount { + const NAME: &'static str = "BaseAccount"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.BaseAccount".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.BaseAccount".into() + } +} +/// Params defines the parameters for the auth module. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Params { + #[prost(uint64, tag = "1")] + pub max_memo_characters: u64, + #[prost(uint64, tag = "2")] + pub tx_sig_limit: u64, + #[prost(uint64, tag = "3")] + pub tx_size_cost_per_byte: u64, + #[prost(uint64, tag = "4")] + pub sig_verify_cost_ed25519: u64, + #[prost(uint64, tag = "5")] + pub sig_verify_cost_secp256k1: u64, +} +impl ::prost::Name for Params { + const NAME: &'static str = "Params"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.Params".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.Params".into() + } +} +/// QueryAccountRequest is the request type for the Query/Account RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAccountRequest { + /// address defines the address to query for. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryAccountRequest { + const NAME: &'static str = "QueryAccountRequest"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.QueryAccountRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.QueryAccountRequest".into() + } +} +/// QueryAccountResponse is the response type for the Query/Account RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAccountResponse { + /// account defines the account of the corresponding address. + #[prost(message, optional, tag = "1")] + pub account: ::core::option::Option<::pbjson_types::Any>, +} +impl ::prost::Name for QueryAccountResponse { + const NAME: &'static str = "QueryAccountResponse"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.QueryAccountResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.QueryAccountResponse".into() + } +} +/// QueryParamsRequest is the request type for the Query/Params RPC method. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.QueryParamsRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.QueryParamsRequest".into() + } +} +/// QueryParamsResponse is the response type for the Query/Params RPC method. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.auth.v1beta1.QueryParamsResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.auth.v1beta1.QueryParamsResponse".into() + } +} +/// Generated client implementations. +pub mod query_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query defines the gRPC querier service. + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Account returns account details based on address. + pub async fn account( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.auth.v1beta1.Query/Account", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Account")); + self.inner.unary(req, path, codec).await + } + /// Params queries all parameters. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.auth.v1beta1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.auth.v1beta1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.base.abci.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.base.abci.v1beta1.rs new file mode 100644 index 000000000000..6b0f9fc1956d --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.base.abci.v1beta1.rs @@ -0,0 +1,125 @@ +// This file is @generated by prost-build. +/// TxResponse defines a structure containing relevant tx data and metadata. The +/// tags are stringified and the log is JSON decoded. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxResponse { + /// The block height + #[prost(int64, tag = "1")] + pub height: i64, + /// The transaction hash. + #[prost(string, tag = "2")] + pub txhash: ::prost::alloc::string::String, + /// Namespace for the Code + #[prost(string, tag = "3")] + pub codespace: ::prost::alloc::string::String, + /// Response code. + #[prost(uint32, tag = "4")] + pub code: u32, + /// Result bytes, if any. + #[prost(string, tag = "5")] + pub data: ::prost::alloc::string::String, + /// The output of the application's logger (raw string). May be + /// non-deterministic. + #[prost(string, tag = "6")] + pub raw_log: ::prost::alloc::string::String, + /// The output of the application's logger (typed). May be non-deterministic. + #[prost(message, repeated, tag = "7")] + pub logs: ::prost::alloc::vec::Vec, + /// Additional information. May be non-deterministic. + #[prost(string, tag = "8")] + pub info: ::prost::alloc::string::String, + /// Amount of gas requested for transaction. + #[prost(int64, tag = "9")] + pub gas_wanted: i64, + /// Amount of gas consumed by transaction. + #[prost(int64, tag = "10")] + pub gas_used: i64, + /// The request transaction bytes. + #[prost(message, optional, tag = "11")] + pub tx: ::core::option::Option<::pbjson_types::Any>, + /// Time of the previous block. For heights > 1, it's the weighted median of + /// the timestamps of the valid votes in the block.LastCommit. For height == 1, + /// it's genesis time. + #[prost(string, tag = "12")] + pub timestamp: ::prost::alloc::string::String, + /// Events defines all the events emitted by processing a transaction. Note, + /// these events include those emitted by processing all the messages and those + /// emitted from the ante. Whereas Logs contains the events, with + /// additional metadata, emitted only by processing the messages. + /// + /// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + #[prost(message, repeated, tag = "13")] + pub events: ::prost::alloc::vec::Vec< + super::super::super::tendermint::abci::Event, + >, +} +impl ::prost::Name for TxResponse { + const NAME: &'static str = "TxResponse"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.abci.v1beta1.TxResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.abci.v1beta1.TxResponse".into() + } +} +/// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AbciMessageLog { + #[prost(uint32, tag = "1")] + pub msg_index: u32, + #[prost(string, tag = "2")] + pub log: ::prost::alloc::string::String, + /// Events contains a slice of Event objects that were emitted during some + /// execution. + #[prost(message, repeated, tag = "3")] + pub events: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for AbciMessageLog { + const NAME: &'static str = "ABCIMessageLog"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.abci.v1beta1.ABCIMessageLog".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.abci.v1beta1.ABCIMessageLog".into() + } +} +/// StringEvent defines en Event object wrapper where all the attributes +/// contain key/value pairs that are strings instead of raw bytes. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StringEvent { + #[prost(string, tag = "1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub attributes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for StringEvent { + const NAME: &'static str = "StringEvent"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.abci.v1beta1.StringEvent".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.abci.v1beta1.StringEvent".into() + } +} +/// Attribute defines an attribute wrapper where the key and value are +/// strings instead of raw bytes. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Attribute { + #[prost(string, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub value: ::prost::alloc::string::String, +} +impl ::prost::Name for Attribute { + const NAME: &'static str = "Attribute"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.abci.v1beta1.Attribute".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.abci.v1beta1.Attribute".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.base.node.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.base.node.v1beta1.rs new file mode 100644 index 000000000000..89bb519bd810 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.base.node.v1beta1.rs @@ -0,0 +1,146 @@ +// This file is @generated by prost-build. +/// ConfigRequest defines the request structure for the Config gRPC query. +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ConfigRequest {} +impl ::prost::Name for ConfigRequest { + const NAME: &'static str = "ConfigRequest"; + const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.node.v1beta1.ConfigRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.node.v1beta1.ConfigRequest".into() + } +} +/// ConfigResponse defines the response structure for the Config gRPC query. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConfigResponse { + #[prost(string, tag = "1")] + pub minimum_gas_price: ::prost::alloc::string::String, +} +impl ::prost::Name for ConfigResponse { + const NAME: &'static str = "ConfigResponse"; + const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.node.v1beta1.ConfigResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.node.v1beta1.ConfigResponse".into() + } +} +/// Generated client implementations. +pub mod service_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Service defines the gRPC querier service for node related queries. + #[derive(Debug, Clone)] + pub struct ServiceClient { + inner: tonic::client::Grpc, + } + impl ServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + ServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Config queries for the operator configuration. + pub async fn config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.base.node.v1beta1.Service/Config", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Config")); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.base.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.base.v1beta1.rs new file mode 100644 index 000000000000..d13fb784d97a --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.base.v1beta1.rs @@ -0,0 +1,19 @@ +// This file is @generated by prost-build. +/// Coin defines a token with a denomination and an amount. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Coin { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub amount: ::prost::alloc::string::String, +} +impl ::prost::Name for Coin { + const NAME: &'static str = "Coin"; + const PACKAGE: &'static str = "cosmos.base.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.base.v1beta1.Coin".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.base.v1beta1.Coin".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.crypto.multisig.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.crypto.multisig.v1beta1.rs new file mode 100644 index 000000000000..c514b3739b21 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.crypto.multisig.v1beta1.rs @@ -0,0 +1,40 @@ +// This file is @generated by prost-build. +/// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. +/// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +/// signed and with which modes. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MultiSignature { + #[prost(bytes = "bytes", repeated, tag = "1")] + pub signatures: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +impl ::prost::Name for MultiSignature { + const NAME: &'static str = "MultiSignature"; + const PACKAGE: &'static str = "cosmos.crypto.multisig.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.crypto.multisig.v1beta1.MultiSignature".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.crypto.multisig.v1beta1.MultiSignature".into() + } +} +/// CompactBitArray is an implementation of a space efficient bit array. +/// This is used to ensure that the encoded data takes up a minimal amount of +/// space after proto encoding. +/// This is not thread safe, and is not intended for concurrent usage. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CompactBitArray { + #[prost(uint32, tag = "1")] + pub extra_bits_stored: u32, + #[prost(bytes = "bytes", tag = "2")] + pub elems: ::prost::bytes::Bytes, +} +impl ::prost::Name for CompactBitArray { + const NAME: &'static str = "CompactBitArray"; + const PACKAGE: &'static str = "cosmos.crypto.multisig.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.crypto.multisig.v1beta1.CompactBitArray".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.crypto.multisig.v1beta1.CompactBitArray".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.crypto.secp256k1.rs b/core/node/da_clients/src/celestia/generated/cosmos.crypto.secp256k1.rs new file mode 100644 index 000000000000..081aec09682b --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.crypto.secp256k1.rs @@ -0,0 +1,21 @@ +// This file is @generated by prost-build. +/// PubKey defines a secp256k1 public key +/// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte +/// if the y-coordinate is the lexicographically largest of the two associated with +/// the x-coordinate. Otherwise the first byte is a 0x03. +/// This prefix is followed with the x-coordinate. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PubKey { + #[prost(bytes = "bytes", tag = "1")] + pub key: ::prost::bytes::Bytes, +} +impl ::prost::Name for PubKey { + const NAME: &'static str = "PubKey"; + const PACKAGE: &'static str = "cosmos.crypto.secp256k1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.crypto.secp256k1.PubKey".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.crypto.secp256k1.PubKey".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.tx.signing.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.tx.signing.v1beta1.rs new file mode 100644 index 000000000000..54f3fa9d00d7 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.tx.signing.v1beta1.rs @@ -0,0 +1,72 @@ +// This file is @generated by prost-build. +/// SignMode represents a signing mode with its own security guarantees. +/// +/// This enum should be considered a registry of all known sign modes +/// in the Cosmos ecosystem. Apps are not expected to support all known +/// sign modes. Apps that would like to support custom sign modes are +/// encouraged to open a small PR against this file to add a new case +/// to this SignMode enum describing their sign mode so that different +/// apps have a consistent version of this enum. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SignMode { + /// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + /// rejected. + Unspecified = 0, + /// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + /// verified with raw bytes from Tx. + Direct = 1, + /// SIGN_MODE_TEXTUAL is a future signing mode that will verify some + /// human-readable textual representation on top of the binary representation + /// from SIGN_MODE_DIRECT. It is currently not supported. + Textual = 2, + /// SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + /// SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + /// require signers signing over other signers' `signer_info`. It also allows + /// for adding Tips in transactions. + /// + /// Since: cosmos-sdk 0.46 + DirectAux = 3, + /// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + /// Amino JSON and will be removed in the future. + LegacyAminoJson = 127, + /// SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + /// SDK. Ref: + /// + /// Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + /// but is not implemented on the SDK by default. To enable EIP-191, you need + /// to pass a custom `TxConfig` that has an implementation of + /// `SignModeHandler` for EIP-191. The SDK may decide to fully support + /// EIP-191 in the future. + /// + /// Since: cosmos-sdk 0.45.2 + Eip191 = 191, +} +impl SignMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Unspecified => "SIGN_MODE_UNSPECIFIED", + Self::Direct => "SIGN_MODE_DIRECT", + Self::Textual => "SIGN_MODE_TEXTUAL", + Self::DirectAux => "SIGN_MODE_DIRECT_AUX", + Self::LegacyAminoJson => "SIGN_MODE_LEGACY_AMINO_JSON", + Self::Eip191 => "SIGN_MODE_EIP_191", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SIGN_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "SIGN_MODE_DIRECT" => Some(Self::Direct), + "SIGN_MODE_TEXTUAL" => Some(Self::Textual), + "SIGN_MODE_DIRECT_AUX" => Some(Self::DirectAux), + "SIGN_MODE_LEGACY_AMINO_JSON" => Some(Self::LegacyAminoJson), + "SIGN_MODE_EIP_191" => Some(Self::Eip191), + _ => None, + } + } +} diff --git a/core/node/da_clients/src/celestia/generated/cosmos.tx.v1beta1.rs b/core/node/da_clients/src/celestia/generated/cosmos.tx.v1beta1.rs new file mode 100644 index 000000000000..7783eabcdbac --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/cosmos.tx.v1beta1.rs @@ -0,0 +1,553 @@ +// This file is @generated by prost-build. +/// Tx is the standard type used for broadcasting transactions. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tx { + /// body is the processable content of the transaction + #[prost(message, optional, tag = "1")] + pub body: ::core::option::Option, + /// auth_info is the authorization related content of the transaction, + /// specifically signers, signer modes and fee + #[prost(message, optional, tag = "2")] + pub auth_info: ::core::option::Option, + /// signatures is a list of signatures that matches the length and order of + /// AuthInfo's signer_infos to allow connecting signature meta information like + /// public key and signing mode by position. + #[prost(bytes = "bytes", repeated, tag = "3")] + pub signatures: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +impl ::prost::Name for Tx { + const NAME: &'static str = "Tx"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.Tx".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.Tx".into() + } +} +/// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignDoc { + /// body_bytes is protobuf serialization of a TxBody that matches the + /// representation in TxRaw. + #[prost(bytes = "bytes", tag = "1")] + pub body_bytes: ::prost::bytes::Bytes, + /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + /// representation in TxRaw. + #[prost(bytes = "bytes", tag = "2")] + pub auth_info_bytes: ::prost::bytes::Bytes, + /// chain_id is the unique identifier of the chain this transaction targets. + /// It prevents signed transactions from being used on another chain by an + /// attacker + #[prost(string, tag = "3")] + pub chain_id: ::prost::alloc::string::String, + /// account_number is the account number of the account in state + #[prost(uint64, tag = "4")] + pub account_number: u64, +} +impl ::prost::Name for SignDoc { + const NAME: &'static str = "SignDoc"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.SignDoc".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.SignDoc".into() + } +} +/// TxBody is the body of a transaction that all signers sign over. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TxBody { + /// messages is a list of messages to be executed. The required signers of + /// those messages define the number and order of elements in AuthInfo's + /// signer_infos and Tx's signatures. Each required signer address is added to + /// the list only the first time it occurs. + /// By convention, the first required signer (usually from the first message) + /// is referred to as the primary signer and pays the fee for the whole + /// transaction. + #[prost(message, repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// memo is any arbitrary note/comment to be added to the transaction. + /// WARNING: in clients, any publicly exposed text should not be called memo, + /// but should be called `note` instead (see ). + #[prost(string, tag = "2")] + pub memo: ::prost::alloc::string::String, + /// timeout is the block height after which this transaction will not + /// be processed by the chain + #[prost(uint64, tag = "3")] + pub timeout_height: u64, + /// extension_options are arbitrary options that can be added by chains + /// when the default options are not sufficient. If any of these are present + /// and can't be handled, the transaction will be rejected + #[prost(message, repeated, tag = "1023")] + pub extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + /// extension_options are arbitrary options that can be added by chains + /// when the default options are not sufficient. If any of these are present + /// and can't be handled, they will be ignored + #[prost(message, repeated, tag = "2047")] + pub non_critical_extension_options: ::prost::alloc::vec::Vec<::pbjson_types::Any>, +} +impl ::prost::Name for TxBody { + const NAME: &'static str = "TxBody"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.TxBody".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.TxBody".into() + } +} +/// AuthInfo describes the fee and signer modes that are used to sign a +/// transaction. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthInfo { + /// signer_infos defines the signing modes for the required signers. The number + /// and order of elements must match the required signers from TxBody's + /// messages. The first element is the primary signer and the one which pays + /// the fee. + #[prost(message, repeated, tag = "1")] + pub signer_infos: ::prost::alloc::vec::Vec, + /// Fee is the fee and gas limit for the transaction. The first signer is the + /// primary signer and the one which pays the fee. The fee can be calculated + /// based on the cost of evaluating the body and doing signature verification + /// of the signers. This can be estimated via simulation. + #[prost(message, optional, tag = "2")] + pub fee: ::core::option::Option, + /// Tip is the optional tip used for transactions fees paid in another denom. + /// + /// This field is ignored if the chain didn't enable tips, i.e. didn't add the + /// `TipDecorator` in its posthandler. + /// + /// Since: cosmos-sdk 0.46 + #[prost(message, optional, tag = "3")] + pub tip: ::core::option::Option, +} +impl ::prost::Name for AuthInfo { + const NAME: &'static str = "AuthInfo"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.AuthInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.AuthInfo".into() + } +} +/// SignerInfo describes the public key and signing mode of a single top-level +/// signer. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignerInfo { + /// public_key is the public key of the signer. It is optional for accounts + /// that already exist in state. If unset, the verifier can use the required \ + /// signer address for this position and lookup the public key. + #[prost(message, optional, tag = "1")] + pub public_key: ::core::option::Option<::pbjson_types::Any>, + /// mode_info describes the signing mode of the signer and is a nested + /// structure to support nested multisig pubkey's + #[prost(message, optional, tag = "2")] + pub mode_info: ::core::option::Option, + /// sequence is the sequence of the account, which describes the + /// number of committed transactions signed by a given address. It is used to + /// prevent replay attacks. + #[prost(uint64, tag = "3")] + pub sequence: u64, +} +impl ::prost::Name for SignerInfo { + const NAME: &'static str = "SignerInfo"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.SignerInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.SignerInfo".into() + } +} +/// ModeInfo describes the signing mode of a single or nested multisig signer. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ModeInfo { + /// sum is the oneof that specifies whether this represents a single or nested + /// multisig signer + #[prost(oneof = "mode_info::Sum", tags = "1, 2")] + pub sum: ::core::option::Option, +} +/// Nested message and enum types in `ModeInfo`. +pub mod mode_info { + /// Single is the mode info for a single signer. It is structured as a message + /// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + /// future + #[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Single { + /// mode is the signing mode of the single signer + #[prost(enumeration = "super::super::signing::SignMode", tag = "1")] + pub mode: i32, + } + impl ::prost::Name for Single { + const NAME: &'static str = "Single"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.ModeInfo.Single".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.ModeInfo.Single".into() + } + } + /// Multi is the mode info for a multisig public key + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Multi { + /// bitarray specifies which keys within the multisig are signing + #[prost(message, optional, tag = "1")] + pub bitarray: ::core::option::Option< + super::super::super::crypto::multisig::CompactBitArray, + >, + /// mode_infos is the corresponding modes of the signers of the multisig + /// which could include nested multisig public keys + #[prost(message, repeated, tag = "2")] + pub mode_infos: ::prost::alloc::vec::Vec, + } + impl ::prost::Name for Multi { + const NAME: &'static str = "Multi"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.ModeInfo.Multi".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.ModeInfo.Multi".into() + } + } + /// sum is the oneof that specifies whether this represents a single or nested + /// multisig signer + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Sum { + /// single represents a single signer + #[prost(message, tag = "1")] + Single(Single), + /// multi represents a nested multisig signer + #[prost(message, tag = "2")] + Multi(Multi), + } +} +impl ::prost::Name for ModeInfo { + const NAME: &'static str = "ModeInfo"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.ModeInfo".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.ModeInfo".into() + } +} +/// Fee includes the amount of coins paid in fees and the maximum +/// gas to be used by the transaction. The ratio yields an effective "gasprice", +/// which must be above some miminum to be accepted into the mempool. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Fee { + /// amount is the amount of coins to be paid as a fee + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + /// gas_limit is the maximum gas that can be used in transaction processing + /// before an out of gas error occurs + #[prost(uint64, tag = "2")] + pub gas_limit: u64, + /// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. + /// the payer must be a tx signer (and thus have signed this field in AuthInfo). + /// setting this field does *not* change the ordering of required signers for the transaction. + #[prost(string, tag = "3")] + pub payer: ::prost::alloc::string::String, + /// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used + /// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does + /// not support fee grants, this will fail + #[prost(string, tag = "4")] + pub granter: ::prost::alloc::string::String, +} +impl ::prost::Name for Fee { + const NAME: &'static str = "Fee"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.Fee".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.Fee".into() + } +} +/// Tip is the tip used for meta-transactions. +/// +/// Since: cosmos-sdk 0.46 +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Tip { + /// amount is the amount of the tip + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + /// tipper is the address of the account paying for the tip + #[prost(string, tag = "2")] + pub tipper: ::prost::alloc::string::String, +} +impl ::prost::Name for Tip { + const NAME: &'static str = "Tip"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.Tip".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.Tip".into() + } +} +/// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +/// RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTxRequest { + /// tx_bytes is the raw transaction. + #[prost(bytes = "bytes", tag = "1")] + pub tx_bytes: ::prost::bytes::Bytes, + #[prost(enumeration = "BroadcastMode", tag = "2")] + pub mode: i32, +} +impl ::prost::Name for BroadcastTxRequest { + const NAME: &'static str = "BroadcastTxRequest"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.BroadcastTxRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.BroadcastTxRequest".into() + } +} +/// BroadcastTxResponse is the response type for the +/// Service.BroadcastTx method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTxResponse { + /// tx_response is the queried TxResponses. + #[prost(message, optional, tag = "1")] + pub tx_response: ::core::option::Option< + super::super::base::abci::TxResponse, + >, +} +impl ::prost::Name for BroadcastTxResponse { + const NAME: &'static str = "BroadcastTxResponse"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.BroadcastTxResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.BroadcastTxResponse".into() + } +} +/// GetTxRequest is the request type for the Service.GetTx +/// RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxRequest { + /// hash is the tx hash to query, encoded as a hex string. + #[prost(string, tag = "1")] + pub hash: ::prost::alloc::string::String, +} +impl ::prost::Name for GetTxRequest { + const NAME: &'static str = "GetTxRequest"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.GetTxRequest".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.GetTxRequest".into() + } +} +/// GetTxResponse is the response type for the Service.GetTx method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxResponse { + /// tx is the queried transaction. + #[prost(message, optional, tag = "1")] + pub tx: ::core::option::Option, + /// tx_response is the queried TxResponses. + #[prost(message, optional, tag = "2")] + pub tx_response: ::core::option::Option< + super::super::base::abci::TxResponse, + >, +} +impl ::prost::Name for GetTxResponse { + const NAME: &'static str = "GetTxResponse"; + const PACKAGE: &'static str = "cosmos.tx.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + "cosmos.tx.v1beta1.GetTxResponse".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/cosmos.tx.v1beta1.GetTxResponse".into() + } +} +/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BroadcastMode { + /// zero-value for mode ordering + Unspecified = 0, + /// BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + /// the tx to be committed in a block. + Block = 1, + /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + /// a CheckTx execution response only. + Sync = 2, + /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + /// immediately. + Async = 3, +} +impl BroadcastMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::Unspecified => "BROADCAST_MODE_UNSPECIFIED", + Self::Block => "BROADCAST_MODE_BLOCK", + Self::Sync => "BROADCAST_MODE_SYNC", + Self::Async => "BROADCAST_MODE_ASYNC", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "BROADCAST_MODE_BLOCK" => Some(Self::Block), + "BROADCAST_MODE_SYNC" => Some(Self::Sync), + "BROADCAST_MODE_ASYNC" => Some(Self::Async), + _ => None, + } + } +} +/// Generated client implementations. +pub mod service_client { + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Service defines a gRPC service for interacting with transactions. + #[derive(Debug, Clone)] + pub struct ServiceClient { + inner: tonic::client::Grpc, + } + impl ServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> ServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, + { + ServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// GetTx fetches a tx by hash. + pub async fn get_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.tx.v1beta1.Service/GetTx", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "GetTx")); + self.inner.unary(req, path, codec).await + } + /// BroadcastTx broadcast transaction. + pub async fn broadcast_tx( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.tx.v1beta1.Service/BroadcastTx", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.tx.v1beta1.Service", "BroadcastTx")); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/core/node/da_clients/src/celestia/generated/tendermint.abci.rs b/core/node/da_clients/src/celestia/generated/tendermint.abci.rs new file mode 100644 index 000000000000..ab3bbeb946f6 --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/tendermint.abci.rs @@ -0,0 +1,42 @@ +// This file is @generated by prost-build. +/// Event allows application developers to attach additional information to +/// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +/// Later, transactions may be queried using these events. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Event { + #[prost(string, tag = "1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub attributes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Event { + const NAME: &'static str = "Event"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + "tendermint.abci.Event".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/tendermint.abci.Event".into() + } +} +/// EventAttribute is a single key-value pair, associated with an event. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventAttribute { + #[prost(bytes = "bytes", tag = "1")] + pub key: ::prost::bytes::Bytes, + #[prost(bytes = "bytes", tag = "2")] + pub value: ::prost::bytes::Bytes, + /// nondeterministic + #[prost(bool, tag = "3")] + pub index: bool, +} +impl ::prost::Name for EventAttribute { + const NAME: &'static str = "EventAttribute"; + const PACKAGE: &'static str = "tendermint.abci"; + fn full_name() -> ::prost::alloc::string::String { + "tendermint.abci.EventAttribute".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/tendermint.abci.EventAttribute".into() + } +} diff --git a/core/node/da_clients/src/celestia/generated/tendermint.types.rs b/core/node/da_clients/src/celestia/generated/tendermint.types.rs new file mode 100644 index 000000000000..000e3f2c1fbc --- /dev/null +++ b/core/node/da_clients/src/celestia/generated/tendermint.types.rs @@ -0,0 +1,48 @@ +// This file is @generated by prost-build. +/// Blob (named after binary large object) is a chunk of data submitted by a user +/// to be published to the Celestia blockchain. The data of a Blob is published +/// to a namespace and is encoded into shares based on the format specified by +/// share_version. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Blob { + #[prost(bytes = "bytes", tag = "1")] + pub namespace_id: ::prost::bytes::Bytes, + #[prost(bytes = "bytes", tag = "2")] + pub data: ::prost::bytes::Bytes, + #[prost(uint32, tag = "3")] + pub share_version: u32, + #[prost(uint32, tag = "4")] + pub namespace_version: u32, +} +impl ::prost::Name for Blob { + const NAME: &'static str = "Blob"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + "tendermint.types.Blob".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/tendermint.types.Blob".into() + } +} +/// BlobTx wraps an encoded sdk.Tx with a second field to contain blobs of data. +/// The raw bytes of the blobs are not signed over, instead we verify each blob +/// using the relevant MsgPayForBlobs that is signed over in the encoded sdk.Tx. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlobTx { + #[prost(bytes = "bytes", tag = "1")] + pub tx: ::prost::bytes::Bytes, + #[prost(message, repeated, tag = "2")] + pub blobs: ::prost::alloc::vec::Vec, + #[prost(string, tag = "3")] + pub type_id: ::prost::alloc::string::String, +} +impl ::prost::Name for BlobTx { + const NAME: &'static str = "BlobTx"; + const PACKAGE: &'static str = "tendermint.types"; + fn full_name() -> ::prost::alloc::string::String { + "tendermint.types.BlobTx".into() + } + fn type_url() -> ::prost::alloc::string::String { + "/tendermint.types.BlobTx".into() + } +} diff --git a/core/node/da_clients/src/celestia/mod.rs b/core/node/da_clients/src/celestia/mod.rs index 862e6e4c3902..ce648531f282 100644 --- a/core/node/da_clients/src/celestia/mod.rs +++ b/core/node/da_clients/src/celestia/mod.rs @@ -1,3 +1,58 @@ mod client; +mod sdk; pub use self::client::CelestiaClient; + +pub mod celestia_proto { + include!("generated/celestia.blob.v1.rs"); +} + +pub mod cosmos { + pub mod auth { + include!("generated/cosmos.auth.v1beta1.rs"); + } + + pub mod base { + pub mod abci { + include!("generated/cosmos.base.abci.v1beta1.rs"); + } + + pub mod node { + include!("generated/cosmos.base.node.v1beta1.rs"); + } + + pub mod v1beta1 { + include!("generated/cosmos.base.v1beta1.rs"); + } + } + + pub mod tx { + pub mod signing { + include!("generated/cosmos.tx.signing.v1beta1.rs"); + } + + pub mod v1beta1 { + include!("generated/cosmos.tx.v1beta1.rs"); + } + } + + pub mod crypto { + pub mod multisig { + include!("generated/cosmos.crypto.multisig.v1beta1.rs"); + } + + pub mod secp256k1 { + include!("generated/cosmos.crypto.secp256k1.rs"); + } + } +} + +pub mod tendermint { + pub mod abci { + include!("generated/tendermint.abci.rs"); + } + + pub mod types { + include!("generated/tendermint.types.rs"); + } +} diff --git a/core/node/da_clients/src/celestia/sdk.rs b/core/node/da_clients/src/celestia/sdk.rs new file mode 100644 index 000000000000..49d95aabd1a4 --- /dev/null +++ b/core/node/da_clients/src/celestia/sdk.rs @@ -0,0 +1,601 @@ +use std::{ + fmt::{Display, Formatter, Result}, + time::{Duration, Instant}, +}; + +use celestia_types::Blob; +use k256::{ + ecdsa::{signature::Signer, Signature, SigningKey, VerifyingKey}, + sha2, + sha2::{Digest, Sha256}, +}; +use prost::{bytes::Bytes, Message, Name}; +use tonic::transport::Channel; + +use super::{ + celestia_proto::{ + query_client::QueryClient as BlobQueryClient, MsgPayForBlobs, + QueryParamsRequest as QueryBlobParamsRequest, + }, + cosmos::{ + auth::{ + query_client::QueryClient as AuthQueryClient, BaseAccount, QueryAccountRequest, + QueryParamsRequest as QueryAuthParamsRequest, + }, + base::{ + node::{ + service_client::ServiceClient as MinGasPriceClient, + ConfigRequest as MinGasPriceRequest, + }, + v1beta1::Coin, + }, + crypto::secp256k1, + tx::v1beta1::{ + mode_info::{Single, Sum}, + service_client::ServiceClient as TxClient, + AuthInfo, Fee, ModeInfo, SignDoc, SignerInfo, Tx, TxBody, + }, + }, + tendermint::types::{Blob as PbBlob, BlobTx}, +}; +use crate::celestia::cosmos::tx::v1beta1::{BroadcastMode, BroadcastTxRequest, GetTxRequest}; + +const UNITS_SUFFIX: &str = "utia"; +pub const ADDRESS_LENGTH: usize = 20; +const ACCOUNT_ADDRESS_PREFIX: bech32::Hrp = bech32::Hrp::parse_unchecked("celestia"); +const BLOB_TX_TYPE_ID: &str = "BLOB"; + +#[derive(Clone)] +pub(crate) struct RawCelestiaClient { + grpc_channel: Channel, + address: String, + chain_id: String, + signing_key: SigningKey, +} + +impl RawCelestiaClient { + pub(crate) fn new( + grpc_channel: Channel, + private_key: String, + chain_id: String, + ) -> anyhow::Result { + let bytes = hex::decode(private_key.trim())?; + let signing_key = SigningKey::from_slice(bytes.as_slice())?; + let address = get_address(*signing_key.verifying_key())?; + + Ok(Self { + grpc_channel, + address, + chain_id, + signing_key, + }) + } + + /// Prepares a blob transaction for the given blobs. + pub(crate) async fn prepare(&self, blobs: Vec) -> anyhow::Result { + let (gas_per_blob_byte, tx_size_cost_per_byte, min_gas_price, base_account) = tokio::try_join!( + self.get_gas_per_blob_byte(), + self.fetch_tx_size_cost_per_byte(), + self.fetch_min_gas_price(), + self.fetch_account(), + )?; + + let msg_pay_for_blobs = new_msg_pay_for_blobs(blobs.as_slice(), self.address.clone())?; + + let gas_limit = estimate_gas( + &msg_pay_for_blobs.blob_sizes, + gas_per_blob_byte, + tx_size_cost_per_byte, + ); + let fee = calculate_fee(min_gas_price, gas_limit); + + let signed_tx = new_signed_tx( + &msg_pay_for_blobs, + &base_account, + gas_limit, + fee, + self.chain_id.clone(), + &self.signing_key, + ); + + Ok(new_blob_tx(&signed_tx, blobs.iter())) + } + + /// Submits the blob transaction to the node and returns the height of the block in which it was + pub(super) async fn submit( + &self, + blob_tx_hash: BlobTxHash, + blob_tx: BlobTx, + ) -> anyhow::Result { + let mut client: TxClient = TxClient::new(self.grpc_channel.clone()); + let hex_encoded_tx_hash = self.broadcast_tx(&mut client, blob_tx).await?; + if hex_encoded_tx_hash != blob_tx_hash.clone().to_hex() { + tracing::error!( + "tx hash {} returned from celestia app is not the same as \ + the locally calculated one {}; submission file has invalid data", + hex_encoded_tx_hash, + blob_tx_hash + ); + } + tracing::info!(tx_hash = %hex_encoded_tx_hash, "broadcast blob transaction succeeded"); + + let height = self + .confirm_submission(&mut client, hex_encoded_tx_hash) + .await; + Ok(height) + } + + /// Fetches the gas cost per byte for blobs from the node. + async fn get_gas_per_blob_byte(&self) -> anyhow::Result { + let mut blob_query_client = BlobQueryClient::new(self.grpc_channel.clone()); + let response = blob_query_client.params(QueryBlobParamsRequest {}).await; + + let params = response + .map_err(|status| { + anyhow::format_err!( + "failed to get blob params, code: {}, message: {}", + status.code(), + status.message() + ) + })? + .into_inner() + .params + .ok_or_else(|| anyhow::anyhow!("EmptyBlobParams"))?; + + Ok(params.gas_per_blob_byte) + } + + /// Fetches the transaction size cost per byte from the node. + async fn fetch_tx_size_cost_per_byte(&self) -> anyhow::Result { + let mut auth_query_client = AuthQueryClient::new(self.grpc_channel.clone()); + let response = auth_query_client.params(QueryAuthParamsRequest {}).await; + + let params = response + .map_err(|status| { + anyhow::format_err!( + "failed to get auth params, code: {}, message: {}", + status.code(), + status.message() + ) + })? + .into_inner() + .params + .ok_or_else(|| anyhow::anyhow!("EmptyAuthParams"))?; + + Ok(params.tx_size_cost_per_byte) + } + + /// Fetches the minimum gas price from the node. + async fn fetch_min_gas_price(&self) -> anyhow::Result { + let mut min_gas_price_client = MinGasPriceClient::new(self.grpc_channel.clone()); + let response = min_gas_price_client.config(MinGasPriceRequest {}).await; + + let min_gas_price_with_suffix = response + .map_err(|status| { + anyhow::format_err!( + "failed to get price params, code: {}, message: {}", + status.code(), + status.message() + ) + })? + .into_inner() + .minimum_gas_price; + + let min_gas_price_str = min_gas_price_with_suffix + .strip_suffix(UNITS_SUFFIX) + .ok_or_else(|| { + anyhow::anyhow!( + "MinGasPrice bad suffix, min_gas_price: {}, expected_suffix: {}", + min_gas_price_with_suffix.clone(), + UNITS_SUFFIX + ) + })?; + + min_gas_price_str.parse::().map_err(|source| { + anyhow::anyhow!( + "Failed to parse min gas price, min_gas_price: {}, err: {}", + min_gas_price_str, + source, + ) + }) + } + + /// Fetches the account info for the current address. + async fn fetch_account(&self) -> anyhow::Result { + let mut auth_query_client = AuthQueryClient::new(self.grpc_channel.clone()); + let request = QueryAccountRequest { + address: self.address.clone(), + }; + + let account_info = auth_query_client.account(request).await.map_err(|status| { + anyhow::anyhow!( + "failed to get account info, code: {}, message: {}", + status.code(), + status.message() + ) + })?; + + let account_as_any = account_info + .into_inner() + .account + .ok_or_else(|| anyhow::anyhow!("empty account info"))?; + let expected_type_url = BaseAccount::type_url(); + + if expected_type_url == account_as_any.type_url { + return BaseAccount::decode(&*account_as_any.value) + .map_err(|error| anyhow::anyhow!("failed to decode account info: {}", error)); + } + + Err(anyhow::anyhow!( + "unexpected account type, expected: {}, got: {}", + expected_type_url, + account_as_any.type_url + )) + } + + /// Broadcasts the transaction and returns the transaction hash. + async fn broadcast_tx( + &self, + client: &mut TxClient, + blob_tx: BlobTx, + ) -> anyhow::Result { + let request = BroadcastTxRequest { + tx_bytes: Bytes::from(blob_tx.encode_to_vec()), + mode: i32::from(BroadcastMode::Sync), + }; + + let mut tx_response = client + .broadcast_tx(request) + .await + .map_err(|status| { + anyhow::anyhow!( + "failed to broadcast the tx, code: {}, message: {}", + status.code(), + status.message() + ) + })? + .into_inner() + .tx_response + .ok_or_else(|| anyhow::anyhow!("empty broadcast tx response"))?; + + if tx_response.code != 0 { + return Err(anyhow::format_err!( + "failed to broadcast the tx, tx_hash: {}, code: {}, namespace: {}, log: {}", + tx_response.txhash, + tx_response.code, + tx_response.codespace, + tx_response.raw_log, + )); + } + + tx_response.txhash.make_ascii_lowercase(); + Ok(tx_response.txhash) + } + + /// Waits for the transaction to be included in a block and returns the height of that block. + async fn confirm_submission( + &self, + client: &mut TxClient, + hex_encoded_tx_hash: String, + ) -> u64 { + // The min seconds to sleep after receiving a GetTx response and sending the next request. + const MIN_POLL_INTERVAL_SECS: u64 = 1; + // The max seconds to sleep after receiving a GetTx response and sending the next request. + const MAX_POLL_INTERVAL_SECS: u64 = 12; + // How long to wait after starting `confirm_submission` before starting to log errors. + const START_LOGGING_DELAY: Duration = Duration::from_secs(12); + // The minimum duration between logging errors. + const LOG_ERROR_INTERVAL: Duration = Duration::from_secs(5); + + let start = Instant::now(); + let mut logged_at = start; + + let mut log_if_due = |maybe_error: Option| { + if start.elapsed() <= START_LOGGING_DELAY || logged_at.elapsed() <= LOG_ERROR_INTERVAL { + return; + } + let reason = maybe_error + .map_or(anyhow::anyhow!("transaction still pending"), |error| { + anyhow::anyhow!("transaction still pending, error: {}", error) + }); + tracing::warn!( + %reason, + tx_hash = %hex_encoded_tx_hash, + elapsed_seconds = start.elapsed().as_secs_f32(), + "waiting to confirm blob submission" + ); + logged_at = Instant::now(); + }; + + let mut sleep_secs = MIN_POLL_INTERVAL_SECS; + loop { + tokio::time::sleep(Duration::from_secs(sleep_secs)).await; + let res = self + .clone() + .get_tx(client, hex_encoded_tx_hash.clone()) + .await; + match res { + Ok(Some(height)) => return height, + Ok(None) => { + sleep_secs = MIN_POLL_INTERVAL_SECS; + log_if_due(None); + } + Err(error) => { + sleep_secs = + std::cmp::min(sleep_secs.saturating_mul(2), MAX_POLL_INTERVAL_SECS); + log_if_due(Some(error)); + } + } + } + } + + /// Returns the height of the block in which the transaction was included (if it was). + async fn get_tx( + self, + client: &mut TxClient, + hex_encoded_tx_hash: String, + ) -> anyhow::Result> { + let request = GetTxRequest { + hash: hex_encoded_tx_hash, + }; + let response = client.get_tx(request).await; + + let ok_response = match response { + Ok(resp) => resp, + Err(status) => { + if status.code() == tonic::Code::NotFound { + tracing::trace!(msg = status.message(), "transaction still pending"); + return Ok(None); + } + return Err(anyhow::anyhow!( + "failed to get tx, code: {}, message: {}", + status.code(), + status.message() + )); + } + }; + let tx_response = ok_response + .into_inner() + .tx_response + .ok_or_else(|| anyhow::anyhow!("Empty get tx response"))?; + if tx_response.code != 0 { + return Err(anyhow::anyhow!( + "failed to get tx, tx_hash: {}, code: {}, namespace: {}, log: {}", + tx_response.txhash, + tx_response.code, + tx_response.codespace, + tx_response.raw_log, + )); + } + if tx_response.height == 0 { + tracing::trace!(tx_hash = %tx_response.txhash, "transaction still pending"); + return Ok(None); + } + + let height = u64::try_from(tx_response.height).map_err(|_| { + anyhow::anyhow!("GetTxResponseNegativeBlockHeight: {}", tx_response.height) + })?; + + tracing::debug!(tx_hash = %tx_response.txhash, height, "transaction succeeded"); + Ok(Some(height)) + } +} + +/// Returns a `BlobTx` for the given signed tx and blobs. +fn new_blob_tx<'a>(signed_tx: &Tx, blobs: impl Iterator) -> BlobTx { + let blobs = blobs + .map(|blob| PbBlob { + namespace_id: Bytes::from(blob.namespace.id().to_vec()), + namespace_version: u32::from(blob.namespace.version()), + data: Bytes::from(blob.data.clone()), + share_version: u32::from(blob.share_version), + }) + .collect(); + BlobTx { + tx: Bytes::from(signed_tx.encode_to_vec()), + blobs, + type_id: BLOB_TX_TYPE_ID.to_string(), + } +} + +/// Returns a signed tx for the given message, account and metadata. +fn new_signed_tx( + msg_pay_for_blobs: &MsgPayForBlobs, + base_account: &BaseAccount, + gas_limit: u64, + fee: u64, + chain_id: String, + signing_key: &SigningKey, +) -> Tx { + const SIGNING_MODE_INFO: Option = Some(ModeInfo { + sum: Some(Sum::Single(Single { mode: 1 })), + }); + + let fee_coin = Coin { + denom: UNITS_SUFFIX.to_string(), + amount: fee.to_string(), + }; + let fee = Fee { + amount: vec![fee_coin], + gas_limit, + ..Fee::default() + }; + + let public_key = secp256k1::PubKey { + key: Bytes::from( + (*signing_key.verifying_key()) + .to_encoded_point(true) + .as_bytes() + .to_vec(), + ), + }; + let public_key_as_any = pbjson_types::Any { + type_url: secp256k1::PubKey::type_url(), + value: public_key.encode_to_vec().into(), + }; + let auth_info = AuthInfo { + signer_infos: vec![SignerInfo { + public_key: Some(public_key_as_any), + mode_info: SIGNING_MODE_INFO, + sequence: base_account.sequence, + }], + fee: Some(fee), + tip: None, + }; + + let msg = pbjson_types::Any { + type_url: MsgPayForBlobs::type_url(), + value: msg_pay_for_blobs.encode_to_vec().into(), + }; + let tx_body = TxBody { + messages: vec![msg], + ..TxBody::default() + }; + + let bytes_to_sign = SignDoc { + body_bytes: Bytes::from(tx_body.encode_to_vec()), + auth_info_bytes: Bytes::from(auth_info.encode_to_vec()), + chain_id, + account_number: base_account.account_number, + } + .encode_to_vec(); + let signature: Signature = signing_key.sign(&bytes_to_sign); + Tx { + body: Some(tx_body), + auth_info: Some(auth_info), + signatures: vec![Bytes::from(signature.to_bytes().to_vec())], + } +} + +/// Returns the fee for the signed tx. +fn calculate_fee(min_gas_price: f64, gas_limit: u64) -> u64 { + let calculated_fee = (min_gas_price * gas_limit as f64).ceil() as u64; + tracing::info!( + "calculated fee: {}, min_gas_price: {}, gas_limit: {}", + calculated_fee, + min_gas_price, + gas_limit + ); + + calculated_fee +} + +fn estimate_gas(blob_sizes: &[u32], gas_per_blob_byte: u32, tx_size_cost_per_byte: u64) -> u64 { + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/pkg/appconsts/global_consts.go#L28 + const SHARE_SIZE: u64 = 512; + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/pkg/appconsts/global_consts.go#L55 + const CONTINUATION_COMPACT_SHARE_CONTENT_SIZE: u32 = 482; + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/pkg/appconsts/global_consts.go#L59 + const FIRST_SPARSE_SHARE_CONTENT_SIZE: u32 = 478; + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/x/blob/types/payforblob.go#L40 + const PFB_GAS_FIXED_COST: u64 = 75_000; + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/x/blob/types/payforblob.go#L44 + const BYTES_PER_BLOB_INFO: u64 = 70; + + // From https://github.com/celestiaorg/celestia-app/blob/v1.4.0/pkg/shares/share_sequence.go#L126 + // + // `blob_len` is the size in bytes of one blob's `data` field. + fn sparse_shares_needed(blob_len: u32) -> u64 { + if blob_len == 0 { + return 0; + } + + if blob_len < FIRST_SPARSE_SHARE_CONTENT_SIZE { + return 1; + } + + // Use `u64` here to avoid overflow while adding below. + let mut bytes_available = u64::from(FIRST_SPARSE_SHARE_CONTENT_SIZE); + let mut shares_needed = 1_u64; + while bytes_available < u64::from(blob_len) { + bytes_available = bytes_available + .checked_add(u64::from(CONTINUATION_COMPACT_SHARE_CONTENT_SIZE)) + .expect( + "this can't overflow, as on each iteration `bytes_available < u32::MAX`, and \ + we're adding at most `u32::MAX` to it", + ); + shares_needed = shares_needed.checked_add(1).expect( + "this can't overflow, as the loop cannot execute for `u64::MAX` iterations", + ); + } + shares_needed + } + + let total_shares_used: u64 = blob_sizes.iter().copied().map(sparse_shares_needed).sum(); + let blob_count = blob_sizes.len().try_into().unwrap_or(u64::MAX); + + let shares_gas = total_shares_used + .saturating_mul(SHARE_SIZE) + .saturating_mul(u64::from(gas_per_blob_byte)); + let blob_info_gas = tx_size_cost_per_byte + .saturating_mul(BYTES_PER_BLOB_INFO) + .saturating_mul(blob_count); + + shares_gas + .saturating_add(blob_info_gas) + .saturating_add(PFB_GAS_FIXED_COST) +} + +/// Prepares a `MsgPayForBlobs` message for the given blobs. +fn new_msg_pay_for_blobs(blobs: &[Blob], signer: String) -> anyhow::Result { + let mut blob_sizes = Vec::with_capacity(blobs.len()); + let mut namespaces = Vec::with_capacity(blobs.len()); + let mut share_commitments = Vec::with_capacity(blobs.len()); + let mut share_versions = Vec::with_capacity(blobs.len()); + for blob in blobs { + blob_sizes.push(blob.data.len()); + namespaces.push(Bytes::from(blob.namespace.as_bytes().to_vec())); + share_commitments.push(Bytes::from(blob.commitment.0.to_vec())); + share_versions.push(u32::from(blob.share_version)); + } + + let blob_sizes = blob_sizes + .into_iter() + .map(|blob_size| { + u32::try_from(blob_size) + .map_err(|_| anyhow::anyhow!("blob too large, size: {}", blob_size)) + }) + .collect::>()?; + + Ok(MsgPayForBlobs { + signer, + namespaces, + blob_sizes, + share_commitments, + share_versions, + }) +} + +fn get_address(public_key: VerifyingKey) -> anyhow::Result { + use ripemd::{Digest, Ripemd160}; + + let sha_digest = sha2::Sha256::digest(public_key.to_sec1_bytes()); + let ripemd_digest = Ripemd160::digest(&sha_digest[..]); + let mut bytes = [0u8; ADDRESS_LENGTH]; + bytes.copy_from_slice(&ripemd_digest[..ADDRESS_LENGTH]); + + Ok(bech32::encode::( + ACCOUNT_ADDRESS_PREFIX, + bytes.as_slice(), + )?) +} + +#[derive(Clone, Debug)] +pub(super) struct BlobTxHash([u8; 32]); + +impl BlobTxHash { + pub(super) fn compute(blob_tx: &BlobTx) -> Self { + let sha2 = Sha256::digest(&blob_tx.tx); + Self(sha2.into()) + } + + pub(super) fn to_hex(self) -> String { + hex::encode(self.0) + } +} + +impl Display for BlobTxHash { + fn fmt(&self, formatter: &mut Formatter<'_>) -> Result { + write!(formatter, "{}", hex::encode(self.0)) + } +} diff --git a/core/node/eth_watch/src/tests.rs b/core/node/eth_watch/src/tests.rs index 8c37b5c9920b..feb9eff35b5c 100644 --- a/core/node/eth_watch/src/tests.rs +++ b/core/node/eth_watch/src/tests.rs @@ -152,7 +152,7 @@ impl EthClient for MockEthClient { Ok(logs .into_iter() .filter(|log| { - log.topics.get(0) == Some(&topic1) + log.topics.first() == Some(&topic1) && (topic2.is_none() || log.topics.get(1) == topic2.as_ref()) }) .collect()) From 186c829ae80bac7cf83319a2677bf559284ba690 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Thu, 10 Oct 2024 14:00:20 +0200 Subject: [PATCH 08/17] prettier --- core/node/da_clients/src/celestia/README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/core/node/da_clients/src/celestia/README.md b/core/node/da_clients/src/celestia/README.md index bd2414659c34..a3142a7d7615 100644 --- a/core/node/da_clients/src/celestia/README.md +++ b/core/node/da_clients/src/celestia/README.md @@ -1,16 +1,19 @@ # Celestia client --- -This is an implementation of the Celestia client capable of sending the blobs to DA layer. -Normally, the light client is required to send the blobs to Celestia, but -this implementation is capable of sending the blobs to DA layer directly. -This is a simplified and adapted version of astria's code, look -[here](https://github.com/astriaorg/astria/tree/main/crates/astria-sequencer-relayer) for original implementation. +This is an implementation of the Celestia client capable of sending the blobs to DA layer. Normally, the light client is +required to send the blobs to Celestia, but this implementation is capable of sending the blobs to DA layer directly. -The generated files are copied from [here](https://github.com/astriaorg/astria/tree/main/crates/astria-core/src/generated), which is -not perfect, but allows us to use them without adding the proto files and the infrastructure to generate the `.rs`. +This is a simplified and adapted version of astria's code, look +[here](https://github.com/astriaorg/astria/tree/main/crates/astria-sequencer-relayer) for original implementation. -While moving the files, the `#[cfg(feature = "client")]` annotations were removed for simplicity, so client code is available by default. +The generated files are copied from +[here](https://github.com/astriaorg/astria/tree/main/crates/astria-core/src/generated), which is not perfect, but allows +us to use them without adding the proto files and the infrastructure to generate the `.rs`. -If there is a need to generate the files from the proto files, the `tools/protobuf-compiler` from astria's repo can be used. +While moving the files, the `#[cfg(feature = "client")]` annotations were removed for simplicity, so client code is +available by default. + +If there is a need to generate the files from the proto files, the `tools/protobuf-compiler` from astria's repo can be +used. From fc48cd3fba4a0d4ff61ecceaeacb05a0fa548d58 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Fri, 11 Oct 2024 15:41:00 +0200 Subject: [PATCH 09/17] bump celestia-types --- Cargo.lock | 132 +++++++++++++++++++++++++++++++++++++++++++++-------- Cargo.toml | 2 +- 2 files changed, 115 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce10217c43a5..56e512672a37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1400,15 +1400,15 @@ dependencies = [ [[package]] name = "celestia-proto" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b0bdbe83a9c86b61cb24a6144fb26c2f3e4125f2f1a95c84a3305c8ef18e60" +checksum = "c6eb26c852e42015f85f3aed5c3d1472c751b143e2199d0401ebac2f4500b20d" dependencies = [ - "anyhow", "celestia-tendermint-proto", "prost 0.12.6", "prost-build", "prost-types", + "protox 0.6.1", "serde", ] @@ -1461,9 +1461,9 @@ dependencies = [ [[package]] name = "celestia-types" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8def831ad47624c7043d95f1e0ed67b2a5b61191b1e8d9c6217bda73d5aaf057" +checksum = "caf52cc4b4cdf73fc07d9eeaea6d27bb39eed81f4bf8c89f01df86ace4e6da10" dependencies = [ "base64 0.22.1", "bech32", @@ -4775,7 +4775,16 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c000ca4d908ff18ac99b93a062cb8958d331c3220719c52e77cb19cc6ac5d2c1" dependencies = [ - "logos-derive", + "logos-derive 0.13.0", +] + +[[package]] +name = "logos" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6b6e02facda28ca5fb8dbe4b152496ba3b1bd5a4b40bb2b1b2d8ad74e0f39b" +dependencies = [ + "logos-derive 0.14.2", ] [[package]] @@ -4792,13 +4801,37 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "logos-codegen" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32eb6b5f26efacd015b000bfc562186472cd9b34bdba3f6b264e2a052676d10" +dependencies = [ + "beef", + "fnv", + "lazy_static", + "proc-macro2 1.0.87", + "quote 1.0.37", + "regex-syntax 0.8.5", + "syn 2.0.79", +] + [[package]] name = "logos-derive" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbfc0d229f1f42d790440136d941afd806bc9e949e2bcb8faa813b0f00d1267e" dependencies = [ - "logos-codegen", + "logos-codegen 0.13.0", +] + +[[package]] +name = "logos-derive" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5d0c5463c911ef55624739fc353238b4e310f0144be1f875dc42fec6bfd5ec" +dependencies = [ + "logos-codegen 0.14.2", ] [[package]] @@ -4899,12 +4932,24 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" dependencies = [ - "miette-derive", + "miette-derive 5.10.0", "once_cell", "thiserror", "unicode-width", ] +[[package]] +name = "miette" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" +dependencies = [ + "cfg-if", + "miette-derive 7.2.0", + "thiserror", + "unicode-width", +] + [[package]] name = "miette-derive" version = "5.10.0" @@ -4916,6 +4961,17 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "miette-derive" +version = "7.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" +dependencies = [ + "proc-macro2 1.0.87", + "quote 1.0.37", + "syn 2.0.79", +] + [[package]] name = "mime" version = "0.3.17" @@ -6140,8 +6196,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "057237efdb71cf4b3f9396302a3d6599a92fa94063ba537b66130980ea9909f3" dependencies = [ "base64 0.21.7", - "logos", - "miette", + "logos 0.13.0", + "miette 5.10.0", "once_cell", "prost 0.12.6", "prost-types", @@ -6149,6 +6205,19 @@ dependencies = [ "serde-value", ] +[[package]] +name = "prost-reflect" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f5eec97d5d34bdd17ad2db2219aabf46b054c6c41bd5529767c9ce55be5898f" +dependencies = [ + "logos 0.14.2", + "miette 7.2.0", + "once_cell", + "prost 0.12.6", + "prost-types", +] + [[package]] name = "prost-types" version = "0.12.6" @@ -6165,11 +6234,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00bb76c5f6221de491fe2c8f39b106330bbd9762c6511119c07940e10eb9ff11" dependencies = [ "bytes", - "miette", + "miette 5.10.0", "prost 0.12.6", - "prost-reflect", + "prost-reflect 0.12.0", "prost-types", - "protox-parse", + "protox-parse 0.5.0", + "thiserror", +] + +[[package]] +name = "protox" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac532509cee918d40f38c3e12f8ef9230f215f017d54de7dd975015538a42ce7" +dependencies = [ + "bytes", + "miette 7.2.0", + "prost 0.12.6", + "prost-reflect 0.13.1", + "prost-types", + "protox-parse 0.6.1", "thiserror", ] @@ -6179,8 +6263,20 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4581f441c58863525a3e6bec7b8de98188cf75239a56c725a3e7288450a33f" dependencies = [ - "logos", - "miette", + "logos 0.13.0", + "miette 5.10.0", + "prost-types", + "thiserror", +] + +[[package]] +name = "protox-parse" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6c33f43516fe397e2f930779d720ca12cd057f7da4cd6326a0ef78d69dee96" +dependencies = [ + "logos 0.14.2", + "miette 7.2.0", "prost-types", "thiserror", ] @@ -11658,7 +11754,7 @@ dependencies = [ "bit-vec", "once_cell", "prost 0.12.6", - "prost-reflect", + "prost-reflect 0.12.0", "quick-protobuf", "rand 0.8.5", "serde", @@ -11680,8 +11776,8 @@ dependencies = [ "prettyplease", "proc-macro2 1.0.87", "prost-build", - "prost-reflect", - "protox", + "prost-reflect 0.12.0", + "protox 0.5.1", "quote 1.0.37", "syn 2.0.79", ] diff --git a/Cargo.toml b/Cargo.toml index 88c3b013a4a3..86288194dad1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -211,7 +211,7 @@ parity-scale-codec = { version = "3.6.9", default-features = false } subxt-signer = { version = "0.34", default-features = false } # Celestia -celestia-types = "0.6.0" +celestia-types = "0.6.1" bech32 = "0.11.0" ripemd = "0.1.3" k256 = "0.13.4" From 637bbc235d8a1653a275c56151105bc9eb1de144 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Fri, 11 Oct 2024 16:00:02 +0200 Subject: [PATCH 10/17] fix --- core/node/da_clients/src/celestia/sdk.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/node/da_clients/src/celestia/sdk.rs b/core/node/da_clients/src/celestia/sdk.rs index 49d95aabd1a4..7c9cf6271f99 100644 --- a/core/node/da_clients/src/celestia/sdk.rs +++ b/core/node/da_clients/src/celestia/sdk.rs @@ -109,7 +109,7 @@ impl RawCelestiaClient { ) -> anyhow::Result { let mut client: TxClient = TxClient::new(self.grpc_channel.clone()); let hex_encoded_tx_hash = self.broadcast_tx(&mut client, blob_tx).await?; - if hex_encoded_tx_hash != blob_tx_hash.clone().to_hex() { + if hex_encoded_tx_hash != blob_tx_hash.clone().hex() { tracing::error!( "tx hash {} returned from celestia app is not the same as \ the locally calculated one {}; submission file has invalid data", @@ -589,7 +589,7 @@ impl BlobTxHash { Self(sha2.into()) } - pub(super) fn to_hex(self) -> String { + pub(super) fn hex(self) -> String { hex::encode(self.0) } } From 8efe86ac27c112f7aa9d9eb64bd6ec84e57eceb4 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Fri, 11 Oct 2024 17:19:58 +0200 Subject: [PATCH 11/17] prettify import --- core/node/da_clients/src/celestia/sdk.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/node/da_clients/src/celestia/sdk.rs b/core/node/da_clients/src/celestia/sdk.rs index 7c9cf6271f99..171448767461 100644 --- a/core/node/da_clients/src/celestia/sdk.rs +++ b/core/node/da_clients/src/celestia/sdk.rs @@ -33,12 +33,12 @@ use super::{ tx::v1beta1::{ mode_info::{Single, Sum}, service_client::ServiceClient as TxClient, - AuthInfo, Fee, ModeInfo, SignDoc, SignerInfo, Tx, TxBody, + AuthInfo, BroadcastMode, BroadcastTxRequest, Fee, GetTxRequest, ModeInfo, SignDoc, + SignerInfo, Tx, TxBody, }, }, tendermint::types::{Blob as PbBlob, BlobTx}, }; -use crate::celestia::cosmos::tx::v1beta1::{BroadcastMode, BroadcastTxRequest, GetTxRequest}; const UNITS_SUFFIX: &str = "utia"; pub const ADDRESS_LENGTH: usize = 20; From d33a0de4b6f971fd50647e29a999a84fb3f503d8 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 21 Oct 2024 18:09:35 +0200 Subject: [PATCH 12/17] chore: use secp256k1 instead of k256 --- Cargo.lock | 3 +- Cargo.toml | 1 - core/node/da_clients/Cargo.toml | 3 +- core/node/da_clients/src/celestia/sdk.rs | 45 ++++++++++++------------ 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 156f9b6b4e28..3001363c4a86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10894,14 +10894,15 @@ dependencies = [ "hex", "http 1.1.0", "jsonrpsee 0.23.2", - "k256 0.13.4", "parity-scale-codec", "pbjson-types", "prost 0.12.6", "ripemd", "scale-encode", + "secp256k1", "serde", "serde_json", + "sha2 0.10.8", "subxt-metadata", "subxt-signer", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 194447019a6b..0f9c4b4bbe40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -214,7 +214,6 @@ subxt-signer = { version = "0.34", default-features = false } celestia-types = "0.6.1" bech32 = "0.11.0" ripemd = "0.1.3" -k256 = "0.13.4" tonic = "0.11.0" pbjson-types = "0.6.0" diff --git a/core/node/da_clients/Cargo.toml b/core/node/da_clients/Cargo.toml index 96779c175fdd..6ceae220ac4d 100644 --- a/core/node/da_clients/Cargo.toml +++ b/core/node/da_clients/Cargo.toml @@ -41,7 +41,8 @@ jsonrpsee = { workspace = true, features = ["ws-client"] } http.workspace = true bincode.workspace = true celestia-types.workspace = true -k256.workspace = true +secp256k1.workspace = true +sha2.workspace = true prost.workspace = true bech32.workspace = true ripemd.workspace = true diff --git a/core/node/da_clients/src/celestia/sdk.rs b/core/node/da_clients/src/celestia/sdk.rs index 171448767461..a8a46a9402a2 100644 --- a/core/node/da_clients/src/celestia/sdk.rs +++ b/core/node/da_clients/src/celestia/sdk.rs @@ -1,15 +1,13 @@ use std::{ fmt::{Display, Formatter, Result}, + str::FromStr, time::{Duration, Instant}, }; use celestia_types::Blob; -use k256::{ - ecdsa::{signature::Signer, Signature, SigningKey, VerifyingKey}, - sha2, - sha2::{Digest, Sha256}, -}; use prost::{bytes::Bytes, Message, Name}; +use secp256k1::{PublicKey, Secp256k1, SecretKey}; +use sha2::Digest; use tonic::transport::Channel; use super::{ @@ -29,7 +27,7 @@ use super::{ }, v1beta1::Coin, }, - crypto::secp256k1, + crypto::secp256k1 as ec_proto, tx::v1beta1::{ mode_info::{Single, Sum}, service_client::ServiceClient as TxClient, @@ -50,7 +48,7 @@ pub(crate) struct RawCelestiaClient { grpc_channel: Channel, address: String, chain_id: String, - signing_key: SigningKey, + signing_key: SecretKey, } impl RawCelestiaClient { @@ -59,9 +57,9 @@ impl RawCelestiaClient { private_key: String, chain_id: String, ) -> anyhow::Result { - let bytes = hex::decode(private_key.trim())?; - let signing_key = SigningKey::from_slice(bytes.as_slice())?; - let address = get_address(*signing_key.verifying_key())?; + let signing_key = SecretKey::from_str(&private_key) + .map_err(|e| anyhow::anyhow!("Failed to parse private key: {}", e))?; + let address = get_address(signing_key.public_key(&Secp256k1::new()))?; Ok(Self { grpc_channel, @@ -405,7 +403,7 @@ fn new_signed_tx( gas_limit: u64, fee: u64, chain_id: String, - signing_key: &SigningKey, + signing_key: &SecretKey, ) -> Tx { const SIGNING_MODE_INFO: Option = Some(ModeInfo { sum: Some(Sum::Single(Single { mode: 1 })), @@ -421,16 +419,16 @@ fn new_signed_tx( ..Fee::default() }; - let public_key = secp256k1::PubKey { + let public_key = ec_proto::PubKey { key: Bytes::from( - (*signing_key.verifying_key()) - .to_encoded_point(true) - .as_bytes() + signing_key + .public_key(&Secp256k1::new()) + .serialize() .to_vec(), ), }; let public_key_as_any = pbjson_types::Any { - type_url: secp256k1::PubKey::type_url(), + type_url: ec_proto::PubKey::type_url(), value: public_key.encode_to_vec().into(), }; let auth_info = AuthInfo { @@ -459,11 +457,15 @@ fn new_signed_tx( account_number: base_account.account_number, } .encode_to_vec(); - let signature: Signature = signing_key.sign(&bytes_to_sign); + let hashed_bytes: [u8; 32] = sha2::Sha256::digest(bytes_to_sign).into(); + let signature = secp256k1::Secp256k1::new().sign_ecdsa( + &secp256k1::Message::from_slice(&hashed_bytes[..]).unwrap(), // unwrap is safe here because we know the length of the hashed bytes + signing_key, + ); Tx { body: Some(tx_body), auth_info: Some(auth_info), - signatures: vec![Bytes::from(signature.to_bytes().to_vec())], + signatures: vec![Bytes::from(signature.serialize_compact().to_vec())], } } @@ -566,10 +568,10 @@ fn new_msg_pay_for_blobs(blobs: &[Blob], signer: String) -> anyhow::Result anyhow::Result { +fn get_address(public_key: PublicKey) -> anyhow::Result { use ripemd::{Digest, Ripemd160}; - let sha_digest = sha2::Sha256::digest(public_key.to_sec1_bytes()); + let sha_digest = sha2::Sha256::digest(public_key.serialize().to_vec()); let ripemd_digest = Ripemd160::digest(&sha_digest[..]); let mut bytes = [0u8; ADDRESS_LENGTH]; bytes.copy_from_slice(&ripemd_digest[..ADDRESS_LENGTH]); @@ -585,8 +587,7 @@ pub(super) struct BlobTxHash([u8; 32]); impl BlobTxHash { pub(super) fn compute(blob_tx: &BlobTx) -> Self { - let sha2 = Sha256::digest(&blob_tx.tx); - Self(sha2.into()) + Self(sha2::Sha256::digest(&blob_tx.tx).into()) } pub(super) fn hex(self) -> String { From 36ffd415dc564ea6dcba20a6780ad558ec3f9fb6 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Tue, 22 Oct 2024 10:00:15 +0200 Subject: [PATCH 13/17] fix lint --- core/node/da_clients/src/celestia/sdk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/node/da_clients/src/celestia/sdk.rs b/core/node/da_clients/src/celestia/sdk.rs index a8a46a9402a2..5fd9aea79f07 100644 --- a/core/node/da_clients/src/celestia/sdk.rs +++ b/core/node/da_clients/src/celestia/sdk.rs @@ -571,7 +571,7 @@ fn new_msg_pay_for_blobs(blobs: &[Blob], signer: String) -> anyhow::Result anyhow::Result { use ripemd::{Digest, Ripemd160}; - let sha_digest = sha2::Sha256::digest(public_key.serialize().to_vec()); + let sha_digest = sha2::Sha256::digest(public_key.serialize()); let ripemd_digest = Ripemd160::digest(&sha_digest[..]); let mut bytes = [0u8; ADDRESS_LENGTH]; bytes.copy_from_slice(&ripemd_digest[..ADDRESS_LENGTH]); From ccaf87acbbefcdec7b7a2a1a10f4962c8dc7484e Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Mon, 28 Oct 2024 00:32:32 +0100 Subject: [PATCH 14/17] fix env test --- core/lib/env_config/src/da_client.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index ee23c93b1858..46a9be62a06e 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -150,15 +150,9 @@ mod tests { DA_BRIDGE_API_URL="localhost:54321" DA_TIMEOUT="2" -<<<<<<< HEAD - DA_MAX_RETRIES="3" - - DA_SECRETS_SEED_PHRASE="bottom drive obey lake curtain smoke basket hold race lonely fit walk" -======= DA_API_NODE_URL="localhost:12345" DA_APP_ID="1" ->>>>>>> 89eadd353c4fb84bb815ae56b29f4ff3467b80f3 "#; lock.set_env(config); From 9079bd1b6f314aa88715aa81e90d63ef778af920 Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Tue, 29 Oct 2024 10:47:24 +0100 Subject: [PATCH 15/17] timeout in ms for avail --- core/lib/config/src/configs/da_client/avail.rs | 2 +- core/lib/config/src/testonly.rs | 2 +- core/lib/env_config/src/da_client.rs | 8 ++++---- core/lib/protobuf_config/src/da_client.rs | 4 ++-- core/lib/protobuf_config/src/proto/config/da_client.proto | 4 +++- core/node/da_clients/src/avail/client.rs | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/lib/config/src/configs/da_client/avail.rs b/core/lib/config/src/configs/da_client/avail.rs index 311960c83ea8..3993656d667a 100644 --- a/core/lib/config/src/configs/da_client/avail.rs +++ b/core/lib/config/src/configs/da_client/avail.rs @@ -14,7 +14,7 @@ pub enum AvailClientConfig { #[derive(Clone, Debug, PartialEq, Deserialize)] pub struct AvailConfig { pub bridge_api_url: String, - pub timeout: usize, + pub timeout_ms: usize, #[serde(flatten)] pub config: AvailClientConfig, } diff --git a/core/lib/config/src/testonly.rs b/core/lib/config/src/testonly.rs index 2234116d86d8..45c776242630 100644 --- a/core/lib/config/src/testonly.rs +++ b/core/lib/config/src/testonly.rs @@ -948,7 +948,7 @@ impl Distribution for EncodeDist { fn sample(&self, rng: &mut R) -> configs::da_client::DAClientConfig { Avail(AvailConfig { bridge_api_url: self.sample(rng), - timeout: self.sample(rng), + timeout_ms: self.sample(rng), config: AvailClientConfig::FullClient(AvailDefaultConfig { api_node_url: self.sample(rng), app_id: self.sample(rng), diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index 46a9be62a06e..efc365600542 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -21,7 +21,7 @@ impl FromEnv for DAClientConfig { let config = match client_tag.as_str() { AVAIL_CLIENT_CONFIG_NAME => Self::Avail(AvailConfig { bridge_api_url: env::var("DA_BRIDGE_API_URL").ok().unwrap(), - timeout: env::var("DA_TIMEOUT")?.parse()?, + timeout_ms: env::var("DA_TIMEOUT_MS")?.parse()?, config: match env::var("DA_AVAIL_CLIENT_TYPE")?.as_str() { AVAIL_FULL_CLIENT_NAME => { AvailClientConfig::FullClient(envy_load("da_avail_full_client", "DA_")?) @@ -129,11 +129,11 @@ mod tests { api_node_url: &str, bridge_api_url: &str, app_id: u32, - timeout: usize, + timeout_ms: usize, ) -> DAClientConfig { DAClientConfig::Avail(AvailConfig { bridge_api_url: bridge_api_url.to_string(), - timeout, + timeout_ms, config: AvailClientConfig::FullClient(AvailDefaultConfig { api_node_url: api_node_url.to_string(), app_id, @@ -164,7 +164,7 @@ mod tests { "localhost:12345", "localhost:54321", "1".parse::().unwrap(), - "2".parse::().unwrap(), + "2000".parse::().unwrap(), ) ); } diff --git a/core/lib/protobuf_config/src/da_client.rs b/core/lib/protobuf_config/src/da_client.rs index de6eb9173cce..e175a671c3ce 100644 --- a/core/lib/protobuf_config/src/da_client.rs +++ b/core/lib/protobuf_config/src/da_client.rs @@ -22,7 +22,7 @@ impl ProtoRepr for proto::DataAvailabilityClient { bridge_api_url: required(&conf.bridge_api_url) .context("bridge_api_url")? .clone(), - timeout: *required(&conf.timeout).context("timeout")? as usize, + timeout_ms: *required(&conf.timeout_ms).context("timeout_ms")? as usize, config: match conf.config.as_ref() { Some(proto::avail_config::Config::FullClient(full_client_conf)) => { AvailClientConfig::FullClient(AvailDefaultConfig { @@ -63,7 +63,7 @@ impl ProtoRepr for proto::DataAvailabilityClient { let config = match &this { Avail(config) => proto::data_availability_client::Config::Avail(proto::AvailConfig { bridge_api_url: Some(config.bridge_api_url.clone()), - timeout: Some(config.timeout as u64), + timeout_ms: Some(config.timeout_ms as u64), config: match &config.config { AvailClientConfig::FullClient(conf) => Some( proto::avail_config::Config::FullClient(proto::AvailClientConfig { diff --git a/core/lib/protobuf_config/src/proto/config/da_client.proto b/core/lib/protobuf_config/src/proto/config/da_client.proto index 1cb7bdadce1a..206b1d05c04e 100644 --- a/core/lib/protobuf_config/src/proto/config/da_client.proto +++ b/core/lib/protobuf_config/src/proto/config/da_client.proto @@ -6,14 +6,16 @@ import "zksync/config/object_store.proto"; message AvailConfig { optional string bridge_api_url = 2; - optional uint64 timeout = 5; oneof config { AvailClientConfig full_client = 7; AvailGasRelayConfig gas_relay = 8; } + optional uint64 timeout_ms = 9; + reserved 1; reserved "api_node_url"; reserved 3; reserved "seed"; reserved 4; reserved "app_id"; + reserved 5; reserved "timeout"; reserved 6; reserved "max_retries"; } diff --git a/core/node/da_clients/src/avail/client.rs b/core/node/da_clients/src/avail/client.rs index 077ce8af801d..c0ead429d91a 100644 --- a/core/node/da_clients/src/avail/client.rs +++ b/core/node/da_clients/src/avail/client.rs @@ -195,7 +195,7 @@ impl DataAvailabilityClient for AvailClient { let response = self .api_client .get(&url) - .timeout(Duration::from_secs(self.config.timeout as u64)) + .timeout(Duration::from_millis(self.config.timeout_ms as u64)) .send() .await .map_err(to_retriable_da_error)?; From d08e53299298a7882cdab88ed2f7429ac93753de Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Tue, 29 Oct 2024 11:21:07 +0100 Subject: [PATCH 16/17] fix a unit test --- core/lib/env_config/src/da_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index efc365600542..29fe62af9531 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -149,7 +149,7 @@ mod tests { DA_AVAIL_CLIENT_TYPE="FullClient" DA_BRIDGE_API_URL="localhost:54321" - DA_TIMEOUT="2" + DA_TIMEOUT="2000" DA_API_NODE_URL="localhost:12345" DA_APP_ID="1" From 9eac509019748319878d904b39292f700d32002c Mon Sep 17 00:00:00 2001 From: dimazhornyk Date: Tue, 29 Oct 2024 11:47:47 +0100 Subject: [PATCH 17/17] fix test --- core/lib/env_config/src/da_client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/env_config/src/da_client.rs b/core/lib/env_config/src/da_client.rs index 29fe62af9531..70819a706427 100644 --- a/core/lib/env_config/src/da_client.rs +++ b/core/lib/env_config/src/da_client.rs @@ -149,7 +149,7 @@ mod tests { DA_AVAIL_CLIENT_TYPE="FullClient" DA_BRIDGE_API_URL="localhost:54321" - DA_TIMEOUT="2000" + DA_TIMEOUT_MS="2000" DA_API_NODE_URL="localhost:12345" DA_APP_ID="1"