Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement mock cosmos chain using ibc-rs, tendermint-rs and basecoin libs #3566

Closed
wants to merge 27 commits into from

Conversation

Farhad-Shabani
Copy link
Member

@Farhad-Shabani Farhad-Shabani commented Aug 25, 2023

Closes: informalsystems/hermes-sdk#24

Context

Given improvements made to basecoin-rs (turning it into a library and moving the store types and implementations into a separate crate from the application part), It became possible to implement a mock cosmos chain.

  • Concerning the consensus engine, a simple block production engine has been used. Without needing to go through the entire voting, validation, transaction, etc. processes that a CometBFT engine requires. This is achieved using the tendermint-rs crates (specifically tendermint-testgen).

  • As for the application itself, the necessary modules (Authentication, Bank, and IBC) have been imported from the basecoin_app crate. This has resulted in a fully operational ibc-rs that can be run in a lightweight in-memory manner.

  • In terms of the store part, the benefit of the in-memory AVL store implementation within basecoin_store can now be realized, which enables proof verification.

  • Within this PR, tests for creating and updating clients are included, and further tests can be added perhaps in separate PRs.

This implementation can serve as a foundation for developing a new mock module in ibc-rs. Additionally, it can be leveraged as an exemplary implementation for the ongoing development of the ibc-rs doc portal.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@Farhad-Shabani Farhad-Shabani changed the base branch from master to soares/relayer-next August 25, 2023 23:41
@Farhad-Shabani Farhad-Shabani marked this pull request as ready for review August 28, 2023 20:10
@soareschen soareschen added the O: relayer-next Objective: work toward relayer v2 label Sep 25, 2023
@soareschen
Copy link
Contributor

soareschen commented Sep 26, 2023

This PR has been moved to informalsystems/hermes-sdk#40

@soareschen soareschen closed this Sep 26, 2023
@romac romac deleted the farhad/mock-cosmos-chain branch September 5, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: relayer-next Objective: work toward relayer v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a mock Cosmos chain context
3 participants