fix: advertise NIP-13 (Proof of Work) in supportedNips#680
Open
Priyanshubhartistm wants to merge 2 commits into
Open
fix: advertise NIP-13 (Proof of Work) in supportedNips#680Priyanshubhartistm wants to merge 2 commits into
Priyanshubhartistm wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 5b8f5b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
13to thesupportedNipsarray inpackage.jsonso the relay honestly advertises NIP-13 (Proof of Work) support.Related Issue
Fixes #679
Motivation and Context
The relay already enforces NIP-13 PoW limits in
canAcceptEvent()(src/handlers/event-message-handler.ts, vialimits.event.eventId.minLeadingZeroBitsandlimits.event.pubkey.minLeadingZeroBits), and the README lists NIP-13 as supported. Howeverpackage.json'ssupportedNipsarray did not include13.This array feeds
supported_nipsin the NIP-11 relay information document (src/handlers/request-handlers/root-request-handler.ts) and the startup log (src/app/app.ts), so clients inspecting the relay document had no way to knowPoW limits may be enforced, even though
min_pow_difficultywas already present in the same document.How Has This Been Tested?
pnpm lint,pnpm check:deps,pnpm run build:check,pnpm run build,pnpm run verify:cli:buildall pass.pnpm run test:unit(1393 passing) andpnpm run test:cli(73 passing) pass.pnpm run cover:unitcompletes successfully.pnpm run docker:test:integrationrun in full (99 scenarios): 97 passedScreenshots (if appropriate):
N/A — data-only change to
package.json.Types of changes
Checklist: