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

Documentation: link to Zebra architecture blog posts in zebrad overview for devs in the book #2740

Closed
Tracked by #3096
dconnolly opened this issue Sep 6, 2021 · 8 comments · Fixed by #5892
Closed
Tracked by #3096
Assignees
Labels
A-docs Area: Documentation

Comments

@dconnolly
Copy link
Contributor

dconnolly commented Sep 6, 2021

Motivation

We have a lot of detail in our book about design RFCs and other pages for zebrad, but lack a sort of high-level overview of the design and architecture, its services, how they communicate, etc. A consolidated overview would help new developers understand zebrad it faster.

We can link to some of our existing blog posts (https://www.zfnd.org/blog/a-new-network-stack-for-zcash/) in an overview document, especially as mempool is solidifying and client makes a small addition for the trial note decryption tasks, so the major architecture of zebrad is basically set.

Specifications

https://www.zfnd.org/blog/a-new-network-stack-for-zcash/
https://www.zfnd.org/blog/futures-batch-verification/
https://www.zfnd.org/blog/decoding-bitcoin-messages-with-tokio-codecs/

@dconnolly dconnolly added A-docs Area: Documentation P-Medium labels Sep 6, 2021
@dconnolly
Copy link
Contributor Author

Hey team! Please add your planning poker estimate with ZenHub @conradoplg @jvff @mpguerra @oxarbitrage @upbqdn

@conradoplg
Copy link
Collaborator

Here's a graph (dot file) I generated to help me understand the dependencies between services (this is how it looks like after #2741), and that we could add to the docs. If A points to B that means A is used by B (i.e. B has a reference to A). The dotted lines are circular dependencies which are sent back using channels.

digraph services {
state;
latest_chain_tip;
state -> chain_verifier;
state -> tx_verifier;
mempool;
state -> inbound;
chain_verifier -> inbound;
tx_verifier -> inbound;
mempool -> inbound [style=dotted];
peer_set -> inbound [style=dotted];
address_book -> inbound [style=dotted];
inbound -> peer_set;
latest_chain_tip -> peer_set;
inbound -> address_book;
latest_chain_tip -> address_book;
peer_set -> mempool;
peer_set -> syncer;
state -> syncer;
chain_verifier -> syncer;
peer_set -> sync_status;
state -> sync_status;
chain_verifier -> sync_status;
}

graphviz

Render online

@dconnolly
Copy link
Contributor Author

This

Here's a graph (dot file) I generated to help me understand the dependencies between services (this is how it looks like after #2741), and that we could add to the docs. If A points to B that means A is used by B (i.e. B has a reference to A). The dotted lines are circular dependencies which are sent back using channels.

digraph services {
state;
latest_chain_tip;
state -> chain_verifier;
state -> tx_verifier;
mempool;
state -> inbound;
chain_verifier -> inbound;
tx_verifier -> inbound;
mempool -> inbound [style=dotted];
peer_set -> inbound [style=dotted];
address_book -> inbound [style=dotted];
inbound -> peer_set;
latest_chain_tip -> peer_set;
inbound -> address_book;
latest_chain_tip -> address_book;
peer_set -> mempool;
peer_set -> syncer;
state -> syncer;
chain_verifier -> syncer;
peer_set -> sync_status;
state -> sync_status;
chain_verifier -> sync_status;
}

graphviz

Render online

This is awesome! I wonder if we can do a service dependency diagram at a similar high level automatically derived from the codebase, so that we can keep it up to date automatically and embed the result in our zebra.zfnd.org docs / rust docs

@conradoplg
Copy link
Collaborator

This is awesome! I wonder if we can do a service dependency diagram at a similar high level automatically derived from the codebase, so that we can keep it up to date automatically and embed the result in our zebra.zfnd.org docs / rust docs

I think it's doable with https://crates.io/crates/syn, parsing start.rs, but I'm not sure if it's worth the effort 🤔 Would be cool though 😆

@mpguerra
Copy link
Contributor

Hey team! Please add your planning poker estimate with ZenHub @conradoplg @jvff @mpguerra @oxarbitrage @upbqdn

We should remove anyone who hasn't yet voted and set the final estimate here, I can't do it because I didn't start the vote... :) @dconnolly can you do the honours?

@teor2345 teor2345 added P-Low and removed P-Medium labels Nov 8, 2021
@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2021

I'm wondering if we could just link to the blog posts from the book instead?

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2021

I'd like to do this task after we've made some more decisions about client support, because they will impact dependencies and architecture.

@mpguerra
Copy link
Contributor

mpguerra commented Nov 9, 2021

I'm wondering if we could just link to the blog posts from the book instead?

if we do this we should make sure the existing blog posts are going to be migrated to the new website

@teor2345 teor2345 changed the title Documentation: adapt Zebra architecture blog posts into zebrad overview for devs in the book Documentation: link to Zebra architecture blog posts in zebrad overview for devs in the book Jun 2, 2022
@mpguerra mpguerra moved this to 🆕 New in Zebra Sep 22, 2022
@mpguerra mpguerra added this to Zebra Sep 22, 2022
@arya2 arya2 self-assigned this Dec 22, 2022
@arya2 arya2 closed this as completed Jan 10, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants