$ cat godex/README.md

godex

// A high-performance blockchain indexing SDK written in Go

under development

> overview

godex is a production-ready SDK designed for building robust blockchain indexers that process EVM-compatible blockchain events. It provides a comprehensive solution for indexing multiple chains simultaneously with automatic reorg handling, flexible event decoding, and high-performance concurrent processing.

Built with Go, godex offers developers a powerful toolkit to create reliable indexers that can handle the complexities of blockchain data processing, including chain reorganizations, multi-chain support, and efficient event filtering.

> installation

Install godex using Go modules:

go get github.com/ryuux05/godex

For detailed documentation, examples, and usage instructions, visit the GitHub repository.

> features

  • Multi-Chain Support: Index events across multiple EVM-compatible chains simultaneously with independent configuration per chain
  • Automatic Reorg Handling: Built-in detection and rollback for blockchain reorganizations, ensuring data consistency
  • Flexible Event Decoding: Register multiple ABIs with named identifiers for explicit event decoding and type-safe data access
  • High Performance: Concurrent fetching and processing with configurable worker pools for optimal throughput
  • Production Ready: Comprehensive error handling, retry mechanisms, rate limiting, and state management
  • Flexible Fetching: Support for both log-based and receipt-based fetching strategies
  • Topic Filtering: Efficient event filtering using function signatures or topic hashes

> architecture

The SDK consists of three main components working together:

Processor

The Processor manages block fetching, log retrieval, and reorg detection. It coordinates multiple workers to fetch logs concurrently while maintaining ordered processing through an arbiter pattern. Handles state management and ensures data consistency across chain reorganizations.

Decoder

The Decoder transforms raw blockchain logs into structured events. It supports registering multiple ABIs with named identifiers, allowing explicit selection of which ABI to use for decoding. Designed to be resilient—returns nil for logs that cannot be decoded, allowing indexers to continue processing.

RPC Client

The RPC client handles communication with blockchain nodes, including automatic retry logic, rate limiting, and error handling. Supports configurable rate limits to respect provider constraints while maximizing throughput.

> reorg handling

The SDK automatically detects blockchain reorganizations by comparing parent block hashes. When a reorg is detected:

  • 1. The processor identifies the common ancestor block
  • 2. Rolls back any processed state beyond the ancestor
  • 3. Restarts indexing from the ancestor block

This ensures data consistency even during chain reorganizations, a critical feature for production indexers.

> technologies

Go Docker EVM Blockchain