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
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Users can select any of the artifacts depending on their testing needs for their
31
31
32
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
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 `BlockchainEngineXFixture` format [#1606](https://github.com/ethereum/execution-spec-tests/pull/1706).
34
+
- ✨ Enable two-phase filling of fixtures with pre-allocation groups and add a `BlockchainEngineXFixture` format [#1606](https://github.com/ethereum/execution-spec-tests/pull/1706).
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)).
Copy file name to clipboardExpand all lines: docs/running_tests/test_formats/blockchain_test_engine_x.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,30 @@
1
1
# Blockchain Engine X Tests <!-- markdownlint-disable MD051 (MD051=link-fragments "Link fragments should be valid") -->
2
2
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 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-grouped-pre-allocs` and `--use-grouped-pre-allocs` flags.
6
6
7
7
## Description
8
8
9
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). Each groups are executed against the same client instance using a common genesis state.
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
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_x` 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,14 +37,14 @@ 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
@@ -70,7 +70,7 @@ For each [`BlockchainTestEngineXFixture`](#BlockchainTestEngineXFixture) test ob
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
76
76
@@ -88,11 +88,11 @@ 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).
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
@@ -138,7 +138,7 @@ Engine API payload structure identical to the one defined in [Blockchain Engine
138
138
139
139
## Usage Notes
140
140
141
-
- This format is only generated when using `--generate-shared-pre` and `--use-shared-pre` flags
141
+
- This format is only generated when using `--generate-grouped-pre-allocs` and `--use-grouped-pre-allocs` flags
142
142
- The `pre_alloc` folder is essential and must be distributed with the test fixtures
143
143
- Tests are grouped by identical (fork + environment + pre-allocation) combinations
144
144
- The format is optimized for Engine API testing (post-Paris forks)
0 commit comments