For full Source Chain Documentation and testnet set up click: HERE
4GB RAM 250GB of disk space 1.4 GHz amd64 CPU
Prerequisites: Make sure to have Golang >=1.18.
wget https://golang.org/dl/go1.18.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz
sudo chown -R <YOUR_USERNAME>:<YOUR_USERNAME> /usr/local/go
You need to ensure your gopath configuration is correct. If the following 'make' step does not work then you might have to add these lines to your .profile or .zshrc in the users home folder:
nano ~/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
Source update .profile
source .profile
sudo curl https://get.ignite.com/cli! | sudo bash
git clone -b testnet https://github.com/Source-Protocol-Cosmos/source.git
cd ~/source
ignite chain build
sourced init <moniker-name> --chain-id=sourcechain-testnet
sourced keys add <key-name>
curl -s https://raw.githubusercontent.com/Source-Protocol-Cosmos/testnets/master/sourcechain-testnet/genesis.json > ~/.source/config/genesis.json
Genesis sha256
sha256sum ~/.source/config/genesis.json
# 2bf556b50a2094f252e0aac75c8018a9d6c0a77ba64ce39811945087f6a5165d
nano ~/.source/config/config.toml
# Comma separated list of nodes to keep persistent connections to persistent_peers =
"[email protected]:26656"
nano ~/.source/config/app.toml
0.025usource
Below are the instructions to generate & submit your genesis transaction
- Initialize the Source directories and create the local genesis file with the correct chain-id:
sourced init <moniker-name> --chain-id=sourcechain-testnet
- Create a local key pair (skip this step if you already have a key):
sourced keys add <key-name>
- Add your account to your local genesis file with a given amount and the key you just created. Use only
10000000000usource
, other amounts will be ignored.
sourced add-genesis-account $(sourced keys show <key-name> -a) 10000000000usource
- Create the gentx, use only
9000000000usource
:
sourced gentx <key-name> 9000000000usource --chain-id=sourcechain-testnet
If all goes well, you will see a message similar to the following:
Genesis transaction written to "/home/user/.source/config/gentx/gentx-******.json"
- Start the chain
sourced start
- Create Validator
sourced tx staking create-validator \
--amount 1000000000usource \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.20" \
--commission-rate "0.1" \
--min-self-delegation "1" \
--details "validators write bios too" \
--pubkey=$(sourced tendermint show-validator) \
--moniker “<key-name>” \
--chain-id sourcechain-testnet \
--gas-prices 0.025usource \
--from <key-name>
-
Fork the testnets repo into your Github account
-
Clone your repo using
git clone https://github.com/<your-github-username>/testnets
-
Copy the generated gentx json file to
<repo_path>/testnets/gentx/
> cd testnet-genesis > cp ~/.source/config/gentx/gentx*.json ./sourcechain-testnet/gentx/
-
Commit and push to your repo
-
Create a PR onto https://github.com/Source-Protocol-Cosmos/testnets
-
Only PRs from individuals / groups with a history successfully running nodes will be accepted. This is to ensure the network successfully starts on time.
Note, we'll be going through some upgrades for this testnet. Consider using Cosmovisor to make your life easier.
Create a systemd file for your Source service:
sudo nano /etc/systemd/system/sourced.service
Copy and paste the following and update :
Description=Source daemon
After=network-online.target
[Service]
User=<YOUR_USERNAME>
ExecStart=/home/<YOUR-USERNAME>/go/bin/sourced start --home /home/<YOUR-USERNAME>/.source
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
This assumes $HOME/.source to be your directory for config and data. Your actual directory locations may vary.
Enable and start the new service:
sudo systemctl enable sourced
sudo systemctl start sourced
Check status:
sourced status
Check logs:
journalctl -u sourced -f