<div dir="ltr">Hi,<div><br></div><div>I&#39;m proposing the addition of a new optional p2p message to help reduce unnecessary network traffic.  The draft BIP is available here and pasted below:</div><div><a href="https://gist.github.com/morcos/9aab223c443c9258c979">https://gist.github.com/morcos/9aab223c443c9258c979</a><br></div><div><br></div><div>The goal of this message is to take advantage of the fact that when a node has reached its mempool limit, there is a minimum fee below which no transactions are accepted to the mempool.  Informing peers of this minimum would save them inv&#39;ing your node for those transaction id&#39;s and save your node requesting them if they are not in your recentRejects filter.</div><div><br></div><div>This message is optional and may be ignored as a protocol rule.  There is also an option to turn off sending the messages in the implementation.</div><div><br></div><div>Thanks to Suhas Daftuar, Greg Maxwell, and others for helping develop the idea.</div><div><br></div><div>-Alex</div><div><br></div><div>Draft BIP text:</div><div><br></div><div><div>&lt;pre&gt;</div><div>  BIP: &lt;unassigned&gt;</div><div>  Title: feefilter message</div><div>  Author: Alex Morcos &lt;<a href="mailto:morcos@chaincode.com">morcos@chaincode.com</a>&gt;</div><div>  Status: Draft</div><div>  Type: Standards Track</div><div>  Created: 2016-02-13</div><div>&lt;/pre&gt;</div><div><br></div><div>==Abstract==</div><div><br></div><div>Add a new message, &quot;feefilter&quot;, which serves to instruct peers not to send &quot;inv&quot;&#39;s to the node for transactions with fees below the specified fee rate.</div><div><br></div><div>==Motivation==</div><div><br></div><div>The concept of a limited mempool was introduced in Bitcoin Core 0.12 to provide protection against attacks or spam transactions of low fees that are not being mined. A reject filter was also introduced to help prevent repeated requests for the same transaction that might have been recently rejected for insufficient fee. These methods help keep resource utilization on a node from getting out of control.</div><div><br></div><div>However, there are limitations to the effectiveness of these approaches.  The reject filter is reset after every block which means transactions that are inv&#39;ed over a longer time period will be rerequested and there is no method to prevent requesting the transaction the first time.  Furthermore, inv data is sent at least once either to or from each peer for every transaction accepted to the mempool and there is no mechanism by which to know that an inv sent to a given peer would not result in a getdata request because it represents a transaction with too little fee.</div><div><br></div><div>After receiving a feefilter message, a node can know before sending an inv that a given transaction&#39;s fee rate is below the minimum currently required by a given peer, and therefore the node can skip relaying an inv for that transaction to that peer.</div><div><br></div><div>==Specification==</div><div><br></div><div># The feefilter message is defined as a message containing an int64_t where pchCommand == &quot;feefilter&quot;</div><div># Upon receipt of a &quot;feefilter&quot; message, the node will be permitted, but not required, to filter transaction invs for transactions that fall below the feerate provided in the feefilter message interpreted as satoshis per kilobyte.</div><div># The fee filter is additive with a bloom filter for transactions so if an SPV client were to load a bloom filter and send a feefilter message, transactions would only be relayed if they passed both filters.</div><div># Inv&#39;s generated from a mempool message are also subject to a fee filter if it exists.</div><div># Feature discovery is enabled by checking protocol version &gt;= 70013</div><div><br></div><div>==Considerations==</div><div>The propagation efficiency of transactions across the network should not be adversely affected by this change. In general, transactions which are not accepted to your mempool are not relayed and the funcionality implemented with this message is meant only to filter those transactions.  There could be a small number of edge cases where a node&#39;s mempool min fee is actually less than the filter value a peer is aware of and transactions with fee rates between these values will now be newly inhibited.</div><div><br></div><div>Feefilter messages are not sent to whitelisted peers if the &quot;-whitelistforcerelay&quot; option is set. In that case, transactions are intended to be relayed even if they are not accepted to the mempool.</div><div><br></div><div>There are privacy concerns with deanonymizing a node by the fact that it is broadcasting identifying information about its mempool min fee. To help ameliorate this concern, the implementaion quantizes the filter value broadcast with a small amount of randomness, in addition, the messages are broadcast to different peers at individually randomly distributed times.</div><div><br></div><div>If a node is using prioritisetransaction to accept transactions whose actual fee rates might fall below the node&#39;s mempool min fee, it may want to consider setting &quot;-nofeefilter&quot; to make sure it is exposed to all possible txid&#39;s.</div><div><br></div><div>==Backward compatibility==</div><div><br></div><div>Older clients remain fully compatible and interoperable after this change.  The sending of feefilter messages can be disabled by unsetting the &quot;-feefilter&quot; option.</div><div><br></div><div>==Implementation==</div><div><br></div><div><a href="https://github.com/bitcoin/bitcoin/pull/7542">https://github.com/bitcoin/bitcoin/pull/7542</a></div></div><div><br></div></div>