myself on Nostr: This is offtopic but isn't it strange that Nostr uses a JSON-serialized string to ...
This is offtopic but isn't it strange that Nostr uses a JSON-serialized string to calculate the event ID/signature? It's somewhat vague as different implementations may serialize the same object differently (e.g. due to escaping). Maybe something binary would have made more sense.
Published at
2023-03-10 13:09:22Event JSON
{
"id": "9d3a9bbabcad1817c0386a84332f68a819da208abd7e9b3758fbb7859465e4ac",
"pubkey": "67ddca50751581c703c174790588c2cd8b00f80313d0f80a5b9e73d45e48ac20",
"created_at": 1678453762,
"kind": 1,
"tags": [
[
"e",
"49c73c74eb537436ffab8128e6b1a1243de442f87f06fbe8dc32eee6687c4887",
"wss://relay.snort.social",
"root"
],
[
"p",
"b2dd40097e4d04b1a56fb3b65fc1d1aaf2929ad30fd842c74d68b9908744495b"
]
],
"content": "This is offtopic but isn't it strange that Nostr uses a JSON-serialized string to calculate the event ID/signature? It's somewhat vague as different implementations may serialize the same object differently (e.g. due to escaping). Maybe something binary would have made more sense.",
"sig": "193518061bd8c676ea959c39138fcbb27e38bdf018b3c077994f190d384fb0a43d38c0eb971bb20b7c6d734db00fa30e128b494f24afcbb1d5c9dd285a6f3b5d"
}