Overview
TheSystemConfig is updated to allow for dynamic EIP-1559 parameters.
ConfigUpdate
When the configuration is updated, a ConfigUpdate event
MUST be emitted with the following parameters:
version | updateType | data | Usage |
|---|---|---|---|
uint256(0) | uint8(4) | abi.encode((uint256(_denominator) << 32) | _elasticity) | Modifies the EIP-1559 denominator and elasticity |
Initialization
The following actions should happen during the initialization of theSystemConfig:
emit ConfigUpdate.BATCHERemit ConfigUpdate.FEE_SCALARSemit ConfigUpdate.GAS_LIMITemit ConfigUpdate.UNSAFE_BLOCK_SIGNER
emit ConfigUpdate.EIP_1559_PARAMS.
As long as these values are unset, the default values will be used.
Requiring 1559 parameters to be set during initialization would add a strict requirement
that the L2 hardforks before the L1 contracts are upgraded, and this is complicated to manage in a
world of many chains.
Modifying EIP-1559 Parameters
A newSystemConfig UpdateType is introduced that enables the modification of
EIP-1559 parameters. This allows for the chain
operator to modify the BASE_FEE_MAX_CHANGE_DENOMINATOR and the ELASTICITY_MULTIPLIER.
Interface
EIP-1559 Params
setEIP1559Params
This function MUST only be callable by the chain governor.
_denominator and _elasticity MUST be set to values greater to than 0.
It is possible for the chain operator to set EIP-1559 parameters that result in poor user experience.