0

Here is some code to connect to a geth authority using web3py:

>>> from web3.auto.gethdev import w3

# confirm that the connection succeeded
>>> w3.isConnected()
True

When I run isConnected I get False. I see some chatter on the Internet about connecting to a local authority, but I don't want to run one. I'd like to connect to a service, like Infura, but I don't see docs for that.

How do I connect?

NOTE: what I'm really trying to do is get the ENS name for an address using web3py. Here is a name function for that, but when I try to run an example, I get

web3.exceptions.ExtraDataLengthError: The field extraData is 97 bytes, but should be 32. It is quite likely that you are connected to a POA chain. Refer to http://web3py.readthedocs.io/en/stable/middleware.html#geth-style-proof-of-authority for more details.

When I read that link, it wants me to use some middleware connected to an IPCProvider at a local file. I don't have a local file, I don't want a local file. So I am in deep.

Here is a question that has some code for the middleware, but it doesn't work.

EDIT: A web3.py issue about this.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.