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
-[`check_eip_versions`](../../writing_tests/reference_specification.md) - A CLI tool to check the SHA values specified in EIP tests match the latest version from ethereum/EIPs.
3
4
-[`eest`](eest.md) - A CLI tool that helps with routine tasks in ethereum/execution-spec-tests.
4
5
-[`evm_bytes`](evm_bytes.md) - Convert the given EVM bytes from a binary file or a hex string to EEST's python opcodes.
Copy file name to clipboardExpand all lines: docs/writing_tests/reference_specification.md
+40-9Lines changed: 40 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,21 @@
1
1
# Referencing an EIP Spec Version
2
2
3
-
An Ethereum Improvement Proposal ([ethereum/EIPs](https://github.com/ethereum/EIPs/tree/master/EIPS)) and its SHA digest can be directly referenced within a python test module in order to check whether the test implementation could be out-dated. The test framework automatically generates tests for every module that defines a spec version. If the spec is out-of-date because the SHA of the specified file in the remote repo changes, the corresponding `test_eip_spec_version()` test fails.
3
+
Tests that implement features from an Ethereum Improvement Proposal ([ethereum/EIPs](https://github.com/ethereum/EIPs/tree/master/EIPS)) must define the EIP's markdown SHA digest within the test's Python module. This ensures our tests stay up-to-date with any changes to the EIP specifications.
4
+
5
+
The `check_eip_versions` command-line utility automatically verifies that all EIP references in the codebase are current. It works by comparing the SHA specified in the test against the latest version in the ethereum/EIPs repository. This utility uses pytest to generate test cases for every module that includes "eip" in its path.
|`REFERENCE_SPEC_GIT_PATH`| The relative path of the EIP markdown file in the [ethereum/EIPs](https://github.com/ethereum/EIPs/) repository, e.g. "`EIPS/eip-1234.md`" |
37
-
|`REFERENCE_SPEC_VERSION`| The SHA hash of the latest version of the file retrieved from the Github API:<br>`https://api.github.com/repos/ethereum/EIPs/contents/EIPS/eip-<EIP Number>.md`|
|`REFERENCE_SPEC_GIT_PATH`| The relative path of the EIP markdown file in the [ethereum/EIPs](https://github.com/ethereum/EIPs/) repository, e.g. "`EIPS/eip-1234.md`" |
44
+
|`REFERENCE_SPEC_VERSION`| The SHA hash of the latest version of the file retrieved from the Github API:<br>`https://api.github.com/repos/ethereum/EIPs/contents/EIPS/eip-<EIP Number>.md`|
45
+
46
+
## Running the `check_eip_versions` Command Locally
47
+
48
+
A Github Personal Access Token (PAT) is required to avoid rate-limiting issues when using the Github API. A PAT can be created at: https://github.com/settings/personal-access-tokens/new.
49
+
50
+
After setting the `GITHUB_TOKEN` environment variable to the value of your PAT, EIP versions can be checked locally using:
51
+
52
+
```shell
53
+
uv run check_eip_versions
54
+
```
55
+
56
+
By default, only tests up to and including the current fork under development will be checked. This is controlled by the `UNTIL_FORK` setting in the `src/config/check_eip_versions.py` configuration file. You can also pass a specific test path to limit the scope:
57
+
58
+
```shell
59
+
uv run check_eip_versions tests/shanghai/eip3651_warm_coinbase/
60
+
```
61
+
62
+
This would only check EIP versions for the EIP-3651 tests in the `shanghai/eip3651_warm_coinbase` sub-directory.
63
+
64
+
## Automated Checks via GitHub Actions
65
+
66
+
The repository includes a [GitHub Actions workflow](https://github.com/ethereum/execution-spec-tests/actions/workflows/check_eip_versions.yaml) that automatically runs `check_eip_versions` on a daily schedule. If any outdated EIP references are detected, the workflow creates an issue in the repository with details about which references need to be updated.
67
+
68
+
This workflow uses GitHub's built-in token for authentication, so there's no need to configure personal access tokens for the automated checks. The issue will include links to the relevant workflow run and details about which tests need updating.
0 commit comments