BIP70/71 issue, RFD



Summary:

In 2014, Andreas Schildbach was experimenting with BIP70/71 (payment protocol) usage in face to face payments and encountered an issue with the protobuf format. Protobufs are not self-delimiting, which means if someone is reading from an undelimited stream, they will read endlessly because they don't know how much to read. Though current BIP70 implementations work because they're reading either from a file or from an HTTP resource which sets the Content-Length header, this header is optional and there are many kinds of streams that don't have this built-in delimiting mechanism. The Java protobuf API solves this by offering delimited I/O. However, this leading varint is an incompatible change and would need to be added to the spec. PaymentMessage and PaymentACK were specifically encountered with this issue, but it might be a good idea to apply this to all messages if any. It is open for discussion.


Updated on: 2023-06-08T00:46:06.381023+00:00