<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:Peers exchanging mempool priority policies is great; that accomplishes&#xA;the flexibility in what txes to remember that I was going for with the&#xA;forget-filters, but much more neatly, with less overhead and some side&#xA;benefits.&#xA;&#xA;Here&#39;s what I&#39;m picturing now:&#xA;- exchange priority policies in peer introductions&#xA;- assign unique sequential IDs in the order the transactions were&#xA;inved (per peer)&#xA;- receiving a getdata for a tx updates last-known-peer-received inv to&#xA;all invs up to the one referenced&#xA;- include ID-last-received, last-known-peer-received in sparse block&#xA;- reference txes in sparse block by index in receiver&#39;s&#xA;prioritiziation with peer&#39;s sent invs up to ID-last-received and&#xA;sender&#39;s prior invs up to last-known-peer-received&#xA;&#xA;Possible new messages:&#xA;- sparseblock&#xA;- invack message a node can send at times when it&#39;s received a bunch&#xA;of invs it already has, so it hasn&#39;t acked with a getdata in a while&#xA;- gettx: getdata, but using new sequential ID to save 28 bytes per tx&#xA;&#xA;It seems important for ordering policies to be able to be specified in&#xA;as much detail as possible. Parameters that should be available:&#xA;- total inputs&#xA;- total outputs&#xA;- bytes&#xA;- coin days destroyed&#xA;- net UTXO size change&#xA;- sigops&#xA;- is data carrier&#xA;- is output raw multisig&#xA;- age in mempool&#xA;- what else?&#xA;This parameter set should be extensible to allow for unforeseen future factors.&#xA;&#xA;Ordering policies should allow arbitrary algebraic combinations of&#xA;their parameters, as well as thresholds. Boolean combinations of&#xA;sub-policies would also be desirable. This could be implemented with a&#xA;tx-script-like stack-based language, in which each supported tx&#xA;property is pushed onto the stack by a particular opcode, and&#xA;+-*//min/max/boolean operators combine them to yield the sort key.&#xA;&#xA;Difficult parameters:&#xA;* Coin-days-destroyed: changes, peers need agreement on when (if?)&#xA;it&#39;s recalculated. Probably can just not recalculate, but peers still&#xA;need agreement on &#34;time seen&#34; to get CDD.&#xA;* Age in mempool: seems intractable in terms of time, but could be&#xA;done easily in terms of &#34;how many txes old is this sequential ID&#34;&#xA;&#xA;One potential pitfall: this allows for an environment of completely&#xA;heterogeneous mempool policies. I think that&#39;s a good thing, but we&#xA;need to avoid a situation where only least-common-denominator&#xA;transactions make it farther than a hop or two, and we don&#39;t want&#xA;nodes to have a strong preference for connecting to like-minded peers&#xA;since clustering reduces overall connectivity. It may be worthwhile to&#xA;add a parallel mechanism for relay policies, to differentiate between&#xA;what a node would keep in its mempool vs. what it wouldn&#39;t even relay&#xA;and doesn&#39;t want to see at all. Relay policies could be specified just&#xA;like prioritization policies, but with the final stack value evaluated&#xA;in a boolean context.&#xA;&#xA;An interesting additional use of policy-scripts would be a&#xA;standardized way for miners to include a policy script in a coinbase,&#xA;allowing miners a mechanism to advertise things like their relative&#xA;price of sigops vs bytes. Nodes may then choose to take this&#xA;information into account in order to optimize their mempool policies&#xA;for likelihood of consistency with future blocks. Since policy scripts&#xA;provide only relative information on prices of different transaction&#xA;properties rather than an absolute fee, this should not allow miners&#xA;to &#34;vote fees up&#34;, although care would need to be taken they wouldn&#39;t&#xA;be able to drive up prices by claiming common transaction types are at&#xA;the high end of the fee scale.</html></oembed>