# Config File Check

### Check if you are using the correct node.vkey

{% tabs %}
{% tab title="Cold machine" %}

```
cardano-cli stake-pool id --cold-verification-key-file node.vkey
```

{% endtab %}
{% endtabs %}

* The above will return your Pool ID if node.vkey is correct
* If you want to see the Pool ID in BECH32 format, add ”--output-format hex” at the end of the above command

### Check the Kes and Node vkeys inside node.cert

{% tabs %}
{% tab title="Cold machine" %}

```
cardano-cli text-view decode-cbor --in-file node.cert
```

{% endtab %}
{% endtabs %}

* Top bytes show kes.vkey
* Bottom bytes show node.vkey
* The first int is counter, the second int is KES period
* If the above values do not match your config files, then they are probably not the correct files.  Look for the correct files from your backups or recreate the missing files.

### Check if you are using the correct VRF keys

{% tabs %}
{% tab title="Cold machine" %}

```
cardano-cli node key-hash-VRF --verification-key-file vrf.vkey
```

{% endtab %}
{% endtabs %}

* Check if the output of the above command is the same as the VRF Hash found in cardanoscan.io
* If they do not match, you can look for the correct vrf.vkey or recreate the vrf.vkey from the vrf.skey using this command from your block producer:

{% tabs %}
{% tab title="Block producer" %}

```
cardano-cli key verification-key --signing-key-file vrf.skey \
--verification-key-file vrf.vkey
```

{% endtab %}
{% endtabs %}

* Copy the vrf.vkey to your cold machine

### Check if you are using the correct KES keys

{% tabs %}
{% tab title="Block producer" %}

```
cardano-cli key verification-key --signing-key-file kes.skey \
--verification-key-file /dev/stdout
```

{% endtab %}
{% endtabs %}

* The output of the above command should be the same as the contents of kes.vkey except for description which will be blank
* If you have lost kes.vkey, you can recreate kes.vkey by replacing ”/dev/stdout” with ”kes.vkey”

### Check the on-chain version number of node.counter

{% tabs %}
{% tab title="Block producer" %}

```
cardano-cli query protocol-state --mainnet | \
jq ”.csProtocol[0].\”$(cat stakepoolid.txt)\””
```

{% endtab %}
{% endtabs %}

* The above command will output the current on-chain version number of node.counter
* For the above command to work, make sure stakepoolid.txt contains your Pool ID in hex format (Not BECH32 format which has the word ”pool” in front)<br>

> Big thank you to ROOT Pool for sharing the main commands that inspired this section


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blockchainlens.gitbook.io/cardano-spot-check/advanced-checks/config-file-check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
