EIPs Explained

EIP-7934 · Final · Core · 2025-04-16

EIP-7934: RLP Execution Block Size Limit

Caps the RLP-encoded size of an execution block at 8 MiB (a 10 MiB limit minus a 2 MiB margin for the beacon block), so oversized blocks are invalid instead of silently failing to propagate.

What problem does it solve?

Ethereum limits blocks by gas, not by bytes. Some data is cheap in gas but large in bytes, so a block within the gas limit could still be very big. Very large blocks propagate slowly, raising the risk of missed slots and reorgs, and an attacker could build them deliberately to stress the network.

There was also a hidden mismatch: the consensus layer's gossip protocol does not propagate messages larger than 10 MiB. An execution block that pushed the beacon block over that size would be valid by the rules but would not spread across the network, which could fragment it.

EIP-7934 makes the byte limit an explicit validity rule, so execution and consensus layers agree on what a valid block is.

How it works

Three constants are defined:

Constant Value
MAX_BLOCK_SIZE 10 MiB (10,485,760 bytes)
SAFETY_MARGIN 2 MiB (2,097,152 bytes)
MAX_RLP_BLOCK_SIZE MAX_BLOCK_SIZE - SAFETY_MARGIN = 8 MiB (8,388,608 bytes)
  • Block building: producers must not create a block whose RLP encoding exceeds MAX_RLP_BLOCK_SIZE.
  • Block validation: nodes must reject any such block.

The 2 MiB margin leaves room for the rest of the beacon block that wraps the execution payload, so the whole message stays under the 10 MiB gossip cap. The limit applies independently of gas: a block must satisfy both.

Sample code

The check, as given in the spec:

MAX_BLOCK_SIZE = 10_485_760      # 10 MiB
SAFETY_MARGIN = 2_097_152        # 2 MiB
MAX_RLP_BLOCK_SIZE = MAX_BLOCK_SIZE - SAFETY_MARGIN  # 8 MiB

def exceed_max_rlp_block_size(block) -> bool:
    # True -> the block is invalid and must not be built or accepted
    return len(rlp.encode(block)) > MAX_RLP_BLOCK_SIZE

A builder adding transactions greedily might track the running size alongside gas:

size = len(rlp.encode(header_and_empty_body))
for tx in candidates:
    tx_size = len(tx.encoded)
    if gas_used + tx.gas > gas_limit or size + tx_size > MAX_RLP_BLOCK_SIZE:
        continue
    include(tx); gas_used += tx.gas; size += tx_size

(The size estimate is approximate because RLP list headers grow slightly; the final check must be on the real encoding.)

Things to know

  • Status is Final; it was part of the Fusaka (Osaka) upgrade.
  • Despite the title mentioning 10 MiB, the effective limit on the RLP-encoded execution block is 8 MiB.
  • The cap counts the RLP-encoded execution block. Blob data is carried separately (see EIP-4844) and is not part of this size.
  • Ordinary users are unaffected; normal blocks are far below the limit. It mainly matters to block builders and to anyone constructing unusually data-heavy transactions.
  • It complements other measures that bound worst-case blocks, such as the per-transaction gas cap in EIP-7825 and the higher calldata pricing of EIP-7623.

#block-size #networking #dos #core #fusaka

Details

Authors
Giulio Rebuffo (@Giulio2002), Ben Adams (@benaadams), Storm Slivkoff (@sslivkoff)
Status
Final
Type
Standards Track / Core
Created
2025-04-16
Required by

Machine-readable: Markdown · JSON