Skip to content

Commit cebf78a

Browse files
committed
Apply PR feedback
1 parent 1acb1ff commit cebf78a

File tree

8 files changed

+37
-11
lines changed

8 files changed

+37
-11
lines changed

configs/mainnet.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,6 @@ WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256
159159
WHISK_PROPOSER_SELECTION_GAP: 2
160160

161161
# EIP7594
162+
NUMBER_OF_COLUMNS: 128
162163
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
164+
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384

configs/minimal.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,6 @@ WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4
157157
WHISK_PROPOSER_SELECTION_GAP: 1
158158

159159
# EIP7594
160+
NUMBER_OF_COLUMNS: 128
160161
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 32
162+
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384

presets/mainnet/eip7594.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@
66
FIELD_ELEMENTS_PER_CELL: 64
77
# uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))
88
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4
9-
# `uint64((FIELD_ELEMENTS_PER_BLOB * 2) // FIELD_ELEMENTS_PER_CELL)` (= 128)
10-
NUMBER_OF_COLUMNS: 128

presets/minimal/eip7594.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@
66
FIELD_ELEMENTS_PER_CELL: 64
77
# uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments'))
88
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4
9-
# `uint64((FIELD_ELEMENTS_PER_BLOB * 2) // FIELD_ELEMENTS_PER_CELL)` (= 128)
10-
NUMBER_OF_COLUMNS: 128

pysetup/spec_builders/eip7594.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def imports(cls, preset_name: str):
1717
def hardcoded_custom_type_dep_constants(cls, spec_object) -> str:
1818
return {
1919
'FIELD_ELEMENTS_PER_CELL': spec_object.preset_vars['FIELD_ELEMENTS_PER_CELL'].value,
20-
'NUMBER_OF_COLUMNS': spec_object.preset_vars['NUMBER_OF_COLUMNS'].value,
20+
'NUMBER_OF_COLUMNS': spec_object.config_vars['NUMBER_OF_COLUMNS'].value,
2121
}
2222

2323
@classmethod

specs/_features/eip7594/p2p-interface.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
- [The Req/Resp domain](#the-reqresp-domain)
2626
- [Messages](#messages)
2727
- [DataColumnSidecarsByRoot v1](#datacolumnsidecarsbyroot-v1)
28+
- [The discovery domain: discv5](#the-discovery-domain-discv5)
29+
- [ENR structure](#enr-structure)
30+
- [`custody_subnet_count`](#custody_subnet_count)
2831

2932
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3033
<!-- /TOC -->
@@ -44,7 +47,7 @@
4447

4548
| Name | Value | Description |
4649
|------------------------------------------|-----------------------------------|---------------------------------------------------------------------|
47-
| `MAX_REQUEST_DATA_COLUMN_SIDECARS` | `NUMBER_OF_COLUMNS` | Maximum number of data column sidecars in a single request |
50+
| `MAX_REQUEST_DATA_COLUMN_SIDECARS` | `MAX_REQUEST_BLOCKS_DENEB * NUMBER_OF_COLUMNS` | Maximum number of data column sidecars in a single request |
4851
| `MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS` | `2**12` (= 4096 epochs, ~18 days) | The minimum epoch range over which a node must serve data column sidecars |
4952

5053
### Containers
@@ -194,3 +197,15 @@ Clients MAY limit the number of blocks and sidecars in the response.
194197
Clients SHOULD include a sidecar in the response as soon as it passes the gossip validation rules.
195198
Clients SHOULD NOT respond with sidecars related to blocks that fail gossip validation rules.
196199
Clients SHOULD NOT respond with sidecars related to blocks that fail the beacon chain state transition
200+
201+
### The discovery domain: discv5
202+
203+
#### ENR structure
204+
205+
##### `custody_subnet_count`
206+
207+
A new field is added to the ENR under the key `custody_subnet_count` to facilitate custody data column discovery.
208+
209+
| Key | Value |
210+
|:-----------------------|:-------------|
211+
| `custody_subnet_count` | SSZ `uint64` |

specs/altair/p2p-interface.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Altair adds new messages, topics and data to the Req-Resp, Gossip and Discovery
3333
- [GetMetaData v2](#getmetadata-v2)
3434
- [Transitioning from v1 to v2](#transitioning-from-v1-to-v2)
3535
- [The discovery domain: discv5](#the-discovery-domain-discv5)
36+
- [ENR structure](#enr-structure)
37+
- [Sync committee bitfield](#sync-committee-bitfield)
3638

3739
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3840
<!-- /TOC -->
@@ -287,10 +289,16 @@ the responder MUST return the **InvalidRequest** response code.
287289

288290
### The discovery domain: discv5
289291

290-
The `attnets` key of the ENR is used as defined in the Phase 0 document.
292+
#### ENR structure
293+
294+
##### Sync committee bitfield
291295

292296
An additional bitfield is added to the ENR under the key `syncnets` to facilitate sync committee subnet discovery.
293297
The length of this bitfield is `SYNC_COMMITTEE_SUBNET_COUNT` where each bit corresponds to a distinct `subnet_id` for a specific sync committee subnet.
294298
The `i`th bit is set in this bitfield if the validator is currently subscribed to the `sync_committee_{i}` topic.
295299

300+
| Key | Value |
301+
|:-------------|:-------------------------------------------------|
302+
| `syncnets` | SSZ `Bitvector[SYNC_COMMITTEE_SUBNET_COUNT]` |
303+
296304
See the [validator document](./validator.md#sync-committee-subnet-stability) for further details on how the new bits are used.

tests/core/pyspec/eth2spec/test/eip7594/unittests/test_config_invariants.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
@single_phase
1111
def test_invariants(spec):
1212
assert spec.FIELD_ELEMENTS_PER_BLOB % spec.FIELD_ELEMENTS_PER_CELL == 0
13-
assert spec.FIELD_ELEMENTS_PER_BLOB * 2 % spec.NUMBER_OF_COLUMNS == 0
14-
assert spec.SAMPLES_PER_SLOT <= spec.NUMBER_OF_COLUMNS
13+
assert spec.FIELD_ELEMENTS_PER_BLOB * 2 % spec.config.NUMBER_OF_COLUMNS == 0
14+
assert spec.SAMPLES_PER_SLOT <= spec.config.NUMBER_OF_COLUMNS
1515
assert spec.CUSTODY_REQUIREMENT <= spec.config.DATA_COLUMN_SIDECAR_SUBNET_COUNT
16-
assert spec.config.DATA_COLUMN_SIDECAR_SUBNET_COUNT <= spec.NUMBER_OF_COLUMNS
17-
assert spec.NUMBER_OF_COLUMNS % spec.config.DATA_COLUMN_SIDECAR_SUBNET_COUNT == 0
16+
assert spec.config.DATA_COLUMN_SIDECAR_SUBNET_COUNT <= spec.config.NUMBER_OF_COLUMNS
17+
assert spec.config.NUMBER_OF_COLUMNS % spec.config.DATA_COLUMN_SIDECAR_SUBNET_COUNT == 0
18+
assert spec.config.MAX_REQUEST_DATA_COLUMN_SIDECARS == (
19+
spec.config.MAX_REQUEST_BLOCKS_DENEB * spec.config.NUMBER_OF_COLUMNS
20+
)

0 commit comments

Comments
 (0)