MCPcopy Index your code
hub / github.com/ZcashFoundation/zebra

github.com/ZcashFoundation/zebra @v5.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.2.0 ↗ · + Follow
6,453 symbols 27,901 edges 635 files 2,256 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Zebra logotype


Unit Tests Lint Integration Tests (GCP) codecov Build docs Deploy Nodes (GCP) License

Zebra is a Zcash full node written in Rust.

Getting Started

You can run Zebra using our Docker image or you can install it manually.

Docker

This command will run our latest release, and sync it to the tip:

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

The -p 8233:8233 flag exposes the P2P port so other Zcash nodes can connect to yours, and -v persists the chain state across restarts (use port 18233 for Testnet). For more information, read our Docker documentation.

Manual Install

Building Zebra requires Rust, libclang, and a C++ compiler. Below are quick summaries for installing these dependencies.

General Instructions for Installing Dependencies

  1. Install cargo and rustc.
  2. Install Zebra's build dependencies:
  3. libclang, which is a library that comes under various names, typically libclang, libclang-dev, llvm, or llvm-dev;
  4. clang or another C++ compiler (g++, which is for all platforms or Xcode, which is for macOS);
  5. protoc (optional).

Dependencies on Arch Linux

sudo pacman -S rust clang protobuf

Note that the package clang includes libclang as well. The GCC version on Arch Linux has a broken build script in a rocksdb dependency. A workaround is:

export CXXFLAGS="$CXXFLAGS -include cstdint"

Once you have the dependencies in place, you can install Zebra with:

cargo install --locked zebrad

Alternatively, you can install it from GitHub:

cargo install --git https://github.com/ZcashFoundation/zebra --tag v5.2.0 zebrad

You can start Zebra by running

zebrad start

Refer to the Building and Installing Zebra and Running Zebra sections in the book for enabling optional features, detailed configuration and further details.

CI/CD Architecture

Zebra uses a comprehensive CI/CD system built on GitHub Actions to ensure code quality, maintain stability, and automate routine tasks. Our CI/CD infrastructure:

  • Runs automated tests on every PR and commit.
  • Manages deployments to various environments.
  • Handles cross-platform compatibility checks.
  • Automates release processes.

For a detailed understanding of our CI/CD system, including workflow diagrams, infrastructure details, and best practices, see our CI/CD Architecture Documentation.

Documentation

The Zcash Foundation maintains the following resources documenting Zebra:

User support

If Zebra doesn't behave the way you expected, open an issue. We regularly triage new issues and we will respond. We maintain a list of known issues in the Troubleshooting section of the book.

If you want to chat with us, Join the Zcash Foundation Discord Server and find the "zebra-support" channel.

Security

Zebra has a responsible disclosure policy, which we encourage security researchers to follow.

License

Zebra is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Some Zebra crates are distributed under the MIT license only, because some of their code was originally from MIT-licensed projects. See each crate's directory for details.

See LICENSE-APACHE and LICENSE-MIT.

Extension points exported contracts — how you extend this code

ZcashSerialize (Interface)
Consensus-critical serialization for Zcash. This trait provides a generic serialization for consensus-critical formats, [61 …
zebra-chain/src/serialization/zcash_serialize.rs
UpdateWith (Interface)
Helper trait to organize inverse operations done on the [`Chain`] type. Used to overload update and revert methods, bas [9 …
zebra-state/src/service/non_finalized_state/chain.rs
RequestWeight (Interface)
A trait for reading the weight of a request to [`BatchControl`] services. [9 implementers]
tower-batch-control/src/lib.rs
ContextFrom (Interface)
Add context to an error report TODO: split this trait into its own module [6 implementers]
zebra-test/src/command.rs
Sigops (Interface)
Trait for counting the number of transparent signature operations in the transparent inputs and outputs of a transaction [4 …
zebra-script/src/lib.rs
AddressBookPeers (Interface)
Method signatures for getting [`MetaAddr`]s of recently live peers. [4 implementers]
zebra-network/src/address_book_peers.rs
UnboxMempoolError (Interface)
Helper trait to extract the [`MempoolError`] from a [`BoxError`]. [3 implementers]
zebrad/src/components/mempool/tests.rs
ValidateAddresses (Interface)
A collection of validatable addresses [3 implementers]
zebra-rpc/src/methods.rs

Core symbols most depended-on inside this repo

map
called by 958
zebra-network/src/peer_set/inventory_registry.rs
unwrap
called by 773
zebra-state/src/response.rs
push
called by 673
zebra-chain/src/history_tree.rs
clone
called by 634
zebra-chain/src/sprout/tree.rs
iter
called by 534
zebra-chain/src/parameters/network.rs
append
called by 369
zebra-chain/src/sprout/tree.rs
call
called by 282
zebra-node-services/src/rpc_client.rs
clone
called by 269
zebra-state/src/service/chain_tip.rs

Shape

Function 2,877
Method 2,833
Class 509
Enum 166
Interface 68

Languages

Rust80%
TypeScript20%

Modules by API surface

book/mermaid.min.js1,270 symbols
zebra-rpc/src/methods.rs95 symbols
zebrad/tests/acceptance.rs86 symbols
zebra-state/src/service/non_finalized_state/chain.rs79 symbols
zebra-chain/src/transaction.rs74 symbols
zebra-consensus/src/transaction/tests.rs70 symbols
zebra-test/src/command.rs62 symbols
zebra-chain/src/parameters/network/testnet.rs61 symbols
zebra-network/src/meta_addr.rs58 symbols
zebra-state/src/service/finalized_state/disk_db.rs53 symbols
zebra-state/src/service/finalized_state/zebra_db/shielded.rs46 symbols
zebra-state/src/service/non_finalized_state.rs43 symbols

For agents

$ claude mcp add zebra \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page