Skip to content

Conversation

@frangio
Copy link
Contributor

@frangio frangio commented May 22, 2025

This PR includes the change to interoperable binary addresses from #1038, but preserves attributes with a small change, and does not add hooks.

To make clearer the fact that attributes are metadata strictly intended for the gateway, the attributes argument was removed from receiveMessage and metadata will not be forwarded to the receiver.

The rationale for preserving a structured form of metadata rather than opaque extraData is:

  • The use of opaque extraData would rely entirely on off-chain consensus and coordination on encoding and semantics between the sender and the gateway. This prevents on-chain constructions that are able to detect errors and adapt to gateway functionality.
    • Tagging or versioning metadata facilitates on-chain coordination.
    • This is the bytes4 selector that is prepended to the actual metadata values. The gateway can use this to safely detect that it supports the metadata that was passed in, which could otherwise successfully decode but be misinterpreted.
    • A getter on the gateway to check for support allows senders to adapt their behavior to what the gateway supports. This is supportsMetadata(bytes4). For an example, consider a sender contract that supports multiple ways of specifying gas payment for the call and can choose which one to use.
  • The possibility of providing multiple pieces of metadata (bytes[]) as opposed to a single piece of metadata (bytes extraData) allows multiple extensions to be combined without disrupting the other metadata and requiring less coordination.

The rationale for not adding hooks is:

  • In order for hooks to be useful we need to design and specify the mechanism by which the gateway and a hook communicate. While there were advances in #1038 with 62ab9a3, I don't think the work is done, for example although there is a getTransientMessageContext() getter in the gateway, as currently specified the gateway address has to be provided by the sender in the hook data and the hook must trust it.
  • Structured metadata easily subsumes hooks: we can define an extension where metadata of the form hook(address,bytes,uint256) triggers a hook call.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented May 22, 2025

✅ All reviewers have approved.

@github-actions github-actions bot added the w-ci label May 22, 2025
@frangio frangio changed the title Update ERC-7786: Use interoperable binary addresses, rename attributes to metadata Update ERC-7786: Use interoperable binary addresses, improve attributes description May 26, 2025
@frangio frangio changed the title Update ERC-7786: Use interoperable binary addresses, improve attributes description Update ERC-7786: Use interoperable binary addresses and improve attributes spec May 26, 2025
@frangio frangio changed the title Update ERC-7786: Use interoperable binary addresses and improve attributes spec Update ERC-7786: Use interoperable binary addresses, improve attributes May 26, 2025
@github-actions github-actions bot removed the w-ci label May 26, 2025
@frangio frangio marked this pull request as ready for review May 26, 2025 21:27
@frangio frangio requested a review from eip-review-bot as a code owner May 26, 2025 21:27
@frangio
Copy link
Contributor Author

frangio commented May 26, 2025

Update ready but will be blocked by #1002.

@github-actions github-actions bot added the w-ci label May 26, 2025
Copy link
Collaborator

@xinbenlv xinbenlv left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements to ERC-7786! I have one specific question about event indexing.

@eip-review-bot eip-review-bot enabled auto-merge (squash) May 26, 2025 23:45
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@u59149403
Copy link

@frangio , CAIP-350/ERC‑7930 is too immature for building other standards upon it. Currently it doesn't specify binary encoding for any namespace, even for EVM-compatible chains.

So, to build other standards (such as ERC-7786) on top of CAIP-350/ERC‑7930 the following conditions should be met:

  • CAIP-350 and ERC‑7930 both should be merged
  • Table of namespaces ( https://namespaces.chainagnostic.org ) should get own column for CAIP-350
  • That column should get implementations for many namespaces, including EVM-compatible chains, i. e. EIP-155 . I. e. there should be "X" (pointing to real document) on intersection of EIP-155 row and CAIP-350 column
  • And ideally, CAIP-350 should be implemented for all namespaces, for which CAIP-10 is implemented (i. e. CAIP-350 column should have at least as many Xs as CAIP-10 has)

Otherwise there is no sense in migrating from CAIP-10 to less mature standard (CAIP-350/ERC‑7930)

@frangio
Copy link
Contributor Author

frangio commented May 28, 2025

Otherwise there is no sense in migrating from CAIP-10 to less mature standard

I disagree on this part. Parsing CAIP-10 ASCII strings on chain is so bad that it makes sense to migrate to a less mature standard.

eip-review-bot
eip-review-bot previously approved these changes May 30, 2025
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

auto-merge was automatically disabled May 30, 2025 17:48

Head branch was pushed to by a user without write access

@eip-review-bot eip-review-bot enabled auto-merge (squash) May 30, 2025 17:49
eip-review-bot
eip-review-bot previously approved these changes May 30, 2025
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

auto-merge was automatically disabled June 22, 2025 22:35

Head branch was pushed to by a user without write access

eip-review-bot
eip-review-bot previously approved these changes Jun 26, 2025
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@frangio
Copy link
Contributor Author

frangio commented Jun 26, 2025

Blocked on #1002.

auto-merge was automatically disabled July 4, 2025 14:15

Head branch was pushed to by a user without write access

@eip-review-bot eip-review-bot enabled auto-merge (squash) July 4, 2025 14:16
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@github-actions github-actions bot added w-ci and removed w-ci labels Jul 4, 2025
@SamWilsn SamWilsn closed this Jul 8, 2025
auto-merge was automatically disabled July 8, 2025 16:47

Pull request was closed

@SamWilsn SamWilsn reopened this Jul 8, 2025
@eip-review-bot eip-review-bot enabled auto-merge (squash) July 8, 2025 16:48
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@github-actions
Copy link

github-actions bot commented Jul 8, 2025

The commit cab9086 (as a parent of 87f4d8e) contains errors.
Please inspect the Run Summary for details.

function receiveMessage(
bytes32 receiveId, // Unique identifier
bytes calldata sender, // Binary Interoperable Address
bytes calldata payload,
Copy link

Choose a reason for hiding this comment

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

The comma here is redundant.

Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

@eip-review-bot eip-review-bot merged commit d0a7eaf into ethereum:master Jul 9, 2025
9 of 10 checks passed
@github-actions github-actions bot removed the w-ci label Jul 9, 2025
@frangio frangio deleted the 7786-wg-updates branch July 10, 2025 00:11
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.

7 participants