Skip to content

Migrate MDK from nostr-sdk 0.44 to 0.45 #1358

Description

@erskingardner

Summary

Move MDK from the Nostr 0.44 dependency line to nostr-sdk 0.45.

The 0.44 line remains usable for the immediate dependency update, but the standalone nostr-relay-pool and nostr-relay-builder crates have been folded into nostr-sdk in 0.45. Track the migration independently so routine 0.44 maintenance stays small and bisectable.

MDK migration work

  • Replace direct nostr-relay-pool and nostr-relay-builder usage with the 0.45 SDK surface.
  • Update transport-nostr-adapter::NostrSdkRelayClient notification handling from RelayPoolNotification to ClientNotification; preserve the split between trusted delivery and raw per-relay telemetry.
  • Adapt subscription management to the redesigned API. In 0.45 relays no longer inherit pool subscriptions, so retain MDK's account-scoped subscriptions, group-route reconciliation, stale cleanup, and no-filter-leak behavior for one-shot publish relays.
  • Adapt relay add/remove, relay access, connection lifecycle, fetch/query, publish, and unsubscribe calls to the redesigned client APIs.
  • Replace signer-driven NIP-42 configuration with the 0.45 authenticator model while preserving per-account signer isolation and redacted error behavior.
  • Update direct nostr types and features, including the removed SDK NIP feature flags.
  • Refresh local relay tests and all adapter/app real-relay coverage; retain dial-safety, URL-redaction, telemetry, KeyPackage, kind-445, Welcome, and directory-query invariants.
  • Regenerate and validate MarmotKit/UniFFI and the Android/iOS artifacts after the Rust migration.

Acceptance criteria

  • No standalone nostr-relay-pool or nostr-relay-builder dependency remains.
  • All Nostr adapter, peeler, app relay-runtime, and local relay E2E tests pass.
  • Account/group subscriptions stay scoped to their intended relays and accounts; adding a one-shot publish relay exposes no read subscription.
  • NIP-42 authentication remains per-account and does not expose relay URLs or key material in errors/logs.
  • KeyPackage discovery, kind-445 delivery, Welcome delivery, directory queries, publishing, and reconnect/resubscribe behavior remain covered.
  • just fast-ci, MarmotKit generation, and mobile artifact validation pass.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions