A bitcoin UDP P2P protocol extension



Summary:

Jeff Garzik, from exMULTI, Inc., has created a rough draft implementation of a UDP P2P protocol extension for Bitcoin. The protocol is bound to the same port as TCP P2P (normally 8333), advertises NODE_UDP in nServices and requires an active, simultaneous TCP P2P connection to be useful against DoS and other attacks. The protocol specification includes multiple P2P messages per UDP packet permitted, max UDP packet size 100*1024 bytes, and UDP P2P commands "inv", "tx" and "addr" are handled as if received via TCP. Additionally, the new "getudpcook" TCP P2P command returns a "udpcook" message, which contains a yummy cookie, while the 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 through UDP rather than TCP.The project and design goals include improving "inv" relay speed, investigating unconditional "tx" broadcasting via UDP as an alternative to "inv" for small transactions, improving block relay speed, or perhaps block header relay speed. Furthermore, it aims to open up new design avenues for P2P patterns more suited to UDP than TCP in general. Jeff Garzik believes that this theorized protocol could be useful for some messages broadcast throughout the network. He states that productive discussions start with code; otherwise, discussion continues forever.


Updated on: 2023-06-06T11:17:56.772032+00:00