-
Notifications
You must be signed in to change notification settings - Fork 996
feat(state/core_accessor): add fee estimator #4168
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
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.
Make to add @vgonkivs as a coauthor in squashed commit
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.
Please make sure the fee estimation works by running app node locally and provide its address as an estimator address.
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.
🥳
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.
LFG
this doesn't impact PFBs??
|
Continuation of #4087
Implementation of the #4048
This PR enables third-party estimation for the submit transactions in the node(besides PFB). By default, fee estimation relies on the consensus node to which the node is connected. But the user can now provide a non-default endpoint, so the node will query gas price and gas from it. It can be provided via cli(using "core.estimator.address"). The address will be added to the node's config as
FeeEstimatorAddress
.Additionally, the user can now provide a
maxGasPrice
for every submit tx(viamax.gas.price
flag)- the max price that the user is willing to pay for the transaction. The transaction will not be submitted in case when estimated gas price exceeds themaxGasPrice
(default:minGasPrice * 100
)