Skip to content

gas-oracle: allow configurable base fee poll interval#2358

Merged
tynes merged 1 commit intodevelopfrom
feat/gpo-configurable-base-fee-poll-interval
Mar 23, 2022
Merged

gas-oracle: allow configurable base fee poll interval#2358
tynes merged 1 commit intodevelopfrom
feat/gpo-configurable-base-fee-poll-interval

Conversation

@tynes
Copy link
Copy Markdown
Contributor

@tynes tynes commented Mar 23, 2022

Description

This commit adds a new config option that can be
configured via argv with --l1-base-fee-epoch-length-seconds
or an env var GAS_PRICE_ORACLE_L1_BASE_FEE_EPOCH_LENGTH_SECONDS.
It defaults to 15 seconds. Ideally the implementation uses a
duration flag instead of a uint64 flag, but that would be a
breaking change for the config and this service will be
deprecated in the future with the release of bedrock.

By setting this value to a larger number, we are able to update
the L1 base fee that is held in the L2 state less often.
This will save the sequencer money, because it needs to
front the costs of submitting these transactions.

This commit adds a new config option that can be
configured via argv with `--l1-base-fee-epoch-length-seconds`
or an env var `GAS_PRICE_ORACLE_L1_BASE_FEE_EPOCH_LENGTH_SECONDS`.
It defaults to 15 seconds. Ideally the implementation uses a
duration flag instead of a uint64 flag, but that would be a
breaking change for the config and this service will be
deprecated in the future with the release of bedrock.

By setting this value to a larger number, we are able to update
the L1 base fee that is held in the L2 state less often.
This will save the sequencer money, because it needs to
front the costs of submitting these transactions.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 23, 2022

🦋 Changeset detected

Latest commit: c535b3a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/gas-oracle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@smartcontracts smartcontracts left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Copy Markdown
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

LGTM

Usage: "length of epochs in seconds",
EnvVar: "GAS_PRICE_ORACLE_EPOCH_LENGTH_SECONDS",
}
L1BaseFeeEpochLengthSecondsFlag = cli.Uint64Flag{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But what do you mean it'll be a breaking change to make this a duration? It's a new env flag so there shouldn't be any users to break.

Copy link
Copy Markdown
Contributor Author

@tynes tynes Mar 23, 2022

Choose a reason for hiding this comment

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

Ah sorry to clarify the flag directly above it is not a duration flag so i didn't make this one a duration flag, since they are similar config options

@tynes tynes merged commit edbf338 into develop Mar 23, 2022
@tynes tynes deleted the feat/gpo-configurable-base-fee-poll-interval branch March 23, 2022 23:13
theochap pushed a commit that referenced this pull request Dec 10, 2025
`op-node` spec is being updated and we need to stick to the versioned
release to make sure to avoid compatibility issues in future.
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