|
| 1 | +# Tendermint Validator |
| 2 | + |
| 3 | +A lightweight single key tendermint validator for sentry nodes. |
| 4 | + |
| 5 | +## Design |
| 6 | + |
| 7 | +A lightweight alternative to using a full node instance for validating blocks. The validator is able to connect to any number of sentry nodes and will sign blocks provided by the nodes. The validator maintains a watermark file to protect against double signing. |
| 8 | + |
| 9 | +## Pre-requisites |
| 10 | + |
| 11 | +Before starting, please make sure to fully understand node and validator requirements and operation for your particular network and chain. |
| 12 | + |
| 13 | +## Setup |
| 14 | + |
| 15 | +_The security of any key material is outside the scope of this guide. At a minimum we recommend performing key material steps on airgapped computers and using your audited security procedures._ |
| 16 | + |
| 17 | +### Setup Validator Instance |
| 18 | + |
| 19 | +Configure the instance with a [toml](https://github.com/toml-lang/toml) file. Below is a sample configuration. |
| 20 | + |
| 21 | +```toml |
| 22 | +# Path to priv validator key json file |
| 23 | +key_file = "/path/to/priv_validator_key.json" |
| 24 | + |
| 25 | +# The state directory stores watermarks for double signing protection. |
| 26 | +# Each validator instance maintains a watermark. |
| 27 | +state_dir = "/path/to/state/dir" |
| 28 | + |
| 29 | +# The network chain id for your p2p nodes |
| 30 | +chain_id = "chain-id-here" |
| 31 | + |
| 32 | +# Configure any number of p2p network nodes. |
| 33 | +# We recommend at least 2 nodes for redundancy. |
| 34 | +[[node]] |
| 35 | +address = "tcp://<node-a ip>:1234" |
| 36 | + |
| 37 | +[[node]] |
| 38 | +address = "tcp://<node-b ip>:1234" |
| 39 | +``` |
| 40 | + |
| 41 | +## Configure p2p network nodes |
| 42 | + |
| 43 | +Validators are not directly connected to the p2p network nor do they store chain and application state. They rely on nodes to receive blocks from the p2p network, make signing requests, and relay the signed blocks back to the p2p network. |
| 44 | + |
| 45 | +To make a node available as a relay for a validator, find the `priv_validator_laddr` (or equivalent) configuration item in your node's configuration file. Change this value, to accept connections on an IP address and port of your choosing. |
| 46 | + |
| 47 | +```diff |
| 48 | + # TCP or UNIX socket address for Tendermint to listen on for |
| 49 | + # connections from an external PrivValidator process |
| 50 | +-priv_validator_laddr = "" |
| 51 | ++priv_validator_laddr = "tcp://0.0.0.0:1234" |
| 52 | +``` |
| 53 | + |
| 54 | +_Full configuration and operation of your tendermint node is outside the scope of this guide. You should consult your network's documentation for node configuration._ |
| 55 | + |
| 56 | +_We recommend hosting nodes on separate and isolated infrastructure from your validator instances._ |
| 57 | + |
| 58 | +## Launch validator |
| 59 | + |
| 60 | +Once your validator instance and node is configured, you can launch the signer. |
| 61 | + |
| 62 | +```bash |
| 63 | +signer --config /path/to/config.toml |
| 64 | +``` |
| 65 | + |
| 66 | +_We recommend using systemd or similar service management program as appropriate for your runtime platform._ |
| 67 | + |
| 68 | +## Security |
| 69 | + |
| 70 | +Security and management of any key material is outside the scope of this service. Always consider your own security and risk profile when dealing with sensitive keys, services, or infrastructure. |
| 71 | + |
| 72 | +## No Liability |
| 73 | + |
| 74 | +As far as the law allows, this software comes as is, |
| 75 | +without any warranty or condition, and no contributor |
| 76 | +will be liable to anyone for any damages related to this |
| 77 | +software or this license, under any kind of legal claim. |
| 78 | + |
| 79 | +## References |
| 80 | + |
| 81 | +- https://docs.tendermint.com/master/tendermint-core/validators.html |
| 82 | +- https://hub.cosmos.network/master/validators/overview.html |
0 commit comments