Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 3B3E5899 for ; Fri, 25 Nov 2016 22:32:04 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6B979133 for ; Fri, 25 Nov 2016 22:32:03 +0000 (UTC) Received: by mail-qk0-f171.google.com with SMTP id n204so89950857qke.2 for ; Fri, 25 Nov 2016 14:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Q6VfY7K5jnA7/z/XkcGQsbvYgh9KYqf13p+Hdp/6Of0=; b=Bxf7b8ZYIvWXadRM7OXUCoTY4xGD5D6hXZ3pbv6S2x1veqXutlRahFh5V57HOFv741 WImVhyKCjljA2+3TpIeuJOqWcfarfJkWSpIx70QMXuOKL5Ju/1ngTXxjNx7UiukGfF2r +kLZ6HOS1qP8abDg5bwBKyVc+H/iAfK24yP8955w5z+Mca9+I+3cZ/SNUQ5Ke5f0rlM9 FxkVNlHZhP8uSB8p41PuC0h05oRfa4c6U9iktlf47jpQqIaLPxfdGyX4eTTudOLENCww CRc6PZ7ScdU0r168icfxyR2VgDw9uPchw4PRz7fPlFjTvKR4reEGArTqVnScpg1beXFU paBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Q6VfY7K5jnA7/z/XkcGQsbvYgh9KYqf13p+Hdp/6Of0=; b=d6y9zwj4F+rvObDDZ6LXh+uGn08rvWh7OcZKRKV5mK4ICZHRTBYAM1dDBOFAQIoR1+ A53elqM32n3nMZu2pfxTAkrqd15CNfhu9bUWhRF0QLJffpqcdOmeFHKoJJZ62zXzRt92 maRQgfi8t0jt+1w2QP3UYPyxpR5MgUtyDfQrvxTwdlx0/CVSKUYOlE0ONkBtqU3vXz5K BA1riTqNqCShJo3723NUJVn6RbwJ77oQIFStSL6ga/mFQ15LIclqH4BL7oFuaLqSqOqV IhjfI+7c8cm0uQqtFZC8N/mMZcpRG3VlJ9xcoTHAUK9ePXwBOuzCoiqaSKYq8p8kYv/i Tiwg== X-Gm-Message-State: AKaTC01JZdNSme++C+BYp4CqeF0IYx5TkJHp52nYRrB8ItbMMWCya2QGZMRZheelpb8B9YHM5PDpFHUQro2LbA== X-Received: by 10.55.27.40 with SMTP id b40mr9028579qkb.256.1480113122565; Fri, 25 Nov 2016 14:32:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.35.13 with HTTP; Fri, 25 Nov 2016 14:31:22 -0800 (PST) In-Reply-To: <61681436.SvSR6Fsd9n@strawberry> References: <61681436.SvSR6Fsd9n@strawberry> From: Sergio Demian Lerner Date: Fri, 25 Nov 2016 19:31:22 -0300 Message-ID: To: Tom Zander , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary=001a1147cfd6e5e692054227b05d X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM 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: Sat, 26 Nov 2016 11:53:18 +0000 Subject: Re: [bitcoin-dev] The Excessive-Block Gate: How a Bitcoin Unlimited Node Deals With Large Blocks 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: Fri, 25 Nov 2016 22:32:04 -0000 --001a1147cfd6e5e692054227b05d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2016 at 12:25 PM, Tom Zander via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > On Thursday, 24 November 2016 22:39:05 CET Sergio Demian Lerner via > bitcoin- > dev wrote: > > Without a detailed analysis, unlimited block size seems a risky change = to > > Bitcoin, to me. > > What exactly do you think is a =E2=80=98change=E2=80=99 in bitcoin here? > > A change is anything that modifies with a HF the current state of the Bitcoin Core implementation of the consensus protocol. Sadly (or happily, for some) there is no "abstract" definition of Bitcoin. > The concept of proof-of-work is that the longer a chain, the higher > probability that that one will be extended for the simple reason that > another chain will have to show a higher amount of proof of work to =E2= =80=98win=E2=80=99. > > We know what Bitcoin the protocol dictates, but if what the protocol dictates is not in the best interest of miners or full-nodes? then they will simply choose a rule that maximizes their revenue (or any other measure of performance, such as lower latency, or less transaction reversal probability). As far as I understand the document from Peter, there is no change there at > all. Only chains with more POW will win. > I haven't gone to the code to check, but the video Peter sent does not say that. It says that miners will mine on top of a block ONLY if the "gate" has been opened for that block (e.g. there is additional blocks to push a big block). So a miner having a preferring low block sizes will choose to mine on top of the A1,A2,A3 chain (3 units of work), while miners supporting bigger sizes will mine on top of the chain B1,S2,S3,S4 (4 units of work). Saying that the chain starting with B1 is not considered by a node X does not mean that the node X is blind to the information that can be extracted from the fact that there is a chain of 4 blocks starting from B1. If there is more information, there may be a better local choice. If there are better local choices, there is probably a better global equilibrium (or not equilibrium at all). > Or, to answer your example, miners will prefer to extend the chain with t= he > most POW. > Clearly this is not universal: some miners will, and some other miners won't, because some miners have postponed adding some blocks. > > The other fact stays the same as well, if you protect from reorgs by > expecting more confirmations. Nothing changes here either. The > common-sense 6 > confirmations for things like exchange-deposits keep having the same > security. > Suppose that I provide a service that accepts payments with 2 confirmations, and in certain time I have the information that the network is at the same time considering the forks B1 S2 and A1 A2. Then the best I can do is NOT to accept the 2-confirmation and wait for a resolution of the fork. Choosing either fork may put me at the risk of immediate reversal. The existence of fork information changes equilibrium decision to choose the longest-chain. This is the same that happens with the GHOST protocol: the information on the existence of uncles changes the local incentives to choose the longest chain to some different strategy, and when all nodes change their strategy, then the supposedly last equilibrium state is that all follow the GHOST strategy for choosing the heaviest chain. > > The basic idea that we have a 3 or 4 deep fork is a huge problem in > Bitcoin. > It hasn=E2=80=99t happened for ages, and we like it that way. The miners = like it > that way too. Its disruptive. > The is a problem that is not created by the =E2=80=98excessive block=E2= =80=99 concept. It > does, however, provide a possible solution to this very far-fetched > problem. > > You should also realize that the policy of a miner is stored in the > coinbase. > > This is important, but yet the full node does not use this information automatically. The amount of confirmations that a node accepts is not affected by the miner's policies or the size of the blocks mined, but it should. > That said, I=E2=80=99m sure there are improvements to be made to the poli= cy that BU > uses. Probably a simple wise addition would be to estimate the accepted block size for the majority of the miners (S), and only count block confirmations for wallet transactions taking into account only blocks whose size is lower or equal than S. So for example, if Alice receives a transaction T in block B1 and it is confirmed by block B2, but size(B1)>S and size(B2)>S, then the wallet should tell Alice that transaction T has 0 confirmations. This local strategy reduces the chances that Alice accept T but is then easily reversed for the opposite fork growing one block ahead. Regards, Sergio --001a1147cfd6e5e692054227b05d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Fri, Nov 25, 2016 at 12:25 PM, Tom Zander via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
On Thursday, 24 November= 2016 22:39:05 CET Sergio Demian Lerner via bitcoin-
dev wrote:
> Without a detailed analysis, unlimited block size seems a risky change= to
> Bitcoin, to me.

What exactly do you think is a =E2=80=98change=E2=80=99 in bitcoin h= ere?

A change is anything that modifies with a HF the curr= ent state of the Bitcoin Core implementation of the consensus protocol. Sad= ly (or happily, for some) there is no "abstract" definition of Bi= tcoin.

=C2=A0
The concept of proof-of-work is that the longer a chain, the higher
probability that that one will be extended for the simple reason that
another chain will have to show a higher amount of proof of work to =E2=80= =98win=E2=80=99.

We know what Bitcoin the protocol dictates, but if wh= at the protocol dictates is not in the best interest of miners or full-node= s? then they will simply choose a rule that maximizes their revenue (or any= other measure of performance, such as lower latency, or less transaction r= eversal probability).


As far as I understand the document from Peter, there is no change there at=
all. Only chains with more POW will win.
=C2=A0
<= div>I haven't gone to the code to check, but the video Peter sent does = not=20 say that. It says that miners will mine on top of a block ONLY if the "= ;gate" has been opened for that block (e.g. there is additional blocks= to=20 push a big block). So a miner having a preferring low block sizes will choo= se to mine on top of the A1,A2,A3 chain (3 units of work), while miners supporting=20 bigger sizes will mine on top of the chain B1,S2,S3,S4 (4 units of=20 work).

Saying that the chain starting with B1 is not cons= idered by a node X does not mean that the node X is blind to the informatio= n that can be extracted from the fact that there is a chain of 4 blocks sta= rting from B1.
If there is more information, there may be a b= etter local choice. If there are better local choices, there is probably a = better global equilibrium (or not equilibrium at all).
=C2=A0=
Or, to answer your example, miners will prefer to extend the chain with the=
most POW.

Clearly this is not universal= : some miners will, and some other miners won't, because some miners ha= ve postponed adding some blocks.

=C2=A0

The other fact stays the same as well, if you protect from reorgs by
expecting more confirmations. Nothing changes here either. The common-sense= 6
confirmations for things like exchange-deposits keep having the same
security.

Suppose that I provide a serv= ice that accepts payments with 2 confirmations, and in certain time I have = the information that the network is at the same time considering the forks = B1 S2 and A1 A2. Then the best I can do is NOT to accept the 2-confirmation= and wait for a resolution of the fork. Choosing either fork may put me at = the risk of immediate reversal.

The existence of fork information c= hanges equilibrium decision to choose the longest-chain.=C2=A0 This is the = same that happens with the GHOST protocol: the information on the existence= of uncles changes the local incentives to choose the longest chain to some= different strategy, and when all nodes change their strategy, then the sup= posedly last equilibrium state is that all follow the GHOST strategy for ch= oosing the heaviest chain.
=C2=A0

The basic idea that we have a 3 or 4 deep fork is a huge problem in Bitcoin= .
It hasn=E2=80=99t happened for ages, and we like it that way. The miners li= ke it
that way too. Its disruptive.
The is a problem that is not created by the =E2=80=98excessive block=E2=80= =99 concept. It
does, however, provide a possible solution to this very far-fetched problem= .

You should also realize that the policy of a miner is stored in the
coinbase.

This is important, but yet the full node does not use= this information automatically. The amount of confirmations that a node ac= cepts is not affected by the miner's policies or the size of the blocks= mined, but it should.
=C2=A0
That said, I=E2=80=99m sure there are improvements to be made to the policy= that BU
uses.

Probably a simple wise addition woul= d be to estimate the accepted block size for the majority of the miners (S)= , and only count block confirmations for wallet transactions taking into ac= count only blocks whose size is lower or equal than S. So for example, if A= lice receives a transaction T in block B1 and it is confirmed by block B2, = but size(B1)>S and size(B2)>S, then the wallet should tell Alice that= transaction T has 0 confirmations. This local strategy reduces the chances= that Alice accept T but is then easily reversed for the opposite fork grow= ing one block ahead.
=C2=A0
Regards,
<= div>=C2=A0Sergio

--001a1147cfd6e5e692054227b05d--