Add Squid indexer to ERC20 transfer events benchmark#5
Merged
DZakh merged 6 commits intodz/open-indexer-benchmarkfrom Feb 13, 2026
Merged
Conversation
Add a complete Subsquid SDK implementation for the ERC20 transfer events benchmark case, following the patterns from docs.sqd.ai. Includes: - EvmBatchProcessor configured for RocketTokenRETH on Ethereum Mainnet - TypeORM entities for Account, TransferEvent, Allowance, ApprovalEvent - Batch event handler with upsert logic matching the benchmark spec - GraphQL server via @subsquid/graphql-server on port 4350 - Benchmark runner integration with Docker Postgres lifecycle - CI validation job for typecheck https://claude.ai/code/session_01BrQJTpQMVQLbH3Sr5k2BDz
The generated model files and migrations are no longer tracked in git. The benchmark now runs `pnpm codegen` to regenerate models from schema.graphql and `squid-typeorm-migration generate` before applying. https://claude.ai/code/session_01BrQJTpQMVQLbH3Sr5k2BDz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a complete Squid (Subsquid) implementation to the ERC20 transfer events benchmark suite, enabling performance comparison with existing indexers (Ponder, Envio, and Rindexer).
Key Changes
Benchmark Integration: Added
benchmarkSquid()function torun.tsthat:Process Management: Refactored active process tracking from single
activeProctoactiveProcsarray to support Squid's dual-process architecture (processor + GraphQL server)Squid Project Structure: Created complete Squid implementation including:
processor.ts: EVM batch processor configured for Ethereum mainnet, monitoring ERC20 contract events from block 18,600,000main.ts: Event handler that processes Transfer and Approval events, maintains Account balances and Allowance stateschema.graphql: GraphQL schema defining Account, TransferEvent, Allowance, and ApprovalEvent entitiesCI/CD: Added GitHub Actions workflow job for Squid project validation (dependency installation and typecheck)
Implementation Details
{blockHeight}-{logIndex}for consistent identification across indexershttps://claude.ai/code/session_01BrQJTpQMVQLbH3Sr5k2BDz