π Overview
Blockchain data ingestion must be idempotent by design.
This issue focuses on ensuring that re-running the indexer β intentionally or accidentally β never corrupts backend state.
π― Objectives
Guarantee that:
- Events are processed once
- Duplicate executions are harmless
- Backend state remains deterministic
π§ Problem Context
Indexers can restart due to:
- Deployments
- Crashes
- Network issues
Without idempotency:
- Balances drift
- Rewards double-count
- Trust is broken
π§© Technical Scope
1οΈβ£ Event Uniqueness
Define uniqueness constraints using:
txHash
logIndex
blockNumber
Enforce at DB level.
2οΈβ£ Processing Guards
- Check existence before writes
- Use transactional writes where needed
- Fail safely on conflicts
3οΈβ£ Restart Safety
- Indexer can resume from last processed block
- Reprocessing same range produces same DB state
β
Acceptance Criteria
β³ Complexity & Effort
Complexity: Medium
Estimated Effort: ~0.5 day
π·οΈ Labels
backend
blockchain-sync
idempotency
medium-complexity
drips-wave
π Overview
Blockchain data ingestion must be idempotent by design.
This issue focuses on ensuring that re-running the indexer β intentionally or accidentally β never corrupts backend state.
π― Objectives
Guarantee that:
π§ Problem Context
Indexers can restart due to:
Without idempotency:
π§© Technical Scope
1οΈβ£ Event Uniqueness
Define uniqueness constraints using:
txHashlogIndexblockNumberEnforce at DB level.
2οΈβ£ Processing Guards
3οΈβ£ Restart Safety
β Acceptance Criteria
β³ Complexity & Effort
Complexity: Medium
Estimated Effort: ~0.5 day
π·οΈ Labels
backendblockchain-syncidempotencymedium-complexitydrips-wave