Skip to content

Commit

Permalink
Merge branch 'master' into aleem/8961-test-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
aleem1314 authored Aug 16, 2021
2 parents 9845fae + 3022865 commit c20bc5b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/run-node/run-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ The `~/.simapp` folder has the following structure:
|- priv_validator_key.json # Private key to use as a validator in the consensus protocol.
```

## Updating Some Default Settings

If you want to change any field values in configuration files (for ex: genesis.json) you can use `jq` ([installation](https://stedolan.github.io/jq/download/) & [docs](https://stedolan.github.io/jq/manual/#Assignment)) & `sed` commands to do that. Few examples are listed here.
```bash
# to change the chain-id
jq '.chain_id = "testing"' genesis.json > temp.json && mv temp.json genesis.json

# to enable the api server
sed -i '/\[api\]/,+3 s/enable = false/enable = true/' app.toml

# to change the voting_period
jq '.app_state.gov.voting_params.voting_period = "600s"' genesis.json > temp.json && mv temp.json genesis.json

# to change the inflation
jq '.app_state.mint.minter.inflation = "0.300000000000000000"' genesis.json > temp.json && mv temp.json genesis.json
```

## Adding Genesis Accounts
Before starting the chain, you need to populate the state with at least one account. To do so, first [create a new account in the keyring](./keyring.md#adding-keys-to-the-keyring) named `my_validator` under the `test` keyring backend (feel free to choose another name and another backend).

Now that you have created a local account, go ahead and grant it some `stake` tokens in your chain's genesis file. Doing so will also make sure your chain is aware of this account's existence:
Expand Down

0 comments on commit c20bc5b

Please sign in to comment.