grin icon indicating copy to clipboard operation
grin copied to clipboard

P2P CONFIGURATION "#will *only* connect to peers in allow list" not working properly

Open MCM-Mike opened this issue 4 years ago • 2 comments

(not urgent, but helpful for some commercial deployments)

Describe the bug When setting the configuration of Grin-Node to only connect to a certain node it wont connect only to this node.

# example config
#will *only* connect to peers in allow list
peers_allow = ["192.168.0.1:3414", "192.168.0.2:3414"]

To Reproduce Steps to reproduce the behavior:

Setup a new node and change the grin-server.toml to connect only to your existing node. It will automatically connect to grin-nodes which it discovers though the seeding_type = "DNS" and not follow the behavior to connect to one single node.

MCM-Mike avatar Aug 04 '20 19:08 MCM-Mike

Thanks for reporting this. :+1: on this being helpful for some deployments (isolated testing being one of them).

antiochp avatar Aug 08 '20 09:08 antiochp

For my testing node (version 4.0.2) the behavior seems to be correct: if I set peers_allow explicitly I won't be able to connect to other nodes even DNS seeding is enabled. And a brief look into the implementation seems to meet the behavior, Peers::is_denied() is called regardless whether it is preferred node or not.

de1acr0ix avatar Aug 09 '20 02:08 de1acr0ix