-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add B0 NIP for Blossom interaction #1822
base: master
Are you sure you want to change the base?
Conversation
ACK |
This is dumb. Lots of image servers end with sha256 and are not blossom. Just do a |
That would require explicit blossom support on clients. |
Yep. Force it. |
HTTP isn't broken and works very well for serving files. the only important part is to include sha256 so it can be found when the link breaks |
I didn't say it was broken. It's just ambiguous. And because it works as is, no one will ever code this. If you force it, you might get some actual traction on decentralizing media. |
related? hzrd149/blossom#31 |
I have argued in the past that Blossom URLs should be a little more explicit than just including 64-char hex strings, and we could probably still do that, but not break HTTP. The genius of Blossom is that it works for everybody as it is and the other stuff can be added later. In any case it's not a big deal, what if you try a Blossom server with a URL that looks like a hash but isn't? Doesn't matter, it will fail just like it will fail if the file had never been there. Also if a Nostr user has a list of Blossom servers and their URLs look like hashes then the odds of them being hashes is really high, so we're probably good. In any case I think these discussions should probably be held on the Blossom repo or on the group at |
It's not nothing. When servers go offline, lots of pictures and videos stop functioning at the same time and that triggers lots of pings to other servers to see if we can find the file. This can happen when the server is busy and runs a timeout, when individual pictures get deleted, when the user is offline from part of the web (not uncommon in phones), when firewalls/VPN have errors or block content, and when the server goes bust, of course. Trying different servers is not cost-free and when the switch works, the UX flickering is not that great. If we had a better way to figure out which links are blossom's, we could manage this thing a whole lot better, including with pre-caching systems way before information gets to the screen so that when it loads, it already has the complete image preloaded. We could even reuse the cached image if a different server with the same picture was used previously. The issue is that with blossom, the chance that the hash matches is high. For most of the other servers, the chance of a hash matching is remote. So, we can't really trust caching by random SHA-256 hashes by default because the images are generally different. We already have to do so much to parse and display |
I see your point now and I agree with the things you said. But here is a list of many small and big things that are important as arguments for keeping things as they are:
Also, I think your points you mention could be addressed by just having something to make blossom HTTP URLs more identifiable, like a |
Same exact problem for
Only in the early days. All the servers we use today will likely go out of business in time. Older posts will always have broken URLs. Browsing the past will be very annoying, with lots of missing data, even if your relays are awesome.
I like |
What about |
It's not totally fine, no, it's annoying and painful. I just don't see any other way.
Yes, but people will be more tolerant when browsing the past, that was my point.
What about an opt-in solution that is just |
Now we'll have to assume that the person who hosts it is the person whose pubkey is in the URL and won't check other Blossom servers from people who might also be hosting it: people who shared it, people who liked, people who interacted, reposted, quoted, or people who have published some special kind that signals they're rehosting that blob. |
The pubkey should probably be considered a hint. Which means multiple hints could be included, and other servers could be consulted depending on other heuristics. |
You guys are rehashing the URI vs URL argument. URIs were to be addresses to data that are ideally location independent, and URLs have the location hard-coded which might break. Spoiler alert: the world went with URLs even though they break because it was simpler. And now the WWW has plenty of broken links and no mechanism of fallback. I don't support a The alternate solution of putting something in the URL path to signal that this is blossom, so that the SHA256 could be tried elsewhere (by loading the author's current blossom servers) seems reasonable to me. Comparing against someone's current 10063 event to see if the server matches is probably a bad idea as they may have removed an old dead blossom server from their list already. I don't think anybody mentioned that idea, but it came to my mind. |
I just find it inconsistent that we have chosen To me, there is absolutely no difference between them and we are arbitrarily choosing opposing directions. |
it's only because nostr is not built on http, so an http:// url is impossible |
I understand your point, but I think of this differently. there is no such thing as a "blossom URL" and there never will be. there are only URLs that happen to have the hash of the resource they are serving in the path Blossom servers are required to serve blobs from So I don't think it makes sense to have a |
Ok, then maybe we should have an Referencing files with fixed domain names on Nostr never made any sense to me. It's like building an entire decentralized protocol that only works with custodian wallets. It's completely dumb. Then instead of solving the problem, this PR has to use a fallback hack that doesn't even guarantee it is ONLY applied to blossom URLs, triggering a bunch of unintended side effects. |
Relays are domain names. It's the thing that makes Nostr work. The more we go towards p2p the shittier things get. |
Yes, but they are only hints. The whole point is that people can move events to a new relay and things still work, even with all the wrong hints. Blobs deserve the same treatment. |
I think this can be merged because it is kinda the standard, right? Future nblobs or anything else can be shoved in later if we decide. |
This describes a tiny subset of possible Blossom capabilities, but arguably the most important from the point of view of a most basic Nostr client.
Other Blossom-related functionalities should be added here later if necessary.
Readable: https://github.com/nostr-protocol/nips/blob/19f671e8777f739537a9b5017a46f67c6169956a/b0.md