Note: this backport bypasses an intermediate change in `p2p_addrv2_relay.py` from [[https://github.com/bitcoin/bitcoin/pull/22211 | core#22211]]
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/22387 | core#22387]] [2/5]
https://github.com/bitcoin/bitcoin/pull/22387/commits/5648138f5949013331c017c740646e2f4013bc24
Depends on D10936