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: CONTRIBUTING.md
+42-43Lines changed: 42 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ In particular, we appreciate support in the following areas:
13
13
14
14
For details about EELS usage and building, please refer the [README](https://github.com/ethereum/execution-specs/blob/master/README.md#usage)
15
15
16
-
17
16
## Contribution Guidelines
18
17
19
18
This specification aims to be:
@@ -26,7 +25,7 @@ This specification aims to be:
26
25
27
26
- Attempt to use descriptive English words (or _very common_ abbreviations) in documentation and identifiers.
28
27
- Avoid using EIP numbers in identifiers.
29
-
- If necessary, there is a custom dictionary `whitelist.txt`.
28
+
- If necessary, there is a custom dictionary `whitelist.txt`.
30
29
31
30
### Changes across various Forks
32
31
@@ -43,39 +42,39 @@ This saves you having to apply code review feedback repeatedly for each fork.
43
42
44
43
Running the tests necessary to merge into the repository requires:
45
44
46
-
* Python 3.11.x, and
47
-
*[PyPy](https://www.pypy.org/)[7.3.19](https://downloads.python.org/pypy/) or later.
48
-
*`geth` installed and present in `$PATH`
49
-
45
+
- Python 3.11.x, and
46
+
-[PyPy](https://www.pypy.org/)[7.3.19](https://downloads.python.org/pypy/) or later.
47
+
-`geth` installed and present in `$PATH`
50
48
51
49
`execution-specs` depends on a submodule that contains common tests that are run across all clients, so we need to clone the repo with the --recursive flag. Example:
Or, if you've already cloned the repository, you can fetch the submodules with:
57
56
58
57
```bash
59
-
$ git submodule update --init --recursive
58
+
git submodule update --init --recursive
60
59
```
61
60
62
61
The tests can be run with:
62
+
63
63
```bash
64
-
$ tox
64
+
tox
65
65
```
66
66
67
67
The development tools can also be run outside of `tox`, and can automatically reformat the code:
68
68
69
69
```bash
70
-
$ uv run --extra lint ruff check # Detects code issues and produces a report to STDOUT
71
-
$ uv run --extra lint ruff check --fix # Fixes minor code issues (like unsorted imports).
72
-
$ uv run --extra lint ruff format # Formats code.
73
-
$ uv run --extra lint mypy src packages tests # Verifies type annotations.
70
+
uv run --extra lint ruff check # Detects code issues and produces a report to STDOUT
71
+
uv run --extra lint ruff check --fix # Fixes minor code issues (like unsorted imports).
72
+
uv run --extra lint ruff format # Formats code.
73
+
uv run --extra lint mypy src packages tests # Verifies type annotations.
74
74
```
75
75
76
76
It is recommended to use a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) to keep your system Python installation clean.
77
77
78
-
79
78
A trace of the EVM execution for any test case can be obtained by providing the `--evm-trace` argument to pytest.
80
79
Note: Make sure to run the EVM trace on a small number of tests at a time. The log might otherwise get very big.
81
80
Below is an example.
@@ -86,20 +85,20 @@ uv run --extra test \
86
85
--evm_trace
87
86
```
88
87
89
-
90
88
## CLI Utilities `ethereum_spec_tools`
91
89
92
90
The EELS repository has various CLI utilities that can help in the development process.
93
91
94
92
### New Fork Tool
95
-
-----------------
93
+
96
94
This tool can be used to create the base code for a new fork by using the existing code from a given fork.
97
95
98
96
The command takes 4 arguments, 2 of which are optional
99
-
* from_fork: The fork name from which the code is to be duplicated. Eg. - "Tangerine Whistle"
100
-
* to_fork: The fork name of the new fork Eg - "Spurious Dragon"
101
-
* from_test (Optional): Name of the from fork within the test fixtures in case it is different from fork name. Eg. - "EIP150"
102
-
* to_test (Optional): Name of the to fork within the test fixtures in case it is different from fork name Eg - "EIP158"
97
+
98
+
- from_fork: The fork name from which the code is to be duplicated. Eg. - "Tangerine Whistle"
99
+
- to_fork: The fork name of the new fork Eg - "Spurious Dragon"
100
+
- from_test (Optional): Name of the from fork within the test fixtures in case it is different from fork name. Eg. - "EIP150"
101
+
- to_test (Optional): Name of the to fork within the test fixtures in case it is different from fork name Eg - "EIP158"
103
102
104
103
As an example, if one wants to create baseline code for the `Spurious Dragon` fork from the `Tangerine Whistle` one
Copy file name to clipboardExpand all lines: EIP_AUTHORS_MANUAL.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# Introduction
1
+
# EIP AUTHOR MANUAL
2
+
3
+
## Introduction
2
4
3
5
This document outlines the process of specifying and testing EIPs for the Ethereum execution layer. It is intended for EIP authors, researchers and implementers. An EIP will typically go through the following stages:
4
6
5
7
| Stage | Activities | Outputs |
6
8
| ------------------ | ----------- | ------- |
7
9
|_Pre‑Draft_| Prospective EIP author conceives of an idea for an improvement to Ethereum, and discusses with the community. | <ul><li>Vague Consensus on [Ethereum Magicians][0]</li></ul> |
8
10
|**Draft**| <p>EIP author writes a technical human-language document describing the improvement, initially in broad strokes and becoming more specific over time.</p><p>Concurrently, they develop a Python reference implementation to make the EIP executable and identify any immediate/obvious implementation issues. For example, the EIP may not be compatible with some detail of the current Ethereum Virtual Machine.</p><p>Finally for this stage, the author begins to write test schemes for the EIP. Having the reference implementation should help identify the various logical flows to test and thus feed into more robust testing. Once the test schemes are written, the reference implementation can then be used to fill the tests and generate the test vectors.</p> | <ul><li>Complete (but not final) document in [EIPs Repository][1]</li><li>Reference Implementation in [EELS][2]</li><li>Initial Tests in [EEST][3]</li></ul> |
9
-
| **Review** | <p>The broader Ethereum community discusses and provides input on the proposal.</p><p>Although the feedback from the community can be sought at all lifecycle stages, having a reference implementation and tests act as a good bridge between research and client implementation. It also helps core developers (who have limited time and resources) to understand the EIP better and provide more informed feedback.</p> | <ul><li>Complete & final document in the [EIPs Repository][1]</li><li>Comprehensive tests in [EEST][3]</li></ul>
11
+
|**Review**| <p>The broader Ethereum community discusses and provides input on the proposal.</p><p>Although the feedback from the community can be sought at all lifecycle stages, having a reference implementation and tests act as a good bridge between research and client implementation. It also helps core developers (who have limited time and resources) to understand the EIP better and provide more informed feedback.</p> | <ul><li>Complete & final document in the [EIPs Repository][1]</li><li>Comprehensive tests in [EEST][3]</li></ul>|
10
12
|**Last Call**| Usually after being nominated for inclusion in a fork, the EIP author signals that the proposal is effectively done and begins the last period for comments/discussion. | <ul><li>Complete reference implementation in [EELS][2]</li><li>Complete tests in [EEST][3]</li><li>Immutable proposal in [EIPs Repository][1]</li></ul> |
11
13
|**Final**| The proposal is now immutable (cannot be changed) and exists for reference. | <ul><li>Mainnet client implementations</li></ul> |
12
14
@@ -17,37 +19,36 @@ This document outlines the process of specifying and testing EIPs for the Ethere
17
19
18
20
This document will focus on stages 3 and 4 of the above lifecycle.
19
21
20
-
21
-
# Executable Specifications
22
+
## Executable Specifications
22
23
23
24
This repository contains the executable specifications for the Ethereum execution layer.
24
25
25
-
## Folder Structure
26
+
###Folder Structure
26
27
27
-
### Forks live on mainnet
28
+
####Forks live on mainnet
28
29
29
30
The folder `src/ethereum` contains the specifications for the different execution layer forks. Each fork has its own folder. For example, the folder `src/ethereum/frontier` contains the specifications for the Frontier hardfork. The `state_transition` function which is available in the `src/ethereum/<FORK NAME>/fork.py` is the transition function for each fork.
30
31
31
-
### Fork under development
32
+
####Fork under development
32
33
33
-
At any given time, there is a single fork under development. Any new EIP has to be implemented in the folder that is meant for that fork (`src/ethereum/<FORK_NAME>` folder).
34
+
At any given time, there is a single fork under development. Any new EIP has to be implemented in the folder that is meant for that fork (`src/ethereum/<FORK_NAME>` folder).
34
35
35
36
For example, at the time of writing, the Prague Fork is still under development and the previous fork is Cancun, which is live on Mainnet. So the prague folder under `src/ethereum` is essentially just the Cancun fork with the values of variables updated to reflect Prague and its under-development status. This folder (`src/ethereum/prague`) serves as the baseline for further development and all new EIPs are to be implemented in this folder.
36
37
37
-
## Branch Structure
38
+
###Branch Structure
38
39
39
-
### Forks live on mainnet
40
+
####Forks live on mainnet
40
41
41
42
The final stable specification for all forks that are currently live on mainnet are in the `master` branch.
42
43
43
-
### Fork under development
44
+
####Fork under development
44
45
45
46
At any given time, there can only be one fork under active development. The branch structure for the fork under development is as follows:
46
47
47
-
-`forks/<FORK_NAME>`: The main branch for the fork under development. For example, `forks/prague` is the branch for the Prague fork. This branch will be merged into `master` after the fork has gone live on mainnet.
48
+
-`forks/<FORK_NAME>`: The main branch for the fork under development. For example, `forks/prague` is the branch for the Prague fork. This branch will be merged into `master` after the fork has gone live on mainnet.
48
49
-`eips/<FORK_NAME>/<EIP_NUMBER>`: Branches for each EIP within the fork under development. For example, `eips/prague/eip-7702` is the branch for EIP-7702 for the Prague fork. This branch will be merged into `forks/prague` after the EIP has been confirmed for release in the fork.
49
50
50
-
# Writing New EIPS
51
+
##Writing New EIPS
51
52
52
53
Implementing a new EIP in the `execution-specs` repository involves the following steps:
53
54
@@ -61,7 +62,7 @@ An EIP can only be CFI'd (Considered For Inclusion) if it has a reference `execu
61
62
Please refer the following tutorial for writing new EIP. It takes you through a sample EIP for adding a new opcode to the specs.
In addition to having a reference implementation, it is also very useful for the community and core development if the EIP author concieves and writes test vectors for the EIP. There is a very user friendly framework for writing ethereum tests in the `execution-spec-tests` repository. Please refer to the following guide for writing tests to your EIP.
Copy file name to clipboardExpand all lines: LICENSE.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,4 +32,3 @@ For these and/or other purposes and motivations, and without any expectation of
32
32
2. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
33
33
3. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
34
34
4. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
0 commit comments