Skip to content

Commit f94de0e

Browse files
authored
Merge pull request #334 from danceratopz/docs/using-and-getting-releases
docs: add a section on using fixtures & est releases
2 parents c71025e + e9bd514 commit f94de0e

File tree

8 files changed

+81
-3
lines changed

8 files changed

+81
-3
lines changed

.markdownlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ MD013: false # line-length: We don't fill paragaraphs/limit line length
44
MD034: false # no-bare-urls - We use pymdownx.magiclink which allows bare urls
55
MD046: false # code-block-style - This doesn't play well with material's admonitions)
66
MD024: false # no-duplicate-heading - We use duplicate headings in the changelog.
7+
MD033: false # no-inline-html - Too strict.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ This guide installs stable versions of the required external (go-ethereum) `evm`
137137

138138
## Usage
139139

140-
See the [online documentation](https://ethereum.github.io/execution-spec-tests/) for further help with working with this codebase:
140+
More information on how to obtain and use the [released test fixtures](https://github.com/ethereum/execution-spec-tests/releases) can be found [here](https://ethereum.github.io/execution-spec-tests/docs-only/getting_started/using_fixtures/).
141+
142+
For further help with working with this codebase, see the [online documentation](https://ethereum.github.io/execution-spec-tests/):
141143

142144
1. Learn [useful command-line flags](https://ethereum.github.io/execution-spec-tests/getting_started/executing_tests_command_line/).
143145
2. [Execute tests for features under development](https://ethereum.github.io/execution-spec-tests/getting_started/executing_tests_dev_fork/) via the `--from=FORK1` and `--until=FORK2` flags.

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Test fixtures for use by clients are available for each release on the [Github r
2323
- ✨ Tooling: Add Python 3.12 support ([#309](https://github.com/ethereum/execution-spec-tests/pull/309)).
2424
- ✨ Process: Added a Github pull request template ([#308](https://github.com/ethereum/execution-spec-tests/pull/308)).
2525
- ✨ Docs: Changelog updated post release ([#321](https://github.com/ethereum/execution-spec-tests/pull/321)).
26+
- ✨ Docs: Add [a section explaining execution-spec-tests release artifacts](https://ethereum.github.io/execution-spec-tests/main/getting_started/using_fixtures/) ([#334](https://github.com/ethereum/execution-spec-tests/pull/334)).
2627

2728
## [v1.0.5](https://github.com/ethereum/execution-spec-tests/releases/tag/v1.0.5) - 2023-09-26: 🐍🏖️ Cancun Devnet 9 Release 3
2829

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Using Test Fixtures Generated by execution-spec-tests
2+
3+
@ethereum/execution-spec-tests generates JSON test fixtures that can be consumed by execution clients directly or via the [Hive `pyspec` simulator](https://github.com/ethereum/hive/tree/master/simulators/ethereum/pyspec#readme):
4+
5+
1. **Clients** can execute the tests directly against their EVM by implementing a command analogous to the go-ethereum's `evm blocktest` command, see [cmd/evm/blockrunner.go](https://github.com/ethereum/go-ethereum/blob/509a64ffb9405942396276ae111d06f9bded9221/cmd/evm/blockrunner.go#L39).
6+
2. **Hive** executes the tests against a fully instantiated client instance using the Engine API.
7+
8+
Here's a top-level comparison of these two approaches:
9+
10+
| Consumed via | Scope | Pros | Cons |
11+
| --- | --- | --- | --- |
12+
| `blocktest`-like command | Module test | - Fast feedback loop<br/>- Less complex | - Smaller coverage scope |
13+
| `hive --sim ethereum/pyspec` | System test / Integration test | - Wider Coverage Scope<br/>- Tests more of the client stack | - Slower feedback loop<br/>- Harder to debug |
14+
15+
!!! note "Executing a `t8n` tool via `fill` is not considered to be the actual test"
16+
17+
The `fill` command uses `t8n` tools to generate fixtures. Whilst this will provide basic sanity checking of EVM behavior and a sub-set of post conditions are typically checked within test cases, it is not considered the actual test. The actual test is the execution of the fixture against the EVM which will check the entire post allocation and typically use different code paths than `t8n` commands.
18+
19+
!!! note "Running `blocktest` directly within the execution-spec-tests framework"
20+
21+
It's possible to execute `evm blocktest` directly within the execution-spec-tests framework. This is intended to verify fixture generation, see [Debugging `t8n` Tools](./debugging_t8n_tools.md).
22+
23+
## Release Formats
24+
25+
The @ethereum/execution-spec-tests repository provides [releases](https://github.com/ethereum/execution-spec-tests/releases) of fixtures in various formats (as of 2023-10-16):
26+
27+
| Release Artifact | Consumer | Fork/feature scope |
28+
| ------------------------------ | -------- | ------------------ |
29+
| `fixtures.tar.gz` | Clients | All tests until the last stable fork | "Must pass" |
30+
| `fixtures_develop.tar.gz` | Clients | All tests until the last development fork |
31+
| `fixtures_hive.tar.gaz` | Hive | All tests until the last stable fork in hive format |
32+
| `fixtures_develop_hive.tar.gz` | Hive | All tests until the last development fork in hive format |
33+
34+
The Hive format uses Engine API directives instead of the usual BlockchainTest format.
35+
36+
## Obtaining the Most Recent Release Artifacts
37+
38+
Artifacts can be downloaded directly from [the release page](https://github.com/ethereum/execution-spec-tests/releases). The following script demonstrates how the most recent release version of a specific artifact can be downloaded using the Github API:
39+
40+
```bash
41+
#!/bin/bash
42+
43+
# requires jq
44+
# sudo apt install jq
45+
46+
# The following two artifacts are intended for consumption by clients:
47+
# - fixtures.tar.gz: Generated up to the last deployed fork.
48+
# - fixtures_develop.tar.gz: Generated up to and including the latest dev fork.
49+
# As of Oct 2023, dev is Cancun, deployed is Shanghai.
50+
51+
ARTIFACT="fixtures_develop.tar.gz"
52+
53+
OWNER="ethereum"
54+
REPO="execution-spec-tests"
55+
56+
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/$OWNER/$REPO/releases/latest \
57+
| jq -r '.assets[] | select(.name=="'$ARTIFACT'").browser_download_url')
58+
59+
# Sanity check for the download URL: contains a version tag prefixed with "v"
60+
if [[ "$DOWNLOAD_URL" =~ v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
61+
curl -LO $DOWNLOAD_URL
62+
else
63+
echo "Error: URL does not contain a valid version tag (URL: ${DOWNLOAD_URL})."
64+
exit 1
65+
fi
66+
```

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ The generated test fixtures can be used:
5656
1. Directly by client teams' test frameworks, and,
5757
2. In the integration tests executed in the @ethereum/hive framework.
5858

59+
More information on how to use and download the [released test fixtures](https://github.com/ethereum/execution-spec-tests/releases) can be found [here](getting_started/using_fixtures.md).
60+
5961
## Transition Tool Support
6062

6163
The following transition tools are supported by the framework:

docs/navigation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [Executing Tests in VS Code](getting_started/executing_tests_vs_code.md)
99
* [Executing Tests for Features Under Development](getting_started/executing_tests_dev_fork.md)
1010
* [Debugging Transition Tools](getting_started/debugging_t8n_tools.md)
11+
* [Using Test Fixtures Generated by execution-spec-tests](getting_started/using_fixtures.md)
1112
* [Writing Tests](writing_tests/index.md)
1213
* [Code Standards](writing_tests/code_standards.md)
1314
* [Types of Test](writing_tests/types_of_tests.md)

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ markdown_extensions:
8181
- pymdownx.caret
8282
- pymdownx.details
8383
- pymdownx.emoji:
84-
emoji_index: !!python/name:materialx.emoji.twemoji
85-
emoji_generator: !!python/name:materialx.emoji.to_svg
84+
emoji_index: !!python/name:material.extensions.emoji.twemoji
85+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
8686
- pymdownx.highlight
8787
- pymdownx.inlinehilite
8888
- pymdownx.keys

whitelist.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ at5
99
balance
1010
base64
1111
basefee
12+
basename
1213
bb
1314
besu
1415
big0
@@ -496,3 +497,7 @@ precompile
496497
precompiles
497498
deployer
498499
0x
500+
501+
fi
502+
url
503+
gz

0 commit comments

Comments
 (0)