public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Anthony Towns <aj@erisian.com.au>
To: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] BIP proposal: Increase block size limit to 2 megabytes
Date: Sun, 7 Feb 2016 21:37:57 +1000	[thread overview]
Message-ID: <20160207113757.GA10769@sapphire.erisian.com.au> (raw)
In-Reply-To: <CABsx9T1Bd0-aQg-9uRa4u3dGA5fKxaj8-mEkxVzX8mhdj4Gt2g@mail.gmail.com>

On Fri, Feb 05, 2016 at 03:51:08PM -0500, Gavin Andresen via bitcoin-dev wrote:
> Constructive feedback welcome; [...]
> Summary:
>   Increase block size limit to 2,000,000 bytes.
>   With accurate sigop counting, but existing sigop limit (20,000)
>   And a new, high limit on signature hashing

To me, it seems absurd to have a hardfork but not take the opportunity
to combine these limits into a single weighted sum.

I'd suggest:

   0.5*blocksize + 50*accurate_sigops + 0.001*sighash < 2,000,000

That provides worst case blocksize of 4MB, worst case sigops of 40,000
and worst case sighash bytes of 2GB. Given the separate limit on sighash
bytes and the improvements from libsecp256k1 I think 40k sigops should
be fine, but I'm happy to be corrected.

For a regular transaction, of say 380 bytes with 2 sigops and hashing
about 800 bytes, that uses up about 291 units of the limit, meaning
that if a block was full of transactions of that form, the limit would
be 6872 tx or 2.6MB per block (along with 13.7k sigops and ~5.5MB hashed
for signatures).  Those weightings could probably be improved by doing
some detailed analysis and measurements, but I think they're pretty
reasonable for round figures.

The main advantage is that it would prevent blocks being cheaply filled
up due to hitting one of the secondary limits but only paying for the
contribution to the primary limit (presumably block size), which avoids
denial of service spam attacks.

I think having the limit take UTXO increase (or decrease) into effect
would be helpful too; but I don't have a specific suggestion. If it's
just a matter of making the limit stronger (eg adding "0.25*max(0,change
in UTXO bytes)" to the formula on the left, but not changing the limit on
the right), that would be a soft-forking change that could be introduced
later, and maybe that's fine.

If there was time to actually iterate on this proposal, rather than an
apparent aim to get it out the door in the next month or two, I think it
would be good to also design it so that the parameters of the weighted
sum could be adjusted by a soft-fork in future rather than requiring a
hard fork every time a limit's reached, or a weighting can be relaxed.
But I don't think that's feasible to design within a few weeks, so I
think it's off the table given the activation goal.

Cheers,
aj


      parent reply	other threads:[~2016-02-07 11:38 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 20:51 [bitcoin-dev] BIP proposal: Increase block size limit to 2 megabytes Gavin Andresen
2016-02-05 22:36 ` Yifu Guo
2016-02-07 17:09   ` Gavin Andresen
2016-02-05 23:04 ` Btc Drak
2016-02-06  0:12 ` Luke Dashjr
2016-02-06  3:14   ` Jorge Timón
2016-02-06 15:37     ` Gavin Andresen
2016-02-06 17:01       ` Adam Back
2016-02-06 17:45         ` Gavin Andresen
2016-02-06 21:11           ` Peter Todd
2016-02-06 21:24             ` Peter Todd
2016-02-09  5:11             ` Samson Mow
2016-02-06 21:28           ` David Thomson
2016-02-07 18:49         ` Chris Priest
2016-02-06 17:09       ` Jorge Timón
2016-02-06 17:25         ` Tom Zander
2016-02-06 20:22           ` Chris Priest
2016-02-06 20:46           ` Luke Dashjr
2016-02-07 14:16             ` Gavin Andresen
2016-02-07 15:06               ` Alex Morcos
2016-02-07 16:54                 ` Peter Todd
2016-02-07 15:19               ` Anthony Towns
2016-02-07 17:10                 ` Jonathan Toomim
2016-02-07 17:24                   ` jl2012
2016-02-07 17:56                     ` Jonathan Toomim
2016-02-07 21:01               ` Luke Dashjr
2016-02-07 21:33                 ` Steven Pine
2016-02-07 22:04                   ` Corey Haddad
2016-02-07 22:25                     ` Steven Pine
2016-02-06 20:36       ` Luke Dashjr
2016-02-06 22:22       ` Peter Todd
2016-02-07  5:21       ` Jannes Faber
2016-02-07 18:55         ` Jonathan Toomim
2016-02-07 19:03           ` Patrick Strateman
2016-02-07 19:19             ` Trevin Hofmann
2016-02-07 20:29             ` Tier Nolan
2016-02-09 13:59       ` Yifu Guo
2016-02-09 16:54         ` Gavin Andresen
2016-02-10  6:14           ` David Vorick
2016-02-10  6:36             ` Patrick Shirkey
2016-02-10 12:58             ` Tier Nolan
2016-02-07 11:37 ` Anthony Towns [this message]

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=20160207113757.GA10769@sapphire.erisian.com.au \
    --to=aj@erisian.com.au \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    /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