From babc6620e6e3809074a4f4c022efdeb31153c5e9 Mon Sep 17 00:00:00 2001 From: Farhad Shabani Date: Wed, 6 Mar 2024 10:40:59 -0800 Subject: [PATCH] chore: reflect ibc-rs ADR010 changes --- Cargo.lock | 2645 ++--------------- Cargo.toml | 20 +- .../sov-celestia-cw/src/context/client_ctx.rs | 45 +- .../sov-celestia-cw/src/context/core_ctx.rs | 296 -- .../sov-celestia-cw/src/context/custom_ctx.rs | 40 +- clients/sov-celestia-cw/src/context/mod.rs | 1 - clients/sov-celestia-cw/src/handlers.rs | 2 +- .../src/types/consensus_state.rs | 14 +- clients/sov-celestia/src/client_state.rs | 394 --- .../sov-celestia/src/client_state/common.rs | 86 + .../src/client_state/execution.rs | 268 ++ clients/sov-celestia/src/client_state/mod.rs | 67 + .../src/client_state/validation.rs | 80 + clients/sov-celestia/src/context.rs | 59 +- .../types/src/consensus_state/definition.rs | 5 + mocks/Cargo.toml | 2 +- modules/sov-ibc/src/clients/context.rs | 93 +- modules/sov-ibc/src/clients/mod.rs | 61 +- modules/sov-ibc/src/context.rs | 109 +- modules/sov-ibc/src/rpc/context.rs | 12 +- 20 files changed, 977 insertions(+), 3322 deletions(-) delete mode 100644 clients/sov-celestia-cw/src/context/core_ctx.rs delete mode 100644 clients/sov-celestia/src/client_state.rs create mode 100644 clients/sov-celestia/src/client_state/common.rs create mode 100644 clients/sov-celestia/src/client_state/execution.rs create mode 100644 clients/sov-celestia/src/client_state/mod.rs create mode 100644 clients/sov-celestia/src/client_state/validation.rs diff --git a/Cargo.lock b/Cargo.lock index 4f4cc80d..d018cbac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,30 +2,13 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addchain" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" -dependencies = [ - "num-bigint 0.3.3", - "num-integer", - "num-traits", -] - [[package]] name = "addr2line" version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "cpp_demangle", - "fallible-iterator 0.3.0", "gimli 0.28.1", - "memmap2 0.5.10", - "object", - "rustc-demangle", - "smallvec", ] [[package]] @@ -67,16 +50,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alloy-rlp" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" -dependencies = [ - "arrayvec", - "bytes", -] - [[package]] name = "anstream" version = "0.6.11" @@ -131,240 +104,6 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-crypto-primitives" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3a13b34da09176a8baba701233fdffbaa7c1b1192ce031a3da4e55ce1f1a56" -dependencies = [ - "ark-ec", - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-snark", - "ark-std 0.4.0", - "blake2", - "derivative", - "digest 0.10.7", - "sha2 0.10.8", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint 0.4.4", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint 0.4.4", - "num-traits", - "paste", - "rustc_version 0.4.0", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint 0.4.4", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint 0.4.4", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-groth16" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ceafa83848c3e390f1cbf124bc3193b3e639b3f02009e0e290809a501b95fc" -dependencies = [ - "ark-crypto-primitives", - "ark-ec", - "ark-ff 0.4.2", - "ark-poly", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-relations" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" -dependencies = [ - "ark-ff 0.4.2", - "ark-std 0.4.0", - "tracing", - "tracing-subscriber 0.2.25", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint 0.4.4", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-snark" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d3cc6833a335bb8a600241889ead68ee89a3cf8448081fb7694c0fe503da63" -dependencies = [ - "ark-ff 0.4.2", - "ark-relations", - "ark-serialize 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -419,32 +158,12 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "auto_impl" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "autotools" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8da1805e028a172334c3b680f93e71126f2327622faef2ec3d893c0a4ad77" -dependencies = [ - "cc", -] - [[package]] name = "axum" version = "0.6.20" @@ -456,7 +175,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", + "http", "http-body", "hyper", "itoa", @@ -482,7 +201,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", + "http", "http-body", "mime", "rustversion", @@ -505,12 +224,6 @@ dependencies = [ "rustc-demangle", ] -[[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.2.0" @@ -535,56 +248,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "basecoin-app" -version = "0.1.0" -source = "git+https://github.com/informalsystems/basecoin-rs.git?rev=e668ec4#e668ec44a361f7c752ca12a20c1288ffa91bdd3f" -dependencies = [ - "base64 0.21.7", - "basecoin-store", - "clap", - "cosmrs", - "derive_more", - "displaydoc", - "ibc", - "ibc-proto", - "ibc-query", - "ics23", - "primitive-types", - "prost", - "serde", - "serde_derive", - "serde_json", - "sha2 0.10.8", - "sov-celestia-client 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", - "tendermint 0.34.0", - "tendermint-proto 0.34.0", - "tendermint-rpc", - "tokio", - "toml 0.8.10", - "tonic", - "tonic-reflection", - "tower", - "tower-abci", - "tracing", - "tracing-subscriber 0.3.18", -] - -[[package]] -name = "basecoin-store" -version = "0.1.0" -source = "git+https://github.com/informalsystems/basecoin-rs.git?rev=e668ec4#e668ec44a361f7c752ca12a20c1288ffa91bdd3f" -dependencies = [ - "displaydoc", - "ics23", - "prost", - "serde", - "serde_json", - "sha2 0.10.8", - "tendermint 0.34.0", - "tracing", -] - [[package]] name = "bcs" version = "0.1.6" @@ -640,22 +303,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "bip32" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" -dependencies = [ - "bs58", - "hmac", - "k256", - "rand_core 0.6.4", - "ripemd", - "sha2 0.10.8", - "subtle", - "zeroize", -] - [[package]] name = "bitflags" version = "1.3.2" @@ -726,17 +373,6 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" -[[package]] -name = "bonsai-sdk" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f0a6b186dce8b2f945bd3ecc5d35a36280400200ed57878c7c3f2aeb01632e" -dependencies = [ - "reqwest", - "serde", - "thiserror", -] - [[package]] name = "borsh" version = "0.10.3" @@ -783,15 +419,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "sha2 0.10.8", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -827,28 +454,8 @@ dependencies = [ ] [[package]] -name = "bytemuck" -version = "1.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "byteorder" -version = "1.5.0" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" @@ -882,56 +489,6 @@ dependencies = [ "libc", ] -[[package]] -name = "celestia-proto" -version = "0.1.0" -source = "git+https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6cd58213c0cbf79207ba549cef82764ddca" -dependencies = [ - "anyhow", - "prost", - "prost-build", - "prost-types", - "serde", - "tendermint-proto 0.32.0", -] - -[[package]] -name = "celestia-rpc" -version = "0.1.0" -source = "git+https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6cd58213c0cbf79207ba549cef82764ddca" -dependencies = [ - "async-trait", - "celestia-types", - "http 0.2.11", - "jsonrpsee", - "serde", - "thiserror", - "tracing", -] - -[[package]] -name = "celestia-types" -version = "0.1.0" -source = "git+https://github.com/eigerco/celestia-node-rs.git?rev=66b7c6c#66b7c6cd58213c0cbf79207ba549cef82764ddca" -dependencies = [ - "base64 0.21.7", - "bech32", - "bytes", - "celestia-proto", - "cid", - "const_format", - "enum_dispatch", - "getrandom", - "nmt-rs", - "ruint", - "serde", - "sha2 0.10.8", - "tendermint 0.32.0", - "tendermint-proto 0.32.0", - "thiserror", - "wasm-bindgen-test", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -947,19 +504,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cid" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" -dependencies = [ - "core2", - "multibase", - "multihash", - "serde", - "unsigned-varint", -] - [[package]] name = "clang-sys" version = "1.7.0" @@ -991,7 +535,6 @@ dependencies = [ "anstyle", "clap_lex", "strsim", - "terminal_size", ] [[package]] @@ -1024,47 +567,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - [[package]] name = "const-oid" version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const-rollup-config" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" - -[[package]] -name = "const_format" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1093,15 +601,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - [[package]] name = "corosensei" version = "0.1.4" @@ -1115,37 +614,6 @@ dependencies = [ "windows-sys 0.33.0", ] -[[package]] -name = "cosmos-sdk-proto" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto 0.34.0", -] - -[[package]] -name = "cosmrs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "k256", - "rand_core 0.6.4", - "serde", - "serde_json", - "signature", - "subtle-encoding", - "tendermint 0.34.0", - "thiserror", -] - [[package]] name = "cosmwasm-crypto" version = "1.5.2" @@ -1240,15 +708,6 @@ dependencies = [ "wasmer-middlewares", ] -[[package]] -name = "cpp_demangle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" -dependencies = [ - "cfg-if", -] - [[package]] name = "cpufeatures" version = "0.2.12" @@ -1425,34 +884,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "curve25519-dalek" -version = "4.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms", - "rustc_version 0.4.0", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "curve25519-dalek-ng" version = "4.1.1" @@ -1513,32 +944,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "data-encoding-macro" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" -dependencies = [ - "data-encoding", - "syn 1.0.109", -] - [[package]] name = "der" version = "0.7.8" @@ -1575,7 +980,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1600,27 +1005,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - [[package]] name = "displaydoc" version = "0.2.4" @@ -1632,26 +1016,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "downloader" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05213e96f184578b5f70105d4d0a644a168e99e12d7bea0b200c15d67b5c182" -dependencies = [ - "digest 0.10.7", - "futures", - "rand", - "reqwest", - "thiserror", - "tokio", -] - [[package]] name = "dyn-clone" version = "1.0.16" @@ -1705,7 +1069,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "serde", "signature", ] @@ -1722,28 +1085,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek 4.1.2", - "ed25519", - "rand_core 0.6.4", - "serde", - "sha2 0.10.8", - "subtle", - "zeroize", -] - [[package]] name = "ed25519-zebra" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek", "hashbrown 0.12.3", "hex", "rand_core 0.6.4", @@ -1758,12 +1106,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" -[[package]] -name = "elf" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445909572dbd556c457c849c4ca58623d84b27c8fff1e74b0b4227d8b90d17b" - [[package]] name = "elliptic-curve" version = "0.13.8" @@ -1783,15 +1125,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - [[package]] name = "enum-iterator" version = "0.7.0" @@ -1812,18 +1145,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "enum_dispatch" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "enumset" version = "1.1.3" @@ -1851,15 +1172,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388979d208a049ffdfb22fa33b9c81942215b940910bccfe258caeb25d125cb3" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.3.8" @@ -1892,64 +1204,22 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - [[package]] name = "fastrand" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - [[package]] name = "ff" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec", - "byteorder", - "ff_derive", "rand_core 0.6.4", "subtle", ] -[[package]] -name = "ff_derive" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" -dependencies = [ - "addchain", - "cfg-if", - "num-bigint 0.3.3", - "num-integer", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" - [[package]] name = "fixed-hash" version = "0.8.0" @@ -1962,22 +1232,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "flex-error" version = "0.4.4" @@ -2023,7 +1277,6 @@ checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -2047,18 +1300,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" +name = "futures-io" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" @@ -2141,10 +1383,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -2153,7 +1393,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ - "fallible-iterator 0.2.0", + "fallible-iterator", "indexmap 1.9.3", "stable_deref_trait", ] @@ -2163,10 +1403,6 @@ name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -dependencies = [ - "fallible-iterator 0.3.0", - "stable_deref_trait", -] [[package]] name = "glob" @@ -2184,7 +1420,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils", - "http 0.2.11", + "http", "js-sys", "pin-project", "serde", @@ -2262,11 +1498,11 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.11", + "http", "indexmap 2.2.3", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tracing", ] @@ -2294,16 +1530,6 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -[[package]] -name = "hdrhistogram" -version = "7.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" -dependencies = [ - "byteorder", - "num-traits", -] - [[package]] name = "heck" version = "0.4.1" @@ -2334,15 +1560,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "0.2.11" @@ -2354,17 +1571,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http-body" version = "0.4.6" @@ -2372,7 +1578,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http", "pin-project-lite", ] @@ -2388,12 +1594,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "human-repr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b778a5761513caf593693f8951c97a5b610841e754788400f32102eefdff1" - [[package]] name = "hyper" version = "0.14.28" @@ -2405,7 +1605,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.11", + "http", "http-body", "httparse", "httpdate", @@ -2425,7 +1625,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", + "http", "hyper", "log", "rustls", @@ -2449,7 +1649,7 @@ dependencies = [ [[package]] name = "ibc" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-apps", "ibc-clients", @@ -2459,40 +1659,10 @@ dependencies = [ "ibc-primitives", ] -[[package]] -name = "ibc-app-nft-transfer" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" -dependencies = [ - "ibc-app-nft-transfer-types", - "ibc-core", - "serde-json-wasm 1.0.1", -] - -[[package]] -name = "ibc-app-nft-transfer-types" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" -dependencies = [ - "base64 0.21.7", - "borsh", - "derive_more", - "displaydoc", - "http 1.1.0", - "ibc-core", - "ibc-proto", - "mime", - "parity-scale-codec", - "scale-info", - "schemars", - "serde", - "serde-json-wasm 1.0.1", -] - [[package]] name = "ibc-app-transfer" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-app-transfer-types", "ibc-core", @@ -2502,7 +1672,7 @@ dependencies = [ [[package]] name = "ibc-app-transfer-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2518,17 +1688,17 @@ dependencies = [ [[package]] name = "ibc-apps" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ - "ibc-app-nft-transfer", "ibc-app-transfer", ] [[package]] name = "ibc-client-tendermint" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ + "derive_more", "ibc-client-tendermint-types", "ibc-core-client", "ibc-core-commitment-types", @@ -2536,14 +1706,14 @@ dependencies = [ "ibc-core-host", "ibc-primitives", "serde", - "tendermint 0.34.0", + "tendermint", "tendermint-light-client-verifier", ] [[package]] name = "ibc-client-tendermint-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "displaydoc", "ibc-core-client-types", @@ -2552,15 +1722,15 @@ dependencies = [ "ibc-primitives", "ibc-proto", "serde", - "tendermint 0.34.0", + "tendermint", "tendermint-light-client-verifier", - "tendermint-proto 0.34.0", + "tendermint-proto", ] [[package]] name = "ibc-client-wasm-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "base64 0.21.7", "cosmwasm-schema", @@ -2575,7 +1745,7 @@ dependencies = [ [[package]] name = "ibc-clients" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-client-tendermint", "ibc-client-wasm-types", @@ -2584,7 +1754,7 @@ dependencies = [ [[package]] name = "ibc-core" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -2600,7 +1770,7 @@ dependencies = [ [[package]] name = "ibc-core-channel" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-core-channel-types", "ibc-core-client", @@ -2615,7 +1785,7 @@ dependencies = [ [[package]] name = "ibc-core-channel-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2626,19 +1796,17 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "parity-scale-codec", - "scale-info", "schemars", "serde", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-client" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-core-client-context", "ibc-core-client-types", @@ -2651,7 +1819,7 @@ dependencies = [ [[package]] name = "ibc-core-client-context" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "derive_more", "displaydoc", @@ -2661,13 +1829,13 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-client-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2676,18 +1844,16 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "parity-scale-codec", - "scale-info", "schemars", "serde", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-commitment-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2695,8 +1861,6 @@ dependencies = [ "ibc-primitives", "ibc-proto", "ics23", - "parity-scale-codec", - "scale-info", "schemars", "serde", "subtle-encoding", @@ -2705,7 +1869,7 @@ dependencies = [ [[package]] name = "ibc-core-connection" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-core-client", "ibc-core-connection-types", @@ -2717,7 +1881,7 @@ dependencies = [ [[package]] name = "ibc-core-connection-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2727,18 +1891,16 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "parity-scale-codec", - "scale-info", "schemars", "serde", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-handler" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "ibc-core-channel", "ibc-core-client", @@ -2753,7 +1915,7 @@ dependencies = [ [[package]] name = "ibc-core-handler-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2766,18 +1928,16 @@ dependencies = [ "ibc-core-router-types", "ibc-primitives", "ibc-proto", - "parity-scale-codec", - "scale-info", "schemars", "serde", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-host" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "derive_more", "displaydoc", @@ -2795,7 +1955,7 @@ dependencies = [ [[package]] name = "ibc-core-host-cosmos" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "derive_more", "displaydoc", @@ -2809,23 +1969,20 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "serde", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-core-host-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", "displaydoc", "ibc-primitives", - "parity-scale-codec", - "scale-info", "schemars", "serde", ] @@ -2833,7 +1990,7 @@ dependencies = [ [[package]] name = "ibc-core-router" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "derive_more", "displaydoc", @@ -2847,7 +2004,7 @@ dependencies = [ [[package]] name = "ibc-core-router-types" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", @@ -2855,18 +2012,16 @@ dependencies = [ "ibc-core-host-types", "ibc-primitives", "ibc-proto", - "parity-scale-codec", - "scale-info", "schemars", "serde", "subtle-encoding", - "tendermint 0.34.0", + "tendermint", ] [[package]] name = "ibc-derive" version = "0.6.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "proc-macro2", "quote", @@ -2876,18 +2031,16 @@ dependencies = [ [[package]] name = "ibc-primitives" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "borsh", "derive_more", "displaydoc", "ibc-proto", - "parity-scale-codec", "prost", - "scale-info", "schemars", "serde", - "tendermint 0.34.0", + "tendermint", "time", ] @@ -2902,20 +2055,18 @@ dependencies = [ "flex-error", "ics23", "informalsystems-pbjson", - "parity-scale-codec", "prost", - "scale-info", "schemars", "serde", "subtle-encoding", - "tendermint-proto 0.34.0", + "tendermint-proto", "tonic", ] [[package]] name = "ibc-query" version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" +source = "git+https://github.com/cosmos/ibc-rs.git?rev=4463366e65#4463366e651c0d88dd2fc2923a1b6fff489cae3e" dependencies = [ "displaydoc", "ibc", @@ -2923,23 +2074,6 @@ dependencies = [ "tonic", ] -[[package]] -name = "ibc-testkit" -version = "0.50.0" -source = "git+https://github.com/cosmos/ibc-rs.git?rev=552863ec93#552863ec9323f13708a754d5bfce4f06bd3a0382" -dependencies = [ - "derive_more", - "displaydoc", - "ibc", - "ibc-proto", - "parking_lot", - "subtle-encoding", - "tendermint 0.34.0", - "tendermint-testgen", - "tracing", - "typed-builder", -] - [[package]] name = "ics23" version = "0.11.1" @@ -3040,30 +2174,6 @@ dependencies = [ "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "inventory" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767" - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - [[package]] name = "itertools" version = "0.10.5" @@ -3101,7 +2211,7 @@ dependencies = [ "ics23", "itertools 0.10.5", "mirai-annotations", - "num-derive 0.3.3", + "num-derive", "num-traits", "serde", "sha2 0.10.8", @@ -3154,7 +2264,7 @@ dependencies = [ "futures-channel", "futures-util", "gloo-net", - "http 0.2.11", + "http", "jsonrpsee-core", "pin-project", "rustls-native-certs", @@ -3162,7 +2272,7 @@ dependencies = [ "thiserror", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util", "tracing", "url", "webpki-roots", @@ -3234,7 +2344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" dependencies = [ "futures-util", - "http 0.2.11", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", @@ -3245,7 +2355,7 @@ dependencies = [ "thiserror", "tokio", "tokio-stream", - "tokio-util 0.7.10", + "tokio-util", "tower", "tracing", ] @@ -3281,7 +2391,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" dependencies = [ - "http 0.2.11", + "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -3311,29 +2421,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "lazy-regex" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d12be4595afdf58bd19e4a9f4e24187da2a66700786ff660a418e9059937a4c" -dependencies = [ - "lazy-regex-proc_macros", - "once_cell", - "regex", -] - -[[package]] -name = "lazy-regex-proc_macros" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bcd58e6c97a7fcbaffcdc95728b393b8d98933bfadad49ed4097845b57ef0b" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn 2.0.48", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -3374,17 +2461,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.2", - "libc", - "redox_syscall", -] - [[package]] name = "librocksdb-sys" version = "0.11.0+8.1.1" @@ -3468,16 +2544,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" -[[package]] -name = "matrixmultiply" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" -dependencies = [ - "autocfg", - "rawpointer", -] - [[package]] name = "memchr" version = "2.7.1" @@ -3555,73 +2621,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" -[[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.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" -dependencies = [ - "core2", - "multihash-derive", - "unsigned-varint", -] - -[[package]] -name = "multihash-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", - "rayon", -] - -[[package]] -name = "nmt-rs" -version = "0.1.0" -source = "git+https://github.com/Sovereign-Labs/nmt-rs.git?rev=d821332#d821332baa03aea625d23060dc239af57b9121f5" -dependencies = [ - "borsh", - "bytes", - "serde", - "sha2 0.10.8", -] - [[package]] name = "nom" version = "7.1.3" @@ -3632,47 +2631,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" -dependencies = [ - "num-traits", -] - [[package]] name = "num-derive" version = "0.3.3" @@ -3684,26 +2642,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.18" @@ -3730,9 +2668,7 @@ version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ - "flate2", "memchr", - "ruzstd", ] [[package]] @@ -3753,18 +2689,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parity-scale-codec" version = "3.6.9" @@ -3827,88 +2751,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] -name = "peg" -version = "0.7.0" +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ - "peg-macros", - "peg-runtime", + "pin-project-internal", ] [[package]] -name = "peg-macros" -version = "0.7.0" +name = "pin-project-internal" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ - "peg-runtime", "proc-macro2", "quote", + "syn 2.0.48", ] [[package]] -name = "peg-runtime" -version = "0.7.0" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.2.3", -] - -[[package]] -name = "pin-project" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" @@ -3928,12 +2804,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "platforms" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -3968,7 +2838,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml 0.5.11", + "toml", ] [[package]] @@ -3978,7 +2848,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", - "toml 0.5.11", + "toml", ] [[package]] @@ -3987,7 +2857,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_edit 0.20.7", + "toml_edit", ] [[package]] @@ -4063,28 +2933,6 @@ dependencies = [ "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" -dependencies = [ - "bytes", - "heck", - "itertools 0.11.0", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost", - "prost-types", - "regex", - "syn 2.0.48", - "tempfile", - "which", -] - [[package]] name = "prost-derive" version = "0.12.3" @@ -4107,15 +2955,6 @@ dependencies = [ "prost", ] -[[package]] -name = "protobuf-src" -version = "1.1.0+21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1" -dependencies = [ - "autotools", -] - [[package]] name = "ptr_meta" version = "0.1.4" @@ -4196,12 +3035,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - [[package]] name = "rayon" version = "1.8.1" @@ -4231,17 +3064,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - [[package]] name = "regalloc2" version = "0.5.1" @@ -4319,48 +3141,6 @@ dependencies = [ "bytecheck", ] -[[package]] -name = "reqwest" -version = "0.11.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.11", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -4395,446 +3175,146 @@ dependencies = [ ] [[package]] -name = "risc0-binfmt" -version = "0.20.1" +name = "rkyv" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d263c6370d7714d2a634b6d88deb3871d0fad1f9486a9da6d48139c1ac85b26" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ - "anyhow", - "elf", - "risc0-zkp", - "risc0-zkvm-platform", - "serde", - "tracing", + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", ] [[package]] -name = "risc0-build-kernel" -version = "0.20.1" +name = "rkyv_derive" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa4cd0e10797e933d0e2056e24e5b15cc0bb324d5dfd44e145048a0029f7af5" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ - "cc", - "directories", - "hex", - "sha2 0.10.8", - "tempfile", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "risc0-circuit-recursion" -version = "0.20.1" +name = "rocksdb" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9835069929a0e7b6b4b34e6a83f08aaa9d34b30023b9ccaf96ddbe20404eba" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ - "anyhow", - "bytemuck", - "downloader", - "hex", - "rand", - "rayon", - "risc0-circuit-recursion-sys", - "risc0-core", - "risc0-zkp", - "sha2 0.10.8", - "tracing", - "zip", + "libc", + "librocksdb-sys", ] [[package]] -name = "risc0-circuit-recursion-sys" -version = "0.20.1" +name = "route-recognizer" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12fa422928ccae0ca6d39a3bdb784e417c65813f004b258f2113609095358ba" -dependencies = [ - "glob", - "risc0-build-kernel", - "risc0-core", -] +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] -name = "risc0-circuit-rv32im" -version = "0.20.1" +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb1caa759ab74d08779e062fcf98f5bd34397dfde572516a52369f0ec46db650" -dependencies = [ - "anyhow", - "rand", - "rayon", - "risc0-circuit-rv32im-sys", - "risc0-core", - "risc0-zkp", - "risc0-zkvm-platform", - "tracing", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "risc0-circuit-rv32im-sys" -version = "0.20.1" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a88e4b25e30eeb49adab83fe014110bec18e69dd63a47a5f36b00ac48fe373" -dependencies = [ - "glob", - "risc0-build-kernel", - "risc0-core", -] +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] -name = "risc0-core" -version = "0.20.1" +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be79c89bcd18886b376073e3da22f8b7963247a42dce7b49cf3d09853f51641e" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "bytemuck", - "rand_core 0.6.4", + "semver", ] [[package]] -name = "risc0-cycle-utils" -version = "0.3.0" -source = "git+https://github.com/Sovereign-Labs/risc0-cycle-macros.git?rev=98948b8ee0e3edffcee7f3bd95a9d93c5c0941af#98948b8ee0e3edffcee7f3bd95a9d93c5c0941af" +name = "rustix" +version = "0.38.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bytes", - "risc0-zkvm", - "risc0-zkvm-platform", + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] -name = "risc0-sys" -version = "0.20.1" +name = "rustls" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c40caeacec542a0187e44203dd90501edcecf194cad648d590f6b2b0e4e4e5b" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "cc", - "risc0-build-kernel", + "log", + "ring", + "rustls-webpki", + "sct", ] [[package]] -name = "risc0-zkp" -version = "0.20.1" +name = "rustls-native-certs" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e20a57e04840a5afadebb5d232546245f4fd8bd0e774bd69bf4bf25f8ab90c04" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ - "anyhow", - "blake2", - "bytemuck", - "digest 0.10.7", - "ff", - "hex", - "lazy_static", - "ndarray", - "paste", - "rand", - "rand_core 0.6.4", - "rayon", - "risc0-core", - "risc0-sys", - "risc0-zkvm-platform", - "serde", - "sha2 0.10.8", - "tracing", + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", ] [[package]] -name = "risc0-zkvm" -version = "0.20.1" +name = "rustls-pemfile" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922588cb4b884b3951316a65581ccdfd1174af93c54093190878366812073329" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "addr2line", - "anyhow", - "ark-bn254", - "ark-groth16", - "ark-serialize 0.4.2", - "bincode", - "bonsai-sdk", - "bytemuck", - "bytes", - "cfg-if", - "crypto-bigint", - "elf", - "getrandom", - "hex", - "human-repr", - "lazy-regex", - "num-bigint 0.4.4", - "num-derive 0.4.2", - "num-traits", - "prost", - "prost-build", - "protobuf-src", - "rayon", - "risc0-binfmt", - "risc0-circuit-recursion", - "risc0-circuit-rv32im", - "risc0-core", - "risc0-zkp", - "risc0-zkvm-platform", - "rrs-lib", - "rustc-demangle", - "semver 1.0.21", - "serde", - "sha2 0.10.8", - "tempfile", - "tracing", - "typetag", + "base64 0.21.7", ] [[package]] -name = "risc0-zkvm-platform" -version = "0.20.1" +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5819c0c3bfd8f20b1226c9d4ca1f342eb3d8385e71211a9383a879643d1dde" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "bytemuck", - "getrandom", - "libm", + "ring", + "untrusted", ] [[package]] -name = "rkyv" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" -dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid 1.7.0", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "route-recognizer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" - -[[package]] -name = "rrs-lib" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4382d3af3a4ebdae7f64ba6edd9114fff92c89808004c4943b393377a25d001" -dependencies = [ - "downcast-rs", - "paste", -] - -[[package]] -name = "ruint" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b1d9521f889713d1221270fdd63370feca7e5c71a18745343402fa86e4f04f" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint 0.4.4", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.21", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.14" +name = "rustversion" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "ruzstd" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" -dependencies = [ - "byteorder", - "derive_more", - "twox-hash", -] - [[package]] name = "ryu" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "schannel" version = "0.1.23" @@ -4868,12 +3348,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -4939,30 +3413,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" -[[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" @@ -5060,27 +3516,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "sha-1" version = "0.9.8" @@ -5224,7 +3659,7 @@ dependencies = [ "base64 0.13.1", "bytes", "futures", - "http 0.2.11", + "http", "httparse", "log", "rand", @@ -5249,92 +3684,26 @@ dependencies = [ ] [[package]] -name = "sov-blob-storage" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" +name = "sov-celestia-client" +version = "0.1.0" dependencies = [ - "anyhow", - "bincode", - "borsh", - "clap", - "hex", - "jsonrpsee", + "derive_more", + "ibc-client-tendermint", + "ibc-core", + "ics23", + "prost", "schemars", "serde", - "serde_json", - "sov-chain-state", - "sov-modules-api", - "sov-sequencer-registry", - "sov-state", - "tracing", + "sov-celestia-client-types", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "typed-builder", ] [[package]] -name = "sov-celestia-adapter" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "async-trait", - "bech32", - "borsh", - "celestia-proto", - "celestia-rpc", - "celestia-types", - "futures", - "hex", - "jsonrpsee", - "nmt-rs", - "prost", - "serde", - "serde_json", - "sha2 0.10.8", - "sov-rollup-interface", - "tendermint 0.32.0", - "tendermint-proto 0.32.0", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "sov-celestia-client" -version = "0.1.0" -dependencies = [ - "derive_more", - "ibc-client-tendermint", - "ibc-core", - "ics23", - "prost", - "schemars", - "serde", - "sov-celestia-client-types 0.1.0", - "tendermint 0.34.0", - "tendermint-light-client-verifier", - "tendermint-proto 0.34.0", - "typed-builder", -] - -[[package]] -name = "sov-celestia-client" -version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048#3fe4048d18e653c941fc74b95087e2afd2b15200" -dependencies = [ - "derive_more", - "ibc-client-tendermint", - "ibc-core", - "ics23", - "prost", - "serde", - "sov-celestia-client-types 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", - "tendermint 0.34.0", - "tendermint-light-client-verifier", - "tendermint-proto 0.34.0", -] - -[[package]] -name = "sov-celestia-client-cw" -version = "0.1.0" +name = "sov-celestia-client-cw" +version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -5345,11 +3714,11 @@ dependencies = [ "ibc-core", "prost", "serde", - "sov-celestia-client 0.1.0", + "sov-celestia-client", "tendermint-testgen", "test-log", "thiserror", - "tracing-subscriber 0.3.18", + "tracing-subscriber", ] [[package]] @@ -5368,31 +3737,9 @@ dependencies = [ "prost", "schemars", "serde", - "tendermint 0.34.0", + "tendermint", "tendermint-light-client-verifier", - "tendermint-proto 0.34.0", - "typed-builder", -] - -[[package]] -name = "sov-celestia-client-types" -version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048#3fe4048d18e653c941fc74b95087e2afd2b15200" -dependencies = [ - "base64 0.21.7", - "bytes", - "derive_more", - "hex", - "ibc-client-tendermint", - "ibc-client-wasm-types", - "ibc-core", - "ibc-proto", - "ics23", - "prost", - "serde", - "tendermint 0.34.0", - "tendermint-light-client-verifier", - "tendermint-proto 0.34.0", + "tendermint-proto", "typed-builder", ] @@ -5449,39 +3796,9 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "sov-celestia-client 0.1.0", - "sov-chain-state", - "sov-ibc-transfer 0.1.0", - "sov-modules-api", - "sov-rollup-interface", - "sov-state", - "thiserror", - "time", -] - -[[package]] -name = "sov-ibc" -version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048#3fe4048d18e653c941fc74b95087e2afd2b15200" -dependencies = [ - "ahash 0.8.6", - "anyhow", - "base64 0.21.7", - "borsh", - "derive_more", - "ibc-app-transfer", - "ibc-client-tendermint", - "ibc-core", - "ibc-query", - "jsonrpsee", - "prost", - "schemars", - "serde", - "serde_json", - "sha2 0.10.8", - "sov-celestia-client 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", + "sov-celestia-client", "sov-chain-state", - "sov-ibc-transfer 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", + "sov-ibc-transfer", "sov-modules-api", "sov-rollup-interface", "sov-state", @@ -5489,55 +3806,6 @@ dependencies = [ "time", ] -[[package]] -name = "sov-ibc-mocks" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "base64 0.21.7", - "basecoin-app", - "basecoin-store", - "borsh", - "const-rollup-config", - "ibc-app-transfer", - "ibc-client-tendermint", - "ibc-core", - "ibc-core-host-cosmos", - "ibc-query", - "ibc-testkit", - "jmt", - "prost", - "serde", - "serde_json", - "sha2 0.10.8", - "sov-bank", - "sov-celestia-adapter", - "sov-celestia-client 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", - "sov-chain-state", - "sov-ibc 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", - "sov-ibc-transfer 0.1.0 (git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048)", - "sov-mock-da", - "sov-mock-zkvm", - "sov-modules-api", - "sov-modules-stf-blueprint", - "sov-prover-storage-manager", - "sov-rollup-interface", - "sov-schema-db", - "sov-state", - "tempfile", - "tendermint 0.34.0", - "tendermint-testgen", - "test-log", - "tokio", - "toml 0.8.10", - "tower", - "tower-abci", - "tracing", - "tracing-subscriber 0.3.18", - "typed-builder", -] - [[package]] name = "sov-ibc-transfer" version = "0.1.0" @@ -5559,64 +3827,6 @@ dependencies = [ "uint", ] -[[package]] -name = "sov-ibc-transfer" -version = "0.1.0" -source = "git+https://github.com/informalsystems/sovereign-ibc.git?rev=3fe4048#3fe4048d18e653c941fc74b95087e2afd2b15200" -dependencies = [ - "anyhow", - "base64 0.21.7", - "borsh", - "ibc-app-transfer", - "ibc-core", - "jsonrpsee", - "prost", - "schemars", - "serde", - "serde_json", - "sov-bank", - "sov-modules-api", - "sov-rollup-interface", - "thiserror", - "uint", -] - -[[package]] -name = "sov-mock-da" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "async-trait", - "borsh", - "bytes", - "futures", - "hex", - "serde", - "sha2 0.10.8", - "sov-rollup-interface", - "tokio", -] - -[[package]] -name = "sov-mock-zkvm" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "bincode", - "borsh", - "ed25519-dalek", - "hex", - "rand", - "schemars", - "serde", - "sha2 0.10.8", - "sov-modules-api", - "sov-rollup-interface", - "thiserror", -] - [[package]] name = "sov-modules-api" version = "0.3.0" @@ -5678,39 +3888,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sov-modules-stf-blueprint" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "borsh", - "hex", - "jsonrpsee", - "serde", - "sov-blob-storage", - "sov-chain-state", - "sov-modules-api", - "sov-modules-core", - "sov-rollup-interface", - "sov-state", - "thiserror", - "tracing", -] - -[[package]] -name = "sov-prover-storage-manager" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "sov-db", - "sov-rollup-interface", - "sov-schema-db", - "sov-state", - "tracing", -] - [[package]] name = "sov-rollup-interface" version = "0.3.0" @@ -5737,7 +3914,6 @@ version = "0.3.0" source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" dependencies = [ "anyhow", - "byteorder", "once_cell", "prometheus", "rocksdb", @@ -5745,24 +3921,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "sov-sequencer-registry" -version = "0.3.0" -source = "git+ssh://git@github.com/informalsystems/sovereign-sdk-wip.git?rev=5a144d60#5a144d60eefaf9ce166bbfd66324b959aa4ae82b" -dependencies = [ - "anyhow", - "borsh", - "clap", - "jsonrpsee", - "risc0-cycle-utils", - "schemars", - "serde", - "serde_json", - "sov-bank", - "sov-modules-api", - "sov-state", -] - [[package]] name = "sov-state" version = "0.3.0" @@ -5866,90 +4024,28 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "target-lexicon" -version = "0.12.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" - -[[package]] -name = "tempfile" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "tendermint" -version = "0.32.0" -source = "git+https://github.com/eigerco/celestia-tendermint-rs.git?rev=ef58b85#ef58b85e3e8b35b0f94b822d3996613539dcddd7" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "instant", - "num-traits", - "once_cell", - "prost", - "prost-types", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.32.0", - "time", - "zeroize", +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "target-lexicon" +version = "0.12.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" + +[[package]] +name = "tempfile" +version = "3.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -5964,12 +4060,10 @@ dependencies = [ "ed25519-consensus", "flex-error", "futures", - "k256", "num-traits", "once_cell", "prost", "prost-types", - "ripemd", "serde", "serde_bytes", "serde_json", @@ -5978,25 +4072,11 @@ dependencies = [ "signature", "subtle", "subtle-encoding", - "tendermint-proto 0.34.0", + "tendermint-proto", "time", "zeroize", ] -[[package]] -name = "tendermint-config" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a25dbe8b953e80f3d61789fbdb83bf9ad6c0ef16df5ca6546f49912542cc137" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint 0.34.0", - "toml 0.5.11", - "url", -] - [[package]] name = "tendermint-light-client-verifier" version = "0.34.0" @@ -6006,24 +4086,7 @@ dependencies = [ "derive_more", "flex-error", "serde", - "tendermint 0.34.0", - "time", -] - -[[package]] -name = "tendermint-proto" -version = "0.32.0" -source = "git+https://github.com/eigerco/celestia-tendermint-rs.git?rev=ef58b85#ef58b85e3e8b35b0f94b822d3996613539dcddd7" -dependencies = [ - "bytes", - "flex-error", - "num-derive 0.3.3", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", + "tendermint", "time", ] @@ -6035,7 +4098,7 @@ checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" dependencies = [ "bytes", "flex-error", - "num-derive 0.3.3", + "num-derive", "num-traits", "prost", "prost-types", @@ -6045,38 +4108,6 @@ dependencies = [ "time", ] -[[package]] -name = "tendermint-rpc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbf0a4753b46a190f367337e0163d0b552a2674a6bac54e74f9f2cdcde2969b" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom", - "peg", - "pin-project", - "reqwest", - "semver 1.0.21", - "serde", - "serde_bytes", - "serde_json", - "subtle", - "subtle-encoding", - "tendermint 0.34.0", - "tendermint-config", - "tendermint-proto 0.34.0", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid 0.8.2", - "walkdir", -] - [[package]] name = "tendermint-testgen" version = "0.34.0" @@ -6089,20 +4120,10 @@ dependencies = [ "serde_json", "simple-error", "tempfile", - "tendermint 0.34.0", + "tendermint", "time", ] -[[package]] -name = "terminal_size" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -dependencies = [ - "rustix", - "windows-sys 0.48.0", -] - [[package]] name = "test-log" version = "0.2.14" @@ -6110,7 +4131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6159ab4116165c99fc88cce31f99fa2c9dbe08d3691cb38da02fc3b45f357d2b" dependencies = [ "test-log-macros", - "tracing-subscriber 0.3.18", + "tracing-subscriber", ] [[package]] @@ -6257,20 +4278,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-util" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.7.10" @@ -6295,26 +4302,11 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.6", -] - [[package]] name = "toml_datetime" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -6324,20 +4316,7 @@ checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.2.3", "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" -dependencies = [ - "indexmap 2.2.3", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.5", + "winnow", ] [[package]] @@ -6352,7 +4331,7 @@ dependencies = [ "base64 0.21.7", "bytes", "h2", - "http 0.2.11", + "http", "http-body", "hyper", "hyper-timeout", @@ -6367,19 +4346,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tonic-reflection" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa37c513df1339d197f4ba21d28c918b9ef1ac1768265f11ecb6b7f1cba1b76" -dependencies = [ - "prost", - "prost-types", - "tokio", - "tokio-stream", - "tonic", -] - [[package]] name = "tower" version = "0.4.13" @@ -6388,38 +4354,18 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "hdrhistogram", "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util", "tower-layer", "tower-service", "tracing", ] -[[package]] -name = "tower-abci" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4826f3df3e9a37083d978cae73f020bcdf6143956b7dfc1bd6050b4e16367c" -dependencies = [ - "bytes", - "futures", - "pin-project", - "prost", - "tendermint 0.34.0", - "tendermint-proto 0.34.0", - "tokio", - "tokio-stream", - "tokio-util 0.6.10", - "tower", - "tracing", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -6462,27 +4408,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" -dependencies = [ - "tracing-core", ] [[package]] @@ -6492,15 +4417,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", - "nu-ansi-term", "once_cell", "regex", "sharded-slab", - "smallvec", "thread_local", "tracing", "tracing-core", - "tracing-log", ] [[package]] @@ -6509,16 +4431,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - [[package]] name = "typed-builder" version = "0.18.1" @@ -6545,36 +4457,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "typetag" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661d18414ec032a49ece2d56eee03636e43c4e8d577047ab334c0ba892e29aaf" -dependencies = [ - "erased-serde", - "inventory", - "once_cell", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac73887f47b9312552aa90ef477927ff014d63d1920ca8037c6c1951eab64bb1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - [[package]] name = "uint" version = "0.9.5" @@ -6614,18 +4496,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "unsigned-varint" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" - [[package]] name = "untrusted" version = "0.9.0" @@ -6649,24 +4519,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - [[package]] name = "uuid" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "vcpkg" version = "0.2.15" @@ -6679,16 +4537,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -6793,31 +4641,6 @@ version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" -[[package]] -name = "wasm-bindgen-test" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143ddeb4f833e2ed0d252e618986e18bfc7b0e52f2d28d77d05b2f045dd8eb61" -dependencies = [ - "console_error_panic_hook", - "js-sys", - "scoped-tls", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "wasmer" version = "4.2.2" @@ -7005,18 +4828,6 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -7033,15 +4844,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7232,25 +5034,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wyz" version = "0.5.1" @@ -7300,18 +5083,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "flate2", -] - [[package]] name = "zstd-sys" version = "2.0.9+zstd.1.5.5" diff --git a/Cargo.toml b/Cargo.toml index 79f35b5e..4de70fdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ "clients/sov-celestia-cw", "modules/sov-ibc-transfer", "modules/sov-ibc", - "mocks", + # "mocks", ] exclude = [ @@ -40,15 +40,15 @@ tempfile = "3.5" thiserror = "1.0.38" # ibc depedenencies -ibc-core = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false, features = ["borsh","schema","serde"] } -ibc-core-client = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-core-host-cosmos = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-client-tendermint = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-client-wasm-types = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-app-transfer = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } -ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } +ibc-core = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false, features = ["borsh","schema","serde"] } +ibc-core-client = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-core-host-cosmos = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-client-tendermint = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-client-wasm-types = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-app-transfer = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-primitives = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-query = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } +ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "4463366e65", default-features = false } ibc-proto = { git = "https://github.com/cosmos/ibc-proto-rs.git", rev = "1b1d7a9", default-features = false } # cosmos dependencies diff --git a/clients/sov-celestia-cw/src/context/client_ctx.rs b/clients/sov-celestia-cw/src/context/client_ctx.rs index bb00f24c..f85da6ec 100644 --- a/clients/sov-celestia-cw/src/context/client_ctx.rs +++ b/clients/sov-celestia-cw/src/context/client_ctx.rs @@ -1,3 +1,4 @@ +use ibc_client_wasm_types::client_state::ClientState as WasmClientState; use ibc_client_wasm_types::consensus_state::ConsensusState as WasmConsensusState; use ibc_core::client::context::{ClientExecutionContext, ClientValidationContext}; use ibc_core::client::types::error::ClientError; @@ -5,17 +6,51 @@ use ibc_core::client::types::Height; use ibc_core::handler::types::error::ContextError; use ibc_core::host::types::identifiers::ClientId; use ibc_core::host::types::path::{iteration_key, ClientConsensusStatePath, ClientStatePath}; -use ibc_core::host::ValidationContext; -use ibc_core::primitives::proto::Any; +use ibc_core::primitives::proto::{Any, Protobuf}; use ibc_core::primitives::Timestamp; use prost::Message; use sov_celestia_client::client_state::ClientState; +use sov_celestia_client::types::client_state::SovTmClientState; +use sov_celestia_client::types::consensus_state::SovTmConsensusState; use super::Context; use crate::types::AnyConsensusState; impl ClientValidationContext for Context<'_> { - fn update_meta( + type ClientStateRef = ClientState; + type ConsensusStateRef = AnyConsensusState; + + fn client_state(&self, _client_id: &ClientId) -> Result { + let client_state_value = self.retrieve(ClientStatePath::leaf())?; + + let any_wasm: WasmClientState = Protobuf::::decode(client_state_value.as_slice()) + .map_err(|e| ClientError::Other { + description: e.to_string(), + })?; + + let sov_client_state = SovTmClientState::decode_thru_any(any_wasm.data)?; + + Ok(sov_client_state.into()) + } + + fn consensus_state( + &self, + client_cons_state_path: &ClientConsensusStatePath, + ) -> Result { + let consensus_state_value = self.retrieve(client_cons_state_path.leaf())?; + let any_wasm: WasmConsensusState = + Protobuf::::decode(consensus_state_value.as_slice()).map_err(|e| { + ClientError::Other { + description: e.to_string(), + } + })?; + + let consensus_state = SovTmConsensusState::decode_thru_any(any_wasm.data)?; + + Ok(AnyConsensusState::Sovereign(consensus_state.into())) + } + + fn client_update_meta( &self, _client_id: &ClientId, height: &Height, @@ -43,9 +78,7 @@ impl ClientValidationContext for Context<'_> { } impl ClientExecutionContext for Context<'_> { - type V = ::V; - type AnyClientState = ::AnyClientState; - type AnyConsensusState = ::AnyConsensusState; + type ClientStateMut = ClientState; fn store_client_state( &mut self, diff --git a/clients/sov-celestia-cw/src/context/core_ctx.rs b/clients/sov-celestia-cw/src/context/core_ctx.rs deleted file mode 100644 index 3652e6f9..00000000 --- a/clients/sov-celestia-cw/src/context/core_ctx.rs +++ /dev/null @@ -1,296 +0,0 @@ -use std::time::Duration; - -use ibc_client_wasm_types::client_state::ClientState as WasmClientState; -use ibc_client_wasm_types::consensus_state::ConsensusState as WasmConsensusState; -use ibc_core::channel::types::channel::ChannelEnd; -use ibc_core::channel::types::commitment::{AcknowledgementCommitment, PacketCommitment}; -use ibc_core::channel::types::packet::Receipt; -use ibc_core::client::types::error::ClientError; -use ibc_core::client::types::Height; -use ibc_core::commitment_types::commitment::CommitmentPrefix; -use ibc_core::connection::types::ConnectionEnd; -use ibc_core::handler::types::error::ContextError; -use ibc_core::handler::types::events::IbcEvent; -use ibc_core::host::types::identifiers::{ClientId, ConnectionId, Sequence}; -use ibc_core::host::types::path::{ - AckPath, ChannelEndPath, ClientConnectionPath, ClientConsensusStatePath, ClientStatePath, - CommitmentPath, ConnectionPath, ReceiptPath, SeqAckPath, SeqRecvPath, SeqSendPath, -}; -use ibc_core::host::{ExecutionContext, ValidationContext}; -use ibc_core::primitives::proto::{Any, Protobuf}; -use ibc_core::primitives::{Signer, Timestamp}; -use sov_celestia_client::client_state::ClientState; -use sov_celestia_client::types::client_state::{ - SovTmClientState, SOV_TENDERMINT_CLIENT_STATE_TYPE_URL, -}; -use sov_celestia_client::types::consensus_state::SovTmConsensusState; -use sov_celestia_client::types::proto::v1::ClientState as RawClientState; - -use super::Context; -use crate::types::AnyConsensusState; - -impl ValidationContext for Context<'_> { - type V = Self; - type E = Self; - type AnyConsensusState = AnyConsensusState; - type AnyClientState = ClientState; - - fn get_client_validation_context(&self) -> &Self::V { - self - } - - fn client_state(&self, _client_id: &ClientId) -> Result { - let client_state_value = self.retrieve(ClientStatePath::leaf())?; - - let any_wasm: WasmClientState = Protobuf::::decode(client_state_value.as_slice()) - .map_err(|e| ClientError::Other { - description: e.to_string(), - })?; - - let sov_client_state = SovTmClientState::decode_thru_any(any_wasm.data)?; - - Ok(sov_client_state.into()) - } - - fn decode_client_state(&self, client_state: Any) -> Result { - match client_state.type_url.as_str() { - SOV_TENDERMINT_CLIENT_STATE_TYPE_URL => { - let sov_client_state = Protobuf::::decode( - client_state.value.as_slice(), - ) - .map_err(|e| ClientError::Other { - description: e.to_string(), - })?; - - Ok(sov_client_state) - } - _ => Err(ClientError::Other { - description: "Client state type not supported".to_string(), - } - .into()), - } - } - - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result { - let consensus_state_value = self.retrieve(client_cons_state_path.leaf())?; - let any_wasm: WasmConsensusState = - Protobuf::::decode(consensus_state_value.as_slice()).map_err(|e| { - ClientError::Other { - description: e.to_string(), - } - })?; - - let consensus_state = SovTmConsensusState::decode_thru_any(any_wasm.data)?; - - Ok(AnyConsensusState::Sovereign(consensus_state.into())) - } - - fn host_height(&self) -> Result { - let host_height = Height::new(0, self.env().block.height)?; - - Ok(host_height) - } - - fn host_timestamp(&self) -> Result { - let time = self.env().block.time; - - let host_timestamp = Timestamp::from_nanoseconds(time.nanos()).expect("invalid timestamp"); - - Ok(host_timestamp) - } - - fn host_consensus_state( - &self, - _height: &Height, - ) -> Result { - unimplemented!() - } - - fn client_counter(&self) -> Result { - unimplemented!() - } - - fn connection_end(&self, _conn_id: &ConnectionId) -> Result { - unimplemented!() - } - - fn validate_self_client( - &self, - _client_state_of_host_on_counterparty: Any, - ) -> Result<(), ContextError> { - Ok(()) - } - - fn commitment_prefix(&self) -> CommitmentPrefix { - unimplemented!() - } - - fn connection_counter(&self) -> Result { - unimplemented!() - } - - fn channel_end(&self, _channel_end_path: &ChannelEndPath) -> Result { - unimplemented!() - } - - fn get_next_sequence_send( - &self, - _seq_send_path: &SeqSendPath, - ) -> Result { - unimplemented!() - } - - fn get_next_sequence_recv( - &self, - _seq_recv_path: &SeqRecvPath, - ) -> Result { - unimplemented!() - } - - fn get_next_sequence_ack(&self, _seq_ack_path: &SeqAckPath) -> Result { - unimplemented!() - } - - fn get_packet_commitment( - &self, - _commitment_path: &CommitmentPath, - ) -> Result { - unimplemented!() - } - - fn get_packet_receipt(&self, _receipt_path: &ReceiptPath) -> Result { - unimplemented!() - } - - fn get_packet_acknowledgement( - &self, - _ack_path: &AckPath, - ) -> Result { - unimplemented!() - } - - fn channel_counter(&self) -> Result { - unimplemented!() - } - - fn max_expected_time_per_block(&self) -> Duration { - // This effectively cancels the check on connection block delays. - Duration::ZERO - } - - fn validate_message_signer(&self, _signer: &Signer) -> Result<(), ContextError> { - Ok(()) - } -} - -impl ExecutionContext for Context<'_> { - fn get_client_execution_context(&mut self) -> &mut Self::E { - todo!() - } - - fn increase_client_counter(&mut self) -> Result<(), ContextError> { - todo!() - } - - fn store_connection( - &mut self, - _connection_path: &ConnectionPath, - _connection_end: ConnectionEnd, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_connection_to_client( - &mut self, - _client_connection_path: &ClientConnectionPath, - _conn_id: ConnectionId, - ) -> Result<(), ContextError> { - todo!() - } - - fn increase_connection_counter(&mut self) -> Result<(), ContextError> { - todo!() - } - - fn store_packet_commitment( - &mut self, - _commitment_path: &CommitmentPath, - _commitment: PacketCommitment, - ) -> Result<(), ContextError> { - todo!() - } - - fn delete_packet_commitment( - &mut self, - _commitment_path: &CommitmentPath, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_packet_receipt( - &mut self, - _receipt_path: &ReceiptPath, - _receipt: Receipt, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_packet_acknowledgement( - &mut self, - _ack_path: &AckPath, - _ack_commitment: AcknowledgementCommitment, - ) -> Result<(), ContextError> { - todo!() - } - - fn delete_packet_acknowledgement(&mut self, _ack_path: &AckPath) -> Result<(), ContextError> { - todo!() - } - - fn store_channel( - &mut self, - _channel_end_path: &ChannelEndPath, - _channel_end: ChannelEnd, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_next_sequence_send( - &mut self, - _seq_send_path: &SeqSendPath, - _seq: Sequence, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_next_sequence_recv( - &mut self, - _seq_recv_path: &SeqRecvPath, - _seq: Sequence, - ) -> Result<(), ContextError> { - todo!() - } - - fn store_next_sequence_ack( - &mut self, - _seq_ack_path: &SeqAckPath, - _seq: Sequence, - ) -> Result<(), ContextError> { - todo!() - } - - fn increase_channel_counter(&mut self) -> Result<(), ContextError> { - todo!() - } - - fn emit_ibc_event(&mut self, _event: IbcEvent) -> Result<(), ContextError> { - todo!() - } - - fn log_message(&mut self, _message: String) -> Result<(), ContextError> { - todo!() - } -} diff --git a/clients/sov-celestia-cw/src/context/custom_ctx.rs b/clients/sov-celestia-cw/src/context/custom_ctx.rs index f8612b43..36d57aa9 100644 --- a/clients/sov-celestia-cw/src/context/custom_ctx.rs +++ b/clients/sov-celestia-cw/src/context/custom_ctx.rs @@ -1,32 +1,27 @@ -use ibc_core::client::types::error::ClientError; +use ibc_core::client::context::ClientValidationContext; use ibc_core::client::types::Height; use ibc_core::handler::types::error::ContextError; use ibc_core::host::types::identifiers::ClientId; use ibc_core::host::types::path::ClientConsensusStatePath; -use ibc_core::host::ValidationContext as CoreValidationContext; use ibc_core::primitives::Timestamp; -use sov_celestia_client::context::{CommonContext, ValidationContext}; +use sov_celestia_client::context::ValidationContext as SovValidationContext; use super::Context; -use crate::types::{AnyConsensusState, HeightTravel}; +use crate::types::HeightTravel; -impl CommonContext for Context<'_> { - type ConversionError = ClientError; - type AnyConsensusState = AnyConsensusState; +impl SovValidationContext for Context<'_> { + fn host_height(&self) -> Result { + let host_height = Height::new(0, self.env().block.height)?; - fn host_timestamp(&self) -> Result { - CoreValidationContext::host_timestamp(self) + Ok(host_height) } - fn host_height(&self) -> Result { - CoreValidationContext::host_height(self) - } + fn host_timestamp(&self) -> Result { + let time = self.env().block.time; - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result { - CoreValidationContext::consensus_state(self, client_cons_state_path) + let host_timestamp = Timestamp::from_nanoseconds(time.nanos()).expect("invalid timestamp"); + + Ok(host_timestamp) } fn consensus_state_heights(&self, _client_id: &ClientId) -> Result, ContextError> { @@ -34,14 +29,11 @@ impl CommonContext for Context<'_> { Ok(heights) } -} - -impl ValidationContext for Context<'_> { fn next_consensus_state( &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { let next_height = self.get_adjacent_height(height, HeightTravel::Next)?; match next_height { @@ -51,7 +43,7 @@ impl ValidationContext for Context<'_> { h.revision_number(), h.revision_height(), ); - CoreValidationContext::consensus_state(self, &cons_state_path).map(Some) + self.consensus_state(&cons_state_path).map(Some) } None => Ok(None), } @@ -61,7 +53,7 @@ impl ValidationContext for Context<'_> { &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { let prev_height = self.get_adjacent_height(height, HeightTravel::Prev)?; match prev_height { @@ -71,7 +63,7 @@ impl ValidationContext for Context<'_> { prev_height.revision_number(), prev_height.revision_height(), ); - CoreValidationContext::consensus_state(self, &cons_state_path).map(Some) + self.consensus_state(&cons_state_path).map(Some) } None => Ok(None), } diff --git a/clients/sov-celestia-cw/src/context/mod.rs b/clients/sov-celestia-cw/src/context/mod.rs index a94d039a..1b530cd3 100644 --- a/clients/sov-celestia-cw/src/context/mod.rs +++ b/clients/sov-celestia-cw/src/context/mod.rs @@ -1,5 +1,4 @@ pub mod client_ctx; -pub mod core_ctx; pub mod custom_ctx; use std::str::FromStr; diff --git a/clients/sov-celestia-cw/src/handlers.rs b/clients/sov-celestia-cw/src/handlers.rs index b0f34fef..d8fd36c2 100644 --- a/clients/sov-celestia-cw/src/handlers.rs +++ b/clients/sov-celestia-cw/src/handlers.rs @@ -3,8 +3,8 @@ use ibc_core::client::context::client_state::{ ClientStateCommon, ClientStateExecution, ClientStateValidation, }; use ibc_core::client::context::consensus_state::ConsensusState as _; +use ibc_core::client::context::ClientValidationContext; use ibc_core::host::types::path::ClientConsensusStatePath; -use ibc_core::host::ValidationContext; use ibc_core::primitives::proto::Any; use prost::Message; use sov_celestia_client::client_state::ClientState; diff --git a/clients/sov-celestia-cw/src/types/consensus_state.rs b/clients/sov-celestia-cw/src/types/consensus_state.rs index 17285e18..a229be03 100644 --- a/clients/sov-celestia-cw/src/types/consensus_state.rs +++ b/clients/sov-celestia-cw/src/types/consensus_state.rs @@ -2,19 +2,27 @@ use ibc_core::client::types::error::ClientError; use ibc_core::derive::ConsensusState as ConsensusStateDerive; use ibc_core::primitives::proto::{Any, Protobuf}; use sov_celestia_client::consensus_state::ConsensusState; -use sov_celestia_client::types::consensus_state::SOV_TENDERMINT_CONSENSUS_STATE_TYPE_URL; +use sov_celestia_client::types::consensus_state::{ + SovTmConsensusState, SOV_TENDERMINT_CONSENSUS_STATE_TYPE_URL, +}; #[derive(Clone, Debug, derive_more::From, ConsensusStateDerive)] pub enum AnyConsensusState { Sovereign(ConsensusState), } -impl TryFrom for ConsensusState { +impl From for AnyConsensusState { + fn from(value: SovTmConsensusState) -> Self { + AnyConsensusState::Sovereign(value.into()) + } +} + +impl TryFrom for SovTmConsensusState { type Error = ClientError; fn try_from(value: AnyConsensusState) -> Result { match value { - AnyConsensusState::Sovereign(state) => Ok(state), + AnyConsensusState::Sovereign(state) => Ok(state.inner().clone()), } } } diff --git a/clients/sov-celestia/src/client_state.rs b/clients/sov-celestia/src/client_state.rs deleted file mode 100644 index daa9de28..00000000 --- a/clients/sov-celestia/src/client_state.rs +++ /dev/null @@ -1,394 +0,0 @@ -//! Implements the core [`ClientState`](ibc_core::client::context::client_state::ClientState) trait -//! for the Sovereign light client. -use alloc::vec::Vec; -use core::convert::{TryFrom, TryInto}; - -use ibc_core::client::context::client_state::{ - ClientStateCommon, ClientStateExecution, ClientStateValidation, -}; -use ibc_core::client::context::consensus_state::ConsensusState as ConsensusStateTrait; -use ibc_core::client::context::{ClientExecutionContext, ClientValidationContext}; -use ibc_core::client::types::error::ClientError; -use ibc_core::client::types::{Height, Status}; -use ibc_core::commitment_types::commitment::{ - CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, -}; -use ibc_core::host::types::identifiers::{ClientId, ClientType}; -use ibc_core::host::types::path::{ClientConsensusStatePath, ClientStatePath, Path}; -use ibc_core::host::ExecutionContext; -use ibc_core::primitives::proto::{Any, Protobuf}; -use sov_celestia_client_types::client_message::Header; -use sov_celestia_client_types::client_state::{ - sov_client_type, SovTmClientState, SOV_TENDERMINT_CLIENT_STATE_TYPE_URL, -}; -use sov_celestia_client_types::consensus_state::{ - ConsensusState as ConsensusStateType, SovTmConsensusState, TmConsensusParams, -}; -use sov_celestia_client_types::proto::v1::ClientState as RawSovTmClientState; - -use crate::consensus_state::ConsensusState; -use crate::context::{CommonContext, ValidationContext as SovValidationContext}; - -/// Newtype wrapper exists so that we can bypass Rust's orphan rules and -/// implement traits from `ibc::core::client::context` on the `ClientState` -/// type. -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[derive(Clone, Debug, PartialEq, derive_more::From)] -pub struct ClientState(SovTmClientState); - -impl ClientState { - pub fn inner(&self) -> &SovTmClientState { - &self.0 - } -} - -impl Protobuf for ClientState {} - -impl TryFrom for ClientState { - type Error = ClientError; - - fn try_from(raw: RawSovTmClientState) -> Result { - let sov_client_state = SovTmClientState::try_from(raw)?; - - Ok(Self(sov_client_state)) - } -} - -impl From for RawSovTmClientState { - fn from(client_state: ClientState) -> Self { - client_state.0.into() - } -} - -impl Protobuf for ClientState {} - -impl TryFrom for ClientState { - type Error = ClientError; - - fn try_from(raw: Any) -> Result { - let any = SovTmClientState::try_from(raw)?; - - Ok(Self(any)) - } -} - -impl From for Any { - fn from(client_state: ClientState) -> Self { - Any { - type_url: SOV_TENDERMINT_CLIENT_STATE_TYPE_URL.to_string(), - value: Protobuf::::encode_vec(client_state), - } - } -} - -impl ClientStateCommon for ClientState { - fn verify_consensus_state(&self, consensus_state: Any) -> Result<(), ClientError> { - let tm_consensus_state = ConsensusState::try_from(consensus_state)?; - if tm_consensus_state.root().is_empty() { - return Err(ClientError::Other { - description: "empty commitment root".into(), - }); - }; - - Ok(()) - } - - fn client_type(&self) -> ClientType { - sov_client_type() - } - - fn latest_height(&self) -> Height { - self.0.latest_height() - } - - fn validate_proof_height(&self, proof_height: Height) -> Result<(), ClientError> { - if self.latest_height() < proof_height { - return Err(ClientError::InvalidProofHeight { - latest_height: self.latest_height(), - proof_height, - }); - } - Ok(()) - } - - /// Perform client-specific verifications and check all data in the new - /// client state to be the same across all valid clients for the new chain. - /// - /// You can learn more about how to upgrade IBC-connected SDK chains in - /// [this](https://ibc.cosmos.network/main/ibc/upgrades/quick-guide.html) - /// guide - fn verify_upgrade_client( - &self, - _upgraded_client_state: Any, - _upgraded_consensus_state: Any, - _proof_upgrade_client: CommitmentProofBytes, - _proof_upgrade_consensus_state: CommitmentProofBytes, - _root: &CommitmentRoot, - ) -> Result<(), ClientError> { - Ok(()) - } - - fn verify_membership( - &self, - _prefix: &CommitmentPrefix, - _proof: &CommitmentProofBytes, - _root: &CommitmentRoot, - _path: Path, - _value: Vec, - ) -> Result<(), ClientError> { - Ok(()) - } - - fn verify_non_membership( - &self, - _prefix: &CommitmentPrefix, - _proof: &CommitmentProofBytes, - _root: &CommitmentRoot, - _path: Path, - ) -> Result<(), ClientError> { - Ok(()) - } -} - -impl ClientStateValidation for ClientState -where - V: ClientValidationContext + SovValidationContext, - V::AnyConsensusState: TryInto, - ClientError: From<>::Error>, -{ - fn verify_client_message( - &self, - _ctx: &V, - _client_id: &ClientId, - _client_message: Any, - ) -> Result<(), ClientError> { - Ok(()) - } - - fn check_for_misbehaviour( - &self, - _ctx: &V, - _client_id: &ClientId, - _client_message: Any, - ) -> Result { - Ok(false) - } - - fn status(&self, ctx: &V, client_id: &ClientId) -> Result { - if self.0.is_frozen() { - return Ok(Status::Frozen); - } - - let latest_consensus_state: ConsensusState = { - let any_latest_consensus_state = - match ctx.consensus_state(&ClientConsensusStatePath::new( - client_id.clone(), - self.0.latest_height.revision_number(), - self.0.latest_height.revision_height(), - )) { - Ok(cs) => cs, - // if the client state does not have an associated consensus state for its latest height - // then it must be expired - Err(_) => return Ok(Status::Expired), - }; - - any_latest_consensus_state.try_into()? - }; - - // Note: if the `duration_since()` is `None`, indicating that the latest - // consensus state is in the future, then we don't consider the client - // to be expired. - let now = ctx.host_timestamp()?; - if let Some(elapsed_since_latest_consensus_state) = - now.duration_since(&latest_consensus_state.timestamp().into()) - { - if elapsed_since_latest_consensus_state > self.0.da_params.trusting_period { - return Ok(Status::Expired); - } - } - - Ok(Status::Active) - } -} - -impl ClientStateExecution for ClientState -where - E: ClientExecutionContext + SovValidationContext + ExecutionContext, - ::AnyClientState: From, - ::AnyConsensusState: From, -{ - fn initialise( - &self, - ctx: &mut E, - client_id: &ClientId, - consensus_state: Any, - ) -> Result<(), ClientError> { - let host_timestamp = CommonContext::host_timestamp(ctx)?; - let host_height = CommonContext::host_height(ctx)?; - - let sov_consensus_state = ConsensusState::try_from(consensus_state)?; - - ctx.store_client_state(ClientStatePath::new(client_id.clone()), self.clone().into())?; - ctx.store_consensus_state( - ClientConsensusStatePath::new( - client_id.clone(), - self.latest_height().revision_number(), - self.latest_height().revision_height(), - ), - sov_consensus_state.into(), - )?; - ctx.store_update_meta( - client_id.clone(), - self.latest_height(), - host_timestamp, - host_height, - )?; - Ok(()) - } - - fn update_state( - &self, - ctx: &mut E, - client_id: &ClientId, - header: Any, - ) -> Result, ClientError> { - let header = Header::try_from(header)?; - let header_height = header.height(); - - // self.prune_oldest_consensus_state(ctx, client_id)?; - - let maybe_existing_consensus_state = { - let path_at_header_height = ClientConsensusStatePath::new( - client_id.clone(), - header_height.revision_number(), - header_height.revision_height(), - ); - - CommonContext::consensus_state(ctx, &path_at_header_height).ok() - }; - - if maybe_existing_consensus_state.is_some() { - // if we already had the header installed by a previous relayer - // then this is a no-op. - // - // Do nothing. - } else { - let host_timestamp = CommonContext::host_timestamp(ctx)?; - let host_height = CommonContext::host_height(ctx)?; - - let new_consensus_state = ConsensusStateType::from(header.clone()); - let new_client_state = self.0.clone().with_header(header.da_header)?; - - ctx.store_consensus_state( - ClientConsensusStatePath::new( - client_id.clone(), - new_client_state.latest_height.revision_number(), - new_client_state.latest_height.revision_height(), - ), - ConsensusState::from(new_consensus_state).into(), - )?; - ctx.store_client_state( - ClientStatePath::new(client_id.clone()), - ClientState::from(new_client_state).into(), - )?; - ctx.store_update_meta( - client_id.clone(), - header_height, - host_timestamp, - host_height, - )?; - } - - Ok(vec![header_height]) - } - - fn update_state_on_misbehaviour( - &self, - ctx: &mut E, - client_id: &ClientId, - _client_message: Any, - ) -> Result<(), ClientError> { - let frozen_client_state = self.0.clone().with_frozen_height(Height::min(0)); - - let wrapped_frozen_client_state = ClientState::from(frozen_client_state); - - ctx.store_client_state( - ClientStatePath::new(client_id.clone()), - wrapped_frozen_client_state.into(), - )?; - - Ok(()) - } - - // Commit the new client state and consensus state to the store - fn update_state_on_upgrade( - &self, - ctx: &mut E, - client_id: &ClientId, - upgraded_client_state: Any, - upgraded_consensus_state: Any, - ) -> Result { - let mut upgraded_client_state = Self::try_from(upgraded_client_state)?; - let upgraded_tm_cons_state = ConsensusState::try_from(upgraded_consensus_state)?; - - upgraded_client_state.0.zero_custom_fields(); - - // Construct new client state and consensus state relayer chosen client - // parameters are ignored. All chain-chosen parameters come from - // committed client, all client-chosen parameters come from current - // client. - let new_client_state = SovTmClientState::new( - upgraded_client_state.0.rollup_id, - upgraded_client_state.0.latest_height, - upgraded_client_state.0.upgrade_path, - upgraded_client_state.0.da_params, - ); - - // The new consensus state is merely used as a trusted kernel against - // which headers on the new chain can be verified. The root is just a - // stand-in sentinel value as it cannot be known in advance, thus no - // proof verification will pass. The timestamp and the - // NextValidatorsHash of the consensus state is the blocktime and - // NextValidatorsHash of the last block committed by the old chain. This - // will allow the first block of the new chain to be verified against - // the last validators of the old chain so long as it is submitted - // within the TrustingPeriod of this client. - // NOTE: We do not set processed time for this consensus state since - // this consensus state should not be used for packet verification as - // the root is empty. The next consensus state submitted using update - // will be usable for packet-verification. - let sentinel_root = "sentinel_root".as_bytes().to_vec(); - let new_consensus_state = SovTmConsensusState::new( - sentinel_root.into(), - TmConsensusParams { - timestamp: upgraded_tm_cons_state.timestamp(), - next_validators_hash: upgraded_tm_cons_state.next_validators_hash(), - }, - ); - - let latest_height = new_client_state.latest_height; - let host_timestamp = CommonContext::host_timestamp(ctx)?; - let host_height = CommonContext::host_height(ctx)?; - - ctx.store_client_state( - ClientStatePath::new(client_id.clone()), - ClientState::from(new_client_state).into(), - )?; - ctx.store_consensus_state( - ClientConsensusStatePath::new( - client_id.clone(), - latest_height.revision_number(), - latest_height.revision_height(), - ), - ConsensusState::from(new_consensus_state).into(), - )?; - ctx.store_update_meta( - client_id.clone(), - latest_height, - host_timestamp, - host_height, - )?; - - Ok(latest_height) - } -} diff --git a/clients/sov-celestia/src/client_state/common.rs b/clients/sov-celestia/src/client_state/common.rs new file mode 100644 index 00000000..c7551134 --- /dev/null +++ b/clients/sov-celestia/src/client_state/common.rs @@ -0,0 +1,86 @@ +use alloc::vec::Vec; +use core::convert::TryFrom; + +use ibc_core::client::context::client_state::ClientStateCommon; +use ibc_core::client::context::consensus_state::ConsensusState as ConsensusStateTrait; +use ibc_core::client::types::error::ClientError; +use ibc_core::client::types::Height; +use ibc_core::commitment_types::commitment::{ + CommitmentPrefix, CommitmentProofBytes, CommitmentRoot, +}; +use ibc_core::host::types::identifiers::ClientType; +use ibc_core::host::types::path::Path; +use ibc_core::primitives::proto::Any; +use sov_celestia_client_types::client_state::sov_client_type; + +use super::ClientState; +use crate::consensus_state::ConsensusState; + +impl ClientStateCommon for ClientState { + fn verify_consensus_state(&self, consensus_state: Any) -> Result<(), ClientError> { + let tm_consensus_state = ConsensusState::try_from(consensus_state)?; + if tm_consensus_state.root().is_empty() { + return Err(ClientError::Other { + description: "empty commitment root".into(), + }); + }; + + Ok(()) + } + + fn client_type(&self) -> ClientType { + sov_client_type() + } + + fn latest_height(&self) -> Height { + self.0.latest_height() + } + + fn validate_proof_height(&self, proof_height: Height) -> Result<(), ClientError> { + if self.latest_height() < proof_height { + return Err(ClientError::InvalidProofHeight { + latest_height: self.latest_height(), + proof_height, + }); + } + Ok(()) + } + + /// Perform client-specific verifications and check all data in the new + /// client state to be the same across all valid clients for the new chain. + /// + /// You can learn more about how to upgrade IBC-connected SDK chains in + /// [this](https://ibc.cosmos.network/main/ibc/upgrades/quick-guide.html) + /// guide + fn verify_upgrade_client( + &self, + _upgraded_client_state: Any, + _upgraded_consensus_state: Any, + _proof_upgrade_client: CommitmentProofBytes, + _proof_upgrade_consensus_state: CommitmentProofBytes, + _root: &CommitmentRoot, + ) -> Result<(), ClientError> { + Ok(()) + } + + fn verify_membership( + &self, + _prefix: &CommitmentPrefix, + _proof: &CommitmentProofBytes, + _root: &CommitmentRoot, + _path: Path, + _value: Vec, + ) -> Result<(), ClientError> { + Ok(()) + } + + fn verify_non_membership( + &self, + _prefix: &CommitmentPrefix, + _proof: &CommitmentProofBytes, + _root: &CommitmentRoot, + _path: Path, + ) -> Result<(), ClientError> { + Ok(()) + } +} diff --git a/clients/sov-celestia/src/client_state/execution.rs b/clients/sov-celestia/src/client_state/execution.rs new file mode 100644 index 00000000..db21ce07 --- /dev/null +++ b/clients/sov-celestia/src/client_state/execution.rs @@ -0,0 +1,268 @@ +use alloc::vec::Vec; + +use ibc_core::client::context::client_state::ClientStateExecution; +use ibc_core::client::types::error::ClientError; +use ibc_core::client::types::Height; +use ibc_core::host::types::identifiers::ClientId; +use ibc_core::host::types::path::{ClientConsensusStatePath, ClientStatePath}; +use ibc_core::primitives::prelude::*; +use ibc_core::primitives::proto::Any; +use sov_celestia_client_types::client_message::Header; +use sov_celestia_client_types::client_state::SovTmClientState; +use sov_celestia_client_types::consensus_state::{ + ConsensusState as ConsensusStateType, SovTmConsensusState, TmConsensusParams, +}; + +use super::ClientState; +use crate::consensus_state::ConsensusState; +use crate::context::{ + ConsensusStateConverter, ExecutionContext as SovExecutionContext, + ValidationContext as SovValidationContext, +}; + +impl ClientStateExecution for ClientState +where + E: SovExecutionContext, + E::ClientStateRef: From, + E::ConsensusStateRef: ConsensusStateConverter, +{ + fn initialise( + &self, + ctx: &mut E, + client_id: &ClientId, + consensus_state: Any, + ) -> Result<(), ClientError> { + initialise(self.inner(), ctx, client_id, consensus_state) + } + + fn update_state( + &self, + ctx: &mut E, + client_id: &ClientId, + header: Any, + ) -> Result, ClientError> { + update_state(self.inner(), ctx, client_id, header) + } + + fn update_state_on_misbehaviour( + &self, + ctx: &mut E, + client_id: &ClientId, + _client_message: Any, + ) -> Result<(), ClientError> { + update_state_on_misbehaviour(self.inner(), ctx, client_id, _client_message) + } + + // Commit the new client state and consensus state to the store + fn update_state_on_upgrade( + &self, + ctx: &mut E, + client_id: &ClientId, + upgraded_client_state: Any, + upgraded_consensus_state: Any, + ) -> Result { + update_state_on_upgrade( + self.inner(), + ctx, + client_id, + upgraded_client_state, + upgraded_consensus_state, + ) + } +} + +pub fn initialise( + client_state: &SovTmClientState, + ctx: &mut E, + client_id: &ClientId, + consensus_state: Any, +) -> Result<(), ClientError> +where + E: SovExecutionContext, + E::ClientStateRef: From, + E::ConsensusStateRef: ConsensusStateConverter, +{ + let host_timestamp = SovValidationContext::host_timestamp(ctx)?; + let host_height = SovValidationContext::host_height(ctx)?; + + let sov_consensus_state = SovTmConsensusState::try_from(consensus_state)?; + + ctx.store_client_state( + ClientStatePath::new(client_id.clone()), + client_state.clone().into(), + )?; + ctx.store_consensus_state( + ClientConsensusStatePath::new( + client_id.clone(), + client_state.latest_height().revision_number(), + client_state.latest_height().revision_height(), + ), + sov_consensus_state.into(), + )?; + ctx.store_update_meta( + client_id.clone(), + client_state.latest_height(), + host_timestamp, + host_height, + )?; + + Ok(()) +} + +pub fn update_state( + client_state: &SovTmClientState, + ctx: &mut E, + client_id: &ClientId, + header: Any, +) -> Result, ClientError> +where + E: SovExecutionContext, + E::ClientStateRef: From, + E::ConsensusStateRef: ConsensusStateConverter, +{ + let header = Header::try_from(header)?; + let header_height = header.height(); + + // self.prune_oldest_consensus_state(ctx, client_id)?; + + let maybe_existing_consensus_state = { + let path_at_header_height = ClientConsensusStatePath::new( + client_id.clone(), + header_height.revision_number(), + header_height.revision_height(), + ); + + ctx.consensus_state(&path_at_header_height).ok() + }; + + if maybe_existing_consensus_state.is_some() { + // if we already had the header installed by a previous relayer + // then this is a no-op. + // + // Do nothing. + } else { + let host_timestamp = SovValidationContext::host_timestamp(ctx)?; + let host_height = SovValidationContext::host_height(ctx)?; + + let new_consensus_state = ConsensusStateType::from(header.clone()); + let new_client_state = client_state.clone().with_header(header.da_header)?; + + ctx.store_consensus_state( + ClientConsensusStatePath::new( + client_id.clone(), + new_client_state.latest_height.revision_number(), + new_client_state.latest_height.revision_height(), + ), + new_consensus_state.into(), + )?; + ctx.store_client_state( + ClientStatePath::new(client_id.clone()), + new_client_state.into(), + )?; + ctx.store_update_meta( + client_id.clone(), + header_height, + host_timestamp, + host_height, + )?; + } + + Ok(vec![header_height]) +} + +pub fn update_state_on_misbehaviour( + client_state: &SovTmClientState, + ctx: &mut E, + client_id: &ClientId, + _client_message: Any, +) -> Result<(), ClientError> +where + E: SovExecutionContext, + E::ClientStateRef: From, + E::ConsensusStateRef: ConsensusStateConverter, +{ + let frozen_client_state = client_state.clone().with_frozen_height(Height::min(0)); + + ctx.store_client_state( + ClientStatePath::new(client_id.clone()), + frozen_client_state.into(), + )?; + + Ok(()) +} + +pub fn update_state_on_upgrade( + _client_state: &SovTmClientState, + ctx: &mut E, + client_id: &ClientId, + upgraded_client_state: Any, + upgraded_consensus_state: Any, +) -> Result +where + E: SovExecutionContext, + E::ClientStateRef: From, + E::ConsensusStateRef: ConsensusStateConverter, +{ + let mut upgraded_client_state = SovTmClientState::try_from(upgraded_client_state)?; + let upgraded_tm_cons_state = ConsensusState::try_from(upgraded_consensus_state)?; + + upgraded_client_state.zero_custom_fields(); + + // Construct new client state and consensus state relayer chosen client + // parameters are ignored. All chain-chosen parameters come from + // committed client, all client-chosen parameters come from current + // client. + let new_client_state = SovTmClientState::new( + upgraded_client_state.rollup_id, + upgraded_client_state.latest_height, + upgraded_client_state.upgrade_path, + upgraded_client_state.da_params, + ); + + // The new consensus state is merely used as a trusted kernel against + // which headers on the new chain can be verified. The root is just a + // stand-in sentinel value as it cannot be known in advance, thus no + // proof verification will pass. The timestamp and the + // NextValidatorsHash of the consensus state is the blocktime and + // NextValidatorsHash of the last block committed by the old chain. This + // will allow the first block of the new chain to be verified against + // the last validators of the old chain so long as it is submitted + // within the TrustingPeriod of this client. + // NOTE: We do not set processed time for this consensus state since + // this consensus state should not be used for packet verification as + // the root is empty. The next consensus state submitted using update + // will be usable for packet-verification. + let sentinel_root = "sentinel_root".as_bytes().to_vec(); + let new_consensus_state = SovTmConsensusState::new( + sentinel_root.into(), + TmConsensusParams { + timestamp: upgraded_tm_cons_state.timestamp(), + next_validators_hash: upgraded_tm_cons_state.next_validators_hash(), + }, + ); + + let latest_height = new_client_state.latest_height; + let host_timestamp = SovValidationContext::host_timestamp(ctx)?; + let host_height = SovValidationContext::host_height(ctx)?; + + ctx.store_client_state( + ClientStatePath::new(client_id.clone()), + new_client_state.into(), + )?; + ctx.store_consensus_state( + ClientConsensusStatePath::new( + client_id.clone(), + latest_height.revision_number(), + latest_height.revision_height(), + ), + new_consensus_state.into(), + )?; + ctx.store_update_meta( + client_id.clone(), + latest_height, + host_timestamp, + host_height, + )?; + + Ok(latest_height) +} diff --git a/clients/sov-celestia/src/client_state/mod.rs b/clients/sov-celestia/src/client_state/mod.rs new file mode 100644 index 00000000..4f67f5ac --- /dev/null +++ b/clients/sov-celestia/src/client_state/mod.rs @@ -0,0 +1,67 @@ +//! Implements the core [`ClientState`](ibc_core::client::context::client_state::ClientState) trait +//! for the Sovereign light client. + +mod common; +mod execution; +mod validation; + +pub use execution::*; +use ibc_core::client::types::error::ClientError; +use ibc_core::primitives::prelude::*; +use ibc_core::primitives::proto::{Any, Protobuf}; +use sov_celestia_client_types::client_state::{ + SovTmClientState, SOV_TENDERMINT_CLIENT_STATE_TYPE_URL, +}; +use sov_celestia_client_types::proto::v1::ClientState as RawSovTmClientState; + +/// Newtype wrapper exists so that we can bypass Rust's orphan rules and +/// implement traits from `ibc::core::client::context` on the `ClientState` +/// type. +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[derive(Clone, Debug, PartialEq, derive_more::From)] +pub struct ClientState(SovTmClientState); + +impl ClientState { + pub fn inner(&self) -> &SovTmClientState { + &self.0 + } +} + +impl Protobuf for ClientState {} + +impl TryFrom for ClientState { + type Error = ClientError; + + fn try_from(raw: RawSovTmClientState) -> Result { + let sov_client_state = SovTmClientState::try_from(raw)?; + + Ok(Self(sov_client_state)) + } +} + +impl From for RawSovTmClientState { + fn from(client_state: ClientState) -> Self { + client_state.0.into() + } +} + +impl Protobuf for ClientState {} + +impl TryFrom for ClientState { + type Error = ClientError; + + fn try_from(raw: Any) -> Result { + let any = SovTmClientState::try_from(raw)?; + + Ok(Self(any)) + } +} + +impl From for Any { + fn from(client_state: ClientState) -> Self { + Any { + type_url: SOV_TENDERMINT_CLIENT_STATE_TYPE_URL.to_string(), + value: Protobuf::::encode_vec(client_state), + } + } +} diff --git a/clients/sov-celestia/src/client_state/validation.rs b/clients/sov-celestia/src/client_state/validation.rs new file mode 100644 index 00000000..42df5054 --- /dev/null +++ b/clients/sov-celestia/src/client_state/validation.rs @@ -0,0 +1,80 @@ +use ibc_core::client::context::client_state::ClientStateValidation; +use ibc_core::client::types::error::ClientError; +use ibc_core::client::types::Status; +use ibc_core::host::types::identifiers::ClientId; +use ibc_core::host::types::path::ClientConsensusStatePath; +use ibc_core::primitives::prelude::*; +use ibc_core::primitives::proto::Any; +use sov_celestia_client_types::client_state::SovTmClientState; + +use super::ClientState; +use crate::context::{ConsensusStateConverter, ValidationContext as SovValidationContext}; + +impl ClientStateValidation for ClientState +where + V: SovValidationContext, + V::ConsensusStateRef: ConsensusStateConverter, +{ + fn verify_client_message( + &self, + _ctx: &V, + _client_id: &ClientId, + _client_message: Any, + ) -> Result<(), ClientError> { + Ok(()) + } + + fn check_for_misbehaviour( + &self, + _ctx: &V, + _client_id: &ClientId, + _client_message: Any, + ) -> Result { + Ok(false) + } + + fn status(&self, ctx: &V, client_id: &ClientId) -> Result { + status(self.inner(), ctx, client_id) + } +} + +pub fn status( + client_state: &SovTmClientState, + ctx: &V, + client_id: &ClientId, +) -> Result +where + V: SovValidationContext, + V::ConsensusStateRef: ConsensusStateConverter, +{ + if client_state.is_frozen() { + return Ok(Status::Frozen); + } + + let latest_consensus_state = { + match ctx.consensus_state(&ClientConsensusStatePath::new( + client_id.clone(), + client_state.latest_height.revision_number(), + client_state.latest_height.revision_height(), + )) { + Ok(cs) => cs.try_into()?, + // if the client state does not have an associated consensus state for its latest height + // then it must be expired + Err(_) => return Ok(Status::Expired), + } + }; + + // Note: if the `duration_since()` is `None`, indicating that the latest + // consensus state is in the future, then we don't consider the client + // to be expired. + let now = ctx.host_timestamp()?; + if let Some(elapsed_since_latest_consensus_state) = + now.duration_since(&latest_consensus_state.timestamp().into()) + { + if elapsed_since_latest_consensus_state > client_state.da_params.trusting_period { + return Ok(Status::Expired); + } + } + + Ok(Status::Active) +} diff --git a/clients/sov-celestia/src/context.rs b/clients/sov-celestia/src/context.rs index 1b702d78..0b206a0d 100644 --- a/clients/sov-celestia/src/context.rs +++ b/clients/sov-celestia/src/context.rs @@ -1,60 +1,67 @@ -use alloc::string::ToString; - -use ibc_core::client::context::ClientExecutionContext; +use ibc_core::client::context::{ClientExecutionContext, ClientValidationContext}; +use ibc_core::client::types::error::ClientError; use ibc_core::client::types::Height; use ibc_core::handler::types::error::ContextError; use ibc_core::host::types::identifiers::ClientId; -use ibc_core::host::types::path::ClientConsensusStatePath; use ibc_core::primitives::prelude::*; use ibc_core::primitives::Timestamp; +use sov_celestia_client_types::consensus_state::SovTmConsensusState; -use crate::consensus_state::ConsensusState; +/// Enables conversion (`TryInto` and `From`) between the consensus state type +/// used by the host and the one specific to the Tendermint light client, which +/// is `ConsensusStateType`. +pub trait ConsensusStateConverter: + TryInto + From +{ +} -/// Client's context required during both validation and execution -pub trait CommonContext { - type ConversionError: ToString; - type AnyConsensusState: TryInto; +impl ConsensusStateConverter for C where + C: TryInto + From +{ +} +/// Client's context required during validation +pub trait ValidationContext: ClientValidationContext +where + Self::ConsensusStateRef: ConsensusStateConverter, +{ /// Returns the current timestamp of the local chain. fn host_timestamp(&self) -> Result; /// Returns the current height of the local chain. fn host_height(&self) -> Result; - /// Retrieve the consensus state for the given client ID at the specified - /// height. - /// - /// Returns an error if no such state exists. - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result; - /// Returns all the heights at which a consensus state is stored fn consensus_state_heights(&self, client_id: &ClientId) -> Result, ContextError>; -} -/// Client's context required during validation -pub trait ValidationContext: CommonContext { /// Search for the lowest consensus state higher than `height`. fn next_consensus_state( &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError>; + ) -> Result, ContextError>; /// Search for the highest consensus state lower than `height`. fn prev_consensus_state( &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError>; + ) -> Result, ContextError>; } /// Client's context required during execution. /// /// This trait is automatically implemented for all types that implement -/// [`CommonContext`] and [`ClientExecutionContext`] -pub trait ExecutionContext: CommonContext + ClientExecutionContext {} +/// [`ValidationContext`] and [`ClientExecutionContext`] +pub trait ExecutionContext: ValidationContext + ClientExecutionContext +where + Self::ConsensusStateRef: ConsensusStateConverter, +{ +} -impl ExecutionContext for T where T: CommonContext + ClientExecutionContext {} +impl ExecutionContext for T +where + T: ValidationContext + ClientExecutionContext, + T::ConsensusStateRef: ConsensusStateConverter, +{ +} diff --git a/clients/sov-celestia/types/src/consensus_state/definition.rs b/clients/sov-celestia/types/src/consensus_state/definition.rs index 267f7922..1c1986b8 100644 --- a/clients/sov-celestia/types/src/consensus_state/definition.rs +++ b/clients/sov-celestia/types/src/consensus_state/definition.rs @@ -5,6 +5,7 @@ use ibc_core::commitment_types::commitment::CommitmentRoot; use ibc_core::primitives::proto::{Any, Protobuf}; use ibc_proto::ibc::lightclients::sovereign::tendermint::v1::ConsensusState as RawConsensusState; use prost::Message; +use tendermint::Time; use super::TmConsensusParams; use crate::client_message::SovTmHeader; @@ -28,6 +29,10 @@ impl ConsensusState { pub type SovTmConsensusState = ConsensusState; impl SovTmConsensusState { + pub fn timestamp(&self) -> Time { + self.da_params.timestamp + } + /// Protobuf encoding of the `SovTmConsensusState` through the `Any` type. pub fn encode_thru_any(self) -> Vec { Any::from(self).encode_to_vec() diff --git a/mocks/Cargo.toml b/mocks/Cargo.toml index 09c30822..afb272e6 100644 --- a/mocks/Cargo.toml +++ b/mocks/Cargo.toml @@ -38,7 +38,7 @@ ibc-app-transfer = { workspace = true } ibc-client-tendermint = { workspace = true } ibc-core-host-cosmos = { workspace = true } ibc-query = { workspace = true } -ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "552863ec93", default-features = false } +ibc-testkit = { git = "https://github.com/cosmos/ibc-rs.git", rev = "a9761140d3", default-features = false } # cosmos dependencies basecoin-app = { git = "https://github.com/informalsystems/basecoin-rs.git", rev = "e668ec4" } diff --git a/modules/sov-ibc/src/clients/context.rs b/modules/sov-ibc/src/clients/context.rs index 51d2e9c2..9e8778ab 100644 --- a/modules/sov-ibc/src/clients/context.rs +++ b/modules/sov-ibc/src/clients/context.rs @@ -1,6 +1,4 @@ -use ibc_client_tendermint::context::{ - CommonContext as TmCommonContext, ValidationContext as TmValidationContext, -}; +use ibc_client_tendermint::context::ValidationContext as TmValidationContext; use ibc_core::client::context::client_state::ClientStateCommon; use ibc_core::client::context::{ClientExecutionContext, ClientValidationContext}; use ibc_core::client::types::error::ClientError; @@ -10,16 +8,51 @@ use ibc_core::host::types::identifiers::ClientId; use ibc_core::host::types::path::{ClientConsensusStatePath, ClientStatePath}; use ibc_core::host::ValidationContext; use ibc_core::primitives::Timestamp; -use sov_celestia_client::context::{ - CommonContext as SovCommonContext, ValidationContext as SovValidationContext, -}; +use sov_celestia_client::context::ValidationContext as SovValidationContext; use sov_modules_api::{DaSpec, Spec, StateMapAccessor, StateVecAccessor}; -use super::AnyConsensusState; +use super::{AnyClientState, AnyConsensusState}; use crate::context::IbcContext; impl<'a, S: Spec, Da: DaSpec> ClientValidationContext for IbcContext<'a, S, Da> { - fn update_meta( + type ClientStateRef = AnyClientState; + type ConsensusStateRef = AnyConsensusState; + + fn client_state(&self, client_id: &ClientId) -> Result { + self.ibc + .client_state_map + .get(client_id, *self.working_set.borrow_mut()) + .ok_or( + ClientError::ClientStateNotFound { + client_id: client_id.clone(), + } + .into(), + ) + } + + fn consensus_state( + &self, + client_cons_state_path: &ClientConsensusStatePath, + ) -> Result { + self.ibc + .consensus_state_map + .get(client_cons_state_path, *self.working_set.borrow_mut()) + .ok_or( + ClientError::ConsensusStateNotFound { + client_id: client_cons_state_path.client_id.clone(), + height: Height::new( + client_cons_state_path.revision_number, + client_cons_state_path.revision_height, + ) + .map_err(|_| ClientError::Other { + description: "Height cannot be zero".to_string(), + })?, + } + .into(), + ) + } + + fn client_update_meta( &self, client_id: &ClientId, height: &Height, @@ -41,14 +74,12 @@ impl<'a, S: Spec, Da: DaSpec> ClientValidationContext for IbcContext<'a, S, Da> } impl<'a, S: Spec, Da: DaSpec> ClientExecutionContext for IbcContext<'a, S, Da> { - type V = ::V; - type AnyClientState = ::AnyClientState; - type AnyConsensusState = ::AnyConsensusState; + type ClientStateMut = AnyClientState; fn store_client_state( &mut self, client_state_path: ClientStatePath, - client_state: Self::AnyClientState, + client_state: Self::ClientStateMut, ) -> Result<(), ContextError> { self.ibc.client_state_map.set( &client_state_path.0, @@ -62,7 +93,7 @@ impl<'a, S: Spec, Da: DaSpec> ClientExecutionContext for IbcContext<'a, S, Da> { fn store_consensus_state( &mut self, consensus_state_path: ClientConsensusStatePath, - consensus_state: Self::AnyConsensusState, + consensus_state: Self::ConsensusStateRef, ) -> Result<(), ContextError> { self.ibc.consensus_state_map.set( &consensus_state_path, @@ -116,10 +147,7 @@ impl<'a, S: Spec, Da: DaSpec> ClientExecutionContext for IbcContext<'a, S, Da> { } } -impl<'a, S: Spec, Da: DaSpec> TmCommonContext for IbcContext<'a, S, Da> { - type ConversionError = &'static str; - type AnyConsensusState = AnyConsensusState; - +impl<'a, S: Spec, Da: DaSpec> TmValidationContext for IbcContext<'a, S, Da> { fn host_timestamp(&self) -> Result { ::host_timestamp(self) } @@ -128,13 +156,6 @@ impl<'a, S: Spec, Da: DaSpec> TmCommonContext for IbcContext<'a, S, Da> { ::host_height(self) } - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result { - ::consensus_state(self, client_cons_state_path) - } - fn consensus_state_heights(&self, _client_id: &ClientId) -> Result, ContextError> { let heights = self .ibc @@ -143,14 +164,12 @@ impl<'a, S: Spec, Da: DaSpec> TmCommonContext for IbcContext<'a, S, Da> { .collect::>(); Ok(heights) } -} -impl<'a, S: Spec, Da: DaSpec> TmValidationContext for IbcContext<'a, S, Da> { fn next_consensus_state( &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { next_consensus_state(self, client_id, height) } @@ -158,15 +177,12 @@ impl<'a, S: Spec, Da: DaSpec> TmValidationContext for IbcContext<'a, S, Da> { &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { prev_consensus_state(self, client_id, height) } } -impl<'a, S: Spec, Da: DaSpec> SovCommonContext for IbcContext<'a, S, Da> { - type ConversionError = &'static str; - type AnyConsensusState = AnyConsensusState; - +impl<'a, S: Spec, Da: DaSpec> SovValidationContext for IbcContext<'a, S, Da> { fn host_timestamp(&self) -> Result { ::host_timestamp(self) } @@ -175,13 +191,6 @@ impl<'a, S: Spec, Da: DaSpec> SovCommonContext for IbcContext<'a, S, Da> { ::host_height(self) } - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result { - ::consensus_state(self, client_cons_state_path) - } - fn consensus_state_heights(&self, _client_id: &ClientId) -> Result, ContextError> { let heights = self .ibc @@ -190,14 +199,12 @@ impl<'a, S: Spec, Da: DaSpec> SovCommonContext for IbcContext<'a, S, Da> { .collect::>(); Ok(heights) } -} -impl<'a, S: Spec, Da: DaSpec> SovValidationContext for IbcContext<'a, S, Da> { fn next_consensus_state( &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { next_consensus_state(self, client_id, height) } @@ -205,7 +212,7 @@ impl<'a, S: Spec, Da: DaSpec> SovValidationContext for IbcContext<'a, S, Da> { &self, client_id: &ClientId, height: &Height, - ) -> Result, ContextError> { + ) -> Result, ContextError> { prev_consensus_state(self, client_id, height) } } diff --git a/modules/sov-ibc/src/clients/mod.rs b/modules/sov-ibc/src/clients/mod.rs index e379fe1e..b87f98d9 100644 --- a/modules/sov-ibc/src/clients/mod.rs +++ b/modules/sov-ibc/src/clients/mod.rs @@ -4,6 +4,7 @@ use derive_more::{From, TryInto}; use ibc_client_tendermint::client_state::ClientState as TmClientState; use ibc_client_tendermint::consensus_state::ConsensusState as TmConsensusState; use ibc_client_tendermint::types::{ + ClientState as TmClientStateTypes, ConsensusState as TmConsensusStateType, TENDERMINT_CLIENT_STATE_TYPE_URL, TENDERMINT_CONSENSUS_STATE_TYPE_URL, }; use ibc_core::client::context::client_state::{ @@ -20,8 +21,12 @@ use ibc_core::host::types::path::Path; use ibc_core::primitives::proto::{Any, Protobuf}; use sov_celestia_client::client_state::ClientState as SovClientState; use sov_celestia_client::consensus_state::ConsensusState as SovConsensusState; -use sov_celestia_client::types::client_state::SOV_TENDERMINT_CLIENT_STATE_TYPE_URL; -use sov_celestia_client::types::consensus_state::SOV_TENDERMINT_CONSENSUS_STATE_TYPE_URL; +use sov_celestia_client::types::client_state::{ + SovTmClientState, SOV_TENDERMINT_CLIENT_STATE_TYPE_URL, +}; +use sov_celestia_client::types::consensus_state::{ + SovTmConsensusState, SOV_TENDERMINT_CONSENSUS_STATE_TYPE_URL, +}; use sov_modules_api::{DaSpec, Spec}; use crate::context::IbcContext; @@ -32,6 +37,18 @@ pub enum AnyClientState { Sovereign(SovClientState), } +impl From for AnyClientState { + fn from(cs: SovTmClientState) -> Self { + Self::Sovereign(cs.into()) + } +} + +impl From for AnyClientState { + fn from(cs: TmClientStateTypes) -> Self { + Self::Tendermint(cs.into()) + } +} + impl Protobuf for AnyClientState {} impl TryFrom for AnyClientState { @@ -269,12 +286,50 @@ where } } -#[derive(Clone, From, TryInto, ConsensusState)] +#[derive(Clone, From, ConsensusState)] pub enum AnyConsensusState { Tendermint(TmConsensusState), Sovereign(SovConsensusState), } +impl TryFrom for TmConsensusStateType { + type Error = ClientError; + + fn try_from(cs: AnyConsensusState) -> Result { + match cs { + AnyConsensusState::Tendermint(cs) => Ok(cs.inner().clone()), + _ => Err(ClientError::UnknownConsensusStateType { + consensus_state_type: "".to_string(), + }), + } + } +} + +impl TryFrom for SovTmConsensusState { + type Error = ClientError; + + fn try_from(cs: AnyConsensusState) -> Result { + match cs { + AnyConsensusState::Sovereign(cs) => Ok(cs.inner().clone()), + _ => Err(ClientError::UnknownConsensusStateType { + consensus_state_type: "".to_string(), + }), + } + } +} + +impl From for AnyConsensusState { + fn from(cs: SovTmConsensusState) -> Self { + Self::Sovereign(cs.into()) + } +} + +impl From for AnyConsensusState { + fn from(cs: TmConsensusStateType) -> Self { + Self::Tendermint(cs.into()) + } +} + impl Protobuf for AnyConsensusState {} impl TryFrom for AnyConsensusState { diff --git a/modules/sov-ibc/src/context.rs b/modules/sov-ibc/src/context.rs index 9a5e3baa..79214bb6 100644 --- a/modules/sov-ibc/src/context.rs +++ b/modules/sov-ibc/src/context.rs @@ -2,7 +2,6 @@ use core::time::Duration; use std::cell::RefCell; use std::rc::Rc; -use ibc_client_tendermint::client_state::ClientState as TmClientState; use ibc_core::channel::types::channel::ChannelEnd; use ibc_core::channel::types::commitment::{AcknowledgementCommitment, PacketCommitment}; use ibc_core::channel::types::error::{ChannelError, PacketError}; @@ -14,21 +13,22 @@ use ibc_core::connection::types::error::ConnectionError; use ibc_core::connection::types::ConnectionEnd; use ibc_core::handler::types::error::ContextError; use ibc_core::handler::types::events::IbcEvent; -use ibc_core::host::types::identifiers::{ClientId, ConnectionId, Sequence}; +use ibc_core::host::types::identifiers::{ConnectionId, Sequence}; use ibc_core::host::types::path::{ - AckPath, ChannelEndPath, ClientConnectionPath, ClientConsensusStatePath, CommitmentPath, - ConnectionPath, ReceiptPath, SeqAckPath, SeqRecvPath, SeqSendPath, + AckPath, ChannelEndPath, ClientConnectionPath, CommitmentPath, ConnectionPath, ReceiptPath, + SeqAckPath, SeqRecvPath, SeqSendPath, }; use ibc_core::host::{ExecutionContext, ValidationContext}; -use ibc_core::primitives::proto::Any; use ibc_core::primitives::{Signer, Timestamp}; +use sov_celestia_client::client_state::ClientState; +use sov_celestia_client::consensus_state::ConsensusState; use sov_modules_api::{ Context, DaSpec, EventEmitter, ModuleInfo, Spec, StateMapAccessor, StateValueAccessor, StateVecAccessor, WorkingSet, }; use sov_state::Prefix; -use crate::clients::{AnyClientState, AnyConsensusState}; +use crate::clients::AnyConsensusState; use crate::event::auxiliary_packet_events; use crate::Ibc; @@ -70,54 +70,13 @@ where Da: DaSpec, { type V = Self; - type E = Self; - type AnyConsensusState = AnyConsensusState; - type AnyClientState = AnyClientState; + type HostClientState = ClientState; + type HostConsensusState = ConsensusState; fn get_client_validation_context(&self) -> &Self::V { self } - fn client_state(&self, client_id: &ClientId) -> Result { - self.ibc - .client_state_map - .get(client_id, *self.working_set.borrow_mut()) - .ok_or( - ClientError::ClientStateNotFound { - client_id: client_id.clone(), - } - .into(), - ) - } - - fn decode_client_state(&self, client_state: Any) -> Result { - let tm_client_state: TmClientState = client_state.try_into()?; - - Ok(tm_client_state.into()) - } - - fn consensus_state( - &self, - client_cons_state_path: &ClientConsensusStatePath, - ) -> Result { - self.ibc - .consensus_state_map - .get(client_cons_state_path, *self.working_set.borrow_mut()) - .ok_or( - ClientError::ConsensusStateNotFound { - client_id: client_cons_state_path.client_id.clone(), - height: Height::new( - client_cons_state_path.revision_number, - client_cons_state_path.revision_height, - ) - .map_err(|_| ClientError::Other { - description: "Height cannot be zero".to_string(), - })?, - } - .into(), - ) - } - fn host_height(&self) -> Result { let context = self.context.clone().ok_or(ClientError::Other { description: "Context not found".to_string(), @@ -157,10 +116,22 @@ where Ok(timestamp) } + fn client_counter(&self) -> Result { + self.ibc + .client_counter + .get(*self.working_set.borrow_mut()) + .ok_or( + ClientError::Other { + description: "Client counter not found".to_string(), + } + .into(), + ) + } + fn host_consensus_state( &self, height: &Height, - ) -> Result { + ) -> Result { // TODO: In order to correctly implement this, we need to first define // the `ConsensusState` protobuf definition that SDK chains will use let host_consensus_state = self @@ -171,19 +142,23 @@ where description: "Host consensus state not found".to_string(), })?; - Ok(host_consensus_state.clone()) + match host_consensus_state { + AnyConsensusState::Sovereign(consensus_state) => Ok(consensus_state), + _ => Err(ClientError::Other { + description: "Invalid host consensus state".to_string(), + } + .into()), + } } - fn client_counter(&self) -> Result { - self.ibc - .client_counter - .get(*self.working_set.borrow_mut()) - .ok_or( - ClientError::Other { - description: "Client counter not found".to_string(), - } - .into(), - ) + fn validate_self_client( + &self, + client_state_of_host_on_counterparty: Self::HostClientState, + ) -> Result<(), ContextError> { + // Note: We can optionally implement this. + // It would require having a Protobuf definition of the chain's `ClientState` that other chains would use. + // The relayer sends us this `ClientState` as stored on other chains, and we validate it here. + Ok(()) } fn connection_end(&self, conn_id: &ConnectionId) -> Result { @@ -201,16 +176,6 @@ where ) } - fn validate_self_client( - &self, - client_state_of_host_on_counterparty: Any, - ) -> Result<(), ContextError> { - // Note: We can optionally implement this. - // It would require having a Protobuf definition of the chain's `ClientState` that other chains would use. - // The relayer sends us this `ClientState` as stored on other chains, and we validate it here. - Ok(()) - } - fn commitment_prefix(&self) -> CommitmentPrefix { let module_prefix: Prefix = self.ibc.prefix().into(); @@ -361,6 +326,8 @@ where S: Spec, Da: DaSpec, { + type E = Self; + fn get_client_execution_context(&mut self) -> &mut Self::E { self } diff --git a/modules/sov-ibc/src/rpc/context.rs b/modules/sov-ibc/src/rpc/context.rs index a7e49dbd..6aad6f0b 100644 --- a/modules/sov-ibc/src/rpc/context.rs +++ b/modules/sov-ibc/src/rpc/context.rs @@ -2,6 +2,7 @@ use ibc_client_tendermint::types::client_type as tm_client_type; use ibc_core::channel::types::channel::IdentifiedChannelEnd; use ibc_core::channel::types::error::ChannelError; use ibc_core::channel::types::packet::PacketState; +use ibc_core::client::context::ClientValidationContext; use ibc_core::client::types::Height; use ibc_core::connection::types::error::ConnectionError; use ibc_core::connection::types::IdentifiedConnectionEnd; @@ -11,7 +12,7 @@ use ibc_core::host::types::path::{ AckPath, ChannelEndPath, ClientConnectionPath, ClientConsensusStatePath, CommitmentPath, Path, ReceiptPath, }; -use ibc_core::host::ValidationContext; +use ibc_core::host::{ClientStateRef, ConsensusStateRef, ValidationContext}; use ibc_query::core::context::{ProvableContext, QueryContext}; use sov_modules_api::{DaSpec, Spec, StateMapAccessor, StateValueAccessor, StateVecAccessor}; @@ -33,9 +34,7 @@ where S: Spec, Da: DaSpec, { - fn client_states( - &self, - ) -> Result::AnyClientState)>, ContextError> { + fn client_states(&self) -> Result)>, ContextError> { let client_counter = self .ibc .client_counter @@ -59,7 +58,7 @@ where fn consensus_states( &self, client_id: &ClientId, - ) -> Result::AnyConsensusState)>, ContextError> { + ) -> Result)>, ContextError> { let update_heights: Vec = self .ibc .client_update_heights_vec @@ -69,7 +68,8 @@ where let mut consesnsus_states = Vec::new(); for height in update_heights { - let cs = self.consensus_state(&ClientConsensusStatePath::new( + let client_ctx = self.get_client_validation_context(); + let cs = client_ctx.consensus_state(&ClientConsensusStatePath::new( client_id.clone(), height.revision_number(), height.revision_height(),