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

Add support for Namada #3705

Merged
merged 129 commits into from
Dec 3, 2024
Merged

Conversation

yito88
Copy link
Contributor

@yito88 yito88 commented Nov 21, 2023

Closes: #XXX

Description

To transfer tokens between Namada and Cosmos-base chains.

  • Add Namada to ChainConfig
  • Reuse CosmosSdkConfig for generating Tendermint light clients
  • Add NamadaChain as ChainEndpoint implementation
    • See crates/relayer/src/chain/namada.rs and files under crates/relayer/src/chain/namada
    • To submit Namada transactions and query
  • Store Namada key to KeyRing

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).

@yito88 yito88 marked this pull request as ready for review November 21, 2023 16:05
@romac romac changed the title Add Namada ChainEndpoint Add support for Namada Jan 18, 2024
Copy link
Contributor

@ljoss17 ljoss17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some nits.
In addition:

  • For the MSRV, it needs to be updated to v1.79.0 due to [email protected] requires rustc 1.79.0
  • For cargo doc, we can use the stable toolchain instead of nightly-2024-04-21

tools/test-framework/src/bootstrap/namada.rs Outdated Show resolved Hide resolved
tools/test-framework/src/chain/cli/query.rs Outdated Show resolved Hide resolved
tools/test-framework/src/chain/config/namada.rs Outdated Show resolved Hide resolved
tools/test-framework/src/chain/config/namada.rs Outdated Show resolved Hide resolved
tools/test-framework/src/chain/config/namada.rs Outdated Show resolved Hide resolved
tools/test-framework/src/relayer/transfer.rs Outdated Show resolved Hide resolved
crates/relayer-cli/src/commands/keys/add.rs Outdated Show resolved Hide resolved
crates/relayer-cli/src/commands/keys/add.rs Outdated Show resolved Hide resolved
@ljoss17
Copy link
Contributor

ljoss17 commented Nov 26, 2024

Sorry it seems that for cargo doc we need the nightly build, toolchain: nightly-2024-10-15 should work.
For the Rust MSRV we can update cargo msrv to v0.17.1 and remove the -- 'cargo check --all-features' from the CLI call

workflow_dispatch:
pull_request:
paths:
- .github/workflows/integration.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- .github/workflows/integration.yaml
- .github/workflows/namada.yaml

fail-fast: false
matrix:
chain:
- package: .#gaia18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljoss17 Let's add Osmosis there as well?

Copy link
Contributor

@ljoss17 ljoss17 Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could also update to Gaia 20. I will look into this

env:
OPERATING_SYSTEM: Linux
run: |
release_url=$(curl -s "https://api.github.com/repos/anoma/namada/releases/188247367" | grep "browser_download_url" | cut -d '"' -f 4 | grep "$OPERATING_SYSTEM")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yito88 Is there a way to automatically pull the latest deployed version of Namada, to ensure we stay up to date consistently without having to change the workflow file everytime?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way for now I think. We need to update the URL when a new version is released.

@@ -6,9 +6,23 @@
FROM rust:1-buster AS build-env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljoss17 Let's trigger this workflow manually from the branch before merging to make sure it works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 28 to 29
// TODO: extract Tendermint-related configs into a separate substructure
// that can be used both by CosmosSdkConfig and configs for nonSDK chains.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljoss17 Let's open an issue for this, would make the code much nicer eventually

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done #4264

@romac romac merged commit 00a0cf5 into informalsystems:master Dec 3, 2024
@romac
Copy link
Member

romac commented Dec 3, 2024

Amazing work @yito88, thank you so much for all this stellar work you have done! 🚀🙏🥇💙

And thanks so much @ljoss17 as well for shepherding this PR for the past year! 🙌🙏💙

ljoss17 added a commit that referenced this pull request Dec 13, 2024
ljoss17 added a commit that referenced this pull request Dec 13, 2024
Add support for relaying between Namada and Cosmos-base chains.

- Add Namada to `ChainConfig`
- Reuse `CosmosSdkConfig` for generating Tendermint light clients
- Add `NamadaChain` as `ChainEndpoint` implementation
  - See `crates/relayer/src/chain/namada.rs` and files under `crates/relayer/src/chain/namada`
  - To submit Namada transactions and query
- Store Namada key to KeyRing
---------

Signed-off-by: Yuji Ito <[email protected]>
Co-authored-by: Luca Joss <[email protected]>
Co-authored-by: Luca Joss <[email protected]>
Co-authored-by: Gianmarco Fraccaroli <[email protected]>
Co-authored-by: Tomáš Zemanovič <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
romac pushed a commit that referenced this pull request Dec 13, 2024
github-merge-queue bot pushed a commit that referenced this pull request Dec 13, 2024
* Update Cargo.lock

* Revert "Add support for Namada (#3705)"

This reverts commit 00a0cf5.

* Cargo clippy fix

* Formatting

---------

Co-authored-by: Luca Joss <[email protected]>
ljoss17 added a commit that referenced this pull request Dec 13, 2024
Add support for relaying between Namada and Cosmos-base chains.

- Add Namada to `ChainConfig`
- Reuse `CosmosSdkConfig` for generating Tendermint light clients
- Add `NamadaChain` as `ChainEndpoint` implementation
  - See `crates/relayer/src/chain/namada.rs` and files under `crates/relayer/src/chain/namada`
  - To submit Namada transactions and query
- Store Namada key to KeyRing
---------

Signed-off-by: Yuji Ito <[email protected]>
Co-authored-by: Luca Joss <[email protected]>
Co-authored-by: Luca Joss <[email protected]>
Co-authored-by: Gianmarco Fraccaroli <[email protected]>
Co-authored-by: Tomáš Zemanovič <[email protected]>
Co-authored-by: Romain Ruetschi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants