LogoLogo
PAO DocsCommunity DocsDeveloper DocsPeerplays.com
  • Infrastructure Documentation
  • The Basics
    • Peerplays Node Types
    • Hardware Requirements
    • Obtaining private keys for cli_wallet
    • Using the CLI Wallet
      • CLI Wallet Fundamentals
      • CLI Commands for All Nodes
      • CLI Commands for Witnesses
      • CLI Commands for SONs
        • Updated CLI commands for SON voting
      • Deriving Keys using CLI Wallet
    • Auto-Starting a Node
    • Backup Servers
    • Obtaining Your First Tokens
    • Updating a Witness Node
    • How to create a Peerplays Account?
  • Advanced Topics
    • Private Testnets
      • Peerplays QA environment
      • Private Testnets - Manual Install
    • Reverse Proxy for Enabling SSL
    • Enabling Elasticsearch on a Node
    • Introduction to Faucet
  • Witnesses
    • What is a Witness node?
    • Installation Guides
      • Build and Install
      • Docker Install
      • GitLab Artifact Install
    • How to become a block producing witness?
    • Other Ways to configure a witness node
      • Peerplays API nodes & Installation Guide
      • Configuring Witness Node as Delayed Node
    • What's Next?
  • Sidechain Operator Nodes (SONs)
    • Installation Guides
      • Manual Install
      • Docker Install
      • SON Configuration - Version 1.5.19
      • SON configuration - Version 1.6.0
      • Bitcoin-SONs Sanity Checks
      • ETH-SONs Configuration & Installation
      • Existing SON node upgrade
  • Bookie Oracle Suite (BOS)
    • Introduction to BOS
    • BOS Installation
      • Installing MongoDB
      • Installing Redis
      • Configuration of bos-auto
      • Spinning Up bos-auto
    • BookieSports
      • Installing Bookiesports
      • Synchronizing BOS with BookieSports
      • BookieSports Module Contents
        • Sub Modules
      • Schema
      • Naming Scheme
    • Manual Intervention Tool (MINT)
      • Installing MINT
      • Introduction
  • DATA PROXIES
    • Introduction to Data Proxies
    • How Data Proxies Work
    • Data Proxy Set Up
  • COUCH POTATO
    • Installation
    • Functional Requirements
      • Flow Diagrams
      • Home Page
      • Create Account
      • Dashboard
        • Header
        • Sports Tabs
        • League Tabs
        • Calendar
        • Notifications
        • Replay
        • Account Menu
      • Game Selector
      • Change Password
    • Help
      • User Guide
        • Introduction
        • Home Page
        • Creating an Account
        • Dashboard
          • Replay
          • Account Menu
            • Change Password
        • Game Selector
    • Database
      • Schema
      • Objects
        • Tables
        • Views
    • API
      • Using the API
      • API Reference
        • Objects
        • Error Codes
      • BOS Schema
    • Proxy Payment Considerations
  • Other Documentation
    • Peerplays Home
    • Community Docs
    • Developer Docs
    • Site Reliability Engineering
Powered by GitBook
On this page
  • 1. vote_for_son
  • 2. update_son_votes

Was this helpful?

Export as PDF
  1. The Basics
  2. Using the CLI Wallet
  3. CLI Commands for SONs

Updated CLI commands for SON voting

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.

1. vote_for_son

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:

 signed_transaction vote_for_son(string voting_account,
                                 string son,
                                 sidechain_type sidechain,
                                 bool approve,
                                 bool broadcast = false);

Parameters

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

Syntax

Vote_for_son <voting_account_name> <son_account_owner_name> <sidechain_name> <true/false to approve/reject> <true/false(bydefault) to broadcast> 

Example Call

The following examples showcase voting/revoking scenario for various sidechains:

  1. Account named account01 vote for account named sonaccount01 to become an active son for bitcoin sidechain.

vote_for_son account01 sonaccount01 bitcoin true true

  1. Account named account01 revokes its vote for account named sonaccount01 from the bitcoin sidechain.

vote_for_son account01 sonaccount01 bitcoin false true

  1. Account named sonaccount01 vote for account named sonaccount01 to become an active SON for ethereum sidechain.

vote_for_son sonaccount01 sonaccount01 ethereum true true

  1. Account named sonaccount01 revokes its vote for account named sonaccount01 from ethereum sidechain.

vote_for_son sonaccount01 sonaccount01 ethereum false true

The signed transaction changing your vote for the given SON

2. update_son_votes

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:

signed_transaction update_son_votes(string voting_account,
                                    std::vector<std::string> sons_to_approve,
                                    std::vector<std::string> sons_to_reject,
                                    sidechain_type sidechain,
                                    uint16_t desired_number_of_sons,
                                    bool broadcast = false);
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_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

Syntax

update_son_votes <voting_account_name> [list_of_sonaccount_names_to_approve] [list_of_sonaccount_names_to_reject] <sidechain_name> <number_of_sonacounts_added/rejected> <true/flase(bydefault) to broadcast>

Example call

Account named account05 votes for accounts named sonaccount01, sonaccount02, sonaccount03, sonaccount04, sonaccount05 and revokes its votes for accounts named sonaccount06,sonaccount07to become an active SONs. The total number of votes for active SONs is 5 for hive network.

update_son_votes account05 [sonaccount01, sonaccount02, sonaccount03, sonaccount04, sonaccount05] [sonaccount06, sonaccount07] hive 5 true

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.

update_son_votes eth-6-son ["eth-2-son", "eth-3-son", "eth-4-son", "eth-5-son", "eth-6-son"] [] ethereum 5 true

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.

PreviousCLI Commands for SONsNextDeriving Keys using CLI Wallet

Last updated 1 year ago

Was this helpful?