2022-03-27 16:42:47 -07:00
![Zebra logotype ](https://zfnd.org/wp-content/uploads/2022/03/zebra-logotype.png )
2019-10-25 09:48:46 -07:00
2020-04-21 23:48:18 -07:00
---
2022-10-20 19:57:04 -07:00
2024-10-25 07:56:12 -07:00
[![Integration Tests ](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml/badge.svg )](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml)
[![CI OSes ](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-unit-tests-os.yml/badge.svg )](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-unit-tests-os.yml)
[![Continuous Delivery ](https://github.com/ZcashFoundation/zebra/actions/workflows/cd-deploy-nodes-gcp.yml/badge.svg )](https://github.com/ZcashFoundation/zebra/actions/workflows/cd-deploy-nodes-gcp.yml)
[![codecov ](https://codecov.io/gh/ZcashFoundation/zebra/branch/main/graph/badge.svg )](https://codecov.io/gh/ZcashFoundation/zebra)
[![Build docs ](https://github.com/ZcashFoundation/zebra/actions/workflows/docs-deploy-firebase.yml/badge.svg )](https://github.com/ZcashFoundation/zebra/actions/workflows/docs-deploy-firebase.yml)
2020-04-22 00:02:19 -07:00
![License ](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg )
2020-10-07 08:33:34 -07:00
2021-10-29 12:25:30 -07:00
- [About ](#about )
- [Getting Started ](#getting-started )
2023-05-18 14:25:05 -07:00
- [Docker ](#docker )
2024-10-25 07:56:12 -07:00
- [Manual Build ](#manual-build )
2021-10-29 12:25:30 -07:00
- [Documentation ](#documentation )
2023-06-08 16:42:32 -07:00
- [User support ](#user-support )
2021-10-29 12:25:30 -07:00
- [Security ](#security )
- [License ](#license )
2020-12-07 21:41:49 -08:00
## About
2020-10-07 08:33:34 -07:00
2024-10-25 07:56:12 -07:00
[Zebra ](https://zebra.zfnd.org/ ) is a Zcash full-node written in Rust.
2022-06-28 15:15:01 -07:00
2024-10-25 07:56:12 -07:00
Zebra implements all the features required to reach Zcash network consensus, and
the network stack is interoperable with `zcashd` .
[Here ](https://docs.rs/zebrad/latest/zebrad/index.html#zebra-advantages ) are
some benefits of Zebra.
2021-10-29 12:25:30 -07:00
2023-05-26 02:59:34 -07:00
Zebra validates blocks and transactions, but needs extra software to generate
them:
2023-02-24 15:08:16 -08:00
2023-10-31 15:58:37 -07:00
- To generate transactions, [run Zebra with `lightwalletd` ](https://zebra.zfnd.org/user/lightwalletd.html ).
2023-10-20 10:31:04 -07:00
- To generate blocks, use a mining pool or miner with Zebra's mining JSON-RPCs.
Currently Zebra can only send mining rewards to a single fixed address.
To distribute rewards, use mining software that creates its own distribution transactions,
a light wallet or the `zcashd` wallet.
2023-05-23 06:18:57 -07:00
2023-05-26 02:59:34 -07:00
Please [join us on Discord ](https://discord.gg/na6QZNd ) if you'd like to find
out more or get involved!
2022-11-22 22:01:34 -08:00
2021-10-29 12:25:30 -07:00
## Getting Started
2020-12-07 21:41:49 -08:00
2023-05-18 14:25:05 -07:00
You can run Zebra using our Docker image or you can build it manually. Please
2023-05-23 06:18:57 -07:00
see the [System Requirements ](https://zebra.zfnd.org/user/requirements.html )
section in the Zebra book for system requirements.
2023-05-18 14:25:05 -07:00
### Docker
2022-10-05 05:46:10 -07:00
This command will run our latest release, and sync it to the tip:
2022-11-01 15:35:21 -07:00
```sh
2023-06-13 21:35:45 -07:00
docker run zfnd/zebra:latest
2022-10-05 05:46:10 -07:00
```
2023-06-13 16:16:56 -07:00
For more information, read our [Docker documentation ](https://zebra.zfnd.org/user/docker.html ).
2022-10-31 22:47:37 -07:00
2024-10-25 07:56:12 -07:00
### Manual Build
2023-02-24 15:08:16 -08:00
2023-03-08 03:49:06 -08:00
Building Zebra requires [Rust ](https://www.rust-lang.org/tools/install ),
2024-02-23 08:49:53 -08:00
[libclang ](https://clang.llvm.org/doxygen/group__CINDEX.html ), and a C++
compiler.
2022-10-05 05:46:10 -07:00
2023-03-08 03:49:06 -08:00
Zebra is tested with the latest `stable` Rust version. Earlier versions are not
2023-06-09 03:04:21 -07:00
supported or tested. Any Zebra release can start depending on new features in the
latest stable Rust.
2020-12-08 16:22:42 -08:00
2024-05-07 07:25:50 -07:00
Around every 6 weeks, we release a [new Zebra version ](https://github.com/ZcashFoundation/zebra/releases ).
2023-05-23 06:18:57 -07:00
2023-03-08 03:49:06 -08:00
Below are quick summaries for installing the dependencies on your machine.
2021-10-29 12:25:30 -07:00
2024-01-12 14:36:04 -08:00
[//]: # "The empty line in the `summary` tag below is required for correct Markdown rendering."
< details > < summary >
2023-06-20 00:10:40 -07:00
2024-01-12 14:36:04 -08:00
#### General instructions for installing dependencies
< / summary >
2020-12-08 16:22:42 -08:00
2021-03-22 19:05:01 -07:00
1. Install [`cargo` and `rustc` ](https://www.rust-lang.org/tools/install ).
2023-03-08 03:49:06 -08:00
2020-12-08 16:22:42 -08:00
2. Install Zebra's build dependencies:
2020-12-07 21:41:49 -08:00
2023-03-08 03:49:06 -08:00
- **libclang** is a library that might have different names depending on your
package manager. Typical names are `libclang` , `libclang-dev` , `llvm` , or
`llvm-dev` .
- **clang** or another C++ compiler: `g++` (all platforms) or `Xcode` (macOS).
2024-02-23 08:49:53 -08:00
- **[`protoc`](https://grpc.io/docs/protoc-installation/)**
> [!NOTE]
> Zebra uses the `--experimental_allow_proto3_optional` flag with `protoc`
> during compilation. This flag was introduced in [Protocol Buffers
> v3.12.0](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0)
> released in May 16, 2020, so make sure you're not using a version of `protoc`
> older than 3.12.
2023-03-08 03:49:06 -08:00
< / details >
2024-01-12 14:36:04 -08:00
[//]: # "The empty line in the `summary` tag below is required for correct Markdown rendering."
< details > < summary >
2023-06-20 00:10:40 -07:00
2024-01-12 14:36:04 -08:00
#### Dependencies on Arch
< / summary >
2023-03-08 03:49:06 -08:00
```sh
2024-02-23 08:49:53 -08:00
sudo pacman -S rust clang protobuf
2023-03-08 03:49:06 -08:00
```
Note that the package `clang` includes `libclang` as well as the C++ compiler.
< / details >
2023-06-20 00:10:40 -07:00
Once the dependencies are in place, you can build and install Zebra:
2023-03-08 03:49:06 -08:00
```sh
2023-06-20 00:10:40 -07:00
cargo install --locked zebrad
2023-03-08 03:49:06 -08:00
```
You can start Zebra by
```sh
zebrad start
```
2024-06-28 17:11:06 -07:00
Refer to the [Installing Zebra ](https://zebra.zfnd.org/user/install.html ) and
[Running Zebra ](https://zebra.zfnd.org/user/run.html ) sections in the book for
enabling optional features, detailed configuration and further details.
2023-03-01 03:20:19 -08:00
2024-01-12 14:36:04 -08:00
## Documentation
2020-12-07 21:41:49 -08:00
2024-01-12 14:36:04 -08:00
The Zcash Foundation maintains the following resources documenting Zebra:
2021-11-02 02:59:13 -07:00
2024-01-12 14:36:04 -08:00
- The Zebra Book:
- [General Introduction ](https://zebra.zfnd.org/index.html ),
- [User Documentation ](https://zebra.zfnd.org/user.html ),
- [Developer Documentation ](https://zebra.zfnd.org/dev.html ).
2020-12-07 21:41:49 -08:00
2024-01-17 03:43:43 -08:00
- The [documentation of the public
APIs](https://docs.rs/zebrad/latest/zebrad/#zebra-crates) for the latest
releases of the individual Zebra crates.
2023-11-01 15:09:40 -07:00
2024-01-17 03:43:43 -08:00
- The [documentation of the internal APIs ](https://doc-internal.zebra.zfnd.org )
for the `main` branch of the whole Zebra monorepo.
2020-12-07 21:41:49 -08:00
2023-06-08 16:42:32 -07:00
## User support
For bug reports please [open a bug report ticket in the Zebra repository ](https://github.com/ZcashFoundation/zebra/issues/new?assignees=&labels=C-bug%2C+S-needs-triage&projects=&template=bug_report.yml&title=%5BUser+reported+bug%5D%3A+ ).
2024-06-28 17:11:06 -07:00
Alternatively by chat, [Join the Zcash Foundation Discord
Server](https://discord.com/invite/aRgNRVwsM8) and find the #zebra -support
channel.
We maintain a list of known issues in the
[Troubleshooting ](https://zebra.zfnd.org/user/troubleshooting.html ) section of
the book.
2023-06-08 16:42:32 -07:00
2021-01-31 16:59:30 -08:00
## Security
2021-02-15 17:34:49 -08:00
Zebra has a [responsible disclosure policy ](https://github.com/ZcashFoundation/zebra/blob/main/SECURITY.md ), which we encourage security researchers to follow.
2021-01-31 16:59:30 -08:00
2019-11-14 11:17:58 -08:00
## License
2019-11-14 11:22:23 -08:00
Zebra is distributed under the terms of both the MIT license
2019-11-14 11:17:58 -08:00
and the Apache License (Version 2.0).
See [LICENSE-APACHE ](LICENSE-APACHE ) and [LICENSE-MIT ](LICENSE-MIT ).
2023-07-02 16:08:40 -07:00
Some Zebra crates are distributed under the [MIT license only ](LICENSE-MIT ),
because some of their code was originally from MIT-licensed projects.
See each crate's directory for details.