Vote for the miners
To ensure that the network continues to operate and has an impact on its development, you can vote to select some miners who are selected to create new blocks and verify transactions.
Record valid transaction information in newly generated blocks and add newly generated blocks to the block chain. Every 24 hours, there will be a round of miners'votes. Every one of your votes is very important. And the top 33 miners who won the highest votes joined the mining process.
Please continue reading the following for complete information on the voting process. If you want to use Fast Navigation, please jump to the following link: Show a list of all miners, Getting information about individual miners , And vote for specific miners .
Get a list of miners
Suppose you vote for the miners for the first time. Please use the following methods to get information about the voting target and get a list of miners'candidates.
METHODS:
List_miners - This directive displays a list of all miners registered in the block chain. The list includes the names of all miners'accounts and the miners' ID s sorted by account names. Miners, whether or not they vote, are shown in this list. Browse the list by lowerbound and limited parameters. If you want to retrieve all the miners'accounts, set the starting position to empty command line ", then each iteration, transfer the name of the last miner, the return value is the starting position of the next list_miners access.
map<string,miner_id_type> list_miners(string lowerbound, uint32_t limit);
Parameters:
- Lowerbound - The name of the first miner returned. If the miner named after this does not exist, the list starts with the miner after the lowerbound.
- limit - returns the maximum of miners (maximum: 1000)
Return value:
- A list of miners whose names match the id.
Examples are given to illustrate:
list_miners "" 11
Respond:
[[ "init0", "1.4.1" ],[ "init1", "1.4.2" ],[ "init10", "1.4.11" ],[ "init2", "1.4.3" ],[ "init3", "1.4.4" ],[ "init4", "1.4.5" ],[ "init5", "1.4.6" ],[ "init6", "1.4.7" ],[ "init7", "1.4.8" ],[ "init8", "1.4.9" ],[ "init9", "1.4.10" ] ]
API Developer Document for Miner List
Access to miners'information
By calling get_miner
You will get specific information about specific miners. The list obtained in the previous step will provide you with the input information of this method for you to view the miners selected.
In addition, you can learn about miners through Slack mining's discussion topic.
METHODS:
get_miner - Return information about the miner given.
miner_object get_miner(string owner_account);
Parameters:
- owner_account - Miner account owner name or id, or miner ID.
Examples are given to illustrate:
get_miner init1
Respond:
{ "id": "1.4.2", "miner_account": "1.2.5", "last_aslot": 3027140, "signing_key": "DCT8NC1kNjEeqRp8SnEPQWtpeCLoJRuquH5jHtE78NNTthSi6t2uX", "pay_vb": "1.9.0", "vote_id": "0:1", "total_votes": "110114045499584", "url": "", "total_missed": 191805, "last_confirmed_block_num": 834559, "vote_ranking": 0 }
Note that miner_account is equivalent to account_id.
Obtain API Developer Documents for Miners
Vote for the miners
Voting for miners is one way to help improve the network. They are responsible for validating transactions and creating new blocks based on transaction information. The weight of your vote depends on the amount of your current balance. In addition, you cannot vote against a particular miner. You can only vote for a particular miner or not for anyone.
METHODS:
vote_for_miner - Vote for a miner. An account can publish a list of approved miners. This method can be used to add or remove miners from this list. When voting is calculated, the votes for each account are measured by the share of the core assets held by the account.
signed_transaction vote_for_miner(string voting_account, string miner, bool approve, bool broadcast = false);
Parameters:
- voting_account - The name or id of an account voted on by asset share.
- miner - miner's account name or id.
- approve - If you support a miner and vote for him, enter true, and if you want to remove a vote for a miner, enter false.
- Broadcast - If you want to broadcast transactions, show true.
API Developer Files Voting for Miners
Show votes obtained by specific miners
The CLI wallet can provide you with a list of votes you vote for a particular miner, thus auditing the voting process. In addition, the wallet can also provide a list of active miners who have voted and have not voted.
METHODS:
search_miner_voting - Gets the miner's voting information through an account matching the search item.
vector<miner_voting_info> search_miner_voting(string account_id, string term, bool only_my_votes, string order, string id, uint32_t count);
Parameters:
- account_id - The name of an account
- Term - a search term - miner's name
- only_my_votes - If you choose to vote only through your account, enter true
- order - Valid option is name (if you don't know the name, you can also provide a link) or ballot paper
- id - Open the search content object id
- count - Maximum amount of content captured (not more than 1000)
Return value:
- What was discovered
Example 1:
search_miner_voting accountname "" true "" "" 100
Response 1:
[{ "id": "1.4.1", "name": "init0", "url": "", "total_votes": "6126399992", "voted": true },{ "id": "1.4.11", "name": "init10", "url": "", "total_votes": "6126399992", "voted": true } ]
Example 2:
search_miner_voting accountname "" false "" "" 100
Response 2:
[{ "id": "1.4.1", "name": "init0", "url": "", "total_votes": "6126399992", "voted": true },{ "id": "1.4.2", "name": "init1", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.11", "name": "init10", "url": "", "total_votes": "6126399992", "voted": true },{ "id": "1.4.3", "name": "init2", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.4", "name": "init3", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.5", "name": "init4", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.6", "name": "init5", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.7", "name": "init6", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.8", "name": "init7", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.9", "name": "init8", "url": "", "total_votes": 0, "voted": false },{ "id": "1.4.10", "name": "init9", "url": "", "total_votes": 0, "voted": false } ]