Stratos-chain 'stchaincli' Commands(Part1)
This document is the first part that describes a summarized list of 'stchaincli' 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 bandwidthSoftware(tested version):
* Ubuntu 18.04+
* Go 1.16+ linux/amd64 (optional, if compile the binary with source code)Get Connected to Stratos Chain Testnet
Please refer to stratos-chain-testnet to
Directory Structure
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.
.stchaincli contains the folder keyring-test-cosmos, which holds the wallet info and wallet address
.stchaind contains config and data folders.
'stchaincli' Commands
'stchaincli' CommandsFor ease of use, these commands have been classified by the following modules:
PART 1:
PART 2:
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 stchaincli commands.
Bank Module
Transaction
-send
Create and sign a send transaction.
Tx command:
Example:
Distribution Module
Transactions
-withdraw-rewards
Withdraw rewards from a given delegation address and optionally withdraw validator's commission if the delegation address given is a validator operator.
Tx command:
Example:
-withdraw-all-rewards
Withdraw all delegation rewards for a delegator.
Tx command:
Example:
Queries
commission
Query validator commission rewards from delegators to that validator.
commission Example
Query command:
Example:
rewards
Query all rewards earned by a delegator, optionally restrict to rewards from a single validator.
rewards Example
Query command:
Example:
validator-outstanding-rewards
Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations.
validator-outstanding-rewards Example
Query command:
Example:
community-pool
Query all coins in the community pool which is under Governance control.
community-pool Example
Query command:
Example:
slashes
Query all slashes of a validator for a given block range.
slashes Example
Query command:
Example:
distribution-params
Query distribution params.
params Example
Query command:
Example:
Gov Module
Transactions
-submit-proposal
Submit a proposal along with an initial deposit. Proposal title, description, type and deposit can be given directly or through a proposal JSON file.
Except for itself, the command submit-proposal also provides three sub-commands, param-change, community-pool-spend and software-upgrade, to submit a proposal for changing global parameters, distributing funds in community-pool and upgrading software.
submit-proposal Example
Where proposal.json contains:
submit-proposal Tx command:
Example:
param-change Example
Submit a parameter proposal along with an initial deposit. The proposal details must be supplied via a JSON file. For values that contains objects, only non-empty fields will be updated.
param-change tx command:
Suppose we need to change the MaxValidators in staking Module, so the param_change.json could be:
Example:
community-pool-spend Example
Submit a community pool spend proposal along with an initial deposit. The proposal details must be supplied via a JSON file.
community-pool-spend tx command:
The proposal.json could be:
Example:
software-upgrade Example
Submit a software upgrade along with an initial deposit.
software-upgrade tx command:
-deposit
Deposit tokens for an active proposal by proposal-id which can be found with the command stchaincli query gov proposals.
Tx command:
Example:
-vote
Submit a vote for an active proposal. Vote options include yes/no/no_with_veto/abstain.
Tx command:
Example:
Queries
proposal
Query details for a proposal. You can find the proposal-id by running ./stchaincli query gov proposals
Query command:
Example:
proposals
Query details of all proposals with optional filters(flags).
Query command:
Example:
vote
Query details for a single vote on a proposal given its identifier.
Query command:
Example:
votes
Query vote details for a single proposal by its identifier.
Query command:
Example:
deposit
Query details for a single proposal deposit on a proposal by its identifier.
Query command:
Example:
deposits
Query details for all deposits on a proposal.
Query command:
Example:
Slashing Module
Transaction
-unjail
Unjail a jailed validator.
Tx command:
Example:
Queries
signing-info
Use a validators' consensus public key to find the signing-info for that validator.
Query command:
Example:
slashing-params
Query genesis parameters for the slashing module.
Query command:
Example:
Staking Module
Transactions
-delegate
Delegate an amount of liquid coins to a validator from your wallet.
Tx command:
Example:
-redelegate
Redelegate an amount of illiquid staking tokens from one validator to another.
Tx command:
Example:
-unbond
Unbond an amount of bonded shares from a validator.
Tx command:
Example:
-create-validator
Create new validator initialized with a self-delegation to it.
Tx command:
Example:
-edit-validator
Edit an existing validator account.
Tx command:
Example:
min_self_delegation allows to increase only
commission-max-rate cannot be changed after create-validator
commission-max-change-ratecannot be changed after create-validator
Queries
delegation
Query a delegation based on delegator address and validator address.
Query command:
Example:
delegations
Query delegations for an individual delegator on all validators.
Query command:
Example:
delegations-to
Query all delegations made to one validator.
Query command:
Example:
unbonding-delegations
Query unbonding delegations for an individual delegator.
Query command:
Example:
unbonding-delegation
Query unbonding delegations for an individual delegator on an individual validator.
Cosmos SDK has reported a bug on this query command
Please refer to here and here for more details.
Query command:
Example:
unbonding-delegations-from
Query all unbonding delegatations from a validator.
Query command:
Example:
redelegation
Query a redelegation record based on delegator and a source and destination validator address.
Query command:
Example:
redelegations
Query all redelegations records for one delegator.
Query command:
Example:
redelegations-from
Query all unbonding delegations from a validator.
Query command:
Example:
historical-info
Query historical info at given height.
Example
When the skating parameters are the following, for example
Query command:
Example:
pool
Query values for amounts stored in the staking pool.
Query command:
Example:
staking-params
Query values set as staking parameters.
Query command:
Example:
validator
Query details about an individual validator
Query command:
Example:
validators
Query values for amounts stored in the staking pool.
Query command:
Example:
Others
Qconfig
Create or query an application CLI configuration file.
Create config Example
Tx command:
Example:
Query config Example
Query command:
Example:
keys
Keys allow user to manage your local keystore for tendermint.
Queries
list
Query command:
Example:
rest-server
Start LCD (light-client daemon), a local REST server.
Query command:
Example:
status
Query remote node for status.
Query command:
Example:
version
Print the app version.
uery command:
Example:
account
Query account balance.
Query command:
Example:
tendermint-validator-set
Get the full tendermint validator set at given height
Query command:
Example:
block
Get verified data for a block at given height.
Query command:
Example:
txs
Search for transactions that match the exact given events where results are paginated. Each event takes the form of '{eventType}.{eventAttribute}={value}'. Please refer to each module's documentation for the full set of events to query for.
Query command:
Example:
tx
Query for a transaction by hash in a committed block.
Query command:
Example:
Last updated