Skip to content

Editable Event#1540

Closed
arthurfranca wants to merge 9 commits intonostr-protocol:masterfrom
arthurfranca:editable
Closed

Editable Event#1540
arthurfranca wants to merge 9 commits intonostr-protocol:masterfrom
arthurfranca:editable

Conversation

@arthurfranca
Copy link
Copy Markdown
Contributor

@arthurfranca arthurfranca commented Oct 15, 2024

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

Read here

@kehiy
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@arthurfranca arthurfranca marked this pull request as ready for review October 17, 2024 14:59
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