NOTE - the steps in this guide are currently deemed experimental pending security enhancements that will be introduced prior to becoming production grade. At this time, please only use this guide for experimentation or non-production use.
In this guide we will create an Akash Validator as a deployment. The Tendermint Key Management System (TMKMS) will be used so that we do not store the validator’s private key on the validator server itself.
The Validator deployment will take advantage of statesync for rapid blockchain synchronization.
Sections in this guide:
- Validator Topology
- Obtain Private Key
- Akash Validator Deployment
- TMKMS Setup
- Start and Verify the TMKMS Service
Validator Topology
In this guide we create a Validator within an Akash Deployment.
The topology of the environment will be as follows:
- Akash Validator as a deployment and as created in the Akash Validator Deployment section of this guide
- Tendermint Key Managment System (TMKMS) used for storage of the Validators private key on a secured server. The TMKMS instance - configured in the TMKMS Setup section of this guide - may be created on any secure server of your choosing. The TMKMS server must have connectivity to the Akash Validator.
Obtain Private Key
In the TMKMS Setup section of this guide we will import the Validators private key.
If you have a pre-existing Akash Validator the private key from this instance may be used.
If this is a new Akash Validator - create an Akash validator instance for the purpose of private key generation, capture the private key, and then shut down the validator.
Example Validator Private Key Retrieval
- Display contents of key file on the validator
- Example Output
Akash Validator Deployment
Akash Console
- Within this guide we will use the Akash Console application to create the Akash Validator
- Please review our Akash Console docs to install and configuration the application if this is your first time using
Create the Akash Validator Deployment
- Use the steps that follow - within Akash Console - to create your Akash Validator deployment
Create New Deployment
- Use the
CREATE DEPLOYMENT
button to launch a new deployment
Empty Template Option
- Select the
Empty
option as we will be copying a pre-constructed Akash SDL for the deployment
Copy SDL into Editor
- Copy the following Akash SDL into the Editor pane
- Reference the Populated Editor section for further clarity
- Select the
CREATE DEPLOYMENT
button to proceed
Populated Editor
Deployment Deposit
- An escrow account is created for the deployment that is deducted from by the provider for the cost of the workload over time
- By default 0.5 AKT is specified as the initial escrow deposit
- If a deployment’s escrow runs out of funds (0 AKT), the lease will be closed by the provider. Consider increasing the initial deposit to an amount that will be enough to fund the deployment for some time. And/or consider a strategy to ensure the escrow is re-funded on a periodic basis to ensure no disruption to your validator.
- When ready select
DEPOSIT
to proceed andAPPROVE
any Transaction/gas fee prompts that follow
Select Akash Provider
- A list of Akash Providers that have bid on your deployment is displayed
- Choose the desired Provider from the list and then select
ACCEPT BID
to proceed
Deployment Logs
- The
LOGS
pane for the new Deployment will display - NOTE - after a period of time the logs will display a
Back-off restarting failed container
message. This is expected as the container will not start until it has established a connection with the TMKMS server in subsequent steps. - Select the
LEASES
tab to proceed into the next step
Capture Deployment URI and Port
- In upcoming TMKMS configuration sections we will need to specify our Akash Validator deployment’s URI and port
- Capture this info from the
LEASES
tab for later use - In the example the following values would be captured (these values will be different for your deployment):
- URI - using the Provider field -
provider.mainnet-1.ca.aksh.pw
- Port - using the Forwarded Port field -
31237
- URI - using the Provider field -
TMKMS Setup
Prepare TMKMS Dependencies (Ubuntu Instructions)
- All steps in this section should be performed on the TMKMS server unless otherwise noted
Rust Install
GCC
Libusb
Setup TMKMS
- All steps in this section should be performed on the TMKMS server unless otherwise noted
Compiling TMKMS from Source Code
Copy Validator Private Key into TMKMS Config File
- Create the
priv_validator_key.json
file
- Copy/paste the validator private key into the
priv_validator_key.json
file
Import the Private Validator Key into TMKMS
Delete Private Key File on the Validator
- Conduct this step on the Akash Validator machine
- Securely delete the priv_validator_key.json from your validator node and store it safely offline in case of an emergency. The
priv_validator_key
will be what TMKMS will use to sign for your validator. - Return to the TMKMS server after this step to complete subsequent steps in this section
Modify tmkms.toml
- Begin by deleting the existing
tmkms.toml
file and re-creating anew
- Copy the following configuration into the new
tmkms.toml
file - Updating this file with your Akash validator URI - in the
addr
field - is the only edit that should be necessary - The Akash validator URI was revealed and captured in the Akash Validator Deployment section of this guide
- Refer to the example for further clarification
Example tmkms.toml File
Start and Verify the TMKMS Service
All steps in this section should be performed on the TMKMS server unless otherwise noted
Start the TMKMS Service
Initial Log Messages
- The following connection error messages will initially display after the TMKMS service start
- Wait approximately 5-10 minutes for the connection to establish and at which time these error messages should cease
Log Messages Indicating Successful TMKMS Connection
- Eventually the following TMKMS log messages should display indicating successful connection between the TMKMS server and the Akash validator
Active Validator Set Log Messages
- If the Akash validator is part of the active set the following singed block messages should be seen in the TMKMS logs