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

l2geth: replica gas estimation fix #519

Merged
merged 5 commits into from
Apr 21, 2021
Merged

Conversation

tynes
Copy link
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

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