Skip to content
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

NIP-A2: Account delegation via kind-0 #1709

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

1l0
Copy link

@1l0 1l0 commented Jan 21, 2025

Read here.

@staab
Copy link
Member

staab commented Jan 21, 2025

This used to exist (NIP 26), but was removed since no one supported it. Delegation puts a pretty big burden on clients which have to map accounts together. I'm not saying we should never do this, but someone needs to come up with a good design that includes key rotation/revocation/delegation before we start implementing it.

@AsaiToshiya
Copy link
Collaborator

FYI, unfortunately NIP-26 not yet deprecated: #1051

@fiatjaf
Copy link
Member

fiatjaf commented Jan 21, 2025

This has been proposed a million times, and at first it sounds like it could work, but when you look more into it you realize it is fundamentally broken.

@mikedilger
Copy link
Contributor

The only real problem here is that complexity is added. If I want hodlbod's notes I have to check his kind 0 to see if he has added a delegation. If he has, I have to check that pubkey's kind 0 to see if it is valid. Then I have to load all notes from both pubkeys and maintain this relationship between the keys in my local database somehow. When the delegation ceases I have to figure out what to do about notes signed by the delegatee... are the no longer hodlbod's notes? what if the delegatee keeps signing notes, do I say "everything after the timestamp when I noticed the delegation was no longer is not valid"? I may not notice right away. Also, the notes wont revert to being signed by hodlbod so I have to remember this delegation forever. Also, all code that currently just looks at event.pubkey will have to be revisited because sometimes the code is trying to yield the answer hodlbod, not the delegatee. So the complexity of such a change gets pretty deep.

Yet I am in favor of something like a master key and subkeys (which essentially are delegations) even though it brings about all of this complexity because I think key management is important and without it nostr might be self-limiting.
To do it right it has to be more fleshed out than this PR. For example, we would need multiple kinds (at least two) of key revocation that match up to what we mean: revoke everything signed by this key, or reject only events signed after a revocation date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants