nostr-protocol / nips

Nostr Implementation Possibilities
2.36k stars 569 forks source link

Why have "r" and "relay" both refer to relays? #1070

Open basantagoswami opened 8 months ago

basantagoswami commented 8 months ago

NIP-42 (Authentication of clients to relays) and NIP-51 (Lists) use the relay tag to refer to a relay. But NIP-65 (Relay List Metadata) uses the r tag.

Any reason for that? Do relays mean two different thing conceptually here or is it kept just for backwards compatibility? Or is it related to not wanting to index these tags in some places?

fiatjaf commented 8 months ago

Tags can have different meanings in different kinds.

basantagoswami commented 8 months ago

Tags can have different meanings in different kinds.

Does it not break this philosophy from the NIPs readme: "There should be no more than one way of doing the same thing." in this particular case? Also this issue probably relates to issue #1071 about having a different doc for standard tags.

fiatjaf commented 8 months ago

No, I don't think that breaks anything. For example, content has a different meaning depending on the kind, right? Same for tags.

basantagoswami commented 8 months ago

Content almost always has different meaning based on the kind. Tags almost always have the same meaning even in different kinds. These tags: e, p, and aare defined in NIP-01 to have a very specific meaning for all kinds. The d tag also has a very specific meaning for parameterized replaceable events.

So I don't think they are the same thing at all. The list of tags are also called standard tags in the NIPs readme. I think it would be worth it to have the same tags across kinds and then let new NIPs redefine them for new kinds if they want or need to.

staab commented 8 months ago

NIPs were written by just a bunch of people, based on sub-protocols they made up without asking other people, and with little concern for consistency. What exists is normative, tags are inconsistent, everything works, therefore consistent use of tags isn't a constraint for protocol design. Of course, tags should be used conventionally, but that's a different question.

mikedilger commented 8 months ago

Look, I screwed up using the "r" tag in NIP-65. But we have discussed multiple times ways to fix it, and every time it has turned out to be impossible to fix.

You can live with it.