You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run-block-producer-devnet: ## Run a block producer node on devnet
333
-
$(MAKE) run-block-producer NETWORK=devnet
334
-
335
-
.PHONY: run-block-producer-mainnet
336
-
run-block-producer-mainnet: ## Run a block producer node on mainnet
337
-
$(MAKE) run-block-producer NETWORK=mainnet
338
332
339
333
.PHONY: generate-block-producer-key
340
-
generate-block-producer-key: build-release ## Generate a new block producer key pair
334
+
generate-block-producer-key: build-release ## Generate a new block producer key pair (fails if keys exist, use PRODUCER_KEY_FILENAME to customize, MINA_PRIVKEY_PASS for password)
335
+
@if [ -f"$(PRODUCER_KEY_FILENAME)" ];then\
336
+
echo"Error: Producer key already exists at $(PRODUCER_KEY_FILENAME)";\
337
+
echo"";\
338
+
echo"To generate a key with a different filename, set PRODUCER_KEY_FILENAME:";\
339
+
echo" make generate-block-producer-key PRODUCER_KEY_FILENAME=./path/to/new-key";\
340
+
echo"";\
341
+
echo"Or remove the existing key first to regenerate it.";\
342
+
exit 1;\
343
+
fi
341
344
@mkdir -p openmina-workdir
342
-
@echo "Generating new block producer key pair..."
343
-
@OUTPUT=$$(cargo run --release --package=cli --bin openmina -- misc mina-key-pair);\
0 commit comments