Skip to content

Conversation

@tbruyelle
Copy link
Contributor

@tbruyelle tbruyelle commented Nov 12, 2025

Required for #4655

This PR updates the regexp used to validate a coin denom to accept IBC denoms.

IBC denoms format is:

"ibc/" + hash(trace + "/" + baseDenom)

(example : ibc/542B346608DE032752AF0B21D165190090CD3194F6D177CF35025E39596ABC16)

Where trace represents the path used by the initial token. Each trace can be composed of one to many hops, and a hop format is portID/clientID (example : transfer/07-tendermint-2).

⚠️ For now this PR uses an ugly if realm=="gno.land/r/aib/ibc/apps/transfer" to authorize denom mint with the ibc prefix. This is something that needs to be improved with a kind of whitelist. ⚠️

Any hint on how this could be achieved is welcome.

@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Nov 12, 2025
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Nov 12, 2025
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Nov 12, 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
    │       ├── 🟢 User jefft0 already reviewed PR 4883 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

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@jefft0 jefft0 left a comment

Choose a reason for hiding this comment

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

All CI checks pass. Has tests. Ready for core dev review.

@Gno2D2 Gno2D2 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Nov 13, 2025
@tbruyelle tbruyelle mentioned this pull request Nov 22, 2025
@moul moul self-requested a review November 27, 2025 14:55
Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

Blocking, because I need more time to review this one. We planned to use realm/xxx for realms rather than ibc/xxx. If IBC is managed solely through contracts without any additional privileges then the token couldn’t have an ibc/ prefix.

@tbruyelle
Copy link
Contributor Author

Blocking, because I need more time to review this one. We planned to use realm/xxx for realms rather than ibc/xxx. If IBC is managed solely through contracts without any additional privileges then the token couldn’t have an ibc/ prefix.

Yes I noticed that problem and I need to clarify how important this ibc/ prefix is.

@Kouteki Kouteki moved this from Triage to In Review in 🧙‍♂️Gno.land development Dec 7, 2025
@Kouteki Kouteki added this to the 🌙Mainnet launch milestone Dec 7, 2025
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Dec 9, 2025
@tbruyelle
Copy link
Contributor Author

tbruyelle commented Dec 9, 2025

In order to mint/burn IBC tokens, denom format like /gno.land/r/aib/ibc/apps/transfer:ibc/CAEF9CA8CE6C302D73A831A49E34E59149D3A9AD96CCEBDFBF62F6D5710D92D8 must be allowed.

This commit 1b295f3 removes the denom format check in Banker.Issue/RemoveCoins

EDIT: Reverted here e4dc952 due to the fact that std.Coin doesnt validate denom prefixed with realm path. In return we quick fix the banker so the gno.land/r/aib/ibc/apps/transfer is allowed to issue/remove coins with the ibc/ prefix (no realm prefix).

revert previous change on realm prefixed denom.
@moul moul linked an issue Dec 16, 2025 that may be closed by this pull request
@moul moul removed a link to an issue Dec 16, 2025
@tbruyelle tbruyelle marked this pull request as draft December 17, 2025 15:22
@tbruyelle tbruyelle marked this pull request as ready for review December 17, 2025 15:22
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 📦 🤖 gnovm Issues or PRs gnovm related

Projects

Status: In Progress
Status: In Review

Development

Successfully merging this pull request may close these issues.

5 participants