Skip to content
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

ICS 18: Relayer algorithms #37

Merged
merged 13 commits into from Apr 23, 2019
Merged

ICS 18: Relayer algorithms #37

merged 13 commits into from Apr 23, 2019

Conversation

cwgoes
Copy link
Contributor

@cwgoes cwgoes commented Mar 7, 2019

Closes #35.

This is a pretty minimal specification for now, since the details of pendingDatagrams will be defined in individual ICSs and I think it's too early to spend much time working out relayer fee reimbursement.

@cwgoes cwgoes added wip Issues or pull requests which are in progress. category-ibc-misc labels Mar 7, 2019
@cwgoes cwgoes added ready-for-review Pull requests which are ready for review. and removed wip Issues or pull requests which are in progress. labels Mar 30, 2019
@cwgoes
Copy link
Contributor Author

cwgoes commented Mar 30, 2019

Ready for review as a draft. Specific functions for calculating valid datagrams will need to be defined in individual ICSs as mentioned. Possibly this ICS could include more detail about relayer incentivization later, but I think that design discussion would be too early now (it doesn't seem particularly difficult, and is unlikely to require low-level protocol changes).

I suggest reviewing the rendered Markdown.

@cwgoes cwgoes marked this pull request as ready for review March 30, 2019 15:11
Copy link

@liamsi liamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear high-level description of the relayer algorithm. To be able to implement actual relayers implementers will need to know more internals of pendingDatagrams and submitDatagram. My understanding is that these will be part of separate ICSs.

Co-Authored-By: cwgoes <cwgoes@pluranimity.org>
@cwgoes
Copy link
Contributor Author

cwgoes commented Mar 31, 2019

My understanding is that these will be part of separate ICSs.

Yes, that's right. I think that makes more sense because chains are likely to implement subsets of the IBC protocol - that way relayers can compose pendingDatagrams based on which ICSs the chain implements.

spec/ics-18-relayer-algorithms/README.md Outdated Show resolved Hide resolved
spec/ics-18-relayer-algorithms/README.md Outdated Show resolved Hide resolved
Copy link

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥑

@zmanian
Copy link
Member

zmanian commented Apr 15, 2019

Question: Do we need to creation some notion of an ID for each datagram.

The relayer algorithm would then be expected to insert any detected datagram if the id wasn't already in the mempool.

@cwgoes
Copy link
Contributor Author

cwgoes commented Apr 15, 2019

Question: Do we need to creation some notion of an ID for each datagram.

The relayer algorithm would then be expected to insert any detected datagram if the id wasn't already in the mempool.

This is expected to be included in pendingDatagrams (which can read the state of the ledger).

I think usually we will (certainly for packets), but occasionally other state will be sufficient (connection state, for example, in the connection handshake).


A *relayer* is an off-chain process with the ability to read the state of and submit transactions to some set of ledgers utilizing the IBC protocol.

### Desired Properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These properties are not necessarily telling us what we expect from relayer. It's more telling us what other part don't expect from relayers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I suppose - these are desired properties of how we construct the relayer algorithm (e.g. permissionless - all datagrams are verified by the blockchain state machine itself). Some are a bit vague but I think still worth listing.

What properties do you think are in scope here?

@melekes
Copy link

melekes commented Apr 18, 2019

Questions I have so far:

  • do relayers programmed to use a Hub?
  • if yes, how do they choose what Hub to use?
  • do they first send IBC transaction to a Hub? What if a Hub detects a double spend? How it can signal the relayer that IBC transaction is malicious?

@cwgoes
Copy link
Contributor Author

cwgoes commented Apr 23, 2019

@melekes I don't think any of the current IBC specifications talk about "Hubs" yet - that's a distinction at the level of expected network dynamics (for now), not a distinction at the protocol layer.

There's some discussion in progress at #59.

@cwgoes
Copy link
Contributor Author

cwgoes commented Apr 23, 2019

Merging to the "draft" stage, further comments always welcome.

@cwgoes cwgoes merged commit c713fbd into master Apr 23, 2019
@cwgoes cwgoes deleted the cwgoes/ics-18-relayer-algorithms branch April 23, 2019 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review Pull requests which are ready for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICS 18: Off-chain relayer algorithm
5 participants