[Bitcoin-development] Proposed new P2P command and response: getcmds, cmdlist

Jeff Garzik jgarzik at exmulti.com
Sun Jun 17 15:19:53 UTC 2012


On Sat, Jun 16, 2012 at 4:42 AM, Wladimir <laanwj at gmail.com> wrote:
> Which is a perfectly reasonable requirement. However, one could simply
> standardize what a 'thin client' and what a 'thick client' does and offers
> (at a certain version level), without having to explicitly enumerate
> everything over the protocol.
>
> This also makes it easier to deprecate (lack of) certain features later on.
> You can simply drop support for protocol versions before a certain number
> (which has happened before). With the extension system this is much harder,
> which likely means you keep certain workarounds forever.
>
> Letting the node know of each others capabilities at connection time helps
> somewhat. It'd allow refusing clients that do not implement a certain
> feature. Then again, to me it's unclear what this wins compared to
> incremental protocol versions with clear requirements.
>
> I'm just afraid that the currently simple P2P protocol will turn into a zoo
> of complicated (and potentially buggy/insecure) interactions.

What is missing here is some perspective on the current situation.  It
is -very- easy to make a protocol change and bump PROTOCOL_VERSION in
the Satoshi client.

But for anyone maintaining a non-Satoshi codebase, the P2P protocol is
already filled with all sorts of magic numbers, arbitrarily versioned
binary data structures..  already an unfriendly zoo of complicated and
potentially buggy interactions.  There is scant, incomplete
documentation on the wiki -- the Satoshi source code is really the
only true reference.

I see these problems personally, trying to keep ArtForz' half-a-node
running on mainnet (distributed as 'blkmond' with pushpool).

In an era of HTTP and JSON, NFS and iSCSI, bitcoin's P2P protocol is
woefully backwards, fragile, limited and inflexible when it comes to
parameter/extension exchange and negotiation.  Even iSCSI, that which
is implemented on hard drive firmware, has the ability to exchange
key=value  parameters between local and remote sides of the RPC
connection.

Calling the current P2P protocol "simple" belies all the
implementation details you absolutely -must- get right, to run on
mainnet today.  Satoshi client devs almost never see the fragility and
complexity inherent in the current legacy codebase, built up over
time.

-- 
Jeff Garzik
exMULTI, Inc.
jgarzik at exmulti.com




More information about the bitcoin-dev mailing list