Update README.md
This commit is contained in:
parent
bf1599ab5c
commit
4e5b9e9a35
120
README.md
120
README.md
|
@ -1,14 +1,5 @@
|
|||
# Deploy a Testnet
|
||||
|
||||
## Install Cosmos-SDK on a Digital Ocean Droplet \(Recommended\)
|
||||
|
||||
```
|
||||
export PATH=$PATH:/usr/lib/go-1.10/bin
|
||||
export PATH=$PATH:/root/go/bin
|
||||
bash <(curl -s https://gist.github.com/melekes/1bd57c73646de97c8f6cbe1b780eb822/raw/2447b0fbf95775852c93a91ed3e12631c7ceb648/install.sh)
|
||||
nohup ./build/gaiad start &
|
||||
```
|
||||
|
||||
## Software Setup \(Manual Installation\)
|
||||
|
||||
- Install [GNU Wget](https://www.gnu.org/software/wget/):
|
||||
|
@ -115,33 +106,17 @@ You'll need a private and public key pair \(a.k.a. `sk, pk` respectively\) to be
|
|||
To generate your a new key \(default _ed25519_ elliptic curve\):
|
||||
|
||||
```
|
||||
KEYNAME=<set_a_name_for_your_new_key>
|
||||
gaiacli keys add $KEYNAME
|
||||
gaiacli keys add default
|
||||
```
|
||||
|
||||
Next, you will have to enter a passphrase for your`$KEYNAME`key twice. Save the _seed phrase_ in a safe place in case you forget the password.
|
||||
Next, you will have to enter a passphrase for your key twice. Save the _seed phrase_ in a safe place in case you forget the password.
|
||||
|
||||
Now if you check your private keys you will see the `$KEYNAME `key among them:
|
||||
|
||||
```
|
||||
gaiacli keys show $KEYNAME
|
||||
```
|
||||
|
||||
You can see your other available keys by typing:
|
||||
Now if you check your private keys you will see the key among them:
|
||||
|
||||
```
|
||||
gaiacli keys list
|
||||
```
|
||||
|
||||
Save your address and pubkey into a variable
|
||||
|
||||
```
|
||||
MYADDR=<your_newly_generated_address>
|
||||
MYPUBKEY=<your_newly_generated_public_key>
|
||||
```
|
||||
|
||||
**IMPORTANT:** We strongly recommend to **NOT** use the same passphrase for your different keys. The Tendermint team and the Interchain Foundation will not be responsible for the lost of funds.
|
||||
|
||||
## Getting Coins
|
||||
|
||||
Go to the faucet in [http://atomexplorer.com/](http://atomexplorer.com/) and claim some coins for your testnet by typing the address of your key, as printed out above.
|
||||
|
@ -149,7 +124,7 @@ Go to the faucet in [http://atomexplorer.com/](http://atomexplorer.com/) and cla
|
|||
## Send tokens
|
||||
|
||||
```
|
||||
gaiacli send --from=$MYADDR --amount=1000fermion --chain-id=<name_of_testnet_chain> --sequence=1 --name=$KEYNAME --to=<destination_address>
|
||||
gaiacli send --amount=1000fermion --chain-id=gaia-4000 --sequence=0 --name=default --to=<destination_address>
|
||||
```
|
||||
|
||||
The `--amount` flag defines the corresponding amount of the coin in the format `--amount=<value|coin_name>`
|
||||
|
@ -160,32 +135,11 @@ Now check the destination account and your own account to check the updated bala
|
|||
|
||||
```
|
||||
gaiacli account <destination_address>
|
||||
gaiacli account $MYADDR
|
||||
gaiacli account <your_address>
|
||||
```
|
||||
|
||||
You can also check your balance at a given block by using the `--block` flag:
|
||||
|
||||
```
|
||||
gaiacli account $MYADDR --block=<block_height>
|
||||
```
|
||||
|
||||
##### Custom fee \(coming soon\)
|
||||
|
||||
You can also define a custom fee on the transaction by adding the `--fee` flag using the same format:
|
||||
|
||||
```
|
||||
gaiacli send --from=$MYADDR --amount=1000fermion --fee=1fermion --chain-id=<name_of_testnet_chain> --sequence=1 --name=$KEYNAME --to=<destination_address>
|
||||
```
|
||||
|
||||
### Transfer tokens to other chain
|
||||
|
||||
The command to`transfer`tokens to other chain is the same as`send`, we just need to add the`--chain`flag:
|
||||
|
||||
```
|
||||
gaiacli transfer --from=$MYADDR --amount=20fermion --chain-id=<name_of_testnet_chain> --chain=<destination_chain> --sequence=1 --name=$KEYNAME --to=<sidechain_destination_address>
|
||||
```
|
||||
|
||||
## Staking: Add a Validator
|
||||
## Staking: Becoming a Validator
|
||||
|
||||
Get your public key by typing:
|
||||
|
||||
|
@ -193,61 +147,13 @@ Get your public key by typing:
|
|||
gaiad show_validator
|
||||
```
|
||||
|
||||
The returned value is your validator address in hex. This can be used to create a new validator candidate by staking some tokens:
|
||||
Take the base64 encoded string from the value field and use [this](https://cryptii.com/base64-to-hex) to convert it to hex.
|
||||
Change `Group by` to `None`.
|
||||
|
||||
Send the bonding transaction:
|
||||
|
||||
*Remember to use your own validator address or use mine if you want to delegate to me.*
|
||||
|
||||
```
|
||||
gaiacli declare-candidacy --amount=500fermions --pubkey=$PUBKEY --address-candidate=$MYADDR --moniker=satoshi --chain-id=<name_of_the_testnet_chain> --sequence=1 --name=$KEYNAME
|
||||
```
|
||||
|
||||
You can add more information of the validator candidate such as`--website`, `--keybase-sig `or additional`--details`. If you want to edit the candidate info:
|
||||
|
||||
```
|
||||
gaiacli edit-candidacy --details="To the cosmos !" --website="https://cosmos.network"
|
||||
```
|
||||
|
||||
Finally, you can check all the candidate information by typing:
|
||||
|
||||
```
|
||||
gaiacli candidate --address-candidate=$MYADDR --chain-id=<name_of_the_testnet_chain>
|
||||
```
|
||||
|
||||
To check that the validator is active you can find it on the validator set list:
|
||||
|
||||
```
|
||||
gaiacli validatorset
|
||||
```
|
||||
|
||||
**Note:** Remember that to be in the validator set you need to have more total power than the Xnd validator, where X is the assigned size for the validator set \(by default _`X = 100`_\).
|
||||
|
||||
#### Delegating: Bonding and unbonding to a validator
|
||||
|
||||
You can delegate \(i.e. bind\) **Atoms** to a validator to obtain a part of its fee revenue in exchange \(the fee token in the Cosmos Hub are **Photons**\).
|
||||
|
||||
```
|
||||
gaiacli delegate --amount=10fermion --address-delegator=$MYADDR --address-candidate=<bonded_validator_address> --shares=MAX --name=$KEYNAME --chain-id=<name_of_testnet_chain> --sequence=1
|
||||
```
|
||||
|
||||
If for any reason the validator misbehaves or you just want to unbond a certain amount of the bonded tokens:
|
||||
|
||||
```
|
||||
gaiacli unbond --address-delegator=$MYADDR --address-candidate=<bonded_validator_address> --shares=MAX --name=$KEYNAME --chain-id=<name_of_testnet_chain> --sequence=1
|
||||
```
|
||||
|
||||
You can unbond a specific amount of`shares`\(eg:`12.1`\) or all of them \(`MAX`\).
|
||||
|
||||
You should now see the unbonded tokens reflected in your balance and in your delegator bond :
|
||||
|
||||
```
|
||||
gaiacli account $MYADDR
|
||||
gaiacli delegator-bond --address-delegator=$MYADDR --address-candidate=<bonded_validator_address> --chain-id=<name_of_testnet_chain>
|
||||
```
|
||||
|
||||
#### Relaying
|
||||
|
||||
Relaying is key to enable interoperability in the Cosmos Ecosystem. It allows IBC packets of data to be sent from one chain to another.
|
||||
|
||||
The command to relay packets is the following:
|
||||
|
||||
```
|
||||
gaiacli relay --from-chain-id=<name_of_testnet_chain> --to-chain-id=<destination_chain_name> --from-chain-node=<host>:<port> --to-chain-node=<host>:<port> --name=$KEYNAME --sequence=1
|
||||
gaiacli bond --stake=6steak --validator=45798afe9b0cd7a05b765107b744478f91848d18a54ce7d06daace1c71a56913 --sequence=0 --chain-id=gaia-4000 --name=default
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue