-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
IBC: Allow onRecvPacket
to bypass synchronous call of PacketExecuted
#7200
Conversation
This bypasses the synchronous call to PacketExecuted and allows the module to call it at a later time.
55fc19c
to
e00a1e2
Compare
Codecov Report
@@ Coverage Diff @@
## master #7200 +/- ##
=======================================
Coverage 54.76% 54.76%
=======================================
Files 563 563
Lines 38608 38609 +1
=======================================
+ Hits 21144 21145 +1
Misses 15733 15733
Partials 1731 1731 |
Two questions here:
If this is a small, safe change and makes things better I am all for it. I really want stargate soon, so I would voice hesitation on any larger feature changes, pushing them to 1.1. (I have no real clue what impact this makes in the ibc code, just a watchdog about shipping something solid) |
I don't think so. The
It was just an implementation (not spec) change. I'd have to defer to @colin-axner on this question, but he didn't mention anything about safety, it seems it was done just to help synchronous callers remember to call PacketExecuted.
👍
Fair. |
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.
LGTM
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.
Reposting @cwgoes comments from slack here:
No, we can't do this, because timeouts are based on acks
What we have right now are acknowledgements of receipt
Which can contain synchronous execution results
If you want async execution results, you will need to send another packet back
I think this pr should be closed. Sending another packet is the appropriate design for this
Right, the issue here is that we are using this acknowledgement as proof-of-receipt, so if you process the packet asynchronously without writing it, the packet may be treated as timed-out when you've actually received it (just not yet written the acknowledgement). Does that make sense? For asynchronous acknowledgements, I suggest using a very simple ack-of-receipt and sending another packet back once the processing is complete. |
I would think this is not a problem, so long as I hope there is a way to work around this, or else it is impossible for protocols like ICS20 to be implemented by an async contract (such as all contracts in the Agoric system). Maybe it will be necessary for the standard to separate synchronous "implicit acks" which don't carry data and are never seen by the application from "replies" that are associated with a packet but can be generated asynchronously by the application. However, let's discuss this at the IBC meeting tomorrow. I agree that it should not hold up Stargate unless there is a simple solution. |
Closing to reduce noise in the PR list. This PR is, as in the description, superseded by cosmos/ibc#478 |
Description
NOTE: This PR is superseded by cosmos/ibc#478
Allow anOnRecvPacket
callback to prevent the automatic synchronous calling ofPacketExecuted
by returning anil
acknowledgement.This bypasses the synchronous call to PacketExecuted and allowsthe application module to call it at a later time.
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/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes