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

Implement the geth's CalcBaseFee formula #60

Open
Tracked by #92
georgehao opened this issue Dec 3, 2024 · 0 comments
Open
Tracked by #92

Implement the geth's CalcBaseFee formula #60

georgehao opened this issue Dec 3, 2024 · 0 comments
Milestone

Comments

@georgehao
Copy link
Member

Describe the feature

geth implement the L2 gas fee like this, how to implement it on reth?

it's fine to implement this on ScrollChainSpec but I wonder if instead we should introduce a new variant in BaseFeeParamsKind which allows for dynamic calculation of the base fee as is required for scroll.

/// A wrapper around [`BaseFeeParams`] that allows for specifying constant or dynamic EIP-1559
/// parameters based on the active [Hardfork].
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum BaseFeeParamsKind {
    /// Constant [`BaseFeeParams`]; used for chains that don't have dynamic EIP-1559 parameters
    Constant(BaseFeeParams),
    /// Variable [`BaseFeeParams`]; used for chains that have dynamic EIP-1559 parameters like
    /// Optimism
    Variable(ForkBaseFeeParams),
}

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants