Skip to content

Gateway

Luke Champine requested to merge gateway into master

This PR implements the gateway module. The gateway manages the interaction between the local node and the rest of the network. Specifically, it relays blocks and transactions, and maintains a list of active peers.

Bootstrapping and synchronizing are now the responsibility of the gateway. The Miner will send its blocks to the Gateway (in addition to the State), and the Wallet will send transactions to the Gateway (in addition to the TransactionPool).

One potential design problem occurred to me: eventually we'll want to blacklist peers if they abuse things like the network timeout. However, the network package is in charge of monitoring those abuses. So the network package needs a way of notifying the Gateway that a peer is behaving badly. Maybe it could return a special error?

Merge request reports