The Verana Indexer is a specialized blockchain indexing service built on the Horoscope V2 framework, designed exclusively for the Verana decentralized trust ecosystem.
It not only indexes blocks, transactions, and accounts from Cosmos SDK-based blockchains, but also plays a critical role in the Verifiable Trust architecture by enabling DID discovery, verifiable credential verification, and trust resolution for services and agents on the Verana network.
While Horoscope V2 provides the base crawling and indexing capabilities, the Verana Indexer’s scope is broader:
- Verana-Exclusive Integration – Adapted to Verana’s governance, trust registries, and DID directory.
- Real-Time DID Crawling & Updating – Listens for DID-related blockchain events to keep an up-to-date registry of verifiable services (VS) and verifiable user agents (VUA).
- Trust Resolution Support – Integrates with the Trust Resolver to validate credentials and return concise Proof-of-Trust results.
- Service Discovery – Feeds the DID Directory for indexing verifiable services, enabling fast search for wallets, applications, and other services.
- Off-chain Enriched Index – Bridges minimal on-chain records with rich off-chain metadata for high-performance queries.
Indexer consists of multiple services. All services are small Node applications written in Typescript, built with Moleculerjs framework using Moleculer TS base. The crawler servires utilize Bull for efficient queue management of crawling jobs.
An overview of the architecture is shown below:
graph LR
subgraph "Verana Indexer"
subgraph "Services"
api-gateway["API Gateway"]
crawl-account["crawl-account"]
crawl-block["crawl-block"]
crawl-transaction["crawl-transaction"]
crawl-proposal["crawl-proposal"]
crawl-validator["crawl-validator"]
crawl-cosmwasm["crawl-cosmwasm"]
cw721["cw721"]
end
subgraph "Database"
database["Postgres"]
end
subgraph "Other Services"
redis["Redis"]
end
api-gateway --> database
Services --> redis
Services --> database
end
subgraph "User"
user["GraphQL client"]
end
subgraph "Blockchain RPC"
blockchain["Blockchain RPC"]
end
subgraph "External Services"
ipfs["IPFS"]
end
blockchain --> crawl-block
blockchain --> cw721
blockchain --> crawl-transaction
blockchain --> crawl-account
blockchain --> crawl-proposal
blockchain --> crawl-validator
All services are stateless and can be scaled horizontally. Crawling jobs are queued in Redis and processed by the crawler services. The current state of crawling jobs is stored in the database and can be queried via the GraphQL API.
A list of services is shown below:
- crawl-account: get account auth and its balances
- crawl-block: get block from network and insert to DB
- crawl-transaction: get transaction in a block and decode to readable
- crawl-proposal: get proposal and its status
- crawl-validator: get validator and their power event, signing info
- crawl-genesis: get state from genesis chunk
- crawl-dids: Crawl and updates DIDs in real time by listening to blockchain events.
- crawl-tr: Crawl Trust Registry, governance frameworks, and track version changes.
- crawl-cs: Crawl all credential schema–related transactions and update their state in the database.
- crawl-perm: Crawl all permissions related to Trust Registry and Credential Schema transactions, and synchronize their current state in the database.
- crawl-td:This service is responsible for crawling and indexing all Trust Deposit states in the database to keep the data up to date.
- crawl-ar: Crawl all blockchain accounts, get their Account Reputation, and save it to the DB.
- handle-vote: parse vote message
You can view detail database schema here
pnpm icp .env.example .env
# then open .env and fill in the required valuespnpm run dockerThis will start the PostgreSQL, Redis containers in the background.
Note: Make sure the required ports aren’t already in use on your machine.
Config Moleculer, refer docs to get detail configurations. Config chain to setup crawling jobs and the crawling chain information.
Setting up Verana Indexer for a new chain is straight-forward:
- Configure the crawling jobs and chain information in the
config.jsonfile - If the chain has custom messages, you may need to add a new message decoder (see Message Decoders section).
- Start crawling your chain 🎆