-
Notifications
You must be signed in to change notification settings - Fork 840
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
Make eth_gasPrice
aware of the base fee market
#7102
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fab-10
force-pushed
the
eth-gas-price-basefee-aware
branch
4 times, most recently
from
May 17, 2024 14:16
d8d1abd
to
b6bc833
Compare
macfarla
reviewed
May 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some commented out code hanging around, overall looks good
...rc/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGasPriceTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGasPriceTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
fab-10
force-pushed
the
eth-gas-price-basefee-aware
branch
from
May 20, 2024 12:21
1e49136
to
3145d91
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
approved these changes
May 22, 2024
jflo
pushed a commit
to jflo/besu
that referenced
this pull request
May 28, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Justin Florentine <justin+github@florentine.us>
8 tasks
jflo
pushed a commit
to jflo/besu
that referenced
this pull request
Jun 10, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: Justin Florentine <justin+github@florentine.us>
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
The
eth_gasPrice
is not taking in account the base fee market values, when the network supports them, so it is possible that it returns values that are not good for pricing a tx for inclusion in the next block.Specifically the calculation of gas price lower bound only rely on the runtime value of
minGasPrice
, but on base fee market networks, it could be thatbaseFee
for the next block is higher than theminGasPrice
, for example for devnets using the default, theminGasPrice=1kwei
and the genesis setsbaseFee=1gwei
and the result is that senders thinks the can just price the gas at 1kwei to the the tx included, which is not the case.This PR takes in consideration the baseFee value when calculating the lower bound, along with the fix I did some refactoring to move the gas price calculation into
BlockchainQueries
and continue to directly useMiningParameters
to get the gas market info.Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests