Basically my vibe code experiment of the week.
Mine has this concept:
- If we come across it we cache it.
- To our peers we forward the query the user did so we get their data, along with a list of who we already queried so they don't all spam the same relay. Anything that comes back we cache.
- If its sent to us we forward it if we dont already have it.
- If we come across a new relay we save it. If we come across a relay often we prioritize it to automatically stay in touch with relays people actually use.
- We announce ourselves over the network so others can find us. (This bit I still need to refine, its probably good enough that only the public nodes do this). These events are tempoary events relays dont have to keep long, and frequently overwritten with an updated copy. Now other nodes find us.
- We centralize by promoting peers we like to ultrapeer if we need more of those. Those facilitate things like holepunching and fetch more events than leaf nodes. (Gnutella style).
So far todays test runs went very well once I found why it was bombarding relays with requests (the ai added some stuff I didn't ask for that amplified queries, and it lacked good ajti looping I now added). How well it works in practise when theres a lot of them has to be seen though. But its designed to be extremely resillient to where the network just heals itself and where all these nodes are aggregator relays.