Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E428BB49 for ; Tue, 9 May 2017 19:16:13 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f181.google.com (mail-qt0-f181.google.com [209.85.216.181]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7592120E for ; Tue, 9 May 2017 19:16:13 +0000 (UTC) Received: by mail-qt0-f181.google.com with SMTP id m91so9388322qte.3 for ; Tue, 09 May 2017 12:16:13 -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:to :cc; bh=nWMJgrmA7w+StSh1kqOZFIN08DNg07Jdxdw2SHgyy7I=; b=sKzb7D7f5o1fG51jKBC0qryT3vI3syMH5Lv4Gj3DiToNHFUG5STOa+1VGxsNKLdqR2 JHTnvTQZMrXZ0tYug+bVjx0Quwf0L5JCPhuS96eYtyrr18RbLtH0qt9ZSrAbQrnTnwzd F/b0G7rvxAWFA6Nakvazal3x0CXqAJHYlox1s0q0xp9w6/WO0IkqQOK9Yrk0ZQqAw2gF TTlbW7jqzgjTPvIvwg1U9htuu/PTrXYJgMLmpq9VF4+BFzAiRr87l1rDltC/C/T/PRSz M9p0raxydVDtv6EbZEdxlVd9x1oDWvabOr6X1tWWgs13YyJt9X1inGpArN8rw+zt2i9H 2EJg== 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:to:cc; bh=nWMJgrmA7w+StSh1kqOZFIN08DNg07Jdxdw2SHgyy7I=; b=kt5Vawl6aokegr/BX92nPJZmn/ye1pb9iEVQwjjYNtps5+mw13nBexJAEBjdIVqb88 lG1TAt0jv4/qv3GntpsG2IoX5Ap5OKAiRV4pajhi6rcoaDNswajfg2E4sjhPEl1a2/YT e0ccABAE0oojTC6J7JkrOhRTRVLSfgz6JVfbbnNBIcdIOO4RiCenlFIiV4kOUAP85UY1 zZOnHYSrcDhfkukAwa0LlM8xzf8TzST30vtGKjK1+eJjURZ7BuOPMxVucLJ7ngOJKMs1 uecCRnhegdAWxUk7M6usgUUyNFNc+J3Ad58yu7oJ8BxW4ftYJahAyJbCzu3NsEgMQbJx WLaA== X-Gm-Message-State: AODbwcBXPIxlOWQ/krPvFVeDHPXQAYrZBFMxteVS1Z9oQWS/ZhrB4S9I myhNGV+wXr4MthJvynOVmP/SnH1SlxQ2c6s= X-Received: by 10.200.47.73 with SMTP id k9mr1821841qta.11.1494357372671; Tue, 09 May 2017 12:16:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.165.132 with HTTP; Tue, 9 May 2017 12:15:32 -0700 (PDT) In-Reply-To: References: From: Sergio Demian Lerner Date: Tue, 9 May 2017 16:15:32 -0300 Message-ID: To: Matt Corallo Content-Type: multipart/alternative; boundary=001a114670905d9ba1054f1c300a X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: bitcoin-dev 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: Tue, 09 May 2017 19:16:14 -0000 --001a114670905d9ba1054f1c300a Content-Type: text/plain; charset=UTF-8 Let n be the non-segwit bytes. Let the seg/noseg ratio be 1.7. Segwit with 75% discount: (let WITNESS_SCALE_FACTOR=4) n*WITNESS_SCALE_FACTOR+n*1.7 = 4,000,000 Then n=4,000,000 / 5.7 = 701K Average block size = 701K*(1+1.7)=1.8 Mbytes Maximum block size = 4 MBytes Segwit with 50% discount + 2MB HF: (let WITNESS_SCALE_FACTOR=2) n*2+n*1.7 = 4,000,000 n = 4,000,000/ 3.7 = 1.08M Average block size = 1.08M*(1+1.7)=2.9 Mbytes Maximum block size = 4 MBytes The capacity of Segwit(50%)+2MbHF is 50% more than Segwit, and the maximum block size is the same. On Tue, May 9, 2017 at 3:58 PM, Sergio Demian Lerner < sergio.d.lerner@gmail.com> wrote: > >> >> You suggested "If the maximum block weight is set to 2.7M, each byte of >> non-witness block costs 1.7", but these numbers dont work out - setting >> the discount to 1.7 gets you a maximum block size of 1.7MB (in a soft >> fork), not 2.7MB. > > > Yes. In a soft-fork is true. > I was thinking about what a HF could do to optimize the balance, and I > forgot I was in the context of a SF. > > > --001a114670905d9ba1054f1c300a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Let n be the non-segwit bytes. Let the seg/noseg ratio be = 1.7.=C2=A0

Segwit with 75% discount: (let WITNESS_SCALE_= FACTOR=3D4)
n*WITNESS_SCALE_FACTOR+n*1.7 =3D 4,000,000=
Then n=3D4,000,000 / 5.7 =3D 701K
Average block size = =3D 701K*(1+1.7)=3D1.8 Mbytes
Maximum block size =3D 4 MBytes
=

Segwit with 50% discount + 2MB HF: (let WITNESS_S= CALE_FACTOR=3D2)
n*2+n*1.7 =3D 4,000,000
n =3D 4,000,000/ 3.7 =3D 1.08M
Average block size =3D 1.08M= *(1+1.7)=3D2.9 Mbytes
Maximum block size =3D 4 MBytes<= br>

The capacity of Segwit(50%)+2MbHF is 50%= more than Segwit, and the maximum block size is the same.=C2=A0
=

O= n Tue, May 9, 2017 at 3:58 PM, Sergio Demian Lerner <<= a href=3D"mailto:sergio.d.lerner@gmail.com" target=3D"_blank">sergio.d.lern= er@gmail.com> wrote:


You suggested "If the maximum block weight is set to 2.7M, each byte o= f
non-witness block costs 1.7", but these numbers dont work out - settin= g
the discount to 1.7 gets you a maximum block size of 1.7MB (in a soft
fork), not 2.7MB.

Yes. In a soft-fo= rk is true.
I was thinking about what a HF could do to optimize t= he balance, and I forgot I was in the context of a SF.

=
=C2=A0

--001a114670905d9ba1054f1c300a--