Relaying Messages

Fear not no pigeons are required for this. Relaying ismp messages is done by offchain components like a relayer or a self relay wallet.
The basic principle of this is to watch for ismp events on a chain, fetch the request or response associated with an event alongside a proof of membership and submit the appropriate message to the counterparty chain.

Self relay mechanism

  • A user submits a transaction that causes an ismp event to be emitted.
  • The client uses the transaction id to fetch the ismp event emitted by that transaction from the block.
  • The data provided by the event is employed in fetching the full request/response from the offchain storage alongside a membership proof.
  • Compose an appropriate ismp message to be submitted to the counterparty chain, if the event was a request event construct a RequestMessage otherwise a ResponseMessage
  • Submit this message to the counterparty.
Visual explainer:
Image without caption
A general purpose relayer would follow the same mechanism listed above but would instead watch for all ismp events in a block relay the appropriate messages to the counterparty.