Run multiple XSAT Validators
Last updated
Last updated
If your company plans to operate multiple XSAT Validator nodes, follow this structured approach to streamline the process:
Operations Team: Handles the initialization of XSAT Validator accounts and manages node operations.
Finance Team: Manages XSAT (for staking) and BTC (for gas fees) and oversees the collection of XSAT rewards.
You aim to run 10 nodes named sat1
, sat2
, sat3
, ..., sata
on a single server.
For running 10 XSAT Validator nodes, the recommended server configuration is:
CPU: 2 cores
RAM: 8 GB
Disk: 40 GB
Ensure that all necessary is installed on the server.
The finance team should prepare the following accounts:
Stake Account:
Should hold at least 21,000 XSAT (2,100 XSAT per validator) for staking.
Should hold sufficient BTC to cover gas fees (approximately 0.0005 BTC per validator per month according to current gas fee level).
The private key for this EVM account is retained exclusively by the finance team.
Temporary Account:
Used specifically to pay network resource fees for creating XSAT Validator accounts.
Each XSAT Validator account requires 0.000102 BTC (0.0001 BTC for creating the exSat Validator account and 0.000002 BTC for gas fee) for creation. For 10 validators, prepare at least 0.00102 BTC.
The private key for this account should be shared with the operations team to facilitate account creation.
3. BTC Node Setup
Clone the Repository and Configure the .env
File
Configure the .env
File
Below is an example .env
file. Update the values as needed. By default, it is configured for the mainnet, but you can modify it for the Hayek testnet if required.
Required Parameters:
KEYSTORE_PATH
: The directory path to store keystore files. Use a relative path, such as ./keystores
, as an example.
The keystore file securely stores the private key of the XSAT Validator account. It is encrypted and requires the "KEYSTORE_PASSWORD" for decryption.
KEYSTORE_PASSWORD
: The password for the keystore files. All keystore files share the same password.
BTC_RPC_URL
: The URL of your BTC RPC node. If authentication is required, also provide:
BTC_RPC_USERNAME
BTC_RPC_PASSWORD
ACCOUNT_PREFIX
: The prefix for your XSAT Validator account names. The complete account names will include this prefix followed by sequential numbers or letters. e.g., If ACCOUNT_PREFIX
is "ex" , the XSAT Validator names will be "ex1.sat", "ex2.sat", ... "exa.sat" in our example.
Notes on ACCOUNT_PREFIX
:
The total length must not exceed 6 characters.
It can only include lowercase letters (a-z
) and numbers (1-5
).
TOTAL
: The total number of XSAT Validators to create. For example, set this to 10
to run 10 validators.
This separation ensures both security and convenience.
Organizations operating multiple XSAT Validators need a clear division of responsibilities between the operations and financial teams.
The operations team handles the deployment and management of XSAT Validators on servers. To streamline this process, the fees for registering XSAT Validator accounts are kept in the Temporary Account. The private key for this account is provided to the script used for batch registration, simplifying operations. Since the Temporary Account contains only enough funds for account registration, it's secure to supply the private key here.
In contrast, the Stake Account holds substantial funds, including XSAT for staking and BTC for gas fees, and is managed by the financial team. For enhanced security, only the Stake Account address is required. The financial team can connect the Stake Account to the dApp interface to perform staking and top up gas fees. Thus, providing just the Stake Account address in the script is sufficient and secure.
Generate XSAT Validator Accounts
Create the KEYSTORE_PATH
folder, take "keystores" in current folder as example.
To generate XSAT Validator accounts, execute the following commands:
This command performs the following actions:
Generate Keystore Files:
Creates a private key for each XSAT Validator.
Saves the private keys as encrypted keystore files in the KEYSTORE_PATH
folder.
Secures each keystore file with the KEYSTORE_PASSWORD
.
Account Creation:
Uses the Temporary Account to cover the on-chain resources required for account creation.
Uses the Temporary Account to Create the XSAT Validator accounts on-chain, with names prefixed by ACCOUNT_PREFIX
.
After executing these commands, you will have 10 XSAT Validator accounts on the exSat network. The private keys of these accounts will be securely stored as keystore files in the KEYSTORE_PATH
directory, and the keystore files will be encrypted with the KEYSTORE_PASSWORD
.
This task should be handled by the financial team.
Use the "Switch" button to toggle between different XSAT Validator accounts as needed.
Modify ognize_cli.sh
File
Modify the red parts in the ognize_cli.sh
file
BASE_DIR
:
Replace the portion after :-
with the path specified in the .env
file for KEYSTORE_PATH.
NETWORK
:
Ensure the value matches the NETWORK
setting in the .env
file.
EXSAT_RPC_URLS
:
Update this value to match the EXSAT_RPC_URLS
in the .env
file.
KEYSTORE_PASSWORD
:
Set this value to match the KEYSTORE_PASSWORD
in the .env
file.
BTC_RPC_URL
:
Provide the URL of your BTC RPC node.
If authentication is required, replace "user"
and "password"
in BTC_RPC_USERNAME
and BTC_RPC_PASSWORD
with your BTC RPC credentials.
Execute the Following Commands:
This command will do below actions:
Organize Keystore Files:
Creates a folder for each XSAT Validator account under the KEYSTORE_PATH
.
Moves the keystore file for each Validator into its corresponding folder.
Generate docker-compose.yml
:
Creates a docker-compose.yml
file in the KEYSTORE_PATH
directory for batch deployment of Docker containers.
After running these commands, the contents of the KEYSTORE_PATH
directory will appear as follows:
Start Docker Containers:
Enter the KEYSTORE_PATH
folder and Run the command to start the containers. Ensure both Docker and Docker Compose are installed beforehand.
After executing the command, your 10 XSAT Validators will be running in Docker containers. You can monitor the logs for each Validator to verify their operations.
A BTC node is required to provide BTC RPC services. Both full nodes and light nodes are supported. Follow to set up a BTC node.
PRIVATE_KEY
: The private key of the "", which holds BTC for creating XSAT Validator accounts. To create 10 XSAT Validator accounts, ensure this account has a minimum balance of a little more than 0.001 BTC (10 ร 0.0001 BTC) and a little more BTC for gas fee).
Provide the private key starting with "0x" here.
STAKER_REWARD_ADDRESS
: The address of the "", which holds XSAT for staking and BTC for Validator gas fees.
To operate 10 XSAT Validators, ensure this account holds at least 21,000 XSAT (10 ร 2,100 XSAT) and sufficient BTC to refilling gas fees for maintaining these validators.
At the current gas fee level, each XSAT Validator requires approximately 0.0005 BTC per month.
Just provide the EVM address of the Stake Account here.
Open the and connect to your .
(2100 $XSAT each) and . At the current gas price level, each XSAT Validator requires approximately 0.0005 BTC per month for gas fees.
The finance team can also directly on the same page.
Generates an .env
configuration file for each Validator to be used by Docker, you can if needed.
If your Validator Client is operating correctly, the following logs should appear in Docker. Here's :