Miguel already created one a while back. I think it is against our vision where users don't see keys much, instead using their local aliases. https://github.com/miguelmedeiros/pkarr-vanity-keys
Discussion
what happens if one creates too many pubkeys and uses them to spam the DHT?
Nodes will rate limit them, nodes that don't have rate limits will keep dropping older data.
It is a sloppy network, you should never expect the DHT to give you perfect reliability.
But just like you don't query the DNS root servers directly, you don't need to query the DHT directly, you can use relays with bigger cashes and more robust rate limiting and only rely on the DHT for things you haven't seen before.
obviously that also means that you shouldn't update your Pkarr too often, because long TTL is a big part of the reliability and scalability
is that very different from querying 3 or 4 nostr relays for a user's list of preferred servers?
which 3 or 4 relays should I query to know what are your preferred servers? how can I possibly know which relays did you post your list on?
wouldn't that by default force us all to post and read from the same 3/4 relays to have reliable resolution? wouldn't that make them target? and what happen when they censor you or go offline? where do I go to find you now?
if you try to solve this, you will end up reinventing DHTs, but you have ZERO chance of making a DHT even 1% of the size of Mainline.
So your options are:
1. use Mainline DHT
2. make a worse more vulnerable version of Mainline DHT and use that instead.
The NIP-65 records, which is the Nostr's DNS in a way, should be in all relays. Clients should spread that record far and wide.
There are indexing relays like purplepag.es that you can use all fallback, but usually there is no need to.
I am long time fascinated by mainline DHT, and it's cool you are experimenting with it. Can we talk about browser js not being able to access DHT directly? User needs to set a custom dns server, which is quite a barrier, and is the middleman that can censor or be censored, is that right?
We could have a custom relay that could query dht for user's outbox relays and fetch requested events from there, acting as dht bridge for web apps. But then it's no different from existing indexer relays that clients hardcode for discovery.
We could also have a custom dns server resolving npubs to their outbox relay. But again users won't change their dns settings.
I go back and forth on this and still don't see what is fundamentally solved by this use of dht, at least for the web. Am I missing something?
This a common question: if you need to use a bridge between browsers and Mainline DHT then how is this better than Nostr relays?
1. Native apps obviously are a thing, and arguably they are giving the web a run for it's money, so why dismiss that?
2. relays/resolvers for Pkarr are not only useful for browsers, they also add some reliability and reduce the load on Mainline which then becomes like the DNS root servers
3. Finally to your point, the upside is that you as an app developer can use your own relay to support your browser customers, and I can use my own relay to support my users, and both our relays are going to magically connect, not by gossiping with untrusted strangers, and not by forming private swarms, but by simply using Mainline as the backbone.
Thanks for the input. Native apps don't really have to rely on dns like web apps and are already much less restricted and harder to censor at transport level. Those are much better censored at app store level and hence my focus on the web apps. Pkarr being cache seems like a bug, not a feature - if resolving HAS to use cache middleware to be reliable then it's less decentralised, and 10m nodes turn to 1. It looks like unless this becomes a web standard browsers won't benefit fundamentally. I thought about this much less than you did so this isn't a criticism, just thinking out loud.
I am curious though if you might me misunderstanding pubky and thinking we want to put all data on the torrent network with p2p etc.
That is NOT what we are doing. We strictly use Mainline to find the Homeserver (which is the Outbox in Nostr world, except it is a normal https server like WebDav). All data is on that server, we don't use Torrent at all.
Others might choose to use WebTorrent for some use cases like peertube, but we don't think personal mutable data has enough demand for torrent to be helpful, and obviously not reliable
I understand dht is only to resolve a pubkey to an endpoint, no questions about this.