Update Validator Withdrawals
The following guide will teach you how to update your plain BLS Validator Key to reference an ETH1 Address to allow your validator keys to withdraw staked LYX/LYXt and earnings. If an ETH1 Address is referenced to the BLS Key, the validator's stake can be exited to any wallet. The earnings of your validators will be automatically withdrawn regularly.
The LUKSO KeyGen GUI automatically adds a withdrawal address during setup.
- BLS Keys are the backbone of the digital signature type to secure the PoS Consensus Layer of EVM blockchains. Every validator uses them to sign blocks and stake LYX/LYXt on the LUKSO networks.
- ETH1 Addresses are the traditional Ethereum addresses from Externally Owned Accounts or Smart Contracts on the Execution Layer which can receive tokens or coins on the network.
How to check withdrawals?
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.
If you've updated your ETH1 recently, its activation can take up to 48 hours.
- Open the
deposit_data.json
file of the validator - 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 are disabled
- If the hexadecimal number starts with
If your withdrawals are disabled, follow this guide to set a withdrawal address.
- Open the deposit file of your validator and copy the
pubkey
element of the specific validator key - Search for your validator by entering its public key into the search bar of the related consensus explorer:
- View the validator’s details and open the Withdrawals section
- If you see withdrawals, the withdrawal credentials are working correctly
- If there are no withdrawals, they are still disabled
If you don't see any withdrawals, follow this guide to set a withdrawal address.
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.
- Open the deposit file of your validator and copy the
pubkey
element of a validator key. - Search for your validator by entering its public key into the search bar of the related consensus explorer:
- Copy the validator index property
The steps need to be repeated for every validator key.
The following properties need to be exchanged:
<node-working-directory>
with the actual folder name<network-type>
withmainnet
,devnet
, ortestnet
<latest-validator-logs.log>
with the latest validator log file
- Log into your node’s terminal
- Move into the logging folder of the node’s working directory.
cd <node-working-directory>/<network-type>-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 ' '
Start the LUKSO KeyGen CLI
The LUKSO KeyGen CLI should only be used on a secure offline device.
You will need to input your Validator Seed Phrase again.
- 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
Generate the Withdrawal Credential
If you want to have different withdrawal credentials, the following steps must be repeated multiple times.
You will need the following information:
- Validator Indices (Previous Step)
- Old Withdrawal Credentials for each Key (Deposit File)
- New ETH1 Withdrawal Address (Generated)
Start the BLS to Execution process from the LUKSO KeyGen CLI
./lukso-key-gen generate-bls-to-execution-change
During the setup, you will have to define an index position of the validator keys, indicating the starting point of your credential generation.
- To generate the withdrawal credentials from the first key, set the index position to
0
. - To generate the withdrawal credentials for the 11th key onwards, set the index position to
10
.
- 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 then generate a bls_to_execution_change.json
file.
You can proceed to the next step once the withdrawal credential is generated successfully.
Broadcast the Withdrawal Credential
The withdrawal credential can only be set once. Ensure to have ownership over the withdrawal address.
The Withdrawal Credential can be shared directly from your node or the public consensus explorer of the related network.
- Open the broadcast window of the consensus explorer of the related network:
- Upload the
bls_to_execution_change.json
file - Broadcast the withdrawal credential
Within the following section, <PATH_TO_JSON_FILE>
has to be exchanged with the path of the bls_to_execution_change.json
file.
- Log into your node’s terminal
- Copy the
bls_to_execution_change.json
file to your node - Send the JSON file to the local consensus instance using the following code:
curl -X POST -H "Content-type: application/json" -d @<PATH_TO_JSON_FILE> \
http://localhost:3500/eth/v1/beacon/pool/bls_to_execution_changes