Difficulty: Advanced
Type: Feature
Summary
Improve the membership event indexer so it handles chain reorganisations, finality windows, and duplicate event delivery safely.
Current Behaviour
The indexer can process membership events and persist progress, but simple last-block checkpointing can be unsafe if the chain reorganises after events have already been applied.
Expected Behaviour
The indexer should only finalise events after a configurable confirmation depth and should safely reconcile events if a reorg is detected.
Suggested Implementation
Add a configurable finality window. Store event block hash, block number, transaction hash, log index, and processed status. Re-scan recent blocks before advancing the finalised checkpoint.
Files or Areas Likely Affected
apps/access-api/src/workers/
apps/access-api/prisma/schema.prisma
packages/contracts/src/index.ts
apps/access-api/src/services/
.env.example
Acceptance Criteria
Additional Notes
This builds on the membership event indexer and focuses specifically on production chain safety.
Difficulty: Advanced
Type: Feature
Summary
Improve the membership event indexer so it handles chain reorganisations, finality windows, and duplicate event delivery safely.
Current Behaviour
The indexer can process membership events and persist progress, but simple last-block checkpointing can be unsafe if the chain reorganises after events have already been applied.
Expected Behaviour
The indexer should only finalise events after a configurable confirmation depth and should safely reconcile events if a reorg is detected.
Suggested Implementation
Add a configurable finality window. Store event block hash, block number, transaction hash, log index, and processed status. Re-scan recent blocks before advancing the finalised checkpoint.
Files or Areas Likely Affected
apps/access-api/src/workers/apps/access-api/prisma/schema.prismapackages/contracts/src/index.tsapps/access-api/src/services/.env.exampleAcceptance Criteria
Additional Notes
This builds on the membership event indexer and focuses specifically on production chain safety.