Skip to content

Core: Implement Automated On-Chain Data Backup with IPFS Archival #473

Description

@Smartdevs17

Context

On-chain transaction data is permanent but not easily retrievable. RPC endpoints have rate limits and history constraints, making data recovery difficult.

Current Limitation/Problem

AgenticPay relies on RPC nodes for historical data access. Data could be lost if RPC providers prune history or if the backend database is corrupted. There is no decentralized backup.

Expected Outcome

An automated archival system that periodically backs up on-chain transaction data, event logs, and contract state to IPFS, with content-addressed retrieval and restore capability.

Acceptance Criteria

  • Archive transaction data from all supported chains to IPFS
  • Data format: normalized JSON with proof-of-inclusion (tx hash, block number)
  • Daily archival batches with IPFS CID recorded on-chain or in database
  • Data integrity verification: compute hash before and after archival
  • Restore workflow: download from IPFS and re-index into database
  • Dashboard showing last archive timestamp, size, and CID
  • Retention policy: full archives for 7 years
  • Compression before archival (<100MB per daily archive)

Technical Scope

  • backend/src/services/archival/ - archival service
  • IPFS client (Pinata, web3.storage, or local IPFS node)
  • backend/src/services/archival/data-collector.ts - data gathering
  • backend/src/services/archival/ipfs-uploader.ts - IPFS upload
  • BullMQ cron for daily archival
  • Prisma: DataArchive, ArchivalBatch models
  • Edge cases: IPFS node unavailability, large datasets, partial chain data, restore conflicts

Metadata

Metadata

Assignees

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions