Skip to main content

Artela

Installation

tip

You should update the MONIKER, WALLET, and PORT variables in the Setting up environment variables section. Make sure the port you specify is not already in use.

Check for ports already in use by visually inspecting the output of the lsof -i -P -n | grep LISTEN command. Almost all Cosmos chain nodes use ports xx317, xx656, xx657, and xx090. Therefore, avoid using ports starting with xx if they are already occupied.

Update OS

sudo apt update && sudo apt upgrade -y

Installation of required packages

sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip jq -y

Installation of go (if you need)

cd ~
VER="1.22.2" # Make sure that this version does not broke any other apps you run!
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin

Setting up environment variables

echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="NGSolutionsWASHERE"" >> $HOME/.bash_profile
echo "export ARTELA_CHAIN_ID="artela_11822-1"" >> $HOME/.bash_profile
echo "export ARTELA_PORT="30"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Downloading and installing node

## Following line deletes all the files under the ~/artela directory.
## Please make sure that you have backed up everything you need
cd $HOME
rm -rf artela
git clone https://github.com/artela-network/artela
cd artela
git checkout v0.4.7-rc6
make install

Initializing the node

artelad init $MONIKER
artelad config set client chain-id $ARTELA_CHAIN_
artelad config set client node tcp://localhost:${ARTELA_PORT}657
sed -i -e "s|^node *=.*|node = \"tcp://localhost:${ARTELA_PORT}657\"|" $HOME/.artelad/config/client.toml

Downloading genesis and addressbook

cd $HOME
curl https://artela.rpc.ngsolutions.xyz/genesis? | jq ".result.genesis" > .artelad/config/genesis.json
wget -O $HOME/.artelad/config/addrbook.json https://snapshots.ngsolutions.xyz/addrbook/artela/addrbook.json

Setting seeds and peers

SEEDS="8d0c626443a970034dc12df960ae1b1012ccd96a@artela-testnet-seed.itrocket.net:30656"
PEERS="5c9b1bc492aad27a0197a6d3ea3ec9296504e6fd@artela-testnet-peer.itrocket.net:30656,e690c863b9ab16419ab47a984cbff297f25d7243@188.40.66.173:27856,de0fd5a013eb9d6d6a84efc70ce6c62ff8b28a68@167.86.74.91:25656,d4ed29b7305acebbd4d9b09b8c0a1b282c40eeee@207.180.239.208:25656,b1d5c4ce939bbeb80aaf25c8b1ed57b32a49a0e2@178.18.253.187:45656,ae4fb7acf86b46fe294f9e3c75739483a0edd30d@82.208.22.83:3456,c1857b8cda3be58baa56fd682f1e60d91fbc3bb4@109.199.105.124:25656,f5ce236d045e28d0e78411afed684b79860ac1d6@95.216.102.121:30656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.artelad/config/config.toml

Setting custom ports

Updating ports in app.toml

sed -i.bak -e "s%:1317%:${ARTELA_PORT}317%g;
s%:8080%:${ARTELA_PORT}080%g;
s%:9090%:${ARTELA_PORT}090%g;
s%:9091%:${ARTELA_PORT}091%g;
s%:8545%:${ARTELA_PORT}545%g;
s%:8546%:${ARTELA_PORT}546%g;
s%:6065%:${ARTELA_PORT}065%g" $HOME/.artelad/config/app.toml

Updating ports in config.toml

sed -i.bak -e "s%:26658%:${ARTELA_PORT}658%g;
s%:26657%:${ARTELA_PORT}657%g;
s%:6060%:${ARTELA_PORT}060%g;
s%:26656%:${ARTELA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${ARTELA_PORT}656\"%;
s%:26660%:${ARTELA_PORT}660%g" $HOME/.artelad/config/config.toml

Configuring pruning settings

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.artelad/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.artelad/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" $HOME/.artelad/config/app.toml
# Followgin command disables indexing, if you dont know what it means, just disable. However, if you need to hos an explorer, you might need it.

Setting gas and other configurations

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.025art"|g' $HOME/.artelad/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.artelad/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.artelad/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.artelad/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.artelad/config/config.toml

Creating service file

sudo tee /etc/systemd/system/artelad.service > /dev/null <<EOF
[Unit]
Description=Warden Protocol Node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.artelad
ExecStart=$(which artelad) start --home $HOME/.artelad
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

Snapshot

info

Unfortunately, snapshot is not available right now! We are working on it.

Enabling and starting the service.

# You need to inspect logs visually after the  to make sure that it is working
sudo systemctl daemon-reload
sudo systemctl enable artelad
sudo systemctl restart artelad && sudo journalctl -u artelad -f

Creating a wallet

You need to create or import a wallet to request test tokens. If you dont have any tokens, you will not be able to create a validator.

# Following command creates a new wallet.
# Copy mnemonics to a safe place
# If you lost your mnemonics you will not be able to recover this wallet.
artelad keys add $WALLET

# If you want to import a wallet using mnemonics, execute following command and enter your mnemonics
artelad keys add $WALLET --recover

# Get your keys and their addresses to request faucet
artelad keys list

Creating a validator

Before you begin:

It's crucial to ensure your node is synchronized with the network before attempting to create a validator. This ensures your validator operates with the latest blockchain data.

Checking Synchronization Status:

Use the following snippet to check your node's synchronization status. If the snippet returns false, your node is in sync and ready to proceed. However, if it returns true, your node is still catching up. In that case, please wait until the synchronization completes before creating a validator.

artelad status | jq -r .sync_info.catching_up

Creating a Validator:

The following snippet will create a validator.json file in your node's home directory. This file stores the details necessary to create your validator. While you can edit the validator.json file later, keep in mind that doing so may incur token fees. Therefore, it's important to ensure the information within the file is accurate before proceeding.

cd $HOME
# Create validator.json file
echo "{
\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(artelad comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
\"amount\": \"1000000uart\",
\"moniker\": \"NGSolutionsWasHere\",
\"identity\": \"\",
\"website\": \"\",
\"security\": \"\",
\"details\": \"All heil NGSolutions\",
\"commission-rate\": \"0.1\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}" > .artelad/validator.json

Next Steps:

Once you're satisfied with the contents of validator.json, you can proceed with creating the validator using the information stored within the file.

# Create a validator using the JSON configuration
artelad tx mstaking create-validator validator.json \
--from $WALLET \
--chain-id $ARTELA_CHAIN_ID \
--fees 500uart

Delegate to yourself

You might need to update number of tokens before executing the following command.

artelad tx staking delegate \
$(artelad keys show $WALLET --bech val -a) 2000000art \
--from $WALLET \
--chain-id $ARTELA_CHAIN_ID \
--fees=500uart

Deleting the node completely (if you need)

danger

Make sure that you backed up any required files to setup later! Do not lost your validator or wallet!

sudo systemctl stop artelad
sudo systemctl disable artelad
sudo rm -rf /etc/systemd/system/artelad.service
sudo rm $(which artelad)
sudo rm -rf $HOME/.artelad
sed -i "/ARTELA_/d" $HOME/.bash_profile