I am not sure if this is the correct place for new proposals, so I apologize in advance if this is the wrong place.
<a href="https://github.com/conformal/btcd">btcd</a> currently disconnects peers that sending unrequested txs:
<pre> 18:36:03 2014-06-13 [INF] BMGR: New valid peer 173.228.29.187:58881 (inbound) (/BitCoinJ:0.10.3/) 18:36:04 2014-06-13 [WRN] BMGR: Got unrequested transaction ae238ff036467cf3f6fd83bb4987e287109e2423b702da319146cd8e4bf2eae8 from 173.228.29.187:58881 -- disconnecting </pre>
I believe bitcoinj does this to avoid a roundtrip.
However, I see a few issues with accepting unrequested txs. A peer can easily cause bitcoind to waste time processing TXs, fill and max out the orphan tx database dropping random txs from the orphan tx database, wasting bandwidth, etc. A potential DoS target.
There is no requirement that a client must send an inv, wait for a getdata, than send a tx. Currently, bitcoind will accept unrequested txs.
I am proposing bitcoind not accepted unrequested txs, forcing peers to send an inv first and respond to getdata requests.
I'd like to hear thoughts from others.