-
Notifications
You must be signed in to change notification settings - Fork 721
NIP-93: backwards-compatible alternative media URLs #898
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
Conversation
| ```json | ||
| { | ||
| "kind": 1, | ||
| "content": "I just painted this: https://www.foundmyself.com/gallery/albums/userpics/55231/qs170gzrh0by7w0ftxaas76tx2r7vb.jpg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is essential to support multiple URLs. I am not sure if it is supported in any other NIPs, but it would be good to specify how we can provide alternatives when we have more than one URL. Maybe something like, alturl or alturl[n], e.g., alturl1, alturl2, alturl3…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current form the NIP already supports multiple URLs, you have to specify the original URL and then the replacements.
I guess having alturl1 and so on could be better as they would save some bytes -- but also make replacement harder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Thanks
| } | ||
| ``` | ||
|
|
||
| Then clients, when finding out that the original URL of the event is no longer available, could try to load an alternative from one of the `kind:4001` events that reference the original one. They should prioritize replacements from the original author and then use some kind of heuristics to prevent misleading replacements (only load `kind:4001` events from trustworthy friends or friends of the original author, for example). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would accept the kind:4001 only from the original note owner, it is tricky to manage a priority queue of events in a decentralized environment, which leads to possible attacks. At least at the beginning, to see how things flow.
Or I would make it optional using a tag in the kind:1; this could be by default non permissive, with a client preference.
Something like this:
"kind": 1,
"content": "I just painted this: https://wallpapercave.com/wp/wp5960277.jpg",
tags": [
["4001-by-others", "permit"],
...
I would also invite the clients to show that an image has been replaced with a mark.
|
seems like something I might add to https://github.com/damus-io/dips/blob/master/01.md . I still like the variadic tag method damus uses here, as you don't need to duplicate the url each time, and there is one tag per image so they are grouped nicely. |
|
Kind 4001 seems like it might as well be broader, as a generic edit event. I don't much like adding mutability to notes to solve this problem, if links rot, let them rot. I also don't like variadic arguments because they break extensibility. Otherwise, this solves the problem of posting multiple versions of the same url, but not the content addressing problem. Image hosting already has too many half-baked and incompatible solutions already (NIPs 94, 95, and 96), which don't really compose to solve all the problems. We should at least try to add this in a way that leverages those NIPs where possible. What I want from a solution is content-addressing, where you have the id of the image (I believe the closest thing the other NIPs give us is the The main weakness of this is that it's not backwards compatible, but it provides the same UX as other rich content (nevent, nprofile). If it's ok for users of extremely simple clients to copy/paste I have a rough draft of this here: #899. The problem with it though is that Edit: @jb55's |
This would be an unnecessary abstraction that would just add complexity for no gain. We have enough kinds to have different functionality segregated in different events and clients to implement just the parts they want.
This is another issue that only exists when you want super generic solutions. A generic solution is by definition one that is not specific enough, thus you must leave a lot of room for someone else to specify things later. Bit if an event kind is very straightforward and specifically directed at one very small goal (like this proposal here), then you don't need extensibility. The same reasoning applies to
I personally agree with this, and I don't expect much usage of this
I think this is both unachievable with a satisfactory solution (see IPFS) and a false goal that wouldn't really help anyone. I could expand on this, but I will do it elsewhere eventually. |
They will care when somebody buys the domain name and displays child porn instead of their original content. I agree with @staab that this is just a different way to do event edits. It doesn't make much sense to allow people to change URLs freely but not what they have said about them. If we are already going half the way, why not go the full way?
Nostr does content addressing all the time. We constantly have to search for events that are not where they were supposed to be. If you think content-addressing is unachievable, you are saying that Nostr shouldn't exist. But it does. |
Because this is much simpler, it is optional, it is backwards-compatible. This is not about editing images, it is about saving them only in catastrophic situations. Also this proposal includes people proposing image replacements in other people's notes, which is completely out of scope for editing notes in general.
Not really, what we do (or should be doing) in Nostr is to search for events where people have said they are publishing them. Events are ultimately owned by someone, which is the crucial difference that enables this. General-purpose "content-addressing" doesn't have ownership, there is no clue about where to find things -- and just giving people a list of URLs is not content-addressing. |
It doesn't matter. People will use it to edit images.
Sure, then do the same for images. As long as we can verify the hash, it should be fine.
Not really. There is always content ownership, either explicitly or implicitly. |
|
This nicely solves the problem of link rot, and there are a lot of fragile links on Nostr right now. I don't see a better way to retroactively solve it for notes that have already been published. I also want to boil the ocean and support content-addressed media on Nostr, but that seems disjoint from this NIP. |
|
This idea is being revived at hzrd149/blossom#39 |
full text: https://github.com/nostr-protocol/nips/blob/alt-urls/93.md