Skip to content

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

Merged
merged 10 commits into from
Mar 19, 2025
Merged

feat(state/core_accessor): add fee estimator #4168

merged 10 commits into from
Mar 19, 2025

Conversation

cristaloleg
Copy link
Contributor

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(via max.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 the maxGasPrice (default: minGasPrice * 100)

@cristaloleg cristaloleg added area:state Related to fetching state and state execution kind:feat Attached to feature PRs labels Mar 12, 2025
@cristaloleg cristaloleg self-assigned this Mar 12, 2025
@cristaloleg cristaloleg changed the title Fee estimator feat(state/core_accessor): add fee estimator Mar 12, 2025
renaynay
renaynay previously approved these changes Mar 12, 2025
renaynay
renaynay previously approved these changes Mar 13, 2025
Wondertan
Wondertan previously approved these changes Mar 13, 2025
Copy link
Member

@Wondertan Wondertan left a 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

@cristaloleg cristaloleg dismissed stale reviews from Wondertan and renaynay via 1b3da73 March 19, 2025 09:41
Copy link
Member

@vgonkivs vgonkivs left a 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.

Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFG

@renaynay renaynay merged commit 20ee113 into main Mar 19, 2025
49 of 53 checks passed
@renaynay renaynay deleted the fee_estimator branch March 19, 2025 13:06
@jcstein
Copy link
Member

jcstein commented Mar 24, 2025

this doesn't impact PFBs??

This PR enables third-party estimation for the submit transactions in the node(besides PFB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:state Related to fetching state and state execution kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants