-
Notifications
You must be signed in to change notification settings - Fork 5
feat: suggest gas price based on latest block's transactions #291
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
Conversation
CodSpeed Performance ReportMerging #291 will not alter performanceComparing Summary
|
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.
I will leave review of the logic to @jonastheis and @greged93 who have better gas oracle related context. However, I wonder if we can avoid making changes to crates/rpc/rpc-eth-types/src/gas_oracle.rs
and instead exclusively use overrides in crates/scroll/*
code? Our objective is to minimise our fork diff with upstream.
Yes, that's a good one. I tried to keep |
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.
couple of comments but looks good!
It looks a little tricky yes, upstream would need to abstract the |
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.
noticed some default values that I think need to be updated.
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.
Couple of small comments and questions, I think we can merge after this!
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.
lgtm!
This PR focus on implementing a simplified version of the GPO without needing to look at the tx pool, however look at the status of latest block. Suggest gas price base on if the latest block is at capacity. this will help to:
Two JSON_RPC methods are effected.
eth_gasPrice
, if the latest block is not at capacity, this will return a minimal suggest gas price.eth_feeHistory
, if the latest block is not at capacity, the reward field of return will be the minimal suggest gas price.