Skip to content

l2geth: replica gas estimation fix#519

Merged
tynes merged 5 commits intomasterfrom
l2geth/replica-gas-estimation
Apr 21, 2021
Merged

l2geth: replica gas estimation fix#519
tynes merged 5 commits intomasterfrom
l2geth/replica-gas-estimation

Conversation

@tynes
Copy link
Copy Markdown
Contributor

@tynes tynes commented Apr 20, 2021

Description
This PR fixes a problem with the verifier/replica where it does not keep track of the current gas price. This is bad because it would make them not usable for eth_estimateGas. For eth_estimateGas to work, the node must know the current L1 gas price.

It abstracts the update L1 gas price logic into its own function and then adds it to the verifier codepath so both the verifier and the sequencer keep track of the L1 gas price.

It builds off of:

Related:

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 20, 2021

🦋 Changeset detected

Latest commit: fc3c0a6

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/l2geth 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

@tynes tynes mentioned this pull request Apr 20, 2021
@tynes tynes force-pushed the l2geth/replica-gas-estimation branch from 4249af4 to fc3c0a6 Compare April 20, 2021 20:19
@tynes
Copy link
Copy Markdown
Contributor Author

tynes commented Apr 20, 2021

Noticing #430 on this PR

@tynes tynes added A-geth C-feature Category: features labels Apr 20, 2021
Copy link
Copy Markdown
Contributor

@snario snario left a comment

Choose a reason for hiding this comment

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

Looks good to me. In the future we'll want to figure out a better way to communicate the fee calculation algorithm to replicas, or perhaps construct a service which serves that information that replicas can call out to.

@tynes
Copy link
Copy Markdown
Contributor Author

tynes commented Apr 21, 2021

Looks good to me. In the future we'll want to figure out a better way to communicate the fee calculation algorithm to replicas, or perhaps construct a service which serves that information that replicas can call out to.

#528

@tynes tynes merged commit ef40ed7 into master Apr 21, 2021
@tynes tynes deleted the l2geth/replica-gas-estimation branch April 21, 2021 00:56
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
* l2geth: replica must also keep track of gas

* l2geth: refactor sequencer loop

* l2geth: updateL1GasPrice comment

* l2geth: explicitly test gas updating

* l2geth: add changeset
theochap pushed a commit that referenced this pull request Jan 15, 2026
### Description

Implement error on the `ProtocolVersionError` type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-feature Category: features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants