Cool! How do you determine nbr of users per relay?
Discussion
Pubkey viewed in all events of a relay I think đź’
Distinct pubkeys based on all events in a relay? If so, the supposedly 5k users on my relay don’t match up with the numbers I get from my sql queries..
Where do the 5k come from?
https://nostrum.pro/search/#relays, my relay is wss://nostr.oxtr.dev
Is your relay displaying a dashboard with that kind of stats?
Not anymore. I did have a dashboard up earlier but took it down when Jacks followers bombarded my relay with traffic in hopes of squeezing out a few more CPU cycles
When you update the relays in the client you're using it puts a record of it in nostr.
Cool, so it's based on the p tags in kind 3 events? I wonder how clients define which relay to put into the main-relay field in the p-tag then..
cc:Â #[1] #[2] #[3]
#[3] your “tag index” shows up as “#[1]” for me here on Damus
I've actually been wondering that myself. For the client I'm writing, if you're replying, I have it use the first relay the client discovered the note you're replying to. For new notes, I just use the first one in the list.
And yes it's based on kind 3 events, but not the P tags (that's contacts) but the relay list held in the note content.
Ohh ok, that makes more sense. Which relay do you fetch these events from then?
I gather the events from a bunch of the most popular relays. I did the first load of events from Jan '22 'til yesterday, then counted up which relays in those events were the most popular, then re-gathered the events from all the most popular relays.
for astral I am choosing randomly rn. once we have a way of denoting a user's main relay i will start using that.
Randomly, as in a random relay url from the users relay list?
no from the list of relays that have reported seeing the users latest kind 3 event. its hard to verify which relays from their relay list have up to date user events rn. i'm planning to start alerting users when astral finds an old event from an out of sync relay.
alphaama adds the relays that sent the event to an array, so when it builds the reply it just fetches `seen[0]`, so it's the first that returned it.. when adding to kind-3, it's manual, so you manually choose which relay and petname you add to the tag when using the `--f` command