Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 208 forks source link

Review Wormhole integration docs #4238

Closed rowgraus closed 2 years ago

rowgraus commented 2 years ago

Carving out time to review the Wormhole documentation to prepare for future discussions

Design docs: https://github.com/certusone/wormhole/tree/dev.v2/whitepapers Solidity contracts are reference implementation examples Eth contracts: https://github.com/certusone/wormhole/tree/dev.v2/ethereum/contracts

michaelfig commented 2 years ago

Carving out time to review the Wormhole documentation to prepare for future discussions

@rowgraus I've reviewed the docs and now have a better idea of how the Wormhole system would fit into our Network API. LMK when you would like to talk more.

Essentially, Wormhole supports broadcasts of single (max 750-byte) messages from one chain to all other participating chains. Interpretation of those messages (VAAs) is left to the receiving chains, but they include an identifier for the sending chain.

AFAICT, the Wormhole design has only a single global message bus. Testnets seem to be accessed via a chain the same as the global instance, requiring guardiand nodes to act as a relayer between one chain and the rest of the world. I don't see any provision for multiple Wormhole instances connected to a single instance of the Agoric chain, but would need to ask to clarify.

I would fit this into the Network API by listening to an appropriate local network port (/wormhole/subscribe) for an immediate Network API Connection that receives broadcast messages. A Network API Connection to second network port (/wormhole/publish) would result in a connection that can send messages.

Tartuffo commented 2 years ago

@michaelfig This is in the "Up Next" pipeline, but does not have a MN-1 label. If it is needed for MN-1, please label, otherwise move from "Up Next" to "Product Backlog".