3.2.3. Renewing the Voting Key¶
- creation-day:
Nov. 27, 2026
- update date:
Nov. 27, 2026
Warning
votingkey link ).3.2.3.1. Voting Key Expiration¶
maxVotingKeyLifetime ). Since 1 epoch is 160 blocks ( votingSetGrouping ), the key expires after about 4.2 million blocks.Block generation time |
Approximate time until expiration |
|---|---|
10 seconds |
About 487 days |
15 seconds |
About 730 days |
30 seconds |
About 4 years |
60 seconds |
About 8 years |
Note
latestFinalizedBlock.finalizationEpoch in the REST endpoint /chain/info.3.2.3.2. Renewal Overview¶
Do the following three things for each node.
Create the key file for the next period (
private_key_tree2.dat) (votingkey update)Register the key to the node’s harvesting account (
votingkey link; this sends a VotingKeyLink transaction)Place the key file in the node’s voting key directory
Warning
3.2.3.3. Step.1 Log in to the node¶
Confirm that mijin-catapult-tools is 0.3.1 or later and that votingkey link is available. If it is not installed, install it by referring to mijin account creation.
$ mijin-catapult-tools -V
0.3.1
$ mijin-catapult-tools votingkey -h | grep link
link [options] Link the latest Votingkey file to the main Account and
If it is old, update it.
$ yarn global add @tech-bureau/mijin-catapult-tools@latest
3.2.3.4. Step.2 Set the node settings as variables¶
Set the following values according to the target node.
Variable |
Description |
Example |
|---|---|---|
|
Node type |
|
|
Index among nodes of the same type (starting from 0) |
|
|
REST URL |
|
$ R=api; I=0; URL=http://localhost:3000
$ VK=/home/catapult/mijin-catapult-package/package/$R/catapult/userconfig/resources/votingkey
$ S=/mnt/mijin/shares
Note
Peer nodes do not have REST, so specify the REST of an api node for URL.
3.2.3.5. Step.3 Create the configuration file¶
nemesis_addresses_harvesting.json and nemesis_addresses_harvesting_voting.json in the shared data.~/config.json ).$ jq -n --arg url $URL \
--slurpfile h $S/nemesis_addresses_harvesting.json \
--slurpfile v $S/nemesis_addresses_harvesting_voting.json --arg r $R --argjson i $I '
def acc(a): {privateKey: a.private_key, publicKey: a.public_key, address: a.address};
{url: $url, mainAccount: acc($h[0][$r][$i]), keylink: {voting: acc($v[0][$r][$i])}}' > ~/config.json
$ chmod 600 ~/config.json
Warning
~/config.json contains private keys. Be sure to delete it in Step.8 when you are done.Confirm that the configuration file is for the target node. If the following three public keys are all the same, the file was created correctly.
$ mijin-catapult-tools votingkey info -r ~/config.json -d $VK
2026-11-27T01:05:04.043Z [info] : Start Voting Key Check Dir... /home/catapult/mijin-catapult-package/package/api/catapult/userconfig/resources/votingkey
2026-11-27T01:05:04.045Z [info] : votingfile: index0: {"publicKey":"E816...D8AC","startEpoch":1,"endEpoch":26280,"filename":"private_key_tree1.dat"}
$ jq -r .keylink.voting.publicKey ~/config.json
E816...D8AC
$ curl -s $URL/accounts/$(jq -r .mainAccount.address ~/config.json) | jq .account.supplementalPublicKeys.voting
{
"publicKeys": [
{
"publicKey": "E816...D8AC",
"startEpoch": 1,
"endEpoch": 26280
}
]
}
$ ls -l $VK
-rw------- 1 catapult catapult 2522960 Nov 27 01:03 private_key_tree1.dat
3.2.3.6. Step.4 Create the key file for the next period¶
$ cp -r $VK ~/vk-work
$ mijin-catapult-tools votingkey update -r ~/config.json -d ~/vk-work
2026-11-27T01:05:52.590Z [info] : Start Voting Key Update...
2026-11-27T01:05:52.593Z [info] : votingSetGroup: 160
2026-11-27T01:05:52.594Z [info] : votingMaxEpoch: 26280
2026-11-27T01:05:52.594Z [info] : votingStartEpoch: 26281
2026-11-27T01:05:52.594Z [info] : votingEndEpoch: 52560
2026-11-27T01:05:52.594Z [info] : blockGenerationTargetTime: 15
2026-11-27T01:06:14.907Z [info] : Voting Key file Create: SUCCESS /home/catapult/vk-work/private_key_tree2.dat
private_key_tree2.dat starts right after the end epoch of the current key (26281 to 52560 if the current key is the one created at setup).$ mijin-catapult-tools votingkey info -r ~/config.json -d ~/vk-work
2026-11-27T01:06:15.545Z [info] : votingfile: index0: {"publicKey":"E816...D8AC","startEpoch":1,"endEpoch":26280,"filename":"private_key_tree1.dat"}
2026-11-27T01:06:15.545Z [info] : votingfile: index1: {"publicKey":"E816...D8AC","startEpoch":26281,"endEpoch":52560,"filename":"private_key_tree2.dat"}
Note
The voting public key is derived from the voting key, so it has the same value in the key files of every period.
3.2.3.7. Step.5 Register the key¶
End Transaction is displayed, the transaction has been confirmed.$ mijin-catapult-tools votingkey link -r ~/config.json -d ~/vk-work
2026-11-27T01:23:53.712Z [info] : mijin URL: http://localhost:3000
2026-11-27T01:23:53.713Z [info] : Network: 96
2026-11-27T01:23:53.775Z [info] : Start Voting Key Link...
2026-11-27T01:23:53.777Z [info] : Voting Key file: /home/catapult/vk-work/private_key_tree2.dat
2026-11-27T01:23:53.778Z [info] : Voting Public Key: E816...D8AC
2026-11-27T01:23:53.778Z [info] : votingStartEpoch: 26281
2026-11-27T01:23:53.778Z [info] : votingEndEpoch: 52560
2026-11-27T01:23:53.787Z [info] : Main Account: MBBC...2PQ
2026-11-27T01:23:53.788Z [info] : Linked Voting Key: index0: E816...D8AC (epoch 1 - 26280)
2026-11-27T01:23:53.823Z [info] : Transaction Fee: 0
2026-11-27T01:23:53.824Z [info] : Start Announce Transaction...
2026-11-27T01:24:00.390Z [info] : End Transaction
2026-11-27T01:24:00.390Z [info] : http://localhost:3000/transactionStatus/BD92...19F7
2026-11-27T01:24:00.390Z [info] : http://localhost:3000/transactions/confirmed/BD92...19F7
Confirm that there are now two registered voting keys. The change may not be reflected immediately after confirmation, so if there is still only one, wait a little and check again.
$ curl -s $URL/accounts/$(jq -r .mainAccount.address ~/config.json) | jq .account.supplementalPublicKeys.voting
{
"publicKeys": [
{
"publicKey": "E816...D8AC",
"startEpoch": 1,
"endEpoch": 26280
},
{
"publicKey": "E816...D8AC",
"startEpoch": 26281,
"endEpoch": 52560
}
]
}
Note
votingkey link exits without sending a transaction in the following cases.already linked )overlaps )maximum )lifetime )already linked, so the key is never registered twice.3.2.3.8. Step.6 Place the key file on the node¶
Place the new key file with the same file name in the node’s voting key directory, and give it the same permissions as the current key file.
$ cp ~/vk-work/private_key_tree2.dat $VK/
$ chmod 600 $VK/private_key_tree2.dat
$ ls -l $VK
-rw------- 1 catapult catapult 2522960 Nov 27 01:23 private_key_tree1.dat
-rw------- 1 catapult catapult 2522960 Nov 27 01:24 private_key_tree2.dat
Warning
private_key_tree1.dat, private_key_tree2.dat, … in numerical order, and reads the next numbered file when the current key file is used up. Do not leave gaps in the numbering.3.2.3.9. Step.7 Check finalization¶
Confirm that finalization continues. finalizationEpoch increases by 1 every epoch (160 blocks; about 40 minutes with 15-second blocks).
$ curl -s $URL/chain/info | jq .latestFinalizedBlock
{
"finalizationEpoch": 4,
"finalizationPoint": 8,
"height": "460",
"hash": "516B...4E42"
}
3.2.3.10. Step.8 Clean up¶
The configuration file and the working directory contain private keys, so delete them.
$ shred -u ~/vk-work/* ~/config.json
$ rm -rf ~/vk-work
R, I, and URL in Step.2 to match each node).