Ultra-fast, Kubernetes-native EVM indexer in Rust.
Write custom event indexing logic in TypeScript with logrix-sdk and deploy production indexer clusters in seconds.
- Custom Event Logic with TypeScript: Write type-safe handlers with
@logrix/sdk(compiled to sandboxed WebAssembly) or zero-code declarative YAML. - High-Throughput Ingestion: Vectorized PostgreSQL writes (
UNNESTarrays) processing >20,000 events/sec. - Reorg-Safe Atomic Rollbacks: Rolling parent-hash ring buffer detects reorgs, applies atomic state rollbacks (
is_reverted = TRUE), and re-indexes canonical blocks with self-healing gap reconciliation. - RPC Cost & Rate-Limit Protection: Multi-provider failover pool with per-node circuit breakers, decorrelated full jitter, and built-in Compute Unit (CU) budget tracking.
- Dual Storage Tiering: Hot GraphQL entities in PostgreSQL; raw block envelopes compressed with zstd into cold S3/MinIO buckets, reducing database storage costs by up to 85%.
- Kubernetes-Native Architecture: Active-passive Ingester leader election via Kubernetes Leases and event-driven worker autoscaling via KEDA (1 to 50+ pods).
npx @logrix/sdk init my-indexer
cd my-indexer
npm installnpm run codegenimport { TransferEvent } from "./generated/events";
import { TransferEntity } from "./generated/schema";
export function handleTransfer(event: TransferEvent): void {
let entity = new TransferEntity(event.transactionHash + "-" + event.logIndex.toString());
entity.blockNumber = event.blockNumber;
entity.fromAddress = event.params.from;
entity.toAddress = event.params.to;
entity.amount = event.params.value;
entity.transactionHash = event.transactionHash;
entity.timestamp = event.blockTimestamp;
entity.save();
}npm run build
npm run export-valuesOutputs indexer-values.yaml containing the compiled WASM handler, GraphQL schema, and contract manifest ready for deployment.
Logrix provides two deployment paths via official Helm charts:
Deploys to any standard Kubernetes cluster (Minikube, Kind, K3s, EKS, GKE, or bare-metal). Includes built-in in-cluster PostgreSQL 16 and RabbitMQ 3.13 out of the box:
helm install my-indexer oci://ghcr.io/vishal-770/charts/logrix \
-f indexer-values.yamlPort-forward the GraphQL API server:
kubectl port-forward svc/my-indexer-logrix-api 4000:4000Open http://localhost:4000/ for GraphiQL IDE, or query http://localhost:4000/graphql.
Optional Cold S3 Archiving:
helm install my-indexer oci://ghcr.io/vishal-770/charts/logrix \
-f indexer-values.yaml \
--set builtIn.minio=trueProduction architecture utilizing AWS EKS, AWS Aurora Serverless v2 PostgreSQL, Amazon SQS, and Amazon S3.
-
Provision Infrastructure (Terraform):
cd deploy/terraform/aws terraform init terraform apply -
Deploy to EKS:
aws eks update-kubeconfig --name <cluster-name> --region <aws-region> helm install my-indexer oci://ghcr.io/vishal-770/charts/logrix \ -f deploy/helm/values-aws.yaml \ -f indexer-values.yaml \ --set config.existingSecret=logrix-secrets
All Logrix components are fully configurable through environment variables, CLI flags, and YAML manifests with sensible production defaults.
| Subsystem | Key Environment Variables | Default Value | Crate Documentation |
|---|---|---|---|
| PostgreSQL Database | DATABASE_URLDATABASE_MAX_CONNECTIONSDATABASE_MIN_CONNECTIONS |
postgres://logrix:logrix@localhost:5432/logrix102 |
logrix-store-postgres |
| RabbitMQ Queue | RABBITMQ_URLRABBITMQ_PREFETCHRABBITMQ_TIMEOUT_SECS |
amqp://logrix:logrix@localhost:5672/%2f10010s |
logrix-queue-rabbitmq |
| AWS SQS Queue | QUEUE_DRIVER=sqsSQS_LIVE_URLSQS_WAIT_TIME_SECONDSSQS_MAX_MESSAGES |
rabbitmq"" (Required if SQS)2s1 |
logrix-queue-sqs |
| JSON-RPC Gateway | RPC_URLRPC_FALLBACK_URLSRPC_TIMEOUT_SECSRPC_CB_THRESHOLDRPC_COOLDOWN_SECS |
https://sepolia-rollup.arbitrum.io/rpcNone 10s530s |
logrix-rpc-gateway |
| EVM Log Extraction | CHAIN_IDCHUNK_SIZECHAIN_HEAD_POLL_MSMAX_QUEUE_DEPTH |
421614101500ms1000 |
logrix-chain-evm |
| Gap Reconciler & Reorg | RING_BUFFER_DEPTHRECONCILER_INTERVAL_SECSRECONCILER_CHUNK_SIZERECONCILER_LAG_THRESHOLD |
12830s1050 |
logrix-reconciler |
| WASM Handlers | WASM_FUEL_LIMITWASM_MAX_MEMORY_MBMANIFEST_PATH |
1,000,000128 MBNone |
logrix-handlers |
| GraphQL API Server | GRAPHQL_MAX_DEPTHGRAPHQL_MAX_COMPLEXITYGRAPHQL_DEFAULT_LIMITGRAPHQL_MAX_LIMITGRAPHQL_QUERY_TIMEOUT_SECS |
720010010005s |
logrix-api |
| Webhook Dispatcher | ENABLE_WEBHOOKSWEBHOOK_URLWEBHOOK_SECRETWEBHOOK_TIMEOUT_SECSWEBHOOK_MAX_RETRIES |
falseNone ""5s1 |
logrix-webhook |
| Cloud Object Storage | S3_BUCKETS3_ENDPOINTS3_PREFIX |
None None None |
logrix-blob-s3 |
| Fault Tolerance Primitives | Circuit breakers, Token bucket rate limiting, Jitter backoff | Tuned per subsystem | logrix-resilience |
| Unified CLI Runner | Full flag & subcommand reference | See CLI guide | logrix-cli |
For complete per-crate options, custom programmatic builders, and architecture details, refer to each individual crate README linked above.
Interactive web dashboard served directly by the API container at http://localhost:4000/ (or /graphiql):
- Schema explorer, interactive query builder, and entity inspection.
- Real-time event streaming and live mutations over WebSockets (
/ws). - Access via port-forward:
kubectl port-forward svc/my-indexer-logrix-api 4000:4000
A production-ready Grafana dashboard is included at deploy/dashboards/logrix-overview.json. Import it directly into Grafana to monitor:
- Indexed Head Height: Live block height vs chain head.
- Ingestion Throughput: Rate of indexed events per second (
rate(logrix_events_indexed_total[1m])). - Database Connection Pool: Active vs idle connections in PostgreSQL.
- Reorg & Rollback Activity: Live alert counts on chain reorganizations (
logrix_reorg_events_total). - Dynamic Entity Volume: Cumulative custom entity counts (
logrix_entities_total).
Monitor pods and streaming processing logs with standard kubectl:
# Check pod status and scaling
kubectl get pods -l app.kubernetes.io/instance=my-indexer
# Stream processor ingestion logs
kubectl logs -f deployment/my-indexer-logrix-processor
# View KEDA autoscaling status
kubectl get scaledobjectThe API service exposes Prometheus metrics at http://localhost:4000/metrics.
To enable automatic scraping via Prometheus Operator in your Helm values:
serviceMonitor:
enabled: true
interval: 15sLicensed under the Apache License, Version 2.0.
