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

State machines on Nostr through External computation off relays #1242

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

Conversation

AndrewRyanChama
Copy link

@AndrewRyanChama AndrewRyanChama commented May 17, 2024

view here

The difficulty of managing users and permissions has existed since time immemorial, since systems such as LDAP have existed. Users need permissions, and with those permissions they can edit theirs and other permissions. The handling of this system essentially requires the computation of a state machine.

This nip describes a way to perform computation of a state machine, such as permissions management or moderation, and communicate the results over nostr. Computation is necessary for certain functions, and nip-29 proposes an alternative model of computation where the relay acts as the computer. Unlike nip-29, this nip proposes that computation should be owned by a keypair, while the inputs and results are decentralized across multiple relays.

A Computer can be used to add interactive functionality to existing nips

  • nip-72: A computer can manage the kind:34550, giving a way to edit the community outside of just a single private key. The computer can also automate the approval of posts with kind:4550 as timeline state.
  • Add closed communities #875 : The computer can validate the claim tag tag and automatically grant membership.
  • (upcoming nip made by me)

@vitorpamplona
Copy link
Collaborator

Isn't this NIP-90?

Copy link
Collaborator

@Semisol Semisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DVMs exist (they suck though)

@AndrewRyanChama
Copy link
Author

AndrewRyanChama commented May 18, 2024

@vitorpamplona @Semisol This may seem similar to nip-90/DVM on the surface, but it's actually quite distinct

Overall nip-90 is a sort of rpc job model where where users use nostr as a transport layer to call a different service. The user makes a request and gets a response back. The example given is that a user will request image generation and get the image back.

This nip is for running a state machine on nostr for enablement of social features, such as group user management and moderation. Computation is modeled as several independent state machines, and each state machine includes an overall state object as well as a timeline view that can be paged through.

The critical parts of this NIP that make it work is the use of the 3XXXX parameterized replaceable events to store the state, as well as a way to page through the timeline events.
This enables the computer to assist with creation of nip-72 moderation events, as well as managing the state of group membership with #875 invite requests. This would not be possible with nip-90

(I should rename the title of this nip)

@AndrewRyanChama AndrewRyanChama changed the title External computation off relays State machines on Nostr through External computation off relays May 18, 2024
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.

None yet

3 participants