From 71ed1dcd32415a4865ecdda481b1296e2feeb393 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:39:33 +0300 Subject: [PATCH 1/6] v1.4.20 Update --- README.md | 4 ++-- install/Install_prerequisites.sh | 2 +- install/install_docker.sh | 2 +- install/install_quilibrium_service.sh | 2 +- profile/.bash_profile | 8 ++++---- profile/.profile | 2 +- quilibrium_for_dummies.sh | 2 +- update/update.sh | 2 +- update/updateDocker.sh | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 84ecaef..adf99ed 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ 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 v1.4.19.1 +Use below command to install v1.4.20 wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh | bash **Autoupdater** -If you need to update your node from previous version to 1.4.19.1, apply below command +If you need to update your node from previous version to 1.4.20, apply below command wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh | bash diff --git a/install/Install_prerequisites.sh b/install/Install_prerequisites.sh index 6b9f80e..a15da93 100644 --- a/install/Install_prerequisites.sh +++ b/install/Install_prerequisites.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the version number -VERSION="1.4.19.1" +VERSION="1.4.20" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/install/install_docker.sh b/install/install_docker.sh index d7133ee..9b79d17 100644 --- a/install/install_docker.sh +++ b/install/install_docker.sh @@ -60,7 +60,7 @@ git checkout release-cdn # Step 7:Build Docker Container echo "⏳Building Ceremonyclient Container" sleep 2 # Add a 2-second delay -docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:1.4.19.1 .1.4.19.1 +docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:1.4.20 .1.4.20 # Step 8:Run Ceremonyclient Container echo "✅Running Ceremonyclient Container" diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index cf2678f..46ebde9 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -1,6 +1,6 @@ #!/bin/bash # Set the version number -VERSION="1.4.19.1" +VERSION="1.4.20" cd ~ # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space " diff --git a/profile/.bash_profile b/profile/.bash_profile index c7e6d42..76d7980 100644 --- a/profile/.bash_profile +++ b/profile/.bash_profile @@ -28,15 +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-1.4.19.1-linux-amd64' + NODE_BINARY='node-1.4.20-linux-amd64' elif [ "$OS" = "Darwin" ]; then - NODE_BINARY='node-1.4.19.1-darwin-amd64' + NODE_BINARY='node-1.4.20-darwin-amd64' fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then - NODE_BINARY='node-1.4.19.1-linux-arm64' + NODE_BINARY='node-1.4.20-linux-arm64' elif [ "$OS" = "Darwin" ]; then - NODE_BINARY='node-1.4.19.1-darwin-arm64' + NODE_BINARY='node-1.4.20-darwin-arm64' fi fi diff --git a/profile/.profile b/profile/.profile index 2029e19..b12a1fa 100644 --- a/profile/.profile +++ b/profile/.profile @@ -18,7 +18,7 @@ alias wttr='curl wttr.in' neofetch # Version of the node binary to use -VERSION="1.4.19.1" +VERSION="1.4.20" # Get system information ARCH=$(uname -m) diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index c8514aa..af0d0c8 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -6,7 +6,7 @@ source ~/.bashrc clear # Set the version number -VERSION="1.4.19.1" +VERSION="1.4.20" # Determine the ExecStart line based on the architecture ARCH=$(uname -m) diff --git a/update/update.sh b/update/update.sh index 652eea6..518920c 100644 --- a/update/update.sh +++ b/update/update.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="1.4.19.1" +VERSION="1.4.20" # Step 0: Welcome 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!" diff --git a/update/updateDocker.sh b/update/updateDocker.sh index 504dc3e..68652cb 100644 --- a/update/updateDocker.sh +++ b/update/updateDocker.sh @@ -2,7 +2,7 @@ # Step 0: Welcome echo "This script is made with ❤️ by 0xOzgur.eth" -echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.19.1!" +echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v1.4.20!" echo "⏳Processing..." sleep 10 # Add a 10-second delay @@ -10,7 +10,7 @@ sleep 10 # Add a 10-second delay service ceremonyclient stop # Step 1:Download Binary -echo "⏳ Downloading New Release v1.4.19.1" +echo "⏳ Downloading New Release v1.4.20" cd ~/ceremonyclient git pull git checkout release-cdn @@ -18,7 +18,7 @@ git checkout release-cdn # Step 7:Build Docker Container 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:1.4.19.1 . +docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:1.4.20 . # Step 8:Run Ceremonyclient Container echo "✅Running Ceremonyclient Container" From 1c0ecc9919674fd03d5b20a1103f5303fbaa9bf9 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:48:31 +0300 Subject: [PATCH 2/6] Added qClient variable --- quilibrium_for_dummies.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index af0d0c8..fb98290 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -17,9 +17,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-$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-$VERSION-darwin-arm64" fi elif [ "$ARCH" = "aarch64" ]; then if [ "$OS" = "Linux" ]; then @@ -28,6 +30,7 @@ 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-$VERSION-linux-arm64" fi fi From 1318ad67403db7eac2b5edd7827eb251604eadcc Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:48:48 +0300 Subject: [PATCH 3/6] Added qClient installation based on releases --- install/install_quilibrium_service.sh | 35 +++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index 46ebde9..e5f1bf7 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -94,8 +94,39 @@ 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 -# Get the system architecture -# ARCH=$(uname -m) +# 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-$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-$VERSION-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-$VERSION-linux-arm64" + fi +fi + +# Step 4:Download qClient +echo "⏳Downloading qClient" +sleep 1 # Add a 1-second delay +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 From 46897a04d32e2c011888b87a044e6e6ad16e3075 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:05:58 +0300 Subject: [PATCH 4/6] update qclient --- update/update.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/update/update.sh b/update/update.sh index 518920c..d808e0b 100644 --- a/update/update.sh +++ b/update/update.sh @@ -23,6 +23,41 @@ git branch -D release git pull git checkout release +# 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-$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-$VERSION-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-$VERSION-linux-arm64" + fi +fi + +# Step 4:Update qClient +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) From b7351c9c6bb17fc9be8aae7ef98ca506d79dccac Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:11:27 +0300 Subject: [PATCH 5/6] .profile file update --- profile/.profile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/profile/.profile b/profile/.profile index b12a1fa..bbaf390 100644 --- a/profile/.profile +++ b/profile/.profile @@ -40,20 +40,18 @@ elif [ "$ARCH" = "aarch64" ]; then fi -# 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_BINARY} -node-info && cd ~' -alias db-console='cd ~/ceremonyclient/node && ./${NODE_BINARY} --db-console && cd ~' -alias balance='cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~' +node-info() { + cd ~/ceremonyclient/node && ./${NODE_BINARY} -node-info && cd ~ +} +db-console() { + cd ~/ceremonyclient/node && ./${NODE_BINARY} --db-console && cd ~ +} + +balance() { + cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~ +} alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat' alias nstart='service ceremonyclient start' alias nrestart='service ceremonyclient restart' From ee266e15288676ad1eb693b7266656d349bdf086 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:28:17 +0300 Subject: [PATCH 6/6] .profile update --- profile/.profile | 56 ++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/profile/.profile b/profile/.profile index bbaf390..4ebc4df 100644 --- a/profile/.profile +++ b/profile/.profile @@ -17,43 +17,23 @@ alias wttr='curl wttr.in' neofetch -# Version of the node binary to use -VERSION="1.4.20" - -# Get system information -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" - elif [ "$OS" = "Darwin" ]; then - NODE_BINARY="node-$VERSION-darwin-amd64" - fi -elif [ "$ARCH" = "aarch64" ]; then - if [ "$OS" = "Linux" ]; then - NODE_BINARY="node-$VERSION-linux-arm64" - elif [ "$OS" = "Darwin" ]; then - NODE_BINARY="node-$VERSION-darwin-arm64" - fi -fi - - +# 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 ~' -node-info() { - cd ~/ceremonyclient/node && ./${NODE_BINARY} -node-info && cd ~ -} -db-console() { - cd ~/ceremonyclient/node && ./${NODE_BINARY} --db-console && cd ~ -} - -balance() { - cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~ -} -alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat' -alias nstart='service ceremonyclient start' -alias nrestart='service ceremonyclient restart' -alias nstop='service ceremonyclient stop' +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-1.4.20-linux-amd64 -node-info && cd ~" +alias db-console="cd ~/ceremonyclient/node && ./node-1.4.20-linux-amd64 --db-console && cd ~" +alias balance="cd ~/ceremonyclient/node && ./node-1.4.20-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 | time_taken" +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"' \ No newline at end of file