Skip to content
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

feat(forks,specs,fixtures): Add Blob Schedule #1040

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

marioevz
Copy link
Member

🗒️ Description

Adds blob schedule as described in this PR: ethereum/EIPs#9129

Transition Tool Interface Changes

  • Adds targetBlobsPerBlock and maxBlobsPerBlock to the Environment (env.json) structure that is passed with each request
  • The parameters represent the blob schedule for the active fork where transition is supposed to be executed

Transition tool normally receives the active fork either as a parameter (--state.fork for Geth for example) or as part of the state structure when the transition tool operates in server mode.

Another alternative would be to pass the blob schedule within this structure:

"state": {
    "fork": "Cancun",
    "chainid": 1,
    "reward": 0,
    "blobSchedule": {
            "Cancun": {
                "target": "0x3",
                "max": "0x6"
            }
        }
  }

State Test Fixture Format Changes

Adds targetBlobsPerBlock and maxBlobsPerBlock to the env field in every fixture:

"env": {
            "currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
            "currentGasLimit": "0x016345785d8a0000",
            "currentNumber": "0x01",
            "currentTimestamp": "0x03e8",
            "currentRandom": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "currentDifficulty": "0x00",
            "currentBaseFee": "0x07",
            "currentExcessBlobGas": "0x00",
            "targetBlobsPerBlock": "0x03",
            "maxBlobsPerBlock": "0x06"
        }

This includes adding this to Cancun fork, but it could be removed and only included from Prague onwards.

Another option could be to add the blobSchedule structure to the root of the fixture:

{
    "tests/cancun/eip1153_tstore/test_basic_tload.py::test_basic_tload_after_store[fork_Cancun-state_test]": {
        "env": {
            ...
        },
        "pre": {
            ...
        },
        "transaction": {
            ...
        },
        "post": {
            ...
        },
        "blobSchedule": {
            "Cancun": {
                "target": "0x3",
                "max": "0x6"
            }
        },
        "_info": {
            ...
        }
    }
}

Blockchain Test Fixture Format Changes

The blobSchedule structure is added as a new field to the fixture format:

{
    "tests/cancun/eip1153_tstore/test_basic_tload.py::test_basic_tload_after_store[fork_Cancun-blockchain_test]": {
        "network": "Cancun",
        "genesisBlockHeader": {
            ...
        },
        "pre": {
            ...
        },
        "postState": {
            ...
        },
        "lastblockhash": "...",
        "blobSchedule": {
            "Cancun": {
                "target": "0x3",
                "max": "0x6"
            }
        },
        "genesisRLP": "...",
        "blocks": [
            ...
        ],
        "sealEngine": "NoProof",
        "_info": {
            ...
        }
    }
}

🔗 Related Issues

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

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