How system updates and voting work
This article explains how updates are implemented on PBC via node operator voting.
On-chain and off-chain updates
There are two types of updates on PBC, on-chain and off-chain updates. Off-chain updates are changes to the software running locally on a node. On-chain updates affect system contracts and or plug-ins. Node operators can directly control and modify which software runs locally on their server. Any on-chain updates is subject to a vote.
Voting rules
Votes are decided by a two-thirds-plus-one majority, e.g. for a baker node committee of 100, a majority of 67 is necessary to carry a vote.
How the default yes-vote works
Nodes vote yes to on-chain updates by default. This is expedient in case of bugs. Votes on controversial changes can be proposed as a manual votes.
How to change the config.json in order to cast a no-vote
Below you see how config.json
looks like by default when generated by the node-register.sh
. You can verify with the cat command:
sudo cat /opt/pbc-mainnet/conf/config.json
# The config file should be printed here
{
"restPort": 8080,
"floodingPort": 9888,
"knownPeers": [
"YOUR KNOWN PEERS"
],
"networkKey": "YOUR NETWORK KEY",
"producerConfig": {
"accountKey": "YOUR ACCOUNT KEY",
"finalizationKey": "YOUR FINALIZATION KEY",
"ethereumUrl": "https://example.com",
"polygonUrl": "https://example.com",
"bnbSmartChainUrl": "https://example.com",
"host": "YOUR IP"
}
}
Always shut down your node before making changes to the config.json
. You first navigate to the directory of your docker-compose.yml
and shut down the container running the image for pbc-mainnet:
cd pbc
docker stop pbc-mainnet
Now you can edit the config.json
, open it with nano:
cd /opt/pbc-mainnet/conf/config.json
nano config.json
You need to add an override map field to the config.json
. You put systemupdate.vote.ID
in the map and point it to "false".
You can find the ID in the CHANGELOG.md
in latest merge request to mainnet.
Example:
{
"restPort": 8080,
"floodingPort": 9888,
"knownPeers": [
"YOUR KNOWN PEERS"
],
"networkKey": "YOUR NETWORK KEY",
"overrides": {
"systemupdate.vote.f38987b9ceed396fbe0a33041e4f5c41ad0d781d2bea641b4b31d31d4501b5e5": "false",
"systemupdate.vote.981dee91405a4f60fcfdfd41e88b04a1e5e9023d4c49449228a9f9207bb4ba39": "false"
},
"producerConfig": {
"accountKey": "YOUR ACCOUNT KEY",
"finalizationKey": "YOUR FINALIZATION KEY",
"ethereumUrl": "https://example.com",
"polygonUrl": "https://example.com",
"bnbSmartChainUrl": "https://example.com",
"host": "YOUR IP"
}
}
The result of this change is an automatic no-vote on votes with poll id f38987b9ceed396fbe0a33041e4f5c41ad0d781d2bea641b4b31d31d4501b5e5 and 981dee91405a4f60fcfdfd41e88b04a1e5e9023d4c49449228a9f9207bb4ba39 from your node.
Make sure the JSON you made is valid. You can download a JSON editor or use a free online validator. If you use an online validator, you should for safety remove the account private account key between the quotation marks before you paste it into a validator. This does not affect the validity of the JSON. Save the file in nano by pressing CTRL+O
and then ENTER
and then CTRL+X
.
Start the node:
docker compose up -d
Verify that the node is running:
docker logs -f pbc-mainnet
You can leave the override maps in the config.json
, besides the specific vote they do not affect the node. After the vote has passed and the result is on chain you consider removing the override maps. A long list of overrides might make your config.json
hard to read.
Updates with manual voting
Vote responsibly! Voting on a system update means that you are voting on an irreversible change to on-chain components like system contracts and plugins. Anyone with sufficient tokens can propose a vote. If you are unable to verify a votes content we recommend you to think twice before voting for it.
Cast a manual vote:
- Go to the System Update contract in the Partisia Blockchain Browser and sign in
- Enter Poll id (you can find it in the state of the System Update contract in the field named
key:
- Choose True or False
- Click Vote