Skip to content

fix(gmp): fix keeper initialization and packet unmarshaling#8660

Merged
srdtrk merged 1 commit intoserdar/xxx-contract-callsfrom
mariuszzak/fix-gmp-nil-pointer
Oct 10, 2025
Merged

fix(gmp): fix keeper initialization and packet unmarshaling#8660
srdtrk merged 1 commit intoserdar/xxx-contract-callsfrom
mariuszzak/fix-gmp-nil-pointer

Conversation

@mariuszzak
Copy link
Collaborator

Description

Fix two critical bugs in ICS27-GMP module:

  1. keeper: Initialize msgRouter and accountKeeper fields that were being passed to NewKeeper but not assigned to the keeper struct, causing nil pointer panics when routing messages

  2. packet: Fix UnmarshalPacketData to use correct Go unmarshal pattern by initializing pointer before passing to json.Unmarshal instead of passing pointer-to-pointer


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.
  • Added godoc comments if relevant.
  • Self-reviewed Files changed in the GitHub PR explorer.
  • Provide a conventional commit message to follow the repository standards.

Fix two critical bugs in ICS27-GMP module:

  1. keeper: Initialize msgRouter and accountKeeper fields that were
     being passed to NewKeeper but not assigned to the keeper struct,
     causing nil pointer panics when routing messages

  2. packet: Fix UnmarshalPacketData to use correct Go unmarshal pattern
     by initializing pointer before passing to json.Unmarshal instead of
     passing pointer-to-pointer
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (serdar/xxx-contract-calls@be8367e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
modules/apps/27-gmp/keeper/keeper.go 0.00% 5 Missing ⚠️
modules/apps/27-gmp/types/packet.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##             serdar/xxx-contract-calls    #8660   +/-   ##
============================================================
  Coverage                             ?   56.37%           
============================================================
  Files                                ?      335           
  Lines                                ?    23605           
  Branches                             ?        0           
============================================================
  Hits                                 ?    13307           
  Misses                               ?     9691           
  Partials                             ?      607           
Flag Coverage Δ
08-wasm 65.99% <ø> (?)
e2e 1.14% <ø> (?)
ibc-go 61.35% <0.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 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.

@srdtrk srdtrk marked this pull request as ready for review October 10, 2025 13:18
Copy link
Member

@srdtrk srdtrk left a comment

Choose a reason for hiding this comment

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

Great catch.

@srdtrk srdtrk merged commit 067e75b into serdar/xxx-contract-calls Oct 10, 2025
49 checks passed
@srdtrk srdtrk deleted the mariuszzak/fix-gmp-nil-pointer branch October 10, 2025 13:19
srdtrk added a commit that referenced this pull request Jan 14, 2026
* feat: added proto types

* chore: ran proto-all

* chore: generate proto

* imp: added type helpers

* imp: added new proto

* imp: added query.proto

* chore: gen proto types

* imp: regen proto

* imp: save progress

* feat: implemented basic module with autocli

* imp: added ibc boilerplate

* feat: add module to simapp

* imp: added account keeper

* imp: remoce ics4wrapper

* imp: implemented first message server

* imp: verify autocli

* imp: implemented OnSendPacket

* imp: implemented ack and timeout entry points

* imp: more boilerplate

* imp: added ack to proto

* imp: added ack helpers

* imp: more boilerplate

* feat: added account gen

* imp: added cosmos tx

* imp: implemented receive

* imp: implemented query

* lint

* imp: added gmp to wasm simapp

* style: lint

* style: lint

* chore: bump go version

* imp: attempt to improve module wiring

* imp: fix attempt

* imp: removed gmp from unused simapp

* fix: keeper wiring

* imp: allow receiver to be empty

* imp: added logger

* imp: no err if acc already exists

* deps: go mod tidy

* fix: compiler problems

* imp: allow protojson

* imp: added NewMsgSendCall

* lint: issues

* docs: add PICKUP to gmp

* docs: added pickup doc

* fix(gmp): fix keeper initialization and packet unmarshaling (#8660)

Fix two critical bugs in ICS27-GMP module:

  1. keeper: Initialize msgRouter and accountKeeper fields that were
     being passed to NewKeeper but not assigned to the keeper struct,
     causing nil pointer panics when routing messages

  2. packet: Fix UnmarshalPacketData to use correct Go unmarshal pattern
     by initializing pointer before passing to json.Unmarshal instead of
     passing pointer-to-pointer

* docs: godocs

* imp: added accounts_by_address

* chore: update proto

* chore: regen proto

* chore: implemented query server

* imp: added GetAccount

* test: add tests for 27-gmp module (#8728)

* 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

* imp: gmp packet work PacketDataUnmarshaler/PacketDataProvider (#8730)

* 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>

* imp: deserialization validation

* docs: remove pickup

* docs: remove todo

* imp: review items

* imp: added autocli for missing method

* chore: remove unused params

* imp: added events

* imp: added length validations and better error messages

* imp: log message

* imp: simplified signer check

* chore: added testing to codecov ignore

---------

Co-authored-by: johnnylarner <james.richardson.2556@gmail.com>
Co-authored-by: Mariusz Żak <mariuszzak21@gmail.com>
Co-authored-by: Dmytro Onypko <vaporif@proton.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.

2 participants