Skip to main content

Symphony

Endpoints

APIRPC
https://symphony-testnet-api.kgnodes.xyz/https://symphony-testnet-rpc.kgnodes.xyz/

Explorer: https://explorer.kgnodes.xyz/Symphony-Testnet

Installation

Update OS

sudo apt update && sudo apt upgrade -y

Installing Dependencies

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

Installing GO

cd $HOME
VER="1.22.6"
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 SYMPHONY_PORT="37"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Initializing and configuring the node

Download Binary

cd $HOME
rm -rf symphony
git clone https://github.com/Orchestra-Labs/symphony
cd symphony
git checkout v0.4.1
make build
mkdir -p ~/.symphonyd/cosmovisor/upgrades/0.4.1/bin
mv $HOME/symphony/build/symphonyd ~/.symphonyd/cosmovisor/upgrades/0.4.1/bin/
sudo ln -s ~/.symphonyd/cosmovisor/upgrades/0.4.1 ~/.symphonyd/cosmovisor/current -f
sudo ln -s ~/.symphonyd/cosmovisor/current/bin/symphonyd /usr/local/bin/symphonyd -f
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
cd

Node Settings

symphonyd config chain-id symphony-testnet-4
symphonyd config keyring-backend test
symphonyd config node tcp://localhost:${SYMPHONY_PORT}657

Initializing the Node

symphonyd init "your-moniker"

Downloading genesis and addressbook

wget -O $HOME/.symphonyd/config/genesis.json https://snapshot.kgnodes.xyz/snapshot/symphony/genesis.json
wget -O $HOME/.symphonyd/config/addrbook.json  https://snapshot.kgnodes.xyz/snapshot/symphony/addrbook.json

Setting seeds and peers

Updating ports in app.toml

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

Updating ports in config.toml

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

Configuring pruning settings

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.symphonyd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.symphonyd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"10\"/" $HOME/.symphonyd/config/app.toml

Setting gas and other configurations

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.025note"|g' $HOME/.symphonyd/config/app.toml

Creating service file

sudo tee /etc/systemd/system/symphonyd.service > /dev/null << EOF
[Unit]
Description=symphony node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --home $HOME/.symphonyd
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=${HOME}/.symphonyd"
Environment="DAEMON_NAME=symphonyd"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/.symphonyd/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF

Enabling and starting the service

sudo systemctl daemon-reload
sudo systemctl enable symphonyd

Downloading latest snap

Latest Snapshot:

SizeHeigtTimeIndexer
2.3G2472102024-11-19 19:39 UTCcustom: 100/0/19
sudo systemctl stop symphonyd

cp $HOME/.symphonyd/data/priv_validator_state.json $HOME/.symphonyd/priv_validator_state.json.backup

symphonyd tendermint unsafe-reset-all --home $HOME/.symphonyd --keep-addr-book
curl https://snapshot.kgnodes.xyz/snapshot/symphony/snap_symphonyd.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.symphonyd


mv $HOME/.symphonyd/priv_validator_state.json.backup $HOME/.symphonyd/data/priv_validator_state.json

sudo systemctl restart symphonyd
sudo journalctl -u symphonyd -f --no-hostname -o cat

Checking logs

sudo journalctl -u symphonyd -f --no-hostname -o cat

Wallet

Creating a New Wallet

symphonyd keys add wallet-name

Importing existing wallet

symphonyd keys add wallet-name --recover

Creating Validator

#Learn your pubkey first
symphonyd tendermint show-validator

rm -rf /root/validator.json

#Than edit your validator.json folder
nano validator.json

#Where it contains,

{
"pubkey": yourpubkey,
"amount": "9900000note",
"moniker": "yourmoniker",
"identity": "",
"website": "",
"security": "",
"details": "",
"commission-rate": "0.05",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}

#Type ctrl x+y enter and save it

#Now Create a Validator according to that file

symphonyd tx staking create-validator /root/.symphonyd/validator.json \
--from=yourwallet \
--chain-id=symphony-testnet-4 \
--gas-adjustment 1.5 \
--gas-prices 0.025note \
--gas auto

Self-Delegating

symphonyd tx staking delegate $(symphonyd keys show wallet-name --bech val -a) amount0000note \
--chain-id symphony-testnet-4 \
--from "wallet-name" \
--fees "800note" \
--node=http://localhost:${SYMPHONY_PORT}657 \
-y

Unjail Validator

symphonyd tx slashing unjail --from wallet --chain-id symphony-testnet-4 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Deleting the Node

cd $HOME
sudo systemctl stop symphonyd
sudo systemctl disable symphonyd
sudo rm -rf /etc/systemd/system/symphonyd.service
sudo systemctl daemon-reload
sudo rm -f /usr/local/bin/symphonyd
sudo rm -f $(which symphonyd)
sudo rm -rf $HOME/.symphonyd $HOME/symphony
sed -i "/SYMPHONY_/d" $HOME/.bash_profile