Participating in Consensus
Participating with your ALGOs in Algorand's Consensus via the Algofi Vault.
Accounts participate in Algorand's consensus protocol by generating a valid participation key set (voting key, selection key, and state proof key) with a participation node then registering those keys online with a special transaction called a KeyReg transaction.
Participating in consensus via the Algofi Vault is a 3-step process.
- 1.Access your Vault Account Address
- 2.Generate a Valid Participation Key Set with a Participation Node
- 3.Register Participation Key Set Online with a KeyReg Transaction
First, we get the Vault Account address from the Vault Address selector.
Vault Address Selector
Second, we generating a participation key set on a participation node for the Vault account.
We can use the goal CLI tool within a participation node to generate the participation key set for a given Vault account.
goal account addpartkey -a <address-of-participating-account> --roundFirstValid=<partkey-first-round> --roundLastValid=<partkey-last-round> --keyDilution=<key-dilution-value> -d /path/to/data
where -a is the Vault account address, --roundFirstValid is the first round your participation key set is valid, --roundLastValid is the last round of validity, and --keyDilution is the Key Dilution Parameter. Key Dilution defaults to 10000 and determines the number of rounds for generating new ephemeral keys. To reduce the size of the participation key, set the key dilution value to roughly the square root of the range that the partkey is valid for.
There is no theoretical limit to the range you can specify for a participation key validity period, only disk space constraints. A recommended range is 3,000,000 rounds.
After submitting this command, a you'll be prompted with the following message:
Participation Key Generation
To check if a participation key set has been successfully generated on the participation node:
goal account listpartkeys -d /path/to/data
If the Vault account address is listed under the "Account" heading of the listpartkeys table, then the participation keys have been successfully generated.
Next, to display the participation key set and related information we run:
goal account partkeyinfo -d /path/to/data
From the data dump, look for the Vault account address and save these data:
- 1.Voting Key
- 2.Selection Key
- 3.State Proof Key
- 4.First Round
- 5.Last Round
- 6.Key Dilution
Provide your node service with your Vault account address and specify an initial voting round, final voting round, and key dilution (use 10000 for this). It is recommended to set a participation range of 3,000,000 rounds. For this, you can specify an initial voting round of the current round + 100000 rounds (about 5 days) and a final round of current round + 100000 + 3000000. For example, if the current round is 20,000,000, I'll use an initial round of 20,100,000 and a final round of 23,100,000.
Ask your node provider to generate your participation key set for your Vault account with these settings. They should provide you with a Voting Key, Selection Key, and State Proof Key.
Third, we register the participation key set online with a KeyReg transaction via the Vault account.
Navigate to the Vault tab and click the Participation button as highlighted above.
It will bring up form where you can enter the participation key set information.
Participation Key Registration Form
You should see a status of "Offline" which means your Vault account is not registered "Online" in consensus. Fill in the form with the data from the participation node and click Send Key Reg Transaction then sign and send the transaction. If the Key Reg transaction is submitted successfully, you will see the status update to "Online".
Successful Participation Key Registration
At this point your Vault account has been registered with a participation node and registered online.
Sometimes users will need to take their Vault account offline. For example, if your participation node is experiencing downtime. To do so, navigate back to the Consensus Button and click Send KeyReg Offline Transaction; sign and send the transaction to take your account offline.
Just before the final round passes, click the Participation button where a prompt will given you a Key Reg Offline transaction. Click submit then sign and send the Key Reg Offline transaction. Then, repeat the process outlined here to generate a participation key set for your Vault account and register that key set online.