<oembed><type>rich</type><version>1.0</version><author_name>npub149tvqh6gesh22h60jrehl5clrxscx6q65wznq9ty6pae8sxq00esg5vasy</author_name><author_url>https://nostr.ae/npub149tvqh6gesh22h60jrehl5clrxscx6q65wznq9ty6pae8sxq00esg5vasy</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-06-07&#xA;📝 Original message:I think this BIP represents a gamble, and the gamble may not be a good&#xA;one.  The gamble here is that if the segwit2x changes are rolled out&#xA;on time, and if the signatories accept the bit4 + bit1 signaling&#xA;proposals within BIP91, the launch will go smoother, as intended.  But&#xA;conversely, if either the segwit2x signatories balk about the Bit1&#xA;signaling OR if the timelines for segwit2mb are missed even by a bit,&#xA;it may cause the BIP148 chainsplit to be worse than it would be&#xA;without.  Given the frequent concerns raised in multiple places about&#xA;the aggressiveness of the segwit2x timelines, including the&#xA;non-hardfork timelines, this does not seem like a great gamble to be&#xA;making.&#xA;&#xA;The reason I say it may make the chainsplit be worse than it would&#xA;otherwise be is that it may provide a false sense of safety for BIP148&#xA;that currently does not currently exist(and should not, as it is a&#xA;chainsplit).  That sense of safety would only be legitimate if the&#xA;segwit2x signatories were on board, and the segwit2x code effectively&#xA;enforced BIP148 simultaneously, neither of which are guaranteed.  If&#xA;users and more miners had a false sense that BIP148 was *not* going to&#xA;chainsplit from default / segwit2x, they might not follow the news if&#xA;suddenly the segwit2x plan were delayed for a few days.  While any&#xA;additional support would definitely be cheered on by BIP148&#xA;supporters, the practical reality might be that this proposal would&#xA;take BIP148 from the &#34;unlikely to have any viable chain after flag day&#xA;without segwit2x&#34; category into the &#34;small but viable minority chain&#34;&#xA;category, and even worse, it might strengthen the chainsplit just days&#xA;before segwit is activated on BOTH chains, putting the BIP148&#xA;supporters on the wrong pro-segwit, but still-viable chain.&#xA;&#xA;If Core had taken a strong stance to include BIP148 into the client,&#xA;and if BIP148 support were much much broader, I would feel differently&#xA;as the gamble would be more likely to discourage a chainsplit (By&#xA;forcing the acceleration of segwit2x) rather than encourage it (by&#xA;strengthening an extreme minority chainsplit that may wind up on the&#xA;wrong side of two segwit-activated chains).  As it stands now, this&#xA;seems like a very dangerous attempt to compromise with a small but&#xA;vocal group that are the ones creating the threat to begin with.&#xA;&#xA;Jared&#xA;&#xA;On Tue, Jun 6, 2017 at 5:56 PM, James Hilliard via bitcoin-dev&#xA;&lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; Due to the proposed calendar(https://segwit2x.github.io/) for the&#xA;&gt; SegWit2x agreement being too slow to activate SegWit mandatory&#xA;&gt; signalling ahead of BIP148 using BIP91 I would like to propose another&#xA;&gt; option that miners can use to prevent a chain split ahead of the Aug&#xA;&gt; 1st BIP148 activation date.&#xA;&gt;&#xA;&gt; The splitprotection soft fork is essentially BIP91 but using BIP8&#xA;&gt; instead of BIP9 with a lower activation threshold and immediate&#xA;&gt; mandatory signalling lock-in. This allows for a majority of miners to&#xA;&gt; activate mandatory SegWit signalling and prevent a potential chain&#xA;&gt; split ahead of BIP148 activation.&#xA;&gt;&#xA;&gt; This BIP allows for miners to respond to market forces quickly ahead&#xA;&gt; of BIP148 activation by signalling for splitprotection. Any miners&#xA;&gt; already running BIP148 should be encouraged to use splitprotection.&#xA;&gt;&#xA;&gt; &lt;pre&gt;&#xA;&gt;   BIP: splitprotection&#xA;&gt;   Layer: Consensus (soft fork)&#xA;&gt;   Title: User Activated Soft Fork Split Protection&#xA;&gt;   Author: James Hilliard &lt;james.hilliard1 at gmail.com&gt;&#xA;&gt;   Comments-Summary: No comments yet.&#xA;&gt;   Comments-URI:&#xA;&gt;   Status: Draft&#xA;&gt;   Type: Standards Track&#xA;&gt;   Created: 2017-05-22&#xA;&gt;   License: BSD-3-Clause&#xA;&gt;            CC0-1.0&#xA;&gt; &lt;/pre&gt;&#xA;&gt;&#xA;&gt; ==Abstract==&#xA;&gt;&#xA;&gt; This document specifies a coordination mechanism for a simple majority&#xA;&gt; of miners to prevent a chain split ahead of BIP148 activation.&#xA;&gt;&#xA;&gt; ==Definitions==&#xA;&gt;&#xA;&gt; &#34;existing segwit deployment&#34; refer to the BIP9 &#34;segwit&#34; deployment&#xA;&gt; using bit 1, between November 15th 2016 and November 15th 2017 to&#xA;&gt; activate BIP141, BIP143 and BIP147.&#xA;&gt;&#xA;&gt; ==Motivation==&#xA;&gt;&#xA;&gt; The biggest risk of BIP148 is an extended chain split, this BIP&#xA;&gt; provides a way for a simple majority of miners to eliminate that risk.&#xA;&gt;&#xA;&gt; This BIP provides a way for a simple majority of miners to coordinate&#xA;&gt; activation of the existing segwit deployment with less than 95%&#xA;&gt; hashpower before BIP148 activation. Due to time constraints unless&#xA;&gt; immediately deployed BIP91 will likely not be able to enforce&#xA;&gt; mandatory signalling of segwit before the Aug 1st activation of&#xA;&gt; BIP148. This BIP provides a method for rapid miner activation of&#xA;&gt; SegWit mandatory signalling ahead of the BIP148 activation date. Since&#xA;&gt; the primary goal of this BIP is to reduce the chance of an extended&#xA;&gt; chain split as much as possible we activate using a simple miner&#xA;&gt; majority of 65% over a 504 block interval rather than a higher&#xA;&gt; percentage. This BIP also allows miners to signal their intention to&#xA;&gt; run BIP148 in order to prevent a chain split.&#xA;&gt;&#xA;&gt; ==Specification==&#xA;&gt;&#xA;&gt; While this BIP is active, all blocks must set the nVersion header top&#xA;&gt; 3 bits to 001 together with bit field (1&lt;&lt;1) (according to the&#xA;&gt; existing segwit deployment). Blocks that do not signal as required&#xA;&gt; will be rejected.&#xA;&gt;&#xA;&gt; ==Deployment==&#xA;&gt;&#xA;&gt; This BIP will be deployed by &#34;version bits&#34; with a 65%(this can be&#xA;&gt; adjusted if desired) activation threshold BIP9 with the name&#xA;&gt; &#34;splitprotecion&#34; and using bit 2.&#xA;&gt;&#xA;&gt; This BIP starts immediately and is a BIP8 style soft fork since&#xA;&gt; mandatory signalling will start on midnight August 1st 2017 (epoch&#xA;&gt; time 1501545600) regardless of whether or not this BIP has reached its&#xA;&gt; own signalling threshold. This BIP will cease to be active when segwit&#xA;&gt; is locked-in.&#xA;&gt;&#xA;&gt; === Reference implementation ===&#xA;&gt;&#xA;&gt; &lt;pre&gt;&#xA;&gt; // Check if Segregated Witness is Locked In&#xA;&gt; bool IsWitnessLockedIn(const CBlockIndex* pindexPrev, const&#xA;&gt; Consensus::Params&amp; params)&#xA;&gt; {&#xA;&gt;     LOCK(cs_main);&#xA;&gt;     return (VersionBitsState(pindexPrev, params,&#xA;&gt; Consensus::DEPLOYMENT_SEGWIT, versionbitscache) ==&#xA;&gt; THRESHOLD_LOCKED_IN);&#xA;&gt; }&#xA;&gt;&#xA;&gt; // SPLITPROTECTION mandatory segwit signalling.&#xA;&gt; if ( VersionBitsState(pindex-&gt;pprev, chainparams.GetConsensus(),&#xA;&gt; Consensus::DEPLOYMENT_SPLITPROTECTION, versionbitscache) ==&#xA;&gt; THRESHOLD_LOCKED_IN &amp;&amp;&#xA;&gt;      !IsWitnessLockedIn(pindex-&gt;pprev, chainparams.GetConsensus()) &amp;&amp;&#xA;&gt; // Segwit is not locked in&#xA;&gt;      !IsWitnessEnabled(pindex-&gt;pprev, chainparams.GetConsensus()) ) //&#xA;&gt; and is not active.&#xA;&gt; {&#xA;&gt;     bool fVersionBits = (pindex-&gt;nVersion &amp; VERSIONBITS_TOP_MASK) ==&#xA;&gt; VERSIONBITS_TOP_BITS;&#xA;&gt;     bool fSegbit = (pindex-&gt;nVersion &amp;&#xA;&gt; VersionBitsMask(chainparams.GetConsensus(),&#xA;&gt; Consensus::DEPLOYMENT_SEGWIT)) != 0;&#xA;&gt;     if (!(fVersionBits &amp;&amp; fSegbit)) {&#xA;&gt;         return state.DoS(0, error(&#34;ConnectBlock(): relayed block must&#xA;&gt; signal for segwit, please upgrade&#34;), REJECT_INVALID, &#34;bad-no-segwit&#34;);&#xA;&gt;     }&#xA;&gt; }&#xA;&gt;&#xA;&gt; // BIP148 mandatory segwit signalling.&#xA;&gt; int64_t nMedianTimePast = pindex-&gt;GetMedianTimePast();&#xA;&gt; if ( (nMedianTimePast &gt;= 1501545600) &amp;&amp;  // Tue 01 Aug 2017 00:00:00 UTC&#xA;&gt;      (nMedianTimePast &lt;= 1510704000) &amp;&amp;  // Wed 15 Nov 2017 00:00:00 UTC&#xA;&gt;      (!IsWitnessLockedIn(pindex-&gt;pprev, chainparams.GetConsensus()) &amp;&amp;&#xA;&gt;  // Segwit is not locked in&#xA;&gt;       !IsWitnessEnabled(pindex-&gt;pprev, chainparams.GetConsensus())) )&#xA;&gt;  // and is not active.&#xA;&gt; {&#xA;&gt;     bool fVersionBits = (pindex-&gt;nVersion &amp; VERSIONBITS_TOP_MASK) ==&#xA;&gt; VERSIONBITS_TOP_BITS;&#xA;&gt;     bool fSegbit = (pindex-&gt;nVersion &amp;&#xA;&gt; VersionBitsMask(chainparams.GetConsensus(),&#xA;&gt; Consensus::DEPLOYMENT_SEGWIT)) != 0;&#xA;&gt;     if (!(fVersionBits &amp;&amp; fSegbit)) {&#xA;&gt;         return state.DoS(0, error(&#34;ConnectBlock(): relayed block must&#xA;&gt; signal for segwit, please upgrade&#34;), REJECT_INVALID, &#34;bad-no-segwit&#34;);&#xA;&gt;     }&#xA;&gt; }&#xA;&gt; &lt;/pre&gt;&#xA;&gt;&#xA;&gt; https://github.com/bitcoin/bitcoin/compare/0.14...jameshilliard:splitprotection-v0.14.1&#xA;&gt;&#xA;&gt; ==Backwards Compatibility==&#xA;&gt;&#xA;&gt; This deployment is compatible with the existing &#34;segwit&#34; bit 1&#xA;&gt; deployment scheduled between midnight November 15th, 2016 and midnight&#xA;&gt; November 15th, 2017. This deployment is also compatible with the&#xA;&gt; existing BIP148 deployment. This BIP is compatible with BIP91 only if&#xA;&gt; BIP91 activates before it and before BIP148. Miners will need to&#xA;&gt; upgrade their nodes to support splitprotection otherwise they may&#xA;&gt; build on top of an invalid block. While this bip is active users&#xA;&gt; should either upgrade to splitprotection or wait for additional&#xA;&gt; confirmations when accepting payments.&#xA;&gt;&#xA;&gt; ==Rationale==&#xA;&gt;&#xA;&gt; Historically we have used IsSuperMajority() to activate soft forks&#xA;&gt; such as BIP66 which has a mandatory signalling requirement for miners&#xA;&gt; once activated, this ensures that miners are aware of new rules being&#xA;&gt; enforced. This technique can be leveraged to lower the signalling&#xA;&gt; threshold of a soft fork while it is in the process of being deployed&#xA;&gt; in a backwards compatible way. We also use a BIP8 style timeout to&#xA;&gt; ensure that this BIP is compatible with BIP148 and that BIP148&#xA;&gt; compatible mandatory signalling activates regardless of miner&#xA;&gt; signalling levels.&#xA;&gt;&#xA;&gt; By orphaning non-signalling blocks during the BIP9 bit 1 &#34;segwit&#34;&#xA;&gt; deployment, this BIP can cause the existing &#34;segwit&#34; deployment to&#xA;&gt; activate without needing to release a new deployment. As we approach&#xA;&gt; BIP148 activation it may be desirable for a majority of miners to have&#xA;&gt; a method that will ensure that there is no chain split.&#xA;&gt;&#xA;&gt; ==References==&#xA;&gt;&#xA;&gt; *[https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-March/013714.html&#xA;&gt; Mailing list discussion]&#xA;&gt; *[https://github.com/bitcoin/bitcoin/blob/v0.6.0/src/main.cpp#L1281-L1283&#xA;&gt; P2SH flag day activation]&#xA;&gt; *[[bip-0009.mediawiki|BIP9 Version bits with timeout and delay]]&#xA;&gt; *[[bip-0016.mediawiki|BIP16 Pay to Script Hash]]&#xA;&gt; *[[bip-0091.mediawiki|BIP91 Reduced threshold Segwit MASF]]&#xA;&gt; *[[bip-0141.mediawiki|BIP141 Segregated Witness (Consensus layer)]]&#xA;&gt; *[[bip-0143.mediawiki|BIP143 Transaction Signature Verification for&#xA;&gt; Version 0 Witness Program]]&#xA;&gt; *[[bip-0147.mediawiki|BIP147 Dealing with dummy stack element malleability]]&#xA;&gt; *[[bip-0148.mediawiki|BIP148 Mandatory activation of segwit deployment]]&#xA;&gt; *[[bip-0149.mediawiki|BIP149 Segregated Witness (second deployment)]]&#xA;&gt; *[https://bitcoincore.org/en/2016/01/26/segwit-benefits/ Segwit benefits]&#xA;&gt;&#xA;&gt; ==Copyright==&#xA;&gt;&#xA;&gt; This document is dual licensed as BSD 3-clause, and Creative Commons&#xA;&gt; CC0 1.0 Universal.&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</html></oembed>