summaryrefslogtreecommitdiff
path: root/8d/4aa992e8760775373b86c1b240fed95c04d06f
blob: 380ba4e66d91e61b155aa2e4ddae70883c3cb7f9 (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
Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <jgarzik@exmulti.com>) id 1UJIhX-0003ep-K3
	for bitcoin-development@lists.sourceforge.net;
	Sat, 23 Mar 2013 07:17:15 +0000
X-ACL-Warn: 
Received: from mail-pb0-f45.google.com ([209.85.160.45])
	by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1UJIhU-0001O0-HX
	for bitcoin-development@lists.sourceforge.net;
	Sat, 23 Mar 2013 07:17:15 +0000
Received: by mail-pb0-f45.google.com with SMTP id ro8so3401010pbb.32
	for <bitcoin-development@lists.sourceforge.net>;
	Sat, 23 Mar 2013 00:17:06 -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:date:message-id:subject
	:from:to:content-type:x-gm-message-state;
	bh=ho48kf0302A2NXFQJyfNXs9cML008JwuWcn6DFxXQwY=;
	b=fkwo7nBHI6j3Jk+AG2mjWRyagCq3b/bfraleF/oy9RvBA1KtzDTIebCHdjrNSOhyVh
	3D1BiGkKjNXMAZWMJ317R58PFza4qcdBIWhM/aHrwcVMDr/0V/1mL3dmA9aX11XMA+6V
	MHK9UVnik0EY+Xfj8DRdBJChlNURcRNsHSFmULU94gUSqdxzz0KQkVnFhDVuOkqBgANl
	49kOKxLXNJe0JIsG6vhWQu1Qr0d8Lual8EWyZ0sUNuwxYXEHZbRCfYxSrHBW6VwLcAnh
	vktjXBBNa1433ZiIGVoSm9B4IRm+0Q0a9YL2PySGjZjAv44/n7f3d55olW25Q/HmJZLT
	9c7Q==
MIME-Version: 1.0
X-Received: by 10.68.143.197 with SMTP id sg5mr6760418pbb.101.1364023026593;
	Sat, 23 Mar 2013 00:17:06 -0700 (PDT)
Received: by 10.68.146.133 with HTTP; Sat, 23 Mar 2013 00:17:06 -0700 (PDT)
X-Originating-IP: [99.43.178.25]
Date: Sat, 23 Mar 2013 03:17:06 -0400
Message-ID: <CA+8xBpe9D=poPyJ=soGdN3sovqdmvyGGij6FM8PHYGUB5aUkzQ@mail.gmail.com>
From: Jeff Garzik <jgarzik@exmulti.com>
To: Bitcoin Development <bitcoin-development@lists.sourceforge.net>
Content-Type: text/plain; charset=ISO-8859-1
X-Gm-Message-State: ALoCoQn6ckseAtQcvf13oZiw0GtMIz+3RnRhCYQwM/JCkFGU1MQ7U5lFnqcOmJ1R2Zdqfm7lvSCH
X-Spam-Score: 0.0 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
X-Headers-End: 1UJIhU-0001O0-HX
Subject: [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 07:17:15 -0000

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