<oembed><type>rich</type><version>1.0</version><title>James O&#39;Beirne [ARCHIVE] wrote</title><author_name>James O&#39;Beirne [ARCHIVE] (npub1dp…ymz3t)</author_name><author_url>https://yabu.me/npub1dpdfw74plzm03mzglkdegp3hqn6qs9yffqefa5kh98mru49nrg7szymz3t</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2022-02-17&#xA;📝 Original message:&gt; Is it really true that miners do/should care about that?&#xA;&#xA;De facto, any miner running an unmodified version of bitcoind doesn&#39;t&#xA;care about anything aside from ancestor fee rate, given that the&#xA;BlockAssembler as-written orders transactions for inclusion by&#xA;descending ancestor fee-rate and then greedily adds them to the block&#xA;template. [0]&#xA;&#xA;If anyone has any indication that there are miners running forks of&#xA;bitcoind that change this behavior, I&#39;d be curious to know it.&#xA;&#xA;Along the lines of what AJ wrote, optimal transaction selection is&#xA;NP-hard (knapsack problem). Any time that a miner spends deciding how&#xA;to assemble the next block is time not spent grinding on the nonce, and&#xA;so I&#39;m skeptical that miners in practice are currently doing anything&#xA;that isn&#39;t fast and simple like the default implementation: sorting&#xA;fee-rate in descending order and then greedily packing.&#xA;&#xA;But it would be interesting to hear evidence to the contrary.&#xA;&#xA;---&#xA;&#xA;You can make the argument that transaction selection is just a function&#xA;of mempool contents, and so mempool maintenance criteria might be the&#xA;thing to look at. Mempool acceptance is gated based on a minimum&#xA;feerate[1].  Mempool eviction (when running low on space) happens on&#xA;the basis of max(self_feerate, descendant_feerate) [2]. So even in the&#xA;mempool we&#39;re still talking in terms of fee rates, not absolute fees.&#xA;&#xA;That presents us with the &#34;is/ought&#34; problem: just because the mempool&#xA;*is* currently gating only on fee rate doesn&#39;t mean that&#39;s optimal. But&#xA;if the whole point of the mempool is to hold transactions that will be&#xA;mined, and if there&#39;s good reason that txns are chosen for mining based&#xA;on fee rate (it&#39;s quick and good enough), then it seems like fee rate&#xA;is the approximation that should ultimately prevail for txn&#xA;replacement.&#xA;&#xA;&#xA;[0]:&#xA;https://github.com/bitcoin/bitcoin/blob/master/src/node/miner.cpp#L310-L320&#xA;[1]:&#xA;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1106&#xA;[2]:&#xA;https://github.com/bitcoin/bitcoin/blob/master/src/txmempool.cpp#L1138-L1144&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220217/178b279c/attachment.html&gt;</html></oembed>