You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
8.4 KiB

7 years ago
  1. # Configuration
  2. Tendermint Core can be configured via a TOML file in
  3. `$TMHOME/config/config.toml`. Some of these parameters can be overridden by
  4. command-line flags. For most users, the options in the `##### main base configuration options #####` are intended to be modified while
  5. config options further below are intended for advance power users.
  6. ## Options
  7. The default configuration file create by `tendermint init` has all
  8. the parameters set with their default values. It will look something
  9. like the file below, however, double check by inspecting the
  10. `config.toml` created with your version of `tendermint` installed:
  11. ```
  12. # This is a TOML config file.
  13. # For more information, see https://github.com/toml-lang/toml
  14. ##### main base config options #####
  15. # TCP or UNIX socket address of the ABCI application,
  16. # or the name of an ABCI application compiled in with the Tendermint binary
  17. proxy_app = "tcp://127.0.0.1:26658"
  18. # A custom human readable name for this node
  19. moniker = "anonymous"
  20. # If this node is many blocks behind the tip of the chain, FastSync
  21. # allows them to catchup quickly by downloading blocks in parallel
  22. # and verifying their commits
  23. fast_sync = true
  24. # Database backend: leveldb | memdb | cleveldb
  25. db_backend = "leveldb"
  26. # Database directory
  27. db_dir = "data"
  28. # Output level for logging, including package level options
  29. log_level = "main:info,state:info,*:error"
  30. # Output format: 'plain' (colored text) or 'json'
  31. log_format = "plain"
  32. ##### additional base config options #####
  33. # Path to the JSON file containing the initial validator set and other meta data
  34. genesis_file = "config/genesis.json"
  35. # Path to the JSON file containing the private key to use as a validator in the consensus protocol
  36. priv_validator_file = "config/priv_validator.json"
  37. # TCP or UNIX socket address for Tendermint to listen on for
  38. # connections from an external PrivValidator process
  39. priv_validator_laddr = ""
  40. # Path to the JSON file containing the private key to use for node authentication in the p2p protocol
  41. node_key_file = "config/node_key.json"
  42. # Mechanism to connect to the ABCI application: socket | grpc
  43. abci = "socket"
  44. # TCP or UNIX socket address for the profiling server to listen on
  45. prof_laddr = ""
  46. # If true, query the ABCI app on connecting to a new peer
  47. # so the app can decide if we should keep the connection or not
  48. filter_peers = false
  49. ##### advanced configuration options #####
  50. ##### rpc server configuration options #####
  51. [rpc]
  52. # TCP or UNIX socket address for the RPC server to listen on
  53. laddr = "tcp://0.0.0.0:26657"
  54. # A list of origins a cross-domain request can be executed from
  55. # Default value '[]' disables cors support
  56. # Use '["*"]' to allow any origin
  57. cors_allowed_origins = []
  58. # A list of methods the client is allowed to use with cross-domain requests
  59. cors_allowed_methods = ["HEAD", "GET", "POST"]
  60. # A list of non simple headers the client is allowed to use with cross-domain requests
  61. cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"]
  62. # TCP or UNIX socket address for the gRPC server to listen on
  63. # NOTE: This server only supports /broadcast_tx_commit
  64. grpc_laddr = ""
  65. # Maximum number of simultaneous connections.
  66. # Does not include RPC (HTTP&WebSocket) connections. See max_open_connections
  67. # If you want to accept a larger number than the default, make sure
  68. # you increase your OS limits.
  69. # 0 - unlimited.
  70. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
  71. # 1024 - 40 - 10 - 50 = 924 = ~900
  72. grpc_max_open_connections = 900
  73. # Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
  74. unsafe = false
  75. # Maximum number of simultaneous connections (including WebSocket).
  76. # Does not include gRPC connections. See grpc_max_open_connections
  77. # If you want to accept a larger number than the default, make sure
  78. # you increase your OS limits.
  79. # 0 - unlimited.
  80. # Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
  81. # 1024 - 40 - 10 - 50 = 924 = ~900
  82. max_open_connections = 900
  83. ##### peer to peer configuration options #####
  84. [p2p]
  85. # Address to listen for incoming connections
  86. laddr = "tcp://0.0.0.0:26656"
  87. # Address to advertise to peers for them to dial
  88. # If empty, will use the same port as the laddr,
  89. # and will introspect on the listener or use UPnP
  90. # to figure out the address.
  91. external_address = ""
  92. # Comma separated list of seed nodes to connect to
  93. seeds = ""
  94. # Comma separated list of nodes to keep persistent connections to
  95. persistent_peers = ""
  96. # UPNP port forwarding
  97. upnp = false
  98. # Path to address book
  99. addr_book_file = "config/addrbook.json"
  100. # Set true for strict address routability rules
  101. # Set false for private or local networks
  102. addr_book_strict = true
  103. # Maximum number of inbound peers
  104. max_num_inbound_peers = 40
  105. # Maximum number of outbound peers to connect to, excluding persistent peers
  106. max_num_outbound_peers = 10
  107. # Time to wait before flushing messages out on the connection
  108. flush_throttle_timeout = "100ms"
  109. # Maximum size of a message packet payload, in bytes
  110. max_packet_msg_payload_size = 1024
  111. # Rate at which packets can be sent, in bytes/second
  112. send_rate = 5120000
  113. # Rate at which packets can be received, in bytes/second
  114. recv_rate = 5120000
  115. # Set true to enable the peer-exchange reactor
  116. pex = true
  117. # Seed mode, in which node constantly crawls the network and looks for
  118. # peers. If another node asks it for addresses, it responds and disconnects.
  119. #
  120. # Does not work if the peer-exchange reactor is disabled.
  121. seed_mode = false
  122. # Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
  123. private_peer_ids = ""
  124. # Toggle to disable guard against peers connecting from the same ip.
  125. allow_duplicate_ip = false
  126. # Peer connection configuration.
  127. handshake_timeout = "20s"
  128. dial_timeout = "3s"
  129. ##### mempool configuration options #####
  130. [mempool]
  131. recheck = true
  132. broadcast = true
  133. wal_dir = ""
  134. # Maximum number of transactions in the mempool
  135. size = 5000
  136. # Limit the total size of all txs in the mempool.
  137. # This only accounts for raw transactions (e.g. given 1MB transactions and
  138. # max_txs_bytes=5MB, mempool will only accept 5 transactions).
  139. max_txs_bytes = 1073741824
  140. # Size of the cache (used to filter transactions we saw earlier) in transactions
  141. cache_size = 10000
  142. ##### consensus configuration options #####
  143. [consensus]
  144. wal_file = "data/cs.wal/wal"
  145. timeout_propose = "3s"
  146. timeout_propose_delta = "500ms"
  147. timeout_prevote = "1s"
  148. timeout_prevote_delta = "500ms"
  149. timeout_precommit = "1s"
  150. timeout_precommit_delta = "500ms"
  151. timeout_commit = "1s"
  152. # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
  153. skip_timeout_commit = false
  154. # EmptyBlocks mode and possible interval between empty blocks
  155. create_empty_blocks = true
  156. create_empty_blocks_interval = "0s"
  157. # Reactor sleep duration parameters
  158. peer_gossip_sleep_duration = "100ms"
  159. peer_query_maj23_sleep_duration = "2s"
  160. # Block time parameters. Corresponds to the minimum time increment between consecutive blocks.
  161. blocktime_iota = "1s"
  162. ##### transactions indexer configuration options #####
  163. [tx_index]
  164. # What indexer to use for transactions
  165. #
  166. # Options:
  167. # 1) "null"
  168. # 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend).
  169. indexer = "kv"
  170. # Comma-separated list of tags to index (by default the only tag is "tx.hash")
  171. #
  172. # You can also index transactions by height by adding "tx.height" tag here.
  173. #
  174. # It's recommended to index only a subset of tags due to possible memory
  175. # bloat. This is, of course, depends on the indexer's DB and the volume of
  176. # transactions.
  177. index_tags = ""
  178. # When set to true, tells indexer to index all tags (predefined tags:
  179. # "tx.hash", "tx.height" and all tags from DeliverTx responses).
  180. #
  181. # Note this may be not desirable (see the comment above). IndexTags has a
  182. # precedence over IndexAllTags (i.e. when given both, IndexTags will be
  183. # indexed).
  184. index_all_tags = false
  185. ##### instrumentation configuration options #####
  186. [instrumentation]
  187. # When true, Prometheus metrics are served under /metrics on
  188. # PrometheusListenAddr.
  189. # Check out the documentation for the list of available metrics.
  190. prometheus = false
  191. # Address to listen for Prometheus collector(s) connections
  192. prometheus_listen_addr = ":26660"
  193. # Maximum number of simultaneous connections.
  194. # If you want to accept a larger number than the default, make sure
  195. # you increase your OS limits.
  196. # 0 - unlimited.
  197. max_open_connections = 3
  198. # Instrumentation namespace
  199. namespace = "tendermint"
  200. ```