Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update L2 base fee formula #1053

Merged
merged 5 commits into from
Oct 1, 2024
Merged

feat: update L2 base fee formula #1053

merged 5 commits into from
Oct 1, 2024

Conversation

Thegaram
Copy link

@Thegaram Thegaram commented Oct 1, 2024

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:

  • feat: A new feature

3. Deployment tag versioning

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

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

omerfirmak
omerfirmak previously approved these changes Oct 1, 2024
Copy link

@omerfirmak omerfirmak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be a seperate PR for L1DataFee changes?

@Thegaram
Copy link
Author

Thegaram commented Oct 1, 2024

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.

core/tx_pool.go Outdated Show resolved Hide resolved
omerfirmak
omerfirmak previously approved these changes Oct 1, 2024
@icemelon icemelon merged commit 2ed7456 into develop Oct 1, 2024
8 checks passed
@icemelon icemelon deleted the feat-update-l2-base-fee branch October 1, 2024 20:20
0xmountaintop pushed a commit that referenced this pull request Oct 9, 2024
* feat: update L2 base fee formula

* update 1559 unit test

* use current block's base fee in txpool

* fix unit test

* Revert "use current block's base fee in txpool"

This reverts commit 8a7d7ff.
0xmountaintop added a commit that referenced this pull request Oct 9, 2024
* feat: update L2 base fee formula (#1053)

* feat: update L2 base fee formula

* update 1559 unit test

* use current block's base fee in txpool

* fix unit test

* Revert "use current block's base fee in txpool"

This reverts commit 8a7d7ff.

* update `TestCalcBaseFee`

* update `TestStateProcessorErrors`

---------

Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants