-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Deprecate Geth miner namespace #2857
Conversation
I'm wondering why the tests in |
Thank you!
The core tests run with the I'm hoping I'll be able to review this later in the week! |
dd72dd6
to
67425f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit about the newsfragment filename, otherwise lgtm! @kclowes do you have any feedback here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviving this PR, @reedsa!
@e3243eric I made a comment around the messaging in the DeprecatedMethod
class, let me know what you think. I'm happy to make that update if you don't want/have time to, just let me know!
Thanks for taking it on!
- Refactor middlewares as classes with request processors and response processors - Apply this refactor to some existing middlewares and test - gas_price_strategy_middleware - validation / formatting middleware - attrdict_middleware - (incomplete) ens_name_to_address_middleware - Refactor the exception_retry_middleware to be a configuration on the http providers
- Remove all caching middleware. - Refactor request caching via configurations on the provider classes and decorators on their respective ``make_request()`` methods.
- This middleware depends on a request always being made when middleware are processed. This isn't how the middleware is processed for websockets and the separation of middleware into request param processing and response processing further helps with being able to support batch requests. Remove all middleware that were dependent on a request always being sandwiched between request processing and response processing.
- Add a ``RequestMocker`` class with ``request_mocker`` pytest fixture to fascilitate request mocking now that the middleware doesn't sequester the ``make_request()`` call. Since we can't swap the ``make_request()`` on the fly, mock results and errors using this test utility class. - Linting - Some cleanup along the way
- In the middleware refactor, we weren't accounting for manipulating the ``method``, only the params. Allow for this kind of manipulation as it is necessary for ``sign_and_send_raw_middleware``, for example.
…leware class - Use a repr() for the middleware onion name when a non-hashable, such as the curried `build` method on a web3middlewarebuilder is used.
- Add support back for ``local_filter_middleware`` by overriding the ``_wrap_make_request()`` of the base middleware class. If this method is overridden, the ``make_request`` can be effectively replaced if a request is not needed.
- closes ethereum#2995 - ``ens_name_to_address_middleware`` would return the ``bytes`` address, rather than checksummed address. Since this happens after the ``request_formatters`` have been applied, this would override the results from the ``ABI_REQUEST_FORMATTERS`` which take ``address`` types and format them to a checksummed hex address.
…ware - Use request_mocker where we can - result_processors take care of the formatting... this was causing the ``None`` value for logsBloom to raise when mocked
- The middleware changed names in the refactor, but this commit puts the finishing touches and closes ethereum#899
- Make request caching more robust by re-introducing the lock from the middleware as well as checking for "error" and None responses and not caching those. - Re-introduce the tests for the simple_cache_middleware as caching utils tests. [Unrelated] - Keep the decorator logic on ``make_request`` when using the ``request_mocker`` fixture so we can still utilized the request mocker for testing cached requests.
- Add formatters for "blobGasUsed", "excessBlobGas", and "parentBeaconBlockRoot" - Add fields to block api tests
- State overrid is used in more requests than just ``eth_call``. We should use a more generic name that suits this type more. ``StateOverride`` seems the most appropriate here.
….blockNumber` (ethereum#3228) * Sort events by logIndex * Test for contract event logs to ensure sort order * Add doc for get_logs sort order * Update sort by block number and log index * newsfragment for ethereum#3228
* Rename fixture file, updates to circle config * Add newsfragment
a275217
to
915bcc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! - but should be to v6, removed for v7, yes?
Yep, along with #3236, this should close it all out |
Rebased this against |
* Deprecate Geth miner namespace * `DeprecatedMethod` class takes `msg` kwarg for custom warnings * Remove warn check from geth fixture generation script * Refactor DeprecatedMethod.__get__ warning * Newsfragment for #2857 --------- Co-authored-by: e3243eric <[email protected]>
What was wrong?
Closes #2856
Geth removed support for their miner API.
How was it fixed?
Change
GethMiner
methods toDeprecatedMethod
.Todo:
Cute Animal Picture