12.1 Adding Withdrawals
In case you did not attach a withdrawal address while generating your validator keys, the earnings of your validator will not be paid out to any address and you won't be able to access your staked funds while exiting your validators from the network.
The following guide will teach you how to update your plain BLS Validator Key to reference an ETH1 Address, so your validator keys are able to withdraw staked funds and earnings. If an ETH1 Address is referenced to the BLS Key, the validator's stake can be exited to any wallet. Once enabled, all validator earnings above the 32 LYX or LYXt threshold will be periodically withdrawn to your ETH1 Address every few days.
Name | Description | |
---|---|---|
BLS Keys are the backbone of the digital signature type to secure the EVM blockchain. Every validator uses them to sign blocks and stake on the network. | ||
ETH1 Addresses are the traditional Ethereum addresses from Externally Owned Accounts, Wallets, or Smart Contracts which can receive funds on the network. |
- The update is only necessary for CLI Key Generation users that did not attach the eth1_withdrawal_address flag.
- The Wagyu Key Generation automatically asks for the mandatory withdrawal address during the setup.
Further details about withdrawals can be found on the Tokenomics and Validator Credentials pages.
As LUKSO is an EVM-based blockchain, the withdrawal update is similar to Ethereum. For questions, please refer to:
1. Check Withdrawal Status
If you've never updated your validator withdrawals after the initial deposit, you can check the deposit_data.json file of the validator locally. To check if your withdrawals are executed on the network, you can check them using the consensus explorer.
- Local Deposit File Check
- Consensus Explorer Check
1.1 Deposit Lookup: Open the deposit json file and copy the pubkey element of the validator key.
1.2 Withdrawal Index: Search for the withdrawal_credentials properties for every key
- If the hexadecimal number starts with 01, withdrawals are already enabled
- If the hexadecimal number starts with 00, withdrawals can be set using this guide
1.1 Deposit Lookup: Open the deposit json file and copy the pubkey element of the validator key.
1.2 Consensus Index: Search for your validator by searching for the public key in the consensus explorer.
1.3 Withdrawal Entries: View the validator’s details and open the withdrawals section
- If you see withdrawals, the withdrawal credentials are working correctly
- If the withdrawal section is greyed out, you can enable them using this guide
2. Prepare Validator Indices
To update your withdrawals, you have to specify the on-chain indices for each of the deposited validator keys. You can get them directly from the node machine or manually check your public keys on the consensus explorer.
- Get Index Numbers from Explorer
- Get Index Numbers from Node
2.1 Open the Deposit File: Within the validator's deposit json file, copy the pubkey element of a validator key.
2.2 Validator Lookup: Search for your validator by entering its public key into the search bar of the consensus explorer.
2.3 Copy the Index: Search for the validator index number within the top heading, like 8910 or 236189.
The steps 2.1 to 2.3 need to be repeated for every validator key that is used for staking.
2.1 Node Login: Log into your node’s terminal using SSH.
2.2 Enter Log Folder: Move into the logging folder of the node’s working directory.
cd <lukso-working-directory>/<network-type>-logs/
2.3 Search Logs: Search and print out all validator indices of the active validator.
cat <latest-validator-logs.log> | grep -o 'index=[0-9]* ' | awk -F'=' '{printf "%s,", $2}' | sed 's/,$//' | tr -d ' '
The following properties need to be exchanged:
<lukso-working-directory>
with the actual folder name<network-type>
withmainnet
ortestnet
<latest-validator-logs.log>
with the latest validator log file
Copy all the validator indices so they can be used to generate the withdrawal credential later on.
3. KeyGen CLI Download
The LUKSO KeyGen CLI should only be used on a secure offline device.
- Download the latest version of the LUKSO KeyGen CLI
- Transfer the archive to a secure device.
- Extract the archive to receive the executable binary file
- Open the terminal and move into the generated folder
4. Execute the BLS Change
Start the BLS to Execution process from the LUKSO KeyGen CLI.
./lukso-key-gen generate-bls-to-execution-change
You will need the following information:
- The Validator Seed Phrase from the initial key generation process
- The Validator Indices from the keys within the blockchain network
- The old Withdrawal Credentials for each deposit key in the deposit file
- The new ETH1 Withdrawal Address to receive funds
If you want different withdrawal credentials for different keys, the BLS to Execution Change be repeated multiple times.
- Select your language
- Select the network which your validators are running on
- Enter your Validator Seed Phrase that you’ve used to generate your initial BSL keys
- Enter the index position of the keys you want to create withdrawal credentials for
- Enter all your validator indices to enable withdrawals for, separated with whitespaces or commas
- Enter a list of the old BLS withdrawal credentials of your validator keys, separated with whitespaces or commas
- Enter the ETH1 address that all earnings will be withdrawn to
- The LUKSO KeyGen CLI will generate a bls_to_execution_change.json file.
During Step 4 you must define an index position.
- To generate the withdrawal update from the
1st
key, set the index position to0
- To generate the withdrawal update for the
11th
key onwards, set the index position to10
During Step 6 and Step 7 you will have to input hexadecimal values.
- Ensure to add
0x
in front of the copied withdrawal credential - Verify that your EOA withdrawal address has the
0x
prefix
The LUKSO KeyGen CLI might show errors about inputs no being hexadecimal or invalid checksum values. If the JSON File was generated, such warnings can be ignored. However, please verify you inputs by regenerating the file and comparing the output.
5. Credential Broadcast
The withdrawal credential can be shared directly from your node or the public consensus explorer.
- Broadcast Message from Node
- Broadcast Message from Explorer
5.1 Copy File Contents: Print and copy the contents of the bls_to_execution_change.json file.
cat bls_to_execution_change.json
5.2 Generate Terminal Command: Paste the contents into the local broadcast command.
POST -H "Content-type: application/json" -d '<file-content>'
5.3 Broadcast Credential: Log into your node’s terminal and execute the command to publish the withdrawal credential.
Each consensus client with validator support uses a different internal consensus port, opened by the LUKSO CLI.
- Prysm
- Teku
- Lighthouse
curl -X POST -H "Content-type: application/json" -d '<file-content>'
http://localhost:3500/eth/v1/beacon/pool/bls_to_execution_changes
curl -X POST -H "Content-type: application/json" -d '<file-content>'
http://localhost:5051/eth/v1/beacon/pool/bls_to_execution_changes
curl -X POST -H "Content-type: application/json" -d '<file-content>'
http://localhost:5052/eth/v1/beacon/pool/bls_to_execution_changes
Exchange <file-content>
with the actual content of the bls_to_execution_change.json file.
Show Example Broadcast Messages
- Prysm
- Teku
- Lighthouse
curl -X POST -H “Content-type: application/json” -d '[{"message": {"validator_index": "7", "from_bls_pubkey": "0x89a6dc1e83570b99cfb2557f01c852ab2bf00957367d0c35a5aa0e3101c9aad33645064e5da8a1efcd5cd501eb123ad0", "to_execution_address": "0x3daee8cd2e3c18dafe13332de33972ac5cf558f3"}, "signature": "0x80e4c40a543ffb99b6fc4b66e0d37726c1739830d27c229091bf8e792ffb98cac0971274bdc815dcba1042e33a4087d809113a0293614f8533f911cb6726c2efb03cf46470bff3ecf00ed962964262470f502208f6cd50e93f56e1b71ee61fa7", "metadata": {"network_name": "lukso", "genesis_validators_root": "0xd7cc24d150c617450dfa8176ef45a01dadb885a75a1a4c32d4a6828f8f088760", "deposit_cli_version": "2.5.6"}}]' http://localhost:3500/eth/v1/beacon/pool/bls_to_execution_changes
curl -X POST -H “Content-type: application/json” -d '[{"message": {"validator_index": "7", "from_bls_pubkey": "0x89a6dc1e83570b99cfb2557f01c852ab2bf00957367d0c35a5aa0e3101c9aad33645064e5da8a1efcd5cd501eb123ad0", "to_execution_address": "0x3daee8cd2e3c18dafe13332de33972ac5cf558f3"}, "signature": "0x80e4c40a543ffb99b6fc4b66e0d37726c1739830d27c229091bf8e792ffb98cac0971274bdc815dcba1042e33a4087d809113a0293614f8533f911cb6726c2efb03cf46470bff3ecf00ed962964262470f502208f6cd50e93f56e1b71ee61fa7", "metadata": {"network_name": "lukso", "genesis_validators_root": "0xd7cc24d150c617450dfa8176ef45a01dadb885a75a1a4c32d4a6828f8f088760", "deposit_cli_version": "2.5.6"}}]' http://localhost:5051/eth/v1/beacon/pool/bls_to_execution_changes
curl -X POST -H “Content-type: application/json” -d '[{"message": {"validator_index": "7", "from_bls_pubkey": "0x89a6dc1e83570b99cfb2557f01c852ab2bf00957367d0c35a5aa0e3101c9aad33645064e5da8a1efcd5cd501eb123ad0", "to_execution_address": "0x3daee8cd2e3c18dafe13332de33972ac5cf558f3"}, "signature": "0x80e4c40a543ffb99b6fc4b66e0d37726c1739830d27c229091bf8e792ffb98cac0971274bdc815dcba1042e33a4087d809113a0293614f8533f911cb6726c2efb03cf46470bff3ecf00ed962964262470f502208f6cd50e93f56e1b71ee61fa7", "metadata": {"network_name": "lukso", "genesis_validators_root": "0xd7cc24d150c617450dfa8176ef45a01dadb885a75a1a4c32d4a6828f8f088760", "deposit_cli_version": "2.5.6"}}]' http://localhost:5052/eth/v1/beacon/pool/bls_to_execution_changes
5.1. Open Consensus Explorer: Open the broadcast tool of the consensus explorer.
5.2 Upload Credential: Upload the bls_to_execution_change.json file to the server.
5.3 Broadcast Credential: Click Submit & Broadcast to publish the withdrawal credential.
6. Check Update Progress
A maximum of 16 validator updates can be included per block. It might take several hours until the withdrawal went live.
6.1 Open Consensus Explorer: Open the validator withdrawal page.
6.2 Search Address Changes: Scroll down to the list of recent Address Changes that happend on the network.
6.3 Verify Index Numbers: Your Validator indices should show up as soon as the update went live.
If the withdrawal update hasn't shown up after several hours, consider resubmitting the file or using the terminal command.