BUMO DPOS 10 Protocol
DPOS Contract System
Creating Election Contracts
After the DPOS contract account is created successfully, the subsequent operations can be performed, and the account is globally unique and cannot be created repeatedly.
Upgrading Election Contracts
- Since the DPOS contract already exists in the blockchain system and cannot be changed after the contract is created, it needs to be updated by upgrading the version. Versions after BUMO v1.2.0 automatically use the new contract address, and the old contract address (buQtxgoaDrVJGtoPT66YnA2S84yE8FbBqQDJ) will be discarded.
- In order to facilitate the subsequent upgrade of the DPOS contracts and avoid using the version upgrade function every time, the new DPOS contracts are implemented by the delegateCall mechanism. The entry contract uses the delegateCall to delegate the call to the logical contract to execute, and the delegateCall can specify the address of the logical contract. Therefore, when the contract is upgraded, you only need to create a new logical contract, and then change the logical contract address stored in the entry contract to the new address. The update is decided by the Committee voting.
- Since the call test is required when the contract is created, the entry contract can only be created after the logical contract is created.
- There is no need to specify a contract address when creating a DPOS logical contract, which is automatically generated by the system. When creating a DPOS entry contract, you need to specify the contract address as: buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss and specify the address of the created logical contract in the entry contract.
Creating Logical Contracts
When creating a logical contract account, copy all the source code in the dpos.js file located at the src\contract\dpos.js directory as the value of the payload field in the account.
Example
"contract" :
{
"payload" : "Copy all the code in the src\contract\dpos.js directory to here"
},
Creating Entry Contracts
When creating an entry contract, first obtain the address of the logical contract, fill in the logical_contract field in the init_input
parameter when creating the contract, then fill in the initial committee member address list into the commit field, and then copy all the source code in the dpos_delegate.js file as the value in the payload field of the account.
Example
"create_account":
{
"dest_address": "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"contract" :
{
"payload" : "Copy all the code in src\contract\dpos_delegate.js to here"
},
"init_balance": 1000000,
"init_input" : "{
\"method\": \"init\",
\"params\": {
\"logic_contract\": \"Fill in the logical contract address here\",
\"committee\": [\"Fill in the committee address list here\"]
}
}",
"priv": {
"master_weight": 0,
"thresholds": {
"tx_threshold": 1
}
}
}
Configuration of Election
In the contract code of dpos.js file, the following configuration can be modified as needed through the Updating Configuration of Election process.
config = {
'gas_price' :1000, /*1000MO, which is one hundred thousandth of a BU*/
'base_reserve' :1000000, /* 1000000MO, which is 0.01BU */
'committee_size' : 10,
'kol_size' : 21,
'kol_candidate_size' : 100,
'kol_min_pledge' : 500000000000000, /* 500 0000 0000 0000 */
'validator_size' : 19,
'validator_candidate_size' : 100,
'validator_min_pledge' : 500000000000000,/* 500 0000 0000 0000 */
'pledge_magnification' : 2,
'pass_rate' : 0.5,
'valid_period' : 2592000000000, /* 30 * 24 * 60 * 60 * 1000 * 1000 */
'vote_unit' : 1000000000, /*10 00000 00000*/
'reward_allocation_share' : [50,6,40,4], /* validators 50%, validator candidates 6%, kol 10%, kol candidates 4% */
'logic_contract' : params.logic_contract
};
Parameter | Description | Default |
---|---|---|
gas_price | The fuel price of transaction fees. | 1000 |
base_reserve | The minimum reserved fee for the account. | 1000000 |
committee_size | The number of committee members. | 100 |
kol_size | The number of ecological node members. | 21 |
kol_candidate_size | The number of ecological node candidates. | 100 |
kol_min_pledge | The minimum deposit amount for ecological node candidates. | 500000000000000 |
validator_size | The number of consensus nodes. | 19 |
validator_candidate_size | The number of consensus node candidates. | 100 |
validator_min_pledge | The minimum deposit amount for consensus node candidates. | 500000000000000 |
pledge_magnification | Equity ratio of deposits. | 2 |
pass_rate | Review the pass rate of the vote. During the valid review period, the number of members who voted for the proposal exceeds the pass rate and the proposal will be executed. If votes > (total votes * pass_rate), the vote is passed. For example, assuming a total of 4 nodes, 4 * 0.5 = 2, and votes > 2, then at least 3 votes are required to pass. | 0.5 |
valid_period | The valid period, in microseconds, is applied to valid vote period and lockout period of withdrawal. | 2592000000000 |
vote_unit | The voting unit. Each vote, additional vote or the additional deposit amount of the contestant must be an integral multiple of this value. | 10 0000 0000 |
reward_allocation_share | The distribution ratio of block rewards. [50, 6, 40, 4] represents the consensus nodes evenly share 50% of the block reward, the consensus node candidates evenly share 6% of the block reward, the kols share 40% of the block reward, and the candidate kols share 4% of block reward. | [50,6,40,4] |
logic_contract | The address of the DPOS logical contract. | "${logic_address}" |
User Roles
Types of roles supported in DPOS contracts (any BuChain account can apply for and serve multiple roles):
role = [
'committee',
'validator',
'kol'
];
Note: In the above interface parameters, committee
represents the Committee, validator
represents the consensus node, and kol
represents the ecological node.
The role strings listed in the role field provide optional parameter values for the role
parameter of the interface to distinguish various roles when DPOS contracts execute apply (apply
interface), withdrawal (withdraw
interface), abolish (abolish
interface), and approve (approve
interface) actions. See User Interface for more details.
Proposal Actions
The proposal actions in the DPOS contract:
motion = [
'apply',
'abolish',
'withdraw',
'config'
];
The action strings listed in the motion field provide optional parameter values for the operate
parameter of the interface to distinguish various proposal actions when executing (approve
interface) action or cleaning expired proposal (clean
interface) action. See User Interface for more details. The withdraw
interface will only be used when cleaning out expired proposals (clean
interface), but withdrawing from the proposal does not require approval.
User Interface
Operation Interfaces
Method | Parameter | Description |
---|---|---|
apply | role , pool , ratio , node | The apply interface. Any BuChain account can use this interface to apply for a candidate consensus node, candidate ecological node, and committee member. The role parameter is the role applied for. The parameter value must be one of the values listed in the User Roles section; the pool parameter is the address assigned to the voter used to receive block reward; the ratio parameter is the distribution ratio of the reward, the contract will transfer the block reward obtained by the super node to the address specified by pool according to the ratio specified by ratio , the reward will be distributed to all voters who support the super node, and members of the Application Committee do not need these two parameters; node is the physical node address, and this parameter needs to be assigned only if the requested role is a candidate consensus node. |
append | role | The interface for pledging additional deposit. The candidate consensus node or candidate kol can pledge additional deposit by calling this interface. The role parameter is explained as above. |
setNodeAddress | address | The interface for setting the node address. The consensus node or the candidate consensus node can call this interface to set the physical node for generating blocks. The address parameter is the address of the new node. |
setVoteDividend | role ,pool ,ratio | The interface for setting the reward distribution for voting. The super node and its candidate nodes can call this interface to set the address and distribution ratio for assigning the rewards. The parameters are interpreted in the same way as the apply interface. |
abolish | role ,address ,proof | The interface to abolish. A role member proposes to abolish another member of the same role set. The address parameter is the address of the revoked; the proof parameter is the reason to abolish; the role parameter is interpreted as above. |
configure | item 、value | The interface for configuration. Committee members propose to modify the value of an election configuration item. The item parameter is a modified configuration item. The parameter value must be one of the configuration items listed in the Configuration of Election section; the value parameter is the new configuration value. |
approve | operate ,item ,address | The interface for approving. Committee members vote after reviewing a proposal. The operate parameter is the action of the proposal. The parameter value must be one of the values listed in the Proposal Actions section; the item parameter is the item of the proposal, and the parameter value must be a value in User Roles Chapter or one of the values listed in the Configuration of Election section; the address parameter is the address of the proposer, and if the configuration of the approval is modified, it is the proposer's address. |
vote | role ,address | The interface for voting. The account votes for the candidate consensus node and the candidate ecological node. The address parameter is the candidate consensus node or the candidate ecological node supported by the vote, and the role parameter is explained as above. |
unVote | role , address | The interface to revoke votes. The account withdraws votes. The role parameter and the address parameter are interpreted as above. |
withdraw | role | The interface for withdrawing. Candidate consensus nodes, candidate ecological nodes, or committee members withdraw from their set, and the parameters are explained as above. |
extract | list | The interface to cash out. list is a list parameter that any user can call this interface to extract the rewards of the specified address set to their respective addresses. |
clean | operate ,item ,address | The interface to clean up the expired proposal. Any account can call this interface to clean up any expired proposals. The operate parameter is the action of the proposal. The parameter value must be one of the values listed in the Proposal Actions section; the item parameter is the item of the proposal, and the parameter value must be in User Roles Chapter or one of the values listed in the Configuration of Election section; the address parameter is the address of the proposer, and if the configuration of the approval is modified, it is the proposer's address. |
Query Interfaces
Method | Parameter | Description |
---|---|---|
getProposal | operate ,item ,address | The interface to query the proposal. Any BuChain account can query all types of proposal, including the proposal for candidate consensus nodes, the candidate ecological nodes and the committee members to apply for joining in or abolishing, and the proposal to modify the configuration of election. The operate parameter is the action of the proposal. The parameter value must be one of the values listed in the Proposal Actions section; the item parameter is the item of the proposal, and the parameter value must be User Roles Chapter or one of the values listed in the Configuration of Election section; the address parameter is the sponsor's address, and if the query is to modify the election configuration proposal, it is the proposer's address. |
getVoteInfo | role ,candidate ,voter | The interface to query the vote. You can query the number of votes for an account for a candidate consensus node or candidate ecological node. The candidate parameter is the address of the candidate consensus node or the candidate ecological node; voter is the address of the voting account. If the account queries its votes for an object, the voter parameter can be omitted; the role parameter is interpreted as above. |
getValidators | None | The interface to query the consensus node set. This interface is used to obtain a list of consensus nodes. |
getValidatorCandidates | None | The interface to query the candidate consensus node set. A list of candidate consensus nodes and respective shareholder rights can be obtained with this interface. |
getKols | None | The interface to query the ecological node set. A list of ecological nodes can be obtained with this interface. |
getKolCandidates | None | The interface to query the candidate ecological node set. A list of candidate ecological nodes and their respective shareholders' equity can be obtained with this interface. |
getCommittee | None | The interface to query the committee. A list of the committee can be obtained with this interface. |
getRewardDistribute | None | The interface to query the block reward distribution table. The amount of block rewards that have been allocated by all candidate consensus nodes and ecological nodes can be obtained with this interface. |
getConfiguration | None | The interface to query the configuration of election. All modifiable election configuration items and their current values can be obtained with this interface. |
Operational Feedback
When a user triggers a DPOS contract, if an important event occurs, the DPOS contract will trigger a tlog transaction to feedback the result of the contract execution to the user. The tlog transaction prints multiple outputs in sequence, with the first output being the event name and the following output being the key information list for the event.
Event | Output | Description |
---|---|---|
addCandidate | Address of participant , role | An event that is triggered when an applicant successfully joins a committee or campaign list. |
deleteCandidate | Address of to-be-deleted ,role | An event that is triggered when a committee member or campaign node is removed from the candidate list. |
updateConfigure | Configuration item , configuration value | The event that is triggered when the related configuration changes are elected. |
penalty | Address of evildoer , role , amount of penalty | The event that is triggered when the deposit of the malicious node is fined. |
Privileges of Roles
Different actions can be done when different roles call different interfaces with specific parameters. In a DPOS contract, the actions that different roles can perform are as follows.
- A user is the basic role of the account, and each account is treated as a user. The actions that the user can perform are as follows:
- Apply to become a committee member, candidate consensus node and candidate ecological node.
- Vote for candidate consensus nodes and candidate ecological nodes.
- Withdraw votes for candidate consensus nodes or candidate ecological nodes that have been voted for.
Note: The ballot is the BU held by the user. 1BU is equal to one ballot. The default voting unit is 10BUs, that is, the voting amount must be a multiple of 10Us. The number of votes that the user can vote for is the number of BUs that can be transferred in the account (the minimum reserved fee for the account cannot be voted). A single user can vote for multiple candidate consensus nodes and candidate ecological nodes at the same time. All votes cast by the user can be withdrawn.
- The committee members can perform the following operations:
- Vote to review applications for committee members, consensus nodes, and ecological nodes.
- Propose to abolish an incompetent member, or propose to change a system configuration.
- Vote to review the proposal to abolish committee members, consensus nodes, ecological nodes or the change of system configuration.
Note: The principle of the committee's review of all proposals and applications is one vote for one person, vote for it if supported, no vote if not supported, and repeated votes are regarded as one vote. If the number of votes exceeds the voting pass rate during the valid period of the review (see the pass_rate
configuration item in Configuration of Election, it is considered as approval. If the number of votes does not exceed the voting pass rate until the end of the review period, the review is deemed to have failed.
The validator consensus node can perform the following actions:
- Extract block rewards.
- Propose to abolish an incompetent consensus node.
- Withdraw from the consensus node set.
Note: The user submits the application for the consensus node to the DPOS contract. After the committee approves the vote, it can only become a candidate consensus node. Only those whose shareholder's equity (the sum of the quality deposit and the number of votes) are ranked within the qualified position (validator_size) can become formal consensus nodes.
Ecological nodes (also called Key Opinion Leader) can perform the following actions.
- Extract block rewards.
- Propose to abolish an incompetent ecological node.
- Withdraw from the ecological node set.
Note: The user submits the application for the ecological node to the DPOS contract. After the committee approves the vote, it can only become a candidate ecological node. Only those whose shareholder's equity (the sum of the quality deposit and the number of votes) are ranked within the qualified position (kol_size) can become formal ecological nodes.
Electing Consensus Nodes
Consensus nodes are also known as super nodes. They are major players in the blockchain consensus system. They are mainly responsible for packaging the whole network transactions within a certain period of time into a proposal, and agreeing on the proposal to generate a new block. The consensus nodes are voted by all accounts in BuChain.
The main steps for selecting a consensus node are as follows:
- A node submits an application for a consensus node to the DPOS contract and pledges a certain amount of BUs to prevent being evil.
- Committee reviews and votes for the application. After being approved, the application node is added to the candidate consensus node set.
- The users vote for the candidate consensus node, and those whose votes reach a certain number become the consensus nodes, participating in the consensus of BuChain, and obtaining the block reward.
Applying for Candidate Consensus Nodes
Any account with a network node can apply to become a candidate consensus node by transferring some BU to the DPOS contract as a deposit. After the committee has voted to review, which you can refer to Committee Approved Vote, it can become a formal candidate consensus node. But whether it can become a consensus node is determined according to the total number of votes obtained in a certain period.
- The applicant transfers some BU to the DPOS contract as a deposit. See the development document 'Transferring BU Assets'). If the user withdraws, the deposit will be locked for 30 days. After the lockout period is expired, apply to withdraw again. the contract will return the deposit to the application account. See Withdrawal of Candidate Consensus Nodes for details.
- The input field of the 'transferring BU assets' operation is filled with
{ "method": "apply", "params":{"role":"validator", "pool":" this field is filled in the address to receive rewards for voting", "ratio ":" this field is filled in with the reward ratio for voting", "node": "this field is filled in with the physical address"}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role applied for. The parameter value must be one of the values listed in the User Roles section; here is the consensus node role. |
pool | The address to receive rewards for voting. If the parameter is not provided, the default is the applicant’s address. |
ratio | The distribution ratio of rewards of voting. The value is the numerator of the percentage, such as 80, which means that 80% of the block rewards will be transferred to the address specified by the pool parameter, and then the pool address assigns the rewards to the supporters of the current node. If the parameter is not provided, the default is 0. |
node | The node address, which is the address of the actual physical node participating in the BuChain consensus and block generation. In order to ensure the security of the account funds, when the user applies for the consensus node, the fund address and the node address are separated. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :300000000000000,
"input":
"{
\"method\":\"apply\",
\"params\":
{
\"role\":\"validator\",
\"pool\":\"buQhqMoJziz27DdrS4DaFjeUSspxetAfvpzu\",
\"ratio\":0,
\"node\":\"buQo8w52g2nQgxnfKWovUUEFQzMCTX5TRpZD\"
}
}"
}
After the application is successful, the candidate consensus node information can be queried with Querying Consensus Nodes.
Pledging Additional Deposit
The candidate consensus node or the candidate ecological node may pledge additional deposit to increase its own equity ranking. The additional amount must be an integral multiple of the configuration value of vote_unit
in the Configuration of Election, otherwise the operation to pledge additional deposit will be rejected.
- The input field of the
transferring BU assets
operation is filled with{ "method" : "append", "params":{"role":"validator"}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role applied for. The parameter value must be one of the values listed in the User Roles section (committee does not need pledge); here is the consensus node role. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :10000000000000,
"input":
"{
\"method\":\"append\",
\"params\":
{
\"role\":\"validator\"
}
}"
}
Switching Node Address
The fund address and node address of the consensus node are separate. In order to facilitate the online update and upgrade of the consensus node, the consensus node or the candidate consensus node can call this interface to modify the node address.
- Transfer 0 BU to the DPOS contract.
- The input field of the 'transferring BU assets' operation is filled with
{ "method" : "setNodeAddress", "params" : { "address" : "new node address is filled here"} }
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
address | The new node address, which is used to replace the node that currently performs block generation. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"setNodeAddress\",
\"params\":
{
\"address\":\"buQo8w52g2nQgxnfKWovUUEFQzMCTX5TRpZD\"
}
}"
}
Setting Reward Ratio for Voting
The super node calls this interface to change the address used to distributing rewards and the reward ratio.
- Transfer 0 BU to the DPOS contract.
- The input field of the
transferring BU assets
operation is filled with{ "method" : "setVoteDividend", "params":{"role": "the role type of the super node is filled in here", "pool":" this field is filled in the address for distributing rewards", "ratio": " this field is filled in the reward ratio"}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role of applied for. The parameter value must be one of the values listed in the User Roles section, but it cannot be the committee. |
pool | The address to distribute voting rewards. |
ratio | The reward ratio for voting. The value is the numerator of the percentage, such as 80, which means that 80% of the block reward will be transferred to the address specified by the pool parameter, and then the pool address assigns the rewards to the supporters of the current node. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"setVoteDividend\",
\"params\":
{
\"role\":\"validator\",
\"pool\":\"buQhqMoJziz27DdrS4DaFjeUSspxetAfvpzu\",
\"ratio\":80
}
}"
}
Voting for Candidate Consensus Nodes
- Any user transfers some BU to the DPOS contract, the transfer amount is regarded as the number of votes of the user, and the address provided in the transfer parameter is regarded as the candidate consensus node to receive voting support.
- The total number of votes of the candidate consensus nodes is the sum of their own deposit and the number of votes received. The candidate consensus node increases the deposit, which is equivalent to voting for itself.
- The user can vote for multiple candidate addresses, and the number of candidate consensus nodes that can be voted depends on the size of the candidate consensus node set and the user's account balance.
- Repeated voting on the same address is regarded as an increase in voting.
- The number of votes and the additional deposit must be an integral multiple of the value configured in
vote_unit
in Configuration of Election. - The input field of the
transferring BU assets
operation is filled with{ "method" : "vote", "params" : { "role":"validator", "address" : " the candidate consensus node address is filled in "} }
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role of the node voted for. The parameter value must be one of the values listed in the User Roles section, and here is the consensus node role. |
address | The address voted for. |
Example: Vote for a specified candidate consensus node
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :100000000000, /*Vote 1000BU*/
"input":
"{
\"method\":\"vote\",
\"params\":
{
\"role\":\"validator\",
\"address\":\"buQtZrMdBQqYzfxvqKX3M8qLZD3LNAuoSKj4\"
}
}"
}
Withdrawing Votes
- Transfer 0 BU to the DPOS contract account.
- The input field of the
transferring BU assets
operation is filled with{ "method" : "unVote", "params" : { "role":"validator", "address" : " the candidate consensus node address is filled in "} }
, and pay attention to the use of escape characters. - The voting information is recorded in the contract and can be queried by using the
getVoteInfo
interface.
Parameter | Description |
---|---|
role | The role of the voter. The parameter value must be one of the values listed in the User Roles section, and here is the consensus node role. |
address | The address voted for. |
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"unVote\",
\"params\":
{
\"role\":\"validator\",
\"address\":\"buQtZrMdBQqYzfxvqKX3M8qLZD3LNAuoSKj4\"
}
}"
}
Withdrawal of Candidate Consensus Nodes
The candidate consensus node can withdraw from the candidate consensus nodes by this operation and recover the entire deposit. The withdrawal process is as follows:
- The first step is to apply for withdrawal. After the application is successful, the node address is deleted in the candidate node set, and the deposit enters the lockout period, and the lockout period is 30 days.
- After the lockout period is over, it enters the second step, and the withdrawal request can be sent again. At this time, the lockout period is over, and the DPOS contract account returns the deposit to the account.
Transfer 0 BU to the DPOS contract account.
The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method":"withdraw", "params" :{ "role":"validator" }}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role of the withdrawer. The parameter value must be one of the values listed in the User Roles section, and here is the consensus node role. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"withdraw\",
\"params\":{
\"role\":\"validator\"
}
}"
}
Proposal to Abolish Malicious Consensus Nodes
If a consensus node finds that another consensus node is a malicious node, or is no longer suitable as a consensus node, it can apply to abolish the malicious node. After launching the ‘Abolition of Malicious Node’ proposal, the committee needs to vote to decide whether to abolish the node.
- The proposer transfers 0 BU to the DPOS contract account.
- The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method" : "abolish", "params" : { "role":"validator", "address" : "the malicious consensus node address is filled in here ", "proof": " the reason for abolishing this consensus node is filled in here"} }
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role of the abolished node. The parameter value must be one of the values listed in the User Roles section, and here is the consensus node role. |
address | The address of the one that is abolished. |
proof | The reason to abolish. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"abolish\",
\"params\":
{
\"role\":\"validator\",
\"address\":\"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\",
\"proof\":\"I_saw_it_uncomfotable.\"
}
}"
}
Note: Both the applicant for abolishing and the one abolished must be consensus nodes.
Querying Consensus Nodes
The user can view related information by providing specified parameters to the query interface. The query interface can only be called with the callContract
interface. The contract_address field is populated with the DPOS contract account address.
Querying the Current Consensus Node Set
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getValidators\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"validators\":[
[\"buQWT7vkMth2y9RHgSdqqw77sCybgWRsB7jM\",\"500000000000000\"],[\"buQBwe7LZYCYHfxiEGb1RE9XC9kN2qrGXWCY\",\"500000000000000\"],[\"buQWBgAWSqiES7TNh1mq2VQwonvWtESz8Z2Z\",\"500000000000000\"],[\"buQWQ4rwVW8RCzatR8XnRnhMCaCeMkE46qLR\",\"500000000000000\"],[\"buQrVDKPCVE6LfCf8TyZEaiZ8R99NrSn4Fuz\",\"500000000000000\"]]}"
}
}
Querying Candidate Consensus Node Set
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getValidatorCandidates\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"validator_candidates\":[
[\"buQWT7vkMth2y9RHgSdqqw77sCybgWRsB7jM\",\"502500000000000\"],[\"buQBwe7LZYCYHfxiEGb1RE9XC9kN2qrGXWCY\",\"501500000000000\"],[\"buQWBgAWSqiES7TNh1mq2VQwonvWtESz8Z2Z\",\"500500000000000\"],[\"buQWQ4rwVW8RCzatR8XnRnhMCaCeMkE46qLR\",\"500000000000000\"],[\"buQrVDKPCVE6LfCf8TyZEaiZ8R99NrSn4Fuz\",\"500000000000000\"]]}"
}
}
Querying the Voting Information of Consensus Nodes for Users
Parameter | Description |
---|---|
voter | The address for voter. If the user queries their own voting information, the address can be omitted. |
role | The role of the one voted for. The parameter value must be one of the values listed in the User Roles section, and here is the consensus node. |
candidate | The address voted for. |
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" :
"{
\"method\": \"getVoteInfo\",
\"params\":
{
\"voter\":\"buQrVDKPCVE6LfCf8TyZEaiZ8R99NrSn4Fuz\",
\"role\": \"validator\",
\"candidate\": \"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\"
}
}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"voterInfo\":500000000000}"
}
}
Querying Application Information of Consensus Nodes
Parameter | Description |
---|---|
operate | The proposal action. The parameter value must be one of the values listed in the Proposal Actions section, and here is the application action. |
item | The proposed item. The parameter value must be one of the values listed in the User Roles section or the Configuration of Election section, and here is the consensus node role. |
address | The address of the applicant. |
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" :
"{
\"method\": \"getProposal\",
\"params\":
{
{
\"operate\": \"apply\",
\"item\":\"validator\",
\"address\":\"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\"
}
}",
"opt_type" : 2,
"source_address" : ""
}
Result
Parameter | Type | Description |
---|---|---|
proposal | string | The proposal. |
pledge | string | The deposit pledged. |
expiration | number | The expiry date. |
ballot | array | The vote list by the committee members who support this proposal. |
passTime | number | During the committee reviewing the proposal, this field is not available if it fails the review. |
{
"result": {
"type": "string",
"value": "{\"proposal\":{\"pledge\":\"500000000000000\",\"expiration\":1552098925001842,\"ballot\":[\"buQmKmaeCyGcPk9KbvnkhpLzQa34tQ9MaWwt\",\"buQYKj4TTJPVDPXCLWeBZMoCr1JPhq9Z2tJm\",\"buQZoJk8bq6A1AtsmfRw3rYJ79eMHUyct9i2\"],\"passTime\":1550802935024539}}"
}
}
Querying the Specified Proposal to Abolish the Malicious Node
Parameter | Description |
---|---|
operate | The proposal action. The parameter value must be one of the values listed in the Proposal Actions section, and here is the abolishing action. |
item | The proposed item. The parameter value must be one of the values listed in the User Roles section or the Configuration of Election section, and here is the consensus node role. |
address | The address of the one abolished. |
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" :
"{
\"method\": \"getProposal\",
\"params\":
{
{
\"operate\": \"abolish\",
\"item\":\"validator\",
\"address\":\"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\"
}
}",
"opt_type" : 2,
"source_address" : ""
}
Result
Parameter | Type | Description |
---|---|---|
proposal | string | The proposal. |
informer | string | The address of the informant. |
reason | string | The reason to report. |
expiration | number | The expiry date. |
ballot | array | The vote list by the committee members who support this proposal. |
{
"result": {
"type": "string",
"value": "{\"proposal\":{\"informer\":\"buQWQ4rwVW8RCzatR8XnRnhMCaCeMkE46qLR\",\"reason\":\"see abnormal record\",\"expiration\":1550815129920811,\"ballot\":[\"buQWQ4rwVW8RCzatR8XnRnhMCaCeMkE46qLR\"]}}"
}
}
Committee
The committee is independent of the candidate consensus nodes and the consensus nodes. It does not participate in the reward distribution and it is not driven by interests. The members mainly come from the foundation and the core developers. When electing or funding, a committee set is specified. New members’ participation or withdrawal from this committee must be approved by the committee members voting for it.
Main functions:
- Update configuration of election. If some members think that the current configuration of election is unreasonable, they can propose a configuration update for the election. After the committee members vote in the valid period, the new configuration for the election will be used in the next round of block packaging.
- Review candidate consensus nodes. When a node applies for a candidate consensus node, the committee members will review whether it is qualified, including physical node configuration, personal or organizational authentication information, and credit level.
- Review candidate ecological nodes. When a node applies for a candidate ecological node, the committee members will review whether it is qualified, including public influence, community contributions, and personal or organizational certification information, credit ratings, etc.
- Update DPOS logic function contracts.
Settings for Initializing Committee Members
The committee member initialization operation is done in the entry function init() when the contract is created.
Before the initialization, the committee members need to be made public in the community to accept the supervision of the users and improve their credibility.
Selecting the Committee
Applying to Join the Committee
- The user transfers 0 BU to the DPOS contract and applies to become a new member. To become a new member, you need to be approved by the current committee. Refer to Committee Approved Vote.
- The input field of the
transferring BU assets
operation is filled with{ "method" : "apply", "params" : {"role":"committee"}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role applied for. The parameter value must be one of the values listed in the User Roles section, and here is the committee member. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"apply\",
\"params\" : {
\"role\": \"committee\"
}
}"
}
After the application is successful, you can query the candidate consensus node information with Querying Committee.
Committee Approved Vote
- Proposals that need to be reviewed and approved by the committee include: candidate consensus nodes, participation or withdrawal of candidate ecological nodes and new committee members, and configuration updates. After the majority of the committee members approve the proposal, it will be executed. See the
pass_rate
configuration item in Configuration of Election. When reviewing the vote, you need to specify the proposal action type, the proposer role, and the address of the one proposed. If the review is a configuration update proposal, use the proposal's Configuration of Election item instead of the role, the proposer address instead of the address of the one proposed (the update configuration proposal does not have one that is proposed). - The committee members transfer 0 BU to the DPOS contract account.
- The input field of the
transferring BU assets
operation is filled with{ "method":"approve", "params" : {"item": "committee", "address": "the address to be included or revoked is filled in here", " Operate": "the proposal type is filled in here"} }
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
operate | The proposal action. The parameter value must be one of the values listed in the Proposal Actions section, and here is the application action. |
item | The proposed item. The parameter value must be one of the values listed in the User Roles section or the Configuration of Election section, and here is the committee member role. |
address | The address of the applicant. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"approve\",
\"params\" : {
\"item\":\"committee\",
\"address\": \"buQZoJk8bq6A1AtsmfRw3rYJ79eMHUyct9i2\",
\"operate\": \"apply\"
}
}"
}
- In the valid reviewing period, if the votes by the committee are above the pass rate, then the review is passed. Refer to Configuration of Election. If the application proposal is passed, the applicant will join to the corresponding set. If the proposal reviewed is about abolishing a node, the node will be removed from the corresponding nodes after it the proposal is passed. If the proposal reviewed is about configuration update, the value in the proposal will replace the value of the configuration item.
Withdrawal of Committee Members
- Transfer 0 BU to the DPOS contract account.
- The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method":"withdraw", "params" : {"role":"committee"} }
, and pay attention to the use of escape characters. - If committee members voluntarily withdraw, no approval is needed.
Parameter | Description |
---|---|
role | The role of the withdrawer. The parameter value must be one of the values listed in the User Roles section, and here is the committee member. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"withdraw\",
\"params\" : {
\"role\":\"committee\"
}
}"
}
Querying Committee
The user can view the related information by providing the specified parameters to the query interface. To call the query interface, you have to fill in the DPOS contract account address through the callContract and contract_address fields.
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getCommittee\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"committee\":[\"buQZoJk8bq6A1AtsmfRw3rYJ79eMHUyct9i2\",\"buQYKj4TTJPVDPXCLWeBZMoCr1JPhq9Z2tJm\",\"buQcYkkoZFMwDNQgCD7DoykNZjtax4FjVSzy\",\"buQmKmaeCyGcPk9KbvnkhpLzQa34tQ9MaWwt\"]}"
}
}
Updating Configuration of Election
- The DPOS contract not only supports the election function, but also supports updating the configuration of election. To update the configuration of election, it requires the committee to vote for confirmation. After the confirmation in the valid period, the update of the configuration for election will be triggered, and the new configuration will be adopted in the next block.
Structure of Configuration for Election
- Adjustable configuration for selection. If the operator finds that the configuration value is unreasonable, it can be modified by committee proposal and voting.
Proposal to Update Configuration for Election
- Committee members transfer 0 BU to the DPOS contract account.
- Committee members can propose to update a parameter, which only requires you to fill in the parameter that needs to be updated in the configuration.
- The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method" : "configure", "params" : { "item" :"kol_min_pledge", "value": " the minimum deposit for ecological node is filled in here "} }
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
method | Call the specified function inside the contract, and here is configure. |
item | The configuration item of the proposal. The parameter value must be one of the values listed in the Configuration of Election section, and here is the minimum deposit of the ecological node. |
value | The value of the configuration item to be modified. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":
"{
\"method\":\"configure\",
\"params\":
{
\"item\": \"kol_min_pledge\",
\"value\": 2000000000000
}
}"
}
Note: Only members of the committee have voting rights. If the configuration update proposal is not passed within the valid period, the proposal is abolished and the configuration of election remains unchanged.
Querying Configuration of Election
The user can view the related information by providing the specified parameters to the query interface. To call the interface, you can only fill in the DPOS contract account address through the callContract and contract_address fields.
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input":"{\"method\": \"getConfiguration\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"configuration\":{\"gas_price\":1000,\"base_reserve\":1000000,\"committee_size\":10,\"kol_size\":21,\"kol_candidate_size\":100,\"kol_min_pledge\":300000000000000,\"validator_size\":19,\"validator_candidate_size\":100,\"validator_min_pledge\":300000000000000,\"pledge_magnification\":2,\"pass_rate\":0.5,\"valid_period\":2592000000000,\"vote_unit\":1000000000,\"reward_allocation_share\":[50,8,35,7],\"logic_contract\":\"buQf9SYLbfiCBFHkwNhNAnnFgS2o2AraRxoe\"}}"
}
}
Community Incentives
The development of the public chain ecology is inseparable from the active community. Rewarding the ecological nodes is a way to enhance the visibility of the public chain, appeal participants and increase the members of the community.
Applying for Ecological Nodes
Any user account can transfer some BU to the DPOS contract as a deposit to apply for a candidate ecological node. Only after the application is passed by the committee in a valid period can it be added to ecological node list. Refer to Committee Approved Vote . Whether it can become a formal ecological node is determined by the total number of votes cast by users in a certain period.
- The applicant transfers some BU to the DPOS contract as a deposit which can be recovered by the Withdrawal of Ecological Nodes operation. See the development document Transferring BU Assets.
- The input field of the
transferring BU assets
operation is filled with{ "method" : "apply", "params":{"role":"kol", "pool":" the address to distribute voting rewards is filled in here", "ratio ":" the reward distribution ratio for voting is filled in here "}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role applied for. The parameter value must be one of the values listed in the User Roles section, and here is the ecological node role. |
pool | The address to distribute voting rewards. If the parameter is not provided, the default is the applicant’s address. |
ratio | The reward ratio for voting. The value is a numerator of the percentage, such as 80, which means that 80% of the block reward will be transferred to the address specified by the pool parameter, and then the pool address assigns the reward to the supporters of the current node. If the parameter is not provided, the default is 0. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :300000000000000,
"input":"{
\"method\":\"apply\",
\"params\" : {
\"role\":\"kol\",
\"pool\":\"buQhqMoJziz27DdrS4DaFjeUSspxetAfvpzu\",
\"ratio\":0,
}
}"
}
After the application is successful, the candidate ecological node information can be queried through the Querying the Current Ecological Node Set interface.
Withdrawal of Ecological Nodes
- The ecological node can recover the entire deposit through this operation. The withdrawal process is a two-step process:
- The first step is to apply for withdrawal. After the application is successful, the node address is deleted in the candidate node set, and the deposit enters the lockout period, and the lockout period is 30 days.
- After the lockout period is over, it enters to the second step, and the withdrawal request can be sent again. At this time, the lockout period has passed, and the DPOS contract account returns the deposit to the account.
- Transfer 0 BU to the DPOS contract account.
- The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method":"withdraw", "params" : {"role":"kol"}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
role | The role of the withdrawer. The parameter value must be one of the values listed in the User Roles section, and here is the ecological node. |
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"withdraw\",
\"params\" : {
\"role\":\"kol\"
}
}"
}
Ecological Nodes Casting Votes and Withdrawing Votes
- All users can transfer some BU to the DPOS contract to vote for a candidate ecological node.
- The user can vote for multiple candidate ecological nodes, and the number of candidate ecological nodes that can be voted depends on the size of the candidate ecological node set and the user's account balance.
- Repeated voting on the same address is regarded as an increase in voting.
- The number of votes and the additional deposit must be an integral multiple of the
vote_unit
value configured in Configuration of Election. - The input field of the
transferring BU assets
operation is filled with{ "method":"vote", "params" : {"role":"kol", "address": " the address of the candidate ecological node is filled in here"}}
, and pay attention to the use of escape characters.
Casting Votes
Parameter | Description |
---|---|
role | The role of the one voted for. The parameter value must be one of the values listed in the User Roles section, and here is the ecological node role. |
address | The address of the one voted for. |
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :1000000000,
"input":"{
\"method\":\"vote\",
\"params\" : {
\"role\":\"kol\",
\"address\": \"buQYKj4TTJPVDPXCLWeBZMoCr1JPhq9Z2tJm\"
}
}"
}
Withdrawing Votes
Parameter | Description |
---|---|
role | The role of the one voted for. The parameter value must be one of the values listed in the User Roles section, and here is the ecological node role. |
address | The address voted for. |
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"unVote\",
\"params\" : {
\"role\":\"kol\",
\"address\": \"buQYKj4TTJPVDPXCLWeBZMoCr1JPhq9Z2tJm\"
}
}"
}
Querying Application for Ecological Nodes
Parameter | Description |
---|---|
operate | The proposal action. The parameter value must be one of the values listed in the Proposal Actions section, and here is the application action. |
item | The proposed item. The parameter value must be one of the values listed in the User Roles section or the Configuration of Election section, and here is the ecological node role. |
address | The address of the applicant. |
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" :"{
\"method\": \"getProposal\",
\"params\":{
\"operate\": \"apply\",
\"item\":\"kol\",
\"address\":\"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\"
}
}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"proposal\":{\"pledge\":\"5000000000000\",\"expiration\":1550816576664577,\"ballot\":[\"buQmKmaeCyGcPk9KbvnkhpLzQa34tQ9MaWwt\",\"buQYKj4TTJPVDPXCLWeBZMoCr1JPhq9Z2tJm\",\"buQZoJk8bq6A1AtsmfRw3rYJ79eMHUyct9i2\"],\"passTime\":1550816546664577}}"
}
Querying Ecological Nodes Voted by Users
Parameter | Description |
---|---|
voter | The address of the voter. If the user queries their own voting information, it can be omitted. |
role | The role of the one voted for. The parameter value must be one of the values listed in the User Roles section, and here is the ecological node. |
candidate | The address of the one voted for. |
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" :
"{
\"method\": \"getVoteInfo\",
\"params\":
{
\"voter\":\"buQrVDKPCVE6LfCf8TyZEaiZ8R99NrSn4Fuz\",
\"role\": \"kol\",
\"candidate\": \"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\"
}
}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"voterInfo\":500000000000}"
}
}
Querying the Current Ecological Node Set
The user can view the related information by providing the specified parameters to the query interface. To call the query interface you can only fill in the DPOS contract account address through the callContract and contract_address fields.
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getKols\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"kols\":[
[\"buQB3LtCXfLjtSJKfpaHpykEwDLf43nPxB6z\",\"605000000000000\"],[\"buQZayH6gcAFh5XdgS4tnn8Axrqo1NdutS3p\",\"600000000000000\"],[\"buQaUqDotGNM7htvPR6iHKHBxLGzVpSFkmBM\",\"600000000000000\"]]}"
}
}
Querying Candidate Ecological Node Set
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getKolCandidates\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
{
"result": {
"type": "string",
"value": "{\"kol_candidates\":[
[\"buQB3LtCXfLjtSJKfpaHpykEwDLf43nPxB6z\",\"605000000000000\"],[\"buQZayH6gcAFh5XdgS4tnn8Axrqo1NdutS3p\",\"600000000000000\"],[\"buQaUqDotGNM7htvPR6iHKHBxLGzVpSFkmBM\",\"600000000000000\"]]}"
}
}
Querying Node Rewards
Example
{
"contract_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"code" : "",
"input" : "{\"method\": \"getRewardDistribute\"}",
"opt_type" : 2,
"source_address" : ""
}
Result
The reward list is stored in the form of key-value
Parameter | Description |
---|---|
key | The address of super node. |
value | Value[0] is the bonus amount, value[1] is the address to distribute rewards , and value[2] is the distribution ratio for rewards. |
{
"result": {
"type": "string",
"value": "{
\"rewards\":{
\"validators\":{
\"buQa6cifJPAduxqWf42dUgZ72qQiLGr4VCyn\":[\"10013634880\",\"buQa6cifJPAduxqWf42dUgZ72qQiLGr4VCyn\",0]
},
\"kols\":{
\"buQhqMoJziz27DdrS4DaFjeUSspxetAfvpzu\":[\"282345624\",\"buQhqMoJziz27DdrS4DaFjeUSspxetAfvpzu\",0],
\"buQmziFKwWTvJe5hBCFa6e3FdPDPorht3wCB\":[\"282345624\",\"buQmziFKwWTvJe5hBCFa6e3FdPDPorht3wCB\",0],
\"buQnP4jueoC37fP2VxKpsZSTNjgFHpA442jy\":[\"282345624\",\"buQnP4jueoC37fP2VxKpsZSTNjgFHpA442jy\",0],
\"buQjxgZsG3B24PNzKzpTiwrRR3z6ok46izuR\":[\"282345624\",\"buQjxgZsG3B24PNzKzpTiwrRR3z6ok46izuR\",0],
\"buQhtTjDmmquE4PTAKSzx4CqL7Z5LKLVG8SZ\":[\"282345624\",\"buQhtTjDmmquE4PTAKSzx4CqL7Z5LKLVG8SZ\",0]
}
}
}"
}
}
Other Interfaces
Extracting Rewards
- Any user calling this interface can receive a block reward for the specified address set. If the receiving address is not in the reward list, the address will not receive the reward.
- Transfer 0BU to the DPOS contract.
- The input field of the
transfer asset
ortransferring BU assets
operation is filled with{ "method":"extract", "params":{"list":[the address set for extracting rewards is filled in here]}}
, and pay attention to the use of escape characters.
Parameter | Description |
---|---|
list | The list to receive rewards. It is an array. The number of addresses to receive rewards cannot exceed 100. If the parameters are not provided, receive the reward of the contract trigger by default. |
Extract rewards
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"extract\",
\"params\":{
\"list\":[
\"buQrVDKPCVE6LfCf8TyZEaiZ8R99NrSn4Fuz\",
\"buQmziFKwWTvJe5hBCFa6e3FdPDPorht3wCB\",
\"buQmvKW11Xy1GL9RUXJKrydWuNykfaQr9SKE\",
\"buQnP4jueoC37fP2VxKpsZSTNjgFHpA442jy\",
\"buQjxgZsG3B24PNzKzpTiwrRR3z6ok46izuR\"
]}
}"
}
Clearing Expired Proposals
For all types of expired proposals (including application for consensus nodes, ecological nodes, committee members, withdrawals and abolitions, and all types of proposals to update configuration of election), any user can trigger this interface to clean up the expired proposal.
- Transfer 0BU to the DPOS contract.
- The input field of the
transferring BU assets
operation is filled with{ "method":"clean", "params" : {"item": " the proposal item is filled in here", "address": "the address of the proposer the proposed ", "operate": " the proposal type is filled in here"} }
, and pay attention to the use of escape characters. - If the overdue proposal to be cleared is the application proposal or the withdrawal proposal, and the proposal involves a deposit, the deposit will be refunded to the account when the proposal is cleared.
Example
"pay_coin" :
{
"dest_address" : "buQqzdS9YSnokDjvzg4YaNatcFQfkgXqk6ss",
"amount" :0,
"input":"{
\"method\":\"clean\",
\"params\" : {
\"item\":\"kol_min_pledge\",
\"address\": \"buQZoJk8bq6A1AtsmfRw3rYJ79eMHUyct9i2\",
\"operate\": \"config\"
}
}"
}