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

Zebra

Zebra is an independent implementation of the Zcash protocol, written in Rust by the Zcash Foundation. Its binary, zebrad, is a full node: it downloads every block from the peer-to-peer network, checks it against the consensus rules of the protocol specification and the ZIPs, and maintains the resulting chain state. The original node, zcashd, has reached end of life.

What Zebra does

  • Validation. Blocks pass structural checks while parsing, semantic checks that need no chain context (proofs, signatures, scripts), and contextual checks against the chain they extend (double spends, value pools, difficulty). By default, blocks up to the last hard-coded checkpoint get only proof-of-work and Merkle-root checks and are accepted once their hashes chain to a checkpoint. Architecture describes the pipeline.
  • Chain state. The finalized chain lives in RocksDB; the most recent blocks of every competing chain stay in memory, so Zebra can switch to a chain with more work.
  • Network. Zebra speaks the Zcash peer-to-peer protocol and relays blocks and, once near the tip, unmined transactions from its mempool.
  • Interfaces. A JSON-RPC server that follows the zcashd API serves light-wallet servers, wallets, explorers, exchanges, and mining pools.

Zebra holds no keys. Wallets use Zallet; light clients use a light-wallet server such as Zaino or lightwalletd, both backed by Zebra. Systems that still depend on the zcashd wallet RPC can run zcashd behind Zebra in zcashd-compat mode; the API migration guide records which component now owns each zcashd method.

Networks and network upgrades

Zebra runs on Mainnet, Testnet, Regtest, and custom test networks. Zebra 7.0.0 implements every network upgrade through NU7, at these compiled-in heights:

Network upgradeMainnet heightTestnet heightDeployment ZIP
Overwinter347,500207,500ZIP 201
Sapling419,200280,000ZIP 205
Blossom653,600584,000ZIP 206
Heartwood903,000903,800ZIP 250
Canopy1,046,4001,028,500ZIP 251
NU51,687,1041,842,420ZIP 252
NU62,726,4002,976,000ZIP 253
NU6.13,146,4003,536,500ZIP 255
NU6.23,364,6004,052,000ZIP 257
NU6.3 (Ironwood)3,428,1434,134,000ZIP 258
NU73,543,4054,465,026ZIP 259

A release that does not implement an upgrade cannot follow the chain past its activation height, and on Mainnet every release halts at its end-of-support height. Upgrading Zebra covers both deadlines.

Getting started

Run the latest release in Docker, with the P2P port published and the state on a named volume:

docker run -d --name zebra \
  -p 8233:8233 \
  -v zebrad-cache:/home/zebra/.cache/zebra \
  zfnd/zebra:latest

Or install the pre-built binary for Linux on x86_64 or aarch64:

cargo binstall zebrad
zebrad start

Installing Zebra, Running Zebra, and Zebra with Docker cover the details.

Documentation

The user documentation is for operators and integrators, the developer documentation for contributors, and the API reference points to the crates’ rustdoc.

Support and security

Report bugs in the issue tracker; Troubleshooting lists known problems. Discussion happens in the zebra-support channel of the Zcash Foundation Discord. Report vulnerabilities privately, as the security policy describes.

Zebra is dual-licensed under MIT and Apache 2.0; some crates are MIT-only, as their Cargo.toml states.