Run a validator node on Windows#
This guide describes how to set up the node to run as a validator node on a Windows node that participates in the Concordium network. A node receives blocks and transactions from other nodes and propagates information about blocks and transactions to the nodes in the Concordium network. In addition, a validator node also participates in the lottery and produces its own blocks. The validator node will start producing blocks two epochs after the transaction has been approved.
Configure a validator node on Windows#
Create validator keys in Concordium Wallet for Web, Concordium Wallet for Mobile, Concordium Legacy Wallet, Desktop Wallet or Concordium Client and associate them with an account either on mainnet or testnet.
The validator credentials file must be accessible by the SYSTEM user and can’t be encrypted.
Do not edit the name or contents of the validator-credentials.json file.
Once you’ve added validation to an account and exported the validator keys, you have to change the configuration file for the Concordium Node Service. Open Configure Concordium Node Service from the Start menu, and select Yes when you see the message Do you want to allow this app to make changes to your device?. The configuration file opens.
Add the following in the
[node.mainnet]section if the credentials are for mainnet, or the
[node.testnet]section if they are for testnet. Make sure that you add the credentials to the network the account was created on.
baker_credentials = 'C:\path\to\validator-credentials.json'
where you replace
C:\path\to\validator-credentials.jsonwith the full path to the validator credentials file.
Save the file.
Stop and restart the node runner service using the Stop Concordium Service Node and the Start Concordium Service Node shortcuts. Don’t use End task in the Task Manager as it might cause errors.
View the node log#
You can find the node logs here:
If a node fails to start, for example because of a configuration issue, or stops unexpectedly, there will be an Error-level event in the Event Viewer that explains why. The following are common error scenarios and possible solutions.
The node doesn’t restart after you’ve set the credentials in the configuration file. This error can occur when the specified location of the credentials file is incorrect. In the Event Viewer an error such as the following might appear. When this happens, change the path in the configuration file.
The node doesn’t start validation, and in the log file you see the message Validator keys are incorrect repeatedly. It takes 1-2 hours after validator keys have been added to an account for the keys to be eligible to produce blocks. If this problem persists beyond two hours, then likely the keys are incorrect. Double check that you are not using keys from testnet on mainnet, or vice-versa.
For more information on the logs, see Run a node on Windows.