Skip to content

Update ERC-7786: Extend ERC 7786 to support PULL communication mode #852

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

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

philippecamacho
Copy link

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Jan 15, 2025

File ERCS/erc-7786.md

Requires 1 more reviewers from @Amxx, @cjcobb23, @ernestognw, @frangio, @sergeynog

@eip-review-bot eip-review-bot changed the title Extend ERC 7786 to support PULL communication Update ERC-7786: Extend ERC 7786 to support PULL communication Jan 15, 2025
@philippecamacho philippecamacho marked this pull request as draft January 15, 2025 20:15
@philippecamacho philippecamacho changed the title Update ERC-7786: Extend ERC 7786 to support PULL communication Update ERC-7786: Extend ERC 7786 to support PULL communication mode Jan 15, 2025
@github-actions github-actions bot added the w-ci label Jan 15, 2025
ERCS/erc-7786.md Outdated
@@ -103,6 +103,12 @@ This event signals that a would-be sender has requested a message to be sent.

If `outboxId` is present, post-processing MAY be required to send the message through the cross-chain channel.

#### Mandatory and optional attributes

The `attributes` parameter MUST contain as its first element the value `read(true)` or `read(false)`. `read(true)` means the message can be read by the application on the destination gateway. `read(false)` means the message by pushed by the destination gateway on the application via `executeMessage`(see below).
Copy link

Choose a reason for hiding this comment

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

  1. if mandatory, why not just explicitly enforce at the function signature level? i.e. sendMessage(dest, recv, payload, bool pullable, attributes)
  2. personally, i think read(true) is not intelligible. I prefer one of pullable, supports_pull, pull_based, push_based.

wdyt? @frangio @elliedavidson

Copy link
Author

Choose a reason for hiding this comment

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

pushBased used in 15c1f1b.

ERCS/erc-7786.md Outdated

The `attributes` parameter MUST contain as its first element the value `read(true)` or `read(false)`. `read(true)` means the message can be read by the application on the destination gateway. `read(false)` means the message by pushed by the destination gateway on the application via `executeMessage`(see below).

In the case `read(true)` is set as teh first element of the `attributes` parameters, the next element MUST be `messageId(val)` where val is a sequence of 32 bytes.
Copy link

@alxiong alxiong Jan 16, 2025

Choose a reason for hiding this comment

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

  • typo "teh" -> "the"
  • didn't Francisco and CJ say they would want to add msgId as mandatory for all?

Copy link
Author

Choose a reason for hiding this comment

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

typo "teh" -> "the"

Thanks, fixed in 6ad57be.

didn't Francisco and CJ say they would want to add msgId as mandatory for all?

That is possible indeed.
cc @frangio @cjcobb23

Copy link
Author

@philippecamacho philippecamacho Jan 17, 2025

Choose a reason for hiding this comment

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

messageId has been defined as a default attribute in 15c1f1b.

ERCS/erc-7786.md Outdated
@@ -103,6 +103,12 @@ This event signals that a would-be sender has requested a message to be sent.

If `outboxId` is present, post-processing MAY be required to send the message through the cross-chain channel.

#### Mandatory and optional attributes
Copy link
Contributor

Choose a reason for hiding this comment

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

All attributes should be optional. read(false) would be the default.

Copy link
Author

@philippecamacho philippecamacho Jan 17, 2025

Choose a reason for hiding this comment

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

Makes sense. I use the term "default" attributes instead, in 15c1f1b. Also following @alxiong's suggestion I used the name pushBased instead of read.

@github-actions github-actions bot added w-ci and removed w-ci labels Jan 17, 2025
@github-actions github-actions bot removed the w-ci label Jan 20, 2025
@github-actions github-actions bot added the w-ci label Jan 20, 2025
@github-actions github-actions bot added w-ci and removed w-ci labels Jan 21, 2025
Copy link

@cjcobb23 cjcobb23 left a comment

Choose a reason for hiding this comment

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

To be totally honest, I think the addition of this either push or pull operating mode has complicated the standard more than is optimal. I would actually prefer for all gateways to support both push and pull, and I think that would be cleaner. If an app doesn't want push, it can just choose to either not implement executeMessage, or implement it as a no-op. And for the storage concern (forcing all gateways to store all messages so they are queryable), gateways can still delete messages after some time if they choose to, with a mechanism to repopulate if neccessary; most messages will be consumed fairly quickly anyways, and repopulation can be triggered by retrying the relaying process from source.

Just my thoughts. I just think a big advantage of this ERC is it's simplicity, and I don't really like the added complexity of this switching behavior.

ERCS/erc-7786.md Outdated

Compared to previous ERCs in this area, this ERC offers compatibility with chains outside of the Ethereum/EVM ecosystem, and it is extensible to support the different feature sets of various protocols while offering a shared core of standard functionality.
Compared to previous ERCs in this area, this ERC offers compatibility with chains outside of the Ethereum/EVM ecosystem, and it is extensible to support the different feature sets of various protocols while offering a shared core of standard functionality. Moreover, this standard supports both PUSH and PULL communication modes, capturing a larger class of interoperability protocols.

Choose a reason for hiding this comment

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

I actually have concerns about using push and pull in this way, based on our conversations in the working group. I think these terms are too broad, and mean different things to different people, and so adding this here could lead to confusion.

Copy link
Author

Choose a reason for hiding this comment

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

I agree, also because PUSH/PULL communication modes are not defined in this section. The sentence was removed in 39159f7.

@github-actions github-actions bot added w-ci and removed w-ci labels Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

The commit b566adb (as a parent of c10aac8) contains errors.
Please inspect the Run Summary for details.

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

Successfully merging this pull request may close these issues.

5 participants