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: optimize l1 gas price calculation after snow hardfork #169

Merged
merged 13 commits into from
Mar 26, 2024

Conversation

redhdx
Copy link
Contributor

@redhdx redhdx commented Mar 20, 2024

Description

Optimize l1 gas price calculation.

Rationale

The current L1 gas price is a fixed value. This value can't truly reflect the L1 gas price and needs to be adjusted. The median gas price of the latest 21 blocks(21 validators in bsc) is calculated.

Example

n/a

Changes

Notable changes:

  • Add new Snow hard fork to change L1 gas price.
  • Rename OPBNBDevnet to OPBNBQANet and update info.
  • Optimize log description.

@redhdx redhdx requested review from owen-reorg and bnoieh March 20, 2024 09:50
@github-actions github-actions bot requested a review from welkin22 March 20, 2024 09:50
op-node/chaincfg/chains.go Outdated Show resolved Hide resolved
op-node/rollup/derive/attributes.go Outdated Show resolved Hide resolved
op-node/rollup/types.go Outdated Show resolved Hide resolved
op-node/rollup/types.go Outdated Show resolved Hide resolved
op-node/rollup/types.go Show resolved Hide resolved
op-node/rollup/derive/attributes.go Outdated Show resolved Hide resolved
op-node/rollup/derive/attributes.go Outdated Show resolved Hide resolved
op-node/rollup/derive/attributes.go Outdated Show resolved Hide resolved
op-service/bsc/compat.go Show resolved Hide resolved
@bnoieh
Copy link
Contributor

bnoieh commented Mar 25, 2024

@realknown
Copy link

please change the title to make it more meaningful.

@owen-reorg owen-reorg changed the title Feature/snow hardfork feat: optimize l1 gas price calculation Mar 26, 2024
@redhdx
Copy link
Contributor Author

redhdx commented Mar 26, 2024

plz add snow fork to: https://github.com/bnoieh/opbnb/blob/6b6d0f05c78a6e6fc28ae94b65f3ce536f639d0f/op-chain-ops/genesis/config.go#L738

Simplify the basefee when constructing the genesis block and ignore the Snow fork logic just in genesis.

op-node/rollup/types.go Outdated Show resolved Hide resolved
op-node/rollup/types.go Outdated Show resolved Hide resolved
@redhdx redhdx changed the title feat: optimize l1 gas price calculation feat: optimize l1 gas price calculation after snow hardfork Mar 26, 2024
@owen-reorg owen-reorg merged commit 595048e into bnb-chain:develop Mar 26, 2024
9 checks passed
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.

5 participants