Skip to content

Conversation

@tbruyelle
Copy link
Contributor

@tbruyelle tbruyelle commented Aug 18, 2025

The r/aib/ibc/core realm provides the expected functions, CreateClient, RegisterCounterParty, UpdateClient, UpgradeClient , SendPacket , RecvPacket, Acknowlegdment and Timeout. Most of them are TODOs for now, but they are callable.

The r/aib/ibc/apps realm provides applications that implements the p/aib/ibc/app.IBCApp interface. Such apps must be registered into the core module using the core.RegisterApp() function.

To run a gno node, clone this repo, checkout the aib/feat/ibc branch, run make install and finally run gnodev inside the folder. This will pop a node and you should be able to see the functions at http://localhost:8888/r/aib/ibc/core$help. This help page also gives instructions to call the functions, but only with MsgCall. This kind of call won't work with most of the IBC functions, because they use complex args. See the README for detailed call instructions.

Once created, clients are visible here http://localhost:8888/r/aib/ibc/core:clients

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Aug 18, 2025

🛠 PR Checks Summary

🔴 Maintainers must be able to edit this pull request (more info)

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🔴 Maintainers must be able to edit this pull request (more info)
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: allinbits/gno)

Then

🔴 Requirement not satisfied
└── 🔴 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED")
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🟢 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@tbruyelle tbruyelle force-pushed the aib/feat/ibc branch 2 times, most recently from 30cc5e4 to 01c52d9 Compare September 9, 2025 08:51
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Sep 16, 2025
@tbruyelle tbruyelle force-pushed the aib/feat/ibc branch 2 times, most recently from 66e6889 to 6e65ab7 Compare September 19, 2025 14:11
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tm2/pkg/store/types/ics23.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@tbruyelle tbruyelle changed the title [WIP] r/aib/ibc feat(wip): r/aib/ibc Sep 20, 2025
@github-actions github-actions bot added 📦 🌐 tendermint v2 Issues or PRs tm2 related 🐳 devops 🐹 golang Pull requests that update Go code 🚀 ci 🛠️ gnodev labels Sep 26, 2025
@tbruyelle tbruyelle force-pushed the aib/feat/ibc branch 2 times, most recently from 5b90837 to 6e1f8c8 Compare September 26, 2025 12:45
zivkovicmilos added a commit that referenced this pull request Sep 29, 2025
The IBC protocol is based on merkle proofs, and over the years a
standard of merkle proof representation has emerged:
[ICS23](https://github.com/cosmos/ics23). The simplest way for Gno to be
compatible with this protocol is to migrate the iavl implementation to
[`cosmos/iavl`](https://github.com/cosmos/iavl), which already supports
ICS23.

```diff
- Therefore, this PR deprecates `tm2/pkg/iavl` in favour of imported `cosmos/iavl`.
+ Therefore, this PR replaces the code of `tm2/pkg/iavl` with the code of `cosmos/iavl@v1.3.5`.
```

Note that `cosmos/iavl` is just a maintened version of `tm2/pkg/iavl`,
which has received numerous improvements and bug fixes over the years.


In addition to the benefit of making Gno IBC-ready, this change also
eliminates some drawbacks of `tm2/pkg/iavl`:
- `tm2/pkg/iavl` uses the legacy `range-proof` under the hood which is
considered unsafe. It has an exploited vulnerability (see DragonFruit
[[1](https://github.com/cosmos/iavl/issues/584)][[2](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-dragonfruit/7614)])
- `tm2/pkg/iavl` proof generation is buggy: see
#4369

This change only concerns the proof system. The Gno light client realm
which is the other important piece of the IBCv2 connection between
Gnoland and AtomOne is still under progress
[here](#4655).

> [!IMPORTANT]
> This
[change](https://github.com/gnolang/gno/pull/4656/files#diff-4f1d80300014eb607e44892f6ebdcc31de2c0815669acd54f805b83501311b7fL419)
to the commit info hashing is causing a app hash mismatch when
restarting a node with a binary built from this branch.
> ```
> panic: state.AppHash does not match AppHash after replay. Got
> 76BB396891B9F4415AC49FB72CF81933F407AE6A2C04551814719C9A908B2E8E,
expected
8EDAB60FFD0B2C6BB5AC398417CF0AFBFE6E7D491C830F831F9395DB7FAC522A.
> ```
> Unfortunately without it some tests are failing because ics23 does not
expect to have hashed value. As a result, upgrading a mainnet launched
using `tm2/pkg/iavl` to a new version with `cosmos/iavl` might be
challenging. It's probably a good idea to merge this change for the
initial mainnet.


## For reviewers

- Most of the diff is related to the `DB` interface, because most of
declared methods return an error in `comos/iavl`
- When possible I added a comment for change related to the difference
between `tm2/pkg/iavl` and `cosmos/iavl` implementation.
- Lazy loading has been removed in `cosmos/iavl` so I had no other
choice than removing the option from the Gno store. Anyway this feature
was not used.

---------

Co-authored-by: n0izn0iz <n0izn0iz@users.noreply.github.com>
Co-authored-by: Miloš Živković <milos.zivkovic@tendermint.com>
MikaelVallenet pushed a commit to MikaelVallenet/gno that referenced this pull request Oct 1, 2025
…ng#4656)

The IBC protocol is based on merkle proofs, and over the years a
standard of merkle proof representation has emerged:
[ICS23](https://github.com/cosmos/ics23). The simplest way for Gno to be
compatible with this protocol is to migrate the iavl implementation to
[`cosmos/iavl`](https://github.com/cosmos/iavl), which already supports
ICS23.

```diff
- Therefore, this PR deprecates `tm2/pkg/iavl` in favour of imported `cosmos/iavl`.
+ Therefore, this PR replaces the code of `tm2/pkg/iavl` with the code of `cosmos/iavl@v1.3.5`.
```

Note that `cosmos/iavl` is just a maintened version of `tm2/pkg/iavl`,
which has received numerous improvements and bug fixes over the years.


In addition to the benefit of making Gno IBC-ready, this change also
eliminates some drawbacks of `tm2/pkg/iavl`:
- `tm2/pkg/iavl` uses the legacy `range-proof` under the hood which is
considered unsafe. It has an exploited vulnerability (see DragonFruit
[[1](https://github.com/cosmos/iavl/issues/584)][[2](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-dragonfruit/7614)])
- `tm2/pkg/iavl` proof generation is buggy: see
gnolang#4369

This change only concerns the proof system. The Gno light client realm
which is the other important piece of the IBCv2 connection between
Gnoland and AtomOne is still under progress
[here](gnolang#4655).

> [!IMPORTANT]
> This
[change](https://github.com/gnolang/gno/pull/4656/files#diff-4f1d80300014eb607e44892f6ebdcc31de2c0815669acd54f805b83501311b7fL419)
to the commit info hashing is causing a app hash mismatch when
restarting a node with a binary built from this branch.
> ```
> panic: state.AppHash does not match AppHash after replay. Got
> 76BB396891B9F4415AC49FB72CF81933F407AE6A2C04551814719C9A908B2E8E,
expected
8EDAB60FFD0B2C6BB5AC398417CF0AFBFE6E7D491C830F831F9395DB7FAC522A.
> ```
> Unfortunately without it some tests are failing because ics23 does not
expect to have hashed value. As a result, upgrading a mainnet launched
using `tm2/pkg/iavl` to a new version with `cosmos/iavl` might be
challenging. It's probably a good idea to merge this change for the
initial mainnet.


## For reviewers

- Most of the diff is related to the `DB` interface, because most of
declared methods return an error in `comos/iavl`
- When possible I added a comment for change related to the difference
between `tm2/pkg/iavl` and `cosmos/iavl` implementation.
- Lazy loading has been removed in `cosmos/iavl` so I had no other
choice than removing the option from the Gno store. Anyway this feature
was not used.

---------

Co-authored-by: n0izn0iz <n0izn0iz@users.noreply.github.com>
Co-authored-by: Miloš Živković <milos.zivkovic@tendermint.com>
@tbruyelle tbruyelle removed 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related 🐳 devops labels Oct 4, 2025
@tbruyelle
Copy link
Contributor Author

tbruyelle commented Nov 9, 2025

Moved everything in a separate repo since it became too big to be reviewed, and also because I can point to a fork of gno with the required changes:
#4868
tbruyelle#1

@tbruyelle tbruyelle closed this Nov 22, 2025
moul added a commit that referenced this pull request Dec 16, 2025
Closes #4866
Required for #4655 

Added a txtar test to ensure that -send flag doesnt affect the user
balance when used in `maketx run`.

Added similar txtar for `maketx call`, this time the user balance is
affected.

---------

Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 🌐 tendermint v2 Issues or PRs tm2 related 🧾 package/realm Tag used for new Realms or Packages.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants