diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 013f1a81aa6..598a058edbb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,10 +16,11 @@ Test fixtures for use by clients are available for each release on the [Github r - 🔀 Refactor `ethereum_test_fixtures` and `ethereum_clis` to create `FixtureConsumer` and `FixtureConsumerTool` classes which abstract away the consumption process used by `consume direct` ([#935](https://github.com/ethereum/execution-spec-tests/pull/935)). - ✨ Allow `consume direct --collect-only` without specifying a fixture consumer binary on the command-line ([#1237](https://github.com/ethereum/execution-spec-tests/pull/1237)). - ✨ Allow `fill --collect-only` without the need for existence of the folder `./fixtures' -- ✨ Report the (resolved) fixture tarball URL and local fixture cache directory when `consume`'s `--input` flag is a release spec or URL [#1239](https://github.com/ethereum/execution-spec-tests/pull/1239). +- ✨ Report the (resolved) fixture tarball URL and local fixture cache directory when `consume`'s `--input` flag is a release spec or URL ([#1239](https://github.com/ethereum/execution-spec-tests/pull/1239)). - ✨ EOF Container validation tests (`eof_test`) now generate container deployment state tests, by wrapping the EOF container in an init-container and sending a deploy transaction ([#783](https://github.com/ethereum/execution-spec-tests/pull/783), [#1233](https://github.com/ethereum/execution-spec-tests/pull/1233)). - ✨ Use regexes for Hive's `--sim.limit` argument and don't use xdist if `--sim.parallelism==1` in the `eest/consume-rlp` and `eest/consume-rlp` simulators ([#1220](https://github.com/ethereum/execution-spec-tests/pull/1220)). - 🐞 Register generated test markers, e.g., `blockchain_test_from_state_test`, to prevent test session warnings ([#1238](https://github.com/ethereum/execution-spec-tests/pull/1238), [#1245](https://github.com/ethereum/execution-spec-tests/pull/1245)). +- 🐞 Zero-pad `Environment` fields passed to `t8n` tools as required by `evmone-t8n` ([#1268](https://github.com/ethereum/execution-spec-tests/pull/1268)). ### 📋 Misc diff --git a/src/ethereum_test_types/tests/test_types.py b/src/ethereum_test_types/tests/test_types.py index 444e67c269a..883b52ea929 100644 --- a/src/ethereum_test_types/tests/test_types.py +++ b/src/ethereum_test_types/tests/test_types.py @@ -442,9 +442,9 @@ def test_account_merge( Environment(), { "currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentGasLimit": "0x16345785d8a0000", - "currentNumber": "0x1", - "currentTimestamp": "0x3e8", + "currentGasLimit": "0x016345785d8a0000", + "currentNumber": "0x01", + "currentTimestamp": "0x03e8", "blockHashes": {}, "ommers": [], "parentUncleHash": ( @@ -475,17 +475,17 @@ def test_account_merge( ), { "currentCoinbase": "0x0000000000000000000000000000000000001234", - "currentGasLimit": "0x16345785d8a0000", - "currentNumber": "0x1", - "currentTimestamp": "0x3e8", - "currentDifficulty": "0x5", - "currentRandom": "0x6", - "currentBaseFee": "0x7", - "parentDifficulty": "0x8", - "parentTimestamp": "0x9", - "parentBaseFee": "0xa", - "parentGasUsed": "0xb", - "parentGasLimit": "0xc", + "currentGasLimit": "0x016345785d8a0000", + "currentNumber": "0x01", + "currentTimestamp": "0x03e8", + "currentDifficulty": "0x05", + "currentRandom": "0x06", + "currentBaseFee": "0x07", + "parentDifficulty": "0x08", + "parentTimestamp": "0x09", + "parentBaseFee": "0x0a", + "parentGasUsed": "0x0b", + "parentGasLimit": "0x0c", "parentUncleHash": ( "0x000000000000000000000000000000000000000000000000000000000000000d" ), @@ -497,8 +497,8 @@ def test_account_merge( "amount": "0x2", }, ], - "parentBlobGasUsed": "0xe", - "parentExcessBlobGas": "0xf", + "parentBlobGasUsed": "0x0e", + "parentExcessBlobGas": "0x0f", "currentBlobGasUsed": "0x10", "currentExcessBlobGas": "0x11", "blockHashes": { diff --git a/src/ethereum_test_types/types.py b/src/ethereum_test_types/types.py index deb59561bc9..2643306d714 100644 --- a/src/ethereum_test_types/types.py +++ b/src/ethereum_test_types/types.py @@ -42,6 +42,7 @@ StorageRootType, TestAddress, TestPrivateKey, + ZeroPaddedHexNumber, ) from ethereum_test_base_types import Alloc as BaseAlloc from ethereum_test_base_types.conversions import ( @@ -352,16 +353,16 @@ class EnvironmentGeneric(CamelModel, Generic[NumberBoundTypeVar]): parent_gas_limit: NumberBoundTypeVar | None = Field(None) -class Environment(EnvironmentGeneric[HexNumber]): +class Environment(EnvironmentGeneric[ZeroPaddedHexNumber]): """ Structure used to keep track of the context in which a block must be executed. """ - blob_gas_used: HexNumber | None = Field(None, alias="currentBlobGasUsed") + blob_gas_used: ZeroPaddedHexNumber | None = Field(None, alias="currentBlobGasUsed") parent_ommers_hash: Hash = Field(Hash(EmptyOmmersRoot), alias="parentUncleHash") - parent_blob_gas_used: HexNumber | None = Field(None) - parent_excess_blob_gas: HexNumber | None = Field(None) + parent_blob_gas_used: ZeroPaddedHexNumber | None = Field(None) + parent_excess_blob_gas: ZeroPaddedHexNumber | None = Field(None) parent_beacon_block_root: Hash | None = Field(None) block_hashes: Dict[Number, Hash] = Field(default_factory=dict)