kevaundray
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Execution Layer Rollout plan ## Scope and overall goals In this document, we state the different phases for deploying the necessary artifacts from the EL that will allow a prover to create proofs of executions. These zkEVM proofs will then be used in a modified consensus layer client for verifying the correctness of an execution payload. # Deliverable: Stateless input generation This is the input to the stateless function. At a high level, one needs: - ChainID - Block - Merkle Patricia Trie Multi Witness The first two are readily available in all clients. The last is what we want stateful EL clients to implement. While we have optional proofs, this is better served via an RPC endpoint, since the one who is creating the proof for block N is most likely not going to be the block builder for block N. ## Phase 0 - Implement debug_executionWitness **Goal:** To generate the execution witness for recent blocks and expose it via a RPC endpoint. **Description:** - While this has not been standardized in EEST, we recommend using reth as a reference implementation [here](https://github.com/paradigmxyz/reth/blob/3e96557e693bf92b1193b19625b457c0bbad9be0/crates/rpc/rpc/src/debug.rs#L515). Phase 1 of the guest program also makes note of this current lack of standardization. # Deliverable: Guest program The guest program is the function that gets proven in a zkEVM. This is commonly referred to as the stateless program. ## Phase 0 - Compile to target **Goal:** If targeting RISC-V, compile an empty program to [RV64IM-None](https://github.com/eth-act/zkvm-standards/tree/main/standards/riscv-target) **Description:** - Compilation pipeline should use a Dockerfile, so that it can eventually be plugged into [Ere](https://github.com/eth-act/ere) - Depending on your programming language, this phase may be trivial. - The output should be an ELF ## Phase 1 - Create a stateless validation program **Goal:** To create a program that is able to validate the state transition function using MPT witnesses. **Description:** - The exact program API and the standardization on inputs is blocked by it not being in the [execution specs](https://github.com/ethereum/execution-specs/issues/1590) - While this is not standardized, we remark that the input should be a Block and the ExecutionWitness. See [here](https://github.com/paradigmxyz/reth/blob/b3c00ed602f2a8805974f25be714a3bea26901e9/crates/stateless/src/lib.rs#L64). - This must be tested against the Ethereum Execution Spec Tests(EEST). The ExecutionWitness will be generated outside of the spec tests until a reference implementation is added. ## Phase 2 - Compile the stateless validation program to target **Goal:** To compile the stateless validation program made in phase to the relevant target using the workflow created in phase 1 **Description:** - This step may prove to be challenging as the state validation program may use dependencies or primitives that are not compatible with the target. Example of this is the standard library in Rust when compiling to bare metal targets. > Note: So far, none of the above phases have required knowledge of zkVMs. At this point in time, it should be possible to run the ELF using qemu-virt ## Phase 3 - Integrate zkVM IO **Goal:** To allow input to be passed to the program when executed in zkVM environment **Description:** - It is first recommended to implement stdout as a first step, to allow one to print to the console when running the zkVM emulator. - Normal programs will read from stdin via system calls. In a zkVM environment, this is not the case. The exact mechanism that is used to get input is somewhat zkVM specific. [Here](https://github.com/eth-act/zkvm-standards/pull/8) - We recommend testing this out on a simpler program and not the stateless validation program at first > For testing, we advise using the emulator that comes packaged with the zkVM, since creating proofs would take too long. ## Phase 4 - Integrate zkVM precompiles **Goal:** To allow particular functions to be accelerated when in zkVM environment **Description:** - These can be viewed as software accelerators. For a list of the available functions, see [here](https://github.com/eth-act/zkvm-standards/blob/main/standards/c-interface-accelerators/zkvm_accelerators.h) - We recommend testing this out on a simpler program first and not the stateless validation program at first > For testing, we advise using the emulator that comes packaged with the zkVM, since creating proofs would take too long. ## Phase 5 - Distribution **Goal:** To emulate the end-to-end workflow for an execution layer(EL) client. **Description:** - Builds should be reproducible, we would prefer Dockerfiles so that we can integrate it easily into [Ere](https://github.com/eth-act/ere) - Note that block builders and Cl clients will download the ELF precompiled from some location. In almost all cases, this will be the EL's release page. - Since we have chosen to not standardize on the memory layout and precompile calling convention, each zkVM will have its own ELF. - An EL will eventually need to create these ELFs for the supported zkVMs. - We recommend the following naming scheme for each elf: `<EL_NAME>-<EL_VERSION>-<ZKVM_NAME>-<ZKVM_SDK_VERSION>` -- an example of this is `geth-v1_14_1-sp1-v3_2_0` - All ELFs must be signed using minisign

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully