cosmos / ibc-rs

Rust implementation of the Inter-Blockchain Communication (IBC) protocol.
Apache License 2.0
182 stars 74 forks source link

Make custom `Validation/ExecutionContext` under ICS-07 portable #1163

Closed Farhad-Shabani closed 2 months ago

Farhad-Shabani commented 2 months ago

Feature Summary

The context.rs module under the ICS-07 contains a set of custom Validation/ExecutionContext traits, currently tightly coupled with ConsensusStateType specific to Tendermint light client implementation. However, their potential extends beyond Tendermint to benefit other light client implementations, including Sovereign's, hosted in the sovereign-ibc repository. Although initially designed for ICS-07, the methods within these traits are sufficiently general to be valuable for a wider range of light clients.

Proposal

To enhance their usability across diverse light client implementations, we propose relocating these traits from ICS-07 to ICS-02, aligning them with other client context traits. They would serve as optional traits, enriching client capabilities in state validation. This adjustment aims to foster code reusability and contribute to a universal library for implementing clients as CosmWasm contracts.