Multichain Indexer
The multichain indexer polls blockchain RPC endpoints for new blocks and detects incoming transactions to your wallets. It's configured via config.indexer.yaml.
Configuration Structure
env: "development"
version: "1.0.0"
defaults:
from_latest: true
poll_interval: "5s"
reorg_rollback_window: 20
client:
timeout: "20s"
max_retries: 3
retry_delay: "5s"
throttle:
rps: 8
burst: 16
batch_size: 100
concurrency: 3
chains:
# Chain definitions go here
services:
nats:
url: "nats://nats-server_fystack:4222"
redis:
url: "redis:6379"
password: "6s9H5G9o4p5Fz25K9RyWd6eOryU8nQ"
kvstore:
type: "consul"
consul:
scheme: "http"
address: "consul:8500"
Adding Chains
Each chain requires three fields that must align across your configuration:
EVM Chains
chains:
eth_sepolia:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "ETHER_SEPOLIA_TESTNET"
type: "evm"
start_block: 7000000
poll_interval: "5s"
nodes:
- url: "https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY"
client:
max_retries: 3
retry_delay: "5s"
throttle:
rps: 10
burst: 20
base_sepolia:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "BASE_SEPOLIA_TESTNET"
type: "evm"
start_block: 0
nodes:
- url: "https://base-sepolia-rpc.publicnode.com"
polygon_mainnet:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "POLYGON_MAINNET"
type: "evm"
start_block: 65000000
nodes:
- url: "https://polygon-mainnet.g.alchemy.com/v2/YOUR_KEY"
Tron
chains:
tron_mainnet:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "TRON_MAINNET"
type: "tron"
start_block: 70000000
poll_interval: "8s"
nodes:
- url: "https://api.trongrid.io/"
client:
max_retries: 5
retry_delay: "10s"
throttle:
rps: 5
burst: 8
tron_testnet:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "TRON_SHASTA_TESTNET"
type: "tron"
start_block: 58083393
poll_interval: "8s"
nodes:
- url: "https://api.shasta.trongrid.io/"
Solana
chains:
solana_mainnet:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "SOL_MAINNET"
type: "solana"
start_block: 0
nodes:
- url: "https://api.mainnet-beta.solana.com"
solana_devnet:
network_id: "YOUR-UUID-FROM-FYSTACK-UI"
internal_code: "SOL_DEVNET"
type: "solana"
start_block: 0
nodes:
- url: "https://api.devnet.solana.com"
Docker Compose Configuration
The multichain indexer only indexes chains listed in the CHAINS environment variable:
multichain-indexer:
image: docker.io/fystacklabs/multichain-indexer:1.0.0
command:
[
"index",
"--chains=${CHAINS:-tron_testnet}",
"--debug",
"--catchup",
"--manual",
]
environment:
- CHAINS=tron_testnet,eth_sepolia,base_sepolia
volumes:
- ./config.indexer.yaml:/app/configs/config.yaml:ro
warning
The chain name in CHAINS must match the key under chains: in config.indexer.yaml (e.g., tron_testnet, eth_sepolia), not the internal_code.
Configuration Reference
Defaults
| Field | Default | Description |
|---|---|---|
from_latest | true | Start indexing from the latest block (ignores start_block) |
poll_interval | 5s | How often to check for new blocks |
reorg_rollback_window | 20 | Number of blocks to re-check for chain reorgs |
Client Settings
| Field | Default | Description |
|---|---|---|
timeout | 20s | HTTP request timeout for RPC calls |
max_retries | 3 | Number of retries on RPC failure |
retry_delay | 5s | Delay between retries |
Throttle Settings
| Field | Default | Description |
|---|---|---|
rps | 8 | Requests per second limit |
burst | 16 | Maximum burst of requests allowed |
batch_size | 100 | Number of blocks to process in a batch |
concurrency | 3 | Number of concurrent block processors |