Revert "Added content to old gaia-4000 README"
This commit is contained in:
parent
a8edd9ad16
commit
58aea07fbe
177
README.md
177
README.md
|
@ -1,27 +1,8 @@
|
|||
# Deploy a Testnet
|
||||
|
||||
## Setup
|
||||
## Software Setup \(Manual Installation\)
|
||||
|
||||
If you're running a full node validator we recommend you to comply with the necessary [technical requirements](https://github.com/cosmos/cosmos/blob/master/VALIDATORS_FAQ.md#technical-requirements). You can check more information regarding validators in our [website](https://cosmos.network/validators) or in the [validator FAQ](https://cosmos.network/resources/validator-faq).
|
||||
|
||||
### Install the SDK on a Cloud Server
|
||||
|
||||
You can set up a cloud server of your choice to run a **non-validator** full node.
|
||||
|
||||
#### Digital Ocean Droplet
|
||||
|
||||
Follow these commands to install the SDK on a Digital Ocean [Droplet](https://www.digitalocean.com/products/droplets/):
|
||||
|
||||
```
|
||||
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/)
|
||||
- Install [GNU Wget](https://www.gnu.org/software/wget/):
|
||||
|
||||
**MacOS**
|
||||
|
||||
|
@ -37,12 +18,15 @@ sudo apt-get install wget
|
|||
|
||||
Note: You can check other available options for downloading `wget` [here](https://www.gnu.org/software/wget/faq.html#download).
|
||||
|
||||
#### Install binaries
|
||||
|
||||
Cosmos SDK can be installed to `$GOPATH/src/github.com/cosmos/cosmos-sdk` like a normal Go program:
|
||||
**Get Source Code**
|
||||
|
||||
```
|
||||
go get github.com/cosmos/cosmos-sdk
|
||||
```
|
||||
|
||||
Now we can fetch the correct versions of each dependency by running:
|
||||
|
||||
```
|
||||
cd $GOPATH/src/github.com/cosmos/cosmos-sdk
|
||||
git fetch --all
|
||||
git checkout 0f2aa6b
|
||||
|
@ -51,43 +35,57 @@ make get_vendor_deps
|
|||
make install
|
||||
```
|
||||
|
||||
This will install `gaiad` and `gaiacli` and four example binaries: `basecoind`, `basecli`, `democoind`, and `democli`. Verify that everything is OK by running:
|
||||
The latest binaries should now be installed. Verify that everything is OK by running:
|
||||
|
||||
```
|
||||
gaiad version
|
||||
gaiacli version
|
||||
```
|
||||
|
||||
You should see in both cases:
|
||||
You should see:
|
||||
|
||||
```
|
||||
0.15.0-rc0-0f2aa6b
|
||||
```
|
||||
|
||||
### Genesis Setup
|
||||
And also:
|
||||
|
||||
Now that we have completed the basic SDK setup, we can start working on the genesis configuration for the chain we want to connect to. Initiliaze `gaiad` :
|
||||
```
|
||||
gaiacli version
|
||||
```
|
||||
|
||||
You should see:
|
||||
|
||||
```
|
||||
0.15.0-rc0-0f2aa6b
|
||||
```
|
||||
|
||||
## Genesis Setup
|
||||
|
||||
Initiliaze `gaiad` :
|
||||
|
||||
```
|
||||
gaiad init
|
||||
```
|
||||
|
||||
You can find the corresponding genesis files [here](https://github.com/cosmos/testnets). Then replace the `genesis.json` and `config.toml` files:
|
||||
You can find the corresponding genesis files [here](https://github.com/tendermint/testnets). Then replace the `genesis.json`and `config.toml` files:
|
||||
|
||||
```
|
||||
rm $HOME/.gaiad/config/genesis.json $HOME/.gaiad/config/config.toml $HOME/.gaiad/config/addrbook.json
|
||||
|
||||
wget -O $HOME/.gaiad/config/genesis.json https://raw.githubusercontent.com/cosmos/testnet/master/gaia-4000/genesis.json
|
||||
|
||||
wget -O $HOME/.gaiad/config/config.toml https://raw.githubusercontent.com/cosmos/testnet/master/gaia-4000/config.toml
|
||||
```
|
||||
|
||||
Lastly, change the `moniker` string in the `config.toml` to identify your node.
|
||||
Lastly change the `moniker` string in the`config.toml`to identify your node.
|
||||
|
||||
```
|
||||
# A custom human readable name for this node
|
||||
moniker = "<your_custom_name>"
|
||||
```
|
||||
|
||||
## Running a Full Node
|
||||
|
||||
## Starting Gaiad
|
||||
|
||||
Start the full node:
|
||||
|
||||
|
@ -101,7 +99,7 @@ Check the everything is running smoothly:
|
|||
gaiacli status
|
||||
```
|
||||
|
||||
### Generate keys
|
||||
## Generate keys
|
||||
|
||||
You'll need a private and public key pair \(a.k.a. `sk, pk` respectively\) to be able to receive funds, send txs, bond tx, etc.
|
||||
|
||||
|
@ -111,49 +109,22 @@ To generate your a new key \(default _ed25519_ elliptic curve\):
|
|||
gaiacli keys add default
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Now if you check your private keys you will see the `$KEYNAME` key among them with the value of your `address`:
|
||||
|
||||
```
|
||||
gaiacli keys show $KEYNAME
|
||||
```
|
||||
|
||||
You can see all your other available keys by typing:
|
||||
Now if you check your private keys you will see the key among them:
|
||||
|
||||
```
|
||||
gaiacli keys list
|
||||
```
|
||||
|
||||
Now get your public key by typing:
|
||||
|
||||
```
|
||||
gaiad show_validator
|
||||
```
|
||||
|
||||
You'll get the `value` of your `pk` in a `base64` encoded string format and the `type` of the elliptic curve.
|
||||
To convert your `pubkey` to `hex` go to this [website](https://cryptii.com/base64-to-hex) and paste the value of the public key in the left box. On the right box, select `Group By` to `None` to get the `hex` value.
|
||||
|
||||
Finally, save your address and pubkey into a variable to use them afterwards.
|
||||
|
||||
```
|
||||
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
|
||||
## 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.
|
||||
|
||||
### Send tokens
|
||||
## Send tokens
|
||||
|
||||
```
|
||||
|
||||
gaiacli --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>`
|
||||
|
@ -167,76 +138,22 @@ gaiacli account <destination_address>
|
|||
gaiacli account <your_address>
|
||||
```
|
||||
|
||||
You can also check your balance at a given block by using the `--block` flag:
|
||||
|
||||
## Staking: Becoming a Validator
|
||||
|
||||
Get your public key by typing:
|
||||
|
||||
```
|
||||
gaiacli account $MYADDR --block=<block_height>
|
||||
gaiad show_validator
|
||||
```
|
||||
|
||||
##### Custom fee \(coming soon\)
|
||||
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`.
|
||||
|
||||
You can also define a custom fee on the transaction by adding the `--fee` flag using the same format:
|
||||
Send the bonding transaction:
|
||||
|
||||
*Remember to use your own validator address or use mine if you want to delegate to me.*
|
||||
|
||||
```
|
||||
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 --amount=20fermion --chain-id=<name_of_testnet_chain> --chain=<destination_chain> --sequence=1 --name=$KEYNAME --to=<sidechain_destination_address>
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
## Become a Validator
|
||||
|
||||
[Validators](https://cosmos.network/validators) are actors from the network that are responsible from commiting new blocks to the blockchain by submitting their votes. You can become a validator candidate by staking some tokens:
|
||||
|
||||
```
|
||||
gaiacli bond --stake=20fermion --validator=$MYADDR --name=$KEYNAME --chain-id=<name_of_testnet_chain> --sequence=1
|
||||
```
|
||||
|
||||
To check that the validator node 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`_\).
|
||||
|
||||
## Delegate your tokens
|
||||
|
||||
You can delegate \(_i.e._ bind\) **Atoms** to a validator to become a [delegator](https://cosmos.network/resources/delegators) and obtain a part of its fee revenue in **Photons**. For more information about the Cosmos Token Model, refer to our [whitepaper](https://github.com/cosmos/cosmos/raw/master/Cosmos_Token_Model.pdf).
|
||||
|
||||
### Bonding to a validator
|
||||
|
||||
Bond your tokens to a validator candidate with the following command:
|
||||
|
||||
```
|
||||
gaiacli bond --stake=10fermion --validator=<bonded_validator_address> --name=$KEYNAME --chain-id=<name_of_testnet_chain> --sequence=1
|
||||
```
|
||||
|
||||
### Unbonding
|
||||
|
||||
If for any reason the validator misbehaves or you just want to unbond a certain amount of the bonded tokens:
|
||||
|
||||
```
|
||||
gaiacli unbond --name=$KEYNAME --chain-id=<name_of_testnet_chain> --sequence=1
|
||||
```
|
||||
|
||||
You should now see the unbonded tokens reflected in your balance:
|
||||
|
||||
```
|
||||
gaiacli account $MYADDR
|
||||
gaiacli bond --stake=6steak --validator=45798afe9b0cd7a05b765107b744478f91848d18a54ce7d06daace1c71a56913 --sequence=0 --chain-id=gaia-4000 --name=default
|
||||
```
|
Loading…
Reference in New Issue