github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/docs/architecture/adr-052-tendermint-mode.md (about) 1 # ADR 052: Tendermint Mode 2 3 ## Changelog 4 5 * 27-11-2019: Initial draft from ADR-051 6 * 13-01-2020: Separate ADR Tendermint Mode from ADR-051 7 8 ## Context 9 10 - Fullnode mode: fullnode mode does not have the capability to become a validator. 11 - Validator mode : this mode is exactly same as existing state machine behavior. sync without voting on consensus, and participate consensus when fully synced 12 - Seed mode : lightweight seed mode maintaining an address book, p2p like [TenderSeed](https://gitlab.com/polychainlabs/tenderseed) 13 14 ## Decision 15 16 We would like to suggest a simple Tendermint mode abstraction. These modes will live under one binary, and when initializing a node the user will be able to specify which node they would like to create. 17 18 - Which reactor, component to include for each node 19 - fullnode *(default)* 20 - switch, transport 21 - reactors 22 - mempool 23 - consensus 24 - evidence 25 - blockchain 26 - p2p/pex 27 - rpc (safe connections only) 28 - *~~no privValidator(priv_validator_key.json, priv_validator_state.json)~~* 29 - validator 30 - switch, transport 31 - reactors 32 - mempool 33 - consensus 34 - evidence 35 - blockchain 36 - p2p/pex 37 - rpc (safe connections only) 38 - with privValidator(priv_validator_key.json, priv_validator_state.json) 39 - seed 40 - switch, transport 41 - reactor 42 - p2p/pex 43 - Configuration, cli command 44 - We would like to suggest by introducing `mode` parameter in `config.toml` and cli 45 - <span v-pre>`mode = "{{ .BaseConfig.Mode }}"`</span> in `config.toml` 46 - `tendermint node --mode validator` in cli 47 - fullnode | validator | seed (default: "fullnode") 48 - RPC modification 49 - `host:26657/status` 50 - return empty `validator_info` when fullnode mode 51 - no rpc server in seed mode 52 - Where to modify in codebase 53 - Add switch for `config.Mode` on `node/node.go:DefaultNewNode` 54 - If `config.Mode==validator`, call default `NewNode` (current logic) 55 - If `config.Mode==fullnode`, call `NewNode` with `nil` `privValidator` (do not load or generation) 56 - Need to add exception routine for `nil` `privValidator` to related functions 57 - If `config.Mode==seed`, call `NewSeedNode` (seed version of `node/node.go:NewNode`) 58 - Need to add exception routine for `nil` `reactor`, `component` to related functions 59 60 ## Status 61 62 Proposed 63 64 ## Consequences 65 66 ### Positive 67 68 - Node operators can choose mode when they run state machine according to the purpose of the node. 69 - Mode can prevent mistakes because users have to specify which mode they want to run via flag. (eg. If a user want to run a validator node, she/he should explicitly write down validator as mode) 70 - Different mode needs different reactors, resulting in efficient resource usage. 71 72 ### Negative 73 74 - Users need to study how each mode operate and which capability it has. 75 76 ### Neutral 77 78 ## References 79 80 - Issue [#2237](https://github.com/tendermint/tendermint/issues/2237) : Tendermint "mode" 81 - [TenderSeed](https://gitlab.com/polychainlabs/tenderseed) : A lightweight Tendermint Seed Node.