Modify the behaviour of the a tag and parameterised replaceable events #936
Closed
basantagoswami
started this conversation in
General
Replies: 1 comment
-
It is now an issue: #938 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NIP-01 mentions two ways of using the a tag.
I think we should just get rid of the first one:
["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]
It creates issues with
kind:5
deletion events.For example: If I write a blog post with a title, and people comment on the post (using this version of the a tag), and then I delete the post and create a new one with the same title, the comments meant for the old post needs to get filtered based on the
created_at
of the deletion event. That is not a very reliable way of doing things.Instead all parameterized replaceable events should anchor themselves to an initialization event (non replaceable). And then other events that would have referenced the parameterized replaceable event would just use two e tags, one to refer to the initialization event, and another to refer to the specific version of the event. Then while deleting you can just delete the main/initialization event.
It is similar to how NIP-28 Public Chat works already. Channel creation is a
kind:40
event (init event), and thenkind:41
is for updating channel metadata. In our case, the later would be a parameterized replaceable event.Even if we don't get rid of this version of the
a
tag, we need to make sure that future NIPs don't rely on it, and instead use a initialization kind.Beta Was this translation helpful? Give feedback.
All reactions