Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick start

Requirements

  • A Zcash validator with JSON-RPC enabled: Zebra (zebrad, tested with 6.2.3) or Zakura (zakurad). Set [rpc] listen_addr in its config.
  • Local storage for the indexes, preferably NVMe (first sync).

Zingod uses these Zcash JSON-RPC methods: getblock, getblockchaininfo, getblockhash, getblockheader, getdeprecationinfo, getinfo, getpeerinfo, getrawmempool, getrawtransaction and sendrawtransaction. If the validator restricts its RPC methods, allow these. Zingod also calls checkadmission when the validator supports it.

Run with Docker

  1. Generate a config with every key at its default:

    docker run --rm zingodevops/zingod generate-config -o /dev/stdout > zingod.toml
    
  2. Edit zingod.toml:

    • Set network to mainnet, testnet or regtest.
    • Set jsonrpc_address under [[trusted_validators]] to your validator.
    • Set tls under [serve]. The container listens on all interfaces, so Zingod requires it: tls = "off" if wallets connect only from this host, or a certificate pair (TLS).
  3. Start it:

    docker run -d --name zingod -p 127.0.0.1:8137:8137 \
      -v ./zingod.toml:/etc/zingod/zingod.toml:ro \
      -v zingod-data:/var/lib/zingod \
      zingodevops/zingod
    
  4. Wait for the first sync. It takes about an hour on NVMe with the validator on the same host, and longer over a network. An index snapshot skips most of it. Check progress over HTTP on the gRPC port:

    curl -s http://localhost:8137/status                     # state and tip
    curl -sf http://localhost:8137/readyz && echo serving    # 200 once ready
    

Wallets can then connect to http://localhost:8137. See Docker for volumes, TLS mounts and Compose.

Run on a host

Building requires protoc on PATH.

cargo install --locked --git https://github.com/zingolabs/zingod zingod
zingod generate-config      # writes $XDG_CONFIG_HOME/zingod/zingod.toml
zingod start                # or: zingod start -c /path/to/zingod.toml

Run it under a service manager such as systemd. zingod --help lists every subcommand.

Try it on the Public Testnet

zebrad.toml and zingod.toml are a matching pair of configs for the Public Testnet, with zebrad’s JSON-RPC on 127.0.0.1:18232.

  1. Install zebrad: cargo install zebrad --locked.
  2. In zebrad.toml, replace <PATH_TO_ZEBRA> with a writable directory. In zingod.toml, replace <ZINGOD_DATA>.
  3. Run zebrad -c zebrad.toml start.
  4. In another shell, run zingod start -c zingod.toml.

Zingod serves gRPC on 127.0.0.1:8137.