Payment Protocol Proposal: Invoices/Payments/Receipts



Summary:

In an email conversation, Mike Hearn discussed the ambiguities of round-tripping with protocol buffers and how some implementations may not preserve ordering of unknown fields. He suggested several solutions to this problem, including changing the type of the Invoice field in Payment to be "bytes" and set it to be the hash of the originally received binary Invoice message, modifying the spec/implementations so ordering of unknown fields is specified, changing the language of the spec to explicitly state that the received Invoice may not be binary-identical to the one that was sent, or submitting just the merchant_data instead of the entire Invoice back to the merchant. The last option was his preferred solution. Additionally, he believed that the SignedInvoice message itself is broken since protobuf implementations have no reason to guarantee that they can give you the serialized bytes of the Invoice sub-message.


Updated on: 2023-06-06T08:32:55.071078+00:00