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

docs: mdbook guide #726

Open
wants to merge 24 commits into
base: next
Choose a base branch
from
Open

docs: mdbook guide #726

wants to merge 24 commits into from

Conversation

Mirko-von-Leipzig
Copy link
Contributor

This PR adds an mdbook doc guide for node operators and developers.

I've been staring at this for a bit too long; I think I've developed blind spots. Happy with any feedback.

Note: this includes a mermaid.js diagram - I'm not sure its that nice, there are maybe better formats to choose instead.

Closes #244

Copy link
Contributor

@phklive phklive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see that, few changes in structure but overall LGTM.

@phklive phklive requested a review from bobbinth March 4, 2025 15:38
@Mirko-von-Leipzig
Copy link
Contributor Author

I've updated the PR with some minor changes.

As discussed offline I'll leave this targeting next and open a new PR for main for the current v0.7 docs.

Copy link
Contributor Author

@Mirko-von-Leipzig Mirko-von-Leipzig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned offline, I think we need a clearer picture of which docs we want where before we merge this.

Comment on lines 55 to 56
# Only run deployment on push to main/next branches, not on PRs
if: github.event_name == 'push' || github.event_name == 'workflow_run'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means pushes to main and next will overwrite each other. Probably we would want this to only happen on next so that they're always the latest dev docs.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you! I left some comments inline - most are pretty minor.

Once this is ready to merge, I'll create a Github page for the mdBook (similar to how we have it in the miden-vm repo) and then we'll need to update the main readme to link to this book.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in some other similar reviews, I'd probably remove this file for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the above comment, I'd probably get rid of this check for now.

Comment on lines +12 to +40
```mermaid
---
title: Infrastructure architecture example
---
graph LR;

subgraph RPC
direction RL
rpc_a[RPC A]
rpc_b[RPC B]
rpc_i[......]
rpc_n[RPC N]
end

subgraph internal
direction TB
store
block-producer
end

load_balancer[Load Balancer]

load_balancer ---> RPC

RPC -- tx ---> block-producer
RPC -- query --> store

block-producer -- block --> store
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a simple Excalidraw diagram (like we have in the readme) may be better here (we'd have more control of what to show and how). I've attached the source code for the diagrams I have.

node design.excalidraw.zip

Comment on lines +62 to +65
The block-producer is responsible for aggregating received transactions into blocks and submitting them to the store.

Transactions are placed in a mempool and are periodically sampled to form batches of transactions. These batches are
proved, and then periodically aggregated into a block. This block is then proved and committed to the store.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was written before we merged the relevant PRs, but I'd also mention how proving works (e.g., that batch and block proving can be done via remote provers).

@@ -0,0 +1,85 @@
# Installation

We provide Debian packages for official releases for both the node software as well as a basic faucet implementation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mentioning of the faucet comes out a bit "out of the blue". We should probably have a small section somewhere explaining what the faucet is and why it is needed.

Comment on lines +14 to +19
## Architecture

The store consists mainly of a gRPC server which answers requests from the RPC and block-producer components, as well as
new block submissions from the block-producer.

A lightweight background process performs database query optimisation by analysing database queries and statistics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR, but I would maybe add more info about how the store works - e.g., that we have accounts, notes, and nullifiers; that Merkle data structures are currently always in memory (and are re-built on node startup).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would mention somewhere in this file that batches/blocks can be proven by remote provers.

Comment on lines +11 to +19
- [Developer](./developer/index.md)
- [Contributing](./developer/contributing.md)
- [Navigating the codebase](./developer/codebase.md)
- [Monitoring](./developer/monitoring.md)
- [Components](./developer/components.md)
- [RPC](./developer/rpc.md)
- [Store](./developer/store.md)
- [Block producer](./developer/block-producer.md)
- [Common issues other oddities](./developer/oddities.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this section needs to go into the unified docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: as mentioned in some other PRs, I would probably name this EXPORTED.md.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the reviews in parallel PRs in other repos: I'd probably simplify this file to only keep the deploy job and make this job similar to what we currently have in miden-vm (unless there is a good reason to deviate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants