-
Notifications
You must be signed in to change notification settings - Fork 398
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
Allow OnChanOpenTry
version negotiation to call WriteOpenTryChannel
in a future block
#732
Comments
Tagging @AdityaSripal for comment and any counterproposal. Tagging @schnetzlerjoe as somebody negatively affected by the current synchronous situation. |
I anticipated something like this when proposing passive relayers. For contrast, here is the solution I used then: https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-025-ibc-passive-channels.md#handling-channel-open-attempts |
cc: @mpoke @schnetzlerjoe could you detail how the synchronous situation is affecting you? |
Speaking on behalf of @schnetzlerjoe since I was working with him, lack of async version negotiation makes it impossible to implement a dIBC (async-only) Interchain Accounts host. We just avoided doing that, as implementing an ICA controller only creates outbound connections to hosts, thus the controller doesn't need to handle What I'm concerned about is that ICA hosts (or some future protocol) will require version negotiation, and that will make it impossible to implement in dIBC. That will be a blocker for some IBC applications on Agoric, we just aren't feeling the pain yet of being blocked from creating an ICA host. |
Summary
Allow
OnChanOpenTry
both to write the new state and publish the event in a future block.Problem Definition
On the Agoric chain, we're using async messaging to implement smart contracts. This works fine with IBC and async acknowledgements, but the
ibc-go
version negotiation is unfortunately synchronous. We'd like to allow Agoric users to implement channel version negotiation in a smart contract, but the synchronous nature defeats that goal.Benefits of sorting this out would be to reduce cross-chain synchronous coupling, which may be an issue for other chains with similar async requirements.
Disadvantage is the need to reassess the IBC standard to lift the requirement for synchronous behaviour.
Proposal
This is a strawman.
Without changing the API presented to synchronous
OnChanOpenTry
implementations, we can define a constantError
that indicates the need for postponed async operation.return "", types.MagicalAsyncError
fromOnChanOpenTry
modules/core/keeper/msg_server.go
ChannelOpenTry
, make this modification:k.ChannelKeeper.WriteOpenTryChannel
explicitly at a later time.We would also need some way to write a failed open try into the state as well, to interrupt the handshake if no version negotiation can be successfully completed.
For Admin Use
The text was updated successfully, but these errors were encountered: