Commit Graph

5 Commits

Author SHA1 Message Date
Zahary Karadjov 41e92ca8df The ETH and LES protocols now compile as part of nimbus 2018-07-23 00:32:45 +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 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
Zahary Karadjov 812c6284c0 rename package to eth_p2p to make it consistent with our naming scheme 2018-06-16 21:58:41 +03:00