Working on a way to speed up syncing in Genesis mode, it would be nice to have a way to declare, optionally, in the topology file one or more peers which are to be preferred for syncing. This could be, for example, a key preferredSyncPeers which, if present, would be mapped to a list of values like those in accessPoints of localRootPeers.
Such a peer preferred for syncing should behave like a localRootPeers entity during sync in the sense that the syncing node aims to maintain a hot connection with it. Through discussion with @nfrisby , we concluded that any connection with such a peer during a sync should additionally have the following properties:
- back-off of the time interval between reconnect attempts (should the connection between the syncing node and the preferred peer be dropped) so that if the preferred peer is advertising a chain that's being refuted by other peers, the resource waste by the syncing node will be diminishingly severe.
- forgetfulness of the connection with the peer preferred for syncing. Unlike a connection with a local root peer, a connection with a peer preferred for syncing should be forgotten (dropped, with no reconnect attempt) once the node's state switches from syncing to caught-up.
Working on a way to speed up syncing in Genesis mode, it would be nice to have a way to declare, optionally, in the topology file one or more peers which are to be preferred for syncing. This could be, for example, a key
preferredSyncPeerswhich, if present, would be mapped to a list of values like those inaccessPointsoflocalRootPeers.Such a peer preferred for syncing should behave like a
localRootPeersentity during sync in the sense that the syncing node aims to maintain a hot connection with it. Through discussion with @nfrisby , we concluded that any connection with such a peer during a sync should additionally have the following properties: