By setting up a Zenon Pillar, you play a pivotal role in enhancing the decentralization, security, and overall robustness of the Zenon ecosystem.
This setup guide is for operators looking to setup the Orchestrator binary on the same server as their Pillar. If you're looking to setup on a remote server (not on the Pillar), then please follow the following: Setup Guide (Remote).
Before proceeding, ensure you have the following:
Basic Knowledge: Familiarity with command-line interfaces and server management.
Access Credentials: SSH access to your chosen server with sudo privileges.
BNB and Ethereum Nodes: Access to a BNB and Ethereum node provider like Alchemy to obtain WebSocket (WSS) endpoints.
Producer Passphrase: The passphrase for your Producer Key File, retrievable via the znn-controller.
QSR Tokens: At least 120 QSR tokens fused to the Pillar Producer Address.
To facilitate communication and health checks, ensure the following ports are open on your server’s firewall:
1. Port 55055 (TCP): Open for gossip communication between nodes.
2. Port 55000 (TCP): Open for API health checks.
Steps to Open Ports:
Assuming you’re using ufw (Uncomplicated Firewall) on Ubuntu:
sudo ufw allow 55055/tcp
sudo ufw allow 55000/tcp
sudo ufw reloadNote: If you’re using a different firewall management tool, adjust the commands accordingly.
To interact with the Binance Smart Chain and Ethereum network, you need access to a Binance Smart Chain and Ethereum node. Alchemy provides reliable node services.
Steps to Obtain the WSS Endpoint
Sign Up/Login to Alchemy:
Visit Alchemy and create an account or log in.
Create a New App:
Navigate to the dashboard and create a new app.
Select the desired network (e.g., Mainnet, Ropsten).
Retrieve the WSS Endpoint:
Once the app is created, go to the app’s dashboard.
Locate the WebSocket endpoint URL.
Example Endpoint:
wss://eth-mainnet.alchemyapi.io/v2/your-api-keyObtain SSH Credentials: After setting up your server with your chosen provider, retrieve the SSH IP address, username, and password/key.
Connect via SSH:
ssh username@your_server_ipReplace username with your server's username (commonly root) and your_server_ip with your server's IP address.
Switch to Root User:
sudo -iThis command grants you root privileges for the installation process.
Ensure your server's package lists and installed packages are up to date by running the command individually:
apt update
apt upgrade -yapt update: Updates the package index.
apt upgrade -y: Upgrades all installed packages to their latest versions.
Install unzip and other necessary utilities:
apt install -y unzip wgetunzip: Required for extracting the Zenon controller ZIP file.
wget: Facilitates downloading files from the internet.
This section covers downloading the Orchestrator binary, setting up the configuration file, and preparing the orchestrator for deployment.
First, download the latest Orchestrator binary. Ensure you're using the most recent release by checking the OrchestratorGitHub Releases.
Download Command:
wget https://github.com/HyperCore-Team/orchestrator/releases/download/v0.0.9a-alphanet/orchestrator-linux-amd64.zipNote: Replace the URL with the latest release if a newer version is available.
Unzip the downloaded file:
unzip orchestrator-linux-amd64.zipMove the Binary and Create the Configuration Directory
Copy the Binary to /usr/local/bin/:
cp orchestrator-linux-amd64 /usr/local/bin/Run the Orchestrator Binary to Initialize:
/usr/local/bin/orchestrator-linux-amd64Expected Outcome: The process will fail initially but will create a working directory at /root/.orchestrator/.
Edit the config.json file to suit your environment:
nano /root/.orchestrator/config.jsonConfiguration Steps:
Update WebSocket URLs:
BNB: Replace with your Alchemy BNB WSS endpoint.
Ethereum: Replace with your Alchemy Ethereum WSS endpoint.
Provide Producer Key File Passphrase:
Retrieve by running the znn-controller and selecting the 2) Status option.
Maintain Unique EvmAddress:
Do not change or remove the EvmAddress once created.
Add Bootstrap Address:
"Bootstrap": "/dns/bootstrap.zenon.community/tcp/55055/p2p/12D3KooWBVQYaz3yuJor8oW7bUqoAGDZDpFBGbGerL3SprHn57pQ"Sample config.json Structure:
{
"DataPath": "/root/.orchestrator",
"EventsPath": "",
"QueuesPath": "",
"GlobalState": 0,
"EvmAddress": "",
"Networks": {
"BNB Chain": { <= UPDATE THIS
"Urls": [
"ws://127.0.0.1:8545" <= UPDATE THIS
],
"FilterQuerySize": 1500
},
"Ethereum": {
"Urls": [
"wss://eth-mainnet.alchemyapi.io/v2/your-api-key" <= UPDATE THIS
],
"FilterQuerySize": 2000
},
"Zenon": {
"Urls": [
"ws://127.0.0.1:35998"
],
"FilterQuerySize": 0
}
},
"TssConfig": {
"Port": 55055,
"PublicKey": "",
"DecompressedPublicKey": "",
"LocalPubKeys": null,
"Bootstrap": "/dns/bootstrap.zenon.community/tcp/55055/p2p/12D3KooWBVQYaz3yuJor8oW7bUqoAGDZDpFBGbGerL3SprHn57pQ",
"PubKeyWhitelist": {},
"BaseDir": "/root/.orchestrator/tss",
"BaseConfig": {
"PartyTimeout": 60000000000,
"KeyGenTimeout": 900000000000,
"KeySignTimeout": 60000000000,
"KeyRegroupTimeout": 60,
"PreParamTimeout": 600000000000,
"EnableMonitor": false
}
},
"ProducerKeyFileName": "producer",
"ProducerKeyFilePassphrase": "YOUR_PASSPHRASE", <= UPDATE THIS
"ProducerIndex": 0
}Assuming you are running the Orchestrator on the pillar, copy the producer file to the Orchestrator's data path:
cp /root/.znn/wallet/producer /root/.orchestrator/producerNote: Ensure the path to the producer file is correct. Adjust the command if your producer file is located elsewhere.
To ensure that the Orchestrator runs continuously and starts on boot, set it up as a systemd service.
Open a new service file for the Orchestrator:
nano /etc/systemd/system/orchestrator.serviceCopy and paste the following content into the service file:
iniCopy code[Unit]
Description=Orchestrator Service
After=network.target
StartLimitIntervalSec=300s
StartLimitBurst=10
[Service]
User=root
Group=root
ExecStart=/usr/local/bin/orchestrator-linux-amd64
ExecStop=/usr/bin/pkill -9 orchestrator-linux-amd64
Restart=on-failure
RestartSec=60
TimeoutStopSec=10s
TimeoutStartSec=10s
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=orchestrator
[Install]
WantedBy=multi-user.targetReload systemd to recognize the new service:
systemctl daemon-reloadEnable the service to start on boot:
systemctl enable orchestratorStart the Orchestrator service:
systemctl start orchestratorCheck if the Orchestrator service is running correctly:
systemctl status orchestratorExpected Output:
● orchestrator.service - Orchestrator Service
Loaded: loaded (/etc/systemd/system/orchestrator.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-04-27 10:00:00 UTC; 5s ago
Main PID: 12345 (orchestrator-)
Tasks: 10 (limit: 4704)
CGroup: /system.slice/orchestrator.service
└─12345 /usr/local/bin/orchestrator-linux-amd64Note: The Active: active (running) status indicates that the service is running correctly.
To fully deploy your Orchestrator with the Zenon Network, ensure that you have fused at least 120 QSR tokens to the Pillar Producer Address.
Access Your Pillar Producer Address:
Use your Syrius wallet or another compatible wallet to access your producer address.
Fuse QSR Tokens:
Follow the wallet's instructions to fuse QSR tokens.
Ensure you have at least 120 QSR fused to meet the network's requirements.