Governance Multisignature
The Charli3 Partner Chain utilizes a multisignature governance model to manage critical network parameters, such as authorized oracle nodes and protocol configurations. This ensures that no single entity has full control over the network.
Governance actions are performed using the charli3-substrate-cli tool, which interacts with the Substrate-based partner chain via RPC.
CLI Setup
To manage the governance of the partner chain, you first need to set up the CLI tool:
-
Clone the repository and install dependencies:
git clone https://github.com/Charli3-Official/charli3-substrate-cli.git cd charli3-substrate-cli yarn install -
Configure the environment: Copy the example configuration file and edit it with your multisig details and the desired on-chain state.
cp config-example.yml config.yml
Configuration
The config.yml file is the source of truth for your governance operations. It contains two main sections:
Multisig Configuration
Defines the signatories and the threshold required for a transaction to be executed.
multisig:
addresses:
- 5HLA59bBw9azsmsqRVje3bbpZvLmiM7aa9ZGn3CG9y2bJHEJ
- 5DD4RE4uJQGbDY6uX31FUBeP4C6Weey9ADYEASN59aFHEcaW
- 5EPJSr8TpZLkdvoMDtBgsKuGDmjAG64u9bjZXAfSM9m9PbFk
threshold: 2Oracle Configuration
Defines the protocol parameters, including consensus rules and data channel mapping.
oracleConfig:
consensus:
minNodesForTrustedAggregation: 3
feedAge: 12
outliersRange: 160
divergency: 65
tradePairs:
- baseCurrency: 'ADA'
quoteCurrency: 'USD'
- baseCurrency: 'C3'
quoteCurrency: 'ADA'
messages:
- ['channel_id_1', [0, 1]] # Maps channel_id to trade pair indices (ADA/USD and C3/ADA)Managing Oracle Nodes
Adding a New Node
To authorize a new oracle node, a multisig member must initiate the transaction using the node’s AccountId32 (SS58 address).
-
Start Authorization:
yarn charli3 start-authorize-node --node <NODE_SS58_ADDRESS> -w <YOUR_WALLET_SEED> --config config.ymlThis will output a Transaction Hash. Share this hash with other signatories.
-
Sign Authorization: Other signatories (up to the threshold) must run:
yarn charli3 sign-authorize-node --node <NODE_SS58_ADDRESS> --tx <TX_HASH> -w <YOUR_WALLET_SEED> --config config.yml
Removing a Node
The process for removing an authorized node is identical, but using the deauthorize commands.
-
Start Deauthorization:
yarn charli3 start-deauthorize-node --node <NODE_SS58_ADDRESS> -w <YOUR_WALLET_SEED> --config config.yml -
Sign Deauthorization:
yarn charli3 sign-deauthorize-node --node <NODE_SS58_ADDRESS> --tx <TX_HASH> -w <YOUR_WALLET_SEED> --config config.yml
Updating Protocol Parameters
To update parameters like channel_id, tradePairs, or consensus rules, you must first update the values in your config.yml and then submit a configuration update.
-
Update
config.yml: Modify theoracleConfigsection with your new values (e.g., changing achannel_idin themessageslist). -
Start Configuration Update:
yarn charli3 start-config-update -w <YOUR_WALLET_SEED> --config config.ymlThis will output a Transaction Hash.
-
Sign Configuration Update: The remaining signatories must sign to reach the threshold:
yarn charli3 sign-config-update --tx <TX_HASH> -w <YOUR_WALLET_SEED> --config config.yml
Once the threshold is reached, the transaction is executed, and the new configuration becomes live on the partner chain.
Utility Commands
- Check Balances: Ensure your multisig account and signatories have enough funds for gas.
yarn charli3 check-balance -w <YOUR_WALLET_SEED> - Get Multisig Address: Useful for funding the multisig account.
yarn charli3 get-multisig-hex --config config.yml