These are chat archives for ethereum/pydevp2p

23rd
Mar 2016
alitaoo
@alitaoo
Mar 23 2016 22:01
Hi, I'm testing devp2p examples and I have some problems to make test_discovery.py work. I always have "num nodes 0". Any idea why? It's a problem of boostrap?
Augusto Hack
@hackaugusto
Mar 23 2016 22:06
Hi @alitaoo could you please send a paste/gist with the output?
alitaoo
@alitaoo
Mar 23 2016 22:18
ali@ubuntu:/home/alitaoo/pydevp2p/devp2p/tests$ python test_discovery.py
this node is
2da47499d52d9161a778e4c711e22e8651cb90350ec066452f9516d1d11eb465d1ec42bb27ec6cd4488b8b6a1a411cb5ef83c16cbb8bee194624bb65fef0f7fd
remote node is <Node(24f904a8)>
START & TEST BOOTSTRAP
TEST FIND_NODE
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
num nodes 0
nodes in routing
nodes we are waiting for pongs
enode://24f904a876975ab5c7acbedc8ec26e6f7559b527c073c6e822049fee4df78f2e9c74840587355a068f2cdb36942679f7a377a6d8c5713ccf40b1d4b99046bba0@5.1.83.226:30303
I do not know if it's matter but I do have a public interface and no firewall
Augusto Hack
@hackaugusto
Mar 23 2016 22:21
My bad, I meant with debug logging enabled https://github.com/ethereum/pydevp2p/blob/master/devp2p/tests/test_discovery.py#L284
alitaoo
@alitaoo
Mar 23 2016 22:21
ha let see :)
alitaoo
@alitaoo
Mar 23 2016 22:30
DEBUG:p2p.discovery.kademlia    pinging remote=<Node(24f904a8)> local=<Node(2da47499)>
DEBUG:p2p.discovery     >>> ping remoteid=<Node(24f904a8)>
DEBUG:p2p.discovery     >>> message address=Address(5.1.83.226:30303)
DEBUG:p2p.discovery     sending to=Address(5.1.83.226:30303) size=129
CRITICAL:p2p.discovery  udp write error errno=22 reason=Invalid argument
CRITICAL:p2p.discovery  waiting for recovery
:)
I think this is the part that fails
Augusto Hack
@hackaugusto
Mar 23 2016 22:34
Thank you :), will have a look
alitaoo
@alitaoo
Mar 23 2016 22:46
The error 22 comes from config_discovery['listen_host'] = '127.0.0.1'. When I set it to my public interface I have no more the critical message. Everything seems ok, but I still have 0 node
Augusto Hack
@hackaugusto
Mar 23 2016 22:57
The nodes from the test are not returning the pong message, I don't know what nodes are these [https://github.com/ethereum/pydevp2p/blob/develop/devp2p/tests/test_discovery.py#L297-L307]
I runned a local pyethapp and used it's enode as configuration. Just set the node_uri configuration variable and the test works.