49aa41544d
Closes #697. per https://github.com/ZcashFoundation/zebra/issues/697#issuecomment-662742971 The response to a getblocks message is an inv message with the hashes of the following blocks. However, inv messages are also sent unsolicited to gossip new blocks across the network. Normally, this wouldn't be a problem, because for every other request we filter only for the messages that are relevant to us. But because the response to a getblocks message is an inv, the network layer doesn't (and can't) distinguish between the response inv and the unsolicited inv. But there is a mitigation we can do. In our sync algorithm we have two phases: (1) "ObtainTips" to get a set of tips to chase down, (2) repeatedly call "ExtendTips" to extend those as far as possible. The unsolicited inv messages have length 1, but when extending tips we expect to get more than one hash. So we could reject responses in ExtendTips that have length 1 in order to ignore these messages. This way we automatically ignore gossip messages during initial block sync (while we're extending a tip) but we don't ignore length-1 responses while trying to obtain tips (while querying the network for new tips). |
||
---|---|---|
.github | ||
book | ||
tower-batch | ||
tower-fallback | ||
zebra-chain | ||
zebra-client | ||
zebra-consensus | ||
zebra-network | ||
zebra-rpc | ||
zebra-script | ||
zebra-state | ||
zebra-test | ||
zebra-utils | ||
zebrad | ||
.firebaserc | ||
.gitignore | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
clippy.toml | ||
cloudbuild.yaml | ||
codecov.yml | ||
firebase.json | ||
prometheus.yaml |
README.md
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.
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.