ethereum-optimism / specs

OP Stack Specifications
https://specs.optimism.io
Creative Commons Zero v1.0 Universal
82 stars 75 forks source link

Holocene: Make Elasticity configurable via SystemConfig #340

Open roberto-bayardo opened 4 weeks ago

roberto-bayardo commented 4 weeks ago

In EIP-1559, the gas target of a block is (gas limit / elasticity). And since elasticity is a fixed constant of 6 as of the Fjord upgrade, one cannot adjust the gas target without increasing the gas limit. This has led Base to implement a hack whereby a different limit (a "soft" gas limit) is enforced by the sequencer during block building in order to allow us to increase the gas target without also increasing the (effective) limit. This unfortunately breaks things like priority fee suggestion, and is also simply unintuitive to users who see a gaslimit in the SystemConfig contract that isn't the one actually being enforced.

I would like to propose we make Elasticity configurable via the SystemConfig L1 contract, just as the Gas Limit is configurable, allowing gas target and gas limit to be independently configured.

From @tynes: We might also consider adding the denominator to be dynamic as well. When the basefee rises super quickly when the target is exceeded, it creates this permanent pegging to the target throughput. It also This is a complex system and not sure what the best params ought to be for a high throughput chain. My guess is that the "ideal" params differ at different gas throughputs or usage patterns.

The proposal to improve l1 attribute handling by separating out static values should be a prerequisite for this work: https://github.com/ethereum-optimism/specs/issues/122

tynes commented 2 weeks ago

Per https://github.com/ethereum-optimism/specs/issues/122#issuecomment-2308584680, this makes a lot of sense to implement as a ConfigType