-
Notifications
You must be signed in to change notification settings - Fork 265
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
Reactive gas price oracle #314
Reactive gas price oracle #314
Conversation
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
@@ -555,6 +555,17 @@ func (pool *TxPool) Pending(enforceTips bool) (map[common.Address]types.Transact | |||
return pending, nil | |||
} | |||
|
|||
func (pool *TxPool) PendingSlice() types.Transactions { |
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.
nit: I think it'd better to rename this method to PendingTxs
func (pool *TxPool) PendingSlice() types.Transactions { | |
func (pool *TxPool) PendingTxs() types.Transactions { |
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.
Oh it's just because there's already a method called Pending
which returns a map, I wanted to emphasise the difference between them
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.
go test ./gossip
failed:
*dummyTxPool does not implement TxPool (missing PendingSlice method)
I suggest to increase test coverage of |
37ec55a
to
54a672f
Compare
@cyberbono3 added tests in e4ddb6d |
👌 great work |
rework gasprice oracle to rely on two parts:
certainty
(higher certainty -> smaller G).Certainty
is a percentile of eth_feeHistoryFinal gasprice estimation is a maximum of these 2 parts
Previously gasPrice estimation was based only on constructive part. This PR adjusts weights for the constructive part and improves calculation of accumulated gas power of validators
Note: like before, meeting the constructive part is not optional but mandatory, it serves as a soft minGasPrice/baseFee limit. This PR adds ftm_effectiveBaseFee API call for retrieving current soft limit for gas price