HYPERQUBE_Z LAUNCH PART 2
Genesis Timestamp: Wednesday February 19 12:00 AM UTC (1739923200)
HQZ Node Deployment
This post provides a bash script to deploy an HQZ Pillar. The script sets up the required directories, downloads the genesis.json
file, creates a configuration file, clones a deployment repository, backs up any pre-existing configuration, and finally runs the deployment script. After deployment, you will need to update the producer wallet file with your actual keystore if it does not already exist.
Note: The script must be run as root.
Overview
The deployment script performs the following steps:
- Checks for curl: Installs it if it’s not already present.
- Pre-deployment backup:
If the/root/.hqzd
directory already exists, the script stops thego-hyperqube
service and backs up the folder to/root/.hqzd.bak
before proceeding. - Creates necessary directories:
The script verifies that both/root/.hqzd
and/root/.hqzd/wallet
exist. If the wallet directory is missing, it gets created. - Downloads
genesis.json
:
Downloads the file and saves it to/root/.hqzd/genesis.json
. - Prompts for input:
Asks for the pillar name and producer address. - Generates
config.json
:
Creates a configuration file with your provided values. - Creates a producer wallet file (if missing):
A wallet file is created at/root/.hqzd/wallet/<producer_address>
containing a placeholder message. If a wallet file already exists for the given producer address, it won’t be overwritten. - Clones the deployment repository and runs the deployment script.
Prerequisites
- A Linux machine with root access and minimum system requirements (2vCPUs and 4GB RAM).
- A package manager (
apt-get
oryum
) to install missing tools. - Git must be installed on your system.
- Internet access to download necessary files and clone repositories.
Deployment Instructions
-
Download the Deployment Script
Download the deployment script from the following URL:
For example, run:
curl -fsSL -o hqz.sh https://gist.githubusercontent.com/0x3639/7ac174f199d9087e58ff3bf9328fe07e/raw/72d0512c958aadc805970d41844465b76d82c847/hqz.sh
-
Make the Script Executable
Change the permissions to make it executable:
chmod +x hqz.sh
-
Run the Script as Root
Execute the script as root (either log in as root or use
sudo
):sudo ./hqz.sh
During execution, the script will:
- Check if
/root/.hqzd
already exists; if it does, it stops thego-hyperqube
service and backs up the directory to/root/.hqzd.bak
. - Create any missing directories (both
/root/.hqzd
and/root/.hqzd/wallet
). - Download
genesis.json
into/root/.hqzd/
. - Prompt you for the pillar name and producer address.
- Generate a
config.json
file with your provided values. - Create a wallet file at
/root/.hqzd/wallet/<producer_address>
(if it doesn’t already exist). - Clone the deployment repository and run its deployment script.
- Check if
Post-Deployment: Updating the Producer Wallet File (ONLY IF YOU CREATED THE PRODUCER ON A DIFFERENT MACHINE)
After the deployment is complete, you must update the producer wallet file with your actual keystore. Follow these steps if you need to move the producer file to the server:
-
Locate the Producer Wallet File on the machine that created the Producer file
On the machine where you originally created your Producer address, navigate to your wallet directory:
cd ~/.hqzd/wallet ls
You should see a file named after your producer address.
-
Retrieve the Keystore
Display the contents of the producer file:
cat ~/.hqzd/wallet/<producer_address>
Replace
<producer_address>
with your actual producer address and copy the output (your keystore). -
Update the Wallet File on the Pillar Machine
On the Pillar machine where you ran the
hqz.sh
script, open the wallet file located at:/root/.hqzd/wallet/<producer_address>
Replace the placeholder text:
#Replace with the keystore of the producer address
with your actual keystore. You can use an editor like
nano
:nano /root/.hqzd/wallet/<producer_address>
Save and exit after pasting the keystore.
Restart go-hyperqube
After updating the wallet file, start the node service:
sudo systemctl start go-hyperqube
Check the status to ensure it is running:
sudo systemctl status go-hyperqube
To follow the logs:
sudo journalctl -u go-hyperqube -f
Happy deploying!