This comment is confusing to me – have we decided whether it’s protocol-violating to not process unrequested transactions? That was exactly what I proposed we do elsewhere, in general, but there was debate over whether such a change would be breaking or whether it was useful.
If it’s not useful for our software to do this in general, I don’t know why it’s useful to do in this smaller specific case? And on the flip side, if it’s not a protocol violation here, why exactly would it be a protocol violation to do this in general?
Note also that being in IBD happens not just when we’re syncing the whole blockchain, but whenever a node is started up again after being off for a few days. So I believe that if there are any software projects that send unrequested transactions at all, this would be a potentially observable change for them – as far as I can tell, even while in IBD we can at least sometimes validate and relay a transaction just fine, if a transaction were only spending utxos that are already confirmed… (Unless I’m missing some other interaction that would prevent that from working?)
Not to say that this change can’t be made, I’m just looking for reasoning and a comment that explains our actual thinking, because so far I think the reasoning has been contradictory. If it’s not a protocol violation to ignore unrequested transactions, I don’t see the harm in us always doing it and avoiding gating yet another behavior on whether we are in IBD (which has always been a source of headaches when developers try to understand why something isn’t working as expected). If it is a protocol violation or potentially breaking, we should note that here and have a better justification for doing it than has been provided so far (particularly if a transaction were coming from a PF_RELAY or PF_FORCERELAY peer, where you might expect us to try harder to pass the transaction on).