From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 6C3D71221 for ; Wed, 30 Dec 2015 05:46:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail2.openmailbox.org (mail2.openmailbox.org [62.4.1.33]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 92C0C10E for ; Wed, 30 Dec 2015 05:46:14 +0000 (UTC) Received: by mail2.openmailbox.org (Postfix, from userid 1004) id 3211B2AC3F25; Wed, 30 Dec 2015 06:46:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1451454372; bh=VFha0Lenq82gxRg+9SNWfvjTdaRJqMjC0Y12hw2R09g=; h=Date:From:To:Subject:From; b=V7i4IYofQ0o1zvrH8L+rJ2M0sJ7YlRgvOZbwFTMyovJJVRuZCaBggaeLVuhXs+Yr3 nxkXaLakZWA1ux7gMlkYANtD2eWN/9ZQ3kbyqJCsiasMbg9CUTjevyvwEFogbQjdOc VWjv9MdOtuov4FgEcjIiSpMwnBG39qx5bvbrDhb4= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from www.openmailbox.org (openmailbox-b1 [10.91.69.218]) by mail2.openmailbox.org (Postfix) with ESMTP id 1D78F2AC3F2F for ; Wed, 30 Dec 2015 06:46:01 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Dec 2015 13:46:01 +0800 From: joe2015@openmailbox.org To: bitcoin-dev@lists.linuxfoundation.org Message-ID: <6fc10e581a81abb76be5cd49275ebf48@openmailbox.org> X-Sender: joe2015@openmailbox.org User-Agent: Roundcube Webmail/1.0.6 X-Mailman-Approved-At: Wed, 30 Dec 2015 06:53:51 +0000 Subject: [bitcoin-dev] An implementation of BIP102 as a softfork. 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: Wed, 30 Dec 2015 05:46:15 -0000 Below is a proof-of-concept implementation of BIP102 as a softfork: https://github.com/ZoomT/bitcoin/tree/2015_2mb_blocksize https://github.com/jgarzik/bitcoin/compare/2015_2mb_blocksize...ZoomT:2015_2mb_blocksize?diff=split&name=2015_2mb_blocksize BIP102 is normally a hardfork. The softfork version (unofficial codename BIP102s) uses the idea described here: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-December/012073.html The basic idea is that post-fork blocks are constructed in such a way they can be mapped to valid blocks under the pre-fork rules. BIP102s is a softfork in the sense that post-fork miners are still creating a valid chain under the old rules, albeit indirectly. From the POV of non-upgraded clients, BIP102s circumvents the block-size limit by moving transaction validation data "outside" of the block. This is a similar trick used by Segregated Witness and Extension Blocks (both softfork proposals). From the POV of upgraded clients, the block layout is unchanged, except: - A larger 2MB block-size limit (=BIP102); - The header Merkle root has a new (backwards compatible) interpretation; - The coinbase encodes the Merkle root of the remaining txs. Aside from this, blocks maintain their original format, i.e. a block header followed by a vector of transactions. This keeps the implementation simple, and is distinct from SW and EB. Since BIP102s is a softfork it means that: - A miner majority (e.g. 75%, 95%) force miner consensus (100%). This is not true for a hardfork. - Fraud risk is significantly reduced (6-conf unlikely depending on activation threshold). This should address some of the concerns with deploying a block-size increase using a hardfork. Notes: - The same basic idea could be adapted to any of the other proposals (BIP101, 2-4-8, BIP202, etc.). - I used Jeff Garzik's BIP102 implementation which is incomplete (?). The activation logic is left unchanged. - I am not a Bitcoin dev so hopefully no embarrassing mistakes in my code :-( --joe