Skip to content

Solana Indexer: Process messages in parallel#292

Merged
rickyrombo merged 6 commits intomainfrom
mjp-parallel-solana-indexer
Aug 4, 2025
Merged

Solana Indexer: Process messages in parallel#292
rickyrombo merged 6 commits intomainfrom
mjp-parallel-solana-indexer

Conversation

@rickyrombo
Copy link
Copy Markdown
Contributor

  • Adds parallelism to solana-indexer.
    • Defaults to 50 workers for stage and prod and 1 for local
    • Tested with 50 workers locally and indexed USDC, wAUDIO, BONK, WEN and was able to catch up from behind 3000 slots. Was seeing numbers of around 50k account balance changes indexed per minute with this many workers. We'll see how our cloud sql db handles this - can always tune the worker count - but this should give us plenty of headroom I think.
  • Reduces slot checkpoint writes to every 10 slots and only if the slot is greater than the current one to help reduce load.
  • Bails early in processing if found signature in the cache, as it's already processed then.
  • Removes sql transaction that wasn't doing anything since it wasn't wired up properly. (Fixing the code to use it causes deadlocks as the concurrency causes the inserts to compete for locks on tables I guess?)

Comment thread config/config.go
AudiusdURL string
ChainId string
BirdeyeToken string
SolanaIndexerWorkers int
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol okay maybe my only gripe with the golang aligned formatting thing 😆

MaxSupportedTransactionVersion: &rpc.MaxSupportedTransactionVersion0,
},
)
}, 5, 1*time.Second)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: worth using a named constant somewhere

@rickyrombo rickyrombo merged commit 1cf54a2 into main Aug 4, 2025
3 checks passed
@rickyrombo rickyrombo deleted the mjp-parallel-solana-indexer branch August 4, 2025 16:29
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.

2 participants