Skip to content
Cosmopediaby Unity Nodes
DiscussionsCosmos-SDKUnable to configure the initial balanceForum ↗

Unable to configure the initial balance

Cosmos-SDK1 posts519 viewsLast activity Nov 2021
TR
tranquanghuy7198OP
Nov 2021

Hello everyone, When I tried to run a Cosmos node, I followed the instruction at the official documentation ( Setting up the keyring | Cosmos SDK ). For more details, these are the commands I used: • cosmosd keys add validator --keyring-backend test • VALIDATOR=$(cosmosd keys show validator -a --keyring-backend test) • echo $VALIDATOR (It gave the result cosmos10ngz0gn5gx6glt6vl0q6ntsq5t5dmecpx5wkkr) • cosmosd init node-1 --chain-id 1506 • cosmosd add-genesis-account $VALIDATOR 100000000000stake • cosmosd gentx validator 1000000stake --chain-id 1506 --keyring-backend test • cosmosd collect-gentxs • cosmosd start Finally, I went to http://localhost:1317 and used the balance API (/cosmos/bank/v1beta1/balances/{address}) to get the balance of $VALIDATOR (i.e. cosmos10ngz0gn5gx6glt6vl0q6ntsq5t5dmecpx5wkkr). The result was 0. However, the Cosmos documentation said that “You should see the current balance of the account you created, equal to the original balance of stake you granted it minus the amount you delegated via the gentx”, so the above result should not be zero. Anyone please tell me why the balance I got was 0? Did I miss something when I tried to run my own…

Excerpt (1197 of 1203 characters). Read the whole post on the forum ↗

← Back to Discussions