Is there a limit size for nostr events?

For example, long form content can be of any length? what is the limit before we break any relay?

#asknostr

Reply to this note

Please Login to reply.

Discussion

Pretty sure I remember hitting character limits when playing around with python nostr earlier this year. It was a small number of relays, but a few of them were rejecting at surprisingly low character limits.

Ah. It’s up the the relay operator to decide how much to take in, and there are no agreed size?

I don’t think it’s referenced anywhere in the spec one way or another. Similarly I know relays sometimes reject old time stamps, but that is explicitly mentioned in the NIP. But I would imagine one of the other client devs knows much more about this than i do! Hopefully someone else chimes in

There must be some limit or else a malicious not could just spam post entire 1000 page books per post per minute. Would be ridiculous & even text uses up space, which sums up in such huge quantities rather quickly.

I guess, something like a 2000 character limit would be something acceptable to start with.

Each relay has different limits. I limited the event content to have a maximum of 102400 characters

Thanks. That’s insightful.

100k and 256k are the 2 most common configurations I encounter

Thanks!

https://github.com/nostr-protocol/nips/blob/master/11.md

this is the nip, you can do a Curl to the relay url and see the settings.

🙌