generated from midnightntwrk/midnight-template-repo
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Optimize the chain-indexer process to reduce block sync time. Faster indexer sync directly reduces dev/QA cycle time when testing against chains with significant block history.
Context
- The chain-indexer uses subxt to fetch blocks from the node and writes parsed data (blocks, extrinsics, events, ledger state) to PostgreSQL via sqlx.
- Current bottleneck is most visible during catch-up/resync scenarios (thousands of blocks).
Suggested investigation areas
- Profile current sync to identify hotspots (CPU vs I/O bound)
- Block prefetching / pipelining from node RPC
- Parallelizing deserialization of ledger state and zswap transaction application
- Batched / bulk database inserts
- Connection pool tuning
Acceptance criteria
- Measurable improvement in blocks-per-second sync rate (establish baseline first)
- No regression in data correctness (existing tests pass)
- Performance baseline and improvement documented
Jira: PM-22247
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog