This tutorial provides the necessary instructions to join the alfama testnet. versión v0.2.0.
Hardware recommendations
We recommend running public testnet nodes on machines with at least 8 cores, 32GB of RAM and 300GB of disk space. But with in the current phase, the nodes can run on significantly fewer resources.
You can do the same editing $HOME/.warden/config/client.toml file:
# This is a TOML config file.# For more information, see https://github.com/toml-lang/toml################################################################################## Client Configuration ################################################################################### The network chain IDchain-id="alfama"# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory)keyring-backend="file"# CLI output format (text|json)output="text"# <host>:<port> to CometBFT RPC interface for this chainnode="tcp://localhost:26657"# Transaction broadcasting mode (sync|async)broadcast-mode="sync"
The chain-id should be ‘alfama’, keyring-backend indicates where we will store the keys; we change its value to ‘file’ to store them in a file. The default port for the RPC interface is 26657, although we can customize it if we want.
We open the port if it’s not already open:
sudoufwallow26657
In some providers like IONOS, you also need to open the firewall on the VPS page.
Init the app:
wardendinit<custom_moniker>
Replace <custom_moniker> with the customized name you will assign to your node.
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH# output should be similar to:# 70694 68694 6AF4938885598EA10C0BD493D267EF363B067101B6F81D1210B27EBE0B32FA2A
Start the node
Now we can launch the node so that the process remains running even after we disconnect from the server, you can use screen or you can use SystemD,:
Using screen
screen# After running the node, we can exit the screen by pressing "CTRL+d + a"# To re-enter: "screen -r"
You can now start the node using the following command:
#Create service [Service]User=$USERWorkingDirectory=$HOME/wardenprotocolExecStart=$(whichwardend) startRestart=on-failureRestartSec=3LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF
#Make sure the file has the appropriate root permissions:chmod777wardend.service
# Reload Servicesudosystemctldaemon-reload# Enable Servicesudosystemctlenablewardend# Disable Servicesudosystemctldisablewardend# Start Servicesudosystemctlstartwardend# Stop Servicesudosystemctlstopwardend# Restart Servicesudosystemctlrestartwardend# Check Service Statussudosystemctlstatuswardend# Check Service Logssudojournalctl-uwardend-f-ocat
Once launched it will connect to persistent peers provided and start downloading blocks. You can check the logs to see the progress.
We have to wait for the node to synth, which we can verify by checking the node’s status:
First, either create a new key pair, or restore an existing wallet for your validator. Replace <wallet-name> with a wallet name of your choice:
# Create a new keypairwardendkeysadd<wallet-name># Alternatively, restore an existing wallet with a mnemonic seed phrase.# wardend keys add <wallet-name> --recover
A wallet file will be created at $HOME/.warden/<wallet-name>.info containing the keys.
Once the wallet is created or imported, we can check our public address using the command:
wardendkeysshow<wallet-name>-a
After creating a new key, you will see it’s information and its seed phrase. It’s essential to write down this seed phrase and keep it in a safe place. The seed phrase is the only way to restore your keys. Losing it can result in the irrecoverable loss of WARD tokens.
Get testnet WARD
In the next steps, you register your new validator by submitting a create-validator transaction.
Because submitting a transaction consumes gas, you need to fund your newly created address from the first step beforehand.
You can obtain testnet tokens to fund your address from our WARD faucet:
Then, create a file named $HOME/.warden/config/validator.json with the following content:
{ "pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},"amount":"1000000uward","moniker":"your-node-moniker","identity":"eqlab testnet validator","website":"optional website for your validator","security":"optional security contact for your validator","details":"optional details for your validator","commission-rate":"0.1","commission-max-rate":"0.2","commission-max-change-rate":"0.01","min-self-delegation":"1"}
“moniker” is the <custom_moniker> we set for our node
for “identity” use your Keybase code to obtain an avatar
Here you have the chance to set your validator’s commission rate, maximum rate, and maximum change rate. But also the initial self delegation (amount). Remember to replace the pubkey field with your own key obtained in the previous step.
Finally, we’re ready to submit the transaction to create the validator:
When you specify commission parameters, the commission-max-change-rate is measured as a percentage point change of the commission-rate. For example a change from 1% to 2% is a 100% rate increase, but the commission-max-change-rate is measured as 1%.
The above transaction is just an example. If you want to see an explanation of the parameters values or see all the available flags that can be set to customize your validators you can enter this command:
wardendtxstakingcreate-validator-help
For example, if later on we want to change any of the parameters, we can do so:
There are certain files you need to backup to be able to restore your validator if, for some reason, it’s damaged or lost. Please make a secure, encrypted backup of the following files:
#Be sure you have backuped "priv_validator_key.json" and wallet mnemonic before updating#go to Home directorycd $HOME#download zip filewgethttps://github.com/warden-protocol/wardenprotocol/releases/download/v0.2.0/wardend_Linux_x86_64.zip#unzip repositoryunzipwardend_Linux_x86_64.zip#delete the zip filerm-rfwardend_Linux_x86_64.zip#give exec permisionchmod+xwardend#move wardend to main directorymvwardend $(whichwardend)#check the version is correctwardendversion--long|grep-ecommit-eversion#commit: 4d37e5aa6eb2a0ee288baf3afbfec0c8b8e2551d#version: 0.2.0#restart and see the logssudosystemctlrestartwardend&&sudojournalctl-uwardend-f-ocat#consensuscurl-shttp://localhost:26657/consensus_state|jq'.result.round_state.height_vote_set[0].prevotes_bit_array'
Others
#find wardend version:wardendversion#find where your wardend binary is:whichwardend