|
11 | 11 | - [4. Add `fork.md`](#4-add-forkmd) |
12 | 12 | - [5. Make it executable](#5-make-it-executable) |
13 | 13 | - [B: Make it executable for pytest and test generator](#b-make-it-executable-for-pytest-and-test-generator) |
14 | | - - [1. Add `light-client/*` docs if you updated the content of `BeaconBlock`](#1-add-light-client-docs-if-you-updated-the-content-of-beaconblock) |
| 14 | + - [1. [Optional] Add `light-client/*` docs if you updated the content of `BeaconBlock`](#1-optional-add-light-client-docs-if-you-updated-the-content-of-beaconblock) |
15 | 15 | - [2. Add the mainnet and minimal presets and update the configs](#2-add-the-mainnet-and-minimal-presets-and-update-the-configs) |
16 | 16 | - [3. Update `context.py`](#3-update-contextpy) |
17 | 17 | - [4. Update `constants.py`](#4-update-constantspy) |
18 | 18 | - [5. Update `genesis.py`:](#5-update-genesispy) |
19 | | - - [6. To add fork transition tests, update fork_transition.py](#6-to-add-fork-transition-tests-update-fork_transitionpy) |
20 | | - - [7. Update CI configurations](#7-update-ci-configurations) |
| 19 | + - [6. Update CI configurations](#6-update-ci-configurations) |
21 | 20 | - [Others](#others) |
22 | 21 | - [Bonus](#bonus) |
23 | 22 | - [Need help?](#need-help) |
@@ -92,32 +91,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold): |
92 | 91 |
|
93 | 92 | - If the given feature changes `ExecutionPayload` fields, you have to set the initial values by updating `get_sample_genesis_execution_payload_header` helper. |
94 | 93 |
|
95 | | -### 6. To add fork transition tests, update [fork_transition.py](https://github.com/ethereum/consensus-specs/blob/dev/tests/core/pyspec/eth2spec/test/helpers/fork_transition.py) |
96 | | - |
97 | | -```python |
98 | | -def do_fork(state, spec, post_spec, fork_epoch, with_block=True, sync_aggregate=None, operation_dict=None): |
99 | | - ... |
100 | | - |
101 | | - if post_spec.fork == ALTAIR: |
102 | | - state = post_spec.upgrade_to_altair(state) |
103 | | - ... |
104 | | - elif post_spec.fork == EIP9999: |
105 | | - state = post_spec.upgrade_to_eip9999(state) |
106 | | - |
107 | | - ... |
108 | | - |
109 | | - if post_spec.fork == ALTAIR: |
110 | | - assert state.fork.previous_version == post_spec.config.GENESIS_FORK_VERSION |
111 | | - assert state.fork.current_version == post_spec.config.ALTAIR_FORK_VERSION |
112 | | - ... |
113 | | - elif post_spec.fork == EIP9999: |
114 | | - assert state.fork.previous_version == post_spec.config.<PREVIOUS_FORK_VERSION> |
115 | | - assert state.fork.current_version == post_spec.config.EIP9999_FORK_VERSION |
116 | | - |
117 | | - ... |
118 | | -``` |
119 | | - |
120 | | -### 7. Update CI configurations |
| 94 | +### 6. Update CI configurations |
121 | 95 | - Update [GitHub Actions config](https://github.com/ethereum/consensus-specs/blob/dev/.github/workflows/run-tests.yml) |
122 | 96 | - Update `pyspec-tests.strategy.matrix.version` list by adding new feature to it |
123 | 97 | - Update [CircleCI config](https://github.com/ethereum/consensus-specs/blob/dev/.circleci/config.yml) |
|
0 commit comments