Description
The system relies on IPFS (via Pinata) for decentralized evidence storage. However, public IPFS gateways or even dedicated Pinata gateways can experience rate limits, DNS failures, or downtime. In a legal context, failing to retrieve evidence during a court hearing due to a gateway timeout is unacceptable.
We need to build a high-availability IPFS retrieval layer that automatically falls back through a ranked list of public/private gateways, combined with an automated cron-based active monitoring system (as specified in the Automated Verification System roadmap) to ensure pinned CIDs are always resolvable.
Proposed Solution
- Gateway Race/Fallback Algorithm: Modify the frontend/backend retrieval logic to ping multiple IPFS gateways concurrently (e.g., Pinata, Cloudflare, IPFS.io, dweb.link). The system should stream from the first gateway that successfully returns a
200 OK header, caching the fastest gateway path.
- Availability Cron Job: Utilize
node-cron to periodically run a health check against the Supabase database, polling random CIDs from the evidence table to ensure they have not been garbage collected or dropped by the IPFS pinning service.
- Admin Alerting: If a CID becomes unresolvable across 3+ gateways, integrate an automated alert via WebSocket/Email to the
Evidence Manager dashboard to trigger a re-pin operation.
Technical Stack
- Node.js (
axios, node-cron)
- IPFS HTTP APIs
- Supabase (Updating CID health status)
Acceptance Criteria
Labels: enhancement, infrastructure, hard, ipfs, reliability
Assign this issue to me under the OSCG
Description
The system relies on IPFS (via Pinata) for decentralized evidence storage. However, public IPFS gateways or even dedicated Pinata gateways can experience rate limits, DNS failures, or downtime. In a legal context, failing to retrieve evidence during a court hearing due to a gateway timeout is unacceptable.
We need to build a high-availability IPFS retrieval layer that automatically falls back through a ranked list of public/private gateways, combined with an automated cron-based active monitoring system (as specified in the Automated Verification System roadmap) to ensure pinned CIDs are always resolvable.
Proposed Solution
200 OKheader, caching the fastest gateway path.node-cronto periodically run a health check against the Supabase database, polling random CIDs from theevidencetable to ensure they have not been garbage collected or dropped by the IPFS pinning service.Evidence Managerdashboard to trigger a re-pin operation.Technical Stack
axios,node-cron)Acceptance Criteria
health_statuscolumn in Supabase.evidence-manager.htmldashboard showing the current health/availability of stored files.Labels:
enhancement,infrastructure,hard,ipfs,reliabilityAssign this issue to me under the OSCG