snarkOS
snarkOS copied to clipboard
[Feature] Ensure validators only participate in peer gossip when feature flag is set
🚀 Feature
In order to enhance the robustness of a validator node, we should by default ensure they only accept connections from trusted clients. Given that we already have a --peers flag to specify peers, I propose we only have to add:
--allow-outside-peers
If the flag is set, the validator will engage in P2P gossip to request more peers.
Implementation
If the --allow-outside-peers flag is not set, a validator should not send out any PeerRequest nor accept PeerResponse. We may need to take into account that trusted peers are not dropped/shuffled.
For clients, there is no difference in behavior.
@vicsn Isn't this done?