<oembed><type>rich</type><version>1.0</version><author_name>npub18plyg5mfmzwlvkcx0fhudfll3x5phjvvlglw4dgj6t5ehyp87ttqzv2ml4</author_name><author_url>https://nostr.ae/npub18plyg5mfmzwlvkcx0fhudfll3x5phjvvlglw4dgj6t5ehyp87ttqzv2ml4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-06-19&#xA;📝 Original message:Extremely disappointed to hear this. This change turns double spending from&#xA;a calculable (and affordable) risk for merchant payment processors into&#xA;certain profit for scammers, and provides no useful benefit for consumers.&#xA;&#xA;I sincerely hope that F2Pool reconsider, given that RBF will decrease the&#xA;overall utility of bitcoin and reduce the number of people using it for&#xA;online purchases.&#xA;&#xA;Adrian&#xA;&#xA;&#xA;&#xA;&#xA;On Fri, Jun 19, 2015 at 6:33 AM, Stephen Morse &lt;stephencalebmorse at gmail.com&gt;&#xA;wrote:&#xA;&#xA;&gt; It is disappointing that F2Pool would enable full RBF when the safe&#xA;&gt; alternative, first-seen-safe RBF, is also available, especially since the&#xA;&gt; fees they would gain by supporting full RBF over FSS RBF would likely be&#xA;&gt; negligible. Did they consider using FSS RBF instead?&#xA;&gt;&#xA;&gt; Best,&#xA;&gt; Stephen&#xA;&gt;&#xA;&gt; On Fri, Jun 19, 2015 at 6:39 AM, Peter Todd &lt;pete at petertodd.org&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Yesterday F2Pool, currently the largest pool with 21% of the hashing&#xA;&gt;&gt; power, enabled full replace-by-fee (RBF) support after discussions with&#xA;&gt;&gt; me. This means that transactions that F2Pool has will be replaced if a&#xA;&gt;&gt; conflicting transaction pays a higher fee. There are no requirements for&#xA;&gt;&gt; the replacement transaction to pay addresses that were paid by the&#xA;&gt;&gt; previous transaction.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;m a user. What does this mean for me?&#xA;&gt;&gt; ---------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; In the short term, very little. Wallet software aimed at average users&#xA;&gt;&gt; has no ability to reliably detect conditions where an unconfirmed&#xA;&gt;&gt; transaction may be double-spent by the sender. For example, Schildbach&#39;s&#xA;&gt;&gt; Bitcoin Wallet for Android doesn&#39;t even detect double-spends of&#xA;&gt;&gt; unconfirmed transactions when connected to a RBF or Bitcoin XT nodes&#xA;&gt;&gt; that propagate them. The least sophisticated double-spend attack&#xA;&gt;&gt; possibly - simply broadcasting two conflicting transactions at the same&#xA;&gt;&gt; time - has about 50% probability of success against these wallets.&#xA;&gt;&gt;&#xA;&gt;&gt; Additionally, SPV wallets based on bitcoinj can&#39;t even detect invalid&#xA;&gt;&gt; transactions reliably, instead trusting the full node(s) it is connected&#xA;&gt;&gt; too over the unauthenticated, unencrypted, P2P protocol to do validation&#xA;&gt;&gt; for them. For instance due to a unfixed bug¹ Bitcoin XT nodes will relay&#xA;&gt;&gt; double-spends that spend the output of the conflicting transaction. I&#39;ve&#xA;&gt;&gt; personally tested this with Schildbach&#39;s Bitcoin Wallet for Android,&#xA;&gt;&gt; which shows such invalid transactions as standard, unconfirmed,&#xA;&gt;&gt; transactions.&#xA;&gt;&gt;&#xA;&gt;&gt; Users should continue to assume that unconfirmed transactions could be&#xA;&gt;&gt; trivially reversed by the sender until the first confirmation. In&#xA;&gt;&gt; general, only the sender can reverse a transaction, so if you do trust&#xA;&gt;&gt; the sender feel free to assume an unconfirmed transaction will&#xA;&gt;&gt; eventually confirm. However, if you do not trust the sender and/or have&#xA;&gt;&gt; no other recourse if they double-spend you, wait until at least the&#xA;&gt;&gt; first confirmation before assuming the transaction will go through.&#xA;&gt;&gt;&#xA;&gt;&gt; In the long term, miner support of full RBF has a number of advantages&#xA;&gt;&gt; to users, allowing you to more efficiently make transactions, paying&#xA;&gt;&gt; lower fees. However you&#39;ll need a wallet supporting these features; none&#xA;&gt;&gt; exist yet.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;m a business. What does this mean for me?&#xA;&gt;&gt; -------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; If you use your own node to verify transactions, you probably are in a&#xA;&gt;&gt; similar situation as average users, so again, this means very little to&#xA;&gt;&gt; you.&#xA;&gt;&gt;&#xA;&gt;&gt; If you use a payment processor/transaction API such as BitPay, Coinbase,&#xA;&gt;&gt; BlockCypher, etc. you may or may not be accepting unconfirmed&#xA;&gt;&gt; transactions, and they may or may not be &#34;guaranteed&#34; by your payment&#xA;&gt;&gt; processor even if double-spent. If like most merchants you&#39;re using the&#xA;&gt;&gt; API such that confirmations are required prior to accepting orders (e.g.&#xA;&gt;&gt; taking a meaningful loss such as shipping a product if the tx is&#xA;&gt;&gt; reversed) nothing changes for you. If not I recommend you contact your&#xA;&gt;&gt; payment processor.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;m a miner. Why should I support replace-by-fee?&#xA;&gt;&gt; -------------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; Whether full or first-seen-safe⁵ RBF support (along with&#xA;&gt;&gt; child-pays-for-parent) is an important step towards a fully functioning&#xA;&gt;&gt; transaction fee market that doesn&#39;t lead to users&#39; transactions getting&#xA;&gt;&gt; mysteriously &#34;stuck&#34;, particularly during network flooding&#xA;&gt;&gt; events/attacks. A better functioning fee market will help reduce&#xA;&gt;&gt; pressure to increase the blocksize, particularly from the users creating&#xA;&gt;&gt; the most valuable transactions.&#xA;&gt;&gt;&#xA;&gt;&gt; Full RBF also helps make use of the limited blockchain space more&#xA;&gt;&gt; efficiently, with up to 90%+ transaction size savings possible in some&#xA;&gt;&gt; transaction patterns. (e.g. long payment chains⁶) More users in less&#xA;&gt;&gt; blockchain space will lead to higher overall fees per block.&#xA;&gt;&gt;&#xA;&gt;&gt; Finally as we&#39;ll discuss below full RBF prevents a number of serious&#xA;&gt;&gt; threats to the existing level playing field that miners operate in.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Why can&#39;t we make accepting unconfirmed txs from untrusted people safe?&#xA;&gt;&gt; -----------------------------------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; For a decentralized wallet, the situation is pretty bleak. These wallets&#xA;&gt;&gt; only have a handful of connections to the network, with no way of&#xA;&gt;&gt; knowing if those connections give an accurate view of what transactions&#xA;&gt;&gt; miners actually know about.&#xA;&gt;&gt;&#xA;&gt;&gt; The only serious attempt to fix this problem for decentralized wallets&#xA;&gt;&gt; that has been actually deployed is Andresen/Harding&#39;s double-spend&#xA;&gt;&gt; relaying, implemented in Bitcoin XT. It relays up to one double-spend&#xA;&gt;&gt; transaction per double-spent txout, with the intended effect to warn&#xA;&gt;&gt; recipients. In practice however this functionality makes it easier to&#xA;&gt;&gt; double-spend rather than harder, by giving an efficient and easy way to&#xA;&gt;&gt; get double-spends to miners after the fact. Notably my RBF&#xA;&gt;&gt; implementation even connects to Bitcoin XT nodes, reserving a % of all&#xA;&gt;&gt; incoming and outgoing connection slots for them.&#xA;&gt;&gt;&#xA;&gt;&gt; Additionally Bitcoin XT&#39;s double-spend relaying is subject to attacks&#xA;&gt;&gt; include bandwidth exhaustion, sybil attacks, and Gervais&#39;s non-sybil&#xA;&gt;&gt; interactive attacks⁷ among many others.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; What about centralised wallets?&#xA;&gt;&gt; -------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; Here the solutions being deployed, planned, and proposed are harmful,&#xA;&gt;&gt; and even represent serious threats to Bitcoin&#39;s decentralization.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Confidence factors&#xA;&gt;&gt; ------------------&#xA;&gt;&gt;&#xA;&gt;&gt; Many services such as BlockCypher² have attempted to predict the&#xA;&gt;&gt; probability that unconfirmed transactions will be mined, often&#xA;&gt;&gt; guaranteeing merchants payment³ even in the event of a double-spend. The&#xA;&gt;&gt; key component of these predictions is to sybil attack the P2P network as&#xA;&gt;&gt; a whole, connecting to as many nodes as possible to measure transaction&#xA;&gt;&gt; propagation. Additionally these services connect to pools directly via&#xA;&gt;&gt; the getblocktemplate protocol, repeatedly downloading via GBT the lists&#xA;&gt;&gt; of transactions in the to-be-mined blocks to determine what transactions&#xA;&gt;&gt; miners are attempting to mine.&#xA;&gt;&gt;&#xA;&gt;&gt; None of these measures scale, wasting significant network and miner&#xA;&gt;&gt; resources; in one instance a sybil attack by Chainalysis even completely&#xA;&gt;&gt; blocked the users of the SPV wallet Breadwallet⁴ from accessing the&#xA;&gt;&gt; network. These measures also don&#39;t work very well, giving double-spend&#xA;&gt;&gt; attackers incentives to sybil attack miners themselves.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Transaction processing contracts with miners&#xA;&gt;&gt; --------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; The next step after measuring propagation fails is to contract with&#xA;&gt;&gt; miners directly, signing contracts with as much of the hashing power as&#xA;&gt;&gt; possible to get the transactions they want mined and double-spends&#xA;&gt;&gt; rejected. The miners/pools would then provide an authenticated API&#xA;&gt;&gt; endpoint for exclusive use of this service that would allow the service&#xA;&gt;&gt; to add and remove specific transactions to the mempool on demand.&#xA;&gt;&gt;&#xA;&gt;&gt; There&#39;s a number of serious problems with this:&#xA;&gt;&gt;&#xA;&gt;&gt; 1) Mining contracts can be used to double-spend&#xA;&gt;&gt;&#xA;&gt;&gt; ...even when they&#39;re being used &#34;honestly&#34;.&#xA;&gt;&gt;&#xA;&gt;&gt; Suppose Alice is a merchant using CoinPayCypher, who has contracts with&#xA;&gt;&gt; 75% of the hashing power. Bob, another merchant, meanwhile uses a&#xA;&gt;&gt; decentralized Bitcoin Core backend for payments to his website.&#xA;&gt;&gt;&#xA;&gt;&gt; Mallory wants to double-spend Bob&#39;s to buy his expensive products. He&#xA;&gt;&gt; can do this by creating a transaction, tx1, that pays Alice, followed by&#xA;&gt;&gt; a second transaction, tx2, that pays Bob. In any circumstance when&#xA;&gt;&gt; Mallory can convince Bob to accept tx2, but prevent Bob from seeing tx1,&#xA;&gt;&gt; the chance of Malory&#39;s double-spend succeeding becomes ~75% because&#xA;&gt;&gt; CoinPayCypher&#39;s contracts with mining ensure the transaction paying&#xA;&gt;&gt; Alice will get mined.&#xA;&gt;&gt;&#xA;&gt;&gt; Of course, dishonest use and/or compromise makes double-spending&#xA;&gt;&gt; trivial: Malory can use the API credentials to ask miners to reject&#xA;&gt;&gt; Bob&#39;s payment at any time.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; 2) They still don&#39;t work, without 51% attacking other miners&#xA;&gt;&gt;&#xA;&gt;&gt; Even if CoinPayCypher has 75% of the hashing power on contract, that&#39;s&#xA;&gt;&gt; still a potentially 75% chance of being double-spent. The 25% of miners&#xA;&gt;&gt; who haven&#39;t signed contracts have no _decentralized_ way of ensuring&#xA;&gt;&gt; they don&#39;t create blocks with double-spends, let alone at low cost. If&#xA;&gt;&gt; those miners won&#39;t or can&#39;t sign contracts with CoinPayCypher the only&#xA;&gt;&gt; next step available is to reject their blocks entirely.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; 3) Legal contracts give the advantage to non-anonymous miners in&#xA;&gt;&gt;    Western jurisdictions&#xA;&gt;&gt;&#xA;&gt;&gt; Suppose CoinPayCypher is a US company, and you&#39;re a miner with 1%&#xA;&gt;&gt; hashing power located in northern China. The barriers to you succesfully&#xA;&gt;&gt; negotiating a contract with CoinPayCypher are significant. You don&#39;t&#xA;&gt;&gt; speak the same langauge, you&#39;re in a completely different jurisdiction&#xA;&gt;&gt; so enforcing the legal contract is difficult, and being just 1%,&#xA;&gt;&gt; CoinPayCypher sees you as insignificant.&#xA;&gt;&gt;&#xA;&gt;&gt; Who&#39;s going to get the profitable hashing power contracts first, if at&#xA;&gt;&gt; all? Your English speaking competitors in the west. This is inherently a&#xA;&gt;&gt; pressure towards centralization of mining.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; Why isn&#39;t this being announced on the bitcoin-security list first?&#xA;&gt;&gt; ------------------------------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;ve had repeated discussions with services vulnerable to double-spends;&#xA;&gt;&gt; they have been made well aware of the risk they&#39;re taking. If they&#39;ve&#xA;&gt;&gt; followed my own and others&#39; advice they&#39;ll at minimum have constant&#xA;&gt;&gt; monitoring of the rate of double-spends both on their own services and&#xA;&gt;&gt; on the P2P network in general.&#xA;&gt;&gt;&#xA;&gt;&gt; If you choose to take a risk you should accept the consequences.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; How do I actually use full RBF?&#xA;&gt;&gt; -------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt; First get the full-RBF patch to v0.10.2:&#xA;&gt;&gt;&#xA;&gt;&gt;     https://github.com/petertodd/bitcoin/tree/replace-by-fee-v0.10.2&#xA;&gt;&gt;&#xA;&gt;&gt; The above implementation of RBF includes additional code to find and&#xA;&gt;&gt; preferentially connect to other RBF nodes, as well as Bitcoin XT nodes.&#xA;&gt;&gt; Secondly, try out my replace-by-fee-tools at:&#xA;&gt;&gt;&#xA;&gt;&gt;     https://github.com/petertodd/replace-by-fee-tools&#xA;&gt;&gt;&#xA;&gt;&gt; You can watch double-spends on the network here:&#xA;&gt;&gt;&#xA;&gt;&gt;     http://respends.thinlink.com/&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; References&#xA;&gt;&gt; ----------&#xA;&gt;&gt;&#xA;&gt;&gt; 1) &#34;Replace-by-fee v0.10.2 - Serious DoS attack fixed! - Also novel&#xA;&gt;&gt;     variants of existing attacks w/ Bitcoin XT and Android Bitcoin&#xA;&gt;&gt; Wallet&#34;,&#xA;&gt;&gt;    Peter Todd, May 23rd 2015, Bitcoin-development mailing list,&#xA;&gt;&gt;&#xA;&gt;&gt; http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg07795.html&#xA;&gt;&gt;&#xA;&gt;&gt; 2) &#34;From Zero to Hero: Bitcoin Transactions in 8 Seconds&#34;,&#xA;&gt;&gt;    June 2nd, 2014, Erik Voorhees,&#xA;&gt;&gt;&#xA;&gt;&gt; https://medium.com/blockcypher-blog/from-zero-to-hero-bitcoin-transactions-in-8-seconds-7c9edcb3b734&#xA;&gt;&gt;&#xA;&gt;&gt; 3) Coinbase Merchant API, Accessed Jun 19th 2015,&#xA;&gt;&gt;    https://developers.coinbase.com/docs/merchants/callbacks#confirmations&#xA;&gt;&gt;&#xA;&gt;&gt; 4) &#34;Chainalysis CEO Denies &#39;Sybil Attack&#39; on Bitcoin&#39;s Network&#34;,&#xA;&gt;&gt;    March 14th 2015, Grace Caffyn, Coindesk,&#xA;&gt;&gt;&#xA;&gt;&gt; http://www.coindesk.com/chainalysis-ceo-denies-launching-sybil-attack-on-bitcoin-network/&#xA;&gt;&gt;&#xA;&gt;&gt; 5) &#34;First-Seen-Safe Replace-by-Fee&#34;,&#xA;&gt;&gt;    May 25th 2015, Peter Todd, Bitcoin-development mailing list,&#xA;&gt;&gt;&#xA;&gt;&gt; http://www.mail-archive.com/bitcoin-development%40lists.sourceforge.net/msg07829.html&#xA;&gt;&gt;&#xA;&gt;&gt; 6) &#34;Cost savings by using replace-by-fee, 30-90%&#34;,&#xA;&gt;&gt;    May 25th 2015, Peter Todd, Bitcoin-development mailing list,&#xA;&gt;&gt;&#xA;&gt;&gt; http://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg07813.html&#xA;&gt;&gt;&#xA;&gt;&gt; 7) &#34;Tampering with the Delivery of Blocks and Transactions in Bitcoin&#34;,&#xA;&gt;&gt;     Arthur Gervais and Hubert Ritzdorf and Ghassan O. Karame and Srdjan&#xA;&gt;&gt; Capkun,&#xA;&gt;&gt;     Cryptology ePrint Archive: Report 2015/578, Jun 10th 2015,&#xA;&gt;&gt;     http://eprint.iacr.org/2015/578&#xA;&gt;&gt;&#xA;&gt;&gt; --&#xA;&gt;&gt; &#39;peter&#39;[:-1]@petertodd.org&#xA;&gt;&gt; 0000000000000000070a2bb3b92c20d5c2c971e6e1a7abe55cdbbe6a2dd9a5ad&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; ------------------------------------------------------------------------------&#xA;&gt;&gt;&#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;&gt;&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; ------------------------------------------------------------------------------&#xA;&gt;&#xA;&gt; _______________________________________________&#xA;&gt; Bitcoin-development mailing list&#xA;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150619/54877f1f/attachment.html&gt;</html></oembed>