The cli commands includes voting for various sidechain operators
The document explains about SON voting for multiple sidechain listeners like bitcoin, ethereum, & hive and also provide the command which allows the user to change several SON account voting in a single call.
The latest update on the wallet command allows the user to choose the sidechain operators like Bitcoin, Hive, and Ethereum for voting. It allows you to Vote for any active SONs from this list. Each account's vote is weighted according to the number of PPY owned by that account at the time the votes are tallied. An account can publish a list of all SONs they approve and the cli allows you to add or remove SONs from this list.
The CLI command is given below:
Parameters
Syntax
Example Call
The following examples showcase voting/revoking scenario for various sidechains:
Account named account01
vote for account named sonaccount01
to become an active son for bitcoin sidechain.
Account named account01
revokes its vote for account named sonaccount01
from the bitcoin sidechain.
Account named sonaccount01
vote for account named sonaccount01
to become an active SON for ethereum sidechain.
Account named sonaccount01
revokes its vote for account named sonaccount01
from ethereum sidechain.
The signed transaction changing your vote for the given SON
This command allows you to add or remove one or more SON from this list in one call. An account can publish a list of all SONs they approve. Each account's vote is weighted according to the number the core asset shares owned by that account at the time the votes are tallied. When you are changing your vote on several SONs, this may be easier than multiple vote_for_sons
and set_desired_witness
& committee_member_count
calls.
The cli command is given below:
Syntax
Example call
Account named account05
votes for accounts named sonaccount01
, sonaccount02
, sonaccount03
, sonaccount04
, sonaccount05
and revokes its votes for accounts named sonaccount06
,sonaccount07
to become an active SONs. The total number of votes for active SONs is 5 for hive network.
Account named eth-6-son
votes for accounts named eth-2-son
, eth-3-son
, eth-5-son
, eth-6-son
to become active SON on ethereum and no account is revoked from the sidechain. The total number of votes for active SONs is 5 for ethereum network.
The signed transaction changing your vote for the given witnesses
Note that you cannot vote against a SON, you can either vote for the SON or ignore voting for the SON.
name | data type | description | details |
---|---|---|---|
name | data type | description | details |
---|---|---|---|
voting_account
string
the name or id of the account who is voting with their shares
No quotes required
son
string
the name or id of the SONs' owner account
No quotes required
sidechain
sidechain_type
the name of the sidechain - ethereum, hive or bitcoin
No quotes required
approve
bool
true
if you wish to vote in favor of that SON
false
to remove your vote in favor of that SON
n/a
broadcast = false
bool
true
if you wish to broadcast the transaction
n/a
voting_account
string
the name or id of the account who is voting with their shares
No quotes required
son_to_approve
std::vector std::string
the names or ids of the sons owner accounts you wish to approve (these will be added to the list of sons you currently approve). This list can be empty.
Quotes required
sons_to_reject
std::vector std::string
the names or ids of the SONs owner accounts you wish to reject (these will be removed from the list of SONs you have approved). This list can be empty.
Quotes required
sidechain
sidechain_type
the name of the sidechain - ethereum, hive or bitcoin
No quotes required
desired_number_of_sons
unit16_t
the parameter helps the user to vote for /suggest the number of active SONs in sidechain
Mention the value in numbers
broadcast = false
bool
true
if you wish to broadcast the transaction
n/a
CLI commands that sons use.
Creates a SON object owned by the given account. An account can have at most one SON object.
Parameters
Example Call
Return Format
Example Successful Return
Update a SON object owned by the given account.
Parameters
Example Call
Return Format
Example Successful Return
Updates the vesting balances associated with a given SON.
Parameters
Example Call
Return Format
Example Successful Return
Returns information about the given SON.
Parameters
Example Call
Return Format
Example Successful Return
Vote for a given SON. An account can publish a list of all SONs they approve of. This command allows you to add or remove SONs from this list. Each account's vote is weighted according to the number of PPY owned by that account at the time the votes are tallied. Note that you can't vote against a SON, you can only vote for the SON or not vote for the SON.
Parameters
Example Call
Return Format
Change all your votes for SONs in one transaction. This can add and remove votes, and set the number of SONs you think should be active too.
You cannot vote against a SON, you can only vote for the SON or not vote for the SON.
Parameters
Example Call
Return Format
Example Successful Return
Lists all registered SONs, active or not.
Parameters
Example Call
List all active SONs.
Parameters
Example Call
Modify status of the SON owned by the given account to maintenance.
Parameters
Example Call
Modify status of the SON owned by the given account back to active.
Parameters
Example Call
This will display the wallet information for all registered SONs. You can specify the maximum number of wallets to return.
Parameters
Example Call
This will display the wallet information for the current active SON.
Parameters
Example Call
This will display the wallet information for the SON that was active at a specific date and time.
Parameters
Example Call
This command allows a user to register two Bitcoin addresses: one used to create their deposit address, and one that will be used for their withdraw address. Collectively these are a "sidechain address".
Parameters
Example Call
add_sidechain_address mypeerplays-account bitcoin 02cf1b2c34eed7537a63eb5e86c914b6c5f641d87f07798dd777773d96c4df82e9 022bccebf0f97231c1a499ed2145f744444b2df51d24e8ba71016ebd186bec2ab9 1KTE52KRoYf8G3SPJtKUufU9tRansAGyud true
This will delete a sidechain address that was previously registered with the add_sidechain_address
command. Only one sidechain address can exist per user and sidechain. (A sidechain address in the case of Bitcoin consists of both a deposit and a withdraw address.)
Parameters
Example Call
This returns a registered sidechain address for a given account and sidechain.
Parameters
Example Call
This returns all the registered sidechain addresses for a given account.
Parameters
Example Call
This returns all the registered sidechain addresses for a given sidechain.
Parameters
Example Call
This returns the number of registered sidechain addresses.
Parameters
Example Call
name
data type
description
details
owner_account
string
The name or id of the account which is creating the SON.
no quotes required.
url
string
a URL to include in the SON record in the blockchain. Clients may display this when showing a list of SONs.
May be blank.
deposit_id
vesting_balance_id_type
vesting balance id for SON deposit.
This is the son
vesting balance.
pay_vb_id
vesting_balance_id_type
vesting balance id for SON pay_vb
This is the normal
vesting balance.
sidechain_public_keys
flat_map
The new set of sidechain public keys.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
owner_account
string
The name of the SON's owner account. Also accepts the ID of the owner account or the ID of the SON.
no quotes required.
url
string
Same as for create_son. The empty string makes it remain the same.
n/a
block_signing_key
string
A new signing key to replace the currently set signing key.
n/a
sidechain_public_keys
flat_map
The new set of sidechain public keys. An empty string makes it remain the same.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
owner_account
string
The name or id of the SON account owner, or the id of the SON.
No quotes required.
new_deposit
vesting_balance_id_type
A vesting balance id that will replace the currently set son
vesting balance.
Optional
new_pay_vb
vesting_balance_id_type
A vesting balance id that will replace the currently set normal
vesting balance.
Optional
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
owner_account
string
The name or id of the SON account owner, or the id of the SON.
No quotes required.
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
son
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
sons_to_approve
std::vector<std::string>
An array of SON names or ids that you had not previously voted for which you wish to add your vote.
This can be empty.
sons_to_reject
std::vector<std::string>
An array of SON names or ids that you had previously voted for which you wish to remove your vote.
This can be empty.
desired_number_of_sons
uint16_t
The number of SONs that you think the network should have. You must vote for at least this many SONs. You can set this to 0 (zero) to abstain from voting on the number of SONs.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
lowerbound
string&
The name of the first SON to return. If the named SON does not exist, the list will start at the SON that comes next.
Use ""
to start at the beginning.
limit
uint32_t
The maximum number of SON to return.
Max of 1000.
name
data type
description
details
No Parmeters!
n/a
n/a
n/a
name
data type
description
details
owner_account
string
The name or id of the account who owns the SON.
No quotes required.
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
owning_account
string
The name or id of the account who owns the SON.
No quotes required.
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
limit
uint32_t
The maximum number of results to return.
n/a
name
data type
description
details
No Parameters!
n/a
n/a
n/a
name
data type
description
details
time_point
time_point_sec
The date and time. Formatted like this:
"2020-10-31T13:43:39"
Quotes are required!
name
data type
description
details
account
string
The name or id of the account who owns the address.
No quotes required.
sidechain
sidechain_type
One of: bitcoin
, (more will be added later).
n/a
deposit_public_key
string
The public key of a Bitcoin address. This will be used to generate the deposit address in the return of this function.
n/a
withdraw_public_key
string
The public key of a different Bitcoin address. This will be used for the withdraw address.
n/a
withdraw_address
string
The Bitcoin address that is connected to the withdraw_public_key.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
witness
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
witness
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
witness
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
witness
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a
name
data type
description
details
voting_account
string
The name or id of the account who is voting with their PPY.
No quotes required.
witness
string
The name or id of the SON's owner account.
No quotes required.
approve
bool
true
if you wish to vote in favor of that SON, false
to remove your vote in favor of that SON.
n/a
broadcast
bool
true
to broadcast the transaction on the network.
n/a