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

[BUG] Strange behavior with NIP-33 parameterized replacable events and NIP-40 (expiration tag) #255

Closed
dskvr opened this issue Mar 4, 2023 · 1 comment · Fixed by #316
Assignees
Labels
bug Something isn't working

Comments

@dskvr
Copy link

dskvr commented Mar 4, 2023

Describe the bug
There appears to be a ghosting affect when mixing NIP-40 and NIP-33. I spent a few hours trying to track down what was going on, and am fairly certain I have eliminated human error on my side.

To Reproduce

  1. Pick a kind in the parameterized replaceable event range
  2. Publish an event.
  3. Subscribe with filters for that kind. Observe expected behaviors
  4. Add an expiration tag with a UNIX timestamp sometime in the future.
  5. Publish the event.
  6. Observe incorrect behaviors (event is not stored)
  7. Remove the expiration tag.
  8. Publish the event again.
  9. When subscribing, the event will not be returned, suggesting it was not stored.
  10. Subscribing with filters for that kind before the event is published will show that the event is returned once by the subscription but if you resubscribe that same event will not be returned; similar to the behavior of an ephemeral kind.

Expected behavior
expiration tag on an event kind has absolutely no effect on future events of that kind.

Screenshots
Screen Shot 2023-03-05 at 12 26 20 AM

System (please complete the following information):

  • nostream@1.22.6 (issue began in a previous release)
  • ubuntu@22.04

Logs
There was nothing in logs to suggest anything was wrong.

Additional context

  • Was experimenting and updating an implementation on a private relay to include NIP-40 expirations.
  • Before adding the expiration field, the issue did not exist and events were publishing without issue for ~2.5 months
  • Nothing changed in event publishing logic (other than removing a tag and adding the expiration tag) nor in the client logic.
  • I isolated the test case and was able to reproduce the behavior.
@dskvr dskvr added the bug Something isn't working label Mar 4, 2023
@dskvr dskvr changed the title [BUG] Strange behavior with NIP-33 parameterized replacable events and NIP-40 [BUG] Strange behavior with NIP-33 parameterized replacable events and NIP-40 (expiration tag) Mar 4, 2023
@cameri cameri pinned this issue May 6, 2023
@cameri
Copy link
Owner

cameri commented Jun 19, 2023

@dskvr my man I could not reproduce this. If you ever encounter this issue again let me know and I'll re-open :/

@cameri cameri unpinned this issue Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants