BIP70: why Google Protocol Buffers for encoding?



Summary:

The discussion is about the choice of Google Protocol Buffers for payment request encoding in BIP-0070 and whether or not text formats such as XML and JSON are more desirable. The original post argues that parsing binary or text is quite fast these days and is not a primary concern versus other needs such as a predictable encoding for a single data representation. Text formats also transit binary data poorly, leading to unnecessary wrapping and unwrapping, although standards efforts are underway to correct some of these problems. A response points out that text formats such as XML or JSON are far less deterministic, loosely specified, have wide variance in parsing, and are not very hashable. The post further argues that HTTP/JSON/XML are human-readable on-the-wire, and there are tons of great open-source libraries and API for parsing/manipulating/generating. Additionally, they are thoroughly specified by independent standards bodies such as the IETF and contain examples, which BIP70 does not. The author concludes by expressing keenness to watch the payment protocol grow regardless of encoding choice.


Updated on: 2023-06-09T15:34:34.729766+00:00