Avail Node - Session Keys
Learn how to generate session keys
Introduction
Note
BEFORE YOU START
This chapter continues from the 'Simple Deployment' page, so be sure to read that one before proceeding with this one.
This chapter continues from the 'Simple Deployment' page, so be sure to read that one before proceeding with this one.
Note
NOTE
Before trying anything, make sure that you fully read the chapter first before doing any actual work.
Before trying anything, make sure that you fully read the chapter first before doing any actual work.
Session Keys
Bare Metal:
# Generate session keys
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
# Restart our Node
sudo systemctl restart avail.serviceDocker/ Podman
# First let's ssh into our container
# Option 1: Docker non-root
sudo docker exec -it $(docker ps -lq) /bin/bash
# Option 2: Podman
podman exec -lit /bin/bash
# Generate the Session keys
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944
# Exit and restart containe
exit
# Option 1: Docker non-root
sudo docker restart $(docker ps -lq)
# Option 2: Podman
podman restart -lNote
NOTE
If you encounter the following error inside the container:
If you encounter the following error inside the container:
bash: curl: command not found, make sure to first install curl inside the container and then retry it.
For Ubuntu, you can run apt install curl -y for root or sudo apt install curl -y for non-root user to have it installedOutput
{
"jsonrpc": "2.0",
"result": "0x0c26b9ba4b8fb5f3051a24663ce491663d8e8e81e8f1450ab23e4edd7d3b4f4c7e5e1047ae1edAb5bde2dad7915629b8aec892c550515ed0b1cb7e056e8a33d16c9c7faba50abd75438d4a2bbdbb6b2c35e09ad480e07ffeb1a2175feda23a3fd475eb0ad21e2f67693a1d6964b81d1454a19dd53256223a178a74cb0df4cc43",
"id": 1
}How is this guide?