diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 97987c4515..4c52ea9c14 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -19,7 +19,6 @@ jobs: with: path: ~/.cargo/bin key: ${{ runner.os }}-cargo-audit-v0.11.2 - - uses: actions-rs/audit-check@v1 + - uses: actions-rs/audit-check@v1.2.0 with: - args: --ignore RUSTSEC-2019-0031 token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3df6b1c96f..2d83efa30d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### IMPROVEMENTS +- [ibc] + - Reinstated `ics23` dependency ([#854]) - [ibc-relayer] - Change the default for client creation to allow governance recovery in case of expiration or misbehaviour. ([#785]) @@ -20,6 +22,7 @@ [#785]: https://github.com/informalsystems/ibc-rs/issues/785 [#811]: https://github.com/informalsystems/ibc-rs/issues/811 +[#854]: https://github.com/informalsystems/ibc-rs/issues/854 [#851]: https://github.com/informalsystems/ibc-rs/issues/851 diff --git a/Cargo.lock b/Cargo.lock index 93ded167a3..46970d72e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,9 +108,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "async-stream" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3670df70cbc01729f901f94c887814b3c68db038aad1329a418bae178bc5295c" +checksum = "0a26cb53174ddd320edfff199a853f93d571f48eeb4dde75e67a9a3dbb7b7e5e" dependencies = [ "async-stream-impl", "futures-core", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3548b8efc9f8e8a5a0a2808c5bd8451a9031b9e5b879a79590304ae928b0a70" +checksum = "db134ba52475c060f3329a8ef0f8786d6b872ed01515d4b79c162e5798da1340" dependencies = [ "proc-macro2", "quote", @@ -173,9 +173,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "78ed203b9ba68b242c62b3fb7480f589dd49829be1edb3fe8fc8b4ffda2dcb8d" dependencies = [ "addr2line", "cfg-if 1.0.0", @@ -260,9 +260,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ + "block-padding", "generic-array", ] +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + [[package]] name = "bumpalo" version = "3.6.1" @@ -1077,15 +1084,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.3.6" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589" +checksum = "4a1ce40d6fc9764887c2fdc7305c3dcc429ba11ff981c1509416afd5697e4437" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "humantime" @@ -1105,9 +1112,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.5" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" +checksum = "5f006b8784cfb01fe7aa9c46f5f5cd4cf5c85a8c612a0653ec97642979062665" dependencies = [ "bytes", "futures-channel", @@ -1184,6 +1191,7 @@ dependencies = [ "chrono", "dyn-clonable", "ibc-proto", + "ics23", "modelator", "prost", "prost-types", @@ -1294,6 +1302,21 @@ dependencies = [ "tracing-subscriber 0.2.17", ] +[[package]] +name = "ics23" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a575acddcafc39b28ccc3c685a0029b58e4741af99cd6c9fa11406ad4c4085d6" +dependencies = [ + "anyhow", + "bytes", + "hex", + "prost", + "ripemd160", + "sha2", + "sha3", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1302,9 +1325,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ "matches", "unicode-bidi", @@ -1384,6 +1407,12 @@ dependencies = [ "sha2", ] +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + [[package]] name = "lazy_static" version = "1.4.0" @@ -1392,9 +1421,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lexical-core" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec", "bitflags", @@ -1706,18 +1735,18 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-project" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6" +checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5" +checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" dependencies = [ "proc-macro2", "quote", @@ -2032,9 +2061,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustls" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64", "log", @@ -2273,6 +2302,18 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer", + "digest", + "keccak", + "opaque-debug", +] + [[package]] name = "sharded-slab" version = "0.1.1" @@ -2319,9 +2360,9 @@ checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b" [[package]] name = "slab" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "sled" @@ -2411,9 +2452,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb" +checksum = "b9505f307c872bab8eb46f77ae357c8eba1fdacead58ee5a850116b1d7f82883" dependencies = [ "proc-macro2", "quote", @@ -2999,9 +3040,9 @@ dependencies = [ [[package]] name = "utf-8" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" @@ -3011,9 +3052,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "vcpkg" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" +checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d" [[package]] name = "vec_map" @@ -3191,18 +3232,18 @@ checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] name = "zeroize" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" +checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" dependencies = [ "proc-macro2", "quote", diff --git a/modules/Cargo.toml b/modules/Cargo.toml index ac48d0f85a..ae2c86f26d 100644 --- a/modules/Cargo.toml +++ b/modules/Cargo.toml @@ -21,6 +21,7 @@ mocks = [ "tendermint-testgen", "sha2" ] [dependencies] # Proto definitions for all IBC-related interfaces, e.g., connections or channels. ibc-proto = { version = "0.8.0", path = "../proto" } +ics23 = "0.6.5" anomaly = "0.2.0" chrono = "0.4" thiserror = "1.0.24" diff --git a/modules/src/ics02_client/error.rs b/modules/src/ics02_client/error.rs index 672a024b93..13627542a8 100644 --- a/modules/src/ics02_client/error.rs +++ b/modules/src/ics02_client/error.rs @@ -2,7 +2,7 @@ use anomaly::{BoxError, Context}; use thiserror::Error; use crate::ics02_client::client_type::ClientType; -use crate::ics23_commitment::error::Kind as Ics23Kind; +use crate::ics23_commitment::error::Error as Ics23Error; use crate::ics24_host::error::ValidationKind; use crate::ics24_host::identifier::ClientId; use crate::Height; @@ -78,10 +78,10 @@ pub enum Kind { InvalidAddress, #[error("invalid proof for the upgraded client state")] - InvalidUpgradeClientProof(Ics23Kind), + InvalidUpgradeClientProof(Ics23Error), #[error("invalid proof for the upgraded consensus state")] - InvalidUpgradeConsensusStateProof(Ics23Kind), + InvalidUpgradeConsensusStateProof(Ics23Error), #[error("mismatch between client and arguments types, expected: {0:?}")] ClientArgsTypeMismatch(ClientType), diff --git a/modules/src/ics02_client/msgs/upgrade_client.rs b/modules/src/ics02_client/msgs/upgrade_client.rs index 4379b8f4ad..d9f857edfe 100644 --- a/modules/src/ics02_client/msgs/upgrade_client.rs +++ b/modules/src/ics02_client/msgs/upgrade_client.rs @@ -80,9 +80,9 @@ impl TryFrom for MsgUpgradeAnyClient { consensus_state: AnyConsensusState::try_from(raw_consensus_state) .map_err(|_| Kind::InvalidRawConsensusState)?, proof_upgrade_client: MerkleProof::try_from(c_bytes) - .map_err(|e| Kind::InvalidUpgradeClientProof(e.kind().clone()))?, + .map_err(Kind::InvalidUpgradeClientProof)?, proof_upgrade_consensus_state: MerkleProof::try_from(cs_bytes) - .map_err(|e| Kind::InvalidUpgradeConsensusStateProof(e.kind().clone()))?, + .map_err(Kind::InvalidUpgradeConsensusStateProof)?, signer: proto_msg.signer.into(), }) } diff --git a/modules/src/ics07_tendermint/client_state.rs b/modules/src/ics07_tendermint/client_state.rs index 38c6216e03..75b85185a7 100644 --- a/modules/src/ics07_tendermint/client_state.rs +++ b/modules/src/ics07_tendermint/client_state.rs @@ -1,4 +1,5 @@ use std::convert::{TryFrom, TryInto}; +use std::str::FromStr; use std::time::Duration; use serde::Serialize; @@ -13,10 +14,9 @@ use crate::ics02_client::client_state::AnyClientState; use crate::ics02_client::client_type::ClientType; use crate::ics07_tendermint::error::{Error, Kind}; use crate::ics07_tendermint::header::Header; -use crate::ics23_commitment::merkle::cosmos_specs; +use crate::ics23_commitment::specs::ProofSpecs; use crate::ics24_host::identifier::ChainId; use crate::Height; -use std::str::FromStr; #[derive(Clone, Debug, PartialEq, Eq, Serialize)] pub struct ClientState { @@ -212,7 +212,7 @@ impl From for RawClientState { max_clock_drift: Some(value.max_clock_drift.into()), frozen_height: Some(value.frozen_height.into()), latest_height: Some(value.latest_height.into()), - proof_specs: cosmos_specs(), + proof_specs: ProofSpecs::cosmos().into(), allow_update_after_expiry: false, allow_update_after_misbehaviour: false, upgrade_path: value.upgrade_path, diff --git a/modules/src/ics23_commitment/commitment.rs b/modules/src/ics23_commitment/commitment.rs index d0658ab232..e3efad2d11 100644 --- a/modules/src/ics23_commitment/commitment.rs +++ b/modules/src/ics23_commitment/commitment.rs @@ -6,7 +6,7 @@ use subtle_encoding::{Encoding, Hex}; use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; -use crate::ics23_commitment::error::{Error, Kind}; +use crate::ics23_commitment::error::Error; #[derive(Clone, PartialEq, Eq, Serialize)] #[serde(transparent)] @@ -92,8 +92,8 @@ impl TryFrom for RawMerkleProof { fn try_from(value: CommitmentProofBytes) -> Result { let value: Vec = value.into(); - let res: RawMerkleProof = prost::Message::decode(value.as_ref()) - .map_err(|e| Kind::InvalidRawMerkleProof.context(e))?; + let res: RawMerkleProof = + prost::Message::decode(value.as_ref()).map_err(Error::InvalidRawMerkleProof)?; Ok(res) } } diff --git a/modules/src/ics23_commitment/error.rs b/modules/src/ics23_commitment/error.rs index 07d4490c80..d5c6a68c6c 100644 --- a/modules/src/ics23_commitment/error.rs +++ b/modules/src/ics23_commitment/error.rs @@ -1,16 +1,11 @@ -use anomaly::{BoxError, Context}; +use prost::DecodeError; use thiserror::Error; -pub type Error = anomaly::Error; - #[derive(Clone, Debug, Error, PartialEq, Eq)] -pub enum Kind { +pub enum Error { #[error("invalid raw merkle proof")] - InvalidRawMerkleProof, -} + InvalidRawMerkleProof(DecodeError), -impl Kind { - pub fn context(self, source: impl Into) -> Context { - Context::new(self, Some(source.into())) - } + #[error("failed to decode commitment proof")] + CommitmentProofDecodingFailed(DecodeError), } diff --git a/modules/src/ics23_commitment/merkle.rs b/modules/src/ics23_commitment/merkle.rs index d23b23bc5e..68fd7f183d 100644 --- a/modules/src/ics23_commitment/merkle.rs +++ b/modules/src/ics23_commitment/merkle.rs @@ -1,9 +1,10 @@ +use tendermint::merkle::proof::Proof; + use ibc_proto::ibc::core::commitment::v1::MerklePath; use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; use crate::ics23_commitment::commitment::{CommitmentPrefix, CommitmentProofBytes}; use crate::ics23_commitment::error::Error; -use tendermint::merkle::proof::Proof; pub fn apply_prefix( prefix: &CommitmentPrefix, @@ -15,53 +16,8 @@ pub fn apply_prefix( let mut result: Vec = vec![format!("{:?}", prefix)]; result.append(&mut path); - Ok(MerklePath { key_path: result }) -} -// TODO - get this from the ics23 crate proof -pub fn cosmos_specs() -> Vec { - vec![ - // Format of proofs-iavl (iavl merkle proofs) - ibc_proto::ics23::ProofSpec { - leaf_spec: Some(ibc_proto::ics23::LeafOp { - hash: 1, - prehash_key: 0, - prehash_value: 1, - length: 1, - prefix: vec![0], - }), - inner_spec: Some(ibc_proto::ics23::InnerSpec { - child_order: vec![0, 1], - child_size: 33, - min_prefix_length: 4, - max_prefix_length: 12, - empty_child: vec![], - hash: 1, - }), - max_depth: 0, - min_depth: 0, - }, - // Format of proofs-tendermint (crypto/ merkle SimpleProof) - ibc_proto::ics23::ProofSpec { - leaf_spec: Some(ibc_proto::ics23::LeafOp { - hash: 1, - prehash_key: 0, - prehash_value: 1, - length: 1, - prefix: vec![0], - }), - inner_spec: Some(ibc_proto::ics23::InnerSpec { - child_order: vec![0, 1], - child_size: 32, - min_prefix_length: 1, - max_prefix_length: 1, - empty_child: vec![], - hash: 1, - }), - max_depth: 0, - min_depth: 0, - }, - ] + Ok(MerklePath { key_path: result }) } #[derive(Clone, Debug, PartialEq)] @@ -121,21 +77,16 @@ pub struct MerkleProof { // } // } -use prost::Message; +pub fn convert_tm_to_ics_merkle_proof(tm_proof: &Proof) -> Result { + let mut proofs = vec![]; -pub fn convert_tm_to_ics_merkle_proof( - tm_proof: Option, -) -> Result, Error> { - if let Some(proof) = tm_proof { - let mut mproofs: Vec = vec![]; - for (_i, op) in proof.ops.iter().enumerate() { - let data = op.clone().data; - let mut parsed = ibc_proto::ics23::CommitmentProof { proof: None }; - parsed.merge(data.as_slice()).unwrap(); - mproofs.append(&mut vec![parsed]); - } - Ok(Some(RawMerkleProof { proofs: mproofs })) - } else { - Ok(None) + for op in &tm_proof.ops { + let mut parsed = ibc_proto::ics23::CommitmentProof { proof: None }; + prost::Message::merge(&mut parsed, op.data.as_slice()) + .map_err(Error::CommitmentProofDecodingFailed)?; + + proofs.push(parsed); } + + Ok(RawMerkleProof { proofs }) } diff --git a/modules/src/ics23_commitment/mod.rs b/modules/src/ics23_commitment/mod.rs index dbd7f99ea2..885c5dbd1a 100644 --- a/modules/src/ics23_commitment/mod.rs +++ b/modules/src/ics23_commitment/mod.rs @@ -2,3 +2,4 @@ pub mod commitment; pub mod error; pub mod merkle; pub mod mock; +pub mod specs; diff --git a/modules/src/ics23_commitment/specs.rs b/modules/src/ics23_commitment/specs.rs new file mode 100644 index 0000000000..05f6dcc591 --- /dev/null +++ b/modules/src/ics23_commitment/specs.rs @@ -0,0 +1,46 @@ +use ics23::ProofSpec; + +use ibc_proto::ics23::ProofSpec as ProtoProofSpec; + +/// An array of proof specifications. +/// +/// This type encapsulates different types of proof specifications, mostly predefined, e.g., for +/// Cosmos-SDK. +/// Additionally, this type also aids in the conversion from `ProofSpec` types from crate `ics23` +/// into proof specifications as represented in the `ibc_proto` type; see the +/// `From` trait(s) below. +pub struct ProofSpecs { + specs: Vec, +} + +impl ProofSpecs { + /// Returns the specification for Cosmos-SDK proofs + pub fn cosmos() -> Self { + Self { + specs: vec![ + ics23::iavl_spec(), // Format of proofs-iavl (iavl merkle proofs) + ics23::tendermint_spec(), // Format of proofs-tendermint (crypto/ merkle SimpleProof) + ], + } + } +} + +/// Converts from the domain type (which is represented as a vector of `ics23::ProofSpec` +/// to the corresponding proto type (vector of `ibc_proto::ProofSpec`). +/// TODO: fix with https://github.com/informalsystems/ibc-rs/issues/853 +impl From for Vec { + fn from(domain_specs: ProofSpecs) -> Self { + let mut raw_specs = vec![]; + for ds in domain_specs.specs.iter() { + // Both `ProofSpec` types implement trait `prost::Message`. Convert by encoding, then + // decoding into the destination type. + // Safety note: the source and target data structures are identical, hence the + // encode/decode conversion here should be infallible. + let mut encoded = Vec::new(); + prost::Message::encode(ds, &mut encoded).unwrap(); + let decoded: ProtoProofSpec = prost::Message::decode(&*encoded).unwrap(); + raw_specs.push(decoded); + } + raw_specs + } +} diff --git a/relayer/src/chain/cosmos.rs b/relayer/src/chain/cosmos.rs index 69a90a75cb..4ed288942f 100644 --- a/relayer/src/chain/cosmos.rs +++ b/relayer/src/chain/cosmos.rs @@ -1389,12 +1389,16 @@ async fn abci_query( return Err(Kind::EmptyResponseProof.into()); } - let raw_proof_ops = response.proof; + let proof = response + .proof + .map(|p| convert_tm_to_ics_merkle_proof(&p)) + .transpose() + .map_err(Kind::Ics023)?; let response = QueryResponse { value: response.value, - proof: convert_tm_to_ics_merkle_proof(raw_proof_ops).unwrap(), // FIXME height: response.height, + proof, }; Ok(response) diff --git a/relayer/src/error.rs b/relayer/src/error.rs index 70f8eb3228..d19fd46e95 100644 --- a/relayer/src/error.rs +++ b/relayer/src/error.rs @@ -150,6 +150,10 @@ pub enum Kind { #[error("ICS 007 error")] Ics007, + /// ICS 023 error + #[error("ICS 023 error")] + Ics023(#[from] ibc::ics23_commitment::error::Error), + /// Invalid chain identifier #[error("invalid chain identifier format: {0}")] ChainIdentifier(String),