Mikhail Kalinin
    • 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

      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.
      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
    • 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 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

    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.
    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
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # The Merge Test Plan ## Spec documents * [consensus-specs](https://github.com/ethereum/consensus-specs/tree/dev/specs/merge) * [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675) * [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399) * [Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md) * Optimistic sync ## Standalone (Unit) ### consensus-specs * is_merge_transition_complete * is_merge_transition_block * is_execution_enabled * compute_timestamp_at_slot * get_inactivity_penalty_deltas * slash_validator * process_block * process_execution_payload * process_slashings * initialize_beacon_state_from_eth1 * is_valid_terminal_pow_block * validate_merge_block * upgrade_to_merge * get_pow_block_at_terminal_total_difficulty * get_terminal_pow_block * prepare_execution_payload * get_execution_payload ### EIP-3675 + EIP-4399 * Blockchain tests (client will have to switch to the PoS consensus engine to run these tests) * PoW block processing * decsendands of a terminal block are not processed * Block structure * blocks are discarded if the value of either of the following fields deviates from the corresponding constant: `ommersHash`, `difficulty`, `nonce`, `ommers` * `mixHash` can be set to a random value * `extraData` respects `MAX_EXTRA_DATA_BYTES` * other fields remain unchanged * Block validity * `difficulty` isn't verified against difficulty formula * `nonce` and `mixHash` aren't verified against Ethash rules * list of ommers and each ommer isn't verified (don't know how to check though as the list must be empty) * Transition block validity * a parent of `TRANSITION_BLOCK` satisfies terminal PoW block conditions * Other block validaty rules remain * Block and ommer rewards * `coinbase` account doesn't receive block rewards * `coinbase` account doesn't receive ommer rewards (seems infeasible to check) * transaction fees remain * EVM * `RANDOM` opcode returns expected value * Regression * check that 3675 and 4399 aren't taking effect before the `TRANSITION_BLOCK` * Fuzzing ## Integration (Hive) ### Engine API * CL mock + EL * `eth_` namespace is also exposed * EL respects the order of `forkchoiceUpdated` calls * `engine_executePayload` * `engine_forkchoiceUpdated` * `engine_getPayload` * CL + EL mock * CL respects the order of method calls while assigning JSON-RPC request IDs * CL + EL * CL implementation of Engine API methods * `engine_executePayload` * `engine_forkchoiceUpdated` * `engine_getPayload` ### EIP-3675 + EIP-4399 * CL mock + EL * switches the fork choice rule upon the first `POS_FORKCHOICE_UPDATED` event * `POS_FORKCHOICE_UPDATED` updates the head * `POS_FORKCHOICE_UPDATED` updates finalized block * head isn't changed until `POS_FORKCHOICE_UPDATED` is received, even if the new payload is imported * descendants of a terminal block are not propagated * any block is not propagated after the first block gets finalized * does not sync beyond terminal block * block with transaction using `RANDOM` opcode is executed as expected starting with `TRANSITION_BLOCK` * block with transaction using `DIFFICULTY` opcode is executed as expected before the `TRANSITION_BLOCK` * Transition * block structure, block validity, block rewards, and fork choice changes takes effect starting with `TRANSITION_BLOCK` * payload is successfully created upon request *before* the transition, i.e. the transition block * switch between several transition PoW blocks happens successfully ### consensus-specs + EIPs * CL + EL * consensus-specs * state transition happy case * state transition invalid payload wrt execution * fork choice (see the Transition below) * Transition * transition scenario with no overrides * payload is successfully created upon request *before* the transition, i.e. the transition block * CL passes transition block while syncing optimistically and must go back to verify TTD or TBH * list all other possible scenarios of the transition process * case when `TERMINAL_BLOCK_HASH` is set * `TRANSITION_BLOCK` must be a child of a block identified by `TERMINAL_BLOCK_HASH` * list all other possible scenarios of the transition process with `TERMINAL_BLOCK_HASH` override * block structure, block validity, block rewards, and fork choice changes takes effect starting with `TRANSITION_BLOCK` * PoS chain takes precedence * `TRANSITION_BLOCK` isn't a child of a terminal PoW block * in lock-step * after syncing optimistically * terminal PoW block is invalid wrt execution ruleset -- `TRANSITION_BLOCK` can't be verified at all * `TRANSITION_BLOCK` is invalid wrt execution ruleset * switch between several terminal PoW blocks happens successfully * switch between several transition blocks happens successfully * withheld transition PoW block is successfully processed -- network partitioning * transition block with the payload which parent is unavailable doesn't brick a node and it can proceed with building the chain and attesting, and can successfully complete the transition process ## System (Testnets) * general purpose * stress testnets * production sized ## Useful resources * Mergemock * https://github.com/protolambda/mergemock * Test cases for Merge * https://hackmd.io/z2h_RAJoTHWSRka-9MDEVg * Engine API test vectors for The Merge™ * https://notes.ethereum.org/rmVErCfCRPKGqGkUe89-Kg * EIP 4399 test vectors (Kintsugi) * https://notes.ethereum.org/dfVXr2h2TqWDKSXZaMwGTw * Kintzugi testing * https://github.com/marioevz/kintsugi_testing * Consensus spec tests * https://github.com/ethereum/consensus-spec-tests * Retesteth * https://github.com/ethereum/retesteth * EL tests * https://github.com/ethereum/tests * Hive * https://github.com/ethereum/hive * Eth2 Hive - take 2 * https://github.com/ethereum/hive/pull/481 * Prysmatic end-to-end testing tool * https://github.com/prysmaticlabs/prysm/tree/develop/testing/endtoend * EVM-fuzzing * https://github.com/MariusVanDerWijden/FuzzyVM * Engine-API fuzzing * https://github.com/MariusVanDerWijden/merge-fuzz * Transaction fuzzing * https://github.com/MariusVanDerWijden/tx-fuzz * EIP-3675 + EIP-4399 blockchain tests * https://docs.google.com/spreadsheets/d/1V8egI6VbtZR_sqUNCdX2QeRVb9fCJ3QmzCu8VZFs5pA/edit#gid=0 * FuzzyVM * https://github.com/MariusVanDerWijden/FuzzyVM

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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