Merge pull request #3162 from dapplion/eip4844-dedup-range

De-duplicate range references in BlobSidecarsByRange
This commit is contained in:
Hsiao-Wei Wang 2023-06-09 00:54:27 +08:00 committed by GitHub
commit 76214c7cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,18 +278,18 @@ The request MUST be encoded as an SSZ-container.
The response MUST consist of zero or more `response_chunk`. The response MUST consist of zero or more `response_chunk`.
Each _successful_ `response_chunk` MUST contain a single `BlobSidecar` payload. Each _successful_ `response_chunk` MUST contain a single `BlobSidecar` payload.
Clients MUST keep a record of signed blobs sidecars seen on the epoch range Let `blob_serve_range` be `[max(current_epoch - MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS, DENEB_FORK_EPOCH), current_epoch]`.
`[max(current_epoch - MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS, DENEB_FORK_EPOCH), current_epoch]` Clients MUST keep a record of signed blob sidecars seen on the epoch range `blob_serve_range`
where `current_epoch` is defined by the current wall-clock time, where `current_epoch` is defined by the current wall-clock time,
and clients MUST support serving requests of blobs on this range. and clients MUST support serving requests of blobs on this range.
Peers that are unable to reply to blob sidecar requests within the `MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS` Peers that are unable to reply to blob sidecar requests within the
epoch range SHOULD respond with error code `3: ResourceUnavailable`. range `blob_serve_range` SHOULD respond with error code `3: ResourceUnavailable`.
Such peers that are unable to successfully reply to this range of requests MAY get descored Such peers that are unable to successfully reply to this range of requests MAY get descored
or disconnected at any time. or disconnected at any time.
*Note*: The above requirement implies that nodes that start from a recent weak subjectivity checkpoint *Note*: The above requirement implies that nodes that start from a recent weak subjectivity checkpoint
MUST backfill the local blobs database to at least epoch `current_epoch - MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS` MUST backfill the local blobs database to at least the range `blob_serve_range`
to be fully compliant with `BlobSidecarsByRange` requests. to be fully compliant with `BlobSidecarsByRange` requests.
*Note*: Although clients that bootstrap from a weak subjectivity checkpoint can begin *Note*: Although clients that bootstrap from a weak subjectivity checkpoint can begin