-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: packet sequence in Timeout handlers should be encoded in big-endian #1004
fix: packet sequence in Timeout handlers should be encoded in big-endian #1004
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1004 +/- ##
=======================================
Coverage 70.69% 70.69%
=======================================
Files 178 178
Lines 17919 17870 -49
=======================================
- Hits 12667 12634 -33
+ Misses 5252 5236 -16 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch @en! Thanks for this complete report. 👌🏻
Let’s apply the following changes:
-
This should be fixed here as well for the
MsgTimeoutOnClose
. -
Let’s revise this
to_vec
method withself.0.to_be_bytes.to_vec()
implementation and update it’s docstring, so we can afterwards call it on themsg.packet.seq_on_a
-
Dress up the PR with a unclog.
Then we are all set!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏🏻
…ian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method.
* fix: packet sequence in Timeout handlers should be encoded in big-endian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method. * fix: recursive call in connection `State` conversion to `i32` (#1010) * fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]> * Release v0.48.2 chore: update changelog + summary deps: bump versions to v0.48.2 --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Yuanchao Sun <[email protected]> Co-authored-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]>
…ian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method.
* fix: packet sequence in Timeout handlers should be encoded in big-endian (#1004) * fix: encode package sequence into big endian bytes * Fix this issue in `to_vec` method. * fix: recursive call in connection `State` conversion to `i32` (#1010) * fix state conversion recursive call * replace match with casting Co-authored-by: Michal Nazarewicz <[email protected]> Signed-off-by: Dhruv D Jain <[email protected]> * chore: add unclog * nit --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]> Co-authored-by: Farhad Shabani <[email protected]> * Release v0.48.2 chore: update changelog + summary deps: bump versions to v0.48.2 --------- Signed-off-by: Dhruv D Jain <[email protected]> Co-authored-by: Yuanchao Sun <[email protected]> Co-authored-by: Dhruv D Jain <[email protected]> Co-authored-by: Michal Nazarewicz <[email protected]>
Description
refer to:
// Note: We expect the return to be a u64 encoded in big-endian. Refer to ibc-go:
// https://github.com/cosmos/ibc-go/blob/25767f6bdb5bab2c2a116b41d92d753c93e18121/modules/core/04-channel/client/utils/utils.go#L191
The
seq_on_a
of MsgTimeout packet should be encoded as a big-endian bytes.Here's a code snippet to show this problem.
https://gist.github.com/en/e4f6befdef94b1e906ed0054709ccd4b
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.