diff --git a/.changelog/unreleased/breaking-changes/1291-rename-path-to-merkle-path-in-cw-context.md b/.changelog/unreleased/breaking-changes/1291-rename-path-to-merkle-path-in-cw-context.md new file mode 100644 index 000000000..c5bfb5279 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/1291-rename-path-to-merkle-path-in-cw-context.md @@ -0,0 +1,2 @@ +- [ibc-client-cw] Rename `path` to `merkle_path` in `cw-context` for verify + (non)membership ([\#1291](https://github.com/cosmos/ibc-rs/issues/1291)) diff --git a/cosmwasm/README.md b/cosmwasm/README.md index 7678360b2..bc6c323f7 100644 --- a/cosmwasm/README.md +++ b/cosmwasm/README.md @@ -8,24 +8,24 @@ contracts. Currently, the available packages are: ## IBC Clients -- [ibc-client-cw](./cw-context): Provides utilities and a generic `Context` object +- [ibc-client-cw](./ibc-clients/cw-context): Provides utilities and a generic `Context` object to streamline the implementation of any ibc-rs-powered light clients as CosmWasm contracts. - To utilize the CosmWasm contracts developed with this library, hosting environments must support the CosmWasm module and be using the version of `ibc-go` that supports the `08-wasm` proxy light client. - > [!CAUTION] - > The `ibc-client-cw` is currently in development and should not be - deployed for production use. Users are advised to exercise caution and test - thoroughly in non-production environments. +> [!CAUTION] +> The `ibc-client-cw` is currently in development and should not be + deployed for production use. Users are advised to exercise caution and test + thoroughly in non-production environments. -- [ibc-client-tendermint-cw](./../cosmwasm/ibc-clients/ics07-tendermint): CosmWasm Contract +- [ibc-client-tendermint-cw](./ibc-clients/ics07-tendermint): CosmWasm Contract - > [!TIP] - > The pre-compiled CosmWasm contract for `ibc-client-tendermint-cw` is available - > as Github workflow artifacts at - > [_Actions_](https://github.com/cosmos/ibc-rs/actions/workflows/upload-cw-clients.yaml) - > tab. They can be downloaded - > [during a Github workflow](https://github.com/cosmos/ibc-rs/blob/1098f252c04152812f026520e28e323f3bc0507e/.github/workflows/upload-cw-clients.yaml#L87-L96) - > using `actions/download-artifact@v4` action. +> [!TIP] +> The pre-compiled CosmWasm contract for `ibc-client-tendermint-cw` is available +> as Github workflow artifacts at +> [_Actions_](https://github.com/cosmos/ibc-rs/actions/workflows/upload-cw-clients.yaml) +> tab. They can be downloaded +> [during a Github workflow](https://github.com/cosmos/ibc-rs/blob/1098f252c04152812f026520e28e323f3bc0507e/.github/workflows/upload-cw-clients.yaml#L87-L96) +> using `actions/download-artifact@v4` action. diff --git a/cosmwasm/ibc-clients/cw-context/src/types/msgs.rs b/cosmwasm/ibc-clients/cw-context/src/types/msgs.rs index 59f96ed48..499bb9548 100644 --- a/cosmwasm/ibc-clients/cw-context/src/types/msgs.rs +++ b/cosmwasm/ibc-clients/cw-context/src/types/msgs.rs @@ -122,7 +122,7 @@ pub struct MerklePath { #[cw_serde] pub struct VerifyMembershipMsgRaw { pub proof: Binary, - pub path: MerklePath, + pub merkle_path: MerklePath, pub value: Binary, pub height: RawHeight, pub delay_block_period: u64, @@ -144,8 +144,8 @@ impl TryFrom for VerifyMembershipMsg { fn try_from(mut raw: VerifyMembershipMsgRaw) -> Result { let proof = CommitmentProofBytes::try_from(raw.proof.to_vec())?; - let prefix = CommitmentPrefix::from_bytes(raw.path.key_path.remove(0)); - let path = PathBytes::flatten(raw.path.key_path); + let prefix = CommitmentPrefix::from_bytes(raw.merkle_path.key_path.remove(0)); + let path = PathBytes::flatten(raw.merkle_path.key_path); let height = Height::try_from(raw.height)?; Ok(Self { @@ -163,7 +163,7 @@ impl TryFrom for VerifyMembershipMsg { #[cw_serde] pub struct VerifyNonMembershipMsgRaw { pub proof: Binary, - pub path: MerklePath, + pub merkle_path: MerklePath, pub height: RawHeight, pub delay_block_period: u64, pub delay_time_period: u64, @@ -183,8 +183,8 @@ impl TryFrom for VerifyNonMembershipMsg { fn try_from(mut raw: VerifyNonMembershipMsgRaw) -> Result { let proof = CommitmentProofBytes::try_from(raw.proof.to_vec())?; - let prefix = CommitmentPrefix::from_bytes(raw.path.key_path.remove(0)); - let path = PathBytes::flatten(raw.path.key_path); + let prefix = CommitmentPrefix::from_bytes(raw.merkle_path.key_path.remove(0)); + let path = PathBytes::flatten(raw.merkle_path.key_path); let height = raw.height.try_into()?; Ok(Self { @@ -277,7 +277,7 @@ mod test { "delay_time_period":0, "delay_block_period":0, "proof":"CuECCt4CChhjb25uZWN0aW9ucy9jb25uZWN0aW9uLTASWgoPMDctdGVuZGVybWludC0wEiMKATESDU9SREVSX09SREVSRUQSD09SREVSX1VOT1JERVJFRBgCIiAKCTA4LXdhc20tMBIMY29ubmVjdGlvbi0wGgUKA2liYxoLCAEYASABKgMAAkgiKQgBEiUCBHAg3HTYmBAMxlr6u0mv6wCpm3ur2WQc7A3Af6aV7Ye0Fe0gIisIARIEBAZwIBohIHXEkQ9RIH08ZZYBIP6THxOOJiRmjXWGn1G4RCWT3V6rIisIARIEBgxwIBohIEUjGWV7YLPEzdFVLAb0lv4VvP7A+l1TqFkjpx1kDKAPIikIARIlCBhwILWsAKEot+2MknVyn5zcS0qsqVhRj4AHpgDx7fNPbfhtICIpCAESJQxAcCCzyYMGE+CdCltudr1ddHvCJrqv3kl/i7YnMLx3XWJt/yAK/AEK+QEKA2liYxIg2nvqL76rejXXGlX6ng/UKrbw+72C8uKKgM2vP0JKj1QaCQgBGAEgASoBACIlCAESIQEGuZwNgRn/HtvL4WXQ8ZM327wIDmd8iOV6oq52fr8PDyInCAESAQEaIKplBAbqDXbjndQ9LqapHj/aockI/CGnymjl5izIEVY5IiUIARIhAdt4G8DCLINAaaJnhUMIzv74AV3zZiugAyyZ/lWYRv+cIiUIARIhAf+sohoEV+uWeKThAPEbqCUivWT4H8KNT7Giw9//LsyvIicIARIBARogNHO4HC5KxPCwBdQGgBCscVtEKw+YSn2pnf654Y3Oxik=", - "path":{"key_path":["aWJj","Y29ubmVjdGlvbnMvY29ubmVjdGlvbi0w"]}, + "merkle_path":{"key_path":["aWJj","Y29ubmVjdGlvbnMvY29ubmVjdGlvbi0w"]}, "value":"Cg8wNy10ZW5kZXJtaW50LTASIwoBMRINT1JERVJfT1JERVJFRBIPT1JERVJfVU5PUkRFUkVEGAIiIAoJMDgtd2FzbS0wEgxjb25uZWN0aW9uLTAaBQoDaWJj" } }"#;