-
Notifications
You must be signed in to change notification settings - Fork 206
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
Agoric Contract IBC Middleware #8583
Comments
@sufyaankhan @michaelfig could you elaborate on that? Why do we need to do that? |
based on discussion with @sufyaankhan and @michaelfig , I gather the problem we're addressing is this: Ordinary ICS-20 IBC transfers use connections on the |
This would be correct! We (Calypso) COULD get away for now probably without but the concern with engineering within is that over time the uncomposability with the transfer port especially with PFM would draw away teams like Skip or create stray asset issuances. I.e: I use skip API to route asset, ends up on another port not transfer. Now uncomposable with Calypso or any other protocol on Agoric. |
does anybody have a user story sketch of how this works? |
@raphdev and I are discussing this today. There will be artifacts. |
I don't have detailed sequence diagrams, mainly modified versions of @sufyaankhan's diagrams as an aid for documenting architecture: What exists today (as far as code, not on-chain): Addition of transfer middleware: And a view outlining kernel/cosmos boundary: |
TIL: IBC middleware pre-dates this issue. |
I believe what we call "Agoric Contract Middleware" is the custom IBC middleware. Originally, the custom middleware and |
closes: #8583, closes: #9059, closes: #9256 ## Description This PR adds the vTransfer middleware module which acts as a notification module on the transfer port for contracts that need to act based on it. ### Security Considerations As discussed, this does change how inbound assets are handled. ### Testing Considerations The middleware module has mock unit tests in ibc_middleware_test.go
What is the Problem Being Solved?
Ordinary ICS-20 IBC transfers use connections on the
transfer
port; these connections are handled by an ibc module provided by the interchain stack. It's not straightforward (or possible?) for the swingset network API to take over such connections. So in order for contracts to receive such messages, we need some other solution.Description of the Design
Expose IBC go's Transfer App inbound packets to JS Smart Contracts, as a form of IBC middleware.
There are 3 pieces of work (boxes in RED in the diagram) that need to be implemented.
1. Agoric Contract Middleware
Agoric Contract Middleware is a wrapper for IBC Contract app Channels. It intercepts inbound and outbound transfer packets.
If a packet contains conventional memo fields that indicates an Agoric contract target, then forward the packet details and target information to x/vtransfer.
2. x/vtransfer
3. Transfer Notification Service
Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: