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

Use q instead of e tags for quote reposts #1074

Merged
merged 1 commit into from
Feb 25, 2024

Conversation

jb55
Copy link
Contributor

@jb55 jb55 commented Feb 22, 2024

Damus does this, other clients should too!

@vitorpamplona
Copy link
Collaborator

Is the goal to replace the mention marker in NIP-10 or to use q alongside it? Do we just duplicate to avoid breaking the past?

Is there a difference between quote posting and mentioning? I am not sure.

Can q point to other kinds or is it just for kind 1s?

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

The mention marker doesn't solve:

  1. not pulling down quotes when you don't need to
  2. adding the ability to only pull a list of quote reposts, which could be substantially larger for viral posts and could kill pulling large threads, especially if there are more recent quote reposts than replies.

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

Can q point to other kinds or is it just for kind 1s?

I'm only considering kind1 at the moment.

@vitorpamplona
Copy link
Collaborator

I'm only considering kind1 at the moment.

This means that we will have to keep both mentions and q at the same time. Which is fine. That will make it backward-compatible at least.

@fabianfabian
Copy link

👍
Nostur changed to q instead of e a few weeks ago

@mikedilger
Copy link
Contributor

You should also edit NIP-10 where it says:

Those marked with "mention" denote a quoted or reposted event id.

And perhaps also edit NIP-27 to add more detail around this paragraph:

Including NIP-10-style tags (["e", , , ]) for each reference is optional, clients should do it whenever they want the profile being mentioned to be notified of the mention, or when they want the referenced event to recognize their mention as a reply

Because otherwise the amount of contradictory and confusing statements NIPs gets out of hand.

@staab
Copy link
Member

staab commented Feb 22, 2024

The mention marker doesn't solve:

  1. not pulling down quotes when you don't need to

This change doesn't solve this either, because for compatibility we'll have to include the e tag still.

@alexgleason
Copy link
Member

This change doesn't solve this either, because for compatibility we'll have to include the e tag still.

Can't you just include a NIP-21 URI in the content? Excluding "e" events for quotes in tags doesn't really break anything. Users are still notified by the "p" tag. All it does is frees the "e" tag from being queried in the wrong scenarios.

@vitorpamplona
Copy link
Collaborator

vitorpamplona commented Feb 22, 2024

The mention marker doesn't solve:

  1. not pulling down quotes when you don't need to

This change doesn't solve this either, because for compatibility we'll have to include the e tag still.

The one thing that the old [n] references did was to make sure Clients created e tags correctly. Since we migrated to nostr: uris, there is no way to get an accurate number of quoted notes through tags.

I trust neither q nor mention to build these counters. I just download everything and parse the content to see if the author actually quoted the other post. qs and es are just the starting point anyway.

Excluding "e" events for quotes in tags doesn't really break anything.

It breaks down those clients that followed NIP-10 and simply filter by e to bring all replies and quotes of an event. If we change to q, they are not going to download quotes anymore.

@staab
Copy link
Member

staab commented Feb 22, 2024

This change doesn't solve this either, because for compatibility we'll have to include the e tag still.

To be clear, I'm not saying q is a bad idea. But if we can't fix kind 3 relays, we can't fix this either. Which way, modern man?

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

The mention marker doesn't solve:

  1. not pulling down quotes when you don't need to

This change doesn't solve this either, because for compatibility we'll have to include the e tag still.

It just fixes the "bug" of quote reposts getting pull down with the thread. Why is the e reference needed and what does it break?

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

One thing I can see it "breaking" is if clients rely on this for pulling and counting quote reposts? fwiw they would already be missing quotes from clients who aren't adding the e tag (nostur, damus, maybe others).

@staab
Copy link
Member

staab commented Feb 22, 2024

One thing I can see it "breaking" is if clients rely on this for pulling and counting quote reposts? fwiw they would already be missing quotes from clients who aren't adding the e tag (nostur, damus, maybe others).

Right. But before e tag was added there was no way to do so right? So removing the e tag would break any clients that count quotes. But does anyone actually do that?

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

it would already be broken, since there are clients that are already not sending e tags. it would back backwards compatible for older threads because they could keep the code that counts pulled quote reposts?

@basantagoswami
Copy link
Contributor

Can't you just include a NIP-21 URI in the content?

That's pretty much how it works on Twitter too. You can quote tweet by copy pasting a tweet's URL. I think this is the best way of doing quotes.

@vitorpamplona
Copy link
Collaborator

I am less concerned about breaking the quote count and more concerned with Clients simply not downloading any quoted posts if the e tag is not mentioned anymore.

The quote count will always be broken and adding q will not fix it.

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

does amethyst put quoted reposts in the thread? I'm not sure I understand the concern.

@vitorpamplona
Copy link
Collaborator

vitorpamplona commented Feb 22, 2024

does amethyst put quoted reposts in the thread?

No. We just ignore posts with mention markers when building the thread.

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

then switching to q would allow you to not pull the quotes instead of ignore them.

more concerned with Clients simply not downloading any quoted posts if the e tag is not mentioned anymore

this is the right behavior? it's fixing the bug of downloading stuff you don't need to in a thread. again, if they actually want to download the quote reposts and not put them in the thread then it would only be for counting quotes. I'd argue this is the incorrect way to do this because of filter limits that could disrupt these two different types of queries.

@vitorpamplona
Copy link
Collaborator

vitorpamplona commented Feb 22, 2024

then switching to q would allow you to not pull the quotes instead of ignore them.

Not really. It won't change anything for me. I don't use Nostr filters for the local cache. On top of that, there are thousands of mentions out there. I will still need to remove them to avoid breaking the thread view of past posts. Maybe one day when absolutely everyone makes the transition to q and all the past events get deleted then sure. Meanwhile, there is still going to be a lot of mentions to deal with.

this is the right behavior?

It was written in NIP-10. I am not sure if it is right or not, but it was clearly the guidance. If people have been following it, then it will break them.

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

I forgot @vitorpamplona now runs the nips repo.

@jb55 jb55 closed this Feb 22, 2024
@vitorpamplona
Copy link
Collaborator

I forgot @vitorpamplona now runs the nips repo.

Jesus, dude. I don't have a strong preference in this battle. We can do q or mentions. To me these are not mutually exclusive. In fact, I suggested doing both in my 2nd reply to avoid breaking anything.

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

you make nostr development miserable, I genuinely dislike working on this project because of you. I have left the nostr-protocol organization and will no longer submit nips. enjoy wasting other peoples time and continuing to push your bs into every single issue and PR.

@vitorpamplona
Copy link
Collaborator

Well, I am not here to make anyone's life miserable. I will stop providing feedback to your posts. If anyone else feels the same, just let me know and I will stop it with you as well. It's all good.

@staab
Copy link
Member

staab commented Feb 22, 2024

@jb55 what is the difference between this breaking change and removing kind 3 relays? Do you want pushback against breaking changes or don't you?

@jb55
Copy link
Contributor Author

jb55 commented Feb 22, 2024

I've documented this damus behavior as DIP-02:

https://github.com/damus-io/dips/blob/master/02.md

@mikedilger
Copy link
Contributor

I've only ever tried to follow these ever-changing NIPs. I'm not wed to what gossip currently does, but I'm not going to change it haphazardly. NIP-08, NIP-10, NIP-18, and NIP-27 all have their fingers in this pie, and now DIP-02 does too. That's 5 conflicting standards I'm supposed to comply with.

I will just wait until things settle down and then I'll change gossip to whatever the answer is. Far too many cooks in this kitchen.

@tyiu
Copy link
Contributor

tyiu commented Feb 23, 2024

lol please reopen this PR. It makes sense to me. It does make it more annoying to need to support both ways but what's being proposed is the right way to do it. Eventually, q tags will be the only way people do quote reposts for new events. It'll be up to clients to decide if it wants to keep supporting the old way. We shouldn't be afraid of making breaking changes. In a decentralized world, there are no completeness guarantees.

@alexgleason
Copy link
Member

@tyiu 💯

@mikedilger
Copy link
Contributor

I agree. Re-open this. I think 'q' is a good idea. Far better than unclear 'e' tags ('e' is far too general)

@staab staab reopened this Feb 23, 2024
@AsaiToshiya
Copy link
Collaborator

It does make it more annoying to need to support both ways but

It'll be up to clients to decide if it wants to keep supporting the old way.

I agree with @tyiu.

@fabianfabian
Copy link

To me, the only problem with q is that it was not described anywhere, or at least I could not find it, I’m surprised its already in use for over 200+ days apparently.

First time I heard about it was:
nostr:note14nwedvff0kn6cgpv9z88d0rash4m4najxwd3sd7txkstlnyp0fvqv3wzcx

This was when other clients were also using e with "mention" and seemed to work fine.

The reason I changed to q recently was because

  1. Complaints: nostr:note12aktw523yugu8ek944hecatunsvcfuasc4326wmz5hawnlq5d0pq9y3pv0
  2. Changing to q did not break anything, but did fix it for other client
  3. It is better if you want to fetch only the things you need (I wish we also had this for root posts without replies)

@alexgleason
Copy link
Member

3 approvals, and based on the comments every person who voiced concern also voiced approval. So I'm merging it.

@alexgleason alexgleason merged commit 4a171cb into nostr-protocol:master Feb 25, 2024
@mikedilger
Copy link
Contributor

It's not wrong, but it failed to update NIP-10 or NIP-27 or BREAKING.md. I guess I'll open another PR.

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.

10 participants