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,ifcompilethebinarywithsourcecode)
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.
--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:stchainddebug [flags]stchainddebug [command]AvailableCommands:pubkeyDecodeaED25519pubkeyfromhex,base64,orbech32addrConvertanaddressbetweenhexandbech32raw-bytesConvertrawbytesoutput (eg. [10 2113255]) to hexFlags:-h,--helphelpfordebug
Run the full node application with Tendermint in or out of process. By default, the application will run with Tendermint in process.
Usage:stchaindstart [flags]Flags:--abcistringSpecifyabcitransport (socket |grpc) (default"socket")--addressstringListenaddress (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_intervalstringThepossibleintervalbetweenemptyblocks (default "0s")--cpu-profilestringEnableCPUprofilingandwritetotheprovidedfile --db_backend string Database backend: goleveldb | cleveldb | boltdb | rocksdb (default "goleveldb")
--db_dirstringDatabasedirectory (default "data")--fast_syncFastblockchainsyncing (default true)--genesis_hashbytesHexOptionalSHA-256hashofthegenesisfile --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,--helphelpforstart--inter-block-cacheEnableinter-blockcaching (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)
--monikerstringNodeName (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_peersstringComma-delimitedID@host:portpersistentpeers--p2p.pexEnable/disablePeer-Exchange (default true)--p2p.private_peer_idsstringComma-delimitedprivatepeerIDs--p2p.seed_modeEnable/disableseedmode--p2p.seedsstringComma-delimitedID@host:portseednodes--p2p.unconditional_peer_idsstringComma-delimitedIDsofunconditionalpeers--p2p.upnpEnable/disableUPNPportforwarding --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_laddrstringGRPClistenaddress (BroadcastTx only). Port required --rpc.laddr string RPC listen address. Port required (default "tcp://127.0.0.1:26657")
--rpc.unsafeEnabledunsaferpcmethods--trace-storestringEnableKVStoretracingtoanoutputfile--unsafe-skip-upgradesintsSkipasetofupgradeheightstocontinuetheoldbinary--with-tendermintRunabciappembeddedin-processwithtendermint (default true)
start command:
stchaindstart
Example:
$./stchaindstartI[2021-12-10|15:02:02.131]startingABCIwithTendermintmodule=mainI[2021-12-10|15:02:07.161]Executedblockmodule=stateheight=1validTxs=0invalidTxs=0I[2021-12-10|15:02:07.163] Committed state module=state height=1 txs=0 appHash=C68CBF3AB3CF91E5A5A8261D1E8D356D9397AAF6FCCAD23BFD9CF40247DBCC92
...
init
Initialize validator's and node's configuration files.
Usage:stchaindtendermint [command]AvailableCommands:show-node-idShowthisnode's ID show-validator Show this node'stendermintvalidatorinfoshow-addressShowsthisnode's tendermint validator consensus address version Print tendermint libraries'version