Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 7139CA1D for ; Sat, 19 Dec 2015 16:49:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from s47.web-hosting.com (s47.web-hosting.com [199.188.200.16]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C35C689 for ; Sat, 19 Dec 2015 16:49:26 +0000 (UTC) Received: from localhost ([::1]:51739 helo=server47.web-hosting.com) by server47.web-hosting.com with esmtpa (Exim 4.85) (envelope-from ) id 1aAKhB-000xYT-G0 for bitcoin-dev@lists.linuxfoundation.org; Sat, 19 Dec 2015 11:49:25 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 19 Dec 2015 11:49:25 -0500 From: jl2012 To: bitcoin-dev@lists.linuxfoundation.org Message-ID: X-Sender: jl2012@xbt.hk User-Agent: Roundcube Webmail/1.0.5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server47.web-hosting.com X-AntiAbuse: Original Domain - lists.linuxfoundation.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - xbt.hk X-Get-Message-Sender-Via: server47.web-hosting.com: authenticated_id: jl2012@xbt.hk X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Sat, 19 Dec 2015 17:38:44 +0000 Subject: [bitcoin-dev] Segregated witness softfork with moderate adoption has very small block size effect X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 16:49:27 -0000 I have done some calculation for the effect of a SW softfork on the actual total block size. Definitions: Core block size (CBS): The block size as seen by a non-upgrading full node Witness size (WS): The total size of witness in a block Total block size (TBS): CBS + WS Witness discount (WD): A discount factor for witness for calculation of VBS (1 = no discount) Virtual block size (VBS): CBS + (WS * WD) Witness adoption (WA): Proportion of new format transactions among all transactions Prunable ratio (PR): Proportion of signature data size in a transaction With some transformation it could be shown that: TBS = CBS / (1 - WA * PR) = VBS / (1 - WA * PR * (1 - WD)) sipa suggested a WD of 25%. The PR heavily depends on the transaction script type and input-output ratio. For example, the PR of 1-in 2-out P2PKH and 1-in 1-out 2-of-2 multisig P2SH are about 47% and 72% respectively. According to sipa's presentation, the current average PR on the blockchain is about 60%. Assuming WD=25% and PR=60%, the MAX TBS with different MAX VBS and WA is listed at: http://i.imgur.com/4bgTMRO.png The highlight indicates whether the CBS or VBS is the limiting factor. With moderate SW adoption at 40-60%, the total block size is 1.32-1.56MB when MAX VBS is 1.25MB, and 1.22-1.37MB when MAX VBS is 1.00MB. P2SH has been introduced for 3.5 years and only about 10% of bitcoin is stored this way (I can't find proportion of existing P2SH address). A 1-year adoption rate of 40% for segwit is clearly over-optimistic unless the tx fee becomes really high. (btw the PR of 60% may also be over-optimistic, as using SW nested in P2SH will decrease the PR, and therefore TBS becomes even lower) I am not convinced that SW softfork should be the *only* short term scalability solution