The 25% of maximum peers is fairly arbitrary but is deliberately above zero to ensure we contribute something to the overall network even while catching up.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
When chain downloading, the SyncTargetManager continues to
attempt to download headers/blocks from the current syncTarget,
even if the system is "insync". This is due to the fact that
the "insync" check is only performed at initial peer selection,
rather than on each loop of the chain downloader.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This only happens when there are multiple chain downloads in progress so the common ancestor is above the last header we imported, but safety-first...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Link the page in the navigation
Update manual quickstart and fixed some typos
Change steps display and have more precise duration information
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
When receiving an AddPeer, or when loading the static-nodes.json file, pantheon
should not accept its own NodeID as a valid connection (however, this should not invalidate the static-nodes file).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Most peers discovered on the network only define a single UDP port and have no explicitly defined TCP port. At least some of these peers are listening on the TCP port matching the advertised UDP port so assume the ports are the same and attempt a connection.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
When RemovePeer is invoked, the specified peer is removed from the "Maintained" connections in NettyP2p, and the connection to said peer is disconnected.
The peer is not added to the blacklist, on the premise that this behaviour will typically be used when peer-discovery is disabled, thus no future connection to the peer in question will be attempted (except via an AddPeer JSON RPC call).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
To prevent unexpected behaviour, if a static node is not in the nodes whitelist
(when permissioning is enabled) pantheon will not start (rather than starting
with only whitelisted static nodes).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Synchronizer returns false if it is in sync
* expand RunnerTest to test eth_syncing behaviour
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Maintain a staticnodes.json
The staticnodes.json file resides in the pantheon data directory,
is parsed at startup to determine which peers can be connected
to (aside from bootnodes), and is updated whenever addPeer/removePeer
RPC is invoked.
This file is not updated when finding neighbour peers (ONLY on RPC
call).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Lower the log level of discovery connections to unreachable networks,
such as a box without IPv6 enabled connecting to an IPv6 peer.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>