Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(docs): Update 'Design Overview' page of Zebra book #5892

Merged
merged 5 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ command = "mdbook-mermaid"

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
additional-css = ["theme/css/custom.css"]
arya2 marked this conversation as resolved.
Show resolved Hide resolved
174 changes: 174 additions & 0 deletions book/src/dev/diagrams/service-dependencies.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 43 additions & 2 deletions book/src/dev/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Design Overview

This document sketches the future design for Zebra.
This document sketches the design for Zebra.

## Desiderata

Expand Down Expand Up @@ -34,6 +34,46 @@ The following are general desiderata for Zebra:
lightweight applications like light wallets. Those applications
should use a light client protocol.

## Notable Blog Posts
- [A New Network Stack For Zcash](https://www.zfnd.org/blog/a-new-network-stack-for-zcash)
- [Composable Futures-based Batch Verification](https://www.zfnd.org/blog/futures-batch-verification)
- [Decoding Bitcoin Messages with Tokio Codecs](https://www.zfnd.org/blog/decoding-bitcoin-messages-with-tokio-codecs)

## Service Dependencies

Note: dotted lines are for "getblocktemplate-rpcs" feature

<div id="service-dep-diagram">
{{#include diagrams/service-dependencies.svg}}
</div>

<!--
Service dependencies diagram source:

digraph services {
transaction_verifier -> state
mempool -> state
inbound -> state
rpc_server -> state
mempool -> transaction_verifier
chain_verifier -> checkpoint_verifier
inbound -> mempool
rpc_server -> mempool
inbound -> chain_verifier
syncer -> chain_verifier
rpc_server -> chain_verifier [style=dotted]
syncer -> peer_set
mempool -> peer_set
block_verifier -> state
checkpoint_verifier -> state
block_verifier -> transaction_verifier
chain_verifier -> block_verifier
rpc_server -> inbound [style=invis] // for layout of the diagram
}

Render here: https://dreampuf.github.io/GraphvizOnline
-->

## Architecture

Unlike `zcashd`, which originated as a Bitcoin Core fork and inherited its
Expand Down Expand Up @@ -278,7 +318,8 @@ verify blocks or transactions, and add them to the relevant state.
#### Internal Dependencies

- `zebra-chain` for data structure definitions
arya2 marked this conversation as resolved.
Show resolved Hide resolved
- `zebra-network` possibly? for definitions of network messages?
- `zebra-node-services` for shared request type definitions
- `zebra-utils` for developer and power user tools

#### Responsible for

Expand Down
4 changes: 2 additions & 2 deletions book/src/dev/rfcs/0001-pipelinable-block-lookup.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- Feature Name: Pipelinable Block Syncing and Lookup
- Start Date: 2020-07-02
- Design PR: [rust-lang/rfcs#0000](https://github.com/rust-lang/rfcs/pull/0000)
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)
- Design PR: [ZcashFoundation/zebra#583](https://github.com/ZcashFoundation/zebra/pull/583)
- Zebra Issue: [ZcashFoundation/zebra#504](https://github.com/ZcashFoundation/zebra/issues/504)

# Summary
arya2 marked this conversation as resolved.
Show resolved Hide resolved
[summary]: #summary
Expand Down
15 changes: 15 additions & 0 deletions book/theme/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#service-dep-diagram {
display: block;
margin: 0px auto;
}

#service-dep-diagram a:hover {
text-decoration: none;
opacity: 0.65;
}

html.navy #service-dep-diagram,
html.ayu #service-dep-diagram,
html.coal #service-dep-diagram {
filter: invert(1);
}