Building an Akash Validator is simplified via the use of Cosmos Omnibus and as detailed in this guide.
NOTE - using the procedures in this guide the Validator private key will be stored within the associated Akash deployment. Ensure that only known, trusted providers are used for such deployments. Additionally consider storing the private key outside of the deployment through the use of TMKMS which is documented here.
The Akash Validator will be built with the following attributes:
Two Sentry nodes will be created to protect the validator from distributed denial of service (DDOS) attacks
The Akash Validator will sit behind the Sentry nodes and will not be directly exposed to the internet
The Sentry nodes and the Akash Validator will launched on the Akash Network as deployments
This guide will detail the launch of the deployments via the Akash Console tool for ease
While all steps within this guide could be accomplished via the Akash CLI, we will use the Akash Console tool as it has become our most popular deploy tool.
If you have not used Akash Console prior and/or are not overly familiar with the app, please review our Akash Console documentation before getting started with the Validator build steps detailed in subsequent sections.
FileBase Buckets
The Omnibus framework used to build our Akash Validator will store the following info in a S3 bucket for re-use when a deployment is restarted. All data stored will be encrypted.
Validator’s Private Key
Node IDs - more detail on the use of these IDs later in this guide
Bucket Creation
We recommend the use of FileBase S3 buckets for this purpose. If you do not have a FileBase account, create a free account for this use.
Create the following buckets within FileBase for upcoming use in the Validator build.
akashnode1
akashnode2
akashvalidator
Access Keys
Visit the FileBase `Access Keys` menu option and capture the KEY and SECRET for use in subsequent steps.
Akash SDL Review
Akash deployments are created using Stack Definition Language (SDL) files that serve as the recipe for your deployments. In this section we detail the Omnibus SDL used for the Akash Validator deployment.
Akash Validator SDL Template
The SDL template for the Akash Validator build is located in this GitHub repository.
Copy the SDL located in the repository into a local editor for customizations covered in upcoming steps.
Initial SDL Customizations
All SDL edits necessary are environment variable related. Within the SDL, we will only edit values within the services section and env subsections. All other segments of the SDL can be used from the template without need to edit.
Validator Service
The first service listed in the SDL and which requires customization is the validator service
Recommended env variable updates are detailed in the code block below
NOTE - eventually we will need to additionally update the AKASH_UNCONDITIONAL_PEER_IDS variable. But at this point in the process these IDs - which are the IDs of the Sentry nodes - are not known. Based on this we will update this field later.
Update the following env variables with suggested values:
Example/Populated Variables
Sentry Node #1 Service
The second service listed in the SDL that requires customization is for the node1 service.
Recommended env variable updates are detailed in the code block below
NOTE - eventually we will need to additionally update the AKASH_PRIVATE_PEER_IDS and AKASH_UNCONDITIONAL_PEER_IDS variables. But at this point in the process these IDs - which is the ID of the Validator node - is not known. We will update these fields later.
Update the following env variables with suggested values:
Example/Populated Variables
Sentry Node #2 Service
The third and final service list in the SDL that requires customization is for the node2 service.
Recommended env variable updates are detailed in the code block below
NOTE - eventually we will need to additionally update the AKASH_PRIVATE_PEER_IDS and AKASH_UNCONDITIONAL_PEER_IDS variables. But at this point in the process these IDs - which is the ID of the Validator node is not known - and based on this we will update this field later.
Update the following env variables with suggested values:
Example/Populated Variables
Akash Console Initial Deployment
The Akash validator build - using a Sentry architecture - requires that the Validator ID is known by the Sentry nodes. Additionally the Sentry node IDs must be known by the Validator. As these IDs are unknown prior to the build process - and are then stored for re-use in the S3 bucket during the build process - we must create an initial deployment, capture the necessary IDs, close the initial deployments, and launch anew the deployments with the IDs specified.
In this section we will create the initial deployments for ID captures.
Create Deployments via Akash Console
Within the Akash Console app, begin the process of creating a new deployment
Select Empty Template for eventual entry of our custom SDL
Copy and paste the SDL we created and edited prior
Proceed thru steps of accepting necessary gas fees to create the deployment
When prompted select the desired Provider to host the deployment and complete the deployment process
Capture Validator and Sentry Node IDs
Within the Akash Console deployment shell tab - as shown in the depiction below - we can capture the necessary IDs for the eventual, permanent Akash Validator deployment
Select the SHELL tab and select the validator instance from Service drop down
Enter the command akash tendermint show-node-id in the command line entry box on the bottom of the display
Copy the exposed ID for the validator to a text pad for use in a later step
Repeat this same process to collect the IDs of node1 and node2 (same steps as above but change the Service drop down to the nodes)
Close the Deployment
With the necessary IDs now captured, close the current deployment. As mentioned previously - we will use the IDs captured to create a permanent deployment in subsequent steps.
Edit SDL with Known IDs
In this step we will revisit and edit our initial SDL file with the known Validator and Node IDs.
Validator Service Update
Update the following entry in the SDL under the Validator service
AKASH_UNCONDITIONAL_PEER_IDS
Use the node1 and node2 IDs captured in the previous steps as the comma separated values of this variable
Once populated this variable should appear as below in the greater section (example IDs shown and should be your own)
Node Service Update
Update the following entries in the SDL under the node1 and node2 services
AKASH_PRIVATE_PEER_IDS
AKASH_UNCONDITIONAL_PEER_IDS
Use the validator ID captured in the previous steps as the comma separated values of this variable
Once populated these variables should appear as below in the greater section (example ID shown and should be your own)
Only node1 example shown. Identical updates should be made to the node2 service as well.
Redeploy Validator and Sentries with Akash Console
Within Akash Console using the identical steps covered in the initial Validator deployment but use the updated SDL within IDs populated
Validator Verifications
Confirm Your Validator is Running
Ensure Validator Sync
Ensure that the field `catching_up` is false and that the latest block corresponds to the current block of the blockchain
Execute this verification on both the sentry and validator nodes
Example Output when Validator is in Sync
Confirm Validator’s Staking Status
Template
Example
Example Output
Status will display as `BOND_STATUS_UNBONDED` after initial build
Active Set Confirmation
Your validator is active if the following command returns anything
NOTE - this command will only display output of your validator is in the active set