Off chain
op-geth uses a static elasticity multiplier set in the chain config. See here and here.
This value is currently hardcoded to 6.
On chain
We also store an elasticityMultiplier inside the ResourceConfig struct:
|
/// value. |
|
struct ResourceConfig { |
|
uint32 maxResourceLimit; |
|
uint8 elasticityMultiplier; |
|
uint8 baseFeeMaxChangeDenominator; |
in the SytemConfig contract:
|
|
|
/// @notice The configuration for the deposit fee market. |
|
/// Used by the OptimismPortal to meter the cost of buying L2 gas on L1. |
|
/// Set as internal with a getter so that the struct is returned instead of a tuple. |
|
ResourceMetering.ResourceConfig internal _resourceConfig; |
On OP Mainnet, the parameter is actually set to 10. See this etherscan link.. I believe this is a historical / out-of-date value.
Moreover, we are actually reading and validating this parameter in the superchain registry (see here), since we have specified that 10 is the standard value.
From what I can tell this parameter is not being read by the off-chain software. Here's a hint that this was once the plan:
|
/// @notice An internal setter for the resource config. |
|
/// Ensures that the config is sane before storing it by checking for invariants. |
|
/// In the future, this method may emit an event that the `op-node` picks up |
|
/// for when the resource config is changed. |
|
/// @param _config The new resource config. |
|
function _setResourceConfig(ResourceMetering.ResourceConfig memory _config) internal { |
I propose that we should either:
- Complete that plan so that the elasticity parameter can be changed on chain and picked up off chain
- Remove the on chain parameter in the next contracts release to prevent confusion.
Off chain
op-geth uses a static elasticity multiplier set in the chain config. See here and here.
This value is currently hardcoded to
6.On chain
We also store an
elasticityMultiplierinside theResourceConfigstruct:optimism/packages/contracts-bedrock/src/L1/ResourceMetering.sol
Lines 45 to 49 in d510910
in the
SytemConfigcontract:optimism/packages/contracts-bedrock/src/L1/SystemConfig.sol
Lines 114 to 118 in d510910
On OP Mainnet, the parameter is actually set to 10. See this etherscan link.. I believe this is a historical / out-of-date value.
Moreover, we are actually reading and validating this parameter in the superchain registry (see here), since we have specified that
10is the standard value.From what I can tell this parameter is not being read by the off-chain software. Here's a hint that this was once the plan:
optimism/packages/contracts-bedrock/src/L1/SystemConfig.sol
Lines 439 to 444 in d510910
I propose that we should either: