Skip to content

feat(peering): advertise terms and scopes in NIP-11 - #999

Open
Ferryx349 wants to merge 3 commits into
mainfrom
feat/peering-nip11
Open

Ferryx349 wants to merge 3 commits into
mainfrom
feat/peering-nip11

Conversation

@Ferryx349

Copy link
Copy Markdown
Collaborator

Description

This PR adds a settings-driven peering section to the NIP-11 relay information document. It advertises whether peering is offered, the feeds available (kinds plus absolute since/until or a rolling window_seconds), terms in the existing fee-object shape (amount, unit, period) where an empty terms list means settlement-free, a peer contact/endpoint, and min_pow_difficulty for peering requests (0 = none). Disabled peering publishes only { "enabled": false }, so terms are never mistaken for an accepted peer. Invalid peering configuration is rejected by settings validation with clear errors, and all peering.* fields are documented in CONFIGURATION.md.

Related Issue

Closes :- #932

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f023ab9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Minor

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

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all previous findings are addressed and no new actionable issues were found.

Summary

Adds a settings-driven peering section to the NIP-11 relay document.

  • NIP-11 now shows whether a relay offers peering and on what terms.
  • Peering settings now reject incomplete or mismatched feed offers.

Reviews (3) · Last reviewed commit: "fix(peering): validate contact URIs and ..." · Reviewed by Greptile

Comment thread src/utils/settings-config.ts Outdated
Comment thread src/handlers/request-handlers/root-request-handler.ts Outdated
Comment thread CONFIGURATION.md
greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 26, 2026
@coveralls

coveralls commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 40319746378

Warning

No base build found for commit 3b35377 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 76.558%

Details

  • Patch coverage: 12 uncovered changes across 1 file (88 of 100 lines covered, 88.0%).

Uncovered Changes

File Changed Covered %
src/utils/settings-config.ts 92 80 86.96%
Total (2 files) 100 88 88.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 11678
Covered Lines: 9338
Line Coverage: 79.96%
Relevant Branches: 6115
Covered Branches: 4284
Branch Coverage: 70.06%
Branches in Coverage %: Yes
Coverage Strength: 780.86 hits per line

💛 - Coveralls

@greptile-apps
greptile-apps Bot dismissed their stale review October 26, 2026 12:04

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants