Skip to content

Implement Deposit Requests #2748

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 19 commits into from
May 7, 2025
Merged

Implement Deposit Requests #2748

merged 19 commits into from
May 7, 2025

Conversation

anvacaru
Copy link
Contributor

@anvacaru anvacaru commented Apr 24, 2025

Implementing Execution Layer Requests EIP-7685 and Deposit Requests EIP-6110.

  • Updating rlp encoding and decoding of the blockheader to include new requestsRoot hash.
  • During block finalization, parse all logs to identify requests.

Configuration & Structure Changes

  • Add requests.md file with execution layer request implementation

  • Add configuration cells:

    • <requestsRoot> in block header
    • <requests> and <depositRequests> in network section
  • Add execution flow logic:

    • #filterLogs function to process transaction logs. After all transactions in a block have finished executing, rules for #filterLogs will parse each log item to look for various requests (only Deposit implemented so far).
    • Add a log filtering call to block finalization
  • #parseDepositRequest: Validates and extracts deposit requests by filtering logs from the deposit contract with the correct event signature

  • #extractDepositData: Extracts the five deposit fields (pubkey, withdrawal_credentials, amount, signature, index) from raw log data according to EIP-6110 field offsets

  • #isValidDepositEventData: Validates deposit log structure by checking data length (576 bytes) and verifying all expected field offsets and sizes

  • #computeRequestsHash: Calculates the final 32-byte commitment hash that goes into the block header by processing all non-empty requests

  • #computeRequestsHashIntermediate: Builds the intermediate hash list by skipping empty requests, hashing valid requests, and concatenating results in request-type order

  • Add protocol features:

    • Ghasrequests flag (activated in Prague)
    • EVMC_INVALID_BLOCK status code
  • Update block hash calculations:

    • Add request hash to block header hash
    • Update RLP serialization
  • Update state management:

    • Initialize request fields in clearBLOCK
    • Handle request fields in RLP loading
  • Updated K proof files

@anvacaru anvacaru marked this pull request as ready for review April 25, 2025 16:42
@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 12289cb into master May 7, 2025
12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the eip-7685 branch May 7, 2025 21:01
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.

2 participants