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

EIP-1559 support #230

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

EIP-1559 support #230

wants to merge 17 commits into from

Conversation

EdNoepel
Copy link
Contributor

@EdNoepel EdNoepel commented Aug 22, 2021

Changes

  • Updated to Web3 5.23 which changed some return types from dict to AttributeDict.
  • Added support for EIP-1559 "type 2" transactions. GasPrice has been renamed GasStrategy to better represent it's purpose and disambiguate the old gasPrice parameter used for type 0 "legacy" transactions. This is a breaking change to Transact consumers, because transaction arguments have changed. Gas strategies should now implement get_gas_fees to supply type 2 transaction parameters. GeometricGasPrice has been updated to do so. Users may return None to force type 0 transactions, and vice-versa. When get_gas_price and get_gas_fees are both implemented, Transact will default to type 2 transactions on nodes (chains) where it is supported.
  • get_pending_transactions function and PendingTransact class have been moved out of the base library, as post- EIP-1559 nodes no longer hold transactions with underpriced gas in their local mempools. These facilities are available in manual_test_mempool.py for experimentation purposes.

Explicitly out of scope for this PR

  • Updating the existing Parity testchain to a node which supports type 2 transactions.
  • Implementing a new mechanism to unstick transaction queues.
  • Removal of parity_nextNonce calls, pending the demise of OpenEthereum.

@dizzy dizzy requested a review from Exef August 23, 2021 18:01
assert isinstance(gas_price, int) or gas_price is None
assert isinstance(max_fee, int) or max_fee is None
assert isinstance(tip, int) or tip is None
assert gas_price or (max_fee and tip)
Copy link

Choose a reason for hiding this comment

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

Is it a good idea to check exclusive or between types of transactions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea with this line is that the user doesn't need to speciffy a type 0 gas_price if they populate type 2 fields. On the right of the or we're confirming that if they do specify type 2 fields, they must specify both. This isn't required for EIP-1559, but it is (erroneously) required for web3, which raises an error if both aren't specified.

pymaker/gas.py Outdated Show resolved Hide resolved
@jurekovac
Copy link

Any plans to include this in master? Why is blocking it?

@EdNoepel
Copy link
Contributor Author

EdNoepel commented Jan 13, 2022

Any plans to include this in master? Why is blocking it?

This would be a breaking change for keepers which depend on this library. I'm unsure which Core Unit is responsible for maintaining these libraries and the keepers which depend on them. Recommend joining one of Maker's weekly calls to raise the issue.

@sanbotto
Copy link

@EdNoepel given the amount of time that has passed and the changes to Ethereum we have seen during said time (mainly, post-merge), is this PR still relevant? If so, please let me know and I'll discuss this with the team at TechOps CU and come up with a way to schedule the breaking change while properly communicating with affected CUs and Community.

@EdNoepel
Copy link
Contributor Author

@EdNoepel given the amount of time that has passed and the changes to Ethereum we have seen during said time (mainly, post-merge), is this PR still relevant? If so, please let me know and I'll discuss this with the team at TechOps CU and come up with a way to schedule the breaking change while properly communicating with affected CUs and Community.

Changes from EIP-1559 remain relevant post-merge. These gas parameters remain useful in times of network congestion.
Feel free to DM me on Discord (EdNoepel | Ajna#7397) if you'd like to discuss.

@DaiFoundation-DevOps
Copy link

DaiFoundation-DevOps commented Oct 8, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ Ed Noepel
❌ dizzy


Ed Noepel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

6 participants