Best Practices
- Deterministic payloads: Prefer stable key order (the SDK hashes using a canonical JSON serializer). Avoid adding random/non‑essential fields.
- Bounded size: Keep payloads compact; large JSON means higher network and IPFS costs (if pinned later by nodes).
- Use TTL intentionally:
ttlMs=0for static data; a small positive TTL for rapidly changing feeds. - Choose seq strategy:
monotonic: always increases (simple; good default)hash-change: only increments whencontentHashchanges (reduces on‑chain churn for noisy feeds)
- Log and monitor: capture request rate, latency, and error rate; alert on spikes.
- Keys & secrets: store
providerSignerKeyin a secret manager; never commitsylan.config.jsonor.env. - Rate limits: protect upstreams with backoff and rate limiting; the Express adapter exposes
helmet,cors, andexpress-rate-limitin the default server.
Last updated on