zainod
zainod is the Zaino indexer daemon — an indexer for the Zcash blockchain,
written in Rust.
It sits between a Zcash full validator (Zebra or Zcashd) and client applications, serving:
- the lightclient protocol API, the interface today served by lightwalletd, and
- a JSON-RPC API covering the subset of Zcash RPCs needed by wallets and block explorers.
This crate ships the zainod binary. The library half of the crate,
zainodlib, exposes the run entrypoint and configuration types for embedding
the daemon in other Rust programs.
For project background and architecture, see the Zaino repository.
CLI
zainod generate-config [--output FILE] # write a default config file
zainod start [--config FILE] # start the indexer
When --config/--output is omitted, the path defaults to
$XDG_CONFIG_HOME/zaino/zainod.toml (falling back to
$HOME/.config/zaino/zainod.toml).
Configuration is layered, highest priority first:
- environment variables (prefix
ZAINO_), - the TOML config file,
- built-in defaults.
Sensitive fields (passwords, secrets, tokens, cookies, private keys) cannot be set via environment variables and must come from the config file.
Launching
zainod needs a running validator to connect to. The examples below assume one
is reachable at the address in your config.
From crates.io
# or point at an explicit file:
From source
With Podman (rootless)
The daemon is published as a container image with zainod start as the default
command. It runs as a non-root user (UID 1000) and refuses to start as root,
which makes it a natural fit for rootless Podman.
Run it directly, mounting a config file and a data volume:
--userns=keep-id maps the container's UID 1000 to your host user, so files in
the mounted data volume stay owned by you:
A typical deployment runs zainod alongside Zebra with podman compose:
services:
zaino:
image: zainod:latest
ports:
- "8137:8137" # gRPC
- "8237:8237" # JSON-RPC (if enabled)
volumes:
- ./config:/app/config:ro,Z
- zaino-data:/app/data
depends_on:
- zebra
volumes:
zaino-data:
See docs/docker.md
for the full container guide.
License
Apache-2.0.