Why Nostr? What is Njump?
2024-09-30 08:11:40
in reply to

EddieOz on Nostr: I will answer in English just to tag ...

I will answer in English just to tag @npub1utx00neqgqln72j22kej3ux7803c2k986henvvha4thuwfkper4s7r50e8 here
---

I think there are two main problems then.

The first one is the memory overload/leaking causing it to crash. The relay either becomes slow and freezes, or Linux simply kills the process without an error message. I noticed that sometimes, before crashing, it gives a connection error message on the websockets of the other relays when it tries to do the blast.

The second issue, I think, could be related to the payload size.

Every time you follow someone, the nostr app does something like this:
1) subscribes to the relays to retrieve the kind 3 of your pubkey.
2) receives the entire list of follows (contacts list).
3) adds the new pubkey at the end of the list.
4) creates a new kind 3 message, signs it, and sends it to the relay(s).

That's why the more contacts on the list, the slower it becomes to follow a new contact. Since it downloads the entire list, adds the new one, and publishes everything replacing the previous list, the process gets slower depending on the number of contacts. This could potencially become a vector for DDoS attacks on relays.

That's when I created the script. Instead of adding one pubkey at a time, I started to build a list first and publish the kind 3 all at once. I would increment the list by a few hundred new pubkeys at a time.

That's when I noticed that after 6,000 registered contacts, it starts giving an error when I add more and try to send. It throws an error in the websocket.

A third thing I noticed is that with such a large WoT, it sometimes hits a rate limit from the relays it queries to build the graph.
Author Public Key
npub1atrrqav7xyur93xszyaeuyyzy70mpmax488grndfaz3kddyc3dyquawyga