Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from <mark@monetize.io>) id 1UJWxK-0002no-CE for bitcoin-development@lists.sourceforge.net; Sat, 23 Mar 2013 22:30:30 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UJWxI-0003ku-MQ for bitcoin-development@lists.sourceforge.net; Sat, 23 Mar 2013 22:30:30 +0000 Received: by mail-we0-f174.google.com with SMTP id u7so218749wey.19 for <bitcoin-development@lists.sourceforge.net>; Sat, 23 Mar 2013 15:30:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=2HqNZRSU5UfsNWvz3Ya4Mk6Dogq+fpBeePkIdBTnPqM=; b=B7sNYbTuWI/KWpfk1mzskNDbW5FDVPuit/3AKjKhQJGY/SfP1AQmc4gQ9g3nhbWn7Q X3HOfaYjdh6IAj7VqAXoo1gTbLPIDAyvuFYCm3bFh5BTqA9iyDCovJfDH0aMxvgvZF8l cTAsn3O/2RUWCqZ2TtVaKtDruLy4Gm7PRypSSPDZoj6iePM9QVKs3TX1ReT2qBr/wmj0 87Xm3IEfcPTKxQs+6TOkC9hqr0CMq0aAzlmZm/JdvkWmgPMFDp4raPkAawEMqZmsy8zP lFeqpPwuNWDXFigcmUGQFzJstUWQmMSktjGMTBSLRCrx6ViugzzNjNKbfj6ud+jzz+OV XB8Q== MIME-Version: 1.0 X-Received: by 10.180.182.36 with SMTP id eb4mr11894443wic.8.1364077822181; Sat, 23 Mar 2013 15:30:22 -0700 (PDT) Received: by 10.194.30.38 with HTTP; Sat, 23 Mar 2013 15:30:22 -0700 (PDT) X-Originating-IP: [50.0.36.186] In-Reply-To: <CA+8xBpe9D=poPyJ=soGdN3sovqdmvyGGij6FM8PHYGUB5aUkzQ@mail.gmail.com> References: <CA+8xBpe9D=poPyJ=soGdN3sovqdmvyGGij6FM8PHYGUB5aUkzQ@mail.gmail.com> Date: Sat, 23 Mar 2013 15:30:22 -0700 Message-ID: <CACh7GpFqZtWVQFjM-w1uoB+74sVvE=_mXwBQ4P-qGMp2=HJ_yQ@mail.gmail.com> From: Mark Friedenbach <mark@monetize.io> To: Jeff Garzik <jgarzik@exmulti.com> Content-Type: multipart/alternative; boundary=047d7b6229260995d304d89f1e68 X-Gm-Message-State: ALoCoQlNVrzpLslY+jjV4fxzplt/UHF+0FaG/2RfCY1HXfaFfyICJXoH7/+M19B/4ouWQBDc9tqL X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1UJWxI-0003ku-MQ Cc: Bitcoin Development <bitcoin-development@lists.sourceforge.net> Subject: Re: [Bitcoin-development] A bitcoin UDP P2P protocol extension X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: <bitcoin-development.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>, <mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development> List-Post: <mailto:bitcoin-development@lists.sourceforge.net> List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>, <mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe> X-List-Received-Date: Sat, 23 Mar 2013 22:30:30 -0000 --047d7b6229260995d304d89f1e68 Content-Type: text/plain; charset=UTF-8 If you're considering a datagram protocol, you might be interested in some more modern alternatives to UDP: UDT: Breaking the Data Transfer Bottleneck http://udt.sourceforge.net/ Stream Control Transmission Protocol http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol On Sat, Mar 23, 2013 at 12:17 AM, Jeff Garzik <jgarzik@exmulti.com> wrote: > Here is a rough draft implementation of a UDP P2P protocol extension > for bitcoin: > > https://github.com/jgarzik/bitcoin/tree/udp > http://yyz.us/bitcoin/udp-v0.patch > > Protocol specification (such that it is): > > - UDP, bound to same port as TCP P2P (normally 8333) > - Active, simultaneous TCP P2P connection required (useful against DoS > and other attacks) > - Same message format as TCP P2P, same pchMessageStart conventions, > etc. (my CNetMessage pull req would be helpful here) > - Multiple P2P messages per UDP packet permitted > - Max UDP packet size 100*1024 bytes > - Advertises NODE_UDP in nServices > - New "getudpcook" TCP P2P command returns a "udpcook" message, > containing a yummy cookie > - UDP P2P commands "inv", "tx" and "addr" are handled as if received via > TCP > - UDP P2P command "udpsub" sets a mask, that subscribes to one or more > data broadcasts. > - When USM_INV_BCAST mask bit is set, receive "inv" messages via UDP > rather than TCP. > > Project and design goals (or, why do this?): > > - It is theorized that UDP may be useful for some messages we > broadcast throughout the network > - A productive discussion STARTS with code, otherwise discussion > continues forever. > - Investigate improving "inv" relay speed > - Investigate unconditional "tx" broadcasting via UDP, as "inv" > alternative, for small tx's. > - Investigate improving block relay speed (or perhaps block header relay > speed) > - Open up new design avenues, for P2P patterns more suited to UDP than > TCP in general. > > -- > Jeff Garzik > exMULTI, Inc. > jgarzik@exmulti.com > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > --047d7b6229260995d304d89f1e68 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">If you're considering a datagram protocol, you might b= e interested in some more modern alternatives to UDP:<br><br>UDT: Breaking = the Data Transfer Bottleneck<br><a href=3D"http://udt.sourceforge.net/">htt= p://udt.sourceforge.net/</a><br> <br>Stream Control Transmission Protocol<br><a href=3D"http://en.wikipedia.= org/wiki/Stream_Control_Transmission_Protocol">http://en.wikipedia.org/wiki= /Stream_Control_Transmission_Protocol</a><br><br></div><div class=3D"gmail_= extra"> <br><br><div class=3D"gmail_quote">On Sat, Mar 23, 2013 at 12:17 AM, Jeff G= arzik <span dir=3D"ltr"><<a href=3D"mailto:jgarzik@exmulti.com" target= =3D"_blank">jgarzik@exmulti.com</a>></span> wrote:<br><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex"> Here is a rough draft implementation of a UDP P2P protocol extension<br> for bitcoin:<br> <br> =C2=A0 =C2=A0 =C2=A0<a href=3D"https://github.com/jgarzik/bitcoin/tree/udp"= target=3D"_blank">https://github.com/jgarzik/bitcoin/tree/udp</a><br> =C2=A0 =C2=A0 =C2=A0<a href=3D"http://yyz.us/bitcoin/udp-v0.patch" target= =3D"_blank">http://yyz.us/bitcoin/udp-v0.patch</a><br> <br> Protocol specification (such that it is):<br> <br> - UDP, bound to same port as TCP P2P (normally 8333)<br> - Active, simultaneous TCP P2P connection required (useful against DoS<br> and other attacks)<br> - Same message format as TCP P2P, same pchMessageStart conventions,<br> etc. (my CNetMessage pull req would be helpful here)<br> - Multiple P2P messages per UDP packet permitted<br> - Max UDP packet size 100*1024 bytes<br> - Advertises NODE_UDP in nServices<br> - New "getudpcook" TCP P2P command returns a "udpcook" = message,<br> containing a yummy cookie<br> - UDP P2P commands "inv", "tx" and "addr" are= handled as if received via TCP<br> - UDP P2P command "udpsub" sets a mask, that subscribes to one or= more<br> data broadcasts.<br> - When USM_INV_BCAST mask bit is set, receive "inv" messages via = UDP<br> rather than TCP.<br> <br> Project and design goals (or, why do this?):<br> <br> - It is theorized that UDP may be useful for some messages we<br> broadcast throughout the network<br> - A productive discussion STARTS with code, otherwise discussion<br> continues forever.<br> - Investigate improving "inv" relay speed<br> - Investigate unconditional "tx" broadcasting via UDP, as "i= nv"<br> alternative, for small tx's.<br> - Investigate improving block relay speed (or perhaps block header relay sp= eed)<br> - Open up new design avenues, for P2P patterns more suited to UDP than<br> TCP in general.<br> <br> --<br> Jeff Garzik<br> exMULTI, Inc.<br> <a href=3D"mailto:jgarzik@exmulti.com">jgarzik@exmulti.com</a><br> <br> ---------------------------------------------------------------------------= ---<br> Everyone hates slow websites. So do we.<br> Make your web apps faster with AppDynamics<br> Download AppDynamics Lite for free today:<br> <a href=3D"http://p.sf.net/sfu/appdyn_d2d_mar" target=3D"_blank">http://p.s= f.net/sfu/appdyn_d2d_mar</a><br> _______________________________________________<br> Bitcoin-development mailing list<br> <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo= pment@lists.sourceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development= " target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment</a><br> </blockquote></div><br></div> --047d7b6229260995d304d89f1e68--