Allows nodes in a network to not strictly prefer older peers. This
helps break up impenetrable cliques in small, stable networks (private
networks often fit this description). We generate a random mask for the
lifetime of the process and use that to xor against the nodeId of a
potential peer. The desired behavior of the network is that some of the
nodes will allow the new peer to make an inbound connection but that
peer can't try to farm a nodeId that would make prioritize it over all
other peers in a guaranteed fashion.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* `--random-peer-priority-enabled` flag added. Allows for incoming connections to be prioritized randomly. This will prevent (typically small, stable) networks from forming impenetrable peer cliques. [#1440](https://github.com/hyperledger/besu/pull/1440)
## Deprecated and Scheduled for removal in _Next_ Release
@ -351,6 +351,12 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
.toPercentage()
.getValue();
@Option(
names={"--random-peer-priority-enabled"},
description=
"Allow for incoming connections to be prioritized randomly. This will prevent (typically small, stable) networks from forming impenetrable peer cliques. (default: ${DEFAULT-VALUE})")
privatefinalBooleanrandomPeerPriority=false;
@Option(
names={"--banned-node-ids","--banned-node-id"},
paramLabel=MANDATORY_NODE_ID_FORMAT_HELP,
@ -1999,6 +2005,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable {