6.4 Validator Configuration
After your node setup is working as intended, you can activate its staking functionality by importing your validator keys. Running a validator node means you're actively participating in the blockchain's consensus on top of providing a synchronized data peer of the network. The LUKSO CLI provides unified commands to manage staking for mainnet and testnet and various clients.
Please ensure you have a basic understanding of blockchain networks and staking before running a validator node. If you're not yet familiar with Proof of Stake, Tokenomics, Slashing and Panelties, Validator Credentials and Client Providers, please refer to the π§ Theory section.
Depending on if you are participating in the mainnet or testnet, running a validator requires 32 LYX or 32 LYXt per validator key. Ensure you have completed the Key Generation and Deposit Process before importing keys.
1. Transfer Validator Keysβ
Once you've completed the validator setup, you will be left with one or multiple folders containing the encrypted validator key files, depending on if you split the deposits or withdrawals to multiple wallets. These deposit files will first have to be sent from your personal computer to your node, before they can be imported into the consensus client.
The Secure Copy Protocol is used for secure file transfers between hosts on a network. It operates over SSH, leveraging its authentication and encryption mechanisms to ensure both the authenticity and confidentiality of the data during transfer. SCP is a reliable choice for data transfers, offering secure transmission even over unsecured networks.
Build and execute the entire command. You will be prompted to log in again before the process is started.
The following steps are performed on your π» personal computer.
scp -P <ssh-port> -i ~/.ssh/<ssh-key> -r <key-folder> <user-name>@<node-ip>:<lukso-working-directory>/<keyfolder>
The command uses quite a few properties and flags. Replace all properties with specific values of your SSH and node configuration. Opening up a text editor before copying the contents into the terminal is recommended.
Property | Description | Retrieval |
---|---|---|
<ssh-key> | SSH key file used for authentication. | Run ls ~/.ssh/ in your personal computer's terminal to list the files in the SSH folder and find the correct key file name for your node login. |
<key-folder> | Local path to the keystore folder with validator keys. | Use your file explorer to locate the folder of your validator keys on your personal computer and right-click the folder and copy it's path. |
<ssh-port> | The SSH port of your node. | Open the ~/.ssh/config file using your preferred text editor on your personal computer and find the port that is used for the node's SSH communication. |
<user-name> | The SSH user for your node. | Open the ~/.ssh/config file using your preferred text editor on your personal computer and find the admin user name for your node. |
<node-ip> | The IP address of your node. | Open the ~/.ssh/config file using your preferred text editor on your personal computer and find the host IP address of your node. |
<lukso-working-directory> | The full path to your node's working directory. | Use SSH to connect to your node, enter your node's working directory, and run the pwd command to get it's full path. |
<keyfolder> | Name for the validator folder. | Define a name for the copied file's folder on your node, either the same as your personal computer or a new one. |
If you have multiple deposit folders, copy one folder at the time and perform this step several times.
2. Import Validator Keysβ
Once all validator key files got transferred over, import your keys within the LUKSO CLI. You will be asked for the path of the previously defined name of the key folder.
During the first import process, a new password for starting your validator node must be defined to secure the consensus client's wallet. Make sure to use a strong passphrase. It will be used to startup the staking process of your node.
The following steps are performed on your π node server.
- Mainnet
- Testnet
lukso validator import --validator-keys "<lukso-working-directory>/<keyfolder>"
lukso validator import --testnet --validator-keys "<lukso-working-directory>/<keyfolder>"
During the import of the keys, you will be promted to enter the password of the generated deposit keys.
If you have multiple deposit folders, import one folder at the time and re-type both wallet andkey passwords on each round.
The import command will generate a new keystore folder within the working directory housing all imported validator accounts.
lukso-node
β
ββββconfigs // Configuration Files
ββββ[network]-logs // Network's Logged Status Messages
ββββ[network]-data // Network's Blockchain Data
ββββ[network]-keystore // Network's Validator Keystore List
|
ββββcli-config.yaml // Global CLI Configuration
3. Verify Imported Accountsβ
After importing one or multiple folders, you can check your imported keys.
- Mainnet
- Testnet
# LUKSO CLI v. 0.6.0+
lukso validator list --mainnet
# Lukso CLI v. <0.6.0
validator accounts list --wallet-dir "mainnet-keystore"
# LUKSO CLI v. 0.6.0+
lukso validator list --testnet
# Lukso CLI v. <0.6.0
validator accounts list --wallet-dir "testnet-keystore"
4. Remove the Key Folderβ
If the imported keys match the ones in the original deposits, you can delete the folder with the deposit keys.
You can use the rm
command to remove files and directories while using the -r
recursive method. The flag will ensure to remove directories and their contents. You can further skip the confirmation questions or file errors using -rf
instead.
rm -rf <lukso-working-directory>/<keyfolder>
Make sure to adjust the path to your key-folder and repeat the process for every folder that was transferred.
5. Start the Validatorβ
After importing your keys, you can rstart the node with the validator functionality to begin staking.
To start the validator, you have to pass a minimum of two flags:
--validator
: Starts the configured clients and their validator client.--transaction-fee-recipient
: Defines the address to which block rewards and transaction tips will be paid out.
The recipient can be any Ethereum address of a wallet you have control over and is able to connect with custom networks. Ledger accounts, for instance, are secure hardware-wallets and can be imported into MetaMask to send transactions on custom networks. If you withdraw or transfer the money regularly, you can also store the funds in a browser wallet. The address can be updated every time the node is restarted.
- Regular Synchronization
- Automated Checkpoints
- Manual Checkpoints
# Starting the Mainnet Node as Validator
lukso start --validator --transaction-fee-recipient "<transaction-fee-recipient-address>"
# Starting the Testnet Node as Validator
lukso start --validator --transaction-fee-recipient "<transaction-fee-recipient-address>" --testnet
Replace <transaction-fee-recipient-address>
with your actual withdrawal address.
# Starting the Mainnet Node as Validator
lukso start --validator --transaction-fee-recipient "<transaction-fee-recipient-address>" --checkpoint-sync
# Starting the Testnet Node as Validator
lukso start --validator --testnet --transaction-fee-recipient "<transaction-fee-recipient-address>" --checkpoint-sync
Replace <transaction-fee-recipient-address>
with your actual withdrawal address.
- Visit the Mainnet Checkpoint Explorer or Testnet Checkpoint Explorer
- Pass the latest Block Root and Epoch values to the consensus client flags
- Lighthouse
- Teku
- Prysm
- Nimbus-Eth2
# Starting the Mainnet Node as Validator
lukso start --validator \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--lighthouse-checkpoint-sync-url=https://checkpoints.mainnet.lukso.network \
--lighthouse-genesis-state-url=https://checkpoints.mainnet.lukso.network \
--lighthouse-wss-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Testnet Node as Validator
lukso start --validator --testnet \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--lighthouse-checkpoint-sync-url=https://checkpoints.testnet.lukso.network \
--lighthouse-genesis-state-url=https://checkpoints.testnet.lukso.network \
--lighthouse-wss-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Mainnet Node as Validator
lukso start --validator \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--teku-checkpoint-sync-url=https://checkpoints.mainnet.lukso.network \
--teku-ws-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Testnet Node as Validator
lukso start --validator --testnet \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--teku-checkpoint-sync-url=https://checkpoints.testnet.lukso.network \
--teku-ws-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Mainnet Node as Validator
lukso start --validator \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--prysm-checkpoint-sync-url=https://checkpoints.mainnet.lukso.network \
--prysm-genesis-beacon-api-url=https://checkpoints.mainnet.lukso.network \
--prysm-weak-subjectivity-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Testnet Node as Validator
lukso start --validator --testnet \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--prysm-checkpoint-sync-url=https://checkpoints.testnet.lukso.network \
--prysm-genesis-beacon-api-url=https://checkpoints.testnet.lukso.network \
--prysm-weak-subjectivity-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Mainnet Node as Validator
lukso start --validator \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--nimbus2-external-beacon-api-url=https://checkpoints.mainnet.lukso.network \
--nimbus2-trusted-block-root=$<BLOCK_ROOT> \
--nimbus2-weak-subjectivity-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
# Starting the Testnet Node as Validator
lukso start --validator --testnet \
--transaction-fee-recipient "<transaction-fee-recipient-address>" \
--nimbus2-external-beacon-api-url=https://checkpoints.testnet.lukso.network
--nimbus2-trusted-block-root=$<BLOCK_ROOT> \
--nimbus2-weak-subjectivity-checkpoint=$<BLOCK_ROOT>:$<EPOCH>
Replace the following parameters of the commands:
<BLOCK_ROOT>
and<EPOCH>
with the current hash and number while keeping the$
sign.<transaction-fee-recipient-address>
with your actual withdrawal address.