Skip to content

fix(apps/27-gmp): accept counterparty sender identifiers in genesis - #9077

Open
kriss39 wants to merge 1 commit into
lfdt-ibc:mainfrom
kriss39:fix/gmp-genesis-remote-sender
Open

kriss39 wants to merge 1 commit into
lfdt-ibc:mainfrom
kriss39:fix/gmp-genesis-remote-sender

Conversation

@kriss39

@kriss39 kriss39 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Description

GenesisState.Validate and InitGenesis in 27-gmp validated AccountId.Sender with sdk.AccAddressFromBech32. The sender is an identifier on the counterparty chain (an EVM hex address or a bech32 address with a foreign prefix), so any exported state that contained an ICS27 account created by a remote sender failed validation and could not be re-imported.

This PR adds AccountIdentifier.Validate (client ID, non-empty and bounded sender — the same rules as GMPPacketData.ValidateBasic — and salt length) and uses it from both GenesisState.Validate and InitGenesis. Existing "invalid sender" test cases are replaced by empty / too-long sender cases plus a success case with an EVM hex sender, and TestGenesisRoundTripRemoteSender covers the export → validate → import round trip (fails on main with decoding bech32 failed).

closes: #9072


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Include changelog entry when appropriate (e.g. chores should be omitted from changelog).
  • Wrote unit and integration tests if relevant.
  • Updated documentation (docs/) if anything is changed. (n/a — no documented behaviour changes)
  • Added godoc comments if relevant.
  • Self-reviewed Files changed in the GitHub PR explorer.
  • Provide a conventional commit message to follow the repository standards.

@kriss39
kriss39 requested a review from a team as a code owner September 13, 2026 20:47
@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR author is not in the allowed authors list.

@kriss39
kriss39 force-pushed the fix/gmp-genesis-remote-sender branch from 09e25ed to 2bf6e3c Compare September 13, 2026 20:51
@kriss39

kriss39 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@srdtrk @gjermundgaraba gentle ping on this and #9078, #9079, #9080. DCO passes on all four and they are open for review whenever you have time.

@kriss39
kriss39 force-pushed the fix/gmp-genesis-remote-sender branch from c936c24 to 41e3ad6 Compare October 21, 2026 10:11
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.84%. Comparing base (501acd1) to head (41e3ad6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9077      +/-   ##
==========================================
+ Coverage   66.83%   66.84%   +0.01%     
==========================================
  Files         329      329              
  Lines       17497    17503       +6     
==========================================
+ Hits        11694    11700       +6     
  Misses       5069     5069              
  Partials      734      734              
Flag Coverage Δ
08-wasm 65.04% <ø> (ø)
ibc-go 66.90% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kriss39
kriss39 requested a review from a team as a code owner November 15, 2026 21:25
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kriss39
kriss39 force-pushed the fix/gmp-genesis-remote-sender branch from a1182da to 8ff877b Compare November 29, 2026 08:22
AccountIdentifier.Sender is an opaque identifier on the counterparty chain
(for example an EVM hex address or a bech32 address with a foreign prefix).
GenesisState.Validate and InitGenesis validated it with
sdk.AccAddressFromBech32, so any exported state containing an ICS27 account
created by a remote sender failed validation and could not be re-imported.

Validate the sender the same way GMPPacketData.ValidateBasic does (non-empty,
bounded length) via a new AccountIdentifier.Validate helper, and add an
export -> validate -> import round-trip regression test.

Signed-off-by: Kriss <93033289+kriss39@users.noreply.github.com>
@kriss39
kriss39 force-pushed the fix/gmp-genesis-remote-sender branch from 8ff877b to 6f9e7e8 Compare November 29, 2026 08:25

This branch has not been deployed

No deployments
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.

27-gmp: exported genesis fails validation/import once an ICS27 account has a non-local (EVM / foreign-prefix) sender

1 participant