Skip to content

feat: WoT-aware adaptive PoW policy engine (NIP-02 + NIP-13) #778

Description

@Priyanshubhartistm

Is your feature request related to a problem? Please describe.

nostream now has a Web of Trust graph (#626, ) exposing a distance-lookup API, and a relay-load-aware adaptive PoW pipeline (#755,) that scales required difficulty with observed event rate. The two systems don't talk to each other yet: every pubkey faces the same computed difficulty regardless of how trusted it is, so a well-connected community member and a completely unknown pubkey are treated identically under load.

Describe the solution you'd like

  • Wire the WoT graph's distance-lookup API into the adaptive PoW pipeline so the two systems work
    together: high-trust users (low WoT distance) get reduced PoW requirements or bypass PoW entirely, while unknown pubkeys face the full computed difficulty
  • A well-connected community member should be able to post instantly under load, while a random pubkey with no social graph presence has to prove they're not a bot
  • Configurable policy operators decide the WoT distance thresholds and the corresponding PoW reduction at each threshold
  • Tests covering the full flow: graph construction, distance calculation, adaptive PoW calculation, and the combined policy engine deciding the final effective difficulty

Additional context

Depends on the WoT graph's distance-lookup API (#626) and the adaptive PoW difficulty calculation (#755), both already merged. This is a new policy layer combining the two no existing precedent for it in the codebase.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions