Skip to content

Commit c194592

Browse files
committed
update doc
1 parent eb16a77 commit c194592

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

docs/docs/new-feature.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
- [4. Add `fork.md`](#4-add-forkmd)
1212
- [5. Make it executable](#5-make-it-executable)
1313
- [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)
1515
- [2. Add the mainnet and minimal presets and update the configs](#2-add-the-mainnet-and-minimal-presets-and-update-the-configs)
1616
- [3. Update `context.py`](#3-update-contextpy)
1717
- [4. Update `constants.py`](#4-update-constantspy)
1818
- [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)
2120
- [Others](#others)
2221
- [Bonus](#bonus)
2322
- [Need help?](#need-help)
@@ -92,32 +91,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
9291

9392
- If the given feature changes `ExecutionPayload` fields, you have to set the initial values by updating `get_sample_genesis_execution_payload_header` helper.
9493

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
12195
- Update [GitHub Actions config](https://github.com/ethereum/consensus-specs/blob/dev/.github/workflows/run-tests.yml)
12296
- Update `pyspec-tests.strategy.matrix.version` list by adding new feature to it
12397
- Update [CircleCI config](https://github.com/ethereum/consensus-specs/blob/dev/.circleci/config.yml)

0 commit comments

Comments
 (0)