Skip to content

Concepts: one-time prekey low-water signalling #621

Closed

Description

@codebestia

Branch: Open your PR against dev. PRs targeting main are closed automatically.

Description:
Write apps/backend/docs/concepts-prekey-replenishment.md for services/prekeyLowSignal.ts. One-time prekeys are consumed on every bundle fetch and never regenerated server-side; once a device runs out, initiators fall back to a bundle without a one-time key and lose that forward-secrecy contribution. The server therefore tells the device to top up before it reaches zero.

Acceptance criteria:

  • Documents the threshold (PREKEY_LOW_THRESHOLD, default 20) and that the signal fires only on the bundle-fetch path
  • Explains the latch (prekeys:low:<deviceId> in Redis, 30-day TTL, in-process fallback without Redis) that stops a device from being signalled on every fetch, and what releases it
  • Documents the prekeys_low event sent to the device:<id> room, and what a client is expected to upload in response (batch size and the 200-key cap)
  • Describes what happens to an offline device that misses the event, and how it should check its own count on reconnect

Activity

  1. Tinu-ola commented on Oct 19, 2026

    @Tinu-ola

    @Tinu-ola has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, please assign me to this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Tinu-ola to this issue.

  2. 0xDeon commented on Oct 20, 2026

    @0xDeon
    Contributor

    @0xDeon has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi team, can i please work on this?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @0xDeon to this issue.

  3. drips-wave commented on Oct 20, 2026

    @drips-wave

    Congratulations, @0xDeon! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @0xDeon: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. github-actions commented on Oct 20, 2026

    @github-actions

    Closed by #647, merged into dev.

  5. drips-wave commented on Oct 20, 2026

    @drips-wave

    This issue has been completed by @0xDeon as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @0xDeon: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackenddocumentationImprovements or additions to documentatione2ee

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions