Compare commits

..

No commits in common. "main" and "v1.4.21.1" have entirely different histories.

16 changed files with 116 additions and 849 deletions

View File

@ -6,8 +6,9 @@ This script is an all-in-one quil usage software for newcomers.
For installation and first run, please run
rm -f quilibrium_for_dummies.sh && wget https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/quilibrium_for_dummies.sh && chmod +x quilibrium_for_dummies.sh && ./quilibrium_for_dummies.sh
wget https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/quilibrium_for_dummies.sh
chmod u+x quilibrium_for_dummies.sh
./quilibrium_for_dummies.sh
After first run, when you need to reach your node, you need to run only;
@ -17,7 +18,8 @@ After first run, when you need to reach your node, you need to run only;
**Autoinstaller Script for Quilibrium as a Service**
Use below command to install v2.0
Use below command to install v1.4.21.1
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh | bash
@ -25,8 +27,7 @@ Use below command to install v2.0
**Autoupdater**
If you need to update your node from previous version to 2.0, apply below command
If you need to update your node from previous version to 1.4.21.1, apply below command
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh | bash

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is prepared by 0xOzgur"
echo "This script is prepared by 0xOzgur.eth"
echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!"
echo "Processing..."
sleep 10 # Add a 10-second delay

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is prepared by 0xOzgur"
echo "This script is prepared by 0xOzgur.eth"
echo "Enjoy and sit back while you are configuring grpCurl for Quilibrium Ceremony Client!"
echo "Processing..."
sleep 10 # Add a 10-second delay

View File

@ -1,196 +0,0 @@
#!/bin/bash
# Terminal clearing function
clear_screen() {
clear
echo "Log Monitoring Active - Press Ctrl+C to exit"
echo "___________________________________________________________"
}
# Global variables
last_increment=""
last_change_time=$(date +%s)
last_decrease_time=$(date +%s)
CHECK_INTERVAL=5 # Check interval (seconds)
RESTART_THRESHOLD=$((5 * 60)) # 5 minutes (in seconds)
RESTART_WAIT_TIME=$((1* 60)) # Wait 1 minute after restart
last_restart_time=0
increment_updated=""
# ANSI color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Service restart function
restart_service() {
local reason=$1
echo -e "${RED}REASON FOR RESTART: $reason${NC}"
echo "Restarting service..."
sudo systemctl restart ceremonyclient.service
last_restart_time=$(date +%s)
last_change_time=$last_restart_time
last_decrease_time=$last_restart_time
echo -e "${YELLOW}Service restarted. Waiting 5 minutes for logs to stabilize...${NC}"
for i in {300..1}; do
echo -ne "Remaining time: $i seconds\r"
sleep 1
done
echo -e "\nWait time complete. Starting log analysis..."
sleep 2
}
# Continuously running while loop
while true; do
clear_screen
current_time=$(date +%s)
increment_updated=""
time_since_restart=$((current_time - last_restart_time))
if [ $last_restart_time -ne 0 ] && [ $time_since_restart -lt $RESTART_WAIT_TIME ]; then
remaining_wait=$((RESTART_WAIT_TIME - time_since_restart))
echo -e "${YELLOW}It's been $time_since_restart seconds since the last restart."
echo -e "Waiting $remaining_wait seconds before a new restart can be triggered...${NC}"
else
last_decrease=$(sudo journalctl -u ceremonyclient.service -o short-iso -n 2000 | grep 'publishing' | tail -n 20 | \
awk -v current_time="$current_time" '
BEGIN {
total_time=0;
total_decrement=0;
count=0;
last_decrease_gap=0;
}
{
timestamp=$1;
increment=gensub(/.*"increment":([0-9]+).*/, "\\1", "g", $0);
cmd="date -d \"" timestamp "\" +%s";
cmd | getline entry_time;
close(cmd);
if (previous_time && previous_increment) {
time_gap=entry_time-previous_time;
decrement=previous_increment-increment;
if (decrement > 0) {
total_time+=time_gap;
total_decrement+=decrement;
count++;
}
};
previous_time=entry_time;
previous_increment=increment;
}
END {
last_decrease_gap=(current_time - previous_time);
printf "%d", last_decrease_gap;
}')
current_increment=$(sudo journalctl -u ceremonyclient.service -o short-iso -n 1 | grep 'publishing' | awk -F'"increment":' '{print $2}' | awk -F',' '{print $1}')
if [ $time_since_restart -ge $RESTART_WAIT_TIME ] || [ $last_restart_time -eq 0 ]; then
if [ ! -z "$last_decrease" ] && [ "$last_decrease" -gt "$RESTART_THRESHOLD" ]; then
restart_service "Last decrease was $last_decrease seconds ago (more than 5 minutes)"
continue
fi
if [ ! -z "$current_increment" ]; then
if [ "$current_increment" != "$last_increment" ]; then
last_increment=$current_increment
last_change_time=$current_time
increment_updated="${YELLOW}Increment value updated: $current_increment${NC}"
else
time_since_last_change=$((current_time - last_change_time))
if [ $time_since_last_change -ge $RESTART_THRESHOLD ]; then
restart_service "Increment value has not changed for $time_since_last_change seconds"
continue
fi
fi
fi
fi
# Log analysis output
sudo journalctl -u ceremonyclient.service -o short-iso -n 2000 | grep 'publishing' | tail -n 20 | \
awk -v current_time="$current_time" '
BEGIN {
total_time=0;
total_decrement=0;
count=0
}
{
timestamp=$1;
increment=gensub(/.*"increment":([0-9]+).*/, "\\1", "g", $0);
cmd="date -d \"" timestamp "\" +%s";
cmd | getline entry_time;
close(cmd);
if (previous_time && previous_increment) {
time_gap=entry_time-previous_time;
decrement=previous_increment-increment;
if (decrement > 0) {
total_time+=time_gap;
total_decrement+=decrement;
count++;
printf "Increment %s, Time Gap: %ss, Decrement: %s\n", increment, time_gap, decrement
}
};
previous_time=entry_time;
previous_increment=increment
}
END {
last_decrement_gap=(current_time - previous_time);
avg_time_per_decrement=(count > 0 && total_decrement > 0) ? total_time / total_decrement : 0;
printf "___________________________________________________________\n";
printf "Last Decrease: %s Seconds ago\n", last_decrement_gap;
}'
# Ongoing statistics
sudo journalctl -u ceremonyclient.service -o short-iso -n 2000 | grep 'publishing' | tail -n 20 | \
awk -v current_time="$current_time" '
BEGIN {
total_time=0;
total_decrement=0;
count=0
}
{
timestamp=$1;
increment=gensub(/.*"increment":([0-9]+).*/, "\\1", "g", $0);
cmd="date -d \"" timestamp "\" +%s";
cmd | getline entry_time;
close(cmd);
if (previous_time && previous_increment) {
time_gap=entry_time-previous_time;
decrement=previous_increment-increment;
if (decrement > 0) {
total_time+=time_gap;
total_decrement+=decrement;
count++;
}
};
previous_time=entry_time;
previous_increment=increment
}
END {
avg_time_per_decrement=(count > 0 && total_decrement > 0) ? total_time / total_decrement : 0;
printf "Avg Publish Time per Unit Decrement: %.6f seconds\n", avg_time_per_decrement;
printf "Time to reach 0 for your %s remaining Increments: %.2f days\n", previous_increment, (previous_increment * avg_time_per_decrement) / 86400;
printf "___________________________________________________________\n";
printf "Estimated time to reach 0 from different starting points:\n";
printf "From 3,000,000: %.2f days\n", (3000000 * avg_time_per_decrement) / 86400;
printf "From 2,500,000: %.2f days\n", (2500000 * avg_time_per_decrement) / 86400;
printf "From 2,000,000: %.2f days\n", (2000000 * avg_time_per_decrement) / 86400;
printf "From 1,500,000: %.2f days\n", (1500000 * avg_time_per_decrement) / 86400;
printf "From 1,000,000: %.2f days\n", (1000000 * avg_time_per_decrement) / 86400;
printf "From 500,000: %.2f days\n", (500000 * avg_time_per_decrement) / 86400;
printf "From 250,000: %.2f days\n", (250000 * avg_time_per_decrement) / 86400;
}'
fi
sleep $CHECK_INTERVAL
done

View File

@ -1,73 +1,31 @@
#!/bin/bash
# Set the version number
VERSION="2.0.4.1"
VERSION="1.4.21.1"
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
OS=$(uname -s)
# Determine the node binary name based on the architecture and OS
# Check if NODE_VERSION is empty
if [ -z "$NODE_VERSION" ]; then
NODE_VERSION=$(curl -s https://releases.quilibrium.com/release | grep -E "^node-[0-9]+(\.[0-9]+)*" | grep -v "dgst" | sed 's/^node-//' | cut -d '-' -f 1 | head -n 1)
if [ -z "$NODE_VERSION" ]; then
echo "❌ Error: Unable to determine NODE_VERSION automatically."
echo "The script cannot proceed without a correct node version number."
echo "Please try the manual step by step installation instead:"
echo "https://docs.quilibrium.one/start/tutorials/node-step-by-step-installation"
echo
exit 1
else
echo "✅ Automatically determined NODE_VERSION: $NODE_VERSION"
fi
else
echo "✅ Using specified NODE_VERSION: $NODE_VERSION"
fi
# Determine qclient latest version
# Check if QCLIENT_VERSION is empty
if [ -z "$QCLIENT_VERSION" ]; then
QCLIENT_VERSION=$(curl -s https://releases.quilibrium.com/qclient-release | grep -E "^qclient-[0-9]+(\.[0-9]+)*" | sed 's/^qclient-//' | cut -d '-' -f 1 | head -n 1)
if [ -z "$QCLIENT_VERSION" ]; then
echo "⚠️ Warning: Unable to determine QCLIENT_VERSION automatically. Continuing without it."
echo "The script won't be able to install the qclient, but it will still install your node."
echo "You can install the qclient later manually if you need to."
echo
sleep 1
else
echo "✅ Automatically determined QCLIENT_VERSION: $QCLIENT_VERSION"
fi
else
echo "✅ Using specified QCLIENT_VERSION: $QCLIENT_VERSION"
fi
echo
# Determine the node binary name based on the architecture and OS
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$NODE_VERSION-linux-amd64"
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$NODE_VERSION-darwin-amd64"
GO_BINARY="go1.22.4.darwin-amd64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-amd64"
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$NODE_VERSION-linux-arm64"
NODE_BINARY="node-$VERSION-linux-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-linux-arm64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$NODE_VERSION-darwin-arm64"
GO_BINARY="go1.22.4.darwin-arm64.tar.gz"
[ -n "$QCLIENT_VERSION" ] && QCLIENT_BINARY="qclient-$QCLIENT_VERSION-darwin-arm64"
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
fi
else
echo "❌ Error: Unsupported system architecture ($ARCH) or operating system ($OS)."
exit 1
fi
echo "Installing prerequisites..."

View File

@ -3,7 +3,7 @@
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space "
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space "
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page."
echo "⏳Enjoy and sit back while you are building your Quilibrium Node!"
@ -121,7 +121,7 @@ git checkout release-cdn
# Build Ceremonyclient qClient
echo "⏳Building qCiient"
sleep 1 # Add a 1-second delay
cd ~/ceremonyclient/node
cd ~/ceremonyclient/client
GOEXPERIMENT=arenas go build -o qclient main.go
# Step 5:Determine the ExecStart line based on the architecture
@ -129,7 +129,7 @@ GOEXPERIMENT=arenas go build -o qclient main.go
HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
EXEC_START="$NODE_PATH/release_autorun.sh"
# Create Ceremonyclient Service
echo "⏳Creating Ceremonyclient Service"
@ -156,7 +156,7 @@ RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
KillSignal=SIGINT
TimeoutStopSec=75s
TimeoutStopSec=30s
[Install]
WantedBy=multi-user.target

View File

@ -3,7 +3,7 @@
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "⏳Enjoy and sit back while you are building your Quilibrium Ceremony Client!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
@ -61,8 +61,7 @@ git checkout release-cdn
echo "⏳Building Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:2.0 .2.0
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:1.4.21.1 .1.4.21.1
# Step 8:Run Ceremonyclient Container

View File

@ -1,12 +1,11 @@
#!/bin/bash
# Set the version number
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
VERSION="1.4.21.1"
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space "
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space "
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "The script doesn't install GO or GrpCurl packages. If you want to install them please visit https://docs.quilibrium.space/installing-prerequisites page."
echo "⏳Enjoy and sit back while you are building your Quilibrium Node!"
@ -37,6 +36,15 @@ else
echo "git is installed"
fi
# if ! command -v cpulimit &> /dev/null
# then
# echo "cpulimit could not be found"
# echo "Installing cpulimit..."
# su -c "apt update && apt install cpulimit -y"
# else
# echo "cpulimit is installed"
# fi
sudo apt upgrade -y
# Step 2: Adjust network buffer sizes
@ -88,70 +96,6 @@ cd ~/ceremonyclient/
# git remote set-url origin https://github.com/QuilibriumNetwork/ceremonyclient.git || git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git
git checkout release
#==========================
# NODE BINARY DOWNLOAD
#==========================
get_os_arch() {
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
local arch=$(uname -m)
case "$os" in
linux|darwin) ;;
*) echo "Unsupported operating system: $os" >&2; return 1 ;;
esac
case "$arch" in
x86_64|amd64) arch="amd64" ;;
arm64|aarch64) arch="arm64" ;;
*) echo "Unsupported architecture: $arch" >&2; return 1 ;;
esac
echo "${os}-${arch}"
}
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Base URL for the Quilibrium releases
RELEASE_FILES_URL="https://releases.quilibrium.com/release"
# Fetch the list of files from the release page
# Updated regex to allow for an optional fourth version number
RELEASE_FILES=$(curl -s $RELEASE_FILES_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $RELEASE_FILES; do
echo "Downloading $file..."
curl -L -o "$file" "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
# Check if the file is the base binary (without .dgst or .sig suffix)
if [[ $file =~ ^node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}$ ]]; then
echo "Making $file executable..."
chmod +x "$file"
if [ $? -eq 0 ]; then
echo "Successfully made $file executable"
else
echo "Failed to make $file executable"
fi
fi
else
echo "Failed to download $file"
fi
echo "------------------------"
done
echo "✅ Node binary download completed."
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
OS=$(uname -s)
@ -161,11 +105,11 @@ if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-amd64"
QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-darwin-arm64"
QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
@ -174,66 +118,17 @@ elif [ "$ARCH" = "aarch64" ]; then
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-arm64"
QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64"
fi
fi
get_os_arch() {
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
local arch=$(uname -m)
case "$os" in
linux|darwin) ;;
*) echo "Unsupported operating system: $os" >&2; return 1 ;;
esac
case "$arch" in
x86_64|amd64) arch="amd64" ;;
arm64|aarch64) arch="arm64" ;;
*) echo "Unsupported architecture: $arch" >&2; return 1 ;;
esac
echo "${os}-${arch}"
}
# Step 4:Download qClient
echo "⏳Downloading qClient"
sleep 1 # Add a 1-second delay
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Base URL for the Quilibrium releases
BASE_URL="https://releases.quilibrium.com/qclient-release"
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "❌ Error: Failed to download $file"
echo "Your node will still work, but you'll need to install the qclient manually later if needed."
fi
echo "------------------------"
done
//
chmod +x qclient*
echo "✅ qClient binary downloaded and configured successfully."
echo
cd ~/ceremonyclient/client
wget https://releases.quilibrium.com/$QCLIENT_BINARY
mv $QCLIENT_BINARY qclient
chmod +x qclient
# Step 5:Determine the ExecStart line based on the architecture
# Get the current user's home directory
@ -241,7 +136,7 @@ HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
EXEC_START="$NODE_PATH/release_autorun.sh"
# Step 6:Create Ceremonyclient Service
echo "⏳ Creating Ceremonyclient Service"
@ -268,7 +163,7 @@ RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
KillSignal=SIGINT
TimeoutStopSec=75s
TimeoutStopSec=30s
[Install]
WantedBy=multi-user.target

View File

@ -1,173 +0,0 @@
#!/bin/bash
# Set the version number
VERSION="2.0.4.1-b7-testnet"
qClientVERSION="2.0.4.1"
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space "
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "This script will be building new fresh Node for Quilibrium Testnet. Your use is at your own risk. 0xOzgur does not accept any liability."
echo "⏳Enjoy and sit back while you are building your Quilibrium Testnet Node!"
echo "⏳Processing..."
sleep 5 # Add a 10-second delay
# Step 1: Update and Upgrade the Machine
echo "Updating the machine"
echo "⏳Processing..."
sleep 2 # Add a 2-second delay
# Fof DEBIAN OS - Check if sudo and git is installed
if ! command -v sudo &> /dev/null
then
echo "sudo could not be found"
echo "Installing sudo..."
su -c "apt update && apt install sudo -y"
else
echo "sudo is installed"
fi
if ! command -v git &> /dev/null
then
echo "git could not be found"
echo "Installing git..."
su -c "apt update && apt install git -y"
else
echo "git is installed"
fi
sudo apt upgrade -y
# Step 2: Adjust network buffer sizes
echo "Adjusting network buffer sizes..."
if grep -q "^net.core.rmem_max=600000000$" /etc/sysctl.conf; then
echo "net.core.rmem_max=600000000 found inside /etc/sysctl.conf, skipping..."
else
echo -e "\n# Change made to increase buffer sizes for better network performance for ceremonyclient\nnet.core.rmem_max=600000000" | sudo tee -a /etc/sysctl.conf > /dev/null
fi
if grep -q "^net.core.wmem_max=600000000$" /etc/sysctl.conf; then
echo "net.core.wmem_max=600000000 found inside /etc/sysctl.conf, skipping..."
else
echo -e "\n# Change made to increase buffer sizes for better network performance for ceremonyclient\nnet.core.wmem_max=600000000" | sudo tee -a /etc/sysctl.conf > /dev/null
fi
sudo sysctl -p
# Step 4:Download Ceremonyclient
echo "⏳Creating Testnet Directories"
sleep 1 # Add a 1-second delay
mkdir testnet
cd ~/testnet
mkdir ceremonyclient
cd ~/testnet/ceremonyclient/
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
OS=$(uname -s)
# Determine the node binary name based on the architecture and OS
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-arm64"
fi
fi
#==========================
# NODE BINARY DOWNLOAD
#==========================
# Step 4:Download qClient
echo "⏳Downloading qClient"
sleep 1 # Add a 1-second delay
cd ~/testnet/ceremonyclient/node
wget https://releases.quilibrium.com/$NODE_BINARY
chmod +x $NODE_BINARY
echo "✅ Node binary for testnet downloaded and permissions configured completed."
#==========================
# qCLIENT BINARY DOWNLOAD
#==========================
cd ~/testnet/ceremonyclient/client
wget https://releases.quilibrium.com/$QCLIENT_BINARY
chmod +x $QCLIENT_BINARY
echo "✅ qClient binary for testnet downloaded and permissions configured completed."
echo
# Step 5:Determine the ExecStart line based on the architecture
# Get the current user's home directory
HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/testnet/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Step 6:Create Ceremonyclient Service
echo "⏳ Stopping Ceremonyclient Service"
service ceremonyclient stop
sleep 2 # Add a 2-second delay
echo "⏳ Creating Ceremonyclient Testnet Service"
sleep 2 # Add a 2-second delay
sudo tee /lib/systemd/system/qtestnet.service > /dev/null <<EOF
[Unit]
Description=Ceremony Client Testnet Service
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START --signature-check=false --network=1
KillSignal=SIGINT
TimeoutStopSec=75s
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
# sudo systemctl enable ceremonyclient
# Step 7: Start the ceremonyclient service
echo "✅Starting Ceremonyclient Testnet Service"
sleep 1 # Add a 1-second delay
sudo service qtestnet start
# Step 8: See the logs of the ceremonyclient service
echo "🎉Welcome to Quilibrium Ceremonyclient VERSION"
echo "⏳Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 30 # Add a 5-second delay
CONFIG_FILE="$HOME/testnet/ceremonyclient/node/.config/config.yml"
# Backup the original file
cp "$CONFIG_FILE" "${CONFIG_FILE}.bak"
# Comment out existing bootstrap peers
sed -i '/bootstrapPeers:/,/^[^ ]/s/^ -/# -/' "$CONFIG_FILE"
# Add the new bootstrap peer
sed -i '/bootstrapPeers:/a\ - /ip4/91.242.214.79/udp/8336/quic-v1/p2p/QmNSGavG2DfJwGpHmzKjVmTD6CVSyJsUFTXsW4JXt2eySR' "$CONFIG_FILE"
echo "Bootstrap peers updated in $CONFIG_FILE"
echo "Original file backed up as ${CONFIG_FILE}.bak"
sudo service qtestnet restart
sudo journalctl -u qtestnet.service -f --no-hostname -o cat

View File

@ -1,98 +0,0 @@
#!/bin/bash
# Define file paths for storing previous values
seniority_file="/tmp/previous_seniority.txt"
balance_file="/tmp/previous_balance.txt"
# Arrays to store the last 30 frame ages
submitting_ages=()
creating_ages=()
# Flags to track the detection of both messages
submitting_proof_detected=false
shard_ring_proof_detected=false
# Function to calculate the average of an array
calculate_average() {
local arr=("$@")
local sum=0
for age in "${arr[@]}"; do
sum=$(echo "$sum + $age" | bc)
done
echo "scale=2; $sum / ${#arr[@]}" | bc
}
# Monitor journalctl for the specific keywords
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat | grep --line-buffered -E 'submitting data proof|creating data shard ring proof' | while read -r line
do
# Print a human-readable timestamp
echo "$(date '+%Y-%m-%d %H:%M:%S') - $line"
# Check for each specific message, extract frame age, and update arrays
if [[ "$line" == *"submitting data proof"* ]]; then
submitting_proof_detected=true
frame_age=$(echo "$line" | grep -oP '"frame_age":[0-9.]+(?=})' | cut -d: -f2)
submitting_ages+=("$frame_age")
# Keep only the last 30 frame ages
if [ ${#submitting_ages[@]} -gt 30 ]; then
submitting_ages=("${submitting_ages[@]:1}")
fi
elif [[ "$line" == *"creating data shard ring proof"* ]]; then
shard_ring_proof_detected=true
frame_age=$(echo "$line" | grep -oP '"frame_age":[0-9.]+(?=})' | cut -d: -f2)
creating_ages+=("$frame_age")
# Keep only the last 30 frame ages
if [ ${#creating_ages[@]} -gt 30 ]; then
creating_ages=("${creating_ages[@]:1}")
fi
fi
# Only proceed if both messages have been detected
if $submitting_proof_detected && $shard_ring_proof_detected; then
# Reset flags for the next cycle
submitting_proof_detected=false
shard_ring_proof_detected=false
# Print the averages for the last 30 frame ages
echo "Average frame age for 'creating data shard ring proof': $(calculate_average "${creating_ages[@]}")"
echo "Average frame age for 'submitting data proof': $(calculate_average "${submitting_ages[@]}")"
# Navigate to the ceremonyclient/node directory
cd ~/ceremonyclient/node
# Run the token balance command and filter for the Total balance line
total_balance=$(./qclient-2.0.4.1-linux-amd64 token balance | grep -oP 'Total balance: \K[0-9.]+')
echo "Total balance: $total_balance"
# Run the node-info command and filter for specific lines
node_info=$(./node-2.0.4.1-linux-amd64 -node-info)
seniority=$(echo "$node_info" | grep -oP 'Seniority: \K[0-9]+')
prover_ring=$(echo "$node_info" | grep 'Prover Ring')
owned_balance=$(echo "$node_info" | grep 'Owned balance')
echo "$prover_ring"
echo "Seniority: $seniority"
echo "$owned_balance"
# Load previous values if they exist, otherwise set defaults
previous_seniority=$(cat "$seniority_file" 2>/dev/null || echo "0")
previous_balance=$(cat "$balance_file" 2>/dev/null || echo "0")
# Compare and check if Seniority and Total balance have increased
if (( seniority > previous_seniority )); then
echo "Seniority has increased from $previous_seniority to $seniority"
else
echo "Seniority has not increased."
fi
if (( $(echo "$total_balance > $previous_balance" | bc -l) )); then
echo "Total balance has increased from $previous_balance to $total_balance"
else
echo "Total balance has not increased."
fi
# Store current Seniority and Total balance for the next iteration
echo "$seniority" > "$seniority_file"
echo "$total_balance" > "$balance_file"
fi
done

View File

@ -28,16 +28,15 @@ OS=$(uname -s)
# Determine the node binary name based on the architecture and OS
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY='node-2.0-linux-amd64'
NODE_BINARY='node-1.4.21.1-linux-amd64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-2.0-darwin-amd64'
NODE_BINARY='node-1.4.21.1-darwin-amd64'
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY='node-2.0-linux-arm64'
NODE_BINARY='node-1.4.21.1-linux-arm64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-2.0-darwin-arm64'
NODE_BINARY='node-1.4.21.1-darwin-arm64'
fi
fi

View File

@ -17,22 +17,23 @@ alias wttr='curl wttr.in'
neofetch
# Shortcuts for Docker
alias dpeer-count='cd ~/ceremonyclient/ && docker compose exec node grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l'
alias dnode-info='cd ~/ceremonyclient/ && docker compose exec node node -node-info && cd ~'
alias ddb-console='cd ~/ceremonyclient/ && - docker compose exec node node --db-console && cd ~'
alias dbalance='cd ~/ceremonyclient/ && docker compose exec node node -balance && cd ~'
alias dlog='cd ~/ceremonyclient/ && docker compose logs -f -n, --tail 100 && cd ~'
alias dstart='cd ~/ceremonyclient/ && docker compose up -d && cd ~'
alias drestart='cd ~/ceremonyclient/ && docker compose down && docker compose up -d && cd ~'
alias dstop='cd ~/ceremonyclient/ && docker compose down && cd ~'
# Shortcuts for Service
alias peer-count="cd ~/ceremonyclient/node && grpcurl -plaintext -max-msg-sz 150000000 localhost:8337 quilibrium.node.node.pb.NodeService.GetPeerManifests | grep peerId | wc -l && cd ~"
alias node-info="cd ~/ceremonyclient/node && ./node-2.0.4.1-linux-amd64 -node-info && cd ~"
alias db-console="cd ~/ceremonyclient/node && ./node-2.0.4.1-linux-amd64 --db-console && cd ~"
alias balance="cd ~/ceremonyclient/node && ./node-2.0.4.1-linux-amd64 -balance && cd ~"
alias node-info="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -node-info && cd ~"
alias db-console="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 --db-console && cd ~"
alias balance="cd ~/ceremonyclient/node && ./node-1.4.21-linux-amd64 -balance && cd ~"
alias nlog="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat"
alias increment="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat | grep time_taken"
alias frame="sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat | grep frame_number"
alias nstart="service ceremonyclient start"
alias nrestart="service ceremonyclient restart"
alias nstop="service ceremonyclient stop"
alias benchmark='increment=$(journalctl -u ceremonyclient -ocat -n 100 | grep increment | awk -F'\[:,\}\]' '\''{for(i=1;i<=NF;i++){if($i~"increment"){gsub(/[ "]/,"",$i); print $(i+1)}}}'\'' | tail -n 1) && difficulty=$(expr 200000 - $increment / 4) && cpus=$(nproc) && score=$(echo "scale=2; ($cpus*$cpus*1000)/$difficulty" | bc) && echo "" && echo "CPU(s): $cpus" && echo "Increment: $increment" && echo "Difficulty: $difficulty" && echo "Score: $score"'
alias qbalance="cd ~/ceremonyclient/node && ./qclient-2.0.4.1-linux-amd64 token balance --public-rpc"
alias qtoken="cd ~/ceremonyclient/node && ./qclient-2.0.4.1-linux-amd64 token coins --public-rpc"
alias qmint="cd ~/ceremonyclient/node && ./qclient-2.0.4.1-linux-amd64 token mint all --public-rpc"
alias qmerge="cd ~/ceremonyclient/node && ./qclient-2.0.4.1-linux-amd64 token merge all --public-rpc"
alias mincrement="journalctl -u ceremonyclient.service -f --no-hostname -o cat -g 'publishing proof batch'-n 1000"
alias qnode="cd ~/ceremonyclient/node"
alias client="cd ~/ceremonyclient/node"
alias benchmark='increment=$(journalctl -u ceremonyclient -ocat -n 100 | grep increment | awk -F'\[:,\}\]' '\''{for(i=1;i<=NF;i++){if($i~"increment"){gsub(/[ "]/,"",$i); print $(i+1)}}}'\'' | tail -n 1) && difficulty=$(expr 200000 - $increment / 4) && cpus=$(nproc) && score=$(echo "scale=2; ($cpus*$cpus*1000)/$difficulty" | bc) && echo "" && echo "CPU(s): $cpus" && echo "Increment: $increment" && echo "Difficulty: $difficulty" && echo "Score: $score"'

View File

@ -7,8 +7,7 @@ clear
# Set the version number
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
VERSION="1.4.21.1"
# Determine the ExecStart line based on the architecture
@ -20,11 +19,11 @@ if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-amd64"
QCLIENT_BINARY="qclient-$VERSION-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-darwin-arm64"
QCLIENT_BINARY="qclient-$VERSION-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
@ -33,17 +32,17 @@ elif [ "$ARCH" = "aarch64" ]; then
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-arm64"
QCLIENT_BINARY="qclient-$VERSION-linux-arm64"
fi
fi
# URLs for scripts
UPDATE_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/update.sh"
PREREQUISITES_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/install/Install_prerequisites.sh"
NODE_INSTALL_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/install/install_quilibrium_service.sh"
GRPCURL_CONFIG_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/configuration/config.sh"
NODE_UPDATE_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/update/update.sh"
CHECK_VISIBILITY_URL="https://git.088.im/coosld/QuilibriumTools/raw/branch/main/visibility_check.sh"
UPDATE_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update.sh"
PREREQUISITES_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/Install_prerequisites.sh"
NODE_INSTALL_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh"
GRPCURL_CONFIG_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/configuration/config.sh"
NODE_UPDATE_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh"
CHECK_VISIBILITY_URL="https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/visibility_check.sh"
# Function for each menu option
install_prerequisites() {
@ -103,8 +102,9 @@ stop_node() {
# Menu
while true; do
clear
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "Welcome to Quilibrium for Dummies!"
echo "
_____ _ _ _ _ _
/ ___ \ (_) (_) | (_)
@ -160,4 +160,4 @@ echo "
esac
echo ""
read -n 1 -s -r -p "Press any key to continue"
done
done

View File

@ -1,12 +1,9 @@
#!/bin/bash
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
VERSION="1.4.21.1"
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v$VERSION!"
echo "The script is prepared for Ubuntu machines. If you are using another operating system, please check the compatibility of the script."
echo "⏳Processing..."
@ -15,20 +12,6 @@ sleep 5 # Add a 5-second delay
# Stop the ceremonyclient service
echo "Updating node..."
service ceremonyclient stop
echo "⏳ Stopping the ceremonyclient service if it exists..."
if systemctl is-active --quiet ceremonyclient; then
if sudo systemctl stop ceremonyclient; then
echo "🔴 Service stopped successfully."
echo
else
echo "❌ Failed to stop the ceremonyclient service." >&2
echo
fi
else
echo " Ceremonyclient service is not active or does not exist."
echo
fi
sleep 1
# apt install cpulimit -y
# apt install gawk -y #incase it is not installed
@ -41,72 +24,6 @@ git checkout main
git branch -D release
git pull
git checkout release
echo "✅ Github repo updated to the latest changes successfully."
echo
#==========================
# NODE BINARY DOWNLOAD
#==========================
get_os_arch() {
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
local arch=$(uname -m)
case "$os" in
linux|darwin) ;;
*) echo "Unsupported operating system: $os" >&2; return 1 ;;
esac
case "$arch" in
x86_64|amd64) arch="amd64" ;;
arm64|aarch64) arch="arm64" ;;
*) echo "Unsupported architecture: $arch" >&2; return 1 ;;
esac
echo "${os}-${arch}"
}
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Base URL for the Quilibrium releases
RELEASE_FILES_URL="https://releases.quilibrium.com/release"
# Fetch the list of files from the release page
# Updated regex to allow for an optional fourth version number
RELEASE_FILES=$(curl -s $RELEASE_FILES_URL | grep -oE "node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $RELEASE_FILES; do
echo "Downloading $file..."
curl -L -o "$file" "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
# Check if the file is the base binary (without .dgst or .sig suffix)
if [[ $file =~ ^node-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}$ ]]; then
echo "Making $file executable..."
chmod +x "$file"
if [ $? -eq 0 ]; then
echo "Successfully made $file executable"
else
echo "Failed to make $file executable"
fi
fi
else
echo "Failed to download $file"
fi
echo "------------------------"
done
echo "✅ Node binary download completed."
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
@ -117,11 +34,11 @@ if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.22.4.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-amd64"
QCLIENT_BINARY="qclient-1.4.19.1-linux-amd64"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-amd64"
GO_BINARY="go1.22.44.linux-amd64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-darwin-arm64"
QCLIENT_BINARY="qclient-1.4.19.1-darwin-arm64"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
@ -130,85 +47,33 @@ elif [ "$ARCH" = "aarch64" ]; then
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-linux-arm64"
QCLIENT_BINARY="qclient-1.4.19.1-linux-arm64"
fi
fi
get_os_arch() {
local os=$(uname -s | tr '[:upper:]' '[:lower:]')
local arch=$(uname -m)
case "$os" in
linux|darwin) ;;
*) echo "Unsupported operating system: $os" >&2; return 1 ;;
esac
case "$arch" in
x86_64|amd64) arch="amd64" ;;
arm64|aarch64) arch="arm64" ;;
*) echo "Unsupported architecture: $arch" >&2; return 1 ;;
esac
echo "${os}-${arch}"
}
# Step 4:Update qClient
# Get the current OS and architecture
OS_ARCH=$(get_os_arch)
# Base URL for the Quilibrium releases
BASE_URL="https://releases.quilibrium.com/qclient-release"
# Fetch the list of files from the release page
FILES=$(curl -s $BASE_URL | grep -oE "qclient-[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?-${OS_ARCH}(\.dgst)?(\.sig\.[0-9]+)?")
# Change to the download directory
cd ~/ceremonyclient/node
# Download each file
for file in $FILES; do
echo "Downloading $file..."
wget "https://releases.quilibrium.com/$file"
# Check if the download was successful
if [ $? -eq 0 ]; then
echo "Successfully downloaded $file"
else
echo "❌ Error: Failed to download $file"
echo "Your node will still work, but you'll need to install the qclient manually later if needed."
fi
echo "------------------------"
done
chmod +x qclient*
echo "✅ qClient binary downloaded and configured successfully."
echo
echo "Updating qClient"
sleep 1 # Add a 1-second delay
cd ~/ceremonyclient/client
rm -f qclient
wget https://releases.quilibrium.com/$QCLIENT_BINARY
mv $QCLIENT_BINARY qclient
chmod +x qclient
# Get the current user's home directory
HOME=$(eval echo ~$HOME_DIR)
# Use the home directory in the path
NODE_PATH="$HOME/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
EXEC_START="$NODE_PATH/release_autorun.sh"
# Step 6:Create Ceremonyclient Service
echo "⏳ Creating Ceremonyclient Service"
# Re-Create Ceremonyclient Service
echo "⏳ Re-Creating Ceremonyclient Service"
sleep 2 # Add a 2-second delay
# Check if the file exists before attempting to remove it
if [ -f "/lib/systemd/system/ceremonyclient.service" ]; then
# If the file exists, remove it
rm /lib/systemd/system/ceremonyclient.service
echo "ceremonyclient.service file removed."
else
# If the file does not exist, inform the user
echo "ceremonyclient.service file does not exist. No action taken."
fi
sudo tee /lib/systemd/system/ceremonyclient.service > /dev/null <<EOF
SERVICE_FILE="/lib/systemd/system/ceremonyclient.service"
if [ ! -f "$SERVICE_FILE" ]; then
echo "📝 Creating new ceremonyclient service file..."
if ! sudo tee "$SERVICE_FILE" > /dev/null <<EOF
[Unit]
Description=Ceremony Client Go App Service
@ -219,21 +84,37 @@ RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
KillSignal=SIGINT
TimeoutStopSec=75s
TimeoutStopSec=30s
[Install]
WantedBy=multi-user.target
EOF
then
echo "❌ Error: Failed to create ceremonyclient service file." >&2
exit 1
fi
else
echo "🔍 Checking existing ceremonyclient service file..."
# Check if the required lines exist and if they are different
if ! grep -q "WorkingDirectory=$NODE_PATH" "$SERVICE_FILE" || ! grep -q "ExecStart=$EXEC_START" "$SERVICE_FILE"; then
echo "🔄 Updating existing ceremonyclient service file..."
# Replace the existing lines with new values
sudo sed -i "s|WorkingDirectory=.*|WorkingDirectory=$NODE_PATH|" "$SERVICE_FILE"
sudo sed -i "s|ExecStart=.*|ExecStart=$EXEC_START|" "$SERVICE_FILE"
else
echo "✅ No changes needed."
fi
fi
# Start the ceremonyclient service
echo "✅ Starting Ceremonyclient Service"
sleep 2 # Add a 2-second delay
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
sudo systemctl start ceremonyclient
sudo service ceremonyclient start
# See the logs of the ceremonyclient service
echo "🎉 Welcome to Quilibrium Ceremonyclient v$VERSION"
echo "⏳ Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 2 # Add a 2-second delay
sleep 5 # Add a 5-second delay
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat

View File

@ -1,9 +1,9 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth"
echo "This script is made with ❤️ by 0xOzgur"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v2.0!"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.21.1!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
@ -13,7 +13,7 @@ service ceremonyclient stop
# Step 1:Download Binary
echo "⏳ Downloading New Release v2.0"
echo "⏳ Downloading New Release v1.4.21.1"
cd ~/ceremonyclient
git pull
@ -23,7 +23,7 @@ git checkout release-cdn
echo "⏳Building Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:2.0 .
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:1.4.21.1 .
# Step 8:Run Ceremonyclient Container

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "⏳You need GO and grpcurl installed and configured on your machine to run this script. If you don't have them, please install and configure grpcurl first."
echo "You can find the installation instructions at https://docs.quilibrium.space/installing-prerequisites"
echo "⏳Processing..."