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 parity-scale-codec@3.7.0 requires rustc 1.79.0
  • For cargo doc, we can use the stable toolchain instead of nightly-2024-04-21

@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

Co-authored-by: Romain Ruetschi <github@romac.me>
Signed-off-by: Yuji Ito <yito88@users.noreply.github.com>
@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 <yito88@users.noreply.github.com>
Co-authored-by: Luca Joss <luca@informal.systems>
Co-authored-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Gianmarco Fraccaroli <gianmarco.fraccaroli@gmail.com>
Co-authored-by: Tomáš Zemanovič <tomas@heliax.dev>
Co-authored-by: Romain Ruetschi <github@romac.me>
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 <luca@informal.systems>
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 <yito88@users.noreply.github.com>
Co-authored-by: Luca Joss <luca@informal.systems>
Co-authored-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Gianmarco Fraccaroli <gianmarco.fraccaroli@gmail.com>
Co-authored-by: Tomáš Zemanovič <tomas@heliax.dev>
Co-authored-by: Romain Ruetschi <github@romac.me>
github-merge-queue bot pushed a commit that referenced this pull request Feb 11, 2025
* Update CHANGELOG.md

* Create unclog release

* Bump versions

* Update Cargo.lock

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

This reverts commit 00a0cf5.

* Cargo clippy fix

* Add support for Namada (#3705)

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 <yito88@users.noreply.github.com>
Co-authored-by: Luca Joss <luca@informal.systems>
Co-authored-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Gianmarco Fraccaroli <gianmarco.fraccaroli@gmail.com>
Co-authored-by: Tomáš Zemanovič <tomas@heliax.dev>
Co-authored-by: Romain Ruetschi <github@romac.me>

* Update release to v1.10.5

* Add support for Namada (#3705)

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 <yito88@users.noreply.github.com>
Co-authored-by: Luca Joss <luca@informal.systems>
Co-authored-by: Luca Joss <43531661+ljoss17@users.noreply.github.com>
Co-authored-by: Gianmarco Fraccaroli <gianmarco.fraccaroli@gmail.com>
Co-authored-by: Tomáš Zemanovič <tomas@heliax.dev>
Co-authored-by: Romain Ruetschi <github@romac.me>

* Spellcheck

* fix clippy

* Update nix flake

* Fix query balance command to be compatible with Osmosis v27

* Fix command output parsing for Osmosis

* Set explicit timeout to 4 hours for Namada to Namada CI job

* Add memory swap and reduce CPU overload for Namada<->Namada CI job

* Add jlumbroso/free-disk-space@main step for Namada CI job

* to Namada v1.1.0 (#4293)

* for anoma/namada#3797

* fix unbonding period

* use pos_params.withdrawable_epoch_offset

* just unbonding_len

* Namada v1.1.0

* update Namada url for CI

* ubuntu 24 for Namada binaries

* fix for trusting period

* Use Namada SDK release from crates.io

* Update nix flake

* Update CI with Namada v1.1.1 (#4295)

* update CI for Namada v1.1.1

* update error message

---------

Signed-off-by: Yuji Ito <yito88@users.noreply.github.com>
Co-authored-by: Yuji Ito <yito88@users.noreply.github.com>
Co-authored-by: Gianmarco Fraccaroli <gianmarco.fraccaroli@gmail.com>
Co-authored-by: Tomáš Zemanovič <tomas@heliax.dev>
Co-authored-by: Romain Ruetschi <github@romac.me>
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