Skip to content

EIP-7002 EIP-7251 - Implement Withdrawal and Consolidation request types #2762

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

Conversation

anvacaru
Copy link
Contributor

Request Processing System Overhaul

  • Changed deposit request cell type from List to Bytes and added withdrawal/consolidation request cells
  • Implemented system call infrastructure using #systemCall rules.
  • Added request validation logic with #validateRequestsRoot to verify that sha256 generated hash matches the one provided in the block header
  • Updated #finalizeBlock rules to use a comprehensive #processGeneralPurposeRequests which:
      1. Goes through the <log> events and fetches deposit requests
      1. Does a system call to WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS and saves the output in <withdrawalRequests> cell.
      1. Does a system call to CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS and saves the output in <consolidationRequests> cell.

New Address Constants

  • Added predeploy address constants for system contracts:
    • BEACON_ROOTS_ADDRESS, HISTORY_STORAGE_ADDRESS
    • WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS
  • Added request type identifiers (deposit=b"\x00", withdrawal=b"\x01", consolidation=b"\x02")

Infrastructure Improvements

  • Changed beacon/block history functions to InternalOp type
  • Added Prague network support with CancunToPragueAtTime15k schedule
  • Updated deposit data extraction with better binary parsing, using #asWord instead of Bytes2Int

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