grin
grin copied to clipboard
P2P CONFIGURATION "#will *only* connect to peers in allow list" not working properly
(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.
Thanks for reporting this. :+1: on this being helpful for some deployments (isolated testing being one of them).
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.