Skip to content

Commit e1ae9cd

Browse files
committed
Docs: update with password
1 parent 603753c commit e1ae9cd

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

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

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,32 @@ using the Makefile target. This method requires building from source.
8585
```
8686

8787
This will create a new key pair and save the private key to
88-
`openmina-workdir/producer-key`.
88+
`openmina-workdir/producer-key` and the public key to
89+
`openmina-workdir/producer-key.pub`. The command will fail if keys already
90+
exist to prevent accidental overwriting.
91+
92+
To generate keys with a password:
93+
94+
```bash
95+
make generate-block-producer-key MINA_PRIVKEY_PASS="YourPassword"
96+
```
97+
98+
To generate keys with a custom filename:
99+
100+
```bash
101+
make generate-block-producer-key PRODUCER_KEY_FILENAME=./path/to/custom-key
102+
```
103+
104+
This will create `./path/to/custom-key` (private) and
105+
`./path/to/custom-key.pub` (public).
106+
107+
You can combine both options:
108+
109+
```bash
110+
make generate-block-producer-key \
111+
PRODUCER_KEY_FILENAME=./path/to/custom-key \
112+
MINA_PRIVKEY_PASS="YourPassword"
113+
```
89114

90115
**Option B: Use an existing key**
91116

@@ -99,34 +124,32 @@ using the Makefile target. This method requires building from source.
99124
For devnet (default):
100125

101126
```bash
102-
make run-block-producer-devnet COINBASE_RECEIVER="YourWalletAddress" \
103-
MINA_PRIVKEY_PASS="YourPassword"
104-
```
105-
106-
Or explicitly specify devnet:
107-
108-
```bash
109-
make run-block-producer NETWORK=devnet COINBASE_RECEIVER="YourWalletAddress" \
110-
MINA_PRIVKEY_PASS="YourPassword"
127+
make run-block-producer \
128+
MINA_PRIVKEY_PASS="YourPassword" \
129+
NETWORK=devnet \
130+
COINBASE_RECEIVER="YourWalletAddress"
111131
```
112132

113133
For mainnet (when supported):
114134

115135
```bash
116-
make run-block-producer-mainnet COINBASE_RECEIVER="YourWalletAddress" \
117-
MINA_PRIVKEY_PASS="YourPassword"
136+
make run-block-producer \
137+
COINBASE_RECEIVER="YourWalletAddress" \
138+
MINA_PRIVKEY_PASS="YourPassword" \
139+
NETWORK=mainnet
118140
```
119141

120142
Optional parameters:
121143
- `OPENMINA_LIBP2P_EXTERNAL_IP` - Sets external IP address
122144
- `OPENMINA_LIBP2P_PORT` - Sets libp2p communication port
123-
- `PRODUCER_KEY` - Path to producer key (default:
145+
- `PRODUCER_KEY_FILENAME` - Path to producer key (default:
124146
`./openmina-workdir/producer-key`)
125147

126148
Example with all options:
127149

128150
```bash
129-
make run-block-producer-devnet \
151+
make run-block-producer \
152+
NETWORK=devnet \
130153
COINBASE_RECEIVER="YourWalletAddress" \
131154
MINA_PRIVKEY_PASS="YourPassword" \
132155
OPENMINA_LIBP2P_EXTERNAL_IP="1.2.3.4" \

0 commit comments

Comments
 (0)