You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
$ bin/bite-keeper --eth-from <eth addr> --tub-address 0x448a5065aebb8e423f0896e6c5d525c040f59af3 --rpc-host https://mainnet.infura.io/v3/<Infura public API key> --rpc-port 443 --debug
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f6879667e80>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //mainnet.infura.io/v3/<Infura public API key>:443 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6879667e80>: Failed to establish a new connection: [Errno -2] Name or service not known'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 73, in <module>
BiteKeeper(sys.argv[1:]).main()
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 48, in __init__
self.tub = Tub(web3=self.web3, address=Address(self.arguments.tub_address))
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/sai.py", line 82, in __init__
self._contract = self._get_contract(web3, self.abi, address)
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/__init__.py", line 157, in _get_contract
if not is_contract_at(web3, address):
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/util.py", line 62, in is_contract_at
code = web3.eth.getCode(address.address)
File "/usr/local/lib/python3.7/dist-packages/web3/eth.py", line 198, in getCode
[account, block_identifier],
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 149, in request_blocking
response = self._make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 128, in _make_request
return request_func(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/gas_price_strategy.py", line 34, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/attrdict.py", line 33, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/normalize_errors.py", line 25, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/exception_retry_request.py", line 104, in middleware
return make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/providers/rpc.py", line 83, in make_request
**self.get_request_kwargs()
File "/usr/local/lib/python3.7/dist-packages/web3/_utils/request.py", line 34, in make_post_request
response = session.post(endpoint_uri, data=data, *args, **kwargs) # type: ignore
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //mainnet.infura.io/v3/<Infura public API key>:443 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6879667e80>: Failed to establish a new connection: [Errno -2] Name or service not known'))
When trying the input without prepending https:// onto the value for --rpc-host:
$ bin/bite-keeper --eth-from <eth addr> --tub-address 0x448a5065aebb8e423f0896e6c5d525c040f59af3 --rpc-host mainnet.infura.io/v3/<Infura public API key> --rpc-port 443 --debug
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 73, in <module>
BiteKeeper(sys.argv[1:]).main()
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 48, in __init__
self.tub = Tub(web3=self.web3, address=Address(self.arguments.tub_address))
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/sai.py", line 82, in __init__
self._contract = self._get_contract(web3, self.abi, address)
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/__init__.py", line 157, in _get_contract
if not is_contract_at(web3, address):
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/util.py", line 62, in is_contract_at
code = web3.eth.getCode(address.address)
File "/usr/local/lib/python3.7/dist-packages/web3/eth.py", line 198, in getCode
[account, block_identifier],
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 149, in request_blocking
response = self._make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 128, in _make_request
return request_func(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/gas_price_strategy.py", line 34, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/attrdict.py", line 33, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/normalize_errors.py", line 25, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/exception_retry_request.py", line 104, in middleware
return make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/providers/rpc.py", line 83, in make_request
**self.get_request_kwargs()
File "/usr/local/lib/python3.7/dist-packages/web3/_utils/request.py", line 35, in make_post_request
response.raise_for_status()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://mainnet.infura.io/v3/<Infura public API key>:443
After modifying the code to remove the https:// prefix I had previously added, the same input produces:
$ bin/bite-keeper --eth-from <eth addr> --tub-address 0x448a5065aebb8e423f0896e6c5d525c040f59af3 --rpc-host https://mainnet.infura.io/v3/<Infura public API key> --rpc-port 443 --debug
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 73, in <module>
BiteKeeper(sys.argv[1:]).main()
File "/home/jmcph4/bite-keeper/bite_keeper/bite_keeper.py", line 48, in __init__
self.tub = Tub(web3=self.web3, address=Address(self.arguments.tub_address))
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/sai.py", line 82, in __init__
self._contract = self._get_contract(web3, self.abi, address)
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/__init__.py", line 157, in _get_contract
if not is_contract_at(web3, address):
File "/home/jmcph4/bite-keeper/lib/pymaker/pymaker/util.py", line 62, in is_contract_at
code = web3.eth.getCode(address.address)
File "/usr/local/lib/python3.7/dist-packages/web3/eth.py", line 198, in getCode
[account, block_identifier],
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 149, in request_blocking
response = self._make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/manager.py", line 128, in _make_request
return request_func(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/gas_price_strategy.py", line 34, in middleware
return make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/attrdict.py", line 33, in middleware
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/normalize_errors.py", line 25, in middleware
result = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 75, in apply_formatters
response = make_request(method, params)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/formatting.py", line 73, in apply_formatters
response = make_request(method, formatted_params)
File "/usr/local/lib/python3.7/dist-packages/web3/middleware/exception_retry_request.py", line 104, in middleware
return make_request(method, params)
File "/usr/local/lib/python3.7/dist-packages/web3/providers/rpc.py", line 83, in make_request
**self.get_request_kwargs()
File "/usr/local/lib/python3.7/dist-packages/web3/_utils/request.py", line 35, in make_post_request
response.raise_for_status()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://mainnet.infura.io/v3/<Infura public API key>:443
Expected Behaviour
For the bite-keeper client to actually authenticate with the Infura API endpoint successfully.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
bite-keeper
cannot successfully connect to my Infura instance in order to interact via JSON-RPC.To the best of my knowledge, all of the settings on my Infura endpoint are the defaults (i.e., no whitelists, etc.).
After inspecting the code in
bite_keeper/bite_keeper.py
, I modified line 44 to usehttps
as the prefix, rather than the (existing)http
prefix.That is, this line:
bite-keeper/bite_keeper/bite_keeper.py
Line 44 in 43dbac8
becomes this:
Note: Yes, I have replaced both
<eth addr>
and<Infura public API key>
fields with their correct values in all code snippets below.Version and System Information
Commit: 406bf7d
System Info: Debian 10 (Buster)
Actual Behaviour
When trying the input without prepending
https://
onto the value for--rpc-host
:After modifying the code to remove the
https://
prefix I had previously added, the same input produces:Expected Behaviour
For the
bite-keeper
client to actually authenticate with the Infura API endpoint successfully.The text was updated successfully, but these errors were encountered: