Staking is an important basic module supporting PoS (Proof of Stake) consensus mechanism. It determines the number of block producer sets in each election period according to the total amount of delegated proof of stake accepted by validators, and dynamically determines the block order according to the voting power. Meanwhile, it also provides necessary support for delegation relationships and information query of validators to distribution and governance modules.
Through staking, you can freely create validators, update validators, delegate proof of stake to trusted validators, cancel delegation from validators that you no longer trust, and re-delegate proof of stake to other validators.
OKTC will re-elect block generation nodes from each set at each fixed block height interval which is called cycle. The block generation set is fixed and the identities of block generation nodes in the set remain unchanged during the same cycle. At the penultimate block height interval during the same cycle, staking will rotate the block generation node sets for the next cycle. The top 21 nodes with the highest number of okt will become the block generation nodes in the next cycle, and the nodes which are not the top 21 ones with the highest number of okt in the set will be forced to quit. The number of okt should only be an integer, and the decimal part is not considered when the comparison of the numbers of nodes supported by the sets is made during rotation. OKTC will re-elect block generation nodes at each fixed block height interval, called cycle. The block producer will be changed every 252 blocks (a cycle), and the next producer is elected on the 251th block of a cycle. This change takes effect in the 1st block of the next cycle. The top 21 nodes with the highest number of OKT will become the block generation nodes in the next cycle, and the nodes which are not within the top 21 ones with the highest number of OKT in the set will be forced to quit. The number of OKT should only be an integer, and the decimal part is not considered when the comparison of the numbers of nodes supported by the sets is made during each rotation.
NOTE: Before reading the following documents, it is recommended that you read delegators-guide-cli first. If you need to get OKT, you can get it here.
Staking cli command contains the following commonly commands.
NOTE: For more cli, it is recommended that you read delegators-staking-cli.
Upgrade a node to a validator and set the description on a validator.
exchaincli tx staking create-validator --pubkey=$(exchaind tendermint show-validator) --moniker="my nickname" --identity="logo|||http://mywebsite/pic/logo.jpg" --website="http://mywebsite" --details="my slogan" --from <yourKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice>
NOTE: If you set home flag when executing
exchaind start
,exchaind tendermint show-validator
the inputs after home flag should be the same asokexcahind start
.
The operator can update the description of the validator and adjust the commission rate.
exchaincli tx staking edit-validator --moniker=“my new nickname” --identity="logo|||http://mynewwebsite/pic/newlogo.jpg" --website="http://mynewwebsite" --details="my new slogan" --from <yourKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice>
Update an existing validator commission rate.
exchaincli tx staking edit-validator-commission-rate <commissionRate> --from <yourKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice>
Deregister the validator from the oktc and unbond the min self delegation.
exchaincli tx staking destroy-validator --from <yourKeyName> --gas auto --gas-adjustment 1.5 --gas-prices <gasPrice>
Node:You will have to wait 14 days before your OKTs are fully unlocked and transferrable.
For more cli, it is recommended that you read delegators-staking-cli.It contains the following commands: