Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 84EC142A for ; Mon, 20 Jul 2015 19:43:52 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0A226101 for ; Mon, 20 Jul 2015 19:43:52 +0000 (UTC) Received: by qkdv3 with SMTP id v3so119179146qkd.3 for ; Mon, 20 Jul 2015 12:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=n/RQ4pzefRTx/oxPj8jRKSE1XnHJ39F1L1ydBRuTUbE=; b=EKOU+h6mXFmhAxxHDQoc9Ybqp/XspWc1SVLepV4EtD04T5DJRHULk6zJ5LCCaqIo+X /bAQ53xlbC/uJHjuZj1Dlt91MwgE5muGPScGJv7wc8IdAZGLIp2s1/GHI5O8H6IcdjzH IA8+cVYhaMynCC9zMIKABUn7zixc2HqGPskrcMkOMXnIWvebuRBEP8xi78XSnMde8OPB x4oDsGVhd1cQMZseAhsfxYkeiYbi2lGWWLbn2afkjfuXRsN2epuBx6a1yvRqo7Njx1Vu xd/4HZSLsHCQkBr3gxmwTJwFtdUPCYLy4f+ahh0b9UPYWlX5Pa135KSUMWyOA5d0Wpef pxPw== MIME-Version: 1.0 X-Received: by 10.140.84.137 with SMTP id l9mr49308981qgd.94.1437421431317; Mon, 20 Jul 2015 12:43:51 -0700 (PDT) Received: by 10.140.93.162 with HTTP; Mon, 20 Jul 2015 12:43:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 20 Jul 2015 20:43:51 +0100 Message-ID: From: Tier Nolan Cc: bitcoin-dev@lists.linuxfoundation.org Content-Type: multipart/alternative; boundary=001a11c1192ace6a8d051b53c156 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MISSING_HEADERS, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: Re: [bitcoin-dev] For discussion: limit transaction size to mitigate CVE-2013-2292 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: Mon, 20 Jul 2015 19:43:52 -0000 --001a11c1192ace6a8d051b53c156 Content-Type: text/plain; charset=UTF-8 On Mon, Jul 20, 2015 at 8:10 PM, Gavin Andresen via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > After deployment, the maximum serialized size of a transaction allowed > in a block shall be 100,000 bytes. > This could render transactions with a locktime in the future as unspendable. It is pretty low probability that someone has created a >100kB locked transaction though. It violates the principle that no fork should render someone's coins unspendable. At the cost of weakening the protection, the rule could be made to only apply to version 2 transactions. *Specification* The transaction version is increased to version two. All coinbase transactions must be version two or higher. If any of its parent transactions are version two or higher then the transaction must be version two or higher. The maximum serialized size of a version two transactions allowed in a block is 100,000 bytes. As time passes more and more of the UTXO set will be from version two transactions. To launch the attack, the attacker needs an historical UTXO entry. Standard software would create version two transactions even if all inputs were version one. The rule could be applied to all transactions most of the time, and have daily blocks that allow legacy transactions. This rule shall apply to version 1 transactions too unless the block height is a multiple of 100. At the risk of encouraging feature creep, if the transaction size is being limited, it would be useful to also limit the size of all its inputs. This helps with fraud proofs and offline signing. *Specification* The transaction version is increased to version two. All coinbase transactions must be version two or higher. If any of its parent transactions are version two or higher then the transaction must be version two or higher. The maximum serialized size of a version two transactions allowed in a block is 100,000 bytes. The maximum of the total serialized size of a version two transaction and all of its parents allowed in a block shall be 200,000 bytes. --001a11c1192ace6a8d051b53c156 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, Jul 20, 2015 at 8:10 PM, Gavin Andresen via bitcoi= n-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
After de= ployment, the maximum serialized size of a transaction allowed
in= a block shall be 100,000 bytes.

This could render transactions with a locktime in the future as unspendab= le.

It is pretty low probability that someone has created= a >100kB locked transaction though.

It violates the p= rinciple that no fork should render someone's coins unspendable.
At the cost of weakening the protection, the rule could be made= to only apply to version 2 transactions.

S= pecification

=C2=A0=C2=A0=C2=A0 The transaction versi= on is increased to version two.

=C2=A0=C2=A0=C2=A0 All co= inbase transactions must be version two or higher.

=C2=A0= =C2=A0=C2=A0 If any of its parent transactions are version two or higher=C2=A0=C2=A0=C2=A0 then the transaction must be version two or higher.
=

=C2=A0=C2=A0=C2=A0 The maximum serialized size of a version = two transactions allowed in
=C2=A0=C2=A0=C2=A0 a block is 100,000 bytes= .


As time passes more and more = of the UTXO set will be from version two transactions.=C2=A0 To launch the = attack, the attacker needs an historical UTXO entry.

Stan= dard software would create version two transactions even if all inputs were= version one.

The = rule could be applied to all transactions most of the time, and have daily = blocks that allow legacy transactions.

=C2=A0=C2=A0=C2=A0 This = rule shall apply to version 1 transactions too unless the block height is
=C2=A0=C2=A0=C2=A0 a multiple of 100.

At the risk of encouraging feature creep, if the= transaction size is being limited, it would be useful to also limit the si= ze of all its inputs.

This helps with fraud proofs and of= fline signing.

Specification

=C2= =A0=C2=A0=C2=A0 The transaction version is increased to version two.
=C2=A0 =C2=A0 All coinbase transactions must be version two or higher= .

=C2=A0=C2=A0=C2=A0 If any of its parent transactions are version t= wo or higher
=C2=A0=C2=A0=C2=A0 then the transaction must be version two= or higher.

=C2=A0=C2=A0=C2=A0 The maximum serialized size of = a version two transactions allowed in
=C2=A0=C2=A0=C2=A0 a block is 100= ,000 bytes.

=C2=A0=C2=A0=C2=A0 The maximum of the total seriali= zed size of a version two transaction and all
=C2=A0=C2=A0=C2=A0 of its= parents allowed in a block shall be 200,000 bytes.

--001a11c1192ace6a8d051b53c156--