|
25 | 25 | - [The Req/Resp domain](#the-reqresp-domain) |
26 | 26 | - [Messages](#messages) |
27 | 27 | - [DataColumnSidecarsByRoot v1](#datacolumnsidecarsbyroot-v1) |
| 28 | + - [DataColumnSidecarsByRange v1](#datacolumnsidecarsbyrange-v1) |
28 | 29 | - [The discovery domain: discv5](#the-discovery-domain-discv5) |
29 | 30 | - [ENR structure](#enr-structure) |
30 | 31 | - [`custody_subnet_count`](#custody_subnet_count) |
@@ -200,6 +201,85 @@ Clients SHOULD include a sidecar in the response as soon as it passes the gossip |
200 | 201 | Clients SHOULD NOT respond with sidecars related to blocks that fail gossip validation rules. |
201 | 202 | Clients SHOULD NOT respond with sidecars related to blocks that fail the beacon chain state transition |
202 | 203 |
|
| 204 | +##### DataColumnSidecarsByRange v1 |
| 205 | + |
| 206 | +**Protocol ID:** `/eth2/beacon_chain/req/data_column_sidecars_by_range/1/` |
| 207 | + |
| 208 | +The `<context-bytes>` field is calculated as `context = compute_fork_digest(fork_version, genesis_validators_root)`: |
| 209 | + |
| 210 | +[1]: # (eth2spec: skip) |
| 211 | + |
| 212 | +| `fork_version` | Chunk SSZ type | |
| 213 | +|--------------------------|-------------------------------| |
| 214 | +| `EIP7594_FORK_VERSION` | `eip7594.DataColumnSidecar` | |
| 215 | + |
| 216 | +Request Content: |
| 217 | +``` |
| 218 | +( |
| 219 | + start_slot: Slot |
| 220 | + count: uint64 |
| 221 | + columns: List[ColumnIndex] |
| 222 | +) |
| 223 | +``` |
| 224 | + |
| 225 | +Response Content: |
| 226 | +``` |
| 227 | +( |
| 228 | + List[DataColumnSidecar, MAX_REQUEST_DATA_COLUMN_SIDECARS] |
| 229 | +) |
| 230 | +``` |
| 231 | + |
| 232 | +Requests data column sidecars in the slot range `[start_slot, start_slot + count)` of the given `columns`, leading up to the current head block as selected by fork choice. |
| 233 | + |
| 234 | +Before consuming the next response chunk, the response reader SHOULD verify the data column sidecar is well-formatted, has valid inclusion proof, and is correct w.r.t. the expected KZG commitments through `verify_data_column_sidecar_kzg_proofs`. |
| 235 | + |
| 236 | +`DataColumnSidecarsByRange` is primarily used to sync data columns that may have been missed on gossip and to sync within the `MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS` window. |
| 237 | + |
| 238 | +The request MUST be encoded as an SSZ-container. |
| 239 | + |
| 240 | +The response MUST consist of zero or more `response_chunk`. |
| 241 | +Each _successful_ `response_chunk` MUST contain a single `DataColumnSidecar` payload. |
| 242 | + |
| 243 | +Let `data_column_serve_range` be `[max(current_epoch - MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS, EIP7594_FORK_EPOCH), current_epoch]`. |
| 244 | +Clients MUST keep a record of data column sidecars seen on the epoch range `data_column_serve_range` |
| 245 | +where `current_epoch` is defined by the current wall-clock time, |
| 246 | +and clients MUST support serving requests of data columns on this range. |
| 247 | + |
| 248 | +Peers that are unable to reply to data column sidecar requests within the |
| 249 | +range `data_column_serve_range` SHOULD respond with error code `3: ResourceUnavailable`. |
| 250 | +Such peers that are unable to successfully reply to this range of requests MAY get descored |
| 251 | +or disconnected at any time. |
| 252 | + |
| 253 | +*Note*: The above requirement implies that nodes that start from a recent weak subjectivity checkpoint |
| 254 | +MUST backfill the local data columns database to at least the range `data_column_serve_range` |
| 255 | +to be fully compliant with `DataColumnSidecarsByRange` requests. |
| 256 | + |
| 257 | +*Note*: Although clients that bootstrap from a weak subjectivity checkpoint can begin |
| 258 | +participating in the networking immediately, other peers MAY |
| 259 | +disconnect and/or temporarily ban such an un-synced or semi-synced client. |
| 260 | + |
| 261 | +Clients MUST respond with at least the data column sidecars of the first blob-carrying block that exists in the range, if they have it, and no more than `MAX_REQUEST_DATA_COLUMN_SIDECARS` sidecars. |
| 262 | + |
| 263 | +Clients MUST include all data column sidecars of each block from which they include data column sidecars. |
| 264 | + |
| 265 | +The following data column sidecars, where they exist, MUST be sent in `(slot, column_index)` order. |
| 266 | + |
| 267 | +Slots that do not contain known data columns MUST be skipped, mimicking the behaviour |
| 268 | +of the `BlocksByRange` request. Only response chunks with known data columns should |
| 269 | +therefore be sent. |
| 270 | + |
| 271 | +Clients MAY limit the number of data column sidecars in the response. |
| 272 | + |
| 273 | +The response MUST contain no more than `count * NUMBER_OF_COLUMNS` data column sidecars. |
| 274 | + |
| 275 | +Clients MUST respond with data columns sidecars from their view of the current fork choice |
| 276 | +-- that is, data column sidecars as included by blocks from the single chain defined by the current head. |
| 277 | +Of note, blocks from slots before the finalization MUST lead to the finalized block reported in the `Status` handshake. |
| 278 | + |
| 279 | +Clients MUST respond with data column sidecars that are consistent from a single chain within the context of the request. |
| 280 | + |
| 281 | +After the initial data column sidecar, clients MAY stop in the process of responding if their fork choice changes the view of the chain in the context of the request. |
| 282 | + |
203 | 283 | ### The discovery domain: discv5 |
204 | 284 |
|
205 | 285 | #### ENR structure |
|
0 commit comments