scroll-tech / go-ethereum

Scroll's fork of the official Go implementation of the Ethereum protocol
GNU Lesser General Public License v3.0
493 stars 276 forks source link

feat: update L2 base fee formula #1053

Closed Thegaram closed 1 month ago

Thegaram commented 1 month ago

1. Purpose or design rationale of this PR

Update L2 base fee according to new cost estimates.

One nuance is that geth's codebase uses misc.CalcBaseFee in a few places to predict the next block's base fee. In our case this does not work. For example, after deploying this change on the sequencer, CalcBaseFee will diverge on the sequencer and follower nodes (until they upgrade to a new release). Cases where we use misc.CalcBaseFee:

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

3. Deployment tag versioning

Has the version in params/version.go been updated?

4. Breaking change label

Does this PR have the breaking-change label?

Thegaram commented 1 month ago

Will there be a seperate PR for L1DataFee changes?

Those coefficients need to be updated in the L1GasOracle contract, they are not hard-coded in l2geth.