Go to file
Jane Lusby 8c178c3ee4
fix panic in seed subcommand (#401)
Co-authored-by: Jane Lusby <jane@zfnd.org>

Prior to this change, the seed subcommand would consistently encounter a panic in one of the background tasks, but would continue running after the panic. This is indicative of two bugs. 

First, zebrad was not configured to treat panics as non recoverable and instead defaulted to the tokio defaults, which are to catch panics in tasks and return them via the join handle if available, or to print them if the join handle has been discarded. This is likely a poor fit for zebrad as an application, we do not need to maximize uptime or minimize the extent of an outage should one of our tasks / services start encountering panics. Ignoring a panic increases our risk of observing invalid state, causing all sorts of wild and bad bugs. To deal with this we've switched the default panic behavior from `unwind` to `abort`. This makes panics fail immediately and take down the entire application, regardless of where they occur, which is consistent with our treatment of misbehaving connections.

The second bug is the panic itself. This was triggered by a duplicate entry in the initial_peers set. To fix this we've switched the storage for the peers from a `Vec` to a `HashSet`, which has similar properties but guarantees uniqueness of its keys.
2020-05-27 17:40:12 -07:00
.github/workflows Try new unstable Clippy action, update PR job logic 2020-05-15 23:46:21 -04:00
design Update zebra-network Monodraw diagram. 2019-10-24 15:06:02 -07:00
zebra-chain fix last warnings 2020-05-27 15:42:29 -04:00
zebra-client Add Zebra logo to all workspace crates. 2020-02-26 21:25:35 -08:00
zebra-consensus Add Zebra logo to all workspace crates. 2020-02-26 21:25:35 -08:00
zebra-network fix panic in seed subcommand (#401) 2020-05-27 17:40:12 -07:00
zebra-rpc Add Zebra logo to all workspace crates. 2020-02-26 21:25:35 -08:00
zebra-script Correct block version parsing. 2020-03-18 21:34:02 -04:00
zebra-storage Add Zebra logo to all workspace crates. 2020-02-26 21:25:35 -08:00
zebrad fix panic in seed subcommand (#401) 2020-05-27 17:40:12 -07:00
.firebaserc Try building internal docs. 2020-02-10 18:12:43 -08:00
.gitignore Update .gitignore 2020-02-04 18:04:53 -05:00
.rustfmt.toml Tracing endpoint (#3) 2019-09-09 13:05:42 -07:00
Cargo.lock Upgrade sha2 to 0.8.2 release 2020-05-23 21:32:37 -04:00
Cargo.toml fix panic in seed subcommand (#401) 2020-05-27 17:40:12 -07:00
Dockerfile Try debian:buster-slim instead of alpine 2020-01-30 13:39:13 -05:00
LICENSE-APACHE Add copyright marks on each license 2019-11-14 11:50:49 -08:00
LICENSE-MIT Add copyright marks on each license 2019-11-14 11:50:49 -08:00
README.md Add link to CI workflows on main 2020-04-22 03:19:33 -04:00
clippy.toml Apply clippy fixes 2020-02-05 12:42:32 -08:00
cloudbuild.yaml 0.17.0 has an old version cached, rolling back to 0.15.0 2020-02-04 04:44:38 -05:00
codecov.yml Tweak coverage job (#364) 2020-04-21 04:51:05 -04:00
firebase.json Configure redirect for firebase hosting 2020-01-16 18:38:16 -05:00
prometheus.yaml Tell Prometheus to scrape more aggressively 2020-02-14 20:14:05 -05:00

README.md

Zebra logotype


codecov License

Hello! I am Zebra, an ongoing Rust implementation of a Zcash node.

Zebra is a work in progress. It is developed as a collection of zebra-* libraries implementing the different components of a Zcash node (networking, chain structures, consensus rules, etc), and a zebrad binary which uses them.

Most of our work so far has gone into zebra-network, building a new networking stack for Zcash, and zebra-chain, building foundational data structures.

Rendered docs from the main branch.

Join us on Discord.

License

Zebra is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT.

Metrics

Notes on local metrics collection:

# create a storage volume for grafana (once)
sudo docker volume create grafana-storage
# create a storage volume for prometheus (once)
sudo docker volume create prometheus-storage

# run prometheus with the included config
sudo docker run --network host -v prometheus-storage:/prometheus -v /path/to/zebra/prometheus.yaml:/etc/prometheus/prometheus.yml  prom/prometheus

# run grafana
sudo docker run -d --network host -e GF_SERVER_HTTP_PORT=3030 -v grafana-storage:/var/lib/grafana grafana/grafana

Now the grafana dashboard is available at http://localhost:3030 ; the default password is admin/admin.