-
Notifications
You must be signed in to change notification settings - Fork 204
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
added ibc-hooks #1173
added ibc-hooks #1173
Conversation
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.
This looks great to me!
One caveat though that the wiring in app.go
is a bit arcane, would just want to make sure we test this the migration thoroughly on localstride + testnet + locally. Might be worthwhile to make a list of tests that we want to do, and then we can verify on all of the various environments.
More than happy to help with that of course!
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
type RawPacketMetadata struct { | ||
Autopilot *struct { | ||
Receiver string `json:"receiver"` | ||
Stakeibc *StakeibcPacketMetadata `json:"stakeibc,omitempty"` | ||
Claim *ClaimPacketMetadata `json:"claim,omitempty"` | ||
} `json:"autopilot"` | ||
Forward *interface{} `json:"forward"` | ||
Wasm *interface{} `json:"wasm"` |
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.
The main thing I was confused about before was that normal packets could be picked up and interpreted by a wasm contract but the diagram you made in excalidraw of how all the middlewares interact helped a lot. I was confused because I thought before that only tx specifically aimed at cosmwasm modules would be seen by wasm but now I see how it all fits together and they use different parts of the data so that it is possible for these cosm middlewares and another middleware like autopilot can act on the same packets even using data from the same memo. Unit tests also made it clearer
Context
Added IBCHooks by roughly following the guide here. The guide seemed to be in accurate in places, so I filled in the gaps by referencing osmosis/stargaze/neutron, and by leveraging my own understanding of the app.go wiring.
Note to reviewer: Please double check the ICS4Wrapper wiring.
Should we also restrict packets to be one of (a) autopilot, (b) pfm or (c) wasm?
Brief Changelog
Testing
High Level Approach
Takeaways
I had to increase the relayer gas adjustment in order to get the tx relayed (since the OnRecv now has more computation). We'll want to update our relayers accordingly!
Steps
stride1038hhcqj3syag68jrzhj387uy0qx88u3ta537e4nk8xn8pwuxt5sl0xrr9
(the address that will be generated from ibc-hooks) since adding metrics to the oracle is permissioned>>> strided q wasm contract-state smart stride14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9szh70ur '{"all_latest_metrics": {}}' data: metrics: []