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

Web3 Async API Tracking Issue #1413

Closed
13 of 17 tasks
kclowes opened this issue Aug 7, 2019 · 4 comments · Fixed by #2984
Closed
13 of 17 tasks

Web3 Async API Tracking Issue #1413

kclowes opened this issue Aug 7, 2019 · 4 comments · Fixed by #2984

Comments

@kclowes
Copy link
Collaborator

kclowes commented Aug 7, 2019

Copy/paste from #1161, but with checkboxes and slightly more granularity. These will likely become their own issues.

  • Replace api methods with instances of a Method class, with a middleware like layer for formatting/normalizing/validating method input/output.

  • Reduce middlewares to only those that make calls to the web3 api, moving the formatting middlewares to the Method input/output formatters.

  • Separate async and sync execution pathway through RequestManagers -> middlewares -> providers.

    • Async Providers:
      • HTTPProvider
      • IPCProvider
      • WebsocketProvider
    • Async Versions of each Module
      • Eth,
      • Net
      • Version
      • Parity Personal
      • Parity Shh
      • Geth Admin
      • Geth Miner
      • Geth Personal
      • Geth Shh
      • Geth Tx Pool
      • Testing
@dbfreem
Copy link
Contributor

dbfreem commented Dec 20, 2021

@kclowes I was thinking about taking on one of these Async additions if it didn't turn into a mountain of work. I had one question.

On the Geth one above I see there is Admin, Miner, Personal, Shh, TxPool. I looked at the docs on how these methods are used. When I try to run inspect or status (see below code) in TxPool module I get the method txpool_inspect does not exist/is not available'. At first glance it looks like this is because only the Personal and Admin modules are wired up in geth.py.

Is the documentation wrong here or am I missing something

from web3 import HTTPProvider, Web3

web3 = Web3(HTTPProvider("http://127.0.0.1:8545"))
web3.isConnected()
print(web3.geth.txpool.inspect())

@kclowes
Copy link
Collaborator Author

kclowes commented Dec 20, 2021

@dbfreem that error message is coming back from your node. You’ll need to be attached to a local Geth node to have access to those methods. Sometimes you also need a flag on startup to have access to those modules on the Geth side. Running ‘geth —help’ should show the commands you need. It don’t remember the exact command off the top of my head but it’s something like ‘—http.api=personal’

@rencryptofish
Copy link

are all of the above outstanding tasks?

@dbfreem
Copy link
Contributor

dbfreem commented Jan 20, 2022

I was looking at asyncing parity but noticed there are no test for it. What is the strategy for async on parity code?

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 a pull request may close this issue.

5 participants
@fselmo @kclowes @dbfreem @rencryptofish and others