BUD-03: Implement 'fallback' tag

This commit is contained in:
dtonon 2025-08-06 22:43:44 +02:00
parent e8d0a1ec44
commit 6d1c6f793d
1 changed files with 11 additions and 3 deletions

View File

@ -4,10 +4,13 @@
`draft` `optional`
Defines a replaceable event using `kind:10063` to advertise the blossom servers a user uses to host their blobs.
Defines a replaceable event using `kind:10063` to advertise the blossom servers a user uses to host their blobs, or to retrieve others' blobs if the original source is not available.
The event MUST include at least one `server` tag containing the full server URL including the `http://` or `https://`.
The `fallback` tag is optional, it has the same structure of the `server` tag.
It is used to identify a server where the user expects to find others' blobs if the original source is not available and the author doesn't offer alternative working locations using their own server list.
The order of these tags is important and should be arranged with the users most "reliable" or "trusted" servers being first.
The `.content` field is not used.
@ -22,6 +25,7 @@ The `.content` field is not used.
"tags": [
["server", "https://cdn.self.hosted"],
["server", "https://cdn.satellite.earth"]
["fallback", "https://backup.my-server.com"]
],
"sig": "cc5efa74f59e80622c77cacf4dd62076bcb7581b45e9acff471e7963a1f4d8b3406adab5ee1ac9673487480e57d20e523428e60ffcc7e7a904ac882cfccfc653"
}
@ -52,6 +56,8 @@ In all the following examples, the hash `b1674191a88ec5cdd733e4240a81803105dc412
In the context of nostr events, clients SHOULD use the author's server list when looking for blobs that are no longer available at the original URL.
If the author's list is not available or the blobs are not retrievable, client SHOULD fallback on the user's `fallback` hosts and try to retrieve blobs from them.
Take the following event as an example
```json
@ -70,7 +76,9 @@ Once the client discovers that the URL `https://cdn.broken-domain.com/b1674191a8
1. Get the SHA256 hash from the URL
2. Look for the authors server list `kind:10063`
3. If found, Attempt to retrieve the blob from each `server` listed started with the first
4. If not found, the client MAY fallback to using a well-known popular blossom server to retrieve the blob
3. If found, attempt to retrieve the blob from each `server` listed started with the first
4. If not found, the client SHOULD look for the user server list `kind:10063`
5. If found, and if at least one `fallback` tag is present, attempt to retrieve the blob from each `fallback` listed started with the first
6. If not found, the client MAY fallback to using a well-known popular blossom server to retrieve the blob
This ensures clients can quickly find missing blobs using the users list of trusted servers.