Skip to content

PoC to improve accessibility of same-slot messaging #117

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 3 commits into
base: main
Choose a base branch
from

Conversation

JasonVranek
Copy link

Signaler.sol contains logic that is meant to be attached to EOAs via EIP-7702. The idea is to add a post-execution hook to EOAs that writes relevant data to the L1 SignalService contract.

The motivation is that while the SignalService contract enables same-slot L1->L2 messaging, the messages are limited to what is written to the L1 SignalService contract. Ideally the L2 can synchronously read all L1 data. Unfortunately, this seems to require either ToB execution to read arbitrary data from the latest L1 slot (as described by Gwyneth’s Ultra TXs) or EIP-7814 which allows the L1 state to be introspected and passed to the L2, during the L1’s execution.

This PoC is a hacky shortcut to get closer to the end goal, by making it more seamless to populate the SignalService contract with signals.

To illustrate this, we can look to an oracle example: Assume ChainLink just posted the latest pricefeed to the L1.

  • ideal case: The current inter-block L1 state is sent as a signal to the L2 via EIP-7814, and the pricefeed contract's storage slot can be proven to the L2
  • ToB case with Mega Txs: not possible, can only read the post-stateroot from the previous L1 block
  • ToB case with Ultra Txs: the pricefeed transaction is emulated in L2 -> ultra tx magic -> price is available
  • Same slot msging with Signaler.sol: Oracle delegates EOA logic to Signaler contract via EIP-7702. Upon posting the price, the related IO is automatically sent as a signal to the SignalService contract making the price available to L2 contracts.
  • Less portable approach without 7702: Oracle posts to a dedicated proxy contract which posts the pricefeed, then posts the signal
  • Even less practical: Chainlink upgrades their pricefeed contract to post directly to the SignalService contract 😅

In summary, if wallets adopt Signaler.sol it will vastly increase the breadth of data that can be passed from L1->L2 in the same slot, potentially allowing more synchronous composability use-cases before we have nice things like EIP-7814.

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.

1 participant