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: README.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
@@ -81,7 +81,6 @@ Documentation on the different components used during spec writing can be found
81
81
82
82
Conformance tests built from the executable python spec are available in the [Ethereum Proof-of-Stake Consensus Spec Tests](https://github.com/ethereum/consensus-spec-tests) repo. Compressed tarballs are available in [releases](https://github.com/ethereum/consensus-spec-tests/releases).
83
83
84
-
85
84
## Installation and Usage
86
85
The consensus-specs repo can be used by running the tests locally or inside a docker container.
-`docker run -it $IMAGE_NAME /bin/sh` will give you a shell inside the docker container to manually run any tests
9
10
-`docker run $IMAGE_NAME make test` will run the make test command inside the docker container
10
11
@@ -13,6 +14,7 @@ Ideally manual running of docker containers is for advanced users, we recommend
13
14
The `scripts/build_run_docker_tests.sh` script will cover most use cases. The script allows the user to configure the fork(altair/bellatrix/capella..), `$IMAGE_NAME` (specifies the container to use), preset type (mainnet/minimal), and test all forks flags. Ideally, this is the main way that users interact with the spec tests instead of running it locally with varying versions of dependencies.
14
15
15
16
E.g:
17
+
16
18
-`./build_run_docker_tests.sh --p mainnet` will run the mainnet preset tests
17
19
-`./build_run_docker_tests.sh --a` will run all the tests across all the forks
18
20
-`./build_run_docker_tests.sh --f deneb` will only run deneb tests
Copy file name to clipboardExpand all lines: docs/docs/new-feature.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
# How to add a new feature proposal in consensus-specs
2
2
3
+
## Table of contents
4
+
3
5
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
6
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
-
## Table of Contents
6
7
7
8
-[A. Make it executable for linter checks](#a-make-it-executable-for-linter-checks)
8
9
-[1. Create a folder under `./specs/_features`](#1-create-a-folder-under-specs_features)
@@ -23,7 +24,6 @@
23
24
24
25
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
25
26
26
-
27
27
## A. Make it executable for linter checks
28
28
29
29
### 1. Create a folder under `./specs/_features`
@@ -35,6 +35,7 @@ For example, if it's an `EIP-9999` CL spec, you can create a `./specs/_features/
35
35
For example, if the latest fork is Capella, use `./specs/capella` content as your "previous fork".
36
36
37
37
### 3. Write down your proposed `beacon-chain.md` change
38
+
38
39
- You can either use [Beacon Chain Spec Template](./templates/beacon-chain-template.md), or make a copy of the latest fork content and then edit it.
39
40
- Tips:
40
41
- We use [`doctoc`](https://www.npmjs.com/package/doctoc) tool to generate the table of content.
@@ -50,8 +51,11 @@ For example, if the latest fork is Capella, use `./specs/capella` content as you
50
51
- Use simple Python rather than the fancy Python dark magic.
51
52
52
53
### 4. Add `fork.md`
54
+
53
55
You can refer to the previous fork's `fork.md` file.
56
+
54
57
### 5. Make it executable
58
+
55
59
- Update Pyspec [`constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/test/helpers/constants.py) with the new feature name.
56
60
- Update helpers for [`setup.py`](https://github.com/ethereum/consensus-specs/blob/dev/setup.py) for building the spec:
57
61
- Update [`pysetup/constants.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/constants.py) with the new feature name as Pyspec `constants.py` defined.
@@ -63,17 +67,21 @@ You can refer to the previous fork's `fork.md` file.
63
67
## B: Make it executable for pytest and test generator
64
68
65
69
### 1. [Optional] Add `light-client/*` docs if you updated the content of `BeaconBlock`
70
+
66
71
- You can refer to the previous fork's `light-client/*` file.
67
72
- Add the path of the new markdown files in [`pysetup/md_doc_paths.py`](https://github.com/ethereum/consensus-specs/blob/dev/pysetup/md_doc_paths.py)'s `get_md_doc_paths` function.
68
73
69
74
### 2. Add the mainnet and minimal presets and update the configs
75
+
70
76
- Add presets: `presets/mainnet/<new-feature-name>.yaml` and `presets/minimal/<new-feature-name>.yaml`
71
77
- Update configs: `configs/mainnet.yaml` and `configs/minimal.yaml`
- If the given feature changes `ExecutionPayload` fields, you have to set the initial values by updating `get_sample_genesis_execution_payload_header` helper.
0 commit comments