Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
### What was wrong?
Currently, web3.py just uses the `eth_gasPrice` JSON-RPC API to determine the gas price to use for transactions. Most nodes do not currently implement very good algorithms for determining gas prices.
### How can it be fixed?
Lets implement a new API for determining gas prices.
* Add a new API: `Web3.set_gas_price_engine(engine)`
* Add new API: `Web3.get_gas_price(transaction_params)` which delegates to whatever *engine* is set.
An `engine` must be a callable with the function signature:
* `w3` will be the `Web3` instance
* `transaction_params` will be a dictionary of the transaction params being sent.
The callable **must** return a positive integer which represents the `gas_price` in the *wei* denomination.
The **default** engine that a web3 instance should use is one that simply returns `web3.eth.gasPrice`
Documentation should be added covering the following topics.
* Overview of the `Web3.set_gas_price_engine()` API (maybe in `docs/overview.rst`)
* Writing your own gas price engine (maybe in new document `docs/gas_pricing_engine.rst` or `docs/web3.main.rst`)
* List of available engines, where to import them and how to use them.