Skip to content

Commit 13987c3

Browse files
committed
Website: reorganize and improve node operators sections
1 parent 9915934 commit 13987c3

File tree

5 files changed

+343
-105
lines changed

5 files changed

+343
-105
lines changed

website/docs/developers/docker-images.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,40 @@ docker pull o1labs/mina-rust:2b9e87b2
4646
docker pull o1labs/mina-rust-frontend:2b9e87b2
4747
```
4848

49+
### For Development and Testing
50+
51+
For accessing the latest development features, use the `develop` tag:
52+
53+
<!-- prettier-ignore-start -->
54+
55+
:::warning Unstable Development Version
56+
57+
The `develop` tag points to the latest code from the development branch and may
58+
be unstable. Only use this for development, testing, or accessing the newest
59+
features. For production use, always use version tags.
60+
61+
:::
62+
63+
<!-- prettier-ignore-stop -->
64+
65+
```bash
66+
# Latest development version (unstable)
67+
docker pull o1labs/mina-rust:develop
68+
docker pull o1labs/mina-rust-frontend:develop
69+
```
70+
71+
### Latest Tag
72+
73+
The `latest` tag always corresponds to the latest commit on the main branch,
74+
which represents the current stable release state.
75+
4976
### Automatic Publishing
5077

5178
Images are automatically built and pushed to Docker Hub:
5279

5380
- **On develop branch**: When commits are pushed to `develop`, images are tagged
54-
with the commit hash (8 characters)
81+
with the commit hash (8 characters) and also tagged as `develop` for easy
82+
access to the latest development version
5583
- **On release branches**: When commits are pushed to branches starting with
5684
`release/`, images are tagged with the branch name (e.g., `release/v1.5.0`) -
5785
useful for testing release candidates
@@ -65,6 +93,22 @@ You can find available tags at:
6593
- [o1labs/mina-rust on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust/tags)
6694
- [o1labs/mina-rust-frontend on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust-frontend/tags)
6795

96+
## Quick Start with Docker Compose
97+
98+
The easiest way to get started is using the provided docker-compose
99+
configuration:
100+
101+
```bash
102+
# Clone the repository
103+
git clone https://github.com/o1-labs/mina-rust.git
104+
cd mina-rust
105+
106+
# Start node and frontend
107+
docker-compose up -d
108+
109+
# Access the frontend at http://localhost:8070
110+
```
111+
68112
## Local Development
69113

70114
For local development and testing, you can build images using the Makefile:
Lines changed: 164 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,204 @@
11
# Run Archive Node
22

33
This guide is intended for setting up archive nodes on **Mina Devnet** only. Do
4-
not use this guide for Mina Mainnet
4+
not use this guide for Mina Mainnet until necessary security audits are
5+
complete.
56

6-
## Archive Mode Configuration
7+
---
78

8-
We start archive mode in Mina Rust by setting one of the following flags along
9-
with their associated environment variables:
9+
## Prerequisites
10+
11+
Ensure Docker and Docker Compose are installed on your system -
12+
[Docker Installation Guide](../appendix/docker-installation)
1013

11-
### Archiver Process (`--archive-archiver-process`)
14+
## Download & Start the Archive Node
1215

13-
Stores blocks in a database by receiving them directly from the Mina Rust node
16+
1. **Download the Latest Release**
17+
- Visit the
18+
[Mina Rust Releases](https://github.com/o1-labs/mina-rust/releases)
19+
- Download the latest `mina-rust-vX.Y.Z-docker-compose.zip`
20+
- Extract the Files:
1421

15-
**Required Environment Variables**:
22+
```bash
23+
unzip mina-rust-vX.Y.Z-docker-compose.zip
24+
cd mina-rust-vX.Y.Z-docker-compose
25+
```
1626

17-
- `MINA_ARCHIVE_ADDRESS`: Network address for the archiver service
27+
2. **Launch Archive Node**
28+
29+
The archive node setup includes a PostgreSQL database, the archiver process,
30+
and the Mina Rust node. The archiver process stores blocks in the database by
31+
receiving them from the Mina Rust node.
32+
33+
```bash
34+
docker compose -f docker-compose.archive.devnet.yml up -d --pull always
35+
```
36+
37+
**Configuration Options:**
38+
- `MINA_RUST_TAG` - Docker image tag for the mina-rust node (default:
39+
`latest`)
40+
- `POSTGRES_PASSWORD` - Database password for PostgreSQL
41+
- `PG_PORT` - PostgreSQL port (default: `5432`)
42+
- `PG_DB` - Database name (default: `archive`)
43+
44+
**Examples with different versions:**
45+
46+
```bash
47+
# Use specific version (recommended for production)
48+
env MINA_RUST_TAG="v1.4.2" \
49+
docker compose -f docker-compose.archive.devnet.yml up -d --pull always
50+
51+
# Use development version (latest features, may be unstable)
52+
env MINA_RUST_TAG="develop" \
53+
docker compose -f docker-compose.archive.devnet.yml up -d --pull always
54+
```
55+
56+
3. **Monitor the Archive Node**
57+
58+
The archive node will be accessible at:
59+
- **Archive API**: http://localhost:3086
60+
- **Node API**: http://localhost:3000
61+
62+
## Node Parameters Reference
63+
64+
For a complete list of all available archive node parameters and configuration
65+
options, see the
66+
[Mina Rust API Documentation](https://o1-labs.github.io/mina-rust/api-docs/mina_cli/commands/node/struct.NodeArgs.html).
67+
This includes detailed descriptions of:
68+
69+
- **Archive configuration flags**: `--archive-archiver-process`,
70+
`--archive-local-storage`, `--archive-gcp-storage`, `--archive-aws-storage`
71+
- **Network settings**: `--libp2p-*`, `--network`, `--port`
72+
- **Logging and debugging options**: `--verbosity`, `--log-*`
73+
- **Performance tuning parameters**: Connection limits, timeouts, etc.
74+
- **Security and validation settings**: Key management, validation options
75+
76+
You can also view available parameters by running:
77+
78+
```bash
79+
# View all node subcommand options
80+
mina node --help
81+
82+
# View specific archive-related options
83+
mina node --help | grep -A 10 -B 2 archive
84+
```
85+
86+
The source code documentation can be found in
87+
[`cli/src/commands/node/mod.rs`](https://github.com/o1-labs/mina-rust/blob/develop/cli/src/commands/node/mod.rs)
88+
which contains comprehensive examples and parameter descriptions for all archive
89+
node configurations.
1890

19-
### Local Storage (`--archive-local-storage`)
91+
## Using Make Command
2092

21-
Stores blocks in the local filesystem
93+
As an alternative to Docker Compose, you can run the archive node directly using
94+
the Makefile target. This method requires building from source.
2295

23-
**Required Environment Variables**:
96+
### Prerequisites
2497

25-
- (None)
98+
- Rust toolchain installed
99+
- Git repository cloned and accessible
100+
- PostgreSQL database running and configured
26101

27-
**Optional Environment Variables**:
102+
### Archive Mode Configuration
103+
104+
Mina Rust supports multiple archive modes that can be run simultaneously for
105+
redundancy:
106+
107+
**Archiver Process (`--archive-archiver-process`)**
108+
109+
Stores blocks in a database by receiving them directly from the Mina Rust node.
110+
111+
**Required Environment Variables:**
112+
113+
- `MINA_ARCHIVE_ADDRESS`: Network address for the archiver service
114+
115+
**Local Storage (`--archive-local-storage`)**
116+
117+
Stores blocks in the local filesystem.
118+
119+
**Optional Environment Variables:**
28120

29121
- `MINA_ARCHIVE_LOCAL_STORAGE_PATH`: Custom path for block storage (default:
30-
~/.mina/archive-precomputed)
122+
`~/.mina/archive-precomputed`)
31123

32-
### GCP Storage (`--archive-gcp-storage`)
124+
**GCP Storage (`--archive-gcp-storage`)**
33125

34-
Uploads blocks to a Google Cloud Platform bucket
126+
Uploads blocks to a Google Cloud Platform bucket.
35127

36-
**Required Environment Variables**:
128+
**Required Environment Variables:**
37129

38130
- `GCP_CREDENTIALS_JSON`: Service account credentials JSON
39131
- `GCP_BUCKET_NAME`: Target storage bucket name
40132

41-
### AWS Storage (`--archive-aws-storage`)
133+
**AWS Storage (`--archive-aws-storage`)**
42134

43-
Uploads blocks to an AWS S3 bucket
135+
Uploads blocks to an AWS S3 bucket.
44136

45-
**Required Environment Variables**:
137+
**Required Environment Variables:**
46138

47139
- `AWS_ACCESS_KEY_ID`: IAM user access key
48140
- `AWS_SECRET_ACCESS_KEY`: IAM user secret key
49141
- `AWS_DEFAULT_REGION`: AWS region name
50142
- `AWS_SESSION_TOKEN`: Temporary session token for temporary credentials
51143
- `MINA_AWS_BUCKET_NAME`: Target S3 bucket name
52144

53-
## Redundancy
145+
### Setup and Run
54146

55-
The archive mode is designed to be redundant. We can combine the flags to have
56-
multiple options running simultaneously.
147+
1. **Run Archive Node with Archiver Process**
57148

58-
## Prerequisites
149+
For devnet (default):
59150

60-
Ensure Docker and Docker Compose are installed on your system -
61-
[Docker Installation Guide](../appendix/docker-installation)
151+
```bash
152+
MINA_ARCHIVE_ADDRESS="http://localhost:3086" \
153+
make run-node NETWORK=devnet -- --archive-archiver-process
154+
```
62155

63-
## Docker compose setup (with archiver process)
156+
For mainnet (when supported):
64157

65-
The compose file sets up a PG database, the archiver process and the Mina Rust
66-
node. The archiver process is responsible for storing the blocks in the database
67-
by receiving the blocks from the Mina Rust node.
158+
```bash
159+
MINA_ARCHIVE_ADDRESS="http://localhost:3086" \
160+
make run-node NETWORK=mainnet -- --archive-archiver-process
161+
```
68162

69-
See
70-
[docker-compose.archive.devnet.yml](https://github.com/o1-labs/mina-rust/blob/develop/docker-compose.archive.devnet.yml)
71-
for more details.
163+
2. **Run with Multiple Archive Modes (Redundancy)**
72164

73-
### Starting the setup
165+
You can combine multiple archive modes for redundancy:
74166

75-
```bash
76-
docker compose -f docker-compose.archive.devnet.yml up -d
77-
```
167+
```bash
168+
# Archive to both database and local storage
169+
MINA_ARCHIVE_ADDRESS="http://localhost:3086" \
170+
MINA_ARCHIVE_LOCAL_STORAGE_PATH="/path/to/archive" \
171+
make run-node NETWORK=devnet -- \
172+
--archive-archiver-process \
173+
--archive-local-storage
174+
```
175+
176+
```bash
177+
# Archive to database, local storage, and AWS S3
178+
MINA_ARCHIVE_ADDRESS="http://localhost:3086" \
179+
MINA_ARCHIVE_LOCAL_STORAGE_PATH="/path/to/archive" \
180+
AWS_ACCESS_KEY_ID="your-access-key" \
181+
AWS_SECRET_ACCESS_KEY="your-secret-key" \
182+
AWS_DEFAULT_REGION="us-west-2" \
183+
MINA_AWS_BUCKET_NAME="your-bucket-name" \
184+
make run-node NETWORK=devnet -- \
185+
--archive-archiver-process \
186+
--archive-local-storage \
187+
--archive-aws-storage
188+
```
189+
190+
3. **Monitor the Node**
191+
192+
The node will start and listen on port 3000. You can monitor its status by
193+
checking the console output or connecting a frontend dashboard.
194+
195+
### Access Logs
196+
197+
Logs are stored in the working directory with filenames like
198+
`mina.log.2024-10-14`, `mina.log.2024-10-15`, etc.
199+
200+
### Provide Feedback
201+
202+
Collect logs and report issues on the
203+
[rust-node-testing](https://discord.com/channels/484437221055922177/1290662938734231552)
204+
Discord channel. Include reproduction steps if possible.

website/docs/node-operators/block-producer.md

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,32 @@ Ensure Docker and Docker Compose are installed on your system -
2929

3030
[Docker Compose](https://github.com/o1-labs/mina-rust/blob/develop/docker-compose.block-producer.yml)
3131
references `mina-workdir`. It stores a private key and logs for block
32-
production. Place your block producer's private key into the `mina-workdir`
32+
production.
33+
34+
**Option A: Generate a new key pair (if you don't have one)**
35+
36+
If you don't have a block producer key, you can generate one using the
37+
Makefile target:
38+
39+
```bash
40+
# Clone the repository first if you haven't already
41+
git clone https://github.com/o1-labs/mina-rust.git
42+
cd mina-rust
43+
44+
# Generate a new encrypted key pair
45+
make generate-block-producer-key
46+
47+
# Or generate with a password
48+
make generate-block-producer-key MINA_PRIVKEY_PASS="YourPassword"
49+
```
50+
51+
This will create:
52+
- `mina-workdir/producer-key` (encrypted private key)
53+
- `mina-workdir/producer-key.pub` (public key)
54+
55+
**Option B: Use an existing key**
56+
57+
If you already have a block producer key, place it into the `mina-workdir`
3358
directory and name it `producer-key`:
3459

3560
```bash
@@ -49,20 +74,37 @@ Ensure Docker and Docker Compose are installed on your system -
4974
docker compose -f docker-compose.block-producer.yml up -d --pull always
5075
```
5176

52-
Optional parameters:
77+
**Configuration Options:**
78+
- `MINA_RUST_TAG` - Docker image tag for the mina-rust node (default:
79+
`latest`)
80+
- `MINA_FRONTEND_TAG` - Docker image tag for the frontend (default: `latest`)
81+
- `MINA_LIBP2P_EXTERNAL_IP` - Sets your node's external IP address to help
82+
other nodes find it
83+
- `MINA_LIBP2P_PORT` - Sets the port for Libp2p communication
84+
- `COINBASE_RECEIVER` - Wallet address to receive block rewards
85+
- `MINA_PRIVKEY_PASS` - Password for encrypted private key
5386

54-
`MINA_LIBP2P_EXTERNAL_IP` Sets your node's external IP address to help other
55-
nodes find it.
87+
**Examples with different versions:**
5688

57-
`MINA_LIBP2P_PORT` Sets the port for Libp2p communication.
89+
```bash
90+
# Use specific version (recommended for production)
91+
env MINA_RUST_TAG="v1.4.2" MINA_FRONTEND_TAG="v1.4.2" \
92+
COINBASE_RECEIVER="YourWalletAddress" MINA_PRIVKEY_PASS="YourPassword" \
93+
docker compose -f docker-compose.block-producer.yml up -d --pull always
94+
95+
# Use development version (latest features, may be unstable)
96+
env MINA_RUST_TAG="develop" MINA_FRONTEND_TAG="develop" \
97+
COINBASE_RECEIVER="YourWalletAddress" MINA_PRIVKEY_PASS="YourPassword" \
98+
docker compose -f docker-compose.block-producer.yml up -d --pull always
99+
```
58100

59101
4. **Go to Dashboard**
60102

61103
Visit [http://localhost:8070](http://localhost:8070) to
62104
[monitor sync](http://localhost:8070/dashboard) and
63105
[block production](http://localhost:8070/block-production).
64106

65-
## Alternative: Using Make Command
107+
## Using Make Command
66108

67109
As an alternative to Docker Compose, you can run the block producer directly
68110
using the Makefile target. This method requires building from source.

0 commit comments

Comments
 (0)