I am currently analysing the source code of Monero. If a node makes a new connection, it first checks what fraction of its current outgoing connections are to nodes in its white list. If it is above an expected fraction (default is 70 percent), then it attempts to connect to grey-listed peers and then (if necessary) white-listed peers. However, If I understand that part of the code correctly, it will try all grey peers to create a connection. In case we want to connect to a white peer, we will try a limited (probably 3 iteration and we try 20 peers per iteration) number of peers.

Has anybody an idea why the developers chose to do it that way? Isn't it wasteful to try the whole grey list (up to 5,000 entries)? Where at the same time we maintain a white list of probably online peers?

1 Answer 1


This does not try all entries in the set, it picks one entry in that set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.