I think all the Log statements in this function could be downgraded to LogDebug(BCLog::PROXY, ...)
– they just indicate a p2p connection failure? The LogPrintf("... connect to %s:%d failed ...")
on line 448 generates a bit of noise for nodes with tor enabled, I believe:
02024-07-17T05:23:37.590158Z Socks5() connect to nz7rn2ukf3kwqx24iv6q6tyhiclxwzuk65thkihoo4btbdat4y5ee2qd.onion:8333 failed: host unreachable
12024-07-17T05:23:51.908547Z Socks5() connect to nz7rn2ukf3kwqx24iv6q6tyhiclxwzuk65thkihoo4btbdat4y5ee2qd.onion:8333 failed: host unreachable
22024-07-17T06:18:15.494392Z Socks5() connect to bncti2h36dmqk4l76lgxs3c6d7vczvbkhhvbche4yxgztv766yhsyxad.onion:8333 failed: host unreachable
32024-07-17T07:27:00.134226Z Socks5() connect to kqdw33pqr3ndqmd6lffd2qlvjvkthnximrg4zu35kz2ods7t7zte66yd.onion:8333 failed: host unreachable
Maybe it’s worth having an alert that problems are happening because the socks proxy is misbehaving since that’s something you could fix; but we tend to be pretty silent otherwise when connections aren’t succeeding, so dropping these to debug level seems reasonable to me. I think the only PROXY debug messages we have is prior to the call to ConnectThroughProxy()
(which invokes Socks5()
which then does a Debug/NET log of slightly less info) and a debug message in Socks5()
that reveals the auth/password being used, which I think are only ever set as 0/0, 1/1, 2/2, etc.