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 ) 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 ; 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: From: Jeff Garzik To: Bitcoin Development 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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