Skip to content

docs: message-passing groups current goals and status #13

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

elliedavidson
Copy link
Collaborator

@elliedavidson elliedavidson commented Feb 13, 2025

This PR adds a doc page formalizing the Message Passing Working Group goals and progress. It also adds the properties decided on in Denver.

Copy link
Collaborator

@0xteddybear 0xteddybear left a comment

Choose a reason for hiding this comment

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

I have nitpicks and questions mostly 😁

Should we start by defining the existing efforts and comparing them, similar to how we are doing for cross-chain addresses? would y'all consider that in scope for this PR

* Should the interface be pull or push-based?
* Should the interface use Ethereum specific addresses?
* Should the interface defined specific message formats for specific use cases?
* Should the interface use 7786-style attributes
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: missing question mark


### Timeline:
* 2/17/2025: Core contibutors identified.
* 2/24/2025: Agreement on goals has been reached among core contributors, broader group feedback welcome.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: consider using ISO-8601 dates

3. Identifying core contributors to move this consensus forward quickly. We will ask for feedback from the broader group periodically.
4. Establishing commitments and timelines from core projects to implement the interface once it is finalized.

### Timeline:
Copy link
Collaborator

Choose a reason for hiding this comment

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

just to see if I should be following something else to stay in the loop: are the deliverables on this deadline going to be contained in this document? only linked from here? or tracked somewhere else entirely

Copy link
Collaborator

@0xteddybear 0xteddybear left a comment

Choose a reason for hiding this comment

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

I believe the next step to make this easier to follow would be to elaborate on a comparison of the current efforts, showing which parts we should pick&choose from the existing alternatives in docs/messaging-comparisos.md, wdyt?


### Message Format

Message {
Copy link
Collaborator

Choose a reason for hiding this comment

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

include all of this in a code block



Questions:
* Should we allow tx hash as unique id?
Copy link
Collaborator

Choose a reason for hiding this comment

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

as the unique id of what in particular? a message? a message in a particular (source/destination/intermediate?) chain?


#### 1a. Developers should not need to use wrapper contracts to interact with the interface.

### 2. Interface should be VM-agnostic. --> Agree
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given this, I imagine 'the interface' can't be an ABI specification, as that would be coupled to how a particular VM handles function calls, so how would it look like? at what part of the tech stack would this interface live?

Comment on lines 114 to 117
packet_id - unique id, bytes

// destination addr
fn send (payload, (destination address?), destination chain) -> packet id
Copy link

@cjcobb23 cjcobb23 Mar 7, 2025

Choose a reason for hiding this comment

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

I had a couple of thoughts about the packet id that i wanted to leave here.

In denver, we talked about returning a globally unique packet id from send, and we said it should be the hash of the entire message. There are a few issues with this.

  1. Different VMs may not have the same hashing functions available, so using the hash doesn't get us much besides uniqueness in that case, since the destination chain may not be able to rehash and get the same id.
  2. While we decided to use traditional push based message passing instead of arbitrary remote reads, the latter will exist eventually, and also requires some sort of id. I think the most natural id for that paradigm is using transaction hash + event index to identify an event on a remote chain. If we cannot use the transaction hash in our interface as the message id, it could lead to issues down the road.
  3. While hashing the message, which contains a nonce, gives a globally unique identifier within the protocol, it is not necessarily a globally unique identifier for events across the whole blockchain. Another unrelated contract could emit an event with the same id as our packet id, for example maybe even a different interop protocol. Whereas using the transaction hash + event index is a truly globally unique identifier for the event across the entire blockchain.

So I think send should still just return a local id (the nonce). I don't think we lose anything by doing that, since the caller can still use it to pay gas. But the protocol can use whatever it likes as the globally unique packet id, which is passed to the receiving chain.

A user can bridge assets between any two Lns within 3 slots or less of the slower chain.

Things required to achieve this goal:
* Message passing protocols to physically relay information from one chain to another. Different protocols have different tradeoffs and security properties, and different L2s may use different protocols.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Message passing protocols to physically relay information from one chain to another. Different protocols have different tradeoffs and security properties, and different L2s may use different protocols.
* Message passing protocols to physically relay information from one chain to another. Different protocols have different trade-offs and security properties, and different L2s may use different protocols.


Things required to achieve this goal:
* Message passing protocols to physically relay information from one chain to another. Different protocols have different tradeoffs and security properties, and different L2s may use different protocols.
* Common, abstracted interface for devs to interact with messaging protocols. Devs should not have to worry about the underlying protocol to bridge between chains. Cross-chain applications should be able to be built on top of any messaging protocol that supports the interface. See [ERC-7841's](https://github.com/elliedavidson/ERCs/blob/d7c16c21f0a012ef391783322ae9b6f0eb0b56bc/ERCS/erc-7841.md) *Motivation* section for details about this goal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Common, abstracted interface for devs to interact with messaging protocols. Devs should not have to worry about the underlying protocol to bridge between chains. Cross-chain applications should be able to be built on top of any messaging protocol that supports the interface. See [ERC-7841's](https://github.com/elliedavidson/ERCs/blob/d7c16c21f0a012ef391783322ae9b6f0eb0b56bc/ERCS/erc-7841.md) *Motivation* section for details about this goal.
* Common, abstracted interface for devs to interact with messaging protocols. Devs should not have to worry about the underlying protocol to bridge between chains. Cross-chain applications should be able to be built on top of any messaging protocol that supports the interface. See [ERC-7841's](https://github.com/elliedavidson/ERCs/blob/d7c16c21f0a012ef391783322ae9b6f0eb0b56bc/ERCS/erc-7841.md) *Motivation* section for details about this goal.


1. Agreeing that such an interface is useful.
2. Agreeing whether goal 1 listed below is in scope for this working group. We will iterate through each goal below until we reach rough consensus among core contributors.
3. Identifying core contributors to move this consensus forward quickly. We will ask for feedback from the broader group periodically.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
3. Identifying core contributors to move this consensus forward quickly. We will ask for feedback from the broader group periodically.
3. Identifying core contributors to move this consensus forward quickly. We will ask for feedback from the broader group periodically.

### 1. Interface supports only the most common use cases: bridging and cross-chain function calls. --> We'll start with 90% of uses cases, aiming to make those APIs simple, and then we can add more complex use cases from there.

Reasoning:
* Supporting all use cases results in a more complex interface. This may lead developers to use wrapper contracts to simplify the interface or to not adopt the interface at all, defeating the purpose of the interface.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Supporting all use cases results in a more complex interface. This may lead developers to use wrapper contracts to simplify the interface or to not adopt the interface at all, defeating the purpose of the interface.
* Supporting all use cases results in a more complex interface. This may lead developers to use wrapper contracts to simplify the interface or to not adopt the interface at all, defeating the purpose of the interface.

### 3. Interface should be proof-agnostic. --> Agree

Reasoning:
* Many proof systems will be used in the underlying messaging protocols. This interface should be compatible with any of those protocols. Otherwise, the interface does not achieve its primary goal abstracting the underlying messaging protocol from developers.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Many proof systems will be used in the underlying messaging protocols. This interface should be compatible with any of those protocols. Otherwise, the interface does not achieve its primary goal abstracting the underlying messaging protocol from developers.
* Many proof systems will be used in the underlying messaging protocols. This interface should be compatible with any of those protocols. Otherwise, the interface does not achieve its primary goal abstracting the underlying messaging protocol from developers.

### 4. Interface should be protocol-agnostic. --> Agree

Reasoning:
* Many messaging protocols will be used. This interface should be compatible with any of those protocols.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Many messaging protocols will be used. This interface should be compatible with any of those protocols.
* Many messaging protocols will be used. This interface should be compatible with any of those protocols.


push + local pull
push + execute
don't need to worry about broadcast (for now
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
don't need to worry about broadcast (for now
don't need to worry about broadcast (for now)

Joxess and others added 12 commits April 3, 2025 21:32
* docs: add atomic swaps with local verification

* Add sequence diagram

* Fix typo

* add standartization section

* Fix typo

* Simplify

* Rephrease the standartization section

* Add node about settlement time

* Fix formatting of time calculation

* Add Security Considerations section

* Add reference in intent types
* Create csa-user-stories.md

* improve user stories and allow chain discovery

* add DS1

* add us5 and feedback

* split sharing address/name case and apply feedback
* add comparison table

* add chain-specific addresses properties

* add comparison as reference

* separate user and machine errors

* remove a should-have property

"Support for both user-facing and programmatic formats"

* move security properties into must-have

* correct caip-10 format

* update comparison table

* update table

Correct EVM support in ERC-7828

* update table

Clarify readability feature

* remove flexibility field

* improve checksum field

clarify ERC-3770 status

* improve chain list field

* add status field

* improve properties

* update comparison table

* add ensip-9 and ensip-11

* add address layers

* add ensip-9 and ensip-11 comparison

* separation of concerns and feedback

* correct title

Cross-Chain Addressing -> Naming

Co-authored-by: Francisco Giordano <[email protected]>

* improve csa properties

* feat: Interoperable address spec (#14)

* docs: address types draft with trivial resolvers

* fix: initial feedback by joxes

* feat: ens resolver spec

* fix: fixes from self-review

* feat: checksum as a layer of defense on human-readable names

* feat: interoperable addresses explainer doc (#28)

* docs: address types draft with trivial resolvers

* fix: initial feedback by joxes

* feat: ens resolver spec

* fix: fixes from self-review

* feat: checksum as a layer of defense on human-readable names

* docs: interoperable address explainer

---------

Co-authored-by: Francisco Giordano <[email protected]>
Co-authored-by: teddy <[email protected]>
Includes:

- add new folders
- update READMEs
- update links
* fix: general polish and fixes

Signed-off-by: 0xRaccoon <[email protected]>

* fix: update PROPERTIES.md

Co-authored-by: Joxes <[email protected]>

---------

Signed-off-by: 0xRaccoon <[email protected]>
Co-authored-by: Joxes <[email protected]>
* feat: rewrite as binary address POC

* fix: cant index compact format over words

* feat: go for shortest representation

* feat: Standard Long Format

* fix: small clarifications

* chore: fix links

* feat: 0xC000 address version

* fix: wording and definitions

* chore: ordering

* feat: changes proposed when preparing for show&tell

* feat: motivation section by joxes

* fix: suggestions by racu

* trivial examples for Appendix B

* feat: made up my mind on byte array encoding

### Must-have

1. Safety - Assuming the mode of message verification is honest, a message is delivered at the destination iff it was sent at the source chain.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Safety - Assuming the mode of message verification is honest, a message is delivered at the destination iff it was sent at the source chain.
1. Safety Assuming the mode of message verification is honest, a message is delivered at the destination only if it was sent from the source chain.


1. Safety - Assuming the mode of message verification is honest, a message is delivered at the destination iff it was sent at the source chain.

2. Liveness - Assuming liveness and censorship-resistance of the source and destination chains, a sent message is eventually delivered at the destination chain.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
2. Liveness - Assuming liveness and censorship-resistance of the source and destination chains, a sent message is eventually delivered at the destination chain.
2. Liveness Assuming the liveness and censorship resistance of both the source and destination chains, any message sent is eventually delivered to the destination chain.


2. Liveness - Assuming liveness and censorship-resistance of the source and destination chains, a sent message is eventually delivered at the destination chain.

3. VM-Agnosticism - Assuming the VM allows arbitrary logic, the interface can be implemented on any VM. The interface works between many different VM implementations.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
3. VM-Agnosticism - Assuming the VM allows arbitrary logic, the interface can be implemented on any VM. The interface works between many different VM implementations.
3. VM-Agnosticism Assuming the virtual machine supports arbitrary logic, the interface can be implemented on any VM. It enables interoperability across different VM implementations.

3. VM-Agnosticism - Assuming the VM allows arbitrary logic, the interface can be implemented on any VM. The interface works between many different VM implementations.
* Balance this goal with goal 6; the interface shouldn't be overly complex in order to achieve VM-agnosticism.

4. Proof-Agnosticism - The interface makes no assumption about how messages are proved to be valid. Many unique proof systems will be used in the underlying messaging protocols, and the interface works the same across all of them.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
4. Proof-Agnosticism - The interface makes no assumption about how messages are proved to be valid. Many unique proof systems will be used in the underlying messaging protocols, and the interface works the same across all of them.
4. Proof-Agnosticism The interface makes no assumptions about how messages are proven valid. Various proof systems can be used in the underlying messaging protocols, and the interface functions uniformly across all of them.


### Why will applications adopt this standard?

Adoption is always difficult with efforts like this. \<Insert relevant XKCD\> However, we still feel it is the best way forward to achieve long term interoperability. Furthermore, the group has prioritized creating adapter contracts for major message passing protocols to ease adoption.
Copy link
Collaborator

Choose a reason for hiding this comment

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

should \<Insert relevant XKCD\> be replaced?


## Open Discussions

1. Should we allow a tx hash as unique id of a message? Current protocols today use this hash as an id, but it adds complexity to the interface since the tx hash is not known at runtime.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could enforce that the sendMessage function defined in the standard returns a unique bytes32 message ID for message identification.

Copy link
Collaborator

@Joxess Joxess left a comment

Choose a reason for hiding this comment

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

Great work on properties!

There are a few considerations I have regarding other aspects that aren't yet addressed, and I think it's worth having a place to capture them:

  • Definition of Events: Having global events like MessageSent / MessageReceived is extremely useful for integrators. Should the standards provide a definition or guideline for them? I think this would be a should or nice-to-have.

  • Message Identifiers: Same as above.

  • Chain Identifier and Address Formats: I believe the standards should (or as a nice-to-have) either support any format or follow an existing convention (similar to how ERC-7786 uses CAIP).

  • Bundling and Hooks: As a nice-to-have, I think the protocol should not make bundling and hooks impossible or overly restrictive.


### Should-have

1. Timely Delivery - Assuming liveness and censorship resistance of the source and destination chains, messages should arrive within a known, bounded time delay.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure how this could be translated into the set of MP standards. Is this a way of saying that the lifecycle between sending and receiving shouldn't be controlled by any central actor? Validation and relayers could potentially interfere with this if the underlying protocol is permissioned.


1. L1 <-> L1 messaging - The interface should work to interoperate across L1s in the same way it interoperates within the Ethereum ecosystem. (This property is implied by the other properties).

2. Gas abstraction - The interface should support the ability for users to pay gas on the destination chain from the source chain, since this is required in most use cases.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this separate from relayer/protocol fees? We should make it clear what the case is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants