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

[FEAT] Support L1-L2 Communication #536

Open
dutterbutter opened this issue Jan 15, 2025 · 0 comments
Open

[FEAT] Support L1-L2 Communication #536

dutterbutter opened this issue Jan 15, 2025 · 0 comments
Labels
feature ➕ Feature item p1 🟠 Indicates high priority item
Milestone

Comments

@dutterbutter
Copy link
Collaborator

📝 Description

Currently, anvil-zksync does not support L1-L2 communication, making it challenging to test or debug L1-L2 transactions. This limitation also hinders the creation of a more realistic local development and testing environment for cross-chain applications.

🤔 Rationale

Adding support for L1-L2 communication benefits:

  1. Enabling seamless testing and debugging of L1-L2 transactions.
  2. Providing a more realistic and deterministic local testing environment.
  3. Facilitating the development of cross-chain applications.
  4. Supporting future interop with multiple L2 instances.

Potential Approach

  1. Perform genesis on anvil once.
  2. Use anvil_dumpState to capture the deterministic state of L1.
  3. Start anvil as a subprocess within anvil-zksync.
  4. Use anvil_setState to initialize the L1 state in the subprocess.
  5. Implement basic eth_sender and eth_watch components for communication between L1 and L2.
  6. Enhance testability by introducing methods like anvil_commitBatch, anvil_proveBatch, and anvil_finalizeBatch for managing batches deterministically.
@dutterbutter dutterbutter added p1 🟠 Indicates high priority item feature ➕ Feature item labels Jan 15, 2025
@dutterbutter dutterbutter added this to the Q1 2025 milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ➕ Feature item p1 🟠 Indicates high priority item
Projects
None yet
Development

No branches or pull requests

1 participant