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-service/txmgr: Add threshold to gas price increase limiter #8699

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

sebastianst
Copy link
Member

@sebastianst sebastianst commented Dec 20, 2023

Description

Adds a new configuration parameter fee-limit-threshold that sets a lower threshold below which the multiplier limiting set by fee-limit-multiplier is not applied.

The default is set to 100 Gwei, which should be a sane default on mainnet. On testnets, the threshold can probably be set higher.

Tests

Extended the multiplier limit tests to tests both cases, with and without a threshold.

Additional context

This allows for arbitrary fee bumps below a threshold, which is particularly useful on testnets where very-low fee conditions might quickly lead to a situation where the mutliplier limit is unnecessarily applied.

We're recently seeing Goerli safe head halts because of the limit multiplier being applied during either very low fee conditions, or during basefee hikes.

@sebastianst sebastianst requested a review from a team as a code owner December 20, 2023 10:21
@sebastianst sebastianst requested a review from ajsutton December 20, 2023 10:21
Copy link
Contributor

coderabbitai bot commented Dec 20, 2023

Walkthrough

Walkthrough

The update introduces a new configuration parameter to manage gas fee limits more flexibly in Ethereum transaction management. It refactors gas price adjustment logic and adds a threshold to bypass certain limits for fees below a specified amount. The changes are spread across CLI configurations and the transaction manager's logic, including new tests to verify the functionality.

Changes

File Path Change Summary
.../txmgr/cli.go Added FeeLimitThresholdFlagName and related logic; updated structs to include new fee limit fields.
.../txmgr/txmgr.go Refactored gas price limit checks; added checkLimits method; introduced conditional fee threshold.
.../txmgr/txmgr_test.go Updated tests; added new tests for gas price limit logic; imported new package; modified test setup.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@sebastianst sebastianst force-pushed the seb/txmgr-threshold-limit branch from 188c21f to 3773c53 Compare December 20, 2023 10:56
@sebastianst sebastianst force-pushed the seb/txmgr-threshold-limit branch 2 times, most recently from 89b16aa to 5201a00 Compare December 20, 2023 13:22
@sebastianst sebastianst force-pushed the seb/txmgr-threshold-limit branch from 5201a00 to b5232ac Compare December 20, 2023 13:36
@sebastianst sebastianst added this pull request to the merge queue Dec 20, 2023
Merged via the queue into develop with commit 79e62bf Dec 20, 2023
61 checks passed
@sebastianst sebastianst deleted the seb/txmgr-threshold-limit branch December 20, 2023 14:28
roberto-bayardo pushed a commit to roberto-bayardo/optimism that referenced this pull request Dec 21, 2023
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.

2 participants