1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
Return-Path: <sergio.d.lerner@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id E428BB49
for <bitcoin-dev@lists.linuxfoundation.org>;
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 <bitcoin-dev@lists.linuxfoundation.org>;
Tue, 9 May 2017 19:16:13 +0000 (UTC)
Received: by mail-qt0-f181.google.com with SMTP id m91so9388322qte.3
for <bitcoin-dev@lists.linuxfoundation.org>;
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: <CAKzdR-pyE2f0jdsU+QGbJQ9gMepsyS880kntE9MRvDBLG_Nchg@mail.gmail.com>
References: <CAKzdR-qojNn8OtUTPbxa0JauK9nmo2ZGm4ihKuyzsz_FAgokDw@mail.gmail.com>
<CAMBsKS_j7Lso6fHoMPkrQ7UFwKfxOERAAqL=aUF83O4CqL+iFg@mail.gmail.com>
<CAKzdR-on-w9EF+2hLjchdyHB1gj7fi4QnybA=J4Cz7yyN3KKNA@mail.gmail.com>
<e86d9b29-f7dd-75da-e6c6-f55648bea104@mattcorallo.com>
<CAKzdR-pyE2f0jdsU+QGbJQ9gMepsyS880kntE9MRvDBLG_Nchg@mail.gmail.com>
From: Sergio Demian Lerner <sergio.d.lerner@gmail.com>
Date: Tue, 9 May 2017 16:15:32 -0300
Message-ID: <CAKzdR-pN0B-wjhPh3n6Jw7L6wsz9yQ=kyVX7NYx5ACZC3bg8OA@mail.gmail.com>
To: Matt Corallo <lf-lists@mattcorallo.com>
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 <bitcoin-dev@lists.linuxfoundation.org>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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
<div dir=3D"ltr">Let n be the non-segwit bytes. Let the seg/noseg ratio be =
1.7.=C2=A0<div><br></div><div>Segwit with 75% discount: (let WITNESS_SCALE_=
FACTOR=3D4)</div><div></div><div>n*WITNESS_SCALE_FACTOR+n*1.7 =3D 4,000,000=
</div><div>Then n=3D4,000,000 / 5.7 =3D 701K</div><div>Average block size =
=3D 701K*(1+1.7)=3D1.8 Mbytes</div><div>Maximum block size =3D 4 MBytes<br>=
</div><div><br></div><div>Segwit with 50% discount + 2MB HF: (let WITNESS_S=
CALE_FACTOR=3D2)</div><div><div>n*2+n*1.7 =3D 4,000,000<br></div></div><div=
>n =3D 4,000,000/ 3.7 =3D 1.08M</div><div><div>Average block size =3D 1.08M=
*(1+1.7)=3D2.9 Mbytes</div></div><div><div>Maximum block size =3D 4 MBytes<=
br></div></div><div><br></div><div>The capacity of Segwit(50%)+2MbHF is 50%=
more than Segwit, and the maximum block size is the same.=C2=A0</div><div>=
<br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">O=
n Tue, May 9, 2017 at 3:58 PM, Sergio Demian Lerner <span dir=3D"ltr"><<=
a href=3D"mailto:sergio.d.lerner@gmail.com" target=3D"_blank">sergio.d.lern=
er@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><span clas=
s=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
You suggested "If the maximum block weight is set to 2.7M, each byte o=
f<br>
non-witness block costs 1.7", but these numbers dont work out - settin=
g<br>
the discount to 1.7 gets you a maximum block size of 1.7MB (in a soft<br>
fork), not 2.7MB. </blockquote><div><br></div></span><div>Yes. In a soft-fo=
rk is true.</div><div>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.</div><div><br></div>=
<div>=C2=A0</div></div></div></div>
</blockquote></div><br></div>
--001a114670905d9ba1054f1c300a--
|