Skip to main content

Transaction Indexer

Fystack uses two layers of transaction indexing to detect incoming deposits and track on-chain activity.

How Indexing Works

ComponentConfig FileWhat It Does
Apex built-in indexerconfig.yaml (wss_enabled)Subscribes to new blocks via WebSocket (EVM chains only)
Multichain Indexerconfig.indexer.yamlPolls RPC endpoints for new blocks across all chain types
Rescannerconfig.rescanner.yamlFills in missed blocks/gaps (primarily for Solana)

Apex Built-in Indexer (wss_enabled)

For EVM chains, Apex can subscribe to new blocks directly via WebSocket. This is controlled by the wss_enabled flag per network in config.yaml:

networks:
ETHER_SEPOLIA_TESTNET:
enabled: true
wss_enabled: true # Apex subscribes to new blocks via WSS
providers:
- name: "alchemy"
http: "https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY"
wss: "wss://eth-sepolia.g.alchemy.com/v2/YOUR_KEY"

When to disable wss_enabled

Set wss_enabled: false if you want to:

  • Save RPC costs — WSS connections count towards your RPC provider's usage limits. If you're already running the multichain indexer for a chain, you can disable WSS to avoid duplicate RPC consumption.
  • Use public RPCs — Many public RPC endpoints have unreliable or unavailable WebSocket support.
  • Rely solely on the multichain indexer — The multichain indexer polls via HTTP, which is more reliable with rate-limited providers.
networks:
ETHER_SEPOLIA_TESTNET:
enabled: true
wss_enabled: false # Disable WSS, rely on multichain indexer instead
providers:
- name: "alchemy"
http: "https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY"
# No wss endpoint needed when wss_enabled is false
Cost optimization

If you're running both the Apex WSS listener and the multichain indexer for the same chain, you're paying for two RPC connections. For production, pick one:

  • WSS only (wss_enabled: true, no chain in indexer) — Lowest latency, but requires a reliable WSS endpoint
  • Indexer only (wss_enabled: false, chain in indexer) — More resilient, works with HTTP-only providers, configurable poll intervals
  • Both — Maximum reliability, but higher RPC costs

Multichain Indexer

The multichain indexer is a separate service that polls blockchain RPCs for new blocks. It supports all chain types (EVM, Solana, Tron) and is configured via config.indexer.yaml.

See Multichain Indexer Configuration for the full setup guide.

Rescanner

The rescanner fills in block gaps — blocks that were missed during normal indexing due to RPC downtime, rate limiting, or service restarts. It's primarily used for Solana.

See Rescanner Configuration for details.