Run an LEZ Indexer
Get started with the LEZ Indexer and query finalized LEZ state over HTTP RPC.
The LEZ Indexer is a service that reads the finalized LEZ state from the Logos Blockchain node and exposes it over an HTTP RPC interface. Any application can use this interface to query blocks, transactions, and account state. This procedure walks you through running an LEZ Indexer locally alongside its dependencies, verifying it is indexing blocks, and querying account state through the RPC.
Before you start, make sure you have the following:
- Linux or macOS operating system
- Docker installed
- Rust 1.94.0 and
cargoinstalled justinstalled- A local clone of the LEZ repository and wallet set up
- A running Logos Blockchain node (if not deploying locally)
- Port
8779free on your machine
What to expect
- You can query finalized LEZ blockchain state including blocks, transactions, and accounts via HTTP RPC on
http://localhost:8779. - You have a running local stack with the Logos Blockchain node, LEZ Sequencer, and LEZ Indexer coordinated through
justcommands. - You can verify indexer health and confirm it is progressing by calling the
getLastFinalizedBlockIdandcheckHealthRPC methods.
Start the LEZ stack and run the indexer
The indexer depends on the Logos Blockchain Node and benefits from an LEZ Sequencer running alongside it. For a local deployment, start each service in its own terminal.
-
In the LEZ repository, run
just cleanto remove any leftover artifacts from previous runs. -
Replace the default value of
bedrock_config.addrinlez/indexer/service/configs/debug/indexer_config.jsonwith your Logos Blockchain endpoint and replace the defaultchannel_idthere with the LEZ's channel ID. Get the channel ID from the public LEZ sequencer by running:curl https://testnet.lez.logos.co/ \-H "Content-Type: application/json" \-d "{ \\"jsonrpc\": \"2.0\", \\"method\": \"getChannelId\", \\"params\": {}, \\"id\": 1 \}"For a local deployment, run the following commands in two separate terminal windows:
# Run node, in terminal 1just run-bedrock# Terminal 2just run-sequencer- Test configs are located here for the node and here for the sequencer.
-
In a third terminal window, start the LEZ Indexer:
just run-indexerThe indexer serves JSON-RPC over HTTP (and WebSocket) on
http://localhost:8779by default. At startup, you will see:[2026-06-18T14:21:59Z INFO indexer_service] Starting Indexer Service RPC server on 0.0.0.0:8779[2026-06-18T14:21:59Z INFO indexer_core] Starting indexer from beginning of channelThe indexer then listens for block finalizations.
Verify the indexer is progressing
-
Call
getLastFinalizedBlockIdto confirm the indexer is receiving blocks:curl -X POST http://localhost:8779 \-H "Content-Type: application/json" \-d '{"jsonrpc":"2.0","method":"getLastFinalizedBlockId","params":[],"id":1}'You will receive a response similar to:
{"jsonrpc":"2.0","id":1,"result":15}The
resultvalue should increase each time you repeat the call. -
Run the health check to confirm the indexer can reconstruct the full state from the database:
curl -X POST http://localhost:8779 \-H "Content-Type: application/json" \-d '{"jsonrpc":"2.0","method":"checkHealth","params":[],"id":1}'A healthy indexer returns:
{"jsonrpc":"2.0","id":1,"result":null}infocheckHealthreconstructs the full LEZ state from the database and can produce heavy disk usage. Run it sparingly.
Query account state using the wallet and RPC
-
In a fourth terminal window, query an account state by calling
getAccountwith the account ID:curl -X POST http://localhost:8779 \-H "Content-Type: application/json" \-d '{"jsonrpc":"2.0","method":"getAccount","params":{"account_id":"2RHZhw9h534Zr3eq2RGhQete2Hh667foECzXPmSkGni2"},"id":1}'You will receive a response similar to:
{"jsonrpc":"2.0","id":1,"result":{"program_owner":"FeYNA4PVvs1SsSuECrmQNnJqtB1jA6CbVBBSVGos7qcu","balance":20000,"data":"","nonce":1}} -
Run
just run-wallet --helpto see all available wallet commands.
Frequently asked questions
Why is there a delay between sending a transaction and seeing it in the indexer?
The delay is caused by Logos Blockchain's block finality time. The indexer only processes finalized blocks from the L1 node, so transactions sent through the sequencer are not visible until the corresponding block is finalized. This is expected behavior.
How do I change the indexer configuration?
The indexer config used by just run-indexer is located at lez/indexer/service/configs/debug/indexer_config.json (a configs/docker/indexer_config.json variant is used for the Docker setup). Two fields control connectivity:
bedrock_config— the HTTP address of the Logos Blockchain node.channel_id— the channel that LEZ Sequencer writes into. This must match the sequencer you are using.