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

op-deployer: Custom gas price estimator #12239

Merged
merged 4 commits into from
Oct 2, 2024

Commits on Oct 2, 2024

  1. op-deployer: Custom gas price estimator

    Sepolia's fees are super high and extremely volatile right now. As a result, it became difficult for users to deploy new chains using op-deployer. The OPCM's deploy transaction buys most of the gas in the block, and the default gas price estimation logic in the transaction manager wasn't aggressive enough for the transactions to land on chain in a timely manner.
    
    This PR adds the ability to customize the transaction manager with a custom `GasPriceEstimator` function that returns the tip, base fee, and blob fee. I extracted the original logic in the transaction manager into a default estimator that will be used if one isn't specified. For op-deployer, I built a custom estimator that pads the head block's base fee by 20%, and multiplies the suggested tip by 10. After testing this, I was able to get transactions onto Sepolia reliably. The algorithm is pretty simple and overpays for transactions by a lot, but for op-deployer's use case it's more important that transactions land quickly than it is they be cheap. Deployments are a one-time thing.
    mslipper committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d5b1b20 View commit details
    Browse the repository at this point in the history
  2. code review updates

    mslipper committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f8d6250 View commit details
    Browse the repository at this point in the history
  3. better default support

    mslipper committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    6e3cdc3 View commit details
    Browse the repository at this point in the history
  4. specific test for extension

    mslipper committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    8b38059 View commit details
    Browse the repository at this point in the history