The current Git repository only describes the operations on the client side. If you need complete instructions on how to register and run the Synchronizer and Validator on the exSat network, please refer to this link for more comprehensive information: https://docs.exsat.network/get-started.
Recommended Configuration:
- CPU: 2 Cores
- RAM: 4GB
- Disk: 50GB
Recommend to use Ubuntu system, or other Linux systems.
Ensure the following tools are installed on your system:
- Git
- Check:
git --version
- Install: Git Installation Guide
- Check:
- Node.js (version 20.0.0 or higher)
- Check:
node -v
- Install: Node.js Installation Guide
- Check:
- Yarn
- Check:
yarn -v
- Install: Yarn Installation Guide
- Check:
- PM2
- Check:
pm2 -v
- Install:
npm install -g pm2
- Check:
Some commands may need the root account permission to execute, please use sudo as needed.
Open a terminal window.
Execute the following command to clone the repository :
git clone https://github.com/exsat-network/exsat-client.git
cd exsat-client
yarn install
yarn build
Navigate to the project directory (e.g.exsat-client), copy the .env.example file to create a new .env file, edit the newly created .env file.
cp .env.example .env
vim .env
This is a simplified env configuration file for synchronizer with testnet. For other configuration items, please refer to the .env.example file for more details.
# Account Initializer API base URL
ACCOUNT_INITIALIZER_API_BASE_URL=https://registst3.exactsat.io
# ExSat RPC URLs configurations
EXSAT_RPC_URLS=["https://chain-tst3.exactsat.io"]
# Bitcoin RPC URL
BTC_RPC_URL=
# Bitcoin RPC username
BTC_RPC_USERNAME=
# Bitcoin RPC password
BTC_RPC_PASSWORD=
# File path to the synchronizer's keystore
SYNCHRONIZER_KEYSTORE_FILE=
# Password for the synchronizer's keystore
SYNCHRONIZER_KEYSTORE_PASSWORD=
Save and close the .env File
By following these steps, you will have successfully configured the environment variables needed for your project.
Verify that you have copied .env.example to .env and customized the parameters as described in the previous steps.
Open a terminal window.
Navigate to the project directory, execute different commands based on different roles:
- yarn start-commander
- yarn start-synchronizer
- yarn start-validator
Parameter | Description | Example |
---|---|---|
--pwd | Provides the password directly. | yarn start- --pwd mysecretpassword |
--pwdfile | Provides the file path containing the password. | yarn start- --pwdfile /path/to/password.txt |
yarn build
pm2 start ecosystem.config.js --only synchronizer
pm2 start ecosystem.config.js --only validator
Please follow the documents about synchronizer to act as synchronizer.
Please follow the documents about validator to act as validator.
docker pull exsatnetwork/exsat-client:latest
When running the client through Docker, it is recommanded to first run commander in the foreground interactively to complete account registration and configuration, and then run synchronizer or validator in the background for long-term operation.
When creating an account, make sure to save your seed phrase carefully. After the client generates the private key using the seed phrase, it will save the encrypted private key in a keystore file, and you will choose where to save the keystore file. Be sure to select a path that is mapped to the host machine's storage (e.g. if you're running the docker with the supplied "-v" parameters as below example codes, in the "Choose a directory to save the keystore" step, you could choose the option that save the keystore at /app/.exsat). This way, the keystore file will be saved on the host machine. Otherwise, if you remove the Docker container, the keystore file will be lost, and you will need to regenerate the keystore file by importing the seed phrase.
It is highly recommended that the .env file and keystore file be placed in the same directory.
docker run -it --name commander -v $HOME/.exsat:/app/.exsat -e CLIENT_TYPE=commander exsatnetwork/exsat-client:latest
docker run -d --name synchronizer -v $HOME/.exsat:/app/.exsat -e CLIENT_TYPE=synchronizer exsatnetwork/exsat-client:latest
docker logs -f --tail=100 synchronizer
docker run -d --name validator -v $HOME/.exsat:/app/.exsat -e CLIENT_TYPE=validator exsatnetwork/exsat-client:latest
docker logs -f --tail=100 validator