diff --git a/geth-poa/entrypoint.sh b/geth-poa/entrypoint.sh index 2b804102c3d1..9b5f7fbc35e8 100644 --- a/geth-poa/entrypoint.sh +++ b/geth-poa/entrypoint.sh @@ -87,8 +87,6 @@ fi if [ "$GETH_NODE_TYPE" = "bootnode" ]; then echo "Starting bootnode" - - # Generate boot.key echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key exec "$GETH_BIN_PATH" \ @@ -130,8 +128,10 @@ if [ "$GETH_NODE_TYPE" = "bootnode" ]; then elif [ "$GETH_NODE_TYPE" = "signer" ]; then echo "Starting signer node" - echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT" - GETH_PORT="${GETH_PORT:-30311}" + echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key + + echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT" + GETH_PORT="${GETH_PORT:-30311}" exec "$GETH_BIN_PATH" \ --verbosity="$GETH_VERBOSITY" \ @@ -157,6 +157,7 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then --miner.etherbase=$BLOCK_SIGNER_ADDRESS \ --allow-insecure-unlock \ --nousb \ + --nodekey $GETH_DATA_DIR/boot.key \ --netrestrict $NET_RESTRICT \ --metrics \ --metrics.addr="$NODE_IP" \ @@ -180,6 +181,7 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then elif [ "$GETH_NODE_TYPE" = "member" ]; then echo "Starting member node" + echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT" GETH_PORT="${GETH_PORT:-30311}" @@ -202,6 +204,7 @@ elif [ "$GETH_NODE_TYPE" = "member" ]; then --bootnodes $BOOTNODE_ENDPOINT \ --networkid=$CHAIN_ID \ --password="$GETH_DATA_DIR"/password \ + --nodekey $GETH_DATA_DIR/boot.key \ --metrics \ --metrics.addr="$NODE_IP" \ --metrics.port=6060 \