2

I'm using a parity dev node via docker with the following set-up:

docker run -d -p 8545:8545 parity/parity --config dev --jsonrpc-interface all --jsonrpc-apis all --jsonrpc-cors "*"

When I attempt to retrieve balances or create user accounts, it works well. However, when I attempt to send transactions, there is a ReadTimeout exception:

    w3.eth.sendTransaction({'to': w3.eth.accounts[1], 'from': w3.eth.coinbase, 'value': 3 * 10**9})
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/eth.py", line 268, in sendTransaction
    [transaction],
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/manager.py", line 107, in request_blocking
    response = self._make_request(method, params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/manager.py", line 90, in _make_request
    return request_func(method, params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/gas_price_strategy.py", line 18, in middleware
    return make_request(method, params)
  File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
    response = make_request(method, formatted_params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/attrdict.py", line 18, in middleware
    response = make_request(method, params)
  File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
    response = make_request(method, formatted_params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/normalize_errors.py", line 9, in middleware
    result = make_request(method, params)
  File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
    response = make_request(method, formatted_params)
  File "cytoolz/functoolz.pyx", line 232, in cytoolz.functoolz.curry.__call__
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/formatting.py", line 48, in apply_formatters
    response = make_request(method, formatted_params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/middleware/exception_retry_request.py", line 87, in middleware
    return make_request(method, params)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/providers/rpc.py", line 68, in make_request
    **self.get_request_kwargs()
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/web3/utils/request.py", line 26, in make_post_request
    response = session.post(endpoint_uri, data=data, *args, **kwargs)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 555, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/requests/adapters.py", line 521, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=8111): Read timed out. (read timeout=10)

I have tested the same web3.py code to work well with both ganache or geth --dev.

UPDATE: web3.js hangs with a similar request

var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
var BN = web3.utils.BN;

web3.eth.getAccounts(async (err, acc) => {
    let startingBalance = web3.utils.toBN(await web3.eth.getBalance(acc[0]))
    console.log(startingBalance.toString());
    let result = await web3.eth.sendTransaction({
        from: acc[0],
        to: acc[1],
        value: 1000000
    })
    console.log(result);
});
1

The parity node is hanging in this instance, because the underlying account has not been unlocked.

  • Wow, that sounds broken. I would expect it to return with an error. – carver Jul 12 '18 at 21:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.