<oembed><type>rich</type><version>1.0</version><author_name>npub1lwrwp8dzn9x5nqc7d735e0nuwxh0nyz5ezkfpjzr332efdxw9asq4z8zjm</author_name><author_url>https://nostr.ae/npub1lwrwp8dzn9x5nqc7d735e0nuwxh0nyz5ezkfpjzr332efdxw9asq4z8zjm</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-07-18&#xA;📝 Original message:That&#39;s true, but I think it can be balanced with the usefulness of&#xA;knowing what messages a node has received. An invack would be sent if&#xA;N invs have been received without any resulting getdata; since we&#39;re&#xA;keeping track of peer inv order, one message can cover an arbitrarily&#xA;large series of invs.&#xA;&#xA;On Fri, Jul 18, 2014 at 10:48 AM, Jeff Garzik &lt;jgarzik at bitpay.com&gt; wrote:&#xA;&gt; On a flood-fill network, you don&#39;t want to create a storm of &#34;I&#xA;&gt; already have this&#34; replies.&#xA;&gt;&#xA;&gt; On Fri, Jul 18, 2014 at 1:39 PM, Kaz Wesley &lt;keziahw at gmail.com&gt; wrote:&#xA;&gt;&gt; Peers exchanging mempool priority policies is great; that accomplishes&#xA;&gt;&gt; the flexibility in what txes to remember that I was going for with the&#xA;&gt;&gt; forget-filters, but much more neatly, with less overhead and some side&#xA;&gt;&gt; benefits.&#xA;&gt;&gt;&#xA;&gt;&gt; Here&#39;s what I&#39;m picturing now:&#xA;&gt;&gt; - exchange priority policies in peer introductions&#xA;&gt;&gt; - assign unique sequential IDs in the order the transactions were&#xA;&gt;&gt; inved (per peer)&#xA;&gt;&gt; - receiving a getdata for a tx updates last-known-peer-received inv to&#xA;&gt;&gt; all invs up to the one referenced&#xA;&gt;&gt; - include ID-last-received, last-known-peer-received in sparse block&#xA;&gt;&gt; - reference txes in sparse block by index in receiver&#39;s&#xA;&gt;&gt; prioritiziation with peer&#39;s sent invs up to ID-last-received and&#xA;&gt;&gt; sender&#39;s prior invs up to last-known-peer-received&#xA;&gt;&gt;&#xA;&gt;&gt; Possible new messages:&#xA;&gt;&gt; - sparseblock&#xA;&gt;&gt; - invack message a node can send at times when it&#39;s received a bunch&#xA;&gt;&gt; of invs it already has, so it hasn&#39;t acked with a getdata in a while&#xA;&gt;&gt; - gettx: getdata, but using new sequential ID to save 28 bytes per tx&#xA;&gt;&gt;&#xA;&gt;&gt; It seems important for ordering policies to be able to be specified in&#xA;&gt;&gt; as much detail as possible. Parameters that should be available:&#xA;&gt;&gt; - total inputs&#xA;&gt;&gt; - total outputs&#xA;&gt;&gt; - bytes&#xA;&gt;&gt; - coin days destroyed&#xA;&gt;&gt; - net UTXO size change&#xA;&gt;&gt; - sigops&#xA;&gt;&gt; - is data carrier&#xA;&gt;&gt; - is output raw multisig&#xA;&gt;&gt; - age in mempool&#xA;&gt;&gt; - what else?&#xA;&gt;&gt; This parameter set should be extensible to allow for unforeseen future factors.&#xA;&gt;&gt;&#xA;&gt;&gt; Ordering policies should allow arbitrary algebraic combinations of&#xA;&gt;&gt; their parameters, as well as thresholds. Boolean combinations of&#xA;&gt;&gt; sub-policies would also be desirable. This could be implemented with a&#xA;&gt;&gt; tx-script-like stack-based language, in which each supported tx&#xA;&gt;&gt; property is pushed onto the stack by a particular opcode, and&#xA;&gt;&gt; +-*//min/max/boolean operators combine them to yield the sort key.&#xA;&gt;&gt;&#xA;&gt;&gt; Difficult parameters:&#xA;&gt;&gt; * Coin-days-destroyed: changes, peers need agreement on when (if?)&#xA;&gt;&gt; it&#39;s recalculated. Probably can just not recalculate, but peers still&#xA;&gt;&gt; need agreement on &#34;time seen&#34; to get CDD.&#xA;&gt;&gt; * Age in mempool: seems intractable in terms of time, but could be&#xA;&gt;&gt; done easily in terms of &#34;how many txes old is this sequential ID&#34;&#xA;&gt;&gt;&#xA;&gt;&gt; One potential pitfall: this allows for an environment of completely&#xA;&gt;&gt; heterogeneous mempool policies. I think that&#39;s a good thing, but we&#xA;&gt;&gt; need to avoid a situation where only least-common-denominator&#xA;&gt;&gt; transactions make it farther than a hop or two, and we don&#39;t want&#xA;&gt;&gt; nodes to have a strong preference for connecting to like-minded peers&#xA;&gt;&gt; since clustering reduces overall connectivity. It may be worthwhile to&#xA;&gt;&gt; add a parallel mechanism for relay policies, to differentiate between&#xA;&gt;&gt; what a node would keep in its mempool vs. what it wouldn&#39;t even relay&#xA;&gt;&gt; and doesn&#39;t want to see at all. Relay policies could be specified just&#xA;&gt;&gt; like prioritization policies, but with the final stack value evaluated&#xA;&gt;&gt; in a boolean context.&#xA;&gt;&gt;&#xA;&gt;&gt; An interesting additional use of policy-scripts would be a&#xA;&gt;&gt; standardized way for miners to include a policy script in a coinbase,&#xA;&gt;&gt; allowing miners a mechanism to advertise things like their relative&#xA;&gt;&gt; price of sigops vs bytes. Nodes may then choose to take this&#xA;&gt;&gt; information into account in order to optimize their mempool policies&#xA;&gt;&gt; for likelihood of consistency with future blocks. Since policy scripts&#xA;&gt;&gt; provide only relative information on prices of different transaction&#xA;&gt;&gt; properties rather than an absolute fee, this should not allow miners&#xA;&gt;&gt; to &#34;vote fees up&#34;, although care would need to be taken they wouldn&#39;t&#xA;&gt;&gt; be able to drive up prices by claiming common transaction types are at&#xA;&gt;&gt; the high end of the fee scale.&#xA;&gt;&gt;&#xA;&gt;&gt; ------------------------------------------------------------------------------&#xA;&gt;&gt; Want fast and easy access to all the code in your enterprise? Index and&#xA;&gt;&gt; search up to 200,000 lines of code with a free copy of Black Duck&#xA;&gt;&gt; Code Sight - the same software that powers the world&#39;s largest code&#xA;&gt;&gt; search on Ohloh, the Black Duck Open Hub! Try it now.&#xA;&gt;&gt; http://p.sf.net/sfu/bds&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Bitcoin-development mailing list&#xA;&gt;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; --&#xA;&gt; Jeff Garzik&#xA;&gt; Bitcoin core developer and open source evangelist&#xA;&gt; BitPay, Inc.      https://bitpay.com/</html></oembed>