This document describes a summarized list of `stchaind` commands for Stratos Chain.
Overview
Hardware and Software Requirements
Unlike other projects, Stratos does not require expensive GPUs and high wattage power supplies, but if the node wants to obtain revenue, it needs to provide enough bandwidth and storage capacity to ensure the traffic on the node can reach the reward requirements. We recommend the following to run your node:
* CPU i5 4 cores
* 16GB memory
* 2TB hard disk
* 100M bandwidth
Software(tested version):
* Ubuntu 18.04+
* Go 1.16+ linux/amd64 (optional, if compile the binary with source code)
After the node has caught up to the latest block, your Stratos-chain Wallet has been created and fed with an amount of tokens, the $HOME directory should include the following directories and files.
By default, the two binary executable files stchaincli and stchaind as well as two directories .stchaincl and .stchaind have been saved or created in the $HOME folder. If you are not sure what is your$HOMEfolder, in terminal, use 'echo $HOME' to check. In the following instruction, we suppose you have entered the $HOMEfolder
$ echo $HOME
/home/<your login username>
$ echo $HOME
/Users/<your login username>
.stchaincli contains the folder keyring-test-cosmos, which holds the wallet info and wallet address
app.toml contains the default settings required for app.
config.toml contains various options pertaining to the stratos-chain configurations.
genesis.json defines the initial state upon genesis of stratos-chain.
node_key.json contains the node private key and should thus be kept secret.
priv_validator_key.json contains the validator address, public key and private key, and should thus be kept secret.
In data folder:
All *.db folders are Tendermint databases
Tendermint uses a write ahead log (WAL) for consensus
priv_validator_state.jsonholds the validator's state
'stchaind' Commands
Global Flags
Each command has its specific flags as well as several global flags. The specific flags will be explained along with each command, while the global flags are summarized as the following that can be used for all stchaind commands.
Global Flags (can be used for all `stchaind` commands):
--home string directory for config and data (default "$HOME/.stchaind")
--inv-check-period uint Assert registered invariants every N blocks
--log_level string Log level (default "main:info,state:info,*:error")
--trace print out full stack trace on errors
--chain-id the current chain-id may change when updating in testing phase . When it is applied, user needs to point out current chain-id which can be found on this page, right next to the search bar at the top of the page.
--home is the directory containing a node's configurations and data. By default, node's account info is saved or created under $HOME/.stchaind. In this case, user does not need to add --home flag in the commands. Otherwise, user has to use this flag to specify the path to the node's root directory(default '$HOME') explicitly if not using the default directory. In the following instruction, we suppose the node's configurations and data have been installed or created under $HOME/.stchaind and skip the --home flag. User can add it where applicable.
debug
Tool for helping with debugging your application.
Usage:
stchaind debug [flags]
stchaind debug [command]
Available Commands:
pubkey Decode a ED25519 pubkey from hex, base64, or bech32
addr Convert an address between hex and bech32
raw-bytes Convert raw bytes output (eg. [10 21 13 255]) to hex
Flags:
-h, --help help for debug
pubkey
Decode a pubkey from hex, base64, or bech32.
Usage:
stchaind debug pubkey <pubkey> [flags]
Flags:
-h, --help help for pubkey
Usage:
stchaind export [flags]
Flags:
--for-zero-height Export state to start at height zero (perform preproccessing)
--height int Export state from a particular height (-1 means latest height) (default -1)
-h, --help help for export
--jail-whitelist strings List of validators to not jail state export
export command:
stchaind export > <file path>
Example:
stchaind export > dump.json
version
Print the app version.
Usage:
stchaind version [flags]
Flags:
-h, --help help for version
--long Print long version information
version command:
stchaind version
Example:
$ ./stchaind version
v0.3.0
start
Run the full node application with Tendermint in or out of process. By default, the application will run with Tendermint in process.
Usage:
stchaind start [flags]
Flags:
--abci string Specify abci transport (socket | grpc) (default "socket")
--address string Listen address (default "tcp://0.0.0.0:26658")
--consensus.create_empty_blocks Set this to false to only produce blocks when there are txs or when the AppHash changes (default true)
--consensus.create_empty_blocks_interval string The possible interval between empty blocks (default "0s")
--cpu-profile string Enable CPU profiling and write to the provided file
--db_backend string Database backend: goleveldb | cleveldb | boltdb | rocksdb (default "goleveldb")
--db_dir string Database directory (default "data")
--fast_sync Fast blockchain syncing (default true)
--genesis_hash bytesHex Optional SHA-256 hash of the genesis file
--halt-height uint Block height at which to gracefully halt the chain and shutdown the node
--halt-time uint Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node
-h, --help help for start
--inter-block-cache Enable inter-block caching (default true)
--minimum-gas-prices string Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photino;0.0001stake)
--moniker string Node Name (default "ubuntu")
--p2p.laddr string Node listen address. (0.0.0.0:0 means any interface, any port) (default "tcp://0.0.0.0:26656")
--p2p.persistent_peers string Comma-delimited ID@host:port persistent peers
--p2p.pex Enable/disable Peer-Exchange (default true)
--p2p.private_peer_ids string Comma-delimited private peer IDs
--p2p.seed_mode Enable/disable seed mode
--p2p.seeds string Comma-delimited ID@host:port seed nodes
--p2p.unconditional_peer_ids string Comma-delimited IDs of unconditional peers
--p2p.upnp Enable/disable UPNP port forwarding
--priv_validator_laddr string Socket address to listen on for connections from external priv_validator process
--proxy_app string Proxy app address, or one of: 'kvstore', 'persistent_kvstore', 'counter', 'counter_serial' or 'noop' for local testing. (default "tcp://127.0.0.1:26658")
--pruning string Pruning strategy (default|nothing|everything|custom) (default "default")
--pruning-interval uint Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')
--pruning-keep-every uint Offset heights to keep on disk after 'keep-every' (ignored if pruning is not 'custom')
--pruning-keep-recent uint Number of recent heights to keep on disk (ignored if pruning is not 'custom')
--rpc.grpc_laddr string GRPC listen address (BroadcastTx only). Port required
--rpc.laddr string RPC listen address. Port required (default "tcp://127.0.0.1:26657")
--rpc.unsafe Enabled unsafe rpc methods
--trace-store string Enable KVStore tracing to an output file
--unsafe-skip-upgrades ints Skip a set of upgrade heights to continue the old binary
--with-tendermint Run abci app embedded in-process with tendermint (default true)
Initialize validator's and node's configuration files.
Usage:
stchaind init [moniker] [flags]
Flags:
--chain-id string genesis file chain-id, if left blank will be randomly created
-h, --help help for init
-o, --overwrite overwrite the genesis.json file
init command:
stchaind init <node name you prefer> --chain-id=<current chain-id>
Usage:
stchaind tendermint [command]
Available Commands:
show-node-id Show this node's ID
show-validator Show this node's tendermint validator info
show-address Shows this node's tendermint validator consensus address
version Print tendermint libraries' version
show-node-id
Show this node's ID.
Usage:
stchaind tendermint show-node-id [flags]
Flags:
-h, --help help for show-node-id