lontivero on Nostr: Many Nostr relays, after deserializing an event, persist it in a database as its ...
Many Nostr relays, after deserializing an event, persist it in a database as its individual part (pubkey, kind, createdAt, tags, content, signature) and forget to persist the most important thing: THE EVENT
That means that those relays must rebuild the event and serialize it again and again, million times.
PSA: persist the event as you received it.
Published at
2023-03-20 12:26:55Event JSON
{
"id": "4a9aa03342e9bcc283b7ab03278bde63024f3ca8d2e665e4e424d2c5dc07ec8f",
"pubkey": "9e30e940238cd9ebebc6328176dd4d109812129442f2a6c38727fc66fa7ea90a",
"created_at": 1679315215,
"kind": 1,
"tags": [],
"content": "Many Nostr relays, after deserializing an event, persist it in a database as its individual part (pubkey, kind, createdAt, tags, content, signature) and forget to persist the most important thing: THE EVENT\n\nThat means that those relays must rebuild the event and serialize it again and again, million times.\n\nPSA: persist the event as you received it.",
"sig": "ce1311064e2f36072bd811ca7f0f637be7e7c97f4088de7ac522baadcfa2cd5efa7306b41b7a5db38523a759c9a7c31909d52a772cd6cb0e66f4da4636d23e25"
}