Conversation
|
PR author is not in the allowed authors list. |
In the IBC v2 callbacks middleware the destination callback invoked from OnRecvPacket wraps the application acknowledgement in RecvAcknowledgement, so Acknowledgement() returns the raw application bytes. The asynchronous WriteAcknowledgement path instead wrapped the same bytes in a channeltypesv2.Acknowledgement, whose Acknowledgement() returns the protobuf encoding of the wrapper. A contract therefore observed different acknowledgement bytes for the same packet depending on whether the application acknowledged synchronously or asynchronously. Use RecvAcknowledgement in both paths and add a regression test that compares the bytes delivered to the contract keeper. Signed-off-by: Kanan <93033289+kriss39@users.noreply.github.com>
kriss39
force-pushed
the
fix/callbacks-v2-async-ack-type
branch
from
September 13, 2026 20:51
801ecd0 to
12e11d4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In the IBC v2 callbacks middleware the destination callback invoked from
OnRecvPacketreceives aRecvAcknowledgement, soack.Acknowledgement()returns the raw application acknowledgement bytes. The asynchronousWriteAcknowledgementpath wrapped the same bytes in achanneltypesv2.Acknowledgement, whoseAcknowledgement()returns the protobuf encoding of the wrapper. A contract therefore observed different acknowledgement bytes for the same packet depending on whether the application acknowledged synchronously or asynchronously.This PR uses
RecvAcknowledgementin the async path too and addsTestWriteAcknowledgementCallbackAckMatchesSyncPath, which records the bytes delivered to the contract keeper on both paths and requires them to be equal (onmainit fails with{"result":"AQ=="}vs0a 11 {"result":"AQ=="}).closes: #9074
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.
docs/) if anything is changed. (n/a — no documented behaviour changes)godoccomments if relevant.Files changedin the GitHub PR explorer.