-
Notifications
You must be signed in to change notification settings - Fork 567
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
Add pow
field to filter JSON object
#1514
base: master
Are you sure you want to change the base?
Conversation
i suppose in the future it would be nice if some relays chose to index the difficulty in the nonce tag e.g. obviously tag filtering only looks for matches at the moment, and it's also the actual nonce that follows the tag name not the difficulty, so it would be different logic to the standard way tag filtering works which isn't nice and is needless complexity. |
NIP-13 should have put the difficulty in the tag value and the nonce in the third position. Then it could at least be worked around by querying every integer below your target value, which honestly isn't even that bad. Introducing a new filter because of an issue with a tag seems wrong. I want to deprecate the "nonce" tag and replace it with a "pow" tag, but that would break too much stuff. This filter would make more sense as a NIP-50 search extension. |
cNACK -- I would rather see prefix REQs come back rather than have an explicit filter for |
cnack. im not sure where we need to query based on pow, but if it's really needed, adding a |
The use case is to reduce bandwidth and resources usage for apps that want to get only events with a certain POW (for spam reasons).
Filter support only single letter tag: Line 127 in a736e62
Re-add prefix REQs would break things: Line 138 in a736e62
The same for adding support to non-single letter tags and changing NIP-13 tag (this will not allow to query old POW events). I think that add the |
Add
pow
field to filter JSON object to allow query of events with a certain difficulty.Read here