Apply suggestions from code review
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
This commit is contained in:
parent
a72ece8348
commit
55db86127d
|
@ -42,7 +42,7 @@ We define the following Python custom types for type hinting and readability:
|
|||
|
||||
| Name | SSZ equivalent | Description |
|
||||
| - | - | - |
|
||||
| `DataColumn` | `List[Cell, MAX_BLOBS_PER_BLOCK]` | The data of each column in EIP7594 |
|
||||
| `DataColumn` | `List[Cell, MAX_BLOBS_PER_BLOCK]` | The data of each column in EIP-7594 |
|
||||
| `ExtendedMatrix` | `List[Cell, MAX_BLOBS_PER_BLOCK * NUMBER_OF_COLUMNS]` | The full data of one-dimensional erasure coding extended blobs (in row major format) |
|
||||
| `FlatExtendedMatrix` | `List[BLSFieldElement, MAX_BLOBS_PER_BLOCK * FIELD_ELEMENTS_PER_BLOB * NUMBER_OF_COLUMNS]` | The flattened format of `ExtendedMatrix` |
|
||||
|
||||
|
@ -217,7 +217,6 @@ The potential benefits of having row custody could include:
|
|||
|
||||
However, for simplicity, we don't assign row custody assignments to nodes in the current design.
|
||||
|
||||
|
||||
### Subnet stability
|
||||
|
||||
To start with a simple, stable backbone, for now, we don't shuffle the subnet assignments via the deterministic custody selection helper `get_custody_lines`. However, staggered rotation likely needs to happen on the order of the pruning period to ensure subnets can be utilized for recovery. For example, introducing an `epoch` argument allows the function to maintain stability over many epochs.
|
||||
|
|
|
@ -33,15 +33,15 @@
|
|||
|
||||
### Preset
|
||||
|
||||
| Name | Value | Description |
|
||||
|------------------------------------------|-----------------------------------|---------------------------------------------------------------------|
|
||||
| `KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH` | `uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')))` (= 4) | <!-- predefined --> Merkle proof index for `blob_kzg_commitments` |
|
||||
| Name | Value | Description |
|
||||
| - | - | - |
|
||||
| `KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH` | `uint64(floorlog2(get_generalized_index(BeaconBlockBody, 'blob_kzg_commitments')))` (= 4) | <!-- predefined --> Merkle proof index for `blob_kzg_commitments` |
|
||||
|
||||
### Configuration
|
||||
|
||||
| Name | Value | Description |
|
||||
|------------------------------------------|-----------------------------------|---------------------------------------------------------------------|
|
||||
| `DATA_COLUMN_SIDECAR_SUBNET_COUNT` | `32` | The number of data column sidecar subnets used in the gossipsub protocol. |
|
||||
| Name | Value | Description |
|
||||
| - | - | - |
|
||||
| `DATA_COLUMN_SIDECAR_SUBNET_COUNT` | `32` | The number of data column sidecar subnets used in the gossipsub protocol |
|
||||
|
||||
### Containers
|
||||
|
||||
|
@ -74,8 +74,9 @@ def verify_data_column_sidecar_kzg_proof(sidecar: DataColumnSidecar) -> bool:
|
|||
"""
|
||||
Verify if the proofs are correct
|
||||
"""
|
||||
row_ids = [RowIndex(i) for i in range(len(sidecar.column))]
|
||||
assert sidecar.index < NUMBER_OF_COLUMNS
|
||||
assert len(sidecar.column) == len(sidecar.kzg_commitments) == len(sidecar.kzg_proofs)
|
||||
row_ids = [RowIndex(i) for i in range(len(sidecar.column))]
|
||||
|
||||
# KZG batch verifies that the cells match the corresponding commitments and proofs
|
||||
return verify_cell_proof_batch(
|
||||
|
@ -111,7 +112,6 @@ def compute_subnet_for_data_column_sidecar(column_index: ColumnIndex) -> SubnetI
|
|||
return SubnetID(column_index % DATA_COLUMN_SIDECAR_SUBNET_COUNT)
|
||||
```
|
||||
|
||||
|
||||
### The gossip domain: gossipsub
|
||||
|
||||
Some gossip meshes are upgraded in the EIP-7594 fork to support upgraded types.
|
||||
|
@ -159,9 +159,9 @@ The `<context-bytes>` field is calculated as `context = compute_fork_digest(fork
|
|||
|
||||
[1]: # (eth2spec: skip)
|
||||
|
||||
| `fork_version` | Chunk SSZ type |
|
||||
|--------------------------|-------------------------------|
|
||||
| `EIP7594_FORK_VERSION` | `eip7594.DataColumnSidecar` |
|
||||
| `fork_version` | Chunk SSZ type |
|
||||
| - | - |
|
||||
| `EIP7594_FORK_VERSION` | `eip7594.DataColumnSidecar` |
|
||||
|
||||
Request Content:
|
||||
|
||||
|
|
Loading…
Reference in New Issue