|
1 | 1 | # Rust Node Block Producer Quick Start Guide |
2 | 2 |
|
3 | | ---- |
| 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. |
4 | 5 |
|
5 | | -## Prerequisites |
6 | 6 |
|
7 | | -Ensure Docker and Docker Compose are installed on your system. |
| 7 | +--- |
8 | 8 |
|
9 | | -- **Docker Installation Guide**: [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/) |
| 9 | +### 0. Prerequisites |
10 | 10 |
|
11 | | -## 1. Setup Work Directory |
12 | | -Create the main directory and a subdirectory to store your node's keys and logs: |
| 11 | +Ensure Docker and Docker Compose are installed on your system - [Docker Installation Guide](https://docs.docker.com/get-docker/) |
13 | 12 |
|
14 | | - ```bash |
15 | | - mkdir -p ~/mina-node/openmina-workdir cd ~/mina-node |
| 13 | +### 1. Setup Directories |
| 14 | +Create the main directory and a subdirectory `openmina-workdir`. [Docker Compose](https://github.com/openmina/openmina/blob/main/docker-compose.block-producer.yml) references `openmina-workdir`. It stores a private key and logs for block production. |
16 | 15 |
|
17 | | - ``` |
| 16 | +```bash |
| 17 | +mkdir -p ~/mina-node/openmina-workdir cd ~/mina-node |
| 18 | +``` |
18 | 19 |
|
19 | | ---- |
20 | | - |
21 | | -## 2. Prepare Your Keys |
| 20 | +### 2. Prepare Your Keys |
22 | 21 | Place your block producer's private key into the `openmina-workdir` directory and name it `producer-key`: |
23 | 22 |
|
24 | | - ```bash |
25 | | - cp /path/to/your/private_key producer-key |
26 | | - ``` |
| 23 | +```bash |
| 24 | +cp /path/to/your/private_key producer-key |
| 25 | +``` |
27 | 26 | Replace `/path/to/your/private_key` with the actual path to your private key file. |
28 | 27 |
|
29 | | ---- |
30 | | - |
31 | | - |
32 | | -## 3. Launch Block Producer |
| 28 | +### 3. Launch Block Producer |
33 | 29 | Download the Docker Compose file: |
34 | 30 |
|
35 | | - ```bash |
36 | | - curl -O https://raw.githubusercontent.com/openmina/openmina/main/docker-compose.block-producer.yml |
37 | | - ``` |
38 | | - |
39 | | -Launch the block producer with parameters `MINA_PRIVKEY_PASS` to specify the password for the private key, and optional `COINBASE_RECEIVER` to make the coinbase receiver an account other than the producer key: |
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 | | - |
47 | | -## 4. Access Dashboard |
48 | | - |
49 | | -Visit [http://localhost:8070](http://localhost:8070) to [monitor sync](localhost:8070/dashboard) and [block production](http://localhost:8070/block-production). |
50 | | - |
51 | | ---- |
52 | | - |
53 | | -## 5. Logs & Node Management |
| 31 | +```bash |
| 32 | +curl -O https://raw.githubusercontent.com/openmina/openmina/main/docker-compose.block-producer.yml |
| 33 | +``` |
54 | 34 |
|
55 | | -Logs are stored in `openmina-workdir`. |
| 35 | +Launch the block producer with MINA_PRIVKEY_PASS to set the private key password. Optionally, use COINBASE_RECEIVER to set a different coinbase receiver: |
56 | 36 |
|
57 | | -To view the logs: |
| 37 | +```bash |
| 38 | +env COINBASE_RECEIVER="YourWalletAddress" MINA_PRIVKEY_PASS="YourPassword" \ |
| 39 | +docker compose -f docker-compose.block-producer.yml up -d --pull always |
| 40 | +``` |
58 | 41 |
|
59 | | - ```bash |
60 | | - docker compose -f docker-compose.block-producer.yml logs -f |
61 | | - ``` |
| 42 | +### 4. Access Dashboard |
62 | 43 |
|
63 | | -Restart the node: |
| 44 | +Visit [http://localhost:8070](http://localhost:8070) to [monitor sync](http://localhost:8070/dashboard) and [block production](http://localhost:8070/block-production). |
64 | 45 |
|
65 | | - ```bash |
66 | | - docker compose down && docker compose up -d --pull always |
67 | | - ``` |
| 46 | +### 5. Logs |
68 | 47 |
|
69 | | -Update the node to the latest version: |
| 48 | +Logs are stored in `openmina-workdir` with filenames like openmina.log.2024-10-14, openmina.log.2024-10-15, etc. |
70 | 49 |
|
71 | | - ```bash |
72 | | - docker compose pull && docker compose up -d |
73 | | - ``` |
| 50 | +### 6. Feedback |
74 | 51 |
|
75 | | ---- |
76 | | - |
77 | | - |
78 | | -## 6. Feedback & Troubleshooting |
| 52 | +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. |
79 | 53 |
|
80 | | -Collect logs from `openmina-workdir` and report issues on the Open Mina Discord channel. Include reproduction steps if possible. |
81 | | - |
82 | | ---- |
0 commit comments