Skip to content
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

feat(polygon): remove dependency on gas station #384

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

0xfourzerofour
Copy link
Collaborator

[Closes] #377

Proposed Changes

  • Remove gas station code and calculate fees directly from eth_feeHistory rpc api.
  • No need for ethers conversion code anymore as RPC returns in correct format without needing to multiply

@0xfourzerofour 0xfourzerofour changed the title Josh/gas fees feat(polygon): gas fees Sep 18, 2023
@0xfourzerofour 0xfourzerofour changed the title feat(polygon): gas fees feat(polygon): remove dependency on gas station Sep 18, 2023
@0xfourzerofour 0xfourzerofour linked an issue Sep 18, 2023 that may be closed by this pull request
@dancoombs
Copy link
Collaborator

This looks reasonable as a polygon fee estimation replacement. I think we should move towards this method for all of our fee estimation and be able to configure this via a CLI flag.

Maybe we get this merged to fix the polygon issue, and then file a ticket for a follow up that uses fee_history for all networks?

Copy link
Collaborator

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

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

Looks really good! A few comments inline.

crates/sim/src/gas/polygon.rs Outdated Show resolved Hide resolved
crates/sim/src/gas/polygon.rs Outdated Show resolved Hide resolved
crates/sim/src/gas/polygon.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@dancoombs dancoombs left a comment

Choose a reason for hiding this comment

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

Before we merge this, can you do a quick spot check that when you run a local node from this branch and hit staging you get similar if not equal values for rundler_maxPriorityFeePerGas

LGTM though, nice work!

@dancoombs
Copy link
Collaborator

Also, don't for get to rebase to 1 commit!

@0xfourzerofour
Copy link
Collaborator Author

@dancoombs Yeh that is how I have been testing it. Checking gas station and comparing values. There is some slight differences but I think it is due to gas station delay

@0xfourzerofour 0xfourzerofour merged commit dd0bae5 into main Sep 19, 2023
5 checks passed
@0xfourzerofour 0xfourzerofour deleted the josh/gas-fees branch September 19, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builder: Priority fee estimation
3 participants