Replying to Avatar Peter Todd

https://github.com/nostr-protocol/nips/issues/354

Picking JSON serialization rather than a well specified binary serialization was a terrible idea. Satoshi got this right; nostr did not.

JCS, although more complicated than binary, is a well-specified JSON serialization form. Luckily, for hashing, nostr only relies on a few types (list, integer, string), which are not the most complicated parts of JCS, and it seems that most client implementations happen to be compatible with JCS for these types, at least for most notes. The most complicated part here is that there are 22 characters that require specific escape sequences when encoding strings.

Unfortunately it appears that some devs really really really REALLY want to use a generic JSON library to generate things that look like JSON even when they know that this results in critical bugs.

Reply to this note

Please Login to reply.

Discussion

(that is 22 in hexadecimal, or 34 in base 10, of course)