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 8F564B4A for ; Mon, 8 May 2017 23:47:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B5CA5E5 for ; Mon, 8 May 2017 23:47:33 +0000 (UTC) Received: by mail-pf0-f178.google.com with SMTP id v14so40284256pfd.2 for ; Mon, 08 May 2017 16:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=q4Bd+gQOc8XOJFl83TCYNYsAMH4T0Egp+q/HhZTgTDE=; b=p4JQFprS/4tXhZRGbrcwvLSYOt2Ym7GkweVlmQrf2fjWKQSg99EbTqSRLWBDNeyPtp exIyKV2GZhMFXbq3sCVOnqCzmiq8v32l9sAg7M4Zig44L3jNXPu9CDCEvKrsFf/oNcla ioxo1rciWprHniZjmIoAAYVall1nNY1Sam9kBH0SN7H6L6nBcU/r9G5MOkv3FgFhv/1V xEp5+kKFKVOn8wGvJwNs5a6VsGVh0nHvC7tSba46Y0cSTFFkA9M6JuD3m8CpbpsyynjO IbqtF5n5GORTHdYqnncd3PHWBtlP503Fuz6V6Ds5+j6JgloZuYpGHfv6M3FYjo0DI13d zCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=q4Bd+gQOc8XOJFl83TCYNYsAMH4T0Egp+q/HhZTgTDE=; b=Lu7EEIxsZQU/2V/OxMkTF2/hIX5syH/O1ABECF1z5v0Rj9rQKjyOUmiwQoeYyvnUc6 bzZGbvTuSDe6DmFD/AkyfiCDeuJOZciUkxAXtM2HtE5whcQxeP4Lmu15qx+Gws57W1aZ gyR44LpcklLkaE+n1U1pVcgQvM7oAmAGTLIDDeJt9Zwup9bSsM6tJCaUqxMDatIoCEQ9 EriBZZQS7ThWdEAbKKoe+zLsFL8FQGQWPkqgO37X5oV3ioOge87pu36UikXytn+Ec7Rk /8lFD+PTCWEwLK/MWXHVPoirVoLb36QO6wjm2yJ4WOXipj+y0KDmC6Y6aqRFEH4BIzQJ DBVw== X-Gm-Message-State: AN3rC/6L0EuAZ9ZIaY1ywEIjUs+e52xym+pvzhoWx+88Rl67vg7rs2OD yxaID1HIrAB8KiNrMZGSP/svgX1KfIe0 X-Received: by 10.99.149.8 with SMTP id p8mr21452626pgd.154.1494287253169; Mon, 08 May 2017 16:47:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.138.143 with HTTP; Mon, 8 May 2017 16:47:32 -0700 (PDT) In-Reply-To: References: From: Alphonse Pace Date: Mon, 8 May 2017 18:47:32 -0500 Message-ID: Cc: bitcoin-dev Content-Type: multipart/alternative; boundary=94eb2c1b49b6eae949054f0bdcbe X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MISSING_HEADERS, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Tue, 09 May 2017 01:26:16 +0000 Subject: Re: [bitcoin-dev] Some real-world results about the current Segwit Discount X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 23:47:34 -0000 --94eb2c1b49b6eae949054f0bdcbe Content-Type: text/plain; charset=UTF-8 Sergio, I'm not sure what the data you present has to do with the discount. A 75% discount prevents witness spam precisely because it is 75%, nothing more. The current usage simply gives a guideline on how much capacity is gained through a particular discount. With the data you show, it would imply that those blocks, with SegWit used where possible, would result in blocks of ~1.8MB. On Mon, May 8, 2017 at 5:42 PM, Sergio Demian Lerner via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > I have processed 1000 blocks starting from Block #461653. > > I computed several metrics, including the supposed size of witness data > and non-witness data (onchain), assuming all P2SH inputs/outputs are > converted to P2PWSH and all P2PKH inputs/outputs are converted to P2WPKH. > > This takes into account that other types of transactions will not be > modified by Segwit (e.g. OP_RETURN outputs, or P2PK). This analysis doesn't > take into account that LN transactions may affect the current state, > increasing the segwit/nosegwit ratio. > > Among a lot of information, I've got the following real world results... > > acMainChainSpace =352608924 > acSegwitSpace =599400403 > Ratio segwit/nosegwit=1.6999 > > This implies that the 75% that discount is not the best option to prevent > witness spam in a block of 4 MB, as stated in https://segwit.org/why-a- > discount-factor-of-4-why-not-2-or-8-bbcebe91721e. > > The non-witness data weight factor should not be 4 but 2.35. The closest > integer value is 2, which leads to a 50% witness discount. > > The Bitcoinj source code is available for anyone to review. I encourage > anyone to re-compute this with another utility to cross-check. Maybe > Antoine Le Calvez (p2sh.info) would like to double-check. > > > > > > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > > --94eb2c1b49b6eae949054f0bdcbe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sergio,

I'm not sure what the data = you present has to do with the discount.=C2=A0 A 75% discount prevents witn= ess spam precisely because it is 75%, nothing more.=C2=A0 The current usage= simply gives a guideline on how much capacity is gained through a particul= ar discount.=C2=A0 With the data you show, it would imply that those blocks= , with SegWit used where possible, would result in blocks of ~1.8MB.
<= div>


On Mon, May 8, 2017 at 5:42 PM, Sergio Demian Lerner via = bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org= > wrote:
I hav= e processed 1000 blocks starting from=C2=A0Block #461653.

I computed several metrics, including the supposed size of witness data a= nd non-witness data (onchain), assuming all P2SH inputs/outputs are convert= ed to P2PWSH and all P2PKH inputs/outputs=C2=A0are converted to P2WPKH.

This takes into account that other types of transacti= ons will not be modified by Segwit (e.g. OP_RETURN outputs, or P2PK). This = analysis doesn't take into account that LN transactions may affect the = current state, =C2=A0increasing the segwit/nosegwit ratio.

Among a lot of information, I've got the following real world = results...

acMainChainSpace =3D352608924
acSegwitSpace =3D599400403
Ratio segwit/nosegwit=3D1.6999

This implies that the 75% that discount is no= t the best option to prevent witness spam in a block of 4 MB, as stated in = https://segwit.org/why-a-discount-factor-= of-4-why-not-2-or-8-bbcebe91721e.

The non= -witness data weight factor should not be 4 but 2.35. The closest integer v= alue is 2, which leads to a 50% witness discount.

<= div>The Bitcoinj source code is available for anyone to review. I encourage= anyone to re-compute this with another utility to cross-check. Maybe Antoi= ne Le Calvez (p2sh.info)= would like to double-check.


<= br>



_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.= linuxfoundation.org
https://lists.linuxfoundation.org= /mailman/listinfo/bitcoin-dev


--94eb2c1b49b6eae949054f0bdcbe--