Using BLS
1. Download version 3.0.X validator client
Check the current Node.js version to ensure that the node version is equal to or greater than v16.0.0.
If the Node.js version does not meet the requirement, it is recommended to use nvm (Node Version Manager) to switch to a different Node.js version.
Once you have verified that the current Node.js version meets the requirements, proceed to execute the following command to install the latest version of the client:
Eg:
After the installation is completed, execute the following command to check the version number and confirm if the installation was successful:
Eg:
2. Generate bls keystore
Use the following command and enter the password according to the prompt to complete the generation of bls keystore.
note:
This command will create a new bls directory under the specified path, and generate a keystore file in the bls directory.
The specified path is recommended to be the original validator datadir (or migrate the generated bls directory to the original validator datadir), otherwise it will affect the unlocking of the bls private key after rei-dao hardfork.
Please keep the password safe, otherwise bls keystore will not be able to unlock the bls private key.
Eg:
From the above information, we can know that the path of the bls keystore file generated in this example is:
3. Obtain bls publicKey
First, let's enter the directory where the bls keystore file is located
Check the file list to get the name of the bls keystore file we generated
Eg:
Check out the bls keystore file
The displayed data is as follows, where the publicKey is the bls public key we need
4. Register the bls public key to the chain and check whether the registration is successful
Regarding the bls registration contract, its abi is as follows:
Functions
setBLSPublicKey : register bls public key
Declaration
Args
Arg | Type | Description |
---|---|---|
key | bytes | bls public key |
getBLSPublicKey : Query bls public key
Declaration
Args
Arg | Type | Description |
---|---|---|
address | address | validator address |
isRegistered : Query whether the address register bls public key
Declaration
Arg | Type | Description |
---|---|---|
address | address | validator address |
isBLSPublicKeyExist : Query whether bls public key is registered
Declaration
Arg | Type | Description |
---|---|---|
key | bytes | bls public key |
For developers, you can call the setBLSPublicKey method of the validatorBLS contract to register the bls public key to the chain
note:
Before rei-dao fork, the contract address is
0x5b84072EE3e72a58A906FA15182beEdaB5298076
, after rei-dao fork, the contract address is0x0000000000000000000000000000000001009
After the registration is complete, you can call the isRegistered method to check whether the registration is successful or call the getBLSPublicKey method to check whether the bls public key is consistent with the registered one
For general users, you can register bls public key to the chain through REI DAO The steps are as follows:
Step1: Navigate to https://dao.rei.network/#/myAccount/portfolio
Step2: Click on Register BLS public key
button, enter the BLS public key
to Register
Please note that it may take 1 to 2 minutes for the registration record to be updated here after registering with the BLS public key.
Last updated