Closed michielbdejong closed 7 years ago
As discussed on Slack with @sharafian, it’s a typo in the document, it should read 'see section 2.2, case 5', not case 4.
I contacted oss support to ask about this.
For now, let's keep it as a VarInt, if the number of elements in the sequence-of < 256, then 1 byte length '1' and then 1 byte with that number of elements.
Got a reply:
Dear Mr. de Jong:
Yes, you are correct. We will fix the overview document.
Thank you for letting us know.
So we can definitely stick with VarInt (section 2.2, case 5) which is also what makes much more sense than UInt64 (section 2.2, case 4). Nice! :)
From the wording in section 17.2 of http://www.itu.int/rec/T-REC-X.696-201408-S it's also clearer that the quantity of a sequence-of should definitely be a VarInt.
http://www.oss.com/asn1/resources/books-whitepapers-pubs/Overview%20of%20OER.pdf says the quantity field of a sequence-of type is encoded as an unsigned binary integer in eight octets, doesn't that contradict what was implemented in https://github.com/interledgerjs/clp-packet/blob/master/index.js#L85-L86?