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-29 unleashed #1716

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

NIP-29 unleashed #1716

wants to merge 1 commit into from

Conversation

pablof7z
Copy link
Member

@pablof7z pablof7z commented Jan 26, 2025

@fiatjaf told me to stop mocking him about his RPC shitcoining, so here's a wip that everyone will hate.

This just removes all the RPC stuff from NIP-29, instead admins publish group state and, fi the relay accepts it, ti resigns the same payload with it. This also opens the door for arbitrary group state which will make NIP-29 more usable.

cc @fiatjaf @staab @verbiricha

@staab
Copy link
Member

staab commented Jan 26, 2025

Better, but still more special behavior than seems necessary. What about instead of having relays re-sign the group meta, relays just drop all but the last valid group meta? The canonical event would be the one that is served, rather than signed, but since the relay is trusted there's not really any difference. This still wouldn't make group meta work on unsupported groups, because members could then hijack a group by making themselves admins.

@pablof7z
Copy link
Member Author

Better, but still more special behavior than seems necessary. What about instead of having relays re-sign the group meta, relays just drop all but the last valid group meta? The canonical event would be the one that is served, rather than signed, but since the relay is trusted there's not really any difference. This still wouldn't make group meta work on unsupported groups, because members could then hijack a group by making themselves admins.

yeah, I like it.

To work in non NIP-29 relays client would need to know who's group they're loading and include authors for the admins they know of, i.e. load with kinds:[39001], "#d": ['flotilla'], authors: ['hodlbod'] get the pubkeys authorized by hodlbod as admins of flotilla and use those pubkeys on the authors for the group state.

I think that would be cool but I don't want to deviate so much, getting rid of the RPC would already be a big win.

@staab
Copy link
Member

staab commented Jan 26, 2025

Yeah, that logic would be pretty hairy if you were to validate change of admins over time properly. But it's not impossible, and I think this PR leaves that possibility open.

@staab
Copy link
Member

staab commented Jan 26, 2025

Oh, nevermind, because timestamps can be forged if relays don't validate them. Eh, still, maybe.

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.

2 participants