|
| 1 | +--- |
| 2 | +eip: 7742 |
| 3 | +title: Uncouple blob count between CL and EL |
| 4 | +description: Have CL verify blob maximum and have EL get target value from CL |
| 5 | +author: Alex Stokes (@ralexstokes) |
| 6 | +discussions-to: https://ethereum-magicians.org/t/eip-7742-uncouple-blob-count-between-cl-and-el/20550 |
| 7 | +status: Draft |
| 8 | +type: Standards Track |
| 9 | +category: Core |
| 10 | +created: 2024-07-12 |
| 11 | +requires: 4844 |
| 12 | +--- |
| 13 | + |
| 14 | +## Abstract |
| 15 | + |
| 16 | +Update blob maximum and target verification from [EIP-4844](./eip-4844.md). |
| 17 | + |
| 18 | +The execution layer no longer verifies the blob maximum and receives the target dynamically from the consensus layer. |
| 19 | + |
| 20 | +## Motivation |
| 21 | + |
| 22 | +Following EIP-4844, the execution layer (EL) maintains a hard-coded blob target value and blob maximum value. Given the relationship |
| 23 | +of the EL and the consensus layer (CL) node software, the verification of the blob maximum is redundant so it can be removed |
| 24 | +entirely without any change in security. This EIP also changes how the EL sources the current blob target value for two reasons: |
| 25 | + |
| 26 | +1) Gain more flexibility over the value, rather than the static `TARGET == MAX // 2` relation in EIP-4844. |
| 27 | +2) Uncouple development and deployment of the CL and EL layers in the event it is desirable to change the blob target value. |
| 28 | + |
| 29 | +## Specification |
| 30 | + |
| 31 | +| constants | value | |
| 32 | +|--- |--- | |
| 33 | +| `FORK_TIMESTAMP` | TBD | |
| 34 | + |
| 35 | +### Background |
| 36 | + |
| 37 | +The data facility introduced via EIP-4844 adds blobs to Ethereum blocks, which are simply fixed sets of data that can be |
| 38 | +included in the canonical chain but have no execution semantics (cf. `calldata` in an Ethereum transaction). |
| 39 | + |
| 40 | +The protocol specifies a maximum allowed blob count per block to prevent DoS vectors via the abuse of this data facility. |
| 41 | +The protocol also maintains an EIP-1559-like "target" value for an intended running average amount of blob throughput per |
| 42 | +unit time. Blob usage is compared against this target to influence a "blob base fee" to administer allocation of this |
| 43 | +resource to users of the Ethereum protocol. |
| 44 | + |
| 45 | +Both of these values are currently hard-coded in the EL after EIP-4844 and the blob maximum is separately hard-coded in |
| 46 | +the CL following EIP-4844. This EIP proposes a set of changes to uncouple these values across the CL and EL to make development |
| 47 | +and deployment of changes to the blob count easier. |
| 48 | + |
| 49 | +#### Maximum blobs per block |
| 50 | + |
| 51 | +The blob maximum is verified in the CL node and the EL inherits this verification during the consistency check of the |
| 52 | +versioned hashes corresponding to each blob as specified by the Engine API. Because of this, the strict check specified |
| 53 | +by EIP-4844 is unnecessary. |
| 54 | + |
| 55 | +#### Target amount of blobs per block |
| 56 | + |
| 57 | +The target is currently specified as a fixed value in relation to the blob count. The Ethereum community intends to increase |
| 58 | +the blob parameters as part of its scaling strategy and the ability to have a more flexible target value in relation to |
| 59 | +the blob max is desirable to reduce rigidity in this protocol parameter. |
| 60 | + |
| 61 | +Even if the EL keeps a fixed target value based on the max, removing the max implies the EL would not know what the target |
| 62 | +value should be. To address this lack of information, this EIP proposes the CL sends the current target value to the EL |
| 63 | +with each provided payload over the Engine API. The EL block header will also need to be extended with this target value |
| 64 | +to preserve the security of optimistic sync. |
| 65 | + |
| 66 | +### Block structure and validity |
| 67 | + |
| 68 | +Beginning at the execution timestamp `FORK_TIMESTAMP`, execution clients **MUST** extend the header schema with an |
| 69 | +additional 64-bit field: the `target_blob_count`. This value is set to the current target blob count. The Engine API |
| 70 | +is modified along with this EIP to provide the `target_blob_count` with each payload and implementations can use this |
| 71 | +value to correctly set the block header field. |
| 72 | + |
| 73 | +Validity of the `target_blob_count` is guaranteed from the consensus layer, much like how withdrawals are handled. |
| 74 | + |
| 75 | +When verifying a block, execution clients **MUST** ensure the target blob count in the block header matches the one |
| 76 | +provided by the consensus client. |
| 77 | + |
| 78 | +For a genesis block with no existing parent, the value should be set according to the agreed specification for the |
| 79 | +target blob count given by that genesis block's protocol rule set. |
| 80 | + |
| 81 | +### Block processing |
| 82 | + |
| 83 | +At the start of processing any execution block where `block.timestamp >= FORK_TIMESTAMP` (i.e. before processing any transactions), |
| 84 | +the verification of the blob maximum as given in EIP-4844 can be skipped. Concretely, this means any logic relating |
| 85 | +to `MAX_BLOB_GAS_PER_BLOCK` as given in EIP-4844 can be deprecated. |
| 86 | +Additionally, any reference to `TARGET_BLOB_GAS_PER_BLOCK` from EIP-4844 can be derived by taking the `target_blob_count` from the CL and multiplying by `GAS_PER_BLOB` as given in EIP-4844. |
| 87 | + |
| 88 | +Otherwise, the specification of EIP-4844 is not changed. For example, blob base fee accounting and excess blob gas tracking occur in the exact same way. |
| 89 | + |
| 90 | +## Rationale |
| 91 | + |
| 92 | +### Why not have the CL also compute the blob base fee and remove any notion of blob counts from EL processing? |
| 93 | + |
| 94 | +TODO |
| 95 | + |
| 96 | +## Backwards Compatibility |
| 97 | + |
| 98 | +No issues. |
| 99 | + |
| 100 | +## Test Cases |
| 101 | + |
| 102 | +N/A |
| 103 | + |
| 104 | +## Reference Implementation |
| 105 | + |
| 106 | +N/A |
| 107 | + |
| 108 | +## Security Considerations |
| 109 | + |
| 110 | +N/A |
| 111 | + |
| 112 | +## Copyright |
| 113 | + |
| 114 | +Copyright and related rights waived via [CC0](../LICENSE.md). |
0 commit comments