Skip to content

feat: euclid phase-2 contract changes #74

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

Merged
merged 37 commits into from
Mar 24, 2025
Merged

feat: euclid phase-2 contract changes #74

merged 37 commits into from
Mar 24, 2025

Conversation

zimpha
Copy link
Member

@zimpha zimpha commented Feb 13, 2025

This PR contains all changes for the planned EuclidV2 upgrade. Specifically,

  • Reduce commit cost: we reduce the cost to commit batches significantly by
    1. move calldata (chunks and block contexts) to blob -> no notion of chunks anymore
    2. chaining of L1 messages with MessageQueueV2: instead of iterating through L1 messages and computing the hash at commit time, L1 messages are chained with a rolling hash. so that the last hash represents a commitment to the entire queue.
    3. move point evaluation to circuit
    4. commit multiple batches in a single transaction
  • Enforced transactions: transactions are appended to MessageQueueV2 together with the time they have been submitted to L1. If not included/finalized for maxDelayMessageQueue, the operator can not finalize any more batches until including those messages. If it continues to censor messages permissionless mode will eventually activate.
  • Enforced/permissionless batches: if no batch has been finalized for maxDelayEnterEnforcedMode, batch submission becomes permissionless. Anyone can submit a batch together with a proof.
  • Deprecate Clique: we introduce a SystemConfig contract that contains the address of the currently valid signer for L2 blocks. L2 nodes can read and will only accept L2 blocks signed by the given address.

@zimpha zimpha changed the base branch from main to feat/mpt_migration February 13, 2025 08:37
zimpha and others added 2 commits February 13, 2025 20:56
Co-authored-by: Alejandro Ranchal-Pedrosa <a.ranchalpedrosa@gmail.com>
Copy link

@jonastheis jonastheis left a comment

Choose a reason for hiding this comment

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

Some questions:

  • maybe I missed it but do we ensure that all messages on MessageQueueV1 are finalized before we allow finalization of MessageQueueV2 messages?
  • for enforced transactions: don't we need to check that all messages on the queue that are older than a certain threshold are included when finalizing? otherwise we don't actually force the sequencer to include them. it could keep censoring forever and permissionless mode would not activate either.

@zimpha
Copy link
Member Author

zimpha commented Feb 14, 2025

Some questions:

  • maybe I missed it but do we ensure that all messages on MessageQueueV1 are finalized before we allow finalization of MessageQueueV2 messages?
  • for enforced transactions: don't we need to check that all messages on the queue that are older than a certain threshold are included when finalizing? otherwise we don't actually force the sequencer to include them. it could keep censoring forever and permissionless mode would not activate either.
  1. good catch, I can add the check
  2. probably I forget to add the check, since this code is not added in previous PR.

@Thegaram Thegaram changed the title euclid phase 2 feat: euclid phase-2 contract changes Feb 20, 2025
Thegaram
Thegaram previously approved these changes Feb 26, 2025
Base automatically changed from feat/euclid_phase_1 to main March 7, 2025 11:33
@Thegaram Thegaram dismissed their stale review March 7, 2025 11:33

The base branch was changed.

@zimpha zimpha merged commit 8e6a02b into main Mar 24, 2025
2 checks passed
@zimpha zimpha deleted the feat/euclid_phase_2 branch March 24, 2025 14:37
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.

3 participants