This is a re-work of #21224.
Motivation is still the same to limit the DoS exposure in face of some DoSy behaviors from tx-relay peers.
Difference w.r.t 21224 is adding a protocol upgrade (REJECT_UNSOLICITED_TX_VERSION
) for the rejection of unsolicited txn solely to happen for new upgraded peers. That way no disruption of all the undocumented clients and node currently participating in the transaction-relay network.
Opening as a draft - There should be indeed test, there a bunch of old on 21224 branch.