apt-get update
apt-get install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow 22
ufw allow 26656
ufw enable
# add user
adduser node
# add user to sudoers
usermod -aG sudo node
# login as user
su - node
sudo apt update
sudo apt install pkg-config build-essential libssl-dev curl jq git libleveldb-dev -y
sudo apt-get install manpages-dev -y
# install go
curl https://dl.google.com/go/go1.18.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
# Update environment variables to include go
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
# check go version
go version
git clone https://github.com/ArableProtocol/acrechain.git
cd acrechain
git checkout testnet_bamboo
make install
cd
acred version --long
You should get the following output:
name: acre
server_name: acred
version: ""
commit: 01482d6deddda2b0b4a399857857dc2a0dd38555
#Choose a name for your validator and use it in place of “<moniker-name>” in the following command:
acred init <moniker-name> --chain-id bamboo_9000-1
#Example
acred init Synergy_Nodes --chain-id bamboo_9000-1
cd ~/.acred/config
rm genesis.json
cd
wget https://raw.githubusercontent.com/ArableProtocol/acrechain/testnet_bamboo/networks/bamboo/genesis.json -O $HOME/.acred/config/genesis.json
cd
PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:36656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.acred/config/config.toml
acred start
# Press Ctrl+c to exit
cd /etc/systemd/system
sudo nano acred.service
Copy the following content into acred.service
and save it.
[Unit]
Description=Acred Daemon
#After=network.target
StartLimitInterval=350
StartLimitBurst=10
[Service]
Type=simple
User=node
ExecStart=/home/node/go/bin/acred start
Restart=on-abort
RestartSec=30
[Install]
WantedBy=multi-user.target
[Service]
LimitNOFILE=1048576
sudo systemctl daemon-reload
sudo systemctl enable acred
# Start the service
sudo systemctl start acred
# Stop the service
sudo systemctl stop acred
# Restart the service
sudo systemctl restart acred
# For Entire log
journalctl -t acred
# For Entire log reversed
journalctl -t acred -r
# Latest and continuous
journalctl -t acred -f
acred tendermint show-node-id
Make sure to copy the 24 words Mnemonics Phrase, save it in a file and store it on a safe location.
acred keys add <wallet-name>
#Example
acred keys add my_wallet
Get some ACRE tokens to the above created wallet.
acred tx staking create-validator -y \
--chain-id bamboo_9000-1 \
--moniker <moniker-name> \
--pubkey "$(acred tendermint show-validator)" \
--amount 5000000000000000000uacre \
--identity "<Keybase.io ID>" \
--website "<website-address>" \
--details "Some description" \
--from <wallet-name> \
--gas=300000 \
--commission-rate=0.0 \
--commission-max-rate=0.05 \
--commission-max-change-rate=0.01 \
--min-self-delegation 1
#Example
acred tx staking create-validator -y \
--chain-id bamboo_9000-1 \
--moniker "Synergy Nodes" \
--pubkey "$(acred tendermint show-validator)" \
--amount 5000000000000000000uacre \
--identity "D74433D32938F013" \
--website "http://www.mywebsite.com" \
--details "Some description" \
--from my_wallet \
--gas=300000 \
--commission-rate=0.0 \
--commission-max-rate=0.05 \
--commission-max-change-rate=0.01 \
--min-self-delegation 1
Make sure to change <wallet-name>
to correct values.
acred keys show <wallet-name> --bech val --output json | jq -r .address
#Example
acred keys show my_wallet --bech val --output json | jq -r .address
acred tx staking delegate <validator-address> 1000000uacre --from <wallet-name> --chain-id bamboo_9000-1 -y
#Example
acred tx staking delegate acrevaloper1y4pfpkwpy6myskp7pne256k6smh2rjtay37kwc 1000000uacre --from my_wallet --chain-id bamboo_9000-1 -y
Take a backup of the following files after you have created and registered your validator node successfully.
/home/node/.acred/config/node_key.json
/home/node/.acred/config/priv_validator_key.json
/home/node/.acred/data/priv_validator_state.json
Make sure to change <validator-operator-address>
, <wallet-name>
to correct values.
acred tx distribution withdraw-rewards <validator-address> --from <wallet-name> --chain-id=bamboo_9000-1 -y
#Example
acred tx distribution withdraw-rewards acrevaloper1y4pfpkwpy6myskp7pne256k6smh2rjtay37kwc --from synergy --chain-id=bamboo_9000-1 -y
acred query bank balances <wallet-address>
#Example:
acred query bank balances acre1y4pfpkwpy6myskp7pne256k6smh2rjtaaf0xv9