public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Sergio Demian Lerner <sergio.d.lerner@gmail.com>
To: Matt Corallo <lf-lists@mattcorallo.com>
Cc: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Some real-world results about the current Segwit Discount
Date: Tue, 9 May 2017 16:15:32 -0300	[thread overview]
Message-ID: <CAKzdR-pN0B-wjhPh3n6Jw7L6wsz9yQ=kyVX7NYx5ACZC3bg8OA@mail.gmail.com> (raw)
In-Reply-To: <CAKzdR-pyE2f0jdsU+QGbJQ9gMepsyS880kntE9MRvDBLG_Nchg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

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.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1882 bytes --]

  reply	other threads:[~2017-05-09 19:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 22:42 [bitcoin-dev] Some real-world results about the current Segwit Discount Sergio Demian Lerner
2017-05-08 23:47 ` Alphonse Pace
2017-05-09 13:49   ` Sergio Demian Lerner
2017-05-09 14:33     ` James Hilliard
2017-05-09 15:45     ` Johnson Lau
2017-05-09 16:19       ` Sergio Demian Lerner
2017-05-09 16:27         ` Johnson Lau
2017-05-09 16:27         ` James Hilliard
2017-05-09 18:15     ` Matt Corallo
2017-05-09 18:58       ` Sergio Demian Lerner
2017-05-09 19:15         ` Sergio Demian Lerner [this message]
2017-05-09 19:30           ` Gregory Maxwell
2017-05-09 19:42             ` Matt Corallo
2017-05-09 20:13               ` Gregory Maxwell
2017-05-09 20:58                 ` Sergio Demian Lerner
2017-05-10  5:37                   ` Jorge Timón
2017-05-10 14:05                   ` Matt Corallo
2017-05-10 15:25                     ` Sergio Demian Lerner
2017-05-10 16:39                       ` Matt Corallo
2017-05-10 19:40                         ` Sergio Demian Lerner
2017-05-08 23:56 ` Gregory Maxwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKzdR-pN0B-wjhPh3n6Jw7L6wsz9yQ=kyVX7NYx5ACZC3bg8OA@mail.gmail.com' \
    --to=sergio.d.lerner@gmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=lf-lists@mattcorallo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox