Browse Source

docs: replace priv_validator.json with priv_validator_key.json (#3786)

pull/3788/head
Andy Nogueira 5 years ago
committed by Anton Kaliaev
parent
commit
378a0e51bf
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      docs/tendermint-core/using-tendermint.md

+ 10
- 10
docs/tendermint-core/using-tendermint.md View File

@ -20,7 +20,7 @@ Initialize the root directory by running:
tendermint init tendermint init
``` ```
This will create a new private key (`priv_validator.json`), and a
This will create a new private key (`priv_validator_key.json`), and a
genesis file (`genesis.json`) containing the associated public key, in genesis file (`genesis.json`) containing the associated public key, in
`$TMHOME/config`. This is all that's necessary to run a local testnet `$TMHOME/config`. This is all that's necessary to run a local testnet
with one validator. with one validator.
@ -314,7 +314,7 @@ write-ahead-log](../tendermint-core/running-in-production.md#mempool-wal)
## Tendermint Networks ## Tendermint Networks
When `tendermint init` is run, both a `genesis.json` and When `tendermint init` is run, both a `genesis.json` and
`priv_validator.json` are created in `~/.tendermint/config`. The
`priv_validator_key.json` are created in `~/.tendermint/config`. The
`genesis.json` might look like: `genesis.json` might look like:
``` ```
@ -335,7 +335,7 @@ When `tendermint init` is run, both a `genesis.json` and
} }
``` ```
And the `priv_validator.json`:
And the `priv_validator_key.json`:
``` ```
{ {
@ -354,20 +354,20 @@ And the `priv_validator.json`:
} }
``` ```
The `priv_validator.json` actually contains a private key, and should
The `priv_validator_key.json` actually contains a private key, and should
thus be kept absolutely secret; for now we work with the plain text. thus be kept absolutely secret; for now we work with the plain text.
Note the `last_` fields, which are used to prevent us from signing Note the `last_` fields, which are used to prevent us from signing
conflicting messages. conflicting messages.
Note also that the `pub_key` (the public key) in the Note also that the `pub_key` (the public key) in the
`priv_validator.json` is also present in the `genesis.json`.
`priv_validator_key.json` is also present in the `genesis.json`.
The genesis file contains the list of public keys which may participate The genesis file contains the list of public keys which may participate
in the consensus, and their corresponding voting power. Greater than 2/3 in the consensus, and their corresponding voting power. Greater than 2/3
of the voting power must be active (i.e. the corresponding private keys of the voting power must be active (i.e. the corresponding private keys
must be producing signatures) for the consensus to make progress. In our must be producing signatures) for the consensus to make progress. In our
case, the genesis file contains the public key of our case, the genesis file contains the public key of our
`priv_validator.json`, so a Tendermint node started with the default
`priv_validator_key.json`, so a Tendermint node started with the default
root directory will be able to make progress. Voting power uses an int64 root directory will be able to make progress. Voting power uses an int64
but must be positive, thus the range is: 0 through 9223372036854775807. but must be positive, thus the range is: 0 through 9223372036854775807.
Because of how the current proposer selection algorithm works, we do not Because of how the current proposer selection algorithm works, we do not
@ -453,16 +453,16 @@ not connected to the other peer.
The easiest way to add new validators is to do it in the `genesis.json`, The easiest way to add new validators is to do it in the `genesis.json`,
before starting the network. For instance, we could make a new before starting the network. For instance, we could make a new
`priv_validator.json`, and copy it's `pub_key` into the above genesis.
`priv_validator_key.json`, and copy it's `pub_key` into the above genesis.
We can generate a new `priv_validator.json` with the command:
We can generate a new `priv_validator_key.json` with the command:
``` ```
tendermint gen_validator tendermint gen_validator
``` ```
Now we can update our genesis file. For instance, if the new Now we can update our genesis file. For instance, if the new
`priv_validator.json` looks like:
`priv_validator_key.json` looks like:
``` ```
{ {
@ -510,7 +510,7 @@ then the new `genesis.json` will be:
``` ```
Update the `genesis.json` in `~/.tendermint/config`. Copy the genesis Update the `genesis.json` in `~/.tendermint/config`. Copy the genesis
file and the new `priv_validator.json` to the `~/.tendermint/config` on
file and the new `priv_validator_key.json` to the `~/.tendermint/config` on
a new machine. a new machine.
Now run `tendermint node` on both machines, and use either Now run `tendermint node` on both machines, and use either


Loading…
Cancel
Save