|
@ -22,34 +22,34 @@ var ( |
|
|
// These are exposed for convenience of commands embedding a tendermint node
|
|
|
// These are exposed for convenience of commands embedding a tendermint node
|
|
|
func AddNodeFlags(cmd *cobra.Command) { |
|
|
func AddNodeFlags(cmd *cobra.Command) { |
|
|
// bind flags
|
|
|
// bind flags
|
|
|
cmd.Flags().String("moniker", config.Moniker, "Node Name") |
|
|
|
|
|
|
|
|
cmd.Flags().String("moniker", config.Moniker, "node name") |
|
|
|
|
|
|
|
|
// priv val flags
|
|
|
// priv val flags
|
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"priv_validator_laddr", |
|
|
"priv_validator_laddr", |
|
|
config.PrivValidatorListenAddr, |
|
|
config.PrivValidatorListenAddr, |
|
|
"Socket address to listen on for connections from external priv_validator process") |
|
|
|
|
|
|
|
|
"socket address to listen on for connections from external priv_validator process") |
|
|
|
|
|
|
|
|
// node flags
|
|
|
// node flags
|
|
|
cmd.Flags().Bool("fast_sync", config.FastSyncMode, "Fast blockchain syncing") |
|
|
|
|
|
|
|
|
cmd.Flags().Bool("fast_sync", config.FastSyncMode, "fast blockchain syncing") |
|
|
cmd.Flags().BytesHexVar( |
|
|
cmd.Flags().BytesHexVar( |
|
|
&genesisHash, |
|
|
&genesisHash, |
|
|
"genesis_hash", |
|
|
"genesis_hash", |
|
|
[]byte{}, |
|
|
[]byte{}, |
|
|
"Optional SHA-256 hash of the genesis file") |
|
|
|
|
|
|
|
|
"optional SHA-256 hash of the genesis file") |
|
|
cmd.Flags().Int64("consensus.double_sign_check_height", config.Consensus.DoubleSignCheckHeight, |
|
|
cmd.Flags().Int64("consensus.double_sign_check_height", config.Consensus.DoubleSignCheckHeight, |
|
|
"How many blocks to look back to check existence of the node's "+ |
|
|
|
|
|
|
|
|
"how many blocks to look back to check existence of the node's "+ |
|
|
"consensus votes before joining consensus") |
|
|
"consensus votes before joining consensus") |
|
|
|
|
|
|
|
|
// abci flags
|
|
|
// abci flags
|
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"proxy_app", |
|
|
"proxy_app", |
|
|
config.ProxyApp, |
|
|
config.ProxyApp, |
|
|
"Proxy app address, or one of: 'kvstore',"+ |
|
|
|
|
|
|
|
|
"proxy app address, or one of: 'kvstore',"+ |
|
|
" 'persistent_kvstore',"+ |
|
|
" 'persistent_kvstore',"+ |
|
|
" 'counter',"+ |
|
|
" 'counter',"+ |
|
|
" 'counter_serial' or 'noop' for local testing.") |
|
|
" 'counter_serial' or 'noop' for local testing.") |
|
|
cmd.Flags().String("abci", config.ABCI, "Specify abci transport (socket | grpc)") |
|
|
|
|
|
|
|
|
cmd.Flags().String("abci", config.ABCI, "specify abci transport (socket | grpc)") |
|
|
|
|
|
|
|
|
// rpc flags
|
|
|
// rpc flags
|
|
|
cmd.Flags().String("rpc.laddr", config.RPC.ListenAddress, "RPC listen address. Port required") |
|
|
cmd.Flags().String("rpc.laddr", config.RPC.ListenAddress, "RPC listen address. Port required") |
|
@ -57,42 +57,42 @@ func AddNodeFlags(cmd *cobra.Command) { |
|
|
"rpc.grpc_laddr", |
|
|
"rpc.grpc_laddr", |
|
|
config.RPC.GRPCListenAddress, |
|
|
config.RPC.GRPCListenAddress, |
|
|
"GRPC listen address (BroadcastTx only). Port required") |
|
|
"GRPC listen address (BroadcastTx only). Port required") |
|
|
cmd.Flags().Bool("rpc.unsafe", config.RPC.Unsafe, "Enabled unsafe rpc methods") |
|
|
|
|
|
|
|
|
cmd.Flags().Bool("rpc.unsafe", config.RPC.Unsafe, "enabled unsafe rpc methods") |
|
|
cmd.Flags().String("rpc.pprof_laddr", config.RPC.PprofListenAddress, "pprof listen address (https://golang.org/pkg/net/http/pprof)") |
|
|
cmd.Flags().String("rpc.pprof_laddr", config.RPC.PprofListenAddress, "pprof listen address (https://golang.org/pkg/net/http/pprof)") |
|
|
|
|
|
|
|
|
// p2p flags
|
|
|
// p2p flags
|
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"p2p.laddr", |
|
|
"p2p.laddr", |
|
|
config.P2P.ListenAddress, |
|
|
config.P2P.ListenAddress, |
|
|
"Node listen address. (0.0.0.0:0 means any interface, any port)") |
|
|
|
|
|
cmd.Flags().String("p2p.seeds", config.P2P.Seeds, "Comma-delimited ID@host:port seed nodes") |
|
|
|
|
|
cmd.Flags().String("p2p.persistent_peers", config.P2P.PersistentPeers, "Comma-delimited ID@host:port persistent peers") |
|
|
|
|
|
|
|
|
"node listen address. (0.0.0.0:0 means any interface, any port)") |
|
|
|
|
|
cmd.Flags().String("p2p.seeds", config.P2P.Seeds, "comma-delimited ID@host:port seed nodes") |
|
|
|
|
|
cmd.Flags().String("p2p.persistent_peers", config.P2P.PersistentPeers, "comma-delimited ID@host:port persistent peers") |
|
|
cmd.Flags().String("p2p.unconditional_peer_ids", |
|
|
cmd.Flags().String("p2p.unconditional_peer_ids", |
|
|
config.P2P.UnconditionalPeerIDs, "Comma-delimited IDs of unconditional peers") |
|
|
|
|
|
cmd.Flags().Bool("p2p.upnp", config.P2P.UPNP, "Enable/disable UPNP port forwarding") |
|
|
|
|
|
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable/disable Peer-Exchange") |
|
|
|
|
|
cmd.Flags().Bool("p2p.seed_mode", config.P2P.SeedMode, "Enable/disable seed mode") |
|
|
|
|
|
cmd.Flags().String("p2p.private_peer_ids", config.P2P.PrivatePeerIDs, "Comma-delimited private peer IDs") |
|
|
|
|
|
|
|
|
config.P2P.UnconditionalPeerIDs, "comma-delimited IDs of unconditional peers") |
|
|
|
|
|
cmd.Flags().Bool("p2p.upnp", config.P2P.UPNP, "enable/disable UPNP port forwarding") |
|
|
|
|
|
cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "enable/disable Peer-Exchange") |
|
|
|
|
|
cmd.Flags().Bool("p2p.seed_mode", config.P2P.SeedMode, "enable/disable seed mode") |
|
|
|
|
|
cmd.Flags().String("p2p.private_peer_ids", config.P2P.PrivatePeerIDs, "comma-delimited private peer IDs") |
|
|
|
|
|
|
|
|
// consensus flags
|
|
|
// consensus flags
|
|
|
cmd.Flags().Bool( |
|
|
cmd.Flags().Bool( |
|
|
"consensus.create_empty_blocks", |
|
|
"consensus.create_empty_blocks", |
|
|
config.Consensus.CreateEmptyBlocks, |
|
|
config.Consensus.CreateEmptyBlocks, |
|
|
"Set this to false to only produce blocks when there are txs or when the AppHash changes") |
|
|
|
|
|
|
|
|
"set this to false to only produce blocks when there are txs or when the AppHash changes") |
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"consensus.create_empty_blocks_interval", |
|
|
"consensus.create_empty_blocks_interval", |
|
|
config.Consensus.CreateEmptyBlocksInterval.String(), |
|
|
config.Consensus.CreateEmptyBlocksInterval.String(), |
|
|
"The possible interval between empty blocks") |
|
|
|
|
|
|
|
|
"the possible interval between empty blocks") |
|
|
|
|
|
|
|
|
// db flags
|
|
|
// db flags
|
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"db_backend", |
|
|
"db_backend", |
|
|
config.DBBackend, |
|
|
config.DBBackend, |
|
|
"Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb") |
|
|
|
|
|
|
|
|
"database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb") |
|
|
cmd.Flags().String( |
|
|
cmd.Flags().String( |
|
|
"db_dir", |
|
|
"db_dir", |
|
|
config.DBPath, |
|
|
config.DBPath, |
|
|
"Database directory") |
|
|
|
|
|
|
|
|
"database directory") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// NewRunNodeCmd returns the command that allows the CLI to start a node.
|
|
|
// NewRunNodeCmd returns the command that allows the CLI to start a node.
|
|
|