<oembed><type>rich</type><version>1.0</version><author_name>npub1mlpmsc5sm93tw2fp2dhhuwmxcqm59wz6hjg5g3afq5rucfll3f9sh4yf8d</author_name><author_url>https://nostr.ae/npub1mlpmsc5sm93tw2fp2dhhuwmxcqm59wz6hjg5g3afq5rucfll3f9sh4yf8d</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-06-07&#xA;📝 Original message:While this isn&#39;t an unreasonable proposal, it will orphan blocks from any&#xA;miner who isn&#39;t running it (or BIP148) by Aug 1, right?  That seems rather&#xA;rushed for a non-backwards-compatible SF, especially since in practice,&#xA;miners are unlikely to deploy it until it comes bundled with some version&#xA;of the Segwit2x HF code.&#xA;&#xA;I realize this is a touchy topic but - how much hard evidence is there that&#xA;there *will* be significant disruption if miners simply ignore both this&#xA;and BIP148?  Correct me but afaict, BIP148 has ~0% hashrate support.&#xA;&#xA;Unless the HF code is ready and agree on soon (say by Jul 1), my vote is to&#xA;keep the main chain backwards-compatible, especially if evidence of miner&#xA;support for BIP148 doesn&#39;t materialize soon.  It seems less disruptive for&#xA;recently-deployed BIP148 nodes to revert than to ask every miner in the&#xA;system to quickly upgrade or get orphaned.&#xA;&#xA;Just my view, I respect that others will differ.&#xA;&#xA;&#xA;On Tue, Jun 6, 2017 at 9:54 PM, James Hilliard via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; This is a BIP8 style soft fork so mandatory signalling will be active&#xA;&gt; after Aug 1st regardless.&#xA;&gt;&#xA;&gt; On Tue, Jun 6, 2017 at 8:51 PM, Tao Effect &lt;contact at taoeffect.com&gt; wrote:&#xA;&gt; &gt; What is the probability that a 65% threshold is too low and can allow a&#xA;&gt; &gt; &#34;surprise miner attack&#34;, whereby miners are kept offline before the&#xA;&gt; &gt; deadline, and brought online immediately after, creating potential havoc?&#xA;&gt; &gt;&#xA;&gt; &gt; (Nit: &#34;simple majority&#34; usually refers to &gt;50%, I think, might cause&#xA;&gt; &gt; confusion.)&#xA;&gt; &gt;&#xA;&gt; &gt; -Greg Slepak&#xA;&gt; &gt;&#xA;&gt; &gt; --&#xA;&gt; &gt; Please do not email me anything that you are not comfortable also sharing&#xA;&gt; &gt; with the NSA.&#xA;&gt; &gt;&#xA;&gt; &gt; On Jun 6, 2017, at 5:56 PM, James Hilliard via bitcoin-dev&#xA;&gt; &gt; &lt;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt; &gt;&#xA;&gt; &gt; Due to the proposed calendar(https://segwit2x.github.io/) for the&#xA;&gt; &gt; SegWit2x agreement being too slow to activate SegWit mandatory&#xA;&gt; &gt; signalling ahead of BIP148 using BIP91 I would like to propose another&#xA;&gt; &gt; option that miners can use to prevent a chain split ahead of the Aug&#xA;&gt; &gt; 1st BIP148 activation date.&#xA;&gt; &gt;&#xA;&gt; &gt; The splitprotection soft fork is essentially BIP91 but using BIP8&#xA;&gt; &gt; instead of BIP9 with a lower activation threshold and immediate&#xA;&gt; &gt; mandatory signalling lock-in. This allows for a majority of miners to&#xA;&gt; &gt; activate mandatory SegWit signalling and prevent a potential chain&#xA;&gt; &gt; split ahead of BIP148 activation.&#xA;&gt; &gt;&#xA;&gt; &gt; This BIP allows for miners to respond to market forces quickly ahead&#xA;&gt; &gt; of BIP148 activation by signalling for splitprotection. Any miners&#xA;&gt; &gt; already running BIP148 should be encouraged to use splitprotection.&#xA;&gt; &gt;&#xA;&gt; &gt; &lt;pre&gt;&#xA;&gt; &gt;  BIP: splitprotection&#xA;&gt; &gt;  Layer: Consensus (soft fork)&#xA;&gt; &gt;  Title: User Activated Soft Fork Split Protection&#xA;&gt; &gt;  Author: James Hilliard &lt;james.hilliard1 at gmail.com&gt;&#xA;&gt; &gt;  Comments-Summary: No comments yet.&#xA;&gt; &gt;  Comments-URI:&#xA;&gt; &gt;  Status: Draft&#xA;&gt; &gt;  Type: Standards Track&#xA;&gt; &gt;  Created: 2017-05-22&#xA;&gt; &gt;  License: BSD-3-Clause&#xA;&gt; &gt;           CC0-1.0&#xA;&gt; &gt; &lt;/pre&gt;&#xA;&gt; &gt;&#xA;&gt; &gt; ==Abstract==&#xA;&gt; &gt;&#xA;&gt; &gt; This document specifies a coordination mechanism for a simple majority&#xA;&gt; &gt; of miners to prevent a chain split ahead of BIP148 activation.&#xA;&gt; &gt;&#xA;&gt; &gt; ==Definitions==&#xA;&gt; &gt;&#xA;&gt; &gt; &#34;existing segwit deployment&#34; refer to the BIP9 &#34;segwit&#34; deployment&#xA;&gt; &gt; using bit 1, between November 15th 2016 and November 15th 2017 to&#xA;&gt; &gt; activate BIP141, BIP143 and BIP147.&#xA;&gt; &gt;&#xA;&gt; &gt; ==Motivation==&#xA;&gt; &gt;&#xA;&gt; &gt; The biggest risk of BIP148 is an extended chain split, this BIP&#xA;&gt; &gt; provides a way for a simple majority of miners to eliminate that risk.&#xA;&gt; &gt;&#xA;&gt; &gt; This BIP provides a way for a simple majority of miners to coordinate&#xA;&gt; &gt; activation of the existing segwit deployment with less than 95%&#xA;&gt; &gt; hashpower before BIP148 activation. Due to time constraints unless&#xA;&gt; &gt; immediately deployed BIP91 will likely not be able to enforce&#xA;&gt; &gt; mandatory signalling of segwit before the Aug 1st activation of&#xA;&gt; &gt; BIP148. This BIP provides a method for rapid miner activation of&#xA;&gt; &gt; SegWit mandatory signalling ahead of the BIP148 activation date. Since&#xA;&gt; &gt; the primary goal of this BIP is to reduce the chance of an extended&#xA;&gt; &gt; chain split as much as possible we activate using a simple miner&#xA;&gt; &gt; majority of 65% over a 504 block interval rather than a higher&#xA;&gt; &gt; percentage. This BIP also allows miners to signal their intention to&#xA;&gt; &gt; run BIP148 in order to prevent a chain split.&#xA;&gt; &gt;&#xA;&gt; &gt; ==Specification==&#xA;&gt; &gt;&#xA;&gt; &gt; While this BIP is active, all blocks must set the nVersion header top&#xA;&gt; &gt; 3 bits to 001 together with bit field (1&lt;&lt;1) (according to the&#xA;&gt; &gt; existing segwit deployment). Blocks that do not signal as required&#xA;&gt; &gt; will be rejected.&#xA;&gt; &gt;&#xA;&gt; &gt; ==Deployment==&#xA;&gt; &gt;&#xA;&gt; &gt; This BIP will be deployed by &#34;version bits&#34; with a 65%(this can be&#xA;&gt; &gt; adjusted if desired) activation threshold BIP9 with the name&#xA;&gt; &gt; &#34;splitprotecion&#34; and using bit 2.&#xA;&gt; &gt;&#xA;&gt; &gt; This BIP starts immediately and is a BIP8 style soft fork since&#xA;&gt; &gt; mandatory signalling will start on midnight August 1st 2017 (epoch&#xA;&gt; &gt; time 1501545600) regardless of whether or not this BIP has reached its&#xA;&gt; &gt; own signalling threshold. This BIP will cease to be active when segwit&#xA;&gt; &gt; is locked-in.&#xA;&gt; &gt;&#xA;&gt; &gt; === Reference implementation ===&#xA;&gt; &gt;&#xA;&gt; &gt; &lt;pre&gt;&#xA;&gt; &gt; // Check if Segregated Witness is Locked In&#xA;&gt; &gt; bool IsWitnessLockedIn(const CBlockIndex* pindexPrev, const&#xA;&gt; &gt; Consensus::Params&amp; params)&#xA;&gt; &gt; {&#xA;&gt; &gt;    LOCK(cs_main);&#xA;&gt; &gt;    return (VersionBitsState(pindexPrev, params,&#xA;&gt; &gt; Consensus::DEPLOYMENT_SEGWIT, versionbitscache) ==&#xA;&gt; &gt; THRESHOLD_LOCKED_IN);&#xA;&gt; &gt; }&#xA;&gt; &gt;&#xA;&gt; &gt; // SPLITPROTECTION mandatory segwit signalling.&#xA;&gt; &gt; if ( VersionBitsState(pindex-&gt;pprev, chainparams.GetConsensus(),&#xA;&gt; &gt; Consensus::DEPLOYMENT_SPLITPROTECTION, versionbitscache) ==&#xA;&gt; &gt; THRESHOLD_LOCKED_IN &amp;&amp;&#xA;&gt; &gt;     !IsWitnessLockedIn(pindex-&gt;pprev, chainparams.GetConsensus()) &amp;&amp;&#xA;&gt; &gt; // Segwit is not locked in&#xA;&gt; &gt;     !IsWitnessEnabled(pindex-&gt;pprev, chainparams.GetConsensus()) ) //&#xA;&gt; &gt; and is not active.&#xA;&gt; &gt; {&#xA;&gt; &gt;    bool fVersionBits = (pindex-&gt;nVersion &amp; VERSIONBITS_TOP_MASK) ==&#xA;&gt; &gt; VERSIONBITS_TOP_BITS;&#xA;&gt; &gt;    bool fSegbit = (pindex-&gt;nVersion &amp;&#xA;&gt; &gt; VersionBitsMask(chainparams.GetConsensus(),&#xA;&gt; &gt; Consensus::DEPLOYMENT_SEGWIT)) != 0;&#xA;&gt; &gt;    if (!(fVersionBits &amp;&amp; fSegbit)) {&#xA;&gt; &gt;        return state.DoS(0, error(&#34;ConnectBlock(): relayed block must&#xA;&gt; &gt; signal for segwit, please upgrade&#34;), REJECT_INVALID, &#34;bad-no-segwit&#34;);&#xA;&gt; &gt;    }&#xA;&gt; &gt; }&#xA;&gt; &gt;&#xA;&gt; &gt; // BIP148 mandatory segwit signalling.&#xA;&gt; &gt; int64_t nMedianTimePast = pindex-&gt;GetMedianTimePast();&#xA;&gt; &gt; if ( (nMedianTimePast &gt;= 1501545600) &amp;&amp;  // Tue 01 Aug 2017 00:00:00 UTC&#xA;&gt; &gt;     (nMedianTimePast &lt;= 1510704000) &amp;&amp;  // Wed 15 Nov 2017 00:00:00 UTC&#xA;&gt; &gt;     (!IsWitnessLockedIn(pindex-&gt;pprev, chainparams.GetConsensus()) &amp;&amp;&#xA;&gt; &gt; // Segwit is not locked in&#xA;&gt; &gt;      !IsWitnessEnabled(pindex-&gt;pprev, chainparams.GetConsensus())) )&#xA;&gt; &gt; // and is not active.&#xA;&gt; &gt; {&#xA;&gt; &gt;    bool fVersionBits = (pindex-&gt;nVersion &amp; VERSIONBITS_TOP_MASK) ==&#xA;&gt; &gt; VERSIONBITS_TOP_BITS;&#xA;&gt; &gt;    bool fSegbit = (pindex-&gt;nVersion &amp;&#xA;&gt; &gt; VersionBitsMask(chainparams.GetConsensus(),&#xA;&gt; &gt; Consensus::DEPLOYMENT_SEGWIT)) != 0;&#xA;&gt; &gt;    if (!(fVersionBits &amp;&amp; fSegbit)) {&#xA;&gt; &gt;        return state.DoS(0, error(&#34;ConnectBlock(): relayed block must&#xA;&gt; &gt; signal for segwit, please upgrade&#34;), REJECT_INVALID, &#34;bad-no-segwit&#34;);&#xA;&gt; &gt;    }&#xA;&gt; &gt; }&#xA;&gt; &gt; &lt;/pre&gt;&#xA;&gt; &gt;&#xA;&gt; &gt; https://github.com/bitcoin/bitcoin/compare/0.14...&#xA;&gt; jameshilliard:splitprotection-v0.14.1&#xA;&gt; &gt;&#xA;&gt; &gt; ==Backwards Compatibility==&#xA;&gt; &gt;&#xA;&gt; &gt; This deployment is compatible with the existing &#34;segwit&#34; bit 1&#xA;&gt; &gt; deployment scheduled between midnight November 15th, 2016 and midnight&#xA;&gt; &gt; November 15th, 2017. This deployment is also compatible with the&#xA;&gt; &gt; existing BIP148 deployment. This BIP is compatible with BIP91 only if&#xA;&gt; &gt; BIP91 activates before it and before BIP148. Miners will need to&#xA;&gt; &gt; upgrade their nodes to support splitprotection otherwise they may&#xA;&gt; &gt; build on top of an invalid block. While this bip is active users&#xA;&gt; &gt; should either upgrade to splitprotection or wait for additional&#xA;&gt; &gt; confirmations when accepting payments.&#xA;&gt; &gt;&#xA;&gt; &gt; ==Rationale==&#xA;&gt; &gt;&#xA;&gt; &gt; Historically we have used IsSuperMajority() to activate soft forks&#xA;&gt; &gt; such as BIP66 which has a mandatory signalling requirement for miners&#xA;&gt; &gt; once activated, this ensures that miners are aware of new rules being&#xA;&gt; &gt; enforced. This technique can be leveraged to lower the signalling&#xA;&gt; &gt; threshold of a soft fork while it is in the process of being deployed&#xA;&gt; &gt; in a backwards compatible way. We also use a BIP8 style timeout to&#xA;&gt; &gt; ensure that this BIP is compatible with BIP148 and that BIP148&#xA;&gt; &gt; compatible mandatory signalling activates regardless of miner&#xA;&gt; &gt; signalling levels.&#xA;&gt; &gt;&#xA;&gt; &gt; By orphaning non-signalling blocks during the BIP9 bit 1 &#34;segwit&#34;&#xA;&gt; &gt; deployment, this BIP can cause the existing &#34;segwit&#34; deployment to&#xA;&gt; &gt; activate without needing to release a new deployment. As we approach&#xA;&gt; &gt; BIP148 activation it may be desirable for a majority of miners to have&#xA;&gt; &gt; a method that will ensure that there is no chain split.&#xA;&gt; &gt;&#xA;&gt; &gt; ==References==&#xA;&gt; &gt;&#xA;&gt; &gt; *[https://lists.linuxfoundation.org/pipermail/&#xA;&gt; bitcoin-dev/2017-March/013714.html&#xA;&gt; &gt; Mailing list discussion]&#xA;&gt; &gt; *[https://github.com/bitcoin/bitcoin/blob/v0.6.0/src/main.&#xA;&gt; cpp#L1281-L1283&#xA;&gt; &gt; P2SH flag day activation]&#xA;&gt; &gt; *[[bip-0009.mediawiki|BIP9 Version bits with timeout and delay]]&#xA;&gt; &gt; *[[bip-0016.mediawiki|BIP16 Pay to Script Hash]]&#xA;&gt; &gt; *[[bip-0091.mediawiki|BIP91 Reduced threshold Segwit MASF]]&#xA;&gt; &gt; *[[bip-0141.mediawiki|BIP141 Segregated Witness (Consensus layer)]]&#xA;&gt; &gt; *[[bip-0143.mediawiki|BIP143 Transaction Signature Verification for&#xA;&gt; &gt; Version 0 Witness Program]]&#xA;&gt; &gt; *[[bip-0147.mediawiki|BIP147 Dealing with dummy stack element&#xA;&gt; malleability]]&#xA;&gt; &gt; *[[bip-0148.mediawiki|BIP148 Mandatory activation of segwit deployment]]&#xA;&gt; &gt; *[[bip-0149.mediawiki|BIP149 Segregated Witness (second deployment)]]&#xA;&gt; &gt; *[https://bitcoincore.org/en/2016/01/26/segwit-benefits/ Segwit&#xA;&gt; benefits]&#xA;&gt; &gt;&#xA;&gt; &gt; ==Copyright==&#xA;&gt; &gt;&#xA;&gt; &gt; This document is dual licensed as BSD 3-clause, and Creative Commons&#xA;&gt; &gt; CC0 1.0 Universal.&#xA;&gt; &gt; _______________________________________________&#xA;&gt; &gt; bitcoin-dev mailing list&#xA;&gt; &gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; &gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt; &gt;&#xA;&gt; &gt;&#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&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20170607/27553471/attachment-0001.html&gt;</html></oembed>