Session Keys | How to tell which node has the session keys for your validator.

STKD.io
1 min readNov 19, 2023

--

First, we will find the next public key associated with our validator. If you have recently changed your session keys then this may not be accurate. Next, we will check a node to see if the private key in the keystore corresponds to the public key for the validator.

Finding a node's next public key:

The output at the bottom is what we are looking for, this will list out each of the different keys. We will then ssh into our node and ask if it has any of these keys. We can do with this a curl command, you will just need to update the params. It will need a public key from above and the type of key it is.

curl http://127.0.0.1:9944 -H "Content-Type:application/json;charset=utf-8" -d   '{
"jsonrpc":"2.0",
"id":1,
"method":"author_hasKey",
"params": ["0x783134a08ea27221e873043cd0ee52a9f79c2eb14d5cd25afed24d7c82cb2246", "babe"]
}'

This will return a result either true or false, this lets us know if the node has the private keys:

{"jsonrpc":"2.0","result":true,"id":1}
{"jsonrpc":"2.0","result":false,"id":1}

More information on session keys:

https://docs.substrate.io/deploy/keys-and-network-operations/

Our Validators if you would like to nominate or tip:

Polkdot: 12pdN2XsNmG2yPAv5QCkq7YYUg1MM3prvGMgusH7S6FnDHAx

Kusama: Fq4YmiAq76DntjMKKjMiL98MYszoApUa9idSErvyzfdGoqG

Kusama: CpeX8UMVWUNJp5JrW7juUjfTtVhQENDApbAUKZ5AtQ36YmW

--

--

No responses yet