version number: 0.0.1
author: Jon Huang
full implementation of the Ethereum protocol from scratch for python
$ pip install -r requirements.txt
$ python app.py
- Ping(https://www.jianshu.com/p/b72b4eb259b8)
- Pong(https://www.jianshu.com/p/be885d33c156)
- FindNeighbors and Neighbors(https://www.jianshu.com/p/6b93267a7877)
- Routing(https://www.jianshu.com/p/2db0927ace93)
- Sync Blockchain
$ python app.py
2018-12-14 20:37:39.778 push (N 930cf49c) to bucket #14
2018-12-14 20:37:39.778 push (N 674085f6) to bucket #16
2018-12-14 20:37:39.778 push (N 009be51d) to bucket #16
2018-12-14 20:37:39.778 push (N 816ee7e3) to bucket #14
2018-12-14 20:37:39.778 push (N 3d1edcb0) to bucket #16
2018-12-14 20:37:39.778 push (N 29cca67d) to bucket #16
2018-12-14 20:37:39.786 listening...
2018-12-14 20:37:39.795 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:39.796 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:39.796 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:40.142 <---- [email protected]:30303 (Pong)
2018-12-14 20:37:40.798 <-//- [email protected]:30303 (Pong) timeout
2018-12-14 20:37:40.799 <-//- [email protected]:30303 (Pong) timeout
2018-12-14 20:37:41.143 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:41.145 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:41.507 <---- [email protected]:30303 (Ns [(N a3ba0512), (N a35e82d2), (N a1ae51f6), (N a153f900), (N a14a9593), (N a7b31894), (N a5d7d971), (N a5268243), (N af477601), (N adda7a78), (N b6ed28e7), (N b62a7422)] 1544791081)
2018-12-14 20:37:41.515 <---- [email protected]:30303 (Ns [(N b4114787), (N b8fb3e88), (N b83a8eb9), (N bf834266)] 1544791081)
2018-12-14 20:37:41.515 push (N a3ba0512) to bucket #7
2018-12-14 20:37:41.515 push (N a35e82d2) to bucket #8
2018-12-14 20:37:41.515 push (N a1ae51f6) to bucket #10
2018-12-14 20:37:41.515 push (N a153f900) to bucket #10
2018-12-14 20:37:41.516 push (N a14a9593) to bucket #10
2018-12-14 20:37:41.516 push (N a7b31894) to bucket #11
2018-12-14 20:37:41.516 push (N a5d7d971) to bucket #11
2018-12-14 20:37:41.517 push (N bf834266) to bucket #13
2018-12-14 20:37:41.518 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:41.607 <---- [email protected]:30303 (Pong)
2018-12-14 20:37:41.615 <---- [email protected]:30303 (Ping)
2018-12-14 20:37:41.615 ----> [email protected]:30303 (Pong)
2018-12-14 20:37:41.615 [email protected]:30303 unsolicited response Ping
2018-12-14 20:37:41.616 bump (N a3ba0512) in bucket #7
2018-12-14 20:37:41.800 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:41.801 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:41.801 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:41.802 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:42.617 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:42.618 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:42.695 <---- [email protected]:30303 (Ns [(N a3d1c129), (N a3d6aca8), (N a3c5cbb3), (N a3c42eff), (N a3cb0acd), (N a3ca35e8), (N a3c8dd80), (N a3cf1b5b), (N a3ceb7fb), (N a3f0ba70), (N a3f5b977), (N a3fbe63b)] 1544791082)
2018-12-14 20:37:42.703 <---- [email protected]:30303 (Ns [(N a3e3f5f9), (N a3e82fb3), (N a3e864b4), (N a3ed88d1)] 1544791082)
2018-12-14 20:37:42.703 push (N a3d1c129) to bucket #2
2018-12-14 20:37:42.703 push (N a3d6aca8) to bucket #3
2018-12-14 20:37:42.703 push (N a3c5cbb3) to bucket #5
2018-12-14 20:37:42.703 push (N a3c42eff) to bucket #5
2018-12-14 20:37:42.703 push (N a3cb0acd) to bucket #5
2018-12-14 20:37:42.704 push (N a3e864b4) to bucket #6
2018-12-14 20:37:42.705 push (N a3ed88d1) to bucket #6
2018-12-14 20:37:42.705 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:43.144 <---- [email protected]:30303 (Pong)
2018-12-14 20:37:43.152 <---- [email protected]:30303 (Ping)
2018-12-14 20:37:43.153 ----> [email protected]:30303 (Pong)
2018-12-14 20:37:43.153 [email protected]:30303 unsolicited response Ping
2018-12-14 20:37:43.153 bump (N a3d1c129) in bucket #2
2018-12-14 20:37:44.155 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:44.156 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:44.577 <---- [email protected]:30303 (Ns [(N a3d334fa), (N a3d3d431), (N a3d6aca8), (N a3d681d2), (N a3d571d4), (N a3d91e85), (N a3c1bd3f), (N a3c1ad80), (N a3c5cbb3), (N a3c42eff), (N a3cb0acd), (N a3ca35e8)] 1544791084)
2018-12-14 20:37:44.585 <---- [email protected]:30303 (Ns [(N a3cae3f7), (N a3c80d3f), (N a3c8dd80), (N a3cf1b5b)] 1544791084)
2018-12-14 20:37:44.585 push (N a3d3d431) to bucket #0
2018-12-14 20:37:44.585 bump (N a3d6aca8) in bucket #3
2018-12-14 20:37:44.586 push (N a3d681d2) to bucket #3
2018-12-14 20:37:44.586 push (N a3d571d4) to bucket #3
2018-12-14 20:37:44.586 push (N a3d91e85) to bucket #4
2018-12-14 20:37:44.586 push (N a3c1bd3f) to bucket #5
2018-12-14 20:37:44.587 bump (N a3cf1b5b) in bucket #5
2018-12-14 20:37:44.588 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:44.803 <-//- [email protected]:30303 (Ns) timeout
2018-12-14 20:37:44.803 <-//- [email protected]:30303 (Ns) timeout
2018-12-14 20:37:44.805 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:44.805 ----> [email protected]:30303 (Ping)
2018-12-14 20:37:45.107 <---- [email protected]:30303 (Pong)
2018-12-14 20:37:45.115 <---- [email protected]:30303 (Ping)
2018-12-14 20:37:45.115 ----> [email protected]:30303 (Pong)
2018-12-14 20:37:45.115 [email protected]:30303 unsolicited response Ping
2018-12-14 20:37:45.115 bump (N a3d6aca8) in bucket #3
2018-12-14 20:37:45.590 <-//- [email protected]:30303 (Pong) timeout
2018-12-14 20:37:45.806 <-//- [email protected]:30303 (Pong) timeout
2018-12-14 20:37:46.117 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:46.118 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:46.399 <---- [email protected]:30303 (Ns [(N a3d01efc), (N a3d05035), (N a3d08c94), (N a3d08bcf)] 1544791086)
2018-12-14 20:37:46.407 <---- [email protected]:30303 (Ns [(N a3d33fe5), (N a3d3bdc2), (N a3d3bea3), (N a3d3a940), (N a3d39ef5), (N a3d3d431), (N a3d264f5), (N a3d2e0fd), (N a3d2e293), (N a3d2cf5f), (N a3d1b2a3), (N a3d1a970)] 1544791086)
2018-12-14 20:37:46.407 push (N a3d01efc) to bucket #2
2018-12-14 20:37:46.408 push (N a3d08bcf) to bucket #2
2018-12-14 20:37:46.408 push (N a3d33fe5) to bucket #0
2018-12-14 20:37:46.408 push (N a3d3bdc2) to bucket #0
2018-12-14 20:37:46.409 push (N a3d1b2a3) to bucket #2
2018-12-14 20:37:46.409 push (N a3d1a970) to bucket #2
2018-12-14 20:37:46.410 ----> [email protected]:50000 (Ping)
2018-12-14 20:37:46.595 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:46.596 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:46.808 <-//- [email protected]:30303 (Ping) timeout
2018-12-14 20:37:46.809 ----> [email protected]:30303 (FN a3d334fa)
2018-12-14 20:37:47.412 <-//- [email protected]:50000 (Pong) timeout
2018-12-14 20:37:48.413 <-//- [email protected]:50000 (Ping) timeout
2018-12-14 20:37:48.414 ----> [email protected]:50000 (FN a3d334fa)
2018-12-14 20:37:49.600 <-//- [email protected]:30303 (Ns) timeout
2018-12-14 20:37:49.601 ----> [email protected]:30303 (Ping)