pymaker icon indicating copy to clipboard operation
pymaker copied to clipboard

EIP-1559 support

Open EdNoepel opened this issue 3 years ago • 5 comments

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.

EdNoepel avatar Aug 22 '21 20:08 EdNoepel

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

jurekovac avatar Jan 13 '22 07:01 jurekovac

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.

EdNoepel avatar Jan 13 '22 14:01 EdNoepel

@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.

sanbotto avatar Nov 29 '22 00:11 sanbotto

@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.

EdNoepel avatar Nov 29 '22 21:11 EdNoepel