Skip to content

feat: added ics27-2 gmp application#8352

Merged
srdtrk merged 78 commits intomainfrom
serdar/xxx-contract-calls
Jan 14, 2026
Merged

feat: added ics27-2 gmp application#8352
srdtrk merged 78 commits intomainfrom
serdar/xxx-contract-calls

Conversation

@srdtrk
Copy link
Member

@srdtrk srdtrk commented May 7, 2025

Description

closes: STACK-2040


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.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

vaporif and others added 2 commits December 11, 2025 13:39
* gmp tests

* lint

* add codec test

* add genesis test

* ignore e2e codecov

* add tests

* add module tests

* +test

* +test

* +tests

* +tests

* +tests

* +tests and bugfix

* more tests

* add query e2e tests

* + test

* +genesis tests

* update

* update

* loop

* update test

* rework tests
* PacketDataUnmarshaler and PacketDataProvider for GMP

* lint

* shorten comment

* imp: remove callback key

* extend tests

* bad merge fix

* recursive codecov ignore

* simplify codecov ignore

---------

Co-authored-by: srdtrk <srdtrk@hotmail.com>
@srdtrk srdtrk marked this pull request as ready for review December 18, 2025 17:54
@linear
Copy link

linear bot commented Jan 6, 2026


existingAcc := k.accountKeeper.GetAccount(ctx, newAddr)
if existingAcc != nil {
// TODO: ensure this cannot be abused (refactor after this is resolved)
Copy link
Collaborator

@mariuszzak mariuszzak Jan 7, 2026

Choose a reason for hiding this comment

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

Do we need to take care of this TODO before merging?

}

func (*IBCModule) OnTimeoutPacket(_ sdk.Context, _, _ string, _ uint64, _ channeltypesv2.Payload, _ sdk.AccAddress) error {
return nil
Copy link
Collaborator

@mariuszzak mariuszzak Jan 9, 2026

Choose a reason for hiding this comment

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

@srdtrk Do we intentionally do nothing in the callbacks?

In my WIP implementation of x/ift I'm currently using IBC middleware to intercept all GMP callbacks and I'm filtering out these that are not for IFT. Is it good enough for now?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is good enough. By IBC middleware, do you mean the callbacks middleware? There is no good way to make callbacks here anyway

Copy link
Collaborator

@mariuszzak mariuszzak Jan 12, 2026

Choose a reason for hiding this comment

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

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

first pass over this just got some nits. is there a doc to learn about the goals/arch of gmp?

return nil, err
}

k.Logger(ctx).Info("IBC send GMP packet", "sender", msg.Sender, "receiver", msg.Receiver)
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few logs, such as this one here, that seem better off under debug

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense but in other IBC apps, they also use info events. So this is more of a consistency thing

}

newAcc := k.accountKeeper.NewAccountWithAddress(ctx, newAddr)
k.accountKeeper.SetAccount(ctx, newAcc)
Copy link
Contributor

Choose a reason for hiding this comment

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

in x/feegrant we make checks that the new account is not part of x/bank's blocked addresses before creating accounts w/ the account keeper. do we need to do this here?

ref: https://github.com/cosmos/cosmos-sdk/blob/a2d6d1f6acd544b47af81262988edd78fa853ee7/x/feegrant/keeper/keeper.go#L84-L89

Copy link
Member Author

Choose a reason for hiding this comment

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

BankKeeper isn't passed to this module at the moment. So I think this is not needed

runtime.NewKVStoreService(keys[gmptypes.StoreKey]),
app.AccountKeeper,
app.MsgServiceRouter(),
govAuthority,
Copy link
Contributor

Choose a reason for hiding this comment

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

what do we need authority for? i didn't see any usage in the keeper

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need it but I think all other IBC apps take govAuthority. So it is there for consistency.

@srdtrk srdtrk merged commit f09c11c into main Jan 14, 2026
58 of 73 checks passed
@srdtrk srdtrk deleted the serdar/xxx-contract-calls branch January 14, 2026 12:31
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.

7 participants