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

Editable Event #1540

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

arthurfranca
Copy link
Contributor

@arthurfranca arthurfranca commented Oct 15, 2024

This is an alternative to #1510 that doesn't need kind ranges.

Read here

@kehiy
Copy link
Contributor

kehiy commented Oct 15, 2024

  1. we can't really edite something on nostr since we obtain id from hash of content.
  2. why we should not use a replaceable kind instead?

or something like an addressable event with a random unique d. then we can try query this editable thing using d tag value to get the latest edited version. clients can show it in a same place/order as well then.

@arthurfranca
Copy link
Contributor Author

arthurfranca commented Oct 15, 2024

@kehiy replaceable/addressable kind is artificially limited to a kind number range (i.e. can't be simultaneously addressable and ephemeral -edit: bad example).

Also, if, for example, you want to make an event unique by its e and p tags, while still being searchable by these tags, you must duplicate the values. See the difference:

Currently:

{
  tags: [
    ["d", "<event-id>:<pubkey>"],
    ["e", "<event-id>"],
    ["p", "<pubkey>"],
  ]
}

This NIP:

{
  tags: [
    ["dd", "ep"],
    ["e", "<event-id>"],
    ["p", "<pubkey>"],
  ]
}

@arthurfranca arthurfranca force-pushed the editable branch 2 times, most recently from 16d3c20 to 0264b19 Compare October 15, 2024 21:40
@vitorpamplona
Copy link
Collaborator

Currently:

{
  tags: [
    ["d", "<event-id>:<pubkey>"],
    ["e", "<event-id>"],
    ["p", "<pubkey>"],
  ]
}

This NIP:

{
  tags: [
    ["dd", "ep"],
    ["e", "<event-id>"],
    ["p", "<pubkey>"],
  ]
}

This seems like a tiny improvement for the amount of extra complexity custom-parsing dd tags on relays and clients in this NIP.

@arthurfranca
Copy link
Contributor Author

arthurfranca commented Oct 15, 2024

@vitorpamplona it is not only saving space but it could be used for any event kind. It is basically #236, that wanted to make all event kinds replaceable/addressable. I just didn't use the d tag cause its spec is already ossified and also I took the opportunity to do that format improvement you quoted.

Like you said here, something like this PR doesn't need relay buy-in and "Event kind ranges can be deprecated.". edit: In my view, "deprecate" in the sense of possibly falling into disuse.

@arthurfranca arthurfranca force-pushed the editable branch 2 times, most recently from e5fc59e to 777f4a8 Compare October 17, 2024 00:39
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.

3 participants