An event has a signer, not an owner
- Events and blobs are the same kind of thing
- What a pin is
- An example
- Exact usage, exact quotas
- Keeping what matters to you
- Who else does this
- Any relay can do this
Every relay has to answer one question for every event it stores: why is this here? Most answer it through the author. A paid relay keeps the events of the keys that paid, a personal relay keeps its owner’s notes, and relays delete an event when its author asks. The author is treated as the owner, and the owner decides.
That rule breaks as soon as you look at what people want kept. A reply to you is signed by someone else. A direct message is signed by a random key that will never be used again. The article you saved is signed by its writer, who may delete it tomorrow. By the author rule none of these are yours, yet you are the one who cares about them.
Making the tagged key the owner instead only moves the problem. A reply in a thread tags several people, and the article you saved does not tag you at all. Any rule that names one owner fails as soon as several keys want the same object.
Cladonia, the relay and Blossom server I’m building, asks a different question: who wants this kept? It keeps an object because a key pinned it.
Events and blobs are the same kind of thing
A Nostr event’s id is the sha256 of its serialized content. A Blossom blob’s address is the sha256 of its bytes. Both are immutable and content-addressed: one id, the same on every relay and every server, and no way to change what it points to. You can copy such an object or drop it, nothing else.
So an event has no owner. It has a signer, and the signature proves who wrote it. It says nothing about who wants it stored, which is the only question a relay has to settle.
On a Blossom server, a file uploaded by two people is already stored once. Cladonia applies one rule to both kinds of objects.
What a pin is
A pin links one object to one key. An object stays while at least one pin holds it, and goes when the last pin is removed. The word comes from IPFS, where pinning means the same thing.
A key gets a pin in two ways. It pins what it publishes or uploads, whoever authored it: its own notes, but also someone else’s note that it rebroadcasts because it wants to keep it. And it gets a pin on every event that someone else writes and that tags it: replies, mentions, zaps, direct messages.
An example
Alice and Carol have accounts on the relay. Bob does not.
- Alice publishes a note. It gets Alice’s pin.
- Bob replies. He has no account, so writing gives him no pin, but his reply tags Alice and gets her pin. That is why it is accepted: a relay that only stores what its members keep still takes replies to them.
- Carol rebroadcasts Alice’s note to keep it. The note now has two pins, Alice’s and Carol’s, and counts in both their quotas.
- Alice uploads a photo, and Carol uploads the same file. The server stores it once, with two pins. When Alice deletes it, only her pin goes and the photo stays for Carol. When Carol removes hers too, no pin is left and the blob is deleted.
Exact usage, exact quotas
Each pin counts the full size of its object for its key. An object pinned by ten keys counts ten times, once for each of them. There is no sharing formula, so your usage never moves because someone else pinned or unpinned something.
The pins you get from events others write to you count in a separate quota, so strangers cannot eat the room you use for what you chose to keep.
And since every pin names a key, a key can see everything it keeps, events and blobs together, and remove any pin.
Keeping what matters to you
Pins change what deletion means. Deleting an object removes a pin, and the object goes only with the last one. When an author deletes an event, their own pin goes. Whether the pins of other keys go too becomes a choice each of them can make.
Cladonia removes them by default, which is what authors expect. But this is a default, not an owner’s right: someone who pinned an event because it matters to them can choose to keep it. Nostr has never guaranteed deletion, since anyone can keep a copy. With pins, keeping one is an explicit choice, made by the key that keeps it and counted in its quota.
Who else does this
Before writing this I looked for the same idea elsewhere. On the Blossom side, hzrd149’s blossom-server keeps a list of owners for each blob: a delete removes the requester from the list, and the file goes when the last one deletes it. That is the same rule for blobs, under another name. It is easier to see there: a blob has no signer, and two strangers can upload the same file, so a server has nobody but its uploaders to go by. An event has a signer, and relays took the signer for the owner.
On relays, Haven comes closest. It is a personal relay, and its owner can delete any event stored on it with a kind 5, whoever wrote it: the relay keeps what its owner wants kept, which amounts to pins held by a single key. inbox.nostr.wine keeps the events addressed to its users, and decides by recipient. Neither lets several keys keep the same event independently. If a relay already counts pins on events, I’d like to hear about it.
Any relay can do this
Pins are a storage policy. Clients publish events and upload blobs the way they always have, and a client that rebroadcasts a note already pins it without knowing. Any relay or Blossom server could adopt the rule tomorrow.
Calling the signer the owner made relays answer the wrong question. “Who signed this?” is about authenticity, and the signature already settles it. “Who wants this kept?” is about storage, and that is what pins answer, for events and blobs alike.
Cladonia is a free relay and Blossom server, funded by donations. You can join through a member’s sponsorship or by asking on https://cladonia.net.
Write a comment