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
-1
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-2
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.
Copy file name to clipboardExpand all lines: specs/_features/custody_game/validator.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
# Custody Game -- Honest Validator
2
2
3
3
**Notice**: This document is a work-in-progress for researchers and implementers.
4
-
This is an accompanying document to [Custody Game -- The Beacon Chain](./beacon-chain.md), which describes the expected actions of a "validator"
5
-
participating in the shard data Custody Game.
6
4
7
5
## Table of contents
8
6
@@ -24,9 +22,11 @@ participating in the shard data Custody Game.
24
22
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
25
23
<!-- /TOC -->
26
24
27
-
28
25
## Introduction
29
26
27
+
This is an accompanying document to [Custody Game -- The Beacon Chain](./beacon-chain.md), which describes the expected actions of a "validator"
28
+
participating in the shard data Custody Game.
29
+
30
30
## Prerequisites
31
31
32
32
This document is an extension of the [Sharding -- Validator](../sharding/validator.md). All behaviors and definitions defined in the Sharding doc carry over unless explicitly noted or overridden.
@@ -58,7 +58,6 @@ Up to `MAX_EARLY_DERIVED_SECRET_REVEALS`, [`EarlyDerivedSecretReveal`](./beacon-
58
58
59
59
`attestation.data`, `attestation.aggregation_bits`, and `attestation.signature` are unchanged from Phase 0. But safety/validity in signing the message is premised upon calculation of the "custody bit" [TODO].
60
60
61
-
62
61
## How to avoid slashing
63
62
64
63
Proposer and Attester slashings described in Phase 0 remain in place with the addition of the following.
Copy file name to clipboardExpand all lines: specs/_features/das/fork-choice.md
-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@
14
14
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
15
15
<!-- /TOC -->
16
16
17
-
18
17
## Introduction
19
18
20
19
This document is the beacon chain fork choice spec for Data Availability Sampling. The only change that we add from phase 0 is that we add a concept of "data dependencies";
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
19
+
<!-- /TOC -->
16
20
17
21
## Introduction
18
22
23
+
This is an accompanying document which describes the expected actions of a "builder" participating in the Ethereum proof-of-stake protocol.
24
+
19
25
With the EIP-7732 Fork, the protocol includes new staked participants of the protocol called *Builders*. While Builders are a subset of the validator set, they have extra attributions that are optional. Validators may opt to not be builders and as such we collect the set of guidelines for those validators that want to act as builders in this document.
20
26
21
27
## Builders attributions
@@ -113,14 +119,17 @@ To construct the `execution_payload_envelope` the builder must perform the follo
113
119
After setting these parameters, the builder should run `process_execution_payload(state, signed_envelope, verify=False)` and this function should not trigger an exception.
114
120
115
121
6. Set `state_root` to `hash_tree_root(state)`.
122
+
116
123
After preparing the `envelope` the builder should sign the envelope using:
The builder assembles then `signed_execution_payload_envelope = SignedExecutionPayloadEnvelope(message=envelope, signature=signature)` and broadcasts it on the `execution_payload` global gossip topic.
0 commit comments