You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ Users can select any of the artifacts depending on their testing needs for their
29
29
30
30
#### `fill`
31
31
32
-
- ✨ Add the `ported_from` test marker to track Python test cases that were converted from static fillers in [ethereum/tests](https://github.com/ethereum/tests) repository [#1590](https://github.com/ethereum/execution-spec-tests/pull/1590).
33
-
- ✨ Add a new pytest plugin, `ported_tests`, that lists the static fillers and PRs from `ported_from` markers for use in the coverage Github Workflow [#1634](https://github.com/ethereum/execution-spec-tests/pull/1634).
34
-
- ✨ Enable two-phase filling of fixtures with shared pre-allocation groups and add a `BlockchainEngineReorgFixture` format [#1606](https://github.com/ethereum/execution-spec-tests/pull/1706).
32
+
- ✨ Add the `ported_from` test marker to track Python test cases that were converted from static fillers in [ethereum/tests](https://github.com/ethereum/tests) repository ([#1590](https://github.com/ethereum/execution-spec-tests/pull/1590)).
33
+
- ✨ Add a new pytest plugin, `ported_tests`, that lists the static fillers and PRs from `ported_from` markers for use in the coverage Github Workflow ([#1634](https://github.com/ethereum/execution-spec-tests/pull/1634)).
34
+
- ✨ Enable two-phase filling of fixtures with pre-allocation groups and add a `BlockchainEngineXFixture` format ([#1706](https://github.com/ethereum/execution-spec-tests/pull/1706), [#1760](https://github.com/ethereum/execution-spec-tests/pull/1760)).
35
35
- 🔀 Refactor: Encapsulate `fill`'s fixture output options (`--output`, `--flat-output`, `--single-fixture-per-file`) into a `FixtureOutput` class ([#1471](https://github.com/ethereum/execution-spec-tests/pull/1471),[#1612](https://github.com/ethereum/execution-spec-tests/pull/1612)).
36
36
- ✨ Don't warn about a "high Transaction gas_limit" for `zkevm` tests ([#1598](https://github.com/ethereum/execution-spec-tests/pull/1598)).
37
37
- 🐞 `fill` no longer writes generated fixtures into an existing, non-empty output directory; it must now be empty or `--clean` must be used to delete it first ([#1608](https://github.com/ethereum/execution-spec-tests/pull/1608)).
# Blockchain Engine Reorg Tests <!-- markdownlint-disable MD051 (MD051=link-fragments "Link fragments should be valid") -->
1
+
# Blockchain Engine X Tests <!-- markdownlint-disable MD051 (MD051=link-fragments "Link fragments should be valid") -->
2
2
3
-
The Blockchain Engine Reorg Test fixture format tests are included in the fixtures subdirectory `blockchain_tests_engine_reorg`, and use Engine API directives with optimized shared pre-allocation for improved execution performance.
3
+
The Blockchain Engine X Test fixture format tests are included in the fixtures subdirectory `blockchain_tests_engine_x`, and use Engine API directives with optimized pre-allocation groups for improved execution performance.
4
4
5
-
These are produced by the `StateTest` and `BlockchainTest` test specs when using the `--generate-shared-pre` and `--use-shared-pre` flags.
5
+
These are produced by the `StateTest` and `BlockchainTest` test specs when using the `--generate-pre-alloc-groups` and `--use-pre-alloc-groups` flags.
6
6
7
7
## Description
8
8
9
-
The Blockchain Engine Reorg Test fixture format is an optimized variant of the [Blockchain Engine Test](./blockchain_test_engine.md) format designed for large-scale test execution with performance optimizations.
9
+
The Blockchain Engine X Test fixture format is an optimized variant of the [Blockchain Engine Test](./blockchain_test_engine.md) format designed for large-scale test execution with performance optimizations.
10
10
11
-
It uses the Engine API to test block validation and consensus rules while leveraging **shared pre-allocation state** to significantly reduce test execution time and resource usage. Tests are grouped by their initial state (fork + environment + pre-allocation) and share common genesis states through blockchain reorganization.
11
+
It uses the Engine API to test block validation and consensus rules while leveraging **pre-allocation groups** to significantly reduce test execution time and resource usage. Tests are grouped by their initial state (fork + environment + pre-allocation). Each group is executed against the same client instance using a common genesis state.
12
12
13
13
The key optimization is that **clients need only be started once per group** instead of once per test (as in the original engine fixture format), dramatically improving execution performance for large test suites.
14
14
15
-
Instead of including large pre-allocation state in each test fixture, this format references a shared pre-allocation folder (`pre_alloc`) which includes all different pre-allocation combinations used for any test fixture group.
15
+
Instead of including large pre-allocation state in each test fixture, this format references a pre-allocation groups folder (`pre_alloc`) which contains all different pre-allocation combinations organized by group.
16
16
17
-
A single JSON fixture file is composed of a JSON object where each key-value pair is a different [`ReorgFixture`](#reorgfixture) test object, with the key string representing the test name.
17
+
A single JSON fixture file is composed of a JSON object where each key-value pair is a different [`BlockchainTestEngineXFixture`](#BlockchainTestEngineXFixture) test object, with the key string representing the test name.
18
18
19
19
The JSON file path plus the test name are used as the unique test identifier.
20
20
21
-
## Shared Pre-Allocation File
21
+
## Pre-Allocation Groups Folder
22
22
23
-
The `blockchain_tests_engine_reorg` directory contains a special directory `pre_alloc` that stores shared pre-allocation state file used by all tests in this format, one per pre-allocation group with the name of the pre-alloc hash. This folder is essential for test execution and must be present alongside the test fixtures.
23
+
The `blockchain_tests_engine_x` directory contains a special directory `pre_alloc` that stores pre-allocation group files used by all tests in this format, one per pre-allocation group with the name of the pre-alloc hash. This folder is essential for test execution and must be present alongside the test fixtures.
24
24
25
-
### Pre-Allocation File Structure
25
+
### Pre-Allocation Group File Structure
26
26
27
-
Each file in the `pre_alloc` folder corresponds to a pre-allocation hash to shared state groups:
27
+
Each file in the `pre_alloc` folder corresponds to a pre-allocation group identified by a hash:
28
28
29
29
```json
30
30
{
@@ -37,28 +37,28 @@ Each file in the `pre_alloc` folder corresponds to a pre-allocation hash to shar
37
37
}
38
38
```
39
39
40
-
#### SharedPreStateGroup Fields
40
+
#### Pre-Allocation Group Fields
41
41
42
-
-**`test_count`**: Number of tests sharing this pre-allocation group
43
-
-**`pre_account_count`**: Number of accounts in the shared pre-allocation state
44
-
-**`testIds`**: Array of test identifiers that use this shared state
42
+
-**`test_count`**: Number of tests in this pre-allocation group
43
+
-**`pre_account_count`**: Number of accounts in the pre-allocation group
44
+
-**`testIds`**: Array of test identifiers that belong to this group
45
45
-**`network`**: Fork name (e.g., "Prague", "Cancun")
46
46
-**`environment`**: Complete [`Environment`](./common_types.md#environment) object with execution context
47
-
-**`pre`**: Shared[`Alloc`](./common_types.md#alloc-mappingaddressaccount) object containing initial account states
47
+
-**`pre`**: Pre-allocation group[`Alloc`](./common_types.md#alloc-mappingaddressaccount) object containing initial account states
48
48
49
49
## Consumption
50
50
51
-
For each [`ReorgFixture`](#reorgfixture) test object in the JSON fixture file, perform the following steps:
51
+
For each [`BlockchainTestEngineXFixture`](#BlockchainTestEngineXFixture) test object in the JSON fixture file, perform the following steps:
52
52
53
-
1.**Load Shared Pre-Allocation**:
53
+
1.**Load Pre-Allocation Group**:
54
54
- Read the appropriate file from the `pre_alloc` folder in the same directory
55
-
- Locate the shared state group using [`preHash`](#-prehash-string)
56
-
- Extract the `pre` allocation and `environment` from the shared group
55
+
- Locate the pre-allocation group using [`preHash`](#-prehash-string)
56
+
- Extract the `pre` allocation and `environment` from the group
57
57
58
58
2.**Initialize Client**:
59
59
- Use [`network`](#-network-fork) to configure the execution fork schedule
60
-
- Use the shared`pre` allocation as the starting state
61
-
- Use the shared`environment` as the execution context
60
+
- Use the pre-allocation group's`pre` allocation as the starting state
61
+
- Use the pre-allocation group's`environment` as the execution context
62
62
- Use [`genesisBlockHeader`](#-genesisblockheader-fixtureheader) as the genesis block header
63
63
64
64
3.**Execute Engine API Sequence**:
@@ -70,13 +70,13 @@ For each [`ReorgFixture`](#reorgfixture) test object in the JSON fixture file, p
70
70
4.**Verify Final State**:
71
71
- Compare the final chain head against [`lastblockhash`](#-lastblockhash-hash)
72
72
- If [`postStateDiff`](#-poststatediff-optionalalloc) is present:
73
-
- Apply the state differences to the shared pre-allocation
73
+
- Apply the state differences to the pre-allocation group
74
74
- Verify the resulting state matches the client's final state
75
75
- If `post` field were present (not typical), verify it directly
@@ -88,39 +88,39 @@ This field is going to be replaced by the value contained in `config.network`.
88
88
89
89
#### - `preHash`: `string`
90
90
91
-
Hash identifier referencing a shared pre-allocation group in the `pre_alloc` folder. This hash uniquely identifies the combination of fork, environment, and pre-allocation state shared by multiple tests.
91
+
Hash identifier referencing a pre-allocation group in the `pre_alloc` folder. This hash uniquely identifies the combination of fork, environment, and pre-allocation state that defines the group.
Genesis block header. The state root in this header must match the state root calculated from the shared pre-allocation referenced by [`preHash`](#-prehash-string).
95
+
Genesis block header. The state root in this header must match the state root calculated from the pre-allocation group referenced by [`preHash`](#-prehash-string).
List of `engine_newPayloadVX` directives to be processed after the genesis block. These define the sequence of blocks to be executed via the Engine API.
Optional synchronization payload used for blockchain reorganization scenarios. When present, this payload is typically used to sync the chain to a specific state before or after the main payload sequence.
103
+
Optional synchronization payload. When present, this payload is typically used to sync the chain to a specific state before or after the main payload sequence.
State differences from the shared pre-allocation state after test execution. This optimization stores only the accounts that changed, were created, or were deleted during test execution, rather than the complete final state.
111
+
State differences from the pre-allocation group after test execution. This optimization stores only the accounts that changed, were created, or were deleted during test execution, rather than the complete final state.
112
112
113
113
To reconstruct the final state:
114
114
115
-
1. Start with the shared pre-allocation from the `pre_alloc` folder
115
+
1. Start with the pre-allocation group from the `pre_alloc` folder
116
116
2. Apply the changes in `postStateDiff`:
117
117
-**Modified accounts**: Replace existing accounts with new values
118
118
-**New accounts**: Add accounts not present in pre-allocation
119
119
-**Deleted accounts**: Remove accounts (represented as `null` values)
0 commit comments