BIP70: why Google Protocol Buffers for encoding?



Summary:

The discussion revolves around the use of JSON and schema in BIP70. It is argued that for the number of fields in the spec, having a JSON to schema is not worthwhile as there are only three types - bytes, int, and string. The use of cross-platform libraries for protobuf in C# was found to be time-consuming compared to coding the JSON wrapper classes by hand. Jeff Garzik argues that using JSON or XML requires writing custom marshalling code which can be tiresome and error-prone, whereas protobuf and its modern competitors like msgpack provide type support natively and avoid bugs routinely found in JSON parsing code. Mike Hearn suggests using cross-platform abstraction libraries to load trusted root certificates from either the OS root store or a custom one and states that there is no obligation to use the OS root store. Using third-party services to convert things to JSON is viewed as one of the least obvious and highest effort solutions.


Updated on: 2023-06-09T15:29:44.234168+00:00