From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WoLZT-0003RK-3i for bitcoin-development@lists.sourceforge.net; Sat, 24 May 2014 23:41:47 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.219.42 as permitted sender) client-ip=209.85.219.42; envelope-from=dscvlt@gmail.com; helo=mail-oa0-f42.google.com; Received: from mail-oa0-f42.google.com ([209.85.219.42]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WoLZR-0007pu-6B for bitcoin-development@lists.sourceforge.net; Sat, 24 May 2014 23:41:47 +0000 Received: by mail-oa0-f42.google.com with SMTP id j17so7127584oag.1 for ; Sat, 24 May 2014 16:41:39 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.153.33 with SMTP id vd1mr33540obb.86.1400974899398; Sat, 24 May 2014 16:41:39 -0700 (PDT) Received: by 10.182.225.66 with HTTP; Sat, 24 May 2014 16:41:39 -0700 (PDT) In-Reply-To: References: Date: Sun, 25 May 2014 09:11:39 +0930 Message-ID: From: Ashley Holman To: Gregory Maxwell Content-Type: multipart/alternative; boundary=089e013a237837ce8804fa2de3a0 X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dscvlt[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WoLZR-0007pu-6B Cc: Bitcoin Development Subject: Re: [Bitcoin-development] Cut-through propagation of blocks X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 23:41:47 -0000 --089e013a237837ce8804fa2de3a0 Content-Type: text/plain; charset=UTF-8 On Sun, May 25, 2014 at 8:29 AM, Bernd Jendrissek wrote: > > The difference is that with cut-through forwarding of blocks, a > sufficiently motivated attacker (being willing to blow 25BTC's worth > of electricity on the effort) can subjugate the entire Bitcoin network > to its DoS attack, rather than having to connect to every node > individually and then still have those individual nodes reject that > invalid block without relaying any knowledge of its existence. > That is true, but they could also apply the same hash power to mine valid blocks and would achieve the same outcome (their blocks would go to everyone), except they would get paid for it. I wonder if it should even be called DoS, due to the extreme and costly rate-limiting thats implied. > An attack could also take the form of a block body that never arrives > - a sort of teergrube attack, where the goal is to get the network > mining empty block upon empty block on top of that valid-PoW header > whose body never arrives. It doesn't have to be with an explicitly > invalid block. > Thank you for raising this, as I share this concern. There is another similar attack: if I send you a new block very slowly, I occupy all your upstream peer slots indefinitely until the block is complete, because there is no out-of-band messaging capability or ability to cancel a message. There is also sub-optimal logic in choosing to download a block only from the first person to offer it. It means you are fetching it from the lowest latency path, but what really matters is who can give it to you fastest. If there are multiple people who can send you a block at once, and you have some idea of your spare upstream bandwidth capacity, why not let two or more peers compete to send you the block fastest? So to implement this type of thing, the p2p protocol should allow for multiplexing of messages. Something like HTTP chunked encoding. It could be in the form of: , , etc etc You only send a chunk once you've got the whole chunk in your buffer, so it's not possible to get hung up on a single slow message. One block can overtake another along the same hop path if it is being streamed faster. On Sun, May 25, 2014 at 8:46 AM, Gregory Maxwell wrote: > > If you want to go full out crazy in optimizing in this space, there > are fancier things that can be done to further reduce latency and > increase efficiency: > https://en.bitcoin.it/wiki/User:Gmaxwell/block_network_coding ... but > some of this stuff really should be done as a seperate protocol. There > is no need to have Bitcoin transport all using a single protocol, and > we can get better robustness and feature velocity if there are a > couple protocols in use (you could just run a block-transport-protocol > daemon that connects to your local node via the classic protocol). What about a separate project which is a mesh router specifically designed for low-latency transmission of blocks? It could support things like a more sophisticated/configurable routing table, and have some kind of discovery where it tries to optimise its topology. There could even be some way for nodes to prove their hash power, so pools can find each other and directly peer / prioritise sends. --089e013a237837ce8804fa2de3a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sun, May 25, 2014 at 8:29 AM, Bernd Jendrissek=C2=A0<bitcoin@bpj-code.co.za>=C2=A0wrote:
The difference is that with cut-through forwarding of blocks, a
sufficie= ntly motivated attacker (being willing to blow 25BTC's worth
of elec= tricity on the effort) can subjugate the entire Bitcoin network
to its D= oS attack, rather than having to connect to every node
individually and then still have those individual nodes reject that
inva= lid block without relaying any knowledge of its existence.
=

That is true, but they could also apply the same hash p= ower to mine valid blocks and would achieve the same outcome (their blocks = would go to everyone), except they would get paid for it. =C2=A0I wonder if= it should even be called DoS, due to the extreme and costly rate-limiting = thats implied.

=C2=A0
An attack could also take = the form of a block body that never arrives
- a sort of teergrube attack, where the goal is to get the network
minin= g empty block upon empty block on top of that valid-PoW header
whose bod= y never arrives. It doesn't have to be with an explicitly
invalid bl= ock.

Thank you for raising this, as I share thi= s concern. =C2=A0There is another similar attack: if I send you a new block= very slowly, I occupy all your upstream peer slots indefinitely until the = block is complete, because there is no out-of-band messaging capability or = ability to cancel a message.

There is also sub-optimal logic in choosing to download= a block only from the first person to offer it. =C2=A0It means you are fet= ching it from the lowest latency path, but what really matters is who can g= ive it to you fastest. =C2=A0If there are multiple people who can send you = a block at once, and you have some idea of your spare upstream bandwidth ca= pacity, why not let two or more peers compete to send you the block fastest= ?

So to implement this type of thing, =C2=A0the p2p proto= col should allow for multiplexing of messages. =C2=A0Something like HTTP ch= unked encoding. =C2=A0It could be in the form of:

= <msgid><chunksize><rawbytes>, <msgid><chunksize&= gt;<rawbytes>, =C2=A0etc etc

You only send a chunk once you've got the whole chu= nk in your buffer, so it's not possible to get hung up on a single slow= message. =C2=A0 One block can overtake another along the same hop path if = it is being streamed faster.

On Sun, May 25, 2014 at 8:46 AM, Gregor= y Maxwell=C2=A0<gmaxwell@gmail.com>=C2=A0wrote:=C2=A0 If you want to go full out crazy in optimizing in this space, there
are = fancier things that can be done to further reduce latency and
increase e= fficiency:
https://en.bitcoin.it/wiki/User:Gmaxwell/blo= ck_network_coding=C2=A0=C2=A0... but
some of this stuff really should be done as a seperate protocol. There
i= s no need to have Bitcoin transport all using a single protocol, and
we = can get better robustness and feature velocity if there are a
couple pro= tocols in use (you could just run a block-transport-protocol
daemon that connects to your local node via the classic protocol).

What about a separate project which is = a mesh router specifically designed for low-latency transmission of blocks?= =C2=A0It could support things like a more sophisticated/configurable routi= ng table, and have some kind of discovery where it tries to optimise its to= pology. =C2=A0There could even be some way for nodes to prove their hash po= wer, so pools can find each other and directly peer / prioritise sends.
--089e013a237837ce8804fa2de3a0--