Account Registration
An online account means that the account is available to participate in consensus. An account is marked online by registering a participation key with the network by sending an online key registration transaction to the network. An offline account means that the account is not available to participate in consensus. An account is marked offline by sending an offline key registration transaction to the network.
It is important to mark your account offline if it is not participating for various reasons. Not doing so is bad network behavior and will decrease the honest/dishonest user ratio that underpins the liveness of the agreement protocol. Also, in the event of node migration, hardware swap, or other similar events, it is recommended to have your account offline for a few rounds rather than having it online on multiple nodes at the same time.
With the addition of staking rewards into the protocol as of v4.0, Algorand consensus participants can set their account as eligible for rewards by including a 2 Algo fee when registering participation keys online. This eligibility status persists if the account is marked offline gracefully, such as for hardware maintenance, or when renewing participation keys. It is only necessary to pay the 2 Algo fee again if the account is kicked offline by the protocol for consensus absenteeism.
Register Your Account Online
This section assumes that you have already generated a participation key for the account you plan to mark online.
For an account to participate in consensus, the account needs to be registered online by creating, signing, and sending a key registration transaction with details of the participation key that will vote on the account’s behalf. Once the blockchain processes the transaction, the Verifiable Random Function public key (referred to as the VRF public key) is written into the account’s data, and the account will start participating in consensus with that key. This VRF public key is how the account is associated with the specific participation keys on the node.
Create an Online Key Registration Transaction
There are two main ways you can create an online key registration transaction.
After generating a participation key, you can press r
to register it online on the Algorand network.
You can also start this flow by pressing r
on the key information screen shown below.
After you press r
, you will see a link that you can follow to sign your key registration transaction:
On most terminals, you can hold down ctrl
or cmd
and click the link to open it in your default browser. If this does not work, copy the link and paste it into your browser. You will be taken to the Lora Transaction Wizard, where you should see the key information pre-filled:
Alternatively, you can press s
when the link is presented to show a QR code that contains the key registration transaction that can be scanned to open the transaction in Pera wallet ready to be signed and sent.
After scanning with Pera, you will see the transaction details in your wallet.
Run the following command to create an online key registration transaction and dump the transaction object into the online.txn
file. Make sure to replace --address
to the account address sending the key registration transaction, replace the --firstvalid
to the most recent block round, replace replace --lastvalid
to latest block round + 1000
. You can get the latest block round by running goal node status
. If you need to set the account as eligible for staking rewards, set the fee to 2 Algo by adding --fee=2000000
.
Now you should see the online.txn
file created in your directory. You can inspect the transaction object inside of online.txn
file by running goal clerk inspect online.txn
, and it should look something like this:
Authorize and Send the Key Registration Transaction
Once you are in Lora Transaction Wizard, with the key information pre-filled:
-
Select
Connect Wallet
on the top right and connect your wallet. -
Click the
Send
button on the bottom right. Your wallet should prompt you to sign the key registration transaction -
Sign the transaction
The transaction will be submitted to the network. If it is accepted, you will see a visual confirmation in Lora similar to the one displayed below:
NodeKit will detect the key registration and take you back to the Key information view:
You can press ESC
to leave the key information modal.
That’s it! Your node is now participating in Algorand consensus. If your account balance exceeds 30,000 ALGO`, it will accumulate rewards for each block it proposes on the Algorand network.
To sign the key registration transaction inside the online.txn
file generated from the previous step with goal, you first need to have a funded account in a goal wallet.
After creating a goal account, you can sign the key registration transaction inside the online.txn
file with the following command.
If you are signing with the same account as the sender of the key registration transaction:
If you are signing with an account different from the key registration transaction sender:
Now if you run goal clerk inspect signed-online.txn
, you should see the signature added to the transaction object:
Verify that the participation key is on the node before submitting the signed transaction. Once verified, wait for the network to reach the transaction’s first valid round, then submit the transaction.
Register Your Account Offline
To mark an account offline, send a key registration transaction to the network authorized by the account to be marked offline. The signal to mark the sending account offline is the issuance of a "type": "keyreg"
transaction that does not contain any participation key-related fields (i.e., they are all set to null values).
Create an Offline Key Registration Transaction
There are two main ways you can create an online key registration transaction.
To generate an offline key registration transaction, press o
on the key information screen shown below to start the flow.
After you press o
, you will see a link that you can follow to sign your key registration transaction:
On most terminals, you can hold down Ctrl
and click the link to open it in your default browser.
If this does not work, copy the link and paste it into your browser.
You will be taken to the Lora Transaction Wizard, where you should see the offline keyreg transaction information pre-filled:
Run the following code to create an offline key registration transaction and dump the transaction object into the offline.txn
file. Make sure to replace --address
to the account address sending the key registration transaction Also replace the --firstvalid
to the most recent block round and --lastvalid
to latest block round + 1000
. You can get the latest block round by running goal node status
.
Now you should see the offline.txn
file created in your directory. You can inspect the transaction object inside of offline.txn
file by running goal clerk inspect offline.txn
, and it should look something like this:
Sign and Send the Key Registration Transaction
Once you are in Lora Transaction Wizard, with the offline keyreg transaction information pre-filled:
-
Select
Connect Wallet
on the top right and connect your wallet. -
Click the
Send
button on the bottom right. Your wallet should prompt you to sign the key registration transaction -
Sign the transaction
The transaction will be submitted to the network. If it is accepted, you will see a visual confirmation in Lora similar to the one displayed below:
NodeKit will detect the key registration and take you back to the Key information view:
You can press ESC
to leave the key information modal.
Sign the key registration transaction inside the offline.txn
file with the following command.
If you are signing with the same account as the sender of the key registration transaction:
If you are signing with an account different from the key registration transaction sender:
Now if you run goal clerk inspect signed-offline.txn
, you should see the signature added to the transaction object:
Once the transaction is signed, wait for the network to reach its first valid round and then submit it.