Mass Delegate Stake
Summary
This document describes instructions on how to generate/integrate and activate validator keys.
- Provider generate keys:
- The provider generates keys and installs them on the node.
- The provider sends key information to the user.
- The user activates validators.
This is a mass activation instruction where multiple validators need to be activated simultaneously. If you need to activate a single validator, it is easier to do so through MetaMask using our modified web3js utility.
At the end of the document, there is information on how to prepare the delegate configuration file.
Download wf-cli
A utility that allows you to:
- generate validator keys
- activate validators
- withdraw rewards and stake
- deactivate validators
- check how validators are working
Download:
Prepare data
-
Generate Mnemonic: Use the following command to generate a mnemonic and save it in the
.data
directory of your project:
wf-cli mnemonic
--path
: This specifies the directory where the generated mnemonic will be saved. The mnemonic is a 24-word phrase that will be used to generate and secure the validator keys.
Example:
> ./wf-cli mnemonic --path .data Path: .data Mnemonic saved to .data/mnemonic.txt
-
Create a
password.txt
file in the.data
directory and put the password you generated in it - Your
.data
directory should look like this:.data ├── mnemonic.txt └── password.txt
Generate Keys and Deposit Data
- Run the following command to generate the keys and deposit data. This command will use the mnemonic and password for security, set the withdrawal address (using the address from the delegating_stake configuration if provided in future), specify the number of validators, and determine the output path and starting index:
wf-cli gen-data
--memo
This specifies the file path to the mnemonic, which is a 24-word phrase used to generate the validator keys securely.--pass
This specifies the file path to the password, which is used to encrypt and secure the validator keys.--withdrawal-address
: This sets the Waterfall address where the staking rewards will be withdrawn to. If the delegating_stake configuration is provided, the address from this configuration will be used.--output-path
: This defines the directory where the generated keys and deposit data will be saved.--index
: (Default: 0
) This sets the starting index for the validators, allowing the user to specify where the count begins.--count
: This indicates the number of validators to be generated.
Example:> ./wf-cli gen-data --memo .data/mnemonic.txt --pass .data/password.txt --withdrawal-address 0xee22555a22A7fd2eBA102f6200695F75ab28C4b6 --count 10 --output-path .data/keys Output path: .data/keys Provider: https://rpc.waterfall.network Mnemonic: .data/mnemonic.txt WithdrawalAddress: 0x3d1F455aD3F6927FbF09059F702f4EdDEB195C02 Count: 10 Key generation 1 out of 10 Key generation 2 out of 10 Key generation 3 out of 10 Key generation 4 out of 10 Key generation 5 out of 10 Key generation 6 out of 10 Key generation 7 out of 10 Key generation 8 out of 10 Key generation 9 out of 10 Key generation 10 out of 10
- Your
.data/keys
directory should look like this:.data/keys ├── coordinator │ ├── validator_keys │ └── password.txt ├── gwat │ ├── keystore │ ├── address.txt │ └── password.txt
- After generating validator keys, you need to copy them to your node.
- The structure of the files and dirs will look as follows:
.wf ├── coordinator | ├── beaconchaindata │ ├── validator_keys │ └── password.txt ├── gwat │ ├── gwat │ ├── keystore │ ├── address.txt │ └── password.txt
- After the node is restarted, the keys are integrated into the node.
Example for testnet9:Example for mainnet:> docker stop wf > docker run --platform linux/amd64 --name wf -d --rm -p 4000:4000 -p 13000:13000 -p 12000:12000/udp -p 30303:30303 -p 9545:9545 -p 9546:9546 -v $PWD/.wf/logs:/opt/wf/data/logs -v $PWD/.wf/gwat:/opt/wf/data/gwat -v $PWD/.wf/coordinator:/opt/wf/data/coordinator registry.waterfall.network/waterfall/protocol/docker:testnet9
> docker stop wf > docker run --platform linux/amd64 --name wf -d --rm -p 4000:4000 -p 13000:13000 -p 12000:12000/udp -p 30303:30303 -p 9545:9545 -p 9546:9546 -v $PWD/.wf/logs:/opt/wf/data/logs -v $PWD/.wf/gwat:/opt/wf/data/gwat -v $PWD/.wf/coordinator:/opt/wf/data/coordinator registry.waterfall.network/waterfall/protocol/docker:mainnet
- Send
.data/keys/coordinator/validator_keys/deposit_data.json
anddelegate_rules.json
to User
Activate Validators
After the keys have been added to the node and the provider has sent information about the keys and the delegate file, the user can activate the validators.
- Create the
.data
Directory:
First, create a directory named.data
in the root of your project. This directory will contain the necessary configuration files.mkdir .data
- Copy the private key of the address that will send the stake from MetaMask and place it, for example, in the
.data
directory with the namepk.txt
. Make sure you do not share the file with anyone and that you have sufficient funds to activate all generated validators. - Check
delegate_rules.json
which provides validators provider, because this file contains rules on who will get stake and rewards. -
Run the following command to activate the validator. This will use the specified network, folder, and private key:
wf-cli activate
--network
: (Default: mainnet
) Supportmainnet
/testnet
Waterfall MainNet/Testnet9 Network--folder
: This defines the directory where the validator keys and related files are stored.--pkey
: This specifies the file path to the private key, which is used to sign deposit transaction.--delegate
: JSON file with delegate rules, the file format can be reviewed below--from
: (Default: 0
) This specifies the starting validator index to activate.--to
: (Default: max
) This specifies the ending validator index to activate.--index
: This specifies the specific validator index to activate.
Danger
Be sure to check the addresses that receive rewards and stake, as well as who can initiate unstake. If a mistake is made, you will lose control of the validator.
Example
delegate_rules.json
{ "rules": { "profit_share": { "0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 90, "0xee22555a22A7fd2eBA102f6200695F75ab28C4b6": 10 }, "stake_share": { "0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 100 }, "exit": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"], "withdrawal": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"] } }
Example for testnet9:
> ./wf-cli activate --network testnet9 --folder .data/keys --pkey .data/pk.txt --delegate .data/delegate_rules.json Deposit address: 0xecd099ff689f6b7ee8f7dfd8293d3fe7799a1a94 Starting activation process Total validators to activate: 10 Activate transaction hash: 0xc2d5749edb012ba0be0905fc903afb5a7ee22b31a98c5a8ac9170ac90f67965e, index: 8, validator: 2fdabd148a771b5473dd77d0d193fc28b05fe400 Activate transaction hash: 0x5adcaa8e613a1ca6080b1c99e6c8d57f7bbcb93dba23cf50105eec342a215e14, index: 0, validator: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3 Activate transaction hash: 0x57565e89a838d994340d147c95ef3d29e49de3b2e1ea17af5995f4416dcc83b4, index: 3, validator: 9bc81a4a770ba130d1403e3714d47539155521a0 Activate transaction hash: 0x6b388ab9d877a9755333b48fe97c6dd9934963e07c9d365d67c88915b497e6ff, index: 2, validator: 644ba5185709589ccfc6f01c8abdab4ed0c1792d Activate transaction hash: 0xf918d6943e519608545c47ca815e47b59e0082a198f8d6ca2ac340c39bd8ee6b, index: 1, validator: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7 Activate transaction hash: 0x48c3daeed33797984adec7e7d7ec754d037bc741d3b4c3fb3cfb44aaf83a6f75, index: 5, validator: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc Activate transaction hash: 0x7b85bb52301b3679c0b7907da9cfeef3ed72756c39514056a3f69588458a0553, index: 4, validator: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f Activate transaction hash: 0x09afaa015b9110647c1a9feac62050a39382a3874d24218b770c9d3cf268c37e, index: 7, validator: 25fa391be8ddce312d6fc08672c585505852adc1 Activate transaction hash: 0x75fb297e1883abc95edb7ed755979e1ce8ef85778e89c9d4f8574f937ae09db8, index: 9, validator: a230de721fa74c90a0258db6d9500e78e85cf781 Activate transaction hash: 0x117a82f85cee188c925dfd0524df104601d939b7ced5ab66be91f1d50c8b8999, index: 6, validator: 9ba9863f46699555cb30897a3168c57264fb7d06 Activation process completed Checking for pending transactions... Activation transaction 0x5adcaa8e613a1ca6080b1c99e6c8d57f7bbcb93dba23cf50105eec342a215e14, index: 0, address: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3 is successful Activation transaction 0x6b388ab9d877a9755333b48fe97c6dd9934963e07c9d365d67c88915b497e6ff, index: 2, address: 644ba5185709589ccfc6f01c8abdab4ed0c1792d is successful Activation transaction 0xf918d6943e519608545c47ca815e47b59e0082a198f8d6ca2ac340c39bd8ee6b, index: 1, address: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7 is successful Activation transaction 0x57565e89a838d994340d147c95ef3d29e49de3b2e1ea17af5995f4416dcc83b4, index: 3, address: 9bc81a4a770ba130d1403e3714d47539155521a0 is successful Activation transaction 0x7b85bb52301b3679c0b7907da9cfeef3ed72756c39514056a3f69588458a0553, index: 4, address: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f is successful Activation transaction 0x48c3daeed33797984adec7e7d7ec754d037bc741d3b4c3fb3cfb44aaf83a6f75, index: 5, address: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc is successful Activation transaction 0x117a82f85cee188c925dfd0524df104601d939b7ced5ab66be91f1d50c8b8999, index: 6, address: 9ba9863f46699555cb30897a3168c57264fb7d06 is successful Activation transaction 0x09afaa015b9110647c1a9feac62050a39382a3874d24218b770c9d3cf268c37e, index: 7, address: 25fa391be8ddce312d6fc08672c585505852adc1 is successful Activation transaction 0xc2d5749edb012ba0be0905fc903afb5a7ee22b31a98c5a8ac9170ac90f67965e, index: 8, address: 2fdabd148a771b5473dd77d0d193fc28b05fe400 is successful Activation transaction 0x75fb297e1883abc95edb7ed755979e1ce8ef85778e89c9d4f8574f937ae09db8, index: 9, address: a230de721fa74c90a0258db6d9500e78e85cf781 is successful Checking for pending transactions... All transactions processed. ``` Example for mainnet: ```bash > ./wf-cli activate --network mainnet --folder .data/keys --pkey .data/pk.txt --delegate .data/delegate_rules.json
Withdraw
After activation, User or Validators Provider can send withdraw transactions to collect rewards.
Run the following command to withdraw the validator. This will use the specified network, folder, and private key:
wf-cli withdraw
- --network
: (Default: mainnet
) Support mainnet
/testnet
Waterfall MainNet/Testnet9 Network
- --folder
: This defines the directory where the validator keys and related files are stored.
- --pkey
: This specifies the file path to the private key, which is used to authenticate and exit the validator.
- --amount
: Specifies the amount to withdraw. If not provided, the maximum possible sum will be withdrawn.
- --from
: (Default: 0
) This specifies the validator index to withdraw.
- --to
: (Default: max
) This specifies the ending validator index to withdraw to.
- --index
: This specifies the specific validator index to withdraw.
Example for testnet9:
> ./wf-cli withdraw --network testnet9 --folder .data/keys --pkey .data/pk.txt --amount 2
Path: .data
Provider: https://rpc.testnet9.waterfall.network
Deposit address: 0xecd099ff689f6b7ee8f7dfd8293d3fe7799a1a94
Starting withdraw process
Total validators to withdraw: 10
Withdraw transaction hash: 0x0fa9b461e957be3ea2e178e26c9a435465230095695795e1ce98b7744b829772, index: 302, address: 644ba5185709589ccfc6f01c8abdab4ed0c1792d
Withdraw transaction hash: 0xbc5c958b996fb7b9e2489cb6e6d9a95f2267ea41cc7aa81e004f3360fe494429, index: 303, address: 9bc81a4a770ba130d1403e3714d47539155521a0
Withdraw transaction hash: 0x6e0174fd281d3517680da8032831605ac9b881e4c9ca20ea4d7524b0549a7406, index: 308, address: 2fdabd148a771b5473dd77d0d193fc28b05fe400
Withdraw transaction hash: 0x8a76b59efe584ab02d399d0533704b372e988a15c0deca4496da896ea240c972, index: 307, address: 25fa391be8ddce312d6fc08672c585505852adc1
Withdraw transaction hash: 0x7fe5c4e350e212fc5bc4b970cb937862f08dbc266d93a89171cb30b9b5d7f87c, index: 305, address: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc
Withdraw transaction hash: 0x3a7c247fc2e959e47ca3da0140fdce9466bb35e755bd3a0ff33548c3d826bc9d, index: 301, address: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7
Withdraw transaction hash: 0x8bf0bcaa4d84949e80df477ee1a315e524ebd63de6e45985bb6fa3f001b7fcdd, index: 300, address: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3
Withdraw transaction hash: 0x10d4ba5e41d3d81687989aae7c88722cfeab58b61aff17be6eaa7b65bcc990fc, index: 304, address: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f
Withdraw transaction hash: 0xfc20bdf9d66129853c2ff500598bccb255dfde29046a97ebc08d9be3a62e2ab2, index: 306, address: 9ba9863f46699555cb30897a3168c57264fb7d06
Withdraw transaction hash: 0x542e9b8f34dc2a04333f58ca4880d6e52081c4b6a5840a922e303673b5989daa, index: 309, address: a230de721fa74c90a0258db6d9500e78e85cf781
Checking for pending transactions...
Withdraw transaction 0x8bf0bcaa4d84949e80df477ee1a315e524ebd63de6e45985bb6fa3f001b7fcdd, index: 300, address: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3 is successful
Withdraw transaction 0x3a7c247fc2e959e47ca3da0140fdce9466bb35e755bd3a0ff33548c3d826bc9d, index: 301, address: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7 is successful
Withdraw transaction 0x0fa9b461e957be3ea2e178e26c9a435465230095695795e1ce98b7744b829772, index: 302, address: 644ba5185709589ccfc6f01c8abdab4ed0c1792d is successful
Withdraw transaction 0xbc5c958b996fb7b9e2489cb6e6d9a95f2267ea41cc7aa81e004f3360fe494429, index: 303, address: 9bc81a4a770ba130d1403e3714d47539155521a0 is successful
Withdraw transaction 0x10d4ba5e41d3d81687989aae7c88722cfeab58b61aff17be6eaa7b65bcc990fc, index: 304, address: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f is successful
Withdraw transaction 0x7fe5c4e350e212fc5bc4b970cb937862f08dbc266d93a89171cb30b9b5d7f87c, index: 305, address: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc is successful
Withdraw transaction 0xfc20bdf9d66129853c2ff500598bccb255dfde29046a97ebc08d9be3a62e2ab2, index: 306, address: 9ba9863f46699555cb30897a3168c57264fb7d06 is successful
Withdraw transaction 0x8a76b59efe584ab02d399d0533704b372e988a15c0deca4496da896ea240c972, index: 307, address: 25fa391be8ddce312d6fc08672c585505852adc1 is successful
Withdraw transaction 0x6e0174fd281d3517680da8032831605ac9b881e4c9ca20ea4d7524b0549a7406, index: 308, address: 2fdabd148a771b5473dd77d0d193fc28b05fe400 is successful
Withdraw transaction 0x542e9b8f34dc2a04333f58ca4880d6e52081c4b6a5840a922e303673b5989daa, index: 309, address: a230de721fa74c90a0258db6d9500e78e85cf781 is successful
Checking for pending transactions...
All transactions processed.
Example for mainnet:
> ./wf-cli withdraw --network mainnet --folder .data/keys --pkey .data/pk.txt --amount 20
Deactivate Validators
After activation, User or Validators Provider can send exit transactions to deactivate validators.
Run the following command to exit the validator. This will use the specified network, folder, and private key:
wf-cli exit
- --network
: (Default: mainnet
) Support mainnet
/testnet
Waterfall MainNet/Testnet9 Network
- --folder
: This defines the directory where the validator keys and related files are stored.
- --pkey
: This specifies the file path to the private key, which is used to authenticate and exit the validator.
- --from
: (Default: 0
) This specifies the starting validator index to exit.
- --to
: (Default: max
) This specifies the ending validator index to exit.
- --index
: This specifies the specific validator index to exit.
Example for testnet9:
> ./wf-cli exit --network testnet9 --folder .data/keys --pkey .data/pk.txt
Deposit address: 0xecd099ff689f6b7ee8f7dfd8293d3fe7799a1a94
Starting exit process
Total validators to exit: 10
Exit transaction hash: 0x2e0d3cc45d418b2c4770d989faa44aad0974afa4a373c4f71099d74811603bec, index: 309, validator: a230de721fa74c90a0258db6d9500e78e85cf781
Exit transaction hash: 0xa5e2c52dab84851c883b5c37087f6976166dbe76edd531e855881aca6ec8646c, index: 301, validator: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7
Exit transaction hash: 0xb9dc323a4e0deb3c50e7eb3fad2c5e14676ff40bacc046dc7a656defd63583cf, index: 307, validator: 25fa391be8ddce312d6fc08672c585505852adc1
Exit transaction hash: 0x163a4807318e7664e212b2950589e7c187dae6d844d01f3e2979e0e7774ef853, index: 300, validator: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3
Exit transaction hash: 0x090fe46c07bb11bb28aaa5f0fe3adb574dd49be546932582d2568e73a81e6e0a, index: 302, validator: 644ba5185709589ccfc6f01c8abdab4ed0c1792d
Exit transaction hash: 0x7214a46eb34c7726caec0189b120f053b16587054934a7263d061ca07dbc26aa, index: 305, validator: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc
Exit transaction hash: 0xc1ebe666298014b7239f85977d0162baaf4ee21967308c43558b275ee70ea922, index: 303, validator: 9bc81a4a770ba130d1403e3714d47539155521a0
Exit transaction hash: 0x964def2fc9004eb5bebc11e66d6e983d64e9bab4e66b7a5b6264154f8f786550, index: 306, validator: 9ba9863f46699555cb30897a3168c57264fb7d06
Exit transaction hash: 0xb94c604f3077d744abaf6a56523f87dd0ef00d55dcf5f6ff46f0266a7be647e7, index: 304, validator: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f
Exit transaction hash: 0xcce01b4f6e419b9796edd389d7ee9358daee6c0e9c0d9d9e61a6442752344194, index: 308, validator: 2fdabd148a771b5473dd77d0d193fc28b05fe400
Exit process completed
Checking for pending transactions...
Exit transaction 0x163a4807318e7664e212b2950589e7c187dae6d844d01f3e2979e0e7774ef853 for validator 300, address: 630ee30335fb8b8302a36f2c37cd6a40caccf2f3 succeded
Exit transaction 0xa5e2c52dab84851c883b5c37087f6976166dbe76edd531e855881aca6ec8646c for validator 301, address: 8ce4b8bcfa2dbd9ee5d7142cced3a8f73fe853c7 succeded
Exit transaction 0xc1ebe666298014b7239f85977d0162baaf4ee21967308c43558b275ee70ea922 for validator 303, address: 9bc81a4a770ba130d1403e3714d47539155521a0 succeded
Exit transaction 0x090fe46c07bb11bb28aaa5f0fe3adb574dd49be546932582d2568e73a81e6e0a for validator 302, address: 644ba5185709589ccfc6f01c8abdab4ed0c1792d succeded
Exit transaction 0xb94c604f3077d744abaf6a56523f87dd0ef00d55dcf5f6ff46f0266a7be647e7 for validator 304, address: b4b4a3bc36ef823aaff03952ed072f7bcd20fe8f succeded
Exit transaction 0x7214a46eb34c7726caec0189b120f053b16587054934a7263d061ca07dbc26aa for validator 305, address: 7fc6d5d84ca02cf83acfe6347ae269eb6242a0dc succeded
Exit transaction 0x964def2fc9004eb5bebc11e66d6e983d64e9bab4e66b7a5b6264154f8f786550 for validator 306, address: 9ba9863f46699555cb30897a3168c57264fb7d06 succeded
Exit transaction 0xb9dc323a4e0deb3c50e7eb3fad2c5e14676ff40bacc046dc7a656defd63583cf for validator 307, address: 25fa391be8ddce312d6fc08672c585505852adc1 succeded
Exit transaction 0xcce01b4f6e419b9796edd389d7ee9358daee6c0e9c0d9d9e61a6442752344194 for validator 308, address: 2fdabd148a771b5473dd77d0d193fc28b05fe400 succeded
Exit transaction 0x2e0d3cc45d418b2c4770d989faa44aad0974afa4a373c4f71099d74811603bec for validator 309, address: a230de721fa74c90a0258db6d9500e78e85cf781 succeded
Checking for pending transactions...
All transactions processed.
Example for mainnet:
> ./wf-cli exit --network mainnet --folder .data/keys --pkey .data/pk.txt
File description delegate_rules.json
Danger
Be sure to check the addresses that receive rewards and stake, as well as who can initiate unstake. If a mistake is made, you will lose control of the validator.
{
"rules": {
"profit_share": {
"0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 90,
"0xee22555a22A7fd2eBA102f6200695F75ab28C4b6": 10
},
"stake_share": {
"0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 100
},
"exit": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"],
"withdrawal": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"]
}
}
profit_share
"profit_share": {
"0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 90,
"0xee22555a22A7fd2eBA102f6200695F75ab28C4b6": 10
},
stake_share
"stake_share": {
"0x30c35895FE0f7768A261b5326e4332cBb4556Ba3": 100
},
exit
"exit": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"],
withdrawal
"withdrawal": ["0x30c35895FE0f7768A261b5326e4332cBb4556Ba3","0xee22555a22A7fd2eBA102f6200695F75ab28C4b6"]