diff --git a/Cargo.lock b/Cargo.lock index 85f4edf..e4eb119 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,26 +4,15 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", "version_check", ] -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", -] - [[package]] name = "alloy-primitives" version = "0.6.2" @@ -151,19 +140,19 @@ dependencies = [ [[package]] name = "borsh" -version = "0.10.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "40f9ca3698b2e4cb7c15571db0abc5551dca417a21ae8140460b50309bb2cc62" dependencies = [ "borsh-derive", - "hashbrown 0.13.2", + "hashbrown 0.12.3", ] [[package]] name = "borsh-derive" -version = "0.10.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "598b3eacc6db9c3ee57b22707ad8f6a8d2f6d442bfe24ffeb8cbb70ca59e6a35" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", @@ -174,9 +163,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.10.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +checksum = "186b734fa1c9f6743e90c95d7233c9faab6360d1a96d4ffa19d9cfd1e9350f8a" dependencies = [ "proc-macro2", "quote", @@ -185,9 +174,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "99b7ff1008316626f485991b960ade129253d4034014616b94f309a15366cc49" dependencies = [ "proc-macro2", "quote", @@ -224,7 +213,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "commitments" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "alloy-sol-types", "crypto", @@ -273,7 +262,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", @@ -584,9 +573,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", @@ -614,16 +603,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.3", + "ahash", ] [[package]] @@ -803,7 +783,7 @@ dependencies = [ [[package]] name = "lcp-proto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "ibc-proto", "prost", @@ -813,7 +793,7 @@ dependencies = [ [[package]] name = "lcp-types" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", @@ -889,7 +869,7 @@ dependencies = [ [[package]] name = "light-client" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "bincode", "commitments", @@ -1530,7 +1510,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "store" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "log", diff --git a/Cargo.toml b/Cargo.toml index 35b1269..15f1b12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,5 @@ serde = { version = "1.0", default-features = false } displaydoc = { version = "0.2", default-features = false } tiny-keccak = { version = "1.4" } -light-client = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.9", default-features = false, features = ["ibc"] } +light-client = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.10", default-features = false, features = ["ibc"] } ethereum-ibc = { git = "https://github.com/datachainlab/ethereum-ibc-rs", rev = "v0.0.12", default-features = false } diff --git a/rust-toolchain b/rust-toolchain index cd5e8eb..75a4f2e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2022-10-22 +nightly-2024-09-05 diff --git a/src/lib.rs b/src/lib.rs index e8c375d..363ff8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #![allow(clippy::result_large_err)] #![allow(clippy::large_enum_variant)] @@ -14,6 +14,7 @@ pub mod message; pub mod state; pub use ethereum_ibc as ibc; +#[allow(unused_imports)] mod internal_prelude { pub use alloc::boxed::Box; pub use alloc::format; diff --git a/src/state.rs b/src/state.rs index 35012c2..bf08c85 100644 --- a/src/state.rs +++ b/src/state.rs @@ -110,9 +110,7 @@ pub fn gen_state_id Result { Ok(gen_state_id_from_any( - &canonicalize_client_state(client_state).try_into().unwrap(), - &canonicalize_consensus_state(consensus_state) - .try_into() - .unwrap(), + &canonicalize_client_state(client_state).into(), + &canonicalize_consensus_state(consensus_state).into(), )?) }