Skip to content

feat: parse IBC v2 packets from ABCI events#8375

Merged
gjermundgaraba merged 11 commits intomainfrom
tamjid/issue-7856
May 15, 2025
Merged

feat: parse IBC v2 packets from ABCI events#8375
gjermundgaraba merged 11 commits intomainfrom
tamjid/issue-7856

Conversation

@DeshErBojhaa
Copy link
Copy Markdown
Contributor

@DeshErBojhaa DeshErBojhaa commented May 14, 2025

Description

This PR extracts IBC v2 packets from ABCI events.

If the event has attribute AttributeKeyEncodedPacketHex then we unmarshall packet form that attribute.

If attribute AttributeKeyEncodedPacketHex not present, we populate and empty packet from the following four attributes.

  1. AttributeKeySequence
  2. AttributeKeyTimeoutTimestamp
  3. AttributeKeyDstClient
  4. AttributeKeySrcClient

closes: #7856


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.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@5b66d17). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8375   +/-   ##
=======================================
  Coverage        ?   67.17%           
=======================================
  Files           ?      280           
  Lines           ?    19429           
  Branches        ?        0           
=======================================
  Hits            ?    13052           
  Misses          ?     5794           
  Partials        ?      583           
Flag Coverage Δ
08-wasm 44.28% <ø> (?)
ibc-go 68.87% <ø> (?)

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.

Copy link
Copy Markdown
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

Noice! This looks very good to me!
The only thing we need to figure out before merging is if we need to keeper the original functions around with a deprecation notice.

Oh, and it should have a changelog entry

@gjermundgaraba
Copy link
Copy Markdown
Contributor

After checking around a bit more, it looks like there are enough people using this to warrant deprecating the function. So just add it back (and call the new one) with a deprecation notice.

Copy link
Copy Markdown
Contributor

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Excellent work! Nice and clean fix

@DeshErBojhaa
Copy link
Copy Markdown
Contributor Author

After checking around a bit more, it looks like there are enough people using this to warrant deprecating the function. So just add it back (and call the new one) with a deprecation notice.

Here e89a575

Copy link
Copy Markdown
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

One tiny comment left to fix, and then this should be ready to merge 🚀

Copy link
Copy Markdown
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

Great work! I'll let the tests pass and when that is done we can merge 🙌

@gjermundgaraba gjermundgaraba added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit e1f48d6 May 15, 2025
46 checks passed
@gjermundgaraba gjermundgaraba deleted the tamjid/issue-7856 branch May 15, 2025 10:29
mergify bot pushed a commit that referenced this pull request May 15, 2025
* feat: parse packets v2 from events

* fix: lint. Shutup Meg!

* refactor: rename function

* refactor: extract packet form events

* refactor: extract packet form events

* sync dep

* added deprecation notice

* changelog

* changelog

* changelog

* fix unit test

---------

Co-authored-by: Gjermund Garaba <gjermund@garaba.net>
(cherry picked from commit e1f48d6)
gjermundgaraba added a commit that referenced this pull request May 15, 2025
Co-authored-by: Tamjid Ahmed <mail.to.tamjid@gmail.com>
Co-authored-by: Gjermund Garaba <gjermund@garaba.net>
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.

Parse packet from events instead of manually constructing in endpoint.MsgSendPacket

4 participants