Describe the bug
The relay implements NIP-13 (Proof of Work) canAcceptEvent() in src/handlers/event-message-handler.ts enforces both limits.event.eventId.minLeadingZeroBits an limits.event.pubkey.minLeadingZeroBits - and the README explicitly lists it as supported:
- [x] NIP-13: Proof of Work
However, package.json does not include 13 in the supportedNips array:
"supportedNips": [ 1, 2, 4, 9, 11, 12, 15, 16, 20, 22, 28, 33, 40 ],
This array is what gets advertised to clients via the NIP-11 relay information document (supported_nips in src/handlers/request-handlers/root-request-handler.ts) and printed on startup in src/app/app.ts. As a result, clients that inspect the relay document have no way to know PoW limits may be enforced, even though they are.
To Reproduce
curl -H "Accept: application/nostr+json" http://localhost:8008/
- Observe
supported_nips does not contain 13, despite min_pow_difficulty
being present in the same document.
Expected behavior
13 should be present in supportedNips so the relay honestly advertises PoW support.
Fix
"supportedNips": [ 1, 2, 4, 9, 11, 12, 13, 15, 16, 20, 22, 28, 33, 40 ],
System: Linux, Docker
Describe the bug
The relay implements NIP-13 (Proof of Work)
canAcceptEvent()insrc/handlers/event-message-handler.tsenforces bothlimits.event.eventId.minLeadingZeroBitsanlimits.event.pubkey.minLeadingZeroBits- and the README explicitly lists it as supported:However,
package.jsondoes not include13in thesupportedNipsarray:This array is what gets advertised to clients via the NIP-11 relay information document (
supported_nipsinsrc/handlers/request-handlers/root-request-handler.ts) and printed on startup insrc/app/app.ts. As a result, clients that inspect the relay document have no way to know PoW limits may be enforced, even though they are.To Reproduce
curl -H "Accept: application/nostr+json" http://localhost:8008/supported_nipsdoes not contain13, despitemin_pow_difficultybeing present in the same document.
Expected behavior
13should be present insupportedNipsso the relay honestly advertises PoW support.Fix
System: Linux, Docker