Skip to content

Block chain event#18

Merged
akargi merged 4 commits into
Chulilee:mainfrom
Dijjy7:BlockChain-Event
Jul 22, 2026
Merged

Block chain event#18
akargi merged 4 commits into
Chulilee:mainfrom
Dijjy7:BlockChain-Event

Conversation

@Dijjy7

@Dijjy7 Dijjy7 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Implemented the Blockchain Event Indexing Module at src/modules/blockchain-indexer/ and integrated it into AppModule.
closes #10

Acceptance criteria coverage
Indexing state persisted: cursor + last ledger stored in indexer_state table
Query filtering: eventType, transactionHash, sourceAccount, destinationAccount, assetCode, assetIssuer, amountFrom/To, ledgerFrom/To, startTime/endTime
Reorg handling: detects current ledger < last indexed, invalidates events from that point, and backfills large gaps
Recovery without data loss: idempotent uniqueId dedup, persisted cursor, retry loops that swallow transient failures
Real-time streaming: Redis publish for new events, SSE endpoint for live consumption
Configurable: env vars under BLOCKCHAIN_INDEXER_* control poll interval, backfill limits, retention, etc.
New config added
BLOCKCHAIN_INDEXER_ENABLED
BLOCKCHAIN_INDEXER_POLL_INTERVAL_MS
BLOCKCHAIN_INDEXER_MAX_BACKFILL_LEDGERS
BLOCKCHAIN_INDEXER_STREAM_TTL_SECS
BLOCKCHAIN_INDEXER_INCLUDE_FAILED
Verification
All new unit tests pass: 14/14 (npm test -- --testPathPattern="blockchain-indexer")
TypeScript: npx tsc --noEmit clean
ESLint: npx eslint src/modules/blockchain-indexer/**/*.ts --fix clean

@Dijjy7

Dijjy7 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi @akargi approve work flow and review pr

@akargi
akargi merged commit e8f0587 into Chulilee:main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Blockchain Event Indexing Module

2 participants