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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support EIP-1559 #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexandre-abrioux
Copy link
Contributor

@alexandre-abrioux alexandre-abrioux commented Feb 15, 2022

Description of the changes

Hi! This PR adds three strategies for gas price prediction:

  • eip-1559-urgent
  • eip-1559-fast
  • eip-1559-normal

Those three strategies correspond to three recommendations resulting from calling the suggestFees() method of the eip1559-fee-suggestions-ethers library. Under the hood this library uses the new eth_feeHistory method introduced in the ethereum/execution-apis spec after EIP-1559.

Technical details / Misc.

  • Introduced a TransactionManager class that takes care of common overrides for all transactions made by the node, except for the retire() call because this one is a little special and cannot work with EIP-1559 in its current implementation (I think).
  • Updated ethers and did a yarn update in order to have only one version of ethers in the yarn.lock file.
  • Updated the README.md, feel free to make edits!

I have been running this without any issue for the past month. I'm pretty satisfied!
Please let me know if you would like to see this feature implemented in another way or with a different architecture, I'll be glad to adapt the code. And again, thank you for this amazing project 馃檪

@@ -7,6 +7,7 @@ services:
build:
context: .
target: base
init: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(not related) This is just to make the container stop faster. Without it it looks like signals (SIGINT, etc..) are not forwarded to tail thus making docker wait for a timeout before killing the container.

@alexandre-abrioux
Copy link
Contributor Author

Update: I also added a gas price spike protection, to prevent being impacted by a huge gas price surge like what happened this morning.

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.

None yet

1 participant