I had a look at https://en.bitcoin.it/wiki/Protocol_documentation where the p2p protocol is documented. Although it states incompleteness I thought it is a good starting point to understand the protocol. To my initial understanding the protocol is based on c-structs that are directly sent over the wire. This makes implementations in other languages more complex.

Would it be possible to introduce a new protocol based on a well known communication method (for example JSON) and make a smooth transition between the protocols? For example with bridge nodes, which are using two protocols in a transition period?

  • I have made an implementation of the protocol in javascript: github.com/getbitpocket/bitcoin-p2p-messages There are already many implementations in other languages as well. Be aware the message payload is much lower with the current serialization as it would be with json. I think this won't change in the future to a json serialization.
    – Stefan
    Feb 25, 2016 at 10:42

1 Answer 1


Yes, the p2p protocol itself is not consensus-critical. Of course there can not be two completely seperate networks, so you will have to take care to create bridges between the two. But other than that you could make a sneakernet p2p network where people exchange USB sticks if you like.

  • While it is true that you can modify the P2P protocols in many instances, some message formats are consensus critical. For example the block message format cannot be changed since the block header as defined in the protocol is hashed to search for a valid PoW.
    – cdecker
    Feb 25, 2016 at 14:04
  • 1
    @cdecker No, that's not critical within the new custom p2p network which OP is asking about, only when communicating to the "normal" bitcoind. That's the role of those bridges I mentioned. Within the custom p2p network you can for example use JSON format or hide them in JPEG files, or in IBLT blocks or anything crazy. Note how Matt's Relay Network does something similar: it bridges with the Bitcoin p2p network, but internally it doesn't use the Bitcoin p2p protocol.
    – Jannes
    Feb 25, 2016 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.