How to: Sifchain Node on Akash

brnsbh
2 min readJun 7, 2021

--

Use the script to install Akash:

wget -q -O sifchain_on_akash.sh https://api.nodes.guru/sifchain_on_akash.sh && chmod +x sifchain_on_akash.sh && sudo /bin/bash sifchain_on_akash.sh

On init enter your wallet name and password, next wait for installation to complete.

In script we use akash test network, so when you have a key you should use faucet for request some tokens.

Now we need to create a certificate, do it with the command:

akash tx cert create client --chain-id $AKASH_CHAIN_ID --keyring-backend os --from $AKASH_WALLET --node $AKASH_NODE --fees 5000uakt -y

Deployment:

akash tx deployment create deploy.yml --from $AKASH_WALLET --node $AKASH_NODE --chain-id $AKASH_CHAIN_ID --fees 5000uakt

To get the statuses of our request we need to save the output from the deploy command to a file, to do this we copy the output of the deploy tx and run the following commands ($DEPLOY_OUTPUT is your tx output):

echo "$DEPLOY_OUTPUT" > akash_deploy.log
export AKASH_DSEQ=`cat akash_deploy.log | jq '.logs[].events[].attributes[] | select(.key=="dseq")' | jq .value | head -n 1 | sed 's/"//g'`
export AKASH_OSEQ=`cat akash_deploy.log | jq '.logs[].events[].attributes[] | select(.key=="oseq")' | jq .value | head -n 1 | sed 's/"//g'`
export AKASH_GSEQ=`cat akash_deploy.log | jq '.logs[].events[].attributes[] | select(.key=="gseq")' | jq .value | head -n 1 | sed 's/"//g'`
echo $AKASH_DSEQ $AKASH_OSEQ $AKASH_GSEQ

Verify Deployment:

akash query deployment get --owner $AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --dseq $AKASH_DSEQ

View Order:

akash query market order get --node $AKASH_NODE --owner $AKASH_ACCOUNT_ADDRESS --dseq $AKASH_DSEQ --oseq $AKASH_OSEQ --gseq $AKASH_GSEQ

View Bids:

akash query market bid list --owner=$AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --dseq $AKASH_DSEQ

Now we need to chooseour provider, so choose bid by selecting a provider from the list above:

export AKASH_PROVIDER=$SELECTED_PROVIDER

Create Lease:

akash tx market lease create --chain-id $AKASH_CHAIN_ID --node $AKASH_NODE --owner $AKASH_ACCOUNT_ADDRESS --dseq $AKASH_DSEQ -gseq $AKASH_GSEQ -oseq $AKASH_OSEQ --provider $AKASH_PROVIDER --from WALLET --fees 5000uakt

List Leases:

akash query market lease list --owner $AKASH_ACCOUNT_ADDRESS --node $AKASH_NODE --dseq $AKASH_DSEQ

Upload Manifest (emptry response is ok for this tx):

akash provider send-manifest deploy.yml --node $AKASH_NODE --dseq $AKASH_DSEQ --provider $AKASH_PROVIDER --from $AKASH_WALLET

Check Lease Status:

akash provider lease-status --node $AKASH_NODE --dseq $AKASH_DSEQ --provider $AKASH_PROVIDER --from $AKASH_WALLET

Copy host addresses and external ports from above response (replace $HOST with your chosen host):

export HOST=$HOST

Check logs:

akash provider lease-logs --node $AKASH_NODE --dseq $AKASH_DSEQ --gseq $AKASH_GSEQ --oseq $AKASH_OSEQ --provider $AKASH_PROVIDER --from $AKASH_WALLET

Now you can check your node status by the following command:

curl -s http://${HOST}

Congratz!

--

--