Page MenuHomePhabricator

Increase our max number of outbound peers
ClosedPublic

Authored by Fabien on Feb 3 2022, 14:00.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC6f628bcb1267: Increase our max number of outbound peers
Summary

The number of inbound peers we support has been bumped a lot in D8605, but the outbound peers (the ones the node connects to, not the ones that connect to the node) remained unchanged. This diff doubles the number of outbounds, so that a node will reach out to 16 full relay (block + tx) peers.

This is the first part of a broader strategy related to actively retrieving avalanche peers. Later diffs will bump this number even more by using reserved slots for avalanche enabled outbound peers.

The MAX_NODE constant from the test framework has been bumped a lot (made possible by D10852) so it won't get in the way of the future diffs and don't need to be updated again.

Ref T1696.

Test Plan
ninja check-extended

Run a node with no inbound (blocked by firewall) for a while, check the node fills its outbound peer slots and the resources are not exploding. This test has been done on a beefy machine but the resource usage was unnoticeable so it should be OK with more limited machines as well.