Skip to content

Commit 39205ed

Browse files
authored
Clean up Gloas specs (part 4) (#4721)
1 parent d95386a commit 39205ed

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

specs/gloas/validator.md

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
- [Attestation](#attestation)
1414
- [Sync Committee participations](#sync-committee-participations)
1515
- [Block proposal](#block-proposal)
16-
- [Constructing the new `signed_execution_payload_bid` field in `BeaconBlockBody`](#constructing-the-new-signed_execution_payload_bid-field-in-beaconblockbody)
17-
- [Constructing the new `payload_attestations` field in `BeaconBlockBody`](#constructing-the-new-payload_attestations-field-in-beaconblockbody)
16+
- [Constructing `signed_execution_payload_bid`](#constructing-signed_execution_payload_bid)
17+
- [Constructing `payload_attestations`](#constructing-payload_attestations)
1818
- [Blob sidecars](#blob-sidecars)
1919
- [Payload timeliness attestation](#payload-timeliness-attestation)
2020
- [Constructing a payload attestation](#constructing-a-payload-attestation)
@@ -27,8 +27,8 @@
2727

2828
## Introduction
2929

30-
This document represents the changes and additions to the Honest validator guide
31-
included in Gloas.
30+
This document represents the changes to be made in the code of an "honest
31+
validator" to implement Gloas.
3232

3333
## Configuration
3434

@@ -45,19 +45,19 @@ included in Gloas.
4545
## Validator assignment
4646

4747
A validator may be a member of the new Payload Timeliness Committee (PTC) for a
48-
given slot. To check for PTC assignments the validator uses the helper
49-
`get_ptc_assignment(state, epoch, validator_index)` where `epoch <= next_epoch`.
50-
51-
PTC committee selection is only stable within the context of the current and
48+
given slot. To check for PTC assignments, use
49+
`get_ptc_assignment(state, epoch, validator_index)` where `epoch <= next_epoch`,
50+
as PTC committee selection is only stable within the context of the current and
5251
next epoch.
5352

5453
```python
5554
def get_ptc_assignment(
5655
state: BeaconState, epoch: Epoch, validator_index: ValidatorIndex
5756
) -> Optional[Slot]:
5857
"""
59-
Returns the slot during the requested epoch in which the validator with index `validator_index`
60-
is a member of the PTC. Returns None if no assignment is found.
58+
Returns the slot during the requested epoch in which the validator with
59+
index `validator_index` is a member of the PTC. Returns None if no
60+
assignment is found.
6161
"""
6262
next_epoch = Epoch(get_current_epoch(state) + 1)
6363
assert epoch <= next_epoch
@@ -112,47 +112,48 @@ deadline is changed with `SYNC_MESSAGE_DUE_BPS_GLOAS`.
112112
### Block proposal
113113

114114
Validators are still expected to propose `SignedBeaconBlock` at the beginning of
115-
any slot during which `is_proposer(state, validator_index)` returns `true`. The
115+
any slot during which `is_proposer(state, validator_index)` returns `True`. The
116116
mechanism to prepare this beacon block and related sidecars differs from
117117
previous forks as follows
118118

119-
#### Constructing the new `signed_execution_payload_bid` field in `BeaconBlockBody`
119+
#### Constructing `signed_execution_payload_bid`
120120

121121
To obtain `signed_execution_payload_bid`, a block proposer building a block on
122-
top of a `state` must take the following actions:
122+
top of a `state` MUST take the following actions in order to construct the
123+
`signed_execution_payload_bid` field in `BeaconBlockBody`:
123124

124125
- Listen to the `execution_payload_bid` gossip global topic and save an accepted
125-
`signed_execution_payload_bid` from a builder. Proposer MAY obtain these
126-
signed messages by other off-protocol means.
127-
- The `signed_execution_payload_bid` must satisfy the verification conditions
126+
`signed_execution_payload_bid` from a builder. The block proposer MAY obtain
127+
these signed messages by other off-protocol means.
128+
- The `signed_execution_payload_bid` MUST satisfy the verification conditions
128129
found in `process_execution_payload_bid`, that is:
129-
- For external builders: The header signature must be valid
130-
- For self-builds: The signature must be `bls.G2_POINT_AT_INFINITY` and the
131-
bid amount must be zero
132-
- The builder balance can cover the header value
133-
- The header slot is for the proposal block slot
130+
- For external builders, the header signature MUST be valid.
131+
- For self-builds, the signature MUST be `bls.G2_POINT_AT_INFINITY` and the
132+
bid amount MUST be zero.
133+
- The builder balance can cover the header value.
134+
- The header slot is for the proposal block slot.
134135
- The header parent block hash equals the state's `latest_block_hash`.
135136
- The header parent block root equals the current block's `parent_root`.
136137
- Select one bid and set
137-
`body.signed_execution_payload_bid = signed_execution_payload_bid`
138+
`body.signed_execution_payload_bid = signed_execution_payload_bid`.
138139

139-
*Note:* The execution address encoded in the field `fee_recipient` in the
140-
`signed_execution_payload_bid.message` is the recipient of the builder payment.
140+
*Note:* The execution address encoded in the `fee_recipient` field in the
141+
`signed_execution_payload_bid.message` will receive the builder payment.
141142

142-
#### Constructing the new `payload_attestations` field in `BeaconBlockBody`
143+
#### Constructing `payload_attestations`
143144

144-
Up to `MAX_PAYLOAD_ATTESTATIONS`, aggregate payload attestations can be included
145-
in the block. The validator will have to
145+
Up to `MAX_PAYLOAD_ATTESTATIONS` aggregate payload attestations can be included
146+
in the block. The block proposer MUST take the following actions in order to
147+
construct the `payload_attestations` field in `BeaconBlockBody`:
146148

147-
- Listen to the `payload_attestation_message` gossip global topic
148-
- The payload attestations added must satisfy the verification conditions found
149-
in payload attestation gossip validation and payload attestation processing.
150-
This means
149+
- Listen to the `payload_attestation_message` gossip global topic.
150+
- Added payload attestations MUST satisfy the verification conditions found in
151+
payload attestation gossip validation and payload attestation processing.
151152
- The `data.beacon_block_root` corresponds to `block.parent_root`.
152153
- The slot of the parent block is exactly one slot before the proposing slot.
153154
- The signature of the payload attestation data message verifies correctly.
154-
- The proposer needs to aggregate all payload attestations with the same data
155-
into a given `PayloadAttestation` object. For this it needs to fill the
155+
- The proposer MUST aggregate all payload attestations with the same data into a
156+
given `PayloadAttestation` object. For this the proposer needs to fill the
156157
`aggregation_bits` field by using the relative position of the validator
157158
indices with respect to the PTC that is obtained from
158159
`get_ptc(state, block_slot - 1)`.
@@ -161,8 +162,8 @@ in the block. The validator will have to
161162

162163
The blob sidecars are no longer broadcast by the validator, and thus their
163164
construction is not necessary. This deprecates the corresponding sections from
164-
the honest validator guide in the Fulu fork, moving them, albeit with some
165-
modifications, to the [honest Builder guide](./builder.md)
165+
the Honest Validator specifications in the Fulu fork, moving them, albeit with
166+
some modifications, to the [Honest Builder](./builder.md) specifications.
166167

167168
### Payload timeliness attestation
168169

@@ -171,22 +172,22 @@ Validators should call `get_ptc_assignment` at the beginning of an epoch to be
171172
prepared to submit their PTC attestations during the next epoch.
172173

173174
A validator should create and broadcast the `payload_attestation_message` to the
174-
global execution attestation subnet not after
175-
`get_payload_attestation_due_ms(epoch)` milliseconds since the start of `slot`.
175+
global execution attestation subnet within the first
176+
`get_payload_attestation_due_ms(epoch)` milliseconds of the slot.
176177

177178
#### Constructing a payload attestation
178179

179180
If a validator is in the payload attestation committee for the current slot (as
180181
obtained from `get_ptc_assignment` above) then the validator should prepare a
181-
`PayloadAttestationMessage` for the current slot, according to the logic in
182-
`get_payload_attestation_message` below and broadcast it not after
183-
`get_payload_attestation_due_ms(epoch)` milliseconds since the start of the
184-
slot, to the global `payload_attestation_message` pubsub topic.
182+
`PayloadAttestationMessage` for the current slot. Follow the logic below to
183+
create the `payload_attestation_message` and broadcast to the global
184+
`payload_attestation_message` pubsub topic within the first
185+
`get_payload_attestation_due_ms(epoch)` milliseconds of the slot.
185186

186187
The validator creates `payload_attestation_message` as follows:
187188

188189
- If the validator has not seen any beacon block for the assigned slot, do not
189-
submit a payload attestation. It will be ignored anyway.
190+
submit a payload attestation; it will be ignored anyway.
190191
- Set `data.beacon_block_root` be the hash tree root of the beacon block seen
191192
for the assigned slot.
192193
- Set `data.slot` to be the assigned slot.
@@ -213,9 +214,9 @@ def get_payload_attestation_message_signature(
213214
return bls.Sign(privkey, signing_root)
214215
```
215216

216-
**Remark** Validators do not need to check the full validity of the
217+
*Note*: Validators do not need to check the full validity of the
217218
`ExecutionPayload` contained in within the envelope, but the checks in the
218-
[P2P guide](./p2p-interface.md) should pass for the
219+
[Networking](./p2p-interface.md) specifications should pass for the
219220
`SignedExecutionPayloadEnvelope`.
220221

221222
## Modified functions

0 commit comments

Comments
 (0)