Skip to content

Commit 99f3d72

Browse files
authored
Merge pull request #839 from openmina/guides
docs: Added Block Producer Guide, Cleaned up other guides
2 parents 05024fc + bcf202a commit 99f3d72

File tree

5 files changed

+161
-165
lines changed

5 files changed

+161
-165
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# The Open Mina Node
32

43
## With the Rust-based Open Mina node, you can produce, validate and apply blocks
@@ -7,15 +6,17 @@
76

87
## Run the Block Producer
98

10-
Once you have completed the [pre-requisites](https://github.com/openmina/openmina/blob/main/docs/producer-demo.md#prerequisites) for your operating system, follow these steps:
9+
Once you have completed the [pre-requisites](./docs/docker-installation.md) for your operating system, follow these steps:
1110

1211
### Setup Option 1: Download Docker Compose Files from the Release
1312

1413
1. **Download the Docker Compose files:**
14+
1515
- Go to the [Releases page](https://github.com/openmina/openmina/releases) of this repository.
1616
- Download the latest `openmina-vX.Y.Z-docker-compose.zip` (or `.tar.gz`) file corresponding to the release version (available since v0.8.0).
1717

1818
2. **Extract the files:**
19+
1920
- Unzip or untar the downloaded file:
2021
```bash
2122
unzip openmina-vX.Y.Z-docker-compose.zip
@@ -34,6 +35,7 @@ Once you have completed the [pre-requisites](https://github.com/openmina/openmin
3435
### Setup Option 2: Clone the Repository
3536

3637
1. **Clone this repository:**
38+
3739
```bash
3840
git clone https://github.com/openmina/openmina.git
3941
```
@@ -46,9 +48,10 @@ Once you have completed the [pre-requisites](https://github.com/openmina/openmin
4648
### Launch
4749

4850
**Run the following command to start the demo:**
49-
```bash
50-
docker compose -f docker-compose.local.producers.yml up --pull always --force-recreate
51-
```
51+
52+
```bash
53+
docker compose -f docker-compose.local.producers.yml up --pull always --force-recreate
54+
```
5255

5356
And finally:
5457

@@ -66,18 +69,16 @@ In the design of the Open Mina node, we are utilizing much of the same logic as
6669

6770
## Overview of the Node’s current functionalities
6871

69-
70-
| Current functionalities | In Development | Future Plans |
71-
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
72-
| ☑ **Produce and prove blocks** (with and without transactions). | ☐ Receiving and broadcasting transactions from/into the transaction pool. | ☐ Direct transfer of MINA funds using Webnode |
73-
| ☑ **Produce SNARK proofs** for transactions. | ☐ A block replayer that uses data from the archive nodes| ☐ O1JS support for Webnode.|
74-
| ☑ **Connect to the network** and sync up to the best tip block | | |
75-
| ☑ **Validate and apply new blocks** and transactions to update consensus and ledger state. | | |
76-
| ☑ **Broadcast messages**: blocks, SNARK pool | | |
72+
| Current functionalities | In Development | Future Plans |
73+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | --------------------------------------------------- |
74+
| ☑ **Produce and prove blocks** (with and without transactions). | ☐ Receiving and broadcasting transactions from/into the transaction pool. | ☐ Direct transfer of MINA funds using Webnode |
75+
| ☑ **Produce SNARK proofs** for transactions. | ☐ A block replayer that uses data from the archive nodes | ☐ O1JS support for Webnode. |
76+
| ☑ **Connect to the network** and sync up to the best tip block | | |
77+
| ☑ **Validate and apply new blocks** and transactions to update consensus and ledger state. | | |
78+
| ☑ **Broadcast messages**: blocks, SNARK pool | | |
7779

7880
Please note that receiving and broadcasting transactions from/into the transaction pool is already possible, but is still an early alpha version and needs more work.
7981

80-
8182
## Updates to the Front End
8283

8384
We've added two new pages to the node's front end:
@@ -86,21 +87,19 @@ We've added two new pages to the node's front end:
8687

8788
![image](https://github.com/user-attachments/assets/a66b993d-5a9f-42a7-a946-f19f6e18e6ab)
8889

89-
9090
Shows a list of the transactions from the pool and a side panel detail.
9191

9292
### Benchmarks
9393

9494
![image](https://github.com/user-attachments/assets/5aa9f0b8-2f53-4c2e-8b60-ed2ccaa7335b)
9595

9696
The benchmarks page helps us to send transactions. The transactions are signed in the front end by the Mina signer.
97-
Every user can send transactions and they can see in the mempool whether the transactions were sent by their node.
97+
Every user can send transactions and they can see in the mempool whether the transactions were sent by their node.
9898

9999
## Launch the block producer demo
100100

101101
Run the Open Mina block producer node by following this [guide](https://github.com/openmina/openmina/blob/main/docs/producer-demo.md).
102102

103-
104103
## How to launch the node (with Docker compose):
105104

106105
From the directory containing the Docker Compose files (either the root of the cloned repository or the directory where the released Docker Compose files were extracted):
@@ -113,7 +112,6 @@ Then visit http://localhost:8070 in your browser.
113112
114113
![image](https://github.com/user-attachments/assets/b8e10a12-ec96-44a9-951a-ef0c1b291428)
115114
116-
117115
By default, `docker compose up` will use the latest node and frontend images available (tagged with `latest`), but specific versions can be selected by using the `OPENMINA_TAG` and `OPENMINA_FRONTEND_TAG` variables.
118116
119117
## How to launch the node (without Docker compose):
@@ -133,7 +131,7 @@ Ubuntu or Debian-based Linux distribution with the following packages installed:
133131
134132
Example (debian-based):
135133
136-
``` sh
134+
```sh
137135
# Either using "sudo" or as the "root" user
138136
sudo apt install curl git libssl-dev pkg-config protobuf-compiler build-essential
139137
```
@@ -146,7 +144,7 @@ If you have not yet installed homebrew:
146144
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
147145
```
148146

149-
``` sh
147+
```sh
150148
brew install curl git openssl pkg-config protobuf gcc make
151149
```
152150

@@ -175,33 +173,40 @@ cargo run --release -p cli node
175173
### 1. Node.js v20.11.1
176174

177175
#### MacOS
176+
178177
```bash
179178
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
180179
brew install [email protected]
181180
```
182181

183182
#### Linux
183+
184184
```bash
185185
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
186186
source ~/.bashrc
187187
nvm install 20.11.1
188188
```
189189

190190
#### Windows
191+
191192
Download [Node.js v20.11.1](https://nodejs.org/) from the official website, open the installer and follow the prompts to complete the installation.
192193

193194
### 2. Angular CLI v16.2.0
195+
194196
```bash
195197
npm install -g @angular/[email protected]
196198
```
197199

198200
### 3. Installation
201+
199202
Open a terminal and navigate to this project's root directory
200203

201204
```bash
202205
cd PROJECT_LOCATION/openmina/frontend
203206
```
207+
204208
Install the dependencies
209+
205210
```bash
206211
npm install
207212
```
@@ -226,10 +231,8 @@ npm start
226231
- [cli/](cli) - OpenMina cli.
227232
- [frontend/](frontend) - OpenMina frontend.
228233

229-
230234
[Details regarding architecture](ARCHITECTURE.md)
231235

232-
233236
## The Open Mina Documentation
234237

235238
- [Why we are developing Open Mina](docs/why-openmina.md)
@@ -255,12 +258,9 @@ npm start
255258
- [Medium](https://medium.com/openmina)
256259
- [Twitter](https://twitter.com/viable_systems)
257260

258-
259261
[changelog]: ./CHANGELOG.md
260262
[changelog-badge]: https://img.shields.io/badge/changelog-Changelog-%23E05735
261-
262263
[release-badge]: https://img.shields.io/github/v/release/openmina/openmina
263264
[release-link]: https://github.com/openmina/openmina/releases/latest
264-
265265
[Apache licensed]: https://img.shields.io/badge/license-Apache_2.0-blue.svg
266-
[Apache link]: https://github.com/openmina/openmina/blob/master/LICENSE
266+
[Apache link]: https://github.com/openmina/openmina/blob/master/LICENSE

docs/alpha-testing-guide.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,57 @@ This guide will walk you through running the **Alpha Rust Node** on Devnet using
44

55
## 1. Prerequisites
66

7-
Ensure you have **Docker** installed. For installation instructions specific to your operating system, follow the steps outlined in the **Producer Demo Launch Guide**:
7+
Ensure you have **Docker** installed:
88

9-
- [Docker Installation Guide for Linux, macOS, and Windows](https://github.com/openmina/openmina/blob/main/docs/producer-demo.md#prerequisites)
9+
- [Docker Installation Guide for Linux, macOS, and Windows](./docker-installation.md)
1010

1111
## 2. Download & Start the Node
1212

1313
1. **Download the Latest Release**:
14+
1415
- Visit the [Open Mina Releases](https://github.com/openmina/openmina/releases).
1516
- Download the latest `openmina-vX.Y.Z-docker-compose.zip`.
1617

1718
2. **Extract the Files**:
19+
1820
```bash
1921
unzip openmina-vX.Y.Z-docker-compose.zip
2022
cd openmina-vX.Y.Z-docker-compose
2123
```
2224

2325
3. **Start the Node on Devnet and Save Logs**:
2426
Start the node and save the logs for later analysis:
27+
2528
```bash
2629
docker compose up --pull always && docker compose logs > openmina-node.log
2730
```
2831

2932
4. **Access the Dashboard**:
3033
Open `http://localhost:8070` in your browser.
31-
32-
The dashboard will show the syncing process in real time.
34+
35+
The dashboard will show the syncing process in real time.
3336
<img width="1417" alt="image" src="https://github.com/user-attachments/assets/d9a5f5b3-522f-479b-9829-37402c63bb98">
34-
35-
>**1. Connecting to Peers:** The node connects to peers. You’ll see the number of connected, connecting, and disconnected peers grow.
37+
38+
> **1. Connecting to Peers:** The node connects to peers. You’ll see the number of connected, connecting, and disconnected peers grow.
3639
>
37-
>**2. Fetching Ledgers:** The node downloads key data: Staking ledger, Next epoch ledger, and Snarked ledger. Progress bars show the download status.
40+
> **2. Fetching Ledgers:** The node downloads key data: Staking ledger, Next epoch ledger, and Snarked ledger. Progress bars show the download status.
3841
>
39-
>**3. Fetching & Applying Blocks:** The node downloads recent blocks to match the network’s current state. The dashboard tracks how many blocks are fetched and applied.
42+
> **3. Fetching & Applying Blocks:** The node downloads recent blocks to match the network’s current state. The dashboard tracks how many blocks are fetched and applied.
4043
4144
## 3. Monitoring and troubleshooting
4245

4346
### Inspecting Saved Logs
47+
4448
If you’ve saved logs to a file, you can use tail or similar tools to view them:
4549

4650
```bash
4751
tail -f openmina-node.log
4852
```
4953

5054
### Restart the Node:
55+
5156
If the node becomes unresponsive or fails to start, restart the setup:
57+
5258
```bash
5359
docker compose down
5460
docker compose up --pull always

docs/block-producer-guide.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Rust Node Block Production Testing on Devnet
2+
3+
This guide is intended for setting up block producer nodes on **Mina Devnet** only.
4+
Do not use this guide for Mina Mainnet until necessary security audits are complete.
5+
6+
---
7+
8+
## Prerequisites
9+
10+
Ensure Docker and Docker Compose are installed on your system - [Docker Installation Guide](./docker-installation.md)
11+
12+
## Download & Start the Node
13+
14+
1. **Download the Latest Release**
15+
16+
- Visit the [Open Mina Releases](https://github.com/openmina/openmina/releases)
17+
- Download the latest `openmina-vX.Y.Z-docker-compose.zip`
18+
- Extract the Files:
19+
20+
```bash
21+
unzip openmina-vX.Y.Z-docker-compose.zip
22+
cd openmina-vX.Y.Z-docker-compose
23+
mkdir openmina-workdir
24+
```
25+
26+
2. **Prepare Your Keys**
27+
28+
[Docker Compose](../docker-compose.block-producer.yml) references `openmina-workdir`. It stores a private key and logs for block production.
29+
Place your block producer's private key into the `openmina-workdir` directory and name it `producer-key`:
30+
31+
```bash
32+
cp /path/to/your/private_key openmina-workdir/producer-key
33+
```
34+
35+
Replace `/path/to/your/private_key` with the actual path to your private key file.
36+
37+
3. **Launch Block Producer**
38+
39+
Use `MINA_PRIVKEY_PASS` to set the private key password. Optionally, use `COINBASE_RECEIVER` to set a different coinbase receiver:
40+
41+
```bash
42+
env COINBASE_RECEIVER="YourWalletAddress" MINA_PRIVKEY_PASS="YourPassword" \
43+
docker compose -f docker-compose.block-producer.yml up -d --pull always
44+
```
45+
46+
4. **Go to Dashboard**
47+
48+
Visit [http://localhost:8070](http://localhost:8070) to [monitor sync](http://localhost:8070/dashboard) and [block production](http://localhost:8070/block-production).
49+
50+
### Access Logs
51+
52+
Logs are stored in `openmina-workdir` with filenames like `openmina.log.2024-10-14`, `openmina.log.2024-10-15`, etc.
53+
54+
### Provide Feedback
55+
56+
Collect logs from `openmina-workdir` and report issues on the [rust-node-testing](https://discord.com/channels/484437221055922177/1290662938734231552) discord channel. Include reproduction steps if possible.

docs/docker-installation.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Docker Installation Guide
2+
3+
## Installation for
4+
5+
- [Debian-based Linux](#docker-installation-on-debian-based-linux)
6+
- [Windows](#docker-installation-on-windows)
7+
- [macOS](#docker-installation-on-macos)
8+
9+
## Docker Installation on Debian-based Linux
10+
11+
1. Set up Docker's apt repository:
12+
13+
```bash
14+
# Add Docker's official GPG key:
15+
sudo apt-get update
16+
sudo apt-get install ca-certificates curl
17+
sudo install -m 0755 -d /etc/apt/keyrings
18+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
19+
sudo chmod a+r /etc/apt/keyrings/docker.asc
20+
21+
# Add the repository to Apt sources:
22+
echo \
23+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
24+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
25+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
26+
sudo apt-get update
27+
```
28+
29+
2. Install the Docker packages:
30+
31+
```bash
32+
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
33+
```
34+
35+
3. Add your user to the `docker` group:
36+
37+
```bash
38+
sudo usermod -aG docker $USER
39+
newgrp docker
40+
```
41+
42+
4. Verify the installation:
43+
44+
```bash
45+
docker run hello-world
46+
```
47+
48+
---
49+
50+
## Docker Installation on Windows
51+
52+
1. Download and Install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/).
53+
54+
2. Ensure Docker Desktop is running (check the system tray icon).
55+
56+
---
57+
58+
### Docker Installation on macOS
59+
60+
1. Download and Install [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop/).
61+
2. Verify the installation in Terminal:
62+
63+
```bash
64+
docker --version
65+
```

0 commit comments

Comments
 (0)