Update x/vibc
to support Agoric ibc-hooks middleware
#9029
Labels
enhancement
New feature or request
x/vibc
to support Agoric ibc-hooks middleware
#9029
What is the Problem Being Solved?
The current Golang
x/vibc
module is built only for JS contracts to use directly. It is not suited to implementing middleware to handle IBC apps that are already written in Golang.With a little bit of work,
x/vibc
could also be used to intercept Golang IBC app upcalls and downcalls, and forward them to JS for handling.Description of the Design
Implement
IBC_EVENT
messages destined for the JS VM that would be triggered by upcalls from Golang "Agoric ibc-hooks" middleware as well as the (currently supported)ibc-go
core modules. Also implementIBC_METHOD
messages destined for the JS VM that can be triggered by IBC apps that are wrapped by Golang "Agoric ibc-hooks" middleware.Because IBC is nearly completely async-tolerant, it pairs well with async calls/replies to and from the Agoric JS VM.
Security Considerations
Middleware needs to be carefully audited. It can exert complete control over the IBC app that it wraps.
Scaling Considerations
No particularly heavy load... just the overhead of contract calls and replies when Golang passes messages over the JS VM bridge.
Test Plan
Implement
vtransfer
(#8624) using this support and verify it end-to-end.Upgrade Considerations
No additional considerations beyond making middleware JS target contracts upgradable.
The text was updated successfully, but these errors were encountered: