EIP-7577 · Stagnant · Meta · 2023-12-13
EIP-7577: Versioning Scheme for EIPs
A proposal to give each EIP a semantic version and a changelog, so client teams and test suites can tell at a glance whether a spec change breaks their implementation.
What problem does it solve?
Core EIPs often keep changing after client teams start implementing them: constants move, addresses change, behaviour is tweaked after audits. Those changes are hard to follow. Reference tests are maintained separately from the EIPs, so it is difficult to know whether a given test release matches the current spec, or which revision a client actually implements.
At the time of writing, the execution-spec-tests repository tracked this by pinning the git digest of each EIP file and warning when it changed. That catches any edit, even a typo fix, and says nothing about how serious the change is.
EIP-7577 proposes a version number and changelog inside each Standards Track EIP so that the scope of a change is obvious and machine-readable.
How it works
- Every EIP gets a
versionfield in its front matter using Semantic VersioningMAJOR.MINOR.PATCH:- MAJOR: breaking spec change; implementations and reference tests must change.
- MINOR: an addition to the spec that needs extra implementation and test coverage.
- PATCH: cosmetic or wording change, no spec change.
- While in Draft, the MAJOR version is
0. Moving to Review sets it to1.0.0; from then on versioning is mandatory. - Every PR to an EIP adds a CHANGELOG entry with the new version, date, PR number and a line per spec change.
- Tooling in the EIPs repository would bump the version and write the changelog automatically. Authors signal the scope by starting a commit message with
Major:,Minor:orPatch:; if none is found, the PR cannot merge.
With this, a client could report which version of an EIP it implements, tests could declare which version they cover, and a test runner could mark tests as expected failures when MAJOR or MINOR versions do not match. The spec illustrates the idea by retroactively versioning the history of EIP-4788.
Sample code
What an EIP header and changelog would look like under this scheme (illustrative):
---
eip: 9999
title: Example Opcode
status: Review
version: 2.1.0
---
## Changelog
- 2.1.0 - 2024-03-02: Add gas cost for the cold access case, #8123.
- Charge 2600 gas on first access.
- 2.0.0 - 2024-02-20: Change opcode number to avoid a clash, #8050.
- 1.0.1 - 2024-02-10: Fix typo, #8001.
- 1.0.0 - 2024-02-01: Move to Review, #7990.
A test runner comparing versions:
def compatible(eip_version: str, tested_version: str) -> bool:
em, en, _ = map(int, eip_version.split("."))
tm, tn, _ = map(int, tested_version.split("."))
return (em, en) == (tm, tn) # PATCH differences are ignored
Things to know
- Status is Stagnant: it has not been adopted, and EIPs today do not carry a
versionfield or mandatory changelog. - It would apply only to Standards Track EIPs, and only going forward: no retroactive changelogs are required.
- The process for EIPs in general is defined in EIP-1; this proposal would add to it rather than replace it.