upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/tutorials/README.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-09 09:24:17 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-09 09:24:17 +0000
commiteb10e85f199266affd3bca0a3d4cd934f74f3e7f (patch)
tree8a09f93658be462bfb8196670195f1b8748c2183 /docs/tutorials/README.md
parente1806540b5d905646b786e21a6060e4498e9aff1 (diff)
feat(sync): prevent infinite retry loop in negentropy validation
Add retry protection to negentropy event validation: - Track retry_count in PendingBatch (incremented on each retry attempt) - Detect when retry makes zero progress (relay returns no requested events) - Abort retry and complete batch with partial results when stuck - Log error with full details when retry protection triggers This prevents infinite loops when: - Relay has bugs and returns wrong events for ID queries - Relay is malicious and returns unrelated events - Relay has eventual consistency issues - Network corruption causes incorrect responses The protection triggers when received_count == 0 on a retry (relay returned nothing we asked for), indicating the relay will never provide the missing events. Future work: Track failed batches in Prometheus metrics (sync_failed_batches_total) for monitoring and alerting.
Diffstat (limited to 'docs/tutorials/README.md')
0 files changed, 0 insertions, 0 deletions