zebra icon indicating copy to clipboard operation
zebra copied to clipboard

The number of outbound connections reported by progress bars periodically glitches

Open upbqdn opened this issue 7 months ago • 6 comments

Description

When syncing on Testnet, I noticed the number of outbound connections reported by the new progress bars periodically jumps from ~7 to the limit of 75 and then back to ~7. The period seems to be equal to the crawl_new_peer_interval setting.

Analysis

That's probably because the connection counter actually comes from the connection limit, which is updated when we start making a connection. (Not when we successfully connect.)

So every few minutes, we re-try all the failed peers at the same time, the connection limit goes to 75, and then it drops back when they all fail.

Possible Solutions

Reducing the progress bar update interval would hide this, but it would still occasionally happen. (And be visible for longer.)

The real fix would be to move the progress bar to the peer set. We track inbound/outbound on the ConnectedAddr type in ConnectionInfo, which is part of the LoadTrackedClient in the PeerSet.

upbqdn avatar Nov 22 '23 20:11 upbqdn

We do have this info in the peer set, I updated the ticket.

teor2345 avatar Nov 22 '23 20:11 teor2345

Is this issue still relevant?

caglaryucekaya avatar Apr 22 '24 21:04 caglaryucekaya

Yes, it is.

upbqdn avatar Apr 23 '24 10:04 upbqdn

Okay, I'd like to work on this then

caglaryucekaya avatar Apr 23 '24 11:04 caglaryucekaya

Great, feel free to open a PR.

upbqdn avatar Apr 23 '24 20:04 upbqdn