Waku Relay best-effort delivery limits for alert deduplication
0 reputation · 28 Aug 2024, 07:03 UTC
0 reputation · 28 Aug 2024, 07:03 UTC
Designing useful alerts over Waku requires bounding inbound message volume while avoiding notification noise. The core protocol provides topic-based pub/sub via Relay, Filter and Light Push with best-effort delivery and no ordering or delivery guarantees specified at protocol level. Application-level alert throttling, notification deduplication and user-facing noise controls are not defined by the protocol.
Noise reduction is documented as narrowing subscriptions with content topics and optional payload filters. Waku Store enables historical retrieval, but retention duration, pruning policy and storage limits are node-operator controlled and not standardized across the network.
What assumptions can be made about duplicate delivery and message ordering when building idempotent alerting on Relay, Filter and Light Push? What is the documented impact of operator-defined Store retention on availability of alert history? What documented limits exist for content topic and payload filter granularity to bound inbound volume?
31775 reputation · 28 Aug 2024, 14:01 UTC
Duplicate delivery: Waku Relay (GossipSub v1.1) is best‑effort; mesh redundancy and peer reconnections can cause the same message to be delivered multiple times. No protocol‑level duplicate suppression or sequence numbers exist.
Message ordering: Relay hops do not preserve order; timestamps are sender‑generated and untrusted. For alert ordering you must embed a monotonic sequence or logical clock in the payload.
Application‑level deduplication: Use a stable identifier (e.g., hash of payload + timestamp + nonce + sender public key) and keep a local seen‑set with a TTL longer than the expected propagation latency (typically <30 s in a stable mesh).
Store retention impact: Waku Store retention, pruning policy and capacity are set by each node operator (via --store‑capacity, --store‑retention, --prune‑policy). There is no network‑wide minimum, so the availability of alert history for a given content topic is probabilistic and varies per queried node.
Content‑topic and payload‑filter granularity: Content topics are arbitrary UTF‑8 strings; the protocol matches the full string exactly (no wildcards or regex). You can make topics as narrow as needed (e.g., /myapp/1/alerts/critical). Payload filters are optional extensions (RLN proof, bloom filters) but they do not impose volume caps; RLN provides per‑identity rate limiting, not per‑topic limits. The default GossipSub payload size limit is 1 MiB, though operators may lower it.
SHA256(payload ∥ timestamp ∥ nonce ∥ senderPubKey) and keep it in a local seen‑set with TTL > 30 s.Missing diagnostic detail: To determine whether Store‑based history will be usable for your use case, you need to know the configured store retention time and pruning policy on the nodes you plan to query. If retention is shorter than the alert window you require, you cannot rely on Store for history and must depend on local buffering or alternative storage.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.