-
Notifications
You must be signed in to change notification settings - Fork 565
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
created_at time precision #759
Comments
I completely agree, but it would be chaos. I'm not sure we can change it at this point. Maybe relays could add a |
Related issue: #626 |
Don't sort posts in the same thread by created_at, it's never going to work no matter how precise you make it be. Nostr's created_at is not a time chain. It's not a good anchor for sorting. But the e-tag graph is. If somebody replies (e tag to a post), you know it happened after the post and before the first reply to that reply. That's all you need to know to assemble the correct order. |
Yes, but I'm talking about non-mentioned comment as you know Japanese Nostr people doing. |
I am not sure what you mean. Replies must be tagged otherwise nothing works. Are you thinking about other event kinds? |
To me this is about feeds, not threads. It matters a lot for pagination. #620 |
Like subtweeting. Japanese people often post notes without replies. |
Pagination doesn't need time accuracy. It just needs a fixed order. If you sort by created_at, then id, it should solve your problem. |
@vitorpamplona FYI, some people report that Amethyst sometimes displayed with flickering for same timestamp posts. |
@vitorpamplona We must be talking about different things. I'm using But with the current behavior, any other event posted during the same second is potentially gone. I'm not sure whether relays use |
Yep, it's because I still find some parts of the app that only use
Yep, you gotta fix all of these in the client. Nothing guarantees that the pagination content is unique. You are going to have even more headaches when the list includes replaceable events. Some relays garbage collect older versions. So, between receiving a new event and running garbage collection, each version will show up in the list. |
That will be messy no matter what we do with |
Yes, for example, nostr bot which subtweeing against a posts must set +1 for original post's created_at always to avoid the crossed. |
Maybe this is a good idea, maybe not, but we can't change it. |
Btw, I was wrong that NIP-01 isn't clear about
So you should not have to add or subtract any value from the last |
But can you trust every relay implements this correctly? :) |
However,
I see that as a possible path forward. |
@mikedilger Have you seen #579? It currently asks relays to use But this doesn't seem to solve the problem because the relay may receive an old event and set a new received date (nip34seen). |
created_at is second-precision. So if you comment without a reply within 1 second, the post and the response may be interchanged. So I suggest that it make created_at be possible to be high precision. If the created_at is greater than 2147483647 (max value of int32), it SHOULD be treated as 64bit value. i.e. it is millisecond unit.
This change must be Independent NIP since this should be exported via NIP-11 relay information.
The text was updated successfully, but these errors were encountered: