stratos block testnet genesis and config
To create a separated and more secure environment, it is recommended to create a separated user account to run node.
sudo adduser stratos --home /home/stratos Once user is created, login the system using stratos account and proceed with installation steps in context of that user
cd $HOME wget https://github.com/stratosnet/stratos-chain/releases/download/v0.6.1/stchaincli wget https://github.com/stratosnet/stratos-chain/releases/download/v0.6.1/stchaindThese binary files are built using linux amd64, so if you are preparing run a node on different kernel, please follow step 1.1 to build binaries for your machine
For ease of use, we recommend you save these files in your
$HOMEfolder. In the follwoing, we suppose you are in the$HOMEfolder.
md5sum stchain* ## expect output ## 55f7454c2998542d08fcd624f043c7db stchaincli ## 9bf3a165386b6d5d5b056661b4da3cc5 stchaindchmod +x stchaincli chmod +x stchaindMake sure you have Go 1.16+ installed (link).
git clone https://github.com/stratosnet/stratos-chain.git cd stratos-chain git checkout v0.6.1 make buildThe binary files stchaincli and stchaind can be found in build folder. Then, move these two binary files to $HOME
mv build/stchaincli ./ mv build/stchaind ./make install./stchaind init "<node name you prefer>" # ignore the output since you need to download the genesis file wget https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/genesis.json wget https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/config.tomlIn config.toml file, at Line #16, there is a “moniker” field. Change it to any name you like. It’s your node name on the network.
# A custom human readable name for this node moniker = "<node name you prefer>"mv config.toml .stchaind/config/ mv genesis.json .stchaind/config/By default, the two binary executable files
stchaincliandstchaindas well as the directory.stchaindhave been saved or created in the$HOMEfolder. The.stchaindfolder contains the node's configurations and data.
./stchaind start After this, the node will try to catch up with the blockchain to the latest block.
You can run the node in background
./stchaind start 2>&1 >> chain.log &Once the node finishes catch-up, you can operate the node for various transactions(tx) and queries. You can find all the documents here.
In the following, we list some of commonly-used operations.
./stchaincli keys add --hd-path "m/44'/606'/0'/0/0" --keyring-backend test <your wallet name>Example
./stchaincli keys add --hd-path "m/44'/606'/0'/0/0" --keyring-backend test wallet1After executed the above command, a
.stchaincliwill be created in your$HOMEfolder. The.stchainclicontains your wallet information with its address.
Faucet will be available at https://faucet-tropos.thestratos.org/ to get test tokens
curl -X POST https://faucet-tropos.thestratos.org/faucet/<your wallet address>
- 1 stos = 1000000000 ustos
- By default, faucet will send 100stos(100,000,000,000ustos) to the given wallet address
- maximum 3 faucet requests to arbitrary wallet address from a single IP within an hour
- maximum 1 faucet request to a fixed wallet address within an hour
Check balance (you need to wait for your node catching up with the network)
./stchaincli query account <your wallet address>Check node status
./stchaincli status./stchaincli tx send <from address> <to address> <amount> --keyring-backend=<keyring's backend> --chain-id=<current chain-id>$ ./stchaincli tx send st1qzx8na3ujlaxstgcyguudaecr6mpsemflhhzua st1jvf660xagmzuzyqyqu3w27sj0ragn7qetnwmyr 100000000000ustos --keyring-backend=test --chain-id=stratos-testnet-3 --gas=auto # then input y for the pop up to confirm send
- In testing phase, --keyring-backend="test"
- In testing phase, the current
chain-idmay change when updating. When it is applied, user needs to point outcurrent chain-idwhich can be found on this page, right next to the search bar at the top of the page.
After the following steps have been done, Any participant in the network can signal that they want to become a validator. Please refer to How to Become a Validator for more details about validator creation, delegation as well as FAQ.
- download related files
- start your node to catch up to the latest block height(synchronization)
- create your Stratos Chain Wallet
-
Faucetorsendan amount of tokens to this wallet
NOTE: All below steps require root privileges
[Unit] Description=Stratos Chain Node After=network-online.target [Service] User=stratos Group=stratos ExecStart=/home/stratos/stchaind start --home=/home/stratos/.stchaind Restart=on-failure RestartSec=3 LimitNOFILE=8192 [Install] WantedBy=multi-user.target Note: In the [service] section,
Useris your system login user accountGroupis user groupExecStartdesignates the path to the binary file stchaind--homedesignates the path to the node folder.
Please modify these values according to your situations. Make sure the above values are correct.
systemctl daemon-reload systemctl enable stratos.service systemctl start stratos.service systemctl status stratos.service journalctl -u stratos.service -f # exit with ctrl+c More details are available at here
For Chinese version, please refer to Stratos-chain testnet 测试网说明