# On-chain Governance

In the chapter 0n-chain Governance, we have introduced to you: All activities of TOP Network chain governance are carried out through proposals and TCC voting, and any user can Initiate a proposal.

The core of TOP’s governance structure is the TOP Community Council (TCC). The TCC’s responsibility is to vote on and execute community proposals.

This chapter will show you the governance functions of TOPIO, including:

Command Description
topio govern getProposal Get on-chain governance proposals.
topio govern CGP Get on-chain governance parameters.
topio govern submitProposal Submit on-chain governance parameters.
topio govern withdrawProposal Withdraw on-chain governance parameters.
topio govern tccVote TCC vote on on-chain governance parameters.

# Get Proposal

Request

topio govern getProposal 

Request Parameters

Parameter Name Required Default Value Type Description
proposal_id No Empty String String Proposal ID, if it is empty, all proposals are queried by default.
The proposal ID can be queried through topio govern getProposal.

Options

Option Name Default Value Type Description
-h, --help - - Check the command's help information.

Response Parameters

Parameter Name Required Default Value Parameter Type Description
proposal_type Yes - Uint8 Proposal Type:1--on-chain governance parameter modification proposal;2--community fund management proposal.
target Yes - String On-Chain Parameter Modification Proposal: Target is on-chain governance parameter, more about on-chain governance parameter please refer to On-Chain Governance Prarameters. Community Fund Management Proposal: Target is burn account address: target is T!0001Ebj8hBvoLdvcEEUwNZ423zM3Kh9d4nL1Ug.
value Yes - String When target is on-chain governance parameter, value=new parameter value. When target is burn account address, value=transfered amount, the unit is uTOP.
proposal_deposit Yes - Uint64 Proposal deposit, current is "0".
effective_timer_height Yes - Uint64 Proposal effective clock height. If the clock height is less than the clock height at which the proposal was approved, the proposal will take effect immediately.

Request Sample

topio govern getProposal 1

Response Sample

  • Successful
{
    "data" : {
      "1":{
	      "effective_timer_height": 1010110,
	      "expire_time": 1000
	      "priority": 3,
	      "proposal_deposit": 400,
	      "proposal_id": 1,
	      "proposal_type": 1,
         "proposer_account_addr" : "T800002276a7d58218ac4978733e5cca927a7d86cb7c87",
	      "target": archive_deposit,
	      "value": 1000,
	      "voting_status": 0
      }
   },
   "errmsg" : "ok",
   "errno" : 0,
   "sequence_id" : "3"
}
  • Failed
No data!

# Get CGP

Get on-chain governance parameters.

Request

topio govern CGP

Request Parameters

None.

Options

Option Name Default Value Type Description
-h, --help - - Check the command's help information.

Response Parameters

Please refer to On-chain Governance Parameters

Request Sample

topio govern CGP

Response Schema

  • Successful
{
   "data": {
      "additional_issue_year_ratio": "8",
      "application_contract_code_max_len": "32768",
      "archive_election_interval": "11",
      "auditor_group_count": "2",
      "auditor_reward_ratio": "10",
      "award_auditor_credit": "30000",
      "award_validator_credit": "30000",
      "backward_auditor_slash_credit": "100000",
      "backward_node_lock_duration_increment": "103681",
      "backward_validator_slash_credit": "100000",
      "beacon_tx_fee": "100000000",
      "bookload_max_block_per_table": "32",
      "cgc_proposal_expire_time": "30",
      "claim_node_reward_interval": "8640",
      "claim_voter_dividend_interval": "8640",
      "cluster_election_interval": "71",
      "cluster_election_minimum_rotation_ratio": "66",
      "cluster_zero_workload": "0",
      "contract_transaction_size": "25",
      "cpu_gas_exchange_ratio": "40",
      "cross_reading_rec_standby_pool_contract_height_step_limitation": "2",
      "cross_reading_rec_standby_pool_contract_logic_timeout_limitation": "29",
      "custom_property_max_number": "128",
      "custom_property_name_max_len": "16",
      "dividend_ratio_change_interval": "120960",
      "edge_election_interval": "17",
      "edge_reward_ratio": "3",
      "election_rotation_count_ratio": "16",
      "free_gas": "25000",
      "fullunit_contain_of_unit_num": "21",
      "governance_reward_ratio": "4",
      "initial_total_locked_token": "10000000000000",
      "leader_election_round": "2",
      "max_archive_group_size": "512",
      "max_auditor_group_size": "64",
      "max_auditor_rotation_count": "2",
      "max_edge_group_size": "512",
      "max_election_committee_size": "256",
      "max_gas_account": "200000",
      "max_gas_contract": "10000000",
      "max_nodedeposit_lock_duration": "3153593",
      "max_validate_stake": "24500000",
      "max_validator_group_size": "128",
      "max_vote_nodes_num": "1000",
      "min_auditor_deposit": "1000000000000",
      "min_auditor_group_size": "32",
      "min_cgc_proposal_deposit": "100000000",
      "min_credit": "100000",
      "min_edge_deposit": "100000000000",
      "min_election_committee_size": "32",
      "min_free_gas_balance": "100000000",
      "min_mainnet_active_archives": "1",
      "min_mainnet_active_auditors": "128",
      "min_mainnet_active_edges": "1",
      "min_mainnet_active_validators": "512",
      "min_mainnet_active_votes": "0",
      "min_node_reward": "0",
      "min_ratio_annual_total_reward": "2",
      "min_stake_votes_num": "10000",
      "min_table_block_report": "16",
      "min_tx_deposit": "100000",
      "min_validator_deposit": "500000000000",
      "min_validator_group_size": "32",
      "min_voter_dividend": "0",
      "min_votes_num": "0",
      "nodes_per_segment": "27",
      "punish_interval_table_block": "138240",
      "punish_interval_time_block": "8641",
      "rec_election_interval": "60480",
      "rec_standby_pool_update_interval": "10",
      "reward_issue_interval": "8640",
      "schedule_table_num_per_clock": "4",
      "shard_zero_workload": "0",
      "sign_block_publishment_threshold_value": "0",
      "sign_block_ranking_publishment_threshold_value": "10",
      "sign_block_ranking_reward_threshold_value": "0",
      "sign_block_reward_threshold_value": "80",
      "sign_table_blocks_report_interval": "311",
      "tableblock_batch_tx_max_num": "64",
      "tableblock_batch_unitblock_max_num": "64",
      "task_num_per_round": "16",
      "tcc_member_number": "T800002276a7d58218ac4978733e5cca927a7d86cb7c87,T8000066ab344963eaa071f9636faac26b0d1a39900325",
      "toggle_whitelist": "0",
      "total_gas_shard": "2160000000000",
      "total_issuance": "20000000000000000",
      "tx_deposit_gas_exchange_ratio": "100",
      "tx_send_timestamp_tolerance": "300",
      "unitblock_confirm_tx_batch_num": "8",
      "unitblock_recv_transfer_tx_batch_num": "4",
      "unitblock_send_transfer_tx_batch_num": "3",
      "unlock_gas_staked_delay_time": "8641",
      "usedgas_decay_cycle": "8641",
      "validator_group_count": "4",
      "validator_reward_ratio": "60",
      "vote_reward_ratio": "20",
      "votes_report_interval": "30",
      "whitelist": "T8000085a8e8acd53c72dca85dcb002a6710796975b4ba,T80000FD4f433c036268F17a1b4204eA907E70618d030E,T8000066ab344963eaa071f9636faac26b0d1a39900325,T800002276a7d58218ac4978733e5cca927a7d86cb7c87",
      "workload_per_tableblock": "2",
      "workload_per_tx": "1",
      "workload_report_interval": "1080",
      "workload_timer_interval": "18",
      "zec_election_interval": "8640",
      "zec_standby_pool_update_interval": "11",
      "zone_election_trigger_interval": "5"
   },
   "errmsg": "ok",
   "errno": 0,
   "sequence_id": "4"
}
  • Failed

None.

# Submit Proposal

Any user can submit a proposal as long as a certain TOP tokens are pledged.

In addition to the minimum transaction deposit of 100,000 uTOP token, the transaction fee of 100*10^6 uTOP token shall be deducted for running Beacon system contract transaction.

So make sure you have at least 100.1*10^6 uTOP balance in your account before submitting your proposal.

# On-Chain Governance Parameter Modification Proposals

Support the modification of on-chain governance parameters through the proposal.

# Community Fund Management Proposal

The system distributes governance rewards and zero-workload node rewards to the community fund account. Community users can transfer the balance in the account to the destruction account through the on-chain governance proposal. After the proposal is approved by the TCC, the destruction will take effect.

Community fund account address: T2000138QMHWxXshXyZa1E48JU1LREu3UrT5KGD2U@0。

Burn account address: T!0001Ebj8hBvoLdvcEEUwNZ423zM3Kh9d4nL1Ug。

Request Sample

topio govern submitProposal

Request Parameters

Parameter Name Required Default Value Parameter Type Description
proposal_type Yes - Uint8 Proposal Type:1--on-chain governance parameter modification proposal;2--community fund management proposal.
target Yes - String On-Chain Parameter Modification Proposal: Target is on-chain governance parameter, more about on-chain governance parameter please refer to On-Chain Governance Prarameters. Community Fund Management Proposal: Target is burn account address: target is T!0001Ebj8hBvoLdvcEEUwNZ423zM3Kh9d4nL1Ug.
value Yes - String When target is on-chain governance parameter, value=new parameter value. When target is burn account address, value=transferd amount, the unit is uTOP.
proposal_deposit Yes - Uint64 Proposal deposit, current is "0".
effective_timer_height Yes - Uint64 Proposal effective clock height. If the clock height is less than the clock height at which the proposal was approved, the proposal will take effect immediately.

Options

Option Name Default Value Type Description
-h, --help - - Check the command's help information.

Response Parameters

Parameter Name Type Description
Transaction hash String The transaction hash that can be used to query the transaction consensus status.

Request Sample

topio govern submitProposal 1 advance_deposit 10000 100 1010110

Response Schema

  • Successful
Transaction hash: 0xb777722eba6b3b9295f42171b0ed7a31d72f6465797ddeed111af4f0ad710a1f
Please use command 'topio querytx' to query transaction status later on!!!

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "success", then succeed to submit proposal.

  • Failed

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "failure", then failed to submit proposal.

# Withdraw Proposal

A proposal can only be withdrawn by it's sponsor.

Request

topio govern withdrawProposal

Request Parameters

Parameter Name Required Default Value Type Description
proposal_id Yes - String Proposal ID, can be queried by topio govern getProposal.

Options

Option Name Default Value Type Description
-h, --help - - Check the command's help information.

Response Parameters

Parameter Name Type Description
Transaction hash String The transaction hash which can be used to query the transaction consensus status.

Request Sample

topio govern withdrawProposal 1

Response Schema

  • Successful
Transaction hash: 0xe1befa7a1acae89fbbf9c3cab8314212fb671af003a9d581867b541428e02f56
Please use command 'topio querytx' to query transaction status later on!!!

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "success", then succeed to withdraw proposal.

  • Failed

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "failure", then failed to withdraw proposal.

# TCC Vote Proposals

You can get detailed information about the proposal before you vote on a proposal.

Only the TCC members have the right to vote on a proposal. Rules for voting on proposals.

The approval of 2/3 of the members is required, and no more than 1/5 of the opposition members.

After the proposal is voted through, a legislative order will be formed and sent to all nodes of the network.

After a proposal is voted through, the system will automatically delete the proposal, unable to query the proposal.

Request

topio govern tccVote

Request Sample

Parameter Name Required Default Value Type Description
proposal_id Yes - String Proposal ID, can be queried by topio govern getProposal.
opinion Yes - String Vote opinion: true or false.

Options

Option Name Default Value Type Description
-h, --help - - Check the command's help information.

Response Parameters

Parameter Name Type Description
Transaction hash String The transaction hash that can be used to query the transaction consensus status.

Request Sample

topio govern tccVote 1 true

Response Schema

  • Successful
Transaction hash: 0x1eca678e243743f226ebb6a42c7a5500a056c890574392c7bf70b6797e179902
Please use command 'topio querytx' to query transaction status later on!!!

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "success", then succeed to vote the proposal.

  • Failed

Execute topio querytx to query the transaction by transaction hash, when the consensus final status is a "failure", then failed to vote the proposal.