You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In informalsystems/hermes#2733, we implemented a mock chain context for testing relayer-next. And #31 tracks the issue of implementing a mock solomachine chain context. This issue follows the same principle and we will implement a mock Cosmos chain context using cosmos/ibc-rs for testing relayer-next.
The mock Cosmos chain context will make use of actual Cosmos chain implementation following the CometBFT (Tendermint) and IBC specs. This is done by using the ibc crate and the tendermint-rs crate to run the Cosmos IBC implementation. The main difference is that this is still a mock chain, hence the entire blockchain state is stored only in memory. The mock Cosmos chain context can be implemented by implementing the one-for-all traits such as OfaBaseChain and forwarding the requests to the ibc crate.
Following the mock Cosmos chain implementation, we can instantiate the relayer to relay between two mock Cosmos chains. This will help in testing the correctness of both relayer-next and the ibc crate.
In a follow up issue, we can also work on implementing the relay context for relaying between a mock Cosmos chain context and an actual Cosmos chain context. This will help test the correctness of the ibc crate without requiring a full build of Rust-based Cosmos chain. This would also reduce the need of using the basecoin-rs project to test the ibc crate.
It is worth noting that this issue is different from #25. In #25, we want to build a purely mock chain context that is independent of any chain implementation. However, the current design of ibc is tightly coupled with low-level logic such as protobuf encoding, merkle proofs, and time. This means that there are more limitations on testing using the mock Cosmos chain context, as compared to testing it using a purely abstract mock chain implementation. Nevertheless, the mock Cosmos chain context serves a different purpose of testing the Cosmos-specific relayer logic, as compared to the purely abstract IBC logic.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate milestone (priority) applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary
In informalsystems/hermes#2733, we implemented a mock chain context for testing relayer-next. And #31 tracks the issue of implementing a mock solomachine chain context. This issue follows the same principle and we will implement a mock Cosmos chain context using cosmos/ibc-rs for testing relayer-next.
The mock Cosmos chain context will make use of actual Cosmos chain implementation following the CometBFT (Tendermint) and IBC specs. This is done by using the
ibc
crate and thetendermint-rs
crate to run the Cosmos IBC implementation. The main difference is that this is still a mock chain, hence the entire blockchain state is stored only in memory. The mock Cosmos chain context can be implemented by implementing the one-for-all traits such asOfaBaseChain
and forwarding the requests to theibc
crate.Following the mock Cosmos chain implementation, we can instantiate the relayer to relay between two mock Cosmos chains. This will help in testing the correctness of both relayer-next and the
ibc
crate.In a follow up issue, we can also work on implementing the relay context for relaying between a mock Cosmos chain context and an actual Cosmos chain context. This will help test the correctness of the
ibc
crate without requiring a full build of Rust-based Cosmos chain. This would also reduce the need of using the basecoin-rs project to test theibc
crate.It is worth noting that this issue is different from #25. In #25, we want to build a purely mock chain context that is independent of any chain implementation. However, the current design of
ibc
is tightly coupled with low-level logic such as protobuf encoding, merkle proofs, and time. This means that there are more limitations on testing using the mock Cosmos chain context, as compared to testing it using a purely abstract mock chain implementation. Nevertheless, the mock Cosmos chain context serves a different purpose of testing the Cosmos-specific relayer logic, as compared to the purely abstract IBC logic.For Admin Use
The text was updated successfully, but these errors were encountered: