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: make VM produce system logs #600

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

Conversation

itegulov
Copy link
Contributor

What 💻

Major changes introduced in this PR:

  • Migrated all contracts (l1, l2, system, test) to foundry. Hardhat JSON artifacts and yul zbins are gone now
  • Made VM run identical (or very close to) to how it is done in zksync-era, thus enabling system log production
  • As a side effect I had to deploy a few more system contracts (L2AssetRouter, L2GenesisUpgrade, Bridgehub, MessageRoot just to name a few)
  • Another side effect is that L1 now expects upgrade tx to be submitted on startup so I modified L1 setup script to dump it from Postgres during bootstrapping. Then L1 sidecar applies it during initialization

Overall changes in this PR are a bit controversial as they introduce more of the upstream complexity into a testing tool. OTOH, I tried to contain the changes to L1-specific stuff and indeed the existing user flow is mostly unaffected (except for system log production, which arguably should have been enabled all this time). In other words protocol upgrade tx is not submitted when not running L1 and extra batch metadata is not used anywhere other than L1-L2 communication.

Related to #536

Why ✋

Major stepping stone toward working L2->L1 messages. I have a test working locally that is based on top of this branch.

@itegulov itegulov requested a review from a team as a code owner February 27, 2025 09:53
@itegulov
Copy link
Contributor Author

FYI diff for ./contracts is here

TLDR enabled system log checks, disabled some other checks (timestamp, DA validator), support foundry for impersonated bootloaders

Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

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

Overall LGTM, and I like the changes a lot.
I would love to see seal criteria to avoid performance penalty; otherwice I'd say it's super mergeable.

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.

2 participants