Commit Graph

26 Commits

Author SHA1 Message Date
Yuriy Glukhov f89d2eee5f Specify debug enode through env var. Fail less often in discovery 2018-09-20 22:28:53 +03:00
Yuriy Glukhov f815c73963 Reply empty nodeData 2018-09-10 19:22:31 +03:00
Yuriy Glukhov b5c898dc1e Fixed requested block range, more reliable block downloader 2018-09-07 13:37:11 +03:00
Yuriy Glukhov 573ca08643 Fixed occasional assertion failure on bonding 2018-09-07 13:37:11 +03:00
Yuriy Glukhov 0eda6bc91a Download block bodies 2018-08-29 23:34:21 +03:00
Yuriy Glukhov 847fac0635 Fixed msg len encoding 2018-08-29 18:28:01 +03:00
Zahary Karadjov 20033b499b Use chronicles instead of 'echo'; Cosmetic renames 2018-08-14 16:45:08 +03:00
Yuriy Glukhov 253bea9c8e More fixes. Block headers download works! 2018-08-14 16:45:08 +03:00
Zahary Karadjov 11fbe60ba4 add some reference links 2018-07-24 00:41:40 +03:00
Zahary Karadjov be7ca479b3 more fleshed out implementation of the blockchain sync procedure 2018-07-24 00:39:41 +03:00
Zahary Karadjov 6351fc38b9 type in eth_common has been renamed to avoid a naming collission in nimbus's gas_costs module 2018-07-23 13:44:56 +03:00
Zahary Karadjov 41e92ca8df The ETH and LES protocols now compile as part of nimbus 2018-07-23 00:32:45 +03:00
Zahary Karadjov 4335052e9f Move the code from rlpx.nim in the base module as it now represents
a wider set of APIs.
2018-07-12 14:14:22 +03:00
Yuriy Glukhov cf6b4d3084 Some fixes 2018-07-10 12:54:27 +03:00
Zahary Karadjov 96cf717778 WIP outline of the Blockchain sync procedure using the ETH wire protocol 2018-07-09 01:26:14 +03:00
Zahary Karadjov 4d17ab1ee5 Added various smaller features
* Perform per-protocol handshakes after connecting

* Initialize the per-protocol Peer and Network states properly

* Add an `EthereumNode` object that can be configured with specific
  capabilities and connected to a specific network.
2018-07-09 01:17:00 +03:00
Zahary Karadjov f1001c45d2 implement the new nextMsg semantics 2018-07-08 19:12:06 +03:00
Zahary Karadjov 9057d18abe Implemented the request/response future resolving logic 2018-07-08 17:25:10 +03:00
Zahary Karadjov 72016046fb Merge peer_pool and server into rlpx
This was done because a cycle was formed between the structures
of the three modules:

- A Peer holds a reference to its Network
- The Network holds a reference to its PeerPool
- The PeerPool keeps a table of connected Peers

I could have resolved the issue by introducing a new types module,
but it would have required all of the currently private fields to
become public (due to lack of package-level visibility in Nim).

Instead I decided to merge the modules because they were relatively
small anyway. Please note that the former `P2PServer` type is now
called `NetworkConnection`. There are slight changes in the APIs
that will be carried out in Nimbus when merging this.
2018-07-06 15:25:21 +03:00
Zahary Karadjov fac8bbd917 WIP refactor the rlpxProtocol macro
* Make all handlers async

* Added a new `requestResponse` construct that allows you to wait
  for the results of a particular request

* Introduced an optional `NetworkState` type for the protocol

* The semantics of `nextMsg` has changed. See the notes in the README
2018-07-06 13:24:01 +03:00
cheatfate 28759422bc Move clientId from constant. 2018-06-19 14:16:36 +03:00
Zahary Karadjov 7b1fc33d59 disable an inappropriate test that was left enabled by accident 2018-06-18 12:28:02 +03:00
Zahary Karadjov 6bd09b1bba remove some dead code 2018-06-18 12:05:38 +03:00
Zahary Karadjov 41d022b7fa fix a compilation errors and some GcSafe warnings 2018-06-18 12:05:38 +03:00
cheatfate 24d762da34 Moved eth_p2p to asyncdispatch2.
Fix some warnings at rlpx.nim.
Commented debug echo in rlpx.nim.
2018-06-18 12:05:38 +03:00
Zahary Karadjov 812c6284c0 rename package to eth_p2p to make it consistent with our naming scheme 2018-06-16 21:58:41 +03:00