You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[REQUEST] Optimize vanish (NIP-62) checks using table flag #436
Description:
Currently, the relay checks for an active NIP-62(kind:62) vanish request by querying the events table.
If the number of events grows ,this will not be a good practice to scale and will need a additional query.
To be more efficient , we can add a flag to users table (e.g. is_vanished) .
Solution:
Add a boolean flag (is_vanished) to the users table.
Set this flag when a kind:62 event is processed.
Use this flag for vanish checks instead of querying events table.
Benefit:
Faster lookups (no event table scan)
Simpler logic for checking vanish state
Better scalability as event volume grows
Additional context
Optimize the performance of NIP-62 in PR #418
Activity
vikashsiwach commentedon Apr 10, 2026
Hey @cameri ! Based on your review in PR #418 ,I have created this issue and started work on this
cameri commentedon Apr 18, 2026
Thank you @vikashsiwach !