{"id":23175,"date":"2017-09-22T18:11:02","date_gmt":"2017-09-22T18:11:02","guid":{"rendered":"http:\/\/ci027cfe6520042697"},"modified":"2017-09-22T18:11:02","modified_gmt":"2017-09-22T18:11:02","slug":"segwit2x-and-case-strong-replay-protection-and-why-its-controversial","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/culture\/segwit2x-and-case-strong-replay-protection-and-why-its-controversial","title":{"rendered":"SegWit2X and the Case for Strong Replay Protection (And Why It&#8217;s Controversial)"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/segwit2x-and-the-case-for-strong-replay-protection-and-why-its-controversial.jpg\" title=\"\"><\/figure>\n<p>Come November, the remaining signatories of the \u201c<a href=\"https:\/\/medium.com\/@DCGco\/bitcoin-scaling-agreement-at-consensus-2017-133521fe9a77\" target=\"_blank\" rel=\"noopener\">New York Agreement<\/a>\u201d (NYA) plan to deploy the \u201cSegWit2X\u201d hard fork to double Bitcoin\u2019s block weight limit, allowing for up to 8 megabytes of block space. Since <a href=\"https:\/\/en.bitcoin.it\/wiki\/Segwit_support\" target=\"_blank\" rel=\"noopener\">not<\/a><a href=\"http:\/\/nob2x.org\/\" target=\"_blank\" rel=\"noopener\"> everyone<\/a> supports this hard fork, this could well \u201csplit\u201d the Bitcoin network into two incompatible blockchains and currencies, not unlike Bitcoin and Bitcoin Cash (Bcash) did two months ago.<\/p>\n<p>But this NYA hard fork is controversial and not only because it lacks consensus. It\u2019s also controversial because of design choices made by the development team behind <a href=\"https:\/\/github.com\/btc1\" target=\"_blank\" rel=\"noopener\">BTC1<\/a>, the software client associated with the New York Agreement. Perhaps most importantly, this development team, led by <a href=\"https:\/\/www.bloq.com\/\" target=\"_blank\" rel=\"noopener\">Bloq<\/a> CEO Jeff Garzik, has so far refused to implement replay protection, a measure that Bcash did take. Partly for this reason, at least one NYA signatory \u2014<a href=\"https:\/\/www.wayniloans.com\/\" target=\"_blank\" rel=\"noopener\"> Wayniloans<\/a> \u2014 has <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-September\/000303.html\" target=\"_blank\" rel=\"noopener\">backed out<\/a> of the agreement.<\/p>\n<p>So what is replay protection, why should BTC1 implement it \u2026 and why doesn\u2019t it?<\/p>\n<h3>What Is Replay Protection? (And What Are Replay Attacks?)<\/h3>\n<p>Bitcoin could see another \u201csplit\u201d by November. (It\u2019s arguably more accurate to consider the \u201csplitting\u201d nodes and miners as an entirely new cryptocurrency with a new blockchain and token \u2014 not an actual split of Bitcoin itself.) For the purpose of this article, we\u2019ll refer to the blockchain and currency that follows the current Bitcoin protocol as \u201cLegacy Bitcoin\u201d and \u201cBTC.\u201d The blockchain and currency that follows the New York Agreement hard fork is referred to as \u201cSegWit2X\u201d and \u201cB2X.\u201d<\/p>\n<p>If this split happens, the two blockchains will be identical. All past transactions and (therefore) \u201cbalances\u201d are copied from the Legacy Bitcoin blockchain onto the SegWit2X blockchain. Everyone who owns BTC will own a corresponding amount of B2X.<\/p>\n<p>Without replay protection, new transactions will be equally valid on both chains as well. This means that these transactions can be copied or \u201creplayed,\u201d from one chain to the other \u2014 in other words, for them to happen on both. This is called a \u201creplay attack.\u201d<\/p>\n<p>So, let\u2019s say Alice holds BTC at the time of split, which means she also owns B2X after the split. Then, after the split, she wants to send BTC to Bob. So, she creates a transaction that spends BTC from one of her Legacy Bitcoin addresses to one of Bob\u2019s Legacy Bitcoin addresses. She then transmits this transaction over the Legacy Bitcoin network for a Legacy Bitcoin miner to pick it up and include in a Legacy Bitcoin block. The payment is confirmed; all is good.<\/p>\n<p>But this very same transaction is perfectly valid on the SegWit2X blockchain. Anyone \u2014 including Bob \u2014 can take Alice&#8217;s Legacy Bitcoin transaction and also transmit it over the SegWit2X network for a miner to include in a SegWit2X block. (This can even happen by accident quite easily.) If this payment is also confirmed, Alice has inadvertently sent Bob not only BTC but also an equal amount of B2X.<\/p>\n<p>And, of course, all of this is true in reverse as well. If Alice sends B2X to Bob, she might accidentally send him BTC as well. A lack of replay protection, therefore, is a problem for users of both chains. No one wants to accidentally send any money \u2014 not even if it was \u201cfree money.\u201d<\/p>\n<p>Technically, there are ways to \u201csplit\u201d coins on both chains to ensure they can only be spent on one chain. This would, for example, require newly mined coins to be mixed into a transaction. Tiime-locks can also offer solutions. But this takes effort and is not easy, especially for average users \u2014 not to mention that many average users may not even know what\u2019s going on in the first place.<\/p>\n<p>To avoid this kind of hassle, at least one side of the split could add a protocol rule to ensure that new transactions are valid on one chain but not the other. This is called replay protection.<\/p>\n<h3>Why Should BTC1 Implement Replay Protection? (And Why Not Bitcoin Core?)<\/h3>\n<p>In case of a split, at least one side must implement replay protection. But many \u2014 Bitcoin Core developers and others \u2014 believe there\u2019s only one viable option. It\u2019s the splitting party \u2014 in this case BTC1 \u2014 that should do it.<\/p>\n<p>There are several arguments for this.<\/p>\n<p>First of all, it makes the most sense for BTC1 to implement replay protection because that requires the least effort. BTC1 is a new client that\u2019s already implementing new protocol rules anyway, and it\u2019s not very widely deployed yet. It would be relatively easy for BTC1 to include replay protection.<\/p>\n<p>Meanwhile, it would not be sufficient for Bitcoin Core to implement replay protection on its own. While it is dominant, and even considered by some to be the protocol-defining reference implementation, Bitcoin Core is not the only Bitcoin implementation on the network. Bitcoin Knots, Bcoin, Libbitcoin and other alternative clients would all have to implement replay protection, too. (And that\u2019s not even taking non-full node clients into account.)<\/p>\n<p>But even more importantly, the reality of the current situation is that all deployed Bitcoin nodes do not have replay protection implemented. And logically, they can\u2019t: Some of these nodes even predate the New York Agreement. So even if Bitcoin Core and other implementations were to implement replay protection in new releases of their software, it wouldn\u2019t suffice. All users must then also update to this new version within about two months: a very short period of time for a network-wide upgrade.<\/p>\n<p>If only some of the nodes on the network upgrade to these new releases, Bitcoin could actually split in three: Legacy Bitcoin, SegWit2X and \u201cReplay Protected Bitcoin.\u201d Needless to say, this three-way split would probably make the problem worse \u2014 not better.<\/p>\n<p>Lastly, there is a bit of a philosophical argument. Anyone who wants to adopt new protocol rules, so the argument goes, has the responsibility to split off as safely as possible. This responsibility should not fall on those who want to keep using the existing protocol: They should be free to keep using the protocol as-is.<\/p>\n<p>Many developers \u2014 including <a href=\"https:\/\/www.rsk.co\/\" target=\"_blank\" rel=\"noopener\">RSK<\/a> founder <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-June\/000010.html\" target=\"_blank\" rel=\"noopener\">Sergio Lerner<\/a> who drafted the <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-dev\/2017-March\/013921.html\" target=\"_blank\" rel=\"noopener\">SegWit2Mb<\/a> proposal on which SegWit2X is based \u2014 have argued that BTC1 should implement replay protection. In fact, many developers think that any hard fork, even a hard fork that appears entirely uncontroversial, should implement replay protection.<\/p>\n<p>But so far, the BTC1 development team will <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-September\/000302.html\" target=\"_blank\" rel=\"noopener\">only consider<\/a> optional replay protection.<\/p>\n<h3>What\u2019s Wrong With Optional Replay Protection?<\/h3>\n<p>Implementing optional replay protection, as <a href=\"https:\/\/gist.github.com\/gavinandresen\/2a7474a3dd5b834ed3a7d10c74ec84c5\" target=\"_blank\" rel=\"noopener\">proposed<\/a> by former Bitcoin developer Gavin Andresen, for example, is currently <a href=\"https:\/\/github.com\/btc1\/bitcoin\/issues\/34\" target=\"_blank\" rel=\"noopener\">on the table<\/a> for BTC1.<\/p>\n<p>In short, this type of optional replay protection would make certain specially crafted (\u201cOP_RETURN\u201d) Legacy Bitcoin transactions invalid on the SegWit2X chain. Anyone who\u2019d want to split their coins could spend their BTC with such a transaction. These transactions should then confirm on the Legacy Bitcoin blockchain but not on the SegWit2X chain. This effectively splits the coins into different addresses (\u201coutputs\u201d) on both chains.<\/p>\n<p>Such optional replay protection is probably better than nothing at all, but it\u2019s still not a definitive solution.<\/p>\n<p>One problem is that the Legacy Bitcoin blockchain would have to include all these OP_RETURN transactions. This would probably result in more transactions on the network and would require extra data for each transaction. All this data must be transmitted, verified and (at least temporarily) stored by all Legacy Bitcoin nodes. It presents a burden to the Legacy Bitcoin network.<\/p>\n<p>But more importantly, it would probably still not be very easy to utilize this option. It might suffice for professional users \u2014 exchanges, wallet providers and other service providers \u2014 as well as tech-savvy individual users. But these are generally also the types of users that would be able to split their coins even without replay protection. Average users, if they are even aware of what\u2019s going on, would probably find it much more difficult to utilize optional replay protection.<\/p>\n<p>Optional replay protection, therefore, offers help to those who need it least and does little for those who need it most.<\/p>\n<h3>Does the NYA Preclude Replay Protection?<\/h3>\n<p>While it\u2019s unclear what was (or is) discussed behind closed doors, the New York Agreement seems to be a very minimal agreement. Published on May 23, 2017, it really only consists of two concrete points:<\/p>\n<ul>\n<li>Activate Segregated Witness at an 80 percent threshold, signaling at bit 4, and<\/li>\n<\/ul>\n<ul>\n<li>Activate a 2 MB hard fork within six months.<\/li>\n<\/ul>\n<p>With the first point completed through <a href=\"https:\/\/bitcoinmagazine.com\/articles\/bip91-segwit-activation-kludge-should-keep-bitcoin-whole\">BIP91<\/a>, the only remaining point is a hard fork to 2 megabytes before November 23. (This assumes that this hard fork wasn\u2019t completed with the creation of Bitcoin Cash which is supported by a number of NYA signatories.)<\/p>\n<p>Notably, a lot of details are not filled in. For example, the agreement does not even state that signatories must specifically run the BTC1 software: Any software implementation that implements a hard fork to 2 megabytes might do. This could even include a software implementation that implements replay protection. And, of course, nothing in the NYA stops BTC1 from implementing replay protection; some signatories may have even expected it.<\/p>\n<h3>Why Won\u2019t BTC1 Implement Replay Protection?<\/h3>\n<p>There are really several reasons why BTC1 \u2014 both stated and speculated \u2014 might not want to add replay protection.<\/p>\n<p>The first reason is that replay protection would require <a href=\"https:\/\/bitcoin.org\/en\/glossary\/simplified-payment-verification\" target=\"_blank\" rel=\"noopener\">simplified payment verification (SPV) wallets<\/a> and some other <a href=\"https:\/\/en.bitcoin.it\/wiki\/Thin_Client_Security\" target=\"_blank\" rel=\"noopener\">thin clients<\/a> to upgrade in order to send and receive transactions on SegWit2X. Replay protection would, therefore,<a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-July\/000246.html\" target=\"_blank\" rel=\"noopener\"> in the words of<\/a> BTC1 developer Jeff Garzik, \u201cbreak\u201d SPV wallets; they wouldn\u2019t be compatible with SegWit2X until upgraded.<\/p>\n<p>This framing and choice of words is disputed. If SegWit2X were to implement replay protection (and if SPV wallets don\u2019t upgrade), these wallets could still send and receive transactions on Legacy Bitcoin perfectly fine. On top of that, they wouldn\u2019t accidentally spend B2X when they don\u2019t mean to.<\/p>\n<p>Meanwhile, if the SegWit2X chain does not implement replay protection (and if SPV-wallets don\u2019t upgrade), users may not be sure if their wallet is receiving or sending BTC transactions or B2X transactions or both. They also may not be sure if the balance in their wallet is a BTC balance or a B2X balance or both. And if hash power moves from one chain to another over time, these wallets could even switch from displaying BTC balances to B2X balances or the other way round without users knowing. (This problem could be solved, to some extent, through <a href=\"https:\/\/github.com\/btc1\/bitcoin\/pull\/46\" target=\"_blank\" rel=\"noopener\">another workaround<\/a>, but this is not yet implemented in either.)<\/p>\n<p>Indeed, not implementing replay protection on SegWit2X could arguably \u201cbreak\u201d SPV wallets much worse.<\/p>\n<p>The only (plausible) scenario where implementing replay protection would perhaps not break SPV wallets much worse is if there is no Legacy Bitcoin to speak of. Indeed, the New York Agreement very specifically intends to \u201cupgrade\u201d Bitcoin, rather than split off into a new coin as Bcash did. And based on miner signaling and statements of intent by several big Bitcoin companies, some NYA signatories claim that Legacy Bitcoin will not be able to survive at all.<\/p>\n<p>Implementing replay protection is, therefore, sometimes considered an admission that SegWit2X will split off from (Legacy) Bitcoin into something new and will not be considered the upgraded version of Bitcoin.<\/p>\n<p>But the assumption that Legacy Bitcoin won\u2019t be able survive is a big one. In reality, miner signaling is <a href=\"https:\/\/bitcoinmagazine.com\/articles\/miners-are-signaling-support-new-york-agreement-heres-what-means\">effectively meaningless<\/a>, while Bitcoin Core \u2014 the dominant Bitcoin implementation \u2014<a href=\"https:\/\/en.bitcoin.it\/wiki\/Segwit_support\" target=\"_blank\" rel=\"noopener\"> will not<\/a> adopt the hard fork. There is also a <a href=\"http:\/\/nob2x.org\/\" target=\"_blank\" rel=\"noopener\">significant list<\/a> of companies that have not stated that they support the hard fork, including two top-10 <a href=\"https:\/\/bitcoinmagazine.com\/bitcoin-mining\/what-are-bitcoin-mining-pools\">mining pools<\/a>. Similarly, it\u2019s not clear if many (individual) users will support SegWit2X either. The implementation of wipe-out protection (another safety measure) also suggests that even BTC1 developers aren\u2019t so sure that there will only be one chain.<\/p>\n<p>And perhaps even more importantly, it\u2019s not clear that replay protection would affect any of this. If miners, developers, companies and users are to consider SegWit2X an upgrade of Bitcoin, they will probably do so with or without replay protection.<\/p>\n<p>This is why it has also been <a href=\"https:\/\/bitcoinmagazine.com\/articles\/no2x-breaking-bitcoin-shows-no-love-segwit2x-hard-fork-paris\">suggested<\/a> that BTC1 is rejecting replay protection for the specific purpose of being as disruptive as possible. If the Legacy Bitcoin chain is effectively made unusable, SegWit2X might stand the best chance of being recognized as \u201cBitcoin.\u201d<\/p>\n<p><em>For more information and debate on replay protection, also see the <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-July\/000196.html\" target=\"_blank\" rel=\"noopener\">the<\/a><a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-July\/000206.html\" target=\"_blank\" rel=\"noopener\"> relevant<\/a><a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/bitcoin-segwit2x\/2017-August\/000298.html\" target=\"_blank\" rel=\"noopener\"> threads<\/a> on the SegWit2X mailing list.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Come November, the remaining signatories of the \u201cNew York Agreement\u201d (NYA) plan to deploy the \u201cSegWit2X\u201d hard fork to double Bitcoin\u2019s block weight limit, allowing for up to 8 megabytes of block space. Since not everyone supports this hard fork, this could well \u201csplit\u201d the Bitcoin network into two incompatible blockchains and currencies, not unlike [&hellip;]<\/p>\n","protected":false},"author":2509,"featured_media":23176,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[1038,2924,3329,1079,3330],"class_list":{"0":"post-23175","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-culture","8":"tag-core","9":"tag-new-york","10":"tag-new-york-agreement","11":"tag-segwit","12":"tag-segwit2x"},"author_data":{"id":2509,"name":"Aaron van Wirdum","nicename":"aaron-van-wirdum","avatar_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/12\/aaron-van-wirdum-96x96.jpg"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/segwit2x-and-the-case-for-strong-replay-protection-and-why-its-controversial.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/23175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/2509"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=23175"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/23175\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/23176"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=23175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=23175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=23175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}