L2 Execution Engine

Table of Contents

Overview

The EIP-1559 parameters are encoded in the block header's nonce field and can be configured dynamically through the SystemConfig.

Timestamp Activation

Holocene, like other network upgrades, is activated at a timestamp. Changes to the L2 Block execution rules are applied when the L2 Timestamp >= activation time.

Dynamic EIP-1559 Parameters

Extended PayloadAttributesV3

The PayloadAttributesV3 type is extended to:

PayloadAttributesV3: {
    timestamp: QUANTITY
    random: DATA (32 bytes)
    suggestedFeeRecipient: DATA (20 bytes)
    withdrawals: array of WithdrawalV1
    parentBeaconBlockRoot: DATA (32 bytes)
    transactions: array of DATA
    noTxPool: bool
    gasLimit: QUANTITY or null
    eip1559Params: DATA (8 bytes)
}

eip1559Params encoding

NameTypeByte Offset
denominatoru32 (big-endian)[0, 4)
elasticityu32 (big-endian)[4, 8)

Execution

During execution, the EIP-1559 parameters used to calculate the next block base fee should come from the parent header's nonce field rather than the previous protocol constants, if it is non-zero.

  • If, before Holocene activation, eip1559Parameters in the PayloadAttributesV3 is non-null, the attributes are to be considered invalid by the engine.
  • At and after Holocene activation:
    • if eip1559Parameters in the PayloadAttributesV3 is null, the attributes are to be considered invalid by the engine.
    • if parent_header.nonce is zero, the canyon base fee parameter constants are used for the block's base fee parameters.
    • if parent_header.nonce is non-zero, the EIP-1559 parameters encoded within the parent header's nonce field are used for the block's base fee parameters.

Rationale

This type is made available in the payload attributes to allow the block builder to dynamically control the EIP-1559 parameters of the chain. As described in the derivation - AttributesBuilder section, the derivation pipeline must populate this field from the SystemConfig during payload building, similar to how it must reference the SystemConfig for the gasLimit field.

eip1559Params in Header

Upon Holocene activation, the L2 block header's nonce field will consist of the 8-byte eip1559Params value from the PayloadAttributesV3, or the canyon EIP-1559 constants if eip1559Params is equal to zero.

Header Validity Rules

Prior to Holocene activation, the L2 block header's nonce field is valid iff it is equal to u64(0).

At and after Holocene activation, The L2 block header's nonce field is valid iff it is non-zero.

Encoding

The encoding of the eip1559Params value is described in eip1559Params encoding.

Rationale

By chosing to put the eip1559Params in the PayloadAttributes rather than in the L1 block info transaction, the EIP-1559 parameters for the chain are not available within history. This would place a burden on performing historical execution, as L1 would have to be consulted for fetching the values from the SystemConfig contract. Instead, we re-use an unused field in the L1 block header as to make these parameters available, retaining the purity of the function that computes the next block's base fee from the chain configuration, parent block header, and next block timestamp.