Repository navigation
feat(indexer): implement EVM indexer runtime - #1
Merged
Merged
Conversation
Wires up the indexer binary with a full EVM event pipeline: - Tokio bootstrap with structured logging, DB connection, and migration runner - alloy-rs WebSocket provider per chain (generic over transport type) - RawLog conversion from alloy Log type - AdapterDispatch enum skeleton for zero-overhead protocol dispatch - ChainRunner with eth_getLogs backfill (2k-block chunks) and live subscribe_logs subscription - One Tokio task per chain (Ethereum, Arbitrum, Optimism, Base) with graceful Ctrl+C shutdown - EVM_START_BLOCK env var controls backfill depth; defaults to tip-only (no backfill)
Member
Author
Test results ✅All 7 EVM chains connected and subscribed to live logs:
DB connection and migrations confirmed working against local Docker Postgres. WebSocket reconnection on drop is tracked separately in #2. |
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
indexer/from an empty stub to a fully functional EVM event pipelineChainRunner<P>backfills historical logs in 2k-block chunks viaeth_getLogs, then transitions to a livesubscribe_logsstream — no gap between the twoAdapterDispatchenum skeleton in place —NoOpplaceholder until the LayerZero V2 adapter landsWhat's not in this PR
No protocol adapters yet —
AdapterDispatch::NoOpmatches nothing, so no events are inserted. The next PR adds the LayerZero V2 adapter as the first real variant.Test plan
DATABASE_URL,ALCHEMY_API_KEY, and remaining required env vars from.env.examplecargo run -p indexer— should log "connected to EVM node" × 4 chains, run migrations, then log "indexer running"EVM_START_BLOCK=<recent_block>and confirm backfill chunk logs appear before the subscription hand-off