Skip to content

Commit

Permalink
Merge pull request #1 from enigmampc/joinAsValidator
Browse files Browse the repository at this point in the history
Join as validator
  • Loading branch information
toml01 authored Feb 2, 2020
2 parents 6754bfb + c4fcfc6 commit 9814047
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,51 @@ engd start # hokos pokos
# This is how b can delegate 0.00001 ENG to a
engcli tx staking delegate $(engcli keys show a --bech=val -a) 10ueng --from b
```

## Run your private node (on a running chain)

First, init your environment:
```bash
endg init [moniker] --chain-id enigma0
```

Now you need a valid running node to send you their `genesis.json` file (usually at `~/.engd/config/genesis.json`)
Once you have the valid `genesis.json`, put it in `~/.engd/config/genesis.json` (overwrite the existing file if needed).
Next, edit your `.engd/config/config.toml`, set the `persistent_peers`:
```bash
persistent_peers = "[id]@[peer_node_ip]:26656" # `id` can be aquired from your peer by running `engcli status`
```

That't it! Once you're done, just run:
```bash
engd start
```
You will see you local bloackchain replica starting to catch up with your peer's one.

Congrats, you are now up and running!

***Note**: If anything goes wrong, delete the `~/.engd` and `~/.engcli` dirs and start again.*

## Join as a Validator

After you have a private up and running, run the following command:

``` bash
engcli tx staking create-validator \
--amount=<num of coins> \ # This is the amount of coins you put at stake. i.e. 100000ueng
--pubkey=$(engd tendermint show-validator) \
--moniker="<name-of-your-moniker>" \
--chain-id=<chain-id> \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas="auto" \
--gas-prices="0.025ueng" \
--from=<name or address> # Name or address of your existing account
```

To check if you got added to the validator-set by running:
```bash
engcli q tendermint-validator-set
```

0 comments on commit 9814047

Please sign in to comment.