none: All nodes participating in the network have the right to change the configuration.
single: Only one designated node has the right to change the configuration.
ballot: All nodes which have voting power can vote for a change. When more than half of total voting power gathered, the vote passes.
singlemode as an exception.
votemethod submits a new vote. If the node has the right to vote based on governance mode, the vote can be placed. If not, an error message will be returned and the vote will be ignored.
Key: Name of the configuration setting to be changed. Key has the form of
Value: Various types of value for each key.
STRING. One of the three governance modes.
ADDRESS. Designated governing node's address. It only works if the governance mode is
NUMBER. Price of unit gas. e.g.,
ADDRESS. Address of a new validator candidate. e.g.,
ADDRESS. Address of a current validator which need to be removed. e.g.,
NUMBER. A period in which votes are gathered in blocks. When an epoch end, all votes which haven't been passed will be cleared. e.g.,
NUMBER. The number of validators in a committee.(
subin chain configuration) e.g.,
STRING. Amount of Peb minted when a block is generated. Double quotation marks are needed for a value. e.g.,
STRING. Distribution rate for a CN/KGF/KIR separated by
"/". The sum of all values has to be
"34/54/12"meaning CN 34%, KGF 54%, KIR 12%
BOOL. Use the Gini coefficient or not.
BOOL. The way of giving transaction fee to a proposer. If true, it means the tx fee will be summed up with block reward and distributed to the proposer, KIR and KGF. If not, all tx fee will be given to the proposer.
STRING. Amount of Klay required to be a CN (Consensus Node). Double quotation marks are needed for a value. e.g.,
showTallyproperty provides the current tally of governance votes. It shows the aggregated approval rate in percentage. When it goes over 50%, the vote passes.
totalVotingPowerproperty provides the sum of all voting power that CNs have. Each CN has 1.0 ~ 2.0 voting power. In
totalVotingPowerdon't provide any information.
myVotingPowerproperty provides the voting power of the node. The voting power can be 1.0 ~ 2.0. In
totalVotingPowerdon't provide any information.
myVotesproperty provides my vote information in the epoch. Each vote is stored in a block when the user's node generates a new block. After current epoch ends, this information is cleared.
BlockNum: The block number that this vote is stored -
Casted: If this vote is stored in a block or not -
Key/Value: The content of the vote
chainConfigproperty provides the initial chain configuration. Because it just stores the initial configuration, if there were changes in the governance made by voting, the result of
chainConfigwill differ from the current states. To see the current information, please use
nodeAddressproperty provides the address of the node that a user is using. It is derived from the nodekey and used to sign consensus messages. And the value of
"governingnode"has to be one of validator's node address.
itemsAtreturns governance items at specific block. It is the result of previous voting of the block and used as configuration for chain at the given block number.
pendingChangesreturns the list of items that have received enough number of votes but not yet finalized. At the end of the current epoch, these changes will be finalized and the result will be in effect from the epoch after next epoch.
votesreturns the votes from all nodes in the epoch. These votes are gathered from the header of each block.
idxCacheproperty returns an array of current idxCache in the memory cache. idxCache contains the block numbers where governance change happened. The cache can have up to 1000 block numbers in memory by default.
idxCacheFromDbreturns an array that contains all block numbers on which a governance change ever happened. The result of
idxCacheFromDbis the same or longer than that of
itemCacheFromDbreturns the governance information stored in the given block. If no changes were stored in the given block, the function returns
getStakingInforeturns staking information at a specific block. The result includes the following information.
BlockNum: The block number at which the staking information is given.
CouncilNodeAddrs: The addresses of the consensus node.
CouncilRewardAddrs: The addresses to which the block reward of the associated nodes is sent.
CouncilStakingAddrs: The contract addresses in which the associated nodes deploy for staking.
CouncilStakingAmounts: The amount of KLAY which the associated nodes stake.
Gini: Gini coefficient.
KIRAddr: The contract address of KIR.
KGFAddr: The contract address of KGF.
UseGini: The boolean value whether or not the Gini coefficient is used.