<oembed><type>rich</type><version>1.0</version><author_name>npub1m230cem2yh3mtdzkg32qhj73uytgkyg5ylxsu083n3tpjnajxx4qqa2np2</author_name><author_url>https://nostr.ae/npub1m230cem2yh3mtdzkg32qhj73uytgkyg5ylxsu083n3tpjnajxx4qqa2np2</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-02-12&#xA;📝 Original message:My replace-by-fee patch is now available for the v0.10.0rc4 release:&#xA;&#xA;    https://github.com/petertodd/bitcoin/tree/replace-by-fee-v0.10.0rc4&#xA;&#xA;Along with demo scripts of the functionality:&#xA;&#xA;    https://github.com/petertodd/replace-by-fee-tools&#xA;&#xA;New to this version is a comprehensive set of unittests under&#xA;qa/replace-by-fee&#xA;&#xA;Additionally the preferential peering support now preferentially peers&#xA;with Bitcoin XT¹ nodes that support Andresen/Harding&#39;s double-spend&#xA;relaying² patch. While Bitcoin XT nodes don&#39;t accept double-spends into&#xA;their mempool, they do relay them perfectly well and thus are an asset&#xA;to those doing replace-by-fee mining.³&#xA;&#xA;I&#39;ve had a number of requests from miners for a version of&#xA;replace-by-fee against Luke-Jr&#39;s Eligius patches⁴; I&#39;ll be also&#xA;releasing that shortly once this release has undergone some more&#xA;testing.&#xA;&#xA;&#xA;What&#39;s replace-by-fee?&#xA;----------------------&#xA;&#xA;Currently most Bitcoin nodes accept the first transaction they see&#xA;spending an output to the mempool; all later transactions are rejected.&#xA;Replace-by-fee changes this behavior to accept the transaction paying&#xA;the highest fee, both absolutely, and in terms of fee-per-KB. Replaced&#xA;children are also considered - a chain of transactions is only replaced&#xA;if the replacement has a higher fee than the sum of all replaced&#xA;transactions.&#xA;&#xA;Doing this aligns standard node behavior with miner incentives: earn the&#xA;most amount of money per block. It also makes for a more efficient&#xA;transaction fee marketplace, as transactions that are &#34;stuck&#34; due to bad&#xA;fee estimates can be &#34;unstuck&#34; by double-spending them with higher&#xA;paying versions of themselves. With scorched-earth techniques⁵ it gives&#xA;a path to making zeroconf transactions economically secure by relying on&#xA;economic incentives, rather than &#34;honesty&#34; and alturism, in the same way&#xA;Bitcoin mining itself relies on incentives rather than &#34;honesty&#34; and&#xA;alturism.&#xA;&#xA;Finally for miners adopting replace-by-fee avoids the development of an&#xA;ecosystem that relies heavily on large miners punishing smaller ones for&#xA;misbehavior, as seen in Harding&#39;s proposal⁶ that miners collectively 51%&#xA;attack miners who include doublespends in their blocks - an unavoidable&#xA;consequence of imperfect p2p networking in a decentralized system - or&#xA;even Hearn&#39;s proposal⁷ that a majority of miners be able to vote to&#xA;confiscate the earnings of the minority and redistribute them at will.&#xA;&#xA;&#xA;Installation&#xA;------------&#xA;&#xA;Once you&#39;ve compiled the replace-by-fee-v0.10.0rc4 branch just run your&#xA;node normally. With -debug logging enabled, you&#39;ll see messages like the&#xA;following in your ~/.bitcoin/debug.log indicating your node is replacing&#xA;transactions with higher-fee paying double-spends:&#xA;&#xA;    2015-02-12 05:45:20 replacing tx ca07cc2a5eaf55ab13be7ed7d7526cb9d303086f116127608e455122263f93ea with c23973c08d71cdadf3a47bae45566053d364e77d21747ae7a1b66bf1dffe80ea for 0.00798 BTC additional fees, -1033 delta bytes&#xA;&#xA;Additionally you can tell if you are connected to other replace-by-fee&#xA;nodes, or Bitcoin XT nodes, by examining the service bits advertised by&#xA;your peers:&#xA;&#xA;    $ bitcoin-cli getpeerinfo | grep services | egrep &#39;((0000000000000003)|(0000000004000001))&#39;&#xA;            &#34;services&#34; : &#34;0000000000000003&#34;,&#xA;            &#34;services&#34; : &#34;0000000004000001&#34;,&#xA;            &#34;services&#34; : &#34;0000000004000001&#34;,&#xA;            &#34;services&#34; : &#34;0000000000000003&#34;,&#xA;            &#34;services&#34; : &#34;0000000004000001&#34;,&#xA;            &#34;services&#34; : &#34;0000000004000001&#34;,&#xA;            &#34;services&#34; : &#34;0000000000000003&#34;,&#xA;            &#34;services&#34; : &#34;0000000000000003&#34;,&#xA;&#xA;Replace-by-fee nodes advertise service bit 26 from the experimental use&#xA;range; Bitcoin XT nodes advertise service bit 1 for their getutxos&#xA;support. The code sets aside a certain number of outgoing and incoming&#xA;slots just for double-spend relaying nodes, so as long as everything is&#xA;working you&#39;re node should be connected to like-minded nodes a within 30&#xA;minutes or so of starting up.&#xA;&#xA;If you *don&#39;t* want to advertise the fact that you are running a&#xA;replace-by-fee node, just checkout a slightly earlier commit in git; the&#xA;actual mempool changes are separate from the preferential peering&#xA;commits. You can then connect directly to a replace-by-fee node using&#xA;the -addnode command line flag.&#xA;&#xA;1) https://github.com/bitcoinxt/bitcoinxt&#xA;2) https://github.com/bitcoin/bitcoin/pull/3883&#xA;3) https://github.com/bitcoin/bitcoin/pull/3883#issuecomment-45543370&#xA;4) https://github.com/luke-jr/bitcoin/tree/0.10.x-ljrP&#xA;5) http://www.mail-archive.com/bitcoin-development%40lists.sourceforge.net/msg05211.html&#xA;6) http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg06970.html&#xA;7) http://www.mail-archive.com/bitcoin-development%40lists.sourceforge.net/msg04972.html&#xA;&#xA;-- &#xA;&#39;peter&#39;[:-1]@petertodd.org&#xA;000000000000000013c290b77d45d2ea7f9220aedfadfd556ad41b6bd39822f3&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 650 bytes&#xA;Desc: Digital signature&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150212/a1703e85/attachment.sig&gt;</html></oembed>