@@ -85,7 +85,32 @@ using the Makefile target. This method requires building from source.
85
85
```
86
86
87
87
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
+ ```
89
114
90
115
** Option B: Use an existing key**
91
116
@@ -99,34 +124,32 @@ using the Makefile target. This method requires building from source.
99
124
For devnet (default):
100
125
101
126
``` 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"
111
131
```
112
132
113
133
For mainnet (when supported):
114
134
115
135
``` 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
118
140
```
119
141
120
142
Optional parameters:
121
143
- ` OPENMINA_LIBP2P_EXTERNAL_IP ` - Sets external IP address
122
144
- ` OPENMINA_LIBP2P_PORT ` - Sets libp2p communication port
123
- - ` PRODUCER_KEY ` - Path to producer key (default:
145
+ - ` PRODUCER_KEY_FILENAME ` - Path to producer key (default:
124
146
` ./openmina-workdir/producer-key ` )
125
147
126
148
Example with all options:
127
149
128
150
``` bash
129
- make run-block-producer-devnet \
151
+ make run-block-producer \
152
+ NETWORK=devnet \
130
153
COINBASE_RECEIVER=" YourWalletAddress" \
131
154
MINA_PRIVKEY_PASS=" YourPassword" \
132
155
OPENMINA_LIBP2P_EXTERNAL_IP=" 1.2.3.4" \
0 commit comments