From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <eth3rs@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 909991245
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  2 Aug 2019 12:19:17 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com
	[209.85.215.169])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D2752E7
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  2 Aug 2019 12:19:16 +0000 (UTC)
Received: by mail-pg1-f169.google.com with SMTP id n190so868521pgn.0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 02 Aug 2019 05:19:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to
	:cc; bh=XdIoG2z19UU+kE7vrjRnPuFhRa8NzDuCo8S/QRmS5K0=;
	b=aeG4ORZt9PhnmbXRszJ7hWBxEkEeFS50YARmmmm2xvbjvXalWgfsJiQt7AaRe39jok
	ERquiTNxI7aF8xOhHCl9OH/qbzRf/+snl18bCRM/CsIZy2AJCOm+IN9aJkiM7tSWW7Fp
	J/As2pM2/nRwTW8+NbdDRv45YOFXZv+HUowuaBzwUv4pg/OgB/iDQLyQdP+cEwmq4zoQ
	yAA4aCmdXm8qxL2GRQAnlnMp7uv383PWtS9q3bbwMNQjGbDgAEDHDcP2sRfb/1DlLgx2
	7C7wO8Z6lXKm6HQFVLbdsEBtAAW3ySv/aMau8BVXHGlVPYIli/Zu1+RP5GhOf9gKx02+
	2L+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to:cc;
	bh=XdIoG2z19UU+kE7vrjRnPuFhRa8NzDuCo8S/QRmS5K0=;
	b=Mp65whm7nRguqQc9o6pnHBCDBcqvEn89kUYARMO88yktyR5U70gD9evEZkspz5fOQC
	s3at0s7Bx0Y8YXItxviK2c2x5nldjD4MdYSTGN71AzpJLT+bwOrpwjKULKLj6jysaVUW
	GcqTmSE8oS0GDNNEwhR4XDXARRfSyBq6ZnaghoWmw2v5/SLv4N59+uLnDZOI6MhIYxOD
	JOislZNkBzVVeTpN85P6esnYqbsctHmnX2PxlZCrk/bapGoAWuMxAsG7d202sDfRy0v1
	6Hyrk/3NmVAUpXxz7XxcMJp7aFBvjU75otnMaGHLIzq+8xIjumGlNFf3GfMYA0DJaOPZ
	w9Iw==
X-Gm-Message-State: APjAAAVVP+4Pq7GIuQpguPZYFa1DhYJbCDYeWEMakJGi0UG81XvASj08
	pYW/j1mJjmr9pjB1+BMDCpjl28CLT6mHqwANk64=
X-Google-Smtp-Source: APXvYqzX08y0xOVQtDzlZ55uYezaOfoB5+3AFBe1evDmMI+BF7hD6eZMdJrfZywJIE0Qq+zmopA/oT4wtHyr/S85NZU=
X-Received: by 2002:a63:ee08:: with SMTP id e8mr70674073pgi.70.1564748356091; 
	Fri, 02 Aug 2019 05:19:16 -0700 (PDT)
MIME-Version: 1.0
References: <DB6PR10MB1832329BC8D151DC18F1E6CEA6DF0@DB6PR10MB1832.EURPRD10.PROD.OUTLOOK.COM>
	<28454621.Lge63Ifvux@dprfs-d5766>
	<DB6PR10MB1832F1E966CD83BC662985BDA6DF0@DB6PR10MB1832.EURPRD10.PROD.OUTLOOK.COM>
	<DB6PR10MB183271245AAE84FB9AC96474A6DF0@DB6PR10MB1832.EURPRD10.PROD.OUTLOOK.COM>
In-Reply-To: <DB6PR10MB183271245AAE84FB9AC96474A6DF0@DB6PR10MB1832.EURPRD10.PROD.OUTLOOK.COM>
From: Ethan Heilman <eth3rs@gmail.com>
Date: Fri, 2 Aug 2019 08:19:03 -0400
Message-ID: <CAEM=y+UCdW2__nmQhWuL2FYvL6WKdBsF31WDFZUSdXPvgM2bvg@mail.gmail.com>
To: "Kenshiro []" <tensiam@hotmail.com>, 
	Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000ed840d058f215d49"
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin protocol
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: Fri, 02 Aug 2019 12:19:17 -0000

--000000000000ed840d058f215d49
Content-Type: text/plain; charset="UTF-8"

Attack 1:
I partition (i.e. eclipse) a bunch of nodes from the network this partition
contains no mining power . I then mine 145 blocks for this partition. I
don't even need 51% of the mining power because I'm not competing with any
other miners. Under this rule this partition will hardfork from the network
permanently. Under current rules this partition will be able to rejoin the
network as the least weight chain will be orphaned.

Attack 2:
I pre-mine 145 blocks. A node goes offline for 24 hours, when it rejoins I
feed it 145 blocks which fork off from the consensus chain. I have 24+24
hours to mine these 145 blocks so I should be able to do this with 25% of
the current hash rate at the time the node went offline. Under your rule
each of these offline-->online nodes I attack this way will hardfork
themselves from the rest of the network.

I believe a moving-checkpoint rule as describe above would make Bitcoin
more vulnerable to 51% attacks.

A safer rule would be if a node detects a fork with both sides of the split
having  length > 144 blocks, it halts and requests user intervention to
determine which chain to follow.  I don't think 144 blocks is a great
number to use here as 24 hours is very short. I suspect you could improve
the security of the rule by making the number of blocks a fork most reach
to halt the network proportional to the difference in time between the
timestamp in the block prior to the fork and the current time. I am **NOT**
proposing Bitcoin adopt such a rule.

NXT has a fundamentally different security model as it uses Proof-of-stake
rather than Proof-of-Work.

On Wed, Jul 31, 2019 at 2:37 PM Kenshiro [] via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> P.S.: To be clearer, in this example I set an N value of 144 blocks, which
> is approximately 24 hours.
>
> ------------------------------
> *From:* Kenshiro [] <tensiam@hotmail.com>
> *Sent:* Wednesday, July 31, 2019 16:40
> *To:* Alistair Mann <al@pectw.net>; Bitcoin Protocol Discussion <
> bitcoin-dev@lists.linuxfoundation.org>
> *Subject:* Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin
> protocol
>
> >>> How would a (potentially, state-sponsored) netsplit lasting longer
> than N be
> handled?
>
> It would be detected by the community much before reaching the reorg limit
> of N blocks (it's 24 hours) so nodes could stop until the netsplit is
> fixed.
>
> In the extreme case no one notice the network split during more than N
> blocks (24 hours) and there are 2 permanent forks longer than N, nodes
> from one branch could delete their local history so they would join the
> other branch.
>
> Regards,
>
>
> ------------------------------
> *From:* Alistair Mann <al@pectw.net>
> *Sent:* Wednesday, July 31, 2019 15:59
> *To:* Kenshiro [] <tensiam@hotmail.com>; Bitcoin Protocol Discussion <
> bitcoin-dev@lists.linuxfoundation.org>
> *Subject:* Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin
> protocol
>
> On Wednesday 31 Jul 2019 12:28:58 Kenshiro [] via bitcoin-dev wrote:
>
> > I would like to propose that a "moving checkpoint" is added to the
> Bitcoin
> > protocol. It's a very simple rule already implemented in NXT coin:
> >
> > - A node will ignore any new block under nodeBlockHeight - N, so the
> > blockchain becomes truly immutable after N blocks, even during a 51%
> attack
> > which thanks to the moving checkpoint can't rewrite history older than
> the
> > last N blocks.
>
> How would a (potentially, state-sponsored) netsplit lasting longer than N
> be
> handled?
> --
> Alistair Mann
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--000000000000ed840d058f215d49
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div dir=3D"ltr">Attack 1:<br>I partition (i.e. eclipse) =
a bunch of nodes from the network this partition contains no mining power .=
 I then mine 145 blocks for this partition. I don&#39;t even need 51% of th=
e mining power because I&#39;m not competing with any other miners. Under t=
his rule this partition will hardfork from the network permanently. Under c=
urrent rules this partition will be able to rejoin the network as the least=
 weight chain will be orphaned.<br><br>Attack 2:<br>I pre-mine 145 blocks. =
A node goes offline for 24 hours, when it rejoins I feed it 145 blocks whic=
h fork off from the consensus chain. I have 24+24 hours to mine these 145 b=
locks so I should be able to do this with 25% of the current hash rate at t=
he time the node went offline. Under your rule each of these offline--&gt;o=
nline nodes I attack this way will hardfork themselves from the rest of the=
 network.<br><br>I believe a moving-checkpoint rule as describe above would=
 make Bitcoin more vulnerable to 51% attacks.<br><br>A safer rule would be =
if a node detects a fork with both sides of the split having=C2=A0 length &=
gt; 144 blocks, it halts and requests user intervention to determine which =
chain to follow.=C2=A0 I don&#39;t think 144 blocks is a great number to us=
e here as 24 hours is very short. I suspect you could improve the security =
of the rule by making the number of blocks a fork most reach to halt the ne=
twork proportional to the difference in time between the timestamp in the b=
lock prior to the fork and the current time. I am **NOT** proposing Bitcoin=
 adopt such a rule.<br><br>NXT has a fundamentally different security model=
 as it uses Proof-of-stake rather than Proof-of-Work.</div></div><br><div c=
lass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 31, =
2019 at 2:37 PM Kenshiro [] via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-d=
ev@lists.linuxfoundation.org" target=3D"_blank" rel=3D"noreferrer">bitcoin-=
dev@lists.linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">




<div dir=3D"ltr">
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
P.S.: To be clearer, in this example I set an N value of 144 blocks, which =
is approximately 24 hours.</div>
<div>
<div id=3D"m_-1010116091299868493gmail-m_6888503219858923550appendonsend"><=
/div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<br>
</div>
<hr style=3D"display:inline-block;width:98%">
<div id=3D"m_-1010116091299868493gmail-m_6888503219858923550divRplyFwdMsg" =
dir=3D"ltr"><font face=3D"Calibri, sans-serif" color=3D"#000000" style=3D"f=
ont-size:11pt"><b>From:</b> Kenshiro [] &lt;<a href=3D"mailto:tensiam@hotma=
il.com" target=3D"_blank" rel=3D"noreferrer">tensiam@hotmail.com</a>&gt;<br=
>
<b>Sent:</b> Wednesday, July 31, 2019 16:40<br>
<b>To:</b> Alistair Mann &lt;<a href=3D"mailto:al@pectw.net" target=3D"_bla=
nk" rel=3D"noreferrer">al@pectw.net</a>&gt;; Bitcoin Protocol Discussion &l=
t;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank=
" rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a>&gt;<br>
<b>Subject:</b> Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin pr=
otocol</font>
<div>=C2=A0</div>
</div>
<div dir=3D"ltr">
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
&gt;&gt;&gt;=C2=A0<span>How would a (potentially, state-sponsored) netsplit=
 lasting longer than N be
<br>
</span><span>handled? =C2=A0</span></div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<span><br>
</span></div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<span>It would be detected by the community much before reaching the reorg =
limit of N blocks (it&#39;s 24 hours) so nodes could stop until the netspli=
t is fixed.=C2=A0</span></div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<span><br>
</span></div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<span>In the extreme case no one notice the network split during more than =
N blocks (24 hours) and there are 2 permanent forks longer than N, n</span>=
odes from one branch could delete their local history so they would join th=
e other branch.</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
Regards,</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<br>
</div>
<div>
<div id=3D"m_-1010116091299868493gmail-m_6888503219858923550x_appendonsend"=
></div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color=
:rgb(0,0,0)">
<br>
</div>
<hr style=3D"display:inline-block;width:98%">
<div id=3D"m_-1010116091299868493gmail-m_6888503219858923550x_divRplyFwdMsg=
" dir=3D"ltr"><font face=3D"Calibri, sans-serif" color=3D"#000000" style=3D=
"font-size:11pt"><b>From:</b> Alistair Mann &lt;<a href=3D"mailto:al@pectw.=
net" target=3D"_blank" rel=3D"noreferrer">al@pectw.net</a>&gt;<br>
<b>Sent:</b> Wednesday, July 31, 2019 15:59<br>
<b>To:</b> Kenshiro [] &lt;<a href=3D"mailto:tensiam@hotmail.com" target=3D=
"_blank" rel=3D"noreferrer">tensiam@hotmail.com</a>&gt;; Bitcoin Protocol D=
iscussion &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" targ=
et=3D"_blank" rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a>&=
gt;<br>
<b>Subject:</b> Re: [bitcoin-dev] Add a moving checkpoint to the Bitcoin pr=
otocol</font>
<div>=C2=A0</div>
</div>
<div class=3D"m_-1010116091299868493gmail-m_6888503219858923550x_BodyFragme=
nt"><font size=3D"2"><span style=3D"font-size:11pt">
<div class=3D"m_-1010116091299868493gmail-m_6888503219858923550x_PlainText"=
>On Wednesday 31 Jul 2019 12:28:58 Kenshiro [] via bitcoin-dev wrote:<br>
<br>
&gt; I would like to propose that a &quot;moving checkpoint&quot; is added =
to the Bitcoin<br>
&gt; protocol. It&#39;s a very simple rule already implemented in NXT coin:=
<br>
&gt; <br>
&gt; - A node will ignore any new block under nodeBlockHeight - N, so the<b=
r>
&gt; blockchain becomes truly immutable after N blocks, even during a 51% a=
ttack<br>
&gt; which thanks to the moving checkpoint can&#39;t rewrite history older =
than the<br>
&gt; last N blocks.<br>
<br>
How would a (potentially, state-sponsored) netsplit lasting longer than N b=
e <br>
handled?=C2=A0 <br>
-- <br>
Alistair Mann<br>
<br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank" =
rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.linuxfoundati=
on.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--000000000000ed840d058f215d49--