summaryrefslogtreecommitdiff
path: root/19/a04ad8b4b707013dbff6ca5e613cbe2a0253bc
blob: 54050727a2f34251d6b28919bc28fe8334a8bfe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
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&#39;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">&lt;<a href=3D"mailto:jgarzik@exmulti.com" target=
=3D"_blank">jgarzik@exmulti.com</a>&gt;</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 &quot;getudpcook&quot; TCP P2P command returns a &quot;udpcook&quot; =
message,<br>
containing a yummy cookie<br>
- UDP P2P commands &quot;inv&quot;, &quot;tx&quot; and &quot;addr&quot; are=
 handled as if received via TCP<br>
- UDP P2P command &quot;udpsub&quot; sets a mask, that subscribes to one or=
 more<br>
data broadcasts.<br>
- When USM_INV_BCAST mask bit is set, receive &quot;inv&quot; 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 &quot;inv&quot; relay speed<br>
- Investigate unconditional &quot;tx&quot; broadcasting via UDP, as &quot;i=
nv&quot;<br>
alternative, for small tx&#39;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--