@@ -148,6 +148,46 @@ docker run --detach \
148
148
ghcr.io/blinklabs-io/cardano-node run
149
149
```
150
150
151
+ ##### Dynamic Block Forging
152
+
153
+ To start a block producer in non-producing mode initially (for dynamic block forging):
154
+
155
+ ``` bash
156
+ docker run --detach \
157
+ --name cardano-node \
158
+ --restart unless-stopped \
159
+ -e CARDANO_BLOCK_PRODUCER=true \
160
+ -e START_AS_NON_PRODUCING=true \
161
+ -e CARDANO_SHELLEY_KES_KEY=/opt/cardano/config/keys/kes.skey \
162
+ -e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/opt/cardano/config/keys/node.cert \
163
+ -e CARDANO_SHELLEY_VRF_KEY=/opt/cardano/config/keys/vrf.skey \
164
+ -v /src/cardano/node-keys:/opt/cardano/config/keys \
165
+ -v /srv/cardano/node-db:/data/db \
166
+ -v /srv/cardano/node-ipc:/ipc \
167
+ -p 3001:3001 \
168
+ -p 12798:12798 \
169
+ ghcr.io/blinklabs-io/cardano-node run
170
+ ```
171
+
172
+ With dynamic block forging enabled, you can control block production without restarting the node:
173
+
174
+ - ** Enable block forging** : Ensure credential files are present and send SIGHUP
175
+ ``` bash
176
+ docker exec cardano-node pkill -SIGHUP cardano-node
177
+ ```
178
+
179
+ - ** Disable block forging** : Move/rename credential files and send SIGHUP
180
+ ``` bash
181
+ docker exec cardano-node mv /opt/cardano/config/keys/kes.skey /opt/cardano/config/keys/kes.skey.disabled
182
+ docker exec cardano-node pkill -SIGHUP cardano-node
183
+ ```
184
+
185
+ - ** Re-enable block forging** : Restore credential files and send SIGHUP
186
+ ``` bash
187
+ docker exec cardano-node mv /opt/cardano/config/keys/kes.skey.disabled /opt/cardano/config/keys/kes.skey
188
+ docker exec cardano-node pkill -SIGHUP cardano-node
189
+ ```
190
+
151
191
The above uses Docker's built in supervisor to restart a container which fails
152
192
for any reason. This will also cause the container to automatically restart
153
193
after a host reboot, so long as Docker is configured to start on boot. We
@@ -224,7 +264,12 @@ and operational certificate.
224
264
` ${CARDANO_CONFIG_BASE}/keys/vrf.skey ` )
225
265
- ` CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE `
226
266
- Stake pool identity certificate (default:
227
- ` ${CARDANO_CONFIG_BASE}/keys/node.cert `
267
+ ` ${CARDANO_CONFIG_BASE}/keys/node.cert ` )
268
+ - ` START_AS_NON_PRODUCING `
269
+ - Start block producer node in non-producing mode (default: ` false ` )
270
+ - When set to ` true ` , adds the ` --start-as-non-producing-node ` flag
271
+ - Only applies when ` CARDANO_BLOCK_PRODUCER=true `
272
+ - Enables dynamic block forging control via SIGHUP signals
228
273
229
274
#### Controlling Mithril snapshots
230
275
0 commit comments