Skip to content

Latest commit

 

History

History
186 lines (120 loc) · 5.67 KB

join.md

File metadata and controls

186 lines (120 loc) · 5.67 KB

Joining Althea L1 Mainnet

Setting up your validator

Please see the validator system setup for recommended machine specs

Althea L1 mainnet dress rehersal testnet has already launched, so this guide is for joining the already active testnet. The first setup is to setup the CLI

Download Althea L1

If you have a system architecture other than x86_64 Linux you will need to grab the source code and build your own binary. But the vast majority of users should be able to download the release below.

NOTE: v1.4.0 does not sync past block 271, so use v1.3.0 if starting from genesis with a new validator until

wget https://github.com/AltheaFoundation/althea-L1/releases/download/v1.3.0/althea-linux-amd64
chmod +x althea-linux-amd64
sudo mv althea-linux-amd64 /usr/sbin/althea

Generate priv_validator_key.json

The output of this command will generate priv_validator_key.json, which generates a different output each time it is ran even if the same input is provided. If you lose this file you will not be able to regenerate it and you will have to start a new validator. The default save location for this file will be ~/.althea/config/priv_validator_key.json

althea init mymoniker --chain-id althea_258432-1

Download the genesis file

The genesis file represents the current state of the blockchain and allows your node to sync up with the rest.

wget https://raw.githubusercontent.com/AltheaFoundation/althea-L1-docs/refs/heads/main/althea-l1-mainnet-genesis.json
cp althea-l1-mainnet-genesis.json $HOME/.althea/config/genesis.json

Add seed node and persistent peers

Change the persistent_peers field in ~/.althea/config/config.toml to contain the following:

persistent_peers = "bc47f3e8f9134a812462e793d8767ef7334c0119@chainripper-2.althea.net:23296"

Add your validator key

We need to import the validator key. This is the key containing Althea tokens, don't worry about getting them that comes next

# you will be prompted for your key phrase
althea keys add <my validator key name> --recover

Or if your key is stored in a ledger device.

althea keys add <my validator key name> --ledger

View your key (optional)

If you need to view the address of your validator operator key, you can do so with the following command:

althea keys show <validator key name> --bech val

You should see an output like so:

- name: <validator key name>
  ...
  address: altheavaloper<keystring>
  ...

Setup Althea services

We recommend using systemd to manage your validator and orchestrator processes.

systemd makes it very easy to increase the open files limit for validators and ensure auto restart on failure. You can run althea start without systemd, but if you do so be absolutely sure you have increased the system open files limit.

sudo su
cd /etc/systemd/system
wget https://raw.githubusercontent.com/althea-net/althea-l1-docs/main/configs/althea.service

Now we have to stop and customize these services as appropriate

If you are running your validator as the root user, the althea.service file requires no modification if you are running as a different user modify line 13 like so

Environment="HOME=/path/to/your/home/dir"

Now that we have modified these services it's time to set them to run on startup

sudo systemctl daemon-reload
sudo systemctl enable althea
sudo service althea start

Troubleshooting SELinux

If your services are not starting, you may want to try disabling it to see if it resolves the issue

sed -i""  -e "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
setenforce 0

Monitoring your logs

These lines will allow you to watch the logs coming out of your Althea full node as if you where directly attached to the process rather than using systemd.

journalctl -u althea.service -f --output cat

Observe Sync Status and Time Remaining

You will need to wait for your Althea node to fully sync before progressing in the instructions

You can issue the following command to check the sync status of the Althea Node

althea status 2>&1| jq .SyncInfo.catching_up

Value of 'false' means that it is now synced, 'true' means that sync is still in process.

Getting some Althea tokens

Drop by the #validators channel in the Althea discord

post your althea1 validator address and recieve tokens to start your validator.

Send your validator setup transaction

althea tx staking create-validator \
 --amount=<your amount here, remember to subtract for the fee>aalthea\
 --pubkey=$(althea tendermint show-validator) \
 --moniker="put your validator name here" \
 --chain-id=althea_258432-1 \
 --from=myvalidatorkeyname \
 --commission-rate="0.10" \
 --commission-max-rate="0.20" \
 --commission-max-change-rate="0.01" \
 --gas=auto \
 --min-self-delegation="1" \
 --gas-adjustment=1.4
 --fees 20000000000000000aalthea

Confirm that you are validating

If you see one line in the response you are validating. If you don't see any output from this command you are not validating. Check that the last command ran successfully.

Be sure to replace 'my validator key name' with your actual key name. If you want to double check you can see all your keys with 'althea keys list'

althea query staking validator $(althea keys show myvalidatorkeyname --bech val --address)

Congrats!

You have an Althea L1 validator setup and running. Checkout the hackathon project index for any project you may want to participate in!