|
1 | 1 | # nostream |
2 | 2 |
|
| 3 | +## 3.12.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#1034](https://github.com/cameri/nostream/pull/1034) [`e410a75`](https://github.com/cameri/nostream/commit/e410a759cc126e01ce0b198c670d828807762448) Thanks [@Ferryx349](https://github.com/Ferryx349)! - feat(peering): treat authenticated peers as feeds, not clients |
| 8 | + |
| 9 | + Adds `limits.peer`, a separate limit set for connections that have proven a |
| 10 | + configured `peering.peers` pubkey with NIP-42 AUTH. Peer subscriptions use |
| 11 | + `limits.peer.subscription` instead of `limits.client.subscription`, and peer |
| 12 | + messages use `limits.peer.message` in a separate rate-limit bucket, so a |
| 13 | + full-feed subscription cannot trip the client EWMA limiter or the client |
| 14 | + `max_subscriptions` cap. |
| 15 | + |
| 16 | + Peers are eligible for full feeds by default: `maxLimit` is uncapped and the |
| 17 | + subscription caps are higher. An omitted peer REQ `limit` queries the full |
| 18 | + stored feed instead of the client 500-event default, and peer filter counts are |
| 19 | + not rejected by the protocol's former fixed ten-filter cap. Raw filter counts are |
| 20 | + still bounded before deduplication, and stored reads wait for the socket's |
| 21 | + send-flush callback so a slow peer cannot grow worker memory. Deleted and expired rows |
| 22 | + are excluded in SQL before the limit, so they cannot consume a page slot. |
| 23 | + |
| 24 | + A high but finite peer message rate keeps the credential from becoming an |
| 25 | + unbounded egress path. Unauthenticated or unconfigured connections keep the |
| 26 | + existing client limits exactly as before. The new limits are validated with the |
| 27 | + rest of the settings document and documented in `CONFIGURATION.md` and |
| 28 | + `docs/PEERING.md`. |
| 29 | + |
| 30 | +- [#1043](https://github.com/cameri/nostream/pull/1043) [`7090cbb`](https://github.com/cameri/nostream/commit/7090cbb853d48361492448a8757cfae0ab7592ab) Thanks [@Ferryx349](https://github.com/Ferryx349)! - feat(peering): sync configured peers over NIP-77 and a live feed |
| 31 | + |
| 32 | + Adds an outbound peering-sync worker. For every enabled `peering.peers` |
| 33 | + entry it reads the peer's NIP-11 `peering.scopes`, authenticates with NIP-42 |
| 34 | + using the relay's own keypair, reconciles each scope over NIP-77 negentropy, |
| 35 | + fetches only the missing ids, and keeps a live subscription for the same |
| 36 | + scopes. Periodic reconciliation and reconnect-and-resync close gaps the live |
| 37 | + feed can miss, and a new or restarted peer converges without a full dump. |
| 38 | + |
| 39 | + Fetched and live events are accepted only when they match the agreed scope, |
| 40 | + were requested by id, and pass id/signature verification. They are applied with |
| 41 | + the same kind rules as local writes (addressable `d`-tag keys, kind-5 deletes, |
| 42 | + kind-62 vanishes, ephemeral broadcast-only), and authors under an active vanish |
| 43 | + request are skipped. Live events are broadcast to local subscribers; backfill is |
| 44 | + not, so a full sync does not fan out a dump. Wide scopes are split by kind and |
| 45 | + time, overflowed fetch batches are retried in smaller pieces, live re-checks use |
| 46 | + the scope bounds rather than the subscription overlap, and fetch/live buffers are |
| 47 | + bounded by count and bytes. Per-peer sync state (status, last reconciliation, |
| 48 | + lag, missing count) is heartbeat-refreshed during long reconciliations, recorded |
| 49 | + in Redis, exposed at `GET /admin/peering`, shown in the admin console's |
| 50 | + Operations view, and included in diagnostics exports. |
| 51 | + |
3 | 52 | ## 3.11.0 |
4 | 53 |
|
5 | 54 | ### Minor Changes |
|
0 commit comments