-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
eth/gasprice: lighter gas price oracle for light client #20409
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
rjl493456442
requested review from
holiman,
karalabe and
zsfelfoldi
as code owners
November 29, 2019 06:41
rjl493456442
force-pushed
the
gasprice-oracle
branch
from
November 29, 2019 06:48
16194f2
to
551e58b
Compare
rjl493456442
changed the title
cmd, eth, les: ligher gas price oracle for light client
cmd, eth, les: lighter gas price oracle for light client
Dec 3, 2019
zsfelfoldi
requested changes
Apr 18, 2020
rjl493456442
force-pushed
the
gasprice-oracle
branch
2 times, most recently
from
April 19, 2020 05:46
e86000e
to
de1b636
Compare
@zsfelfoldi Has addressed your comments, please check again |
zsfelfoldi
requested changes
Apr 22, 2020
@zsfelfoldi I fixed the issue, please take another look :) |
zsfelfoldi
approved these changes
Apr 22, 2020
rjl493456442
force-pushed
the
gasprice-oracle
branch
from
July 1, 2020 08:46
9d8a708
to
9715313
Compare
@fjl The PR is rebased. Please check it again. |
rjl493456442
force-pushed
the
gasprice-oracle
branch
from
July 2, 2020 11:31
19cf8af
to
4bbed12
Compare
19 tasks
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jun 20, 2024
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.
This PR is mainly for reducing the cost for light client to generate a recommended gas price.
The current mechanism for suggesting price is:
It works perfectly for full node which has all blocks locally. However it's super expensive for light client.
For light client, it needs to retrieve block bodies from the network. Bodies are super heavy, so it's just too expensive.
The PR changes the default options for light client. So that now light client only retrieves 2 latest blocks.
But in order to collect more sample transactions, the 3 lowest prices are collected from each block.
Besides, this PR also changes the behavior for empty blocks. If the block is empty, we reuse the lastest price for sampling