44
55- [ Introduction] ( #introduction )
66- [ Modifications in Deneb] ( #modifications-in-deneb )
7+ - [ Helper functions] ( #helper-functions )
8+ - [ Modified ` compute_fork_version ` ] ( #modified-compute_fork_version )
9+ - [ New ` compute_max_request_blob_sidecars ` ] ( #new-compute_max_request_blob_sidecars )
710 - [ Preset] ( #preset )
811 - [ Configuration] ( #configuration )
912 - [ Containers] ( #containers )
@@ -43,6 +46,36 @@ specifications of previous upgrades, and assumes them as pre-requisite.
4346
4447## Modifications in Deneb
4548
49+ ### Helper functions
50+
51+ #### Modified ` compute_fork_version `
52+
53+ ``` python
54+ def compute_fork_version (epoch : Epoch) -> Version:
55+ """
56+ Return the fork version at the given ``epoch``.
57+ """
58+ if epoch >= DENEB_FORK_EPOCH :
59+ return DENEB_FORK_VERSION
60+ if epoch >= CAPELLA_FORK_EPOCH :
61+ return CAPELLA_FORK_VERSION
62+ if epoch >= BELLATRIX_FORK_EPOCH :
63+ return BELLATRIX_FORK_VERSION
64+ if epoch >= ALTAIR_FORK_EPOCH :
65+ return ALTAIR_FORK_VERSION
66+ return GENESIS_FORK_VERSION
67+ ```
68+
69+ #### New ` compute_max_request_blob_sidecars `
70+
71+ ``` python
72+ def compute_max_request_blob_sidecars () -> uint64:
73+ """
74+ Return the maximum number of blob sidecars in a single request.
75+ """
76+ return uint64(MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK )
77+ ```
78+
4679### Preset
4780
4881* [ New in Deneb: EIP4844 ] *
@@ -55,12 +88,11 @@ specifications of previous upgrades, and assumes them as pre-requisite.
5588
5689* [ New in Deneb: EIP4844 ] *
5790
58- | Name | Value | Description |
59- | --------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------ |
60- | ` MAX_REQUEST_BLOCKS_DENEB ` | ` 2**7 ` (= 128) | Maximum number of blocks in a single request |
61- | ` MAX_REQUEST_BLOB_SIDECARS ` | ` MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK ` | Maximum number of blob sidecars in a single request |
62- | ` MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS ` | ` 2**12 ` (= 4096 epochs, ~ 18 days) | The minimum epoch range over which a node must serve blob sidecars |
63- | ` BLOB_SIDECAR_SUBNET_COUNT ` | ` 6 ` | The number of blob sidecar subnets used in the gossipsub protocol. |
91+ | Name | Value | Description |
92+ | --------------------------------------- | --------------------------------- | ------------------------------------------------------------------ |
93+ | ` MAX_REQUEST_BLOCKS_DENEB ` | ` 2**7 ` (= 128) | Maximum number of blocks in a single request |
94+ | ` MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS ` | ` 2**12 ` (= 4096 epochs, ~ 18 days) | The minimum epoch range over which a node must serve blob sidecars |
95+ | ` BLOB_SIDECAR_SUBNET_COUNT ` | ` 6 ` | The number of blob sidecar subnets used in the gossipsub protocol. |
6496
6597### Containers
6698
@@ -365,7 +397,7 @@ Response Content:
365397
366398```
367399(
368- List[BlobSidecar, MAX_REQUEST_BLOB_SIDECARS ]
400+ List[BlobSidecar, compute_max_request_blob_sidecars() ]
369401)
370402```
371403
@@ -406,7 +438,7 @@ and/or temporarily ban such an un-synced or semi-synced client.
406438
407439Clients MUST respond with at least the blob sidecars of the first blob-carrying
408440block that exists in the range, if they have it, and no more than
409- ` MAX_REQUEST_BLOB_SIDECARS ` sidecars.
441+ ` compute_max_request_blob_sidecars() ` sidecars.
410442
411443Clients MUST include all blob sidecars of each block from which they include
412444blob sidecars.
@@ -456,15 +488,15 @@ Request Content:
456488
457489```
458490(
459- List[BlobIdentifier, MAX_REQUEST_BLOB_SIDECARS ]
491+ List[BlobIdentifier, compute_max_request_blob_sidecars() ]
460492)
461493```
462494
463495Response Content:
464496
465497```
466498(
467- List[BlobSidecar, MAX_REQUEST_BLOB_SIDECARS ]
499+ List[BlobSidecar, compute_max_request_blob_sidecars() ]
468500)
469501```
470502
@@ -476,7 +508,7 @@ Before consuming the next response chunk, the response reader SHOULD verify the
476508blob sidecar is well-formatted, has valid inclusion proof, and is correct w.r.t.
477509the expected KZG commitments through ` verify_blob_kzg_proof ` .
478510
479- No more than ` MAX_REQUEST_BLOB_SIDECARS ` may be requested at a time.
511+ No more than ` compute_max_request_blob_sidecars() ` may be requested at a time.
480512
481513` BlobSidecarsByRoot ` is primarily used to recover recent blobs (e.g. when
482514receiving a block with a transaction whose corresponding blob is missing).
0 commit comments