Compare commits

..

209 Commits

Author SHA1 Message Date
f2c938231f 更新 quilibrium_for_dummies.sh 2024-11-24 20:28:40 +08:00
0xOzgur
2312eafac9 v2.0.4.1 2024-11-24 09:04:56 +03:00
0xOzgur
f3275c41b5 v2.0.4 2024-11-19 10:28:12 +03:00
0xOzgur
ff573b2a03 node-monitor added 2024-11-16 13:41:10 +03:00
0xOzgur
ecefd31235 v2.0.3.4 2024-11-13 23:57:25 +03:00
0xOzgur
a02b6eb574 qclient version fix 2024-11-12 12:59:24 +03:00
0xOzgur
209ad4660b node version 2.0.3.3 2024-11-12 12:58:37 +03:00
0xOzgur
c827fa90cf node version 2.0.3.2 2024-11-12 08:22:15 +03:00
0xOzgur
0823ee32ec node version 2.0.3.1 2024-11-11 08:40:08 +03:00
0xOzgur
7d5b487215 v2.0.3 2024-11-10 11:01:29 +03:00
0xOzgur
9b14d5a520 VERSION="2.0.3-b7-testnet" 2024-11-09 08:46:50 +03:00
0xOzgur
9125cffbaa git remove at Testnet 2024-11-08 14:31:30 +03:00
0xOzgur
988b8a887c VERSION="2.0.3-b6-testnet" 2024-11-08 14:24:39 +03:00
0xOzgur
a1451a909d version update 2024-11-08 12:03:35 +03:00
0xOzgur
d50cf856cd testnet update 2024-11-08 08:42:17 +03:00
0xOzgur
dcf3003f08 v2.0.2.4 2024-11-01 10:11:26 +03:00
0xOzgur
11f4113474 client download path changed 2024-10-30 00:30:38 +03:00
0xOzgur
f5cf64efc9 v2.0.2.3 2024-10-29 10:25:47 +03:00
0xOzgur
548702b50b translate 2024-10-28 19:08:45 +03:00
0xOzgur
c33614b635 adds 2024-10-28 19:08:01 +03:00
0xOzgur
48172426e0 increment check script 2024-10-28 00:58:49 +03:00
0xOzgur
c6d915c53e install bugfix 2024-10-27 18:31:26 +03:00
0xOzgur
5dc914c24a v2.0.2.2 2024-10-27 12:44:04 +03:00
0xOzgur
1ec19b3019 v2.0.2.1 2024-10-26 16:34:55 +03:00
0xOzgur
d57a356b90 Quickfix v2.0.2 2024-10-25 23:15:37 +03:00
0xOzgur
4d28144a55 v2.0.2 Update 2024-10-25 22:52:49 +03:00
0xOzgur
9ed4fa3d4e v2.0.1 2024-10-23 23:03:10 +03:00
0xOzgur
1f2eaa6975 testnet bugfix 2024-10-19 14:04:52 +03:00
0xOzgur
80aef0962a testnet script added 2024-10-19 13:55:23 +03:00
0xOzgur
6782c1e13d v2.0.0.8 2024-10-18 10:43:58 +03:00
0xOzgur
39aaf629a2 Node Version 2.0.0.7 2024-10-17 11:26:57 +03:00
0xOzgur
4afa56731b v2.0.0.6 2024-10-17 08:59:21 +03:00
0xOzgur
802ba45c34 v2.0.0.5 2024-10-17 08:02:15 +03:00
0xOzgur
72852c3cd7 v2.0.0.4 2024-10-16 01:50:58 +03:00
0xOzgur
787bab2286 v2.0.0.5 2024-10-16 01:11:30 +03:00
0xOzgur
ed4e3c6f22 v2.0.0.4 update 2024-10-16 00:03:45 +03:00
0xOzgur
db9661f08e bugfix 2024-10-15 21:28:13 +03:00
0xOzgur
53ab479a2a bugfix 2024-10-15 21:27:52 +03:00
0xOzgur
b026ae6b0b bugfix 2024-10-15 21:21:43 +03:00
0xOzgur
19bbde5494 profile update 2024-10-15 21:19:13 +03:00
0xOzgur
a34ad7f4fe VERSION="2.0.0.3"
qClientVERSION="2.0.0.2"
2024-10-15 08:45:10 +03:00
0xOzgur
8ea3d5a7c8 Merge branch 'main' of https://github.com/0xOzgur/QuilibriumAutoInstaller 2024-10-14 21:39:34 +03:00
0xOzgur
29552953a2 Node-2.0.0.2 qClient-2.0.0.1 update 2024-10-14 21:39:28 +03:00
0xOzgur
5332ed8b7b
Update quilibrium_for_dummies.sh 2024-10-14 19:41:05 +03:00
0xOzgur
e1796b286b Final cut 2024-10-14 13:59:08 +03:00
0xOzgur
7e4149e6de download binaries 2024-10-14 13:46:59 +03:00
0xOzgur
23f096aef3 node binary fix 2024-10-14 13:38:29 +03:00
0xOzgur
7183808a57 node path 2024-10-14 13:34:26 +03:00
0xOzgur
4dc6475dea service fix again 2024-10-14 13:34:10 +03:00
0xOzgur
d179135de5 service fix 2024-10-14 13:31:07 +03:00
0xOzgur
d0f4d5e192 Revert "service fix"
This reverts commit 90cd1450a0.
2024-10-14 13:30:37 +03:00
0xOzgur
90cd1450a0 service fix 2024-10-14 13:27:33 +03:00
0xOzgur
effb4a30d4 bugfix 2024-10-14 13:24:32 +03:00
0xOzgur
475a4d9b8b update.sh 2024-10-14 12:58:06 +03:00
0xOzgur
9df893b595 node binary fix 2024-10-14 12:43:30 +03:00
0xOzgur
bb5e7e28f5 qclient fix 2024-10-14 12:43:01 +03:00
0xOzgur
3c3a255250 release_autorun 2024-10-14 11:25:12 +03:00
0xOzgur
c4be2044bc fix 2024-10-14 11:16:54 +03:00
0xOzgur
1b6d04e02c baseurl fix 2024-10-14 11:15:05 +03:00
0xOzgur
b15a557596 osarch bugfix 2024-10-14 11:11:53 +03:00
0xOzgur
297423fc32
Merge pull request #27 from 0xOzgur/v2.0
V2.0
2024-10-14 11:10:13 +03:00
0xOzgur
159dc19467 Merge branch 'v2.0' of https://github.com/0xOzgur/QuilibriumAutoInstaller into v2.0 2024-10-14 11:09:48 +03:00
0xOzgur
448cc5d4c3 arch bugfix 2024-10-14 11:09:39 +03:00
0xOzgur
8e2e026010
Update README.md 2024-10-14 11:06:00 +03:00
0xOzgur
e5c57e3adf
Merge pull request #23 from 0xOzgur/v2.0
v2.0 Updates
2024-10-14 10:49:41 +03:00
0xOzgur
717709978b
Merge branch 'main' into v2.0 2024-10-14 10:49:30 +03:00
0xOzgur
67d41bfcb6 v2.0.0.1 2024-10-14 10:44:12 +03:00
0xOzgur
e5045d14f8 v2.0.0 update 2024-10-12 22:55:59 +03:00
0xOzgur
c8ea7a9e57
Merge pull request #26 from 0xOzgur/v1.4.21.1
service edit for SIGINT
2024-10-12 13:52:24 +03:00
0xOzgur
3b64d6b3b9 service update SIGINT 2024-10-11 21:39:04 +03:00
0xOzgur
928011a593 service edit for SIGINT 2024-10-11 21:25:48 +03:00
0xOzgur
d13ce008e7
Merge pull request #24 from 0xOzgur/v1.4.21.1
v1.4.21.1 Patch update
2024-08-22 12:22:50 +03:00
0xOzgur
c4b620e2ca
Merge branch 'main' into v1.4.21.1 2024-08-22 12:02:48 +03:00
0xOzgur
9615e8faa3 v1.4.21.1 Patch update 2024-08-22 11:57:47 +03:00
0xOzgur
34bd27e6ed v2.0 Updates 2024-08-07 14:26:26 +03:00
0xOzgur
f477c418d8
Merge pull request #22 from 0xOzgur/v1.4.21
v1.4.21 Updates
2024-07-05 12:53:05 +03:00
0xOzgur
ebaa722ebe v1.4.21 Updates 2024-07-05 12:18:32 +03:00
0xOzgur
b52472ef85 Merge branch 'main' of https://github.com/0xOzgur/QuilibriumAutoInstaller 2024-07-05 12:15:59 +03:00
0xOzgur
7225452f60 1.4.20.1 bugfix 2024-07-05 12:15:56 +03:00
0xOzgur
f234126431
Merge pull request #21 from 0xOzgur/v1.4.20.1
v1.4.20.1 Update
2024-06-29 23:14:12 +03:00
0xOzgur
d55c8a8487 v1.4.20.1 Update 2024-06-29 12:26:36 +03:00
0xOzgur
5704a6ce25 qclient fix 2024-06-22 11:45:05 +03:00
0xOzgur
2175c84b3e
Merge pull request #19 from 0xOzgur/v1.4.20
.profile fix
2024-06-22 11:43:19 +03:00
0xOzgur
b5bdda8901 .profile fix 2024-06-22 11:42:00 +03:00
0xOzgur
9d28327cb4
Merge pull request #18 from 0xOzgur/v1.4.20
V1.4.20 Update
2024-06-21 20:53:35 +03:00
0xOzgur
ee266e1528 .profile update 2024-06-21 17:28:17 +03:00
0xOzgur
b7351c9c6b .profile file update 2024-06-21 17:11:27 +03:00
0xOzgur
46897a04d3 update qclient 2024-06-21 17:05:58 +03:00
0xOzgur
1318ad6740 Added qClient installation based on releases 2024-06-21 16:48:48 +03:00
0xOzgur
1c0ecc9919 Added qClient variable 2024-06-21 16:48:31 +03:00
0xOzgur
71ed1dcd32 v1.4.20 Update 2024-06-21 16:39:33 +03:00
0xOzgur
449b50797d
Merge pull request #17 from 0xOzgur/v1.4.19.1
Version update -v1.4.19-p1
2024-06-15 19:06:03 +03:00
0xOzgur
adbd6cd7a2 Version update 2024-06-15 15:00:33 +03:00
0xOzgur
27901379a3
Update README.md
bugfix
2024-06-15 14:58:05 +03:00
0xOzgur
643923797e menu fix 2024-06-13 01:18:55 +03:00
0xOzgur
195ad00db1 git fix 2024-06-13 00:44:17 +03:00
0xOzgur
8419d50248 update fix 2024-06-12 22:24:49 +03:00
0xOzgur
627a44042a syntax fix 2024-06-12 22:01:21 +03:00
0xOzgur
c9c716a113 Foldering 2024-06-12 20:06:03 +03:00
0xOzgur
d2688fcd87 Variables update 2024-06-12 20:01:36 +03:00
0xOzgur
9b3ed5eed8 Updated github and branch 2024-06-12 19:59:12 +03:00
0xOzgur
4d3631d487 Updated with script links to protect compatibility 2024-06-12 19:58:22 +03:00
0xOzgur
31f88060c4 removed snapshot 2024-06-12 19:56:26 +03:00
0xOzgur
5adb5177f0 Install prerequisities 2024-06-12 19:13:29 +03:00
0xOzgur
8ce35b1746 Go version update 2024-06-09 21:34:30 +03:00
0xOzgur
fbff05db89 1.4.19 bugfix 2024-06-08 19:22:28 +03:00
0xOzgur
c7ae28405a
Merge pull request #16 from 0xOzgur/v1.4.19
V1.4.19 updates
2024-06-08 13:58:10 +03:00
0xOzgur
47bb92c6ce
Merge branch 'main' into v1.4.19 2024-06-08 13:57:42 +03:00
0xOzgur
240e1cfc8d Branch update for v.1.4.19 2024-06-08 13:44:51 +03:00
0xOzgur
e0120dac9c Menu fix 2024-06-08 10:50:43 +03:00
0xOzgur
136af1b15d menu fix 2024-06-08 10:50:10 +03:00
0xOzgur
57f852f1ac V19 ready 2024-06-07 19:52:18 +03:00
0xOzgur
a062172f1a Version info added 2024-06-07 19:51:22 +03:00
0xOzgur
c0ac0a4a46 Merge branch 'main' of https://github.com/0xOzgur/QuilibriumAutoInstaller 2024-06-07 15:46:00 +03:00
0xOzgur
c6f176abb2 gitignore 2024-06-07 15:45:52 +03:00
0xOzgur
a5e8832d8d
Merge pull request #15 from 0xLennyy/fix/cpulimit
Thank you @0xLennyy 
check cpulimit command
2024-06-07 15:39:01 +03:00
0xOzgur
7a00f8ffdf v1.4.19 update 2024-06-07 12:19:06 +03:00
0xOzgur
bc1eb08d58 backup 2024-06-07 12:16:46 +03:00
Lenny
fa3e82aa85 check cpulimit command 2024-06-07 14:14:50 +08:00
0xOzgur
956585ed4e gitignore 2024-06-07 00:13:01 +03:00
0xOzgur
2069841d2f bugfix and benchmark 2024-06-06 19:24:35 +03:00
0xOzgur
c4e00be250 welcome screen 2024-06-06 16:21:58 +03:00
0xOzgur
291dd31a57 Welcome screen 2024-06-06 16:19:05 +03:00
0xOzgur
f4c5e66ea6 menu fix 2024-06-06 16:13:54 +03:00
0xOzgur
681d806f30 menu test 2024-06-06 16:13:05 +03:00
0xOzgur
1c0d9586db Update version to v1.4.19 2024-06-06 01:18:57 +03:00
0xOzgur
d5b0c668c1 go binary rm fix 2024-06-05 09:52:13 +03:00
0xOzgur
bea51fe17b Remove existing Go 2024-06-05 09:51:13 +03:00
0xOzgur
de9542cb4d Merge branch 'main' of https://github.com/0xOzgur/QuilibriumAutoInstaller 2024-06-04 22:29:29 +03:00
0xOzgur
ece7cc99e7 info update 2024-06-04 22:29:26 +03:00
0xOzgur
ad0f459898
Update README.md 2024-06-04 20:08:59 +03:00
0xOzgur
176fbf4543 gitgit 2024-06-04 19:26:21 +03:00
0xOzgur
56d5307400 gitignore 2024-06-04 19:25:02 +03:00
0xOzgur
d1a428d0f6 gitignore 2024-06-04 19:21:37 +03:00
0xOzgur
4e1133546b gitignore 2024-06-04 19:20:29 +03:00
0xOzgur
8596cfea71 gitignore 2024-06-04 19:19:25 +03:00
0xOzgur
d2b4df7ad8 gitignore 2024-06-04 19:18:39 +03:00
0xOzgur
918a64a834 Merge branch 'main' of https://github.com/0xOzgur/QuilibriumAutoInstaller 2024-06-04 19:17:36 +03:00
0xOzgur
4f7d5c54aa visibility 2024-06-04 19:17:32 +03:00
0xOzgur
8687537cb5
Merge pull request #12 from teishahbc/patch-1
Update install_docker.sh
2024-06-03 03:34:19 +03:00
0xOzgur
42b9f2b650
Merge pull request #14 from ClarenceDan/main
Update install.sh
2024-06-03 03:32:25 +03:00
0xOzgur
346130533a
Merge branch 'main' into main 2024-06-03 03:32:05 +03:00
0xOzgur
c64153f427 expalanation prune 2024-06-03 00:28:13 +03:00
0xOzgur
55a3f761c1 Version variable fixed 2024-06-03 00:25:20 +03:00
0xOzgur
696f66a26a
Update README.md
Quilibrium for Dummies added
2024-06-02 23:36:05 +03:00
0xOzgur
e0bcb99a5a bugfix node logs 2024-06-02 23:13:49 +03:00
0xOzgur
0236ba0d3a Quilibrium For Dummies is ready 2024-06-02 22:59:19 +03:00
0xOzgur
d5ae8050a1 Added functions 2024-06-02 21:06:48 +03:00
0xOzgur
83060941d7 test 2024-06-02 20:54:10 +03:00
0xOzgur
b62a91cf2c test 2024-06-02 20:38:30 +03:00
0xOzgur
1ab7cd19b6 Check visibility added 2024-06-02 20:20:01 +03:00
0xOzgur
2d9a6a0749 bugfix 2024-06-02 20:16:39 +03:00
0xOzgur
b3ac438fc5 bugfix 2024-06-02 20:12:32 +03:00
0xOzgur
efc5e68875 Quilibrium.sh test 2024-06-02 20:04:17 +03:00
0xOzgur
13c8b7915b info edit 2024-06-02 17:49:26 +03:00
0xOzgur
233466c307 Info added-updated 2024-06-02 11:16:41 +03:00
0xOzgur
a14cb04925 Info added 2024-06-02 11:15:34 +03:00
0xOzgur
28ec70a7b2 final 2024-06-02 04:50:21 +03:00
0xOzgur
8765312b88 for dumies 2024-06-02 04:42:08 +03:00
0xOzgur
eef854aec6 fix 2024-06-02 04:30:32 +03:00
0xOzgur
6cf9a1617c Q Inc Bootstrap Peers 2024-06-02 04:29:18 +03:00
0xOzgur
39261ea361 decode 2024-06-02 04:27:50 +03:00
0xOzgur
ffb5e52aa7 visibility check script added 2024-06-02 04:20:15 +03:00
0xOzgur
bdc7dabda8 git fix 2024-06-02 03:40:26 +03:00
Clarence Dan
1060a4ee98
Update install.sh
stop service if ceremoyclient service exist to avoid threads conflict
add swapfile to avoid memory issue 
remove the exist service to rebuild service
add cpulimit for each worker to 95%
2024-06-01 10:53:08 +08:00
0xOzgur
8aeeab10cb 5second 2024-05-31 23:36:37 +03:00
0xOzgur
b625d27cea install gawk 2024-05-31 23:05:26 +03:00
0xOzgur
0a2d718f74 install cpulimit 2024-05-31 22:59:34 +03:00
0xOzgur
ab135eaed8
Merge pull request #13 from lamat1111/patch-3
Update update.sh
2024-05-31 22:32:20 +03:00
LaMat
e43d9c6036
Update update.sh
Added fixes to check the service files for changes to
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
and only edit if necessary

With now people customizing the service with CPUQUota and GOMAXPROCS, if we delete the service file we destroy user customizations!
2024-05-31 09:16:29 +02:00
0xOzgur
5cbcd5e2bf Agosts mirror added 2024-05-30 22:16:24 +03:00
0xOzgur
01afd16d83 agosts mirror repo added 2024-05-30 22:04:50 +03:00
teishahbc
69a594a187
Update install_docker.sh
ERROR: "docker buildx build" requires exactly 1 argument.
2024-05-30 17:02:13 +08:00
0xOzgur
8a1bc3bdcd https://source.quilibrium.com/quilibrium/ceremonyclient.git 2024-05-30 01:59:48 +03:00
0xOzgur
93b7d0396d .profile & .bash_profile nondependency of systems 2024-05-29 21:09:07 +03:00
0xOzgur
d41ee72b83
Merge pull request #10 from 0xOzgur/v1.4.18
Bug fix - Syntax
2024-05-29 16:41:49 +03:00
0xOzgur
1f151bba56
Merge pull request #9 from lamat1111/patch-2
Update install.sh
2024-05-29 16:40:11 +03:00
LaMat
7cc266b3bf
Update install.sh
missing " in EXEC_START="$NODE_PATH/release_autorun.sh
2024-05-29 15:01:45 +02:00
0xOzgur
40f35ee7b0
Update README.md 2024-05-29 12:04:40 +03:00
0xOzgur
ed3f3da764
Merge pull request #8 from 0xOzgur/v1.4.18
V1.4.18 autorun.sh
2024-05-29 11:49:03 +03:00
0xOzgur
1605b9760b
Merge pull request #6 from lenny7890/fix/docker
fix: sync move docker-compose.yml
@lenny7890 Thank you.
2024-05-29 11:46:46 +03:00
0xOzgur
f324b96234 remove debian script 2024-05-29 11:42:55 +03:00
0xOzgur
027c4ce037 converted to release_autorun 2024-05-29 11:16:34 +03:00
0xOzgur
a30a15962e autorun.sh implement 2024-05-29 10:57:02 +03:00
0xOzgur
e57c430c3a debian installer try 2024-05-29 09:30:17 +03:00
0xOzgur
5287bb53fe Install go and grpcurl added 2024-05-29 09:04:24 +03:00
Lenny
4db3cbd9be fix: sync move docker-compose.yml 2024-05-28 18:59:23 +08:00
0xOzgur
9fc67358f0
Merge pull request #4 from 0xOzgur/v1.4.18
not delete ceremonyclient
2024-05-27 02:38:08 +03:00
0xOzgur
70e8404239 not delete ceremonyclient 2024-05-27 02:37:31 +03:00
0xOzgur
c77c7d5bb0 add peer id to profile 2024-05-27 01:59:08 +03:00
0xOzgur
818226c0a6
Update README.md 2024-05-27 00:13:44 +03:00
0xOzgur
ca88976007
Update README.md 2024-05-27 00:13:25 +03:00
0xOzgur
40dc35a13b
Merge pull request #3 from 0xOzgur/v1.4.18
v.1.4.18 merged to Main
2024-05-26 17:31:57 +03:00
0xOzgur
3272158d76
Merge branch 'main' into v1.4.18 2024-05-26 17:31:36 +03:00
0xOzgur
351ecd112b gitignore 2024-05-26 17:26:09 +03:00
0xOzgur
0813c30b07 gitignore 2024-05-26 17:25:48 +03:00
0xOzgur
4be79f3706 gitignore 2024-05-26 17:25:23 +03:00
0xOzgur
0a0f6a3f8d Restructure and delete old files 2024-05-26 17:23:46 +03:00
0xOzgur
9d60332c45 typo 2024-05-26 17:14:14 +03:00
0xOzgur
9acf091d43
Merge pull request #1 from lamat1111/patch-1
Update install_quilibrium_service.sh - Merged
Thank you @lamat1111
2024-05-26 17:12:43 +03:00
0xOzgur
736f2f5385
Merge branch 'v1.4.18' into patch-1 2024-05-26 17:11:41 +03:00
0xOzgur
6df2c7e7dd
Merge pull request #2 from 0xOzgur/development
Code improvement
2024-05-26 17:02:10 +03:00
0xOzgur
04c635d88e
Merge branch 'v1.4.18' into development 2024-05-26 17:01:43 +03:00
0xOzgur
ec6b4cd464 check if service file exist 2024-05-26 16:50:01 +03:00
0xOzgur
b5341de1e6 implemented version 2024-05-26 16:39:40 +03:00
0xOzgur
5adf25d7a1 bugfix 2024-05-26 15:00:22 +03:00
0xOzgur
889b300c07 bugfix 2024-05-26 14:56:52 +03:00
0xOzgur
f098ae0f9d bugfix 2024-05-26 14:54:09 +03:00
LaMat
d6697b952e
Update install_quilibrium_service.sh
added
check if ceremonyclient folder exists and remove it
check if service file exists before trying to remove it
2024-05-25 18:26:18 +02:00
20 changed files with 1429 additions and 543 deletions

3
.gitignore vendored
View File

@ -9,4 +9,5 @@ backup/backup.sh
backup/backup_ozgur.sh
quilibrium_for_pros.sh
dataworker.py
balance.sh
balance.sh
rsync.sh

View File

@ -1,24 +1,40 @@
# QuilibriumAutoInstaller
Autoinstaller Script for Quilibrium as a Service
# Quilibrium Tools
copy the all files at root folder.
**Quilibrium for Dummies**
chmod u+x Install_Quilibrium_Service.sh
chmod u+x config.sh
chmod u+x update.sh
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
After first run, when you need to reach your node, you need to run only;
./quilibrium_for_dummies.sh
./Install_Quilibrium_Service.sh
After installing your node, kindly wait for 10-15minutes then run config.sh
./config.sh
**Autoinstaller Script for Quilibrium as a Service**
Do not forget go make
Use below command to install v2.0
source ~/.bashrc
and check
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/install/install_quilibrium_service.sh | bash
go version
**Autoupdater**
after installation.
If you need to update your node from previous version to 2.0, apply below command
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/update/update.sh | bash
For easy management of your nodes I created some shortcodes. You can import .profile or .bash_profile (Some Debian installations) file and source. Then you can easily query node related infos.
**Check Your Node Visibility**
You can check if your node sees Q Inc Bootstraps. If you don't see you most probably will not get any rewards.
wget -O - https://raw.githubusercontent.com/0xOzgur/QuilibriumTools/main/visibility_check.sh | bash

View File

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

196
increment_watch.sh Normal file
View File

@ -0,0 +1,196 @@
#!/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

@ -0,0 +1,156 @@
#!/bin/bash
# Set the version number
VERSION="2.0.4.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"
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"
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$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"
fi
else
echo "❌ Error: Unsupported system architecture ($ARCH) or operating system ($OS)."
exit 1
fi
echo "Installing prerequisites..."
sleep 1 # Add a 1-second delay
echo "Updating the machine"
echo "⏳Processing..."
sleep 1 # Add a 1-second delay
# Fof DEBIAN OS - Check if sudo and git is installed
# Step 1.1: Prepare Machine
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
# ınstall git if not installed
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
# Update the machine
sudo apt update
sudo apt upgrade -y
# Install cpu limit and gawk
apt install cpulimit -y
apt install gawk -y #incase it is not installed
# Download and install Go
wget https://go.dev/dl/$GO_BINARY || { echo "Failed to download Node! Exiting..."; exit_message; exit 1; }
sudo tar -xvf $GO_BINARY || { echo "Failed to extract Go! Exiting..."; exit_message; exit 1; }
sudo rm -rf /usr/local/go || { echo "Failed to remove existing Go! Exiting..."; exit_message; exit 1; }
sudo mv go /usr/local || { echo "Failed to move go! Exiting..."; exit_message; exit 1; }
sudo rm $GO_BINARY || { echo "Failed to remove downloaded archive! Exiting..."; exit_message; exit 1; }
# Set Go environment variables
echo "⏳Setting Go environment variables..."
sleep 2 # Add a 2-second delay
# Check if GOROOT is already set
if grep -q 'GOROOT=/usr/local/go' ~/.bashrc; then
echo "GOROOT already set in ~/.bashrc."
else
echo 'GOROOT=/usr/local/go' >> ~/.bashrc
echo "GOROOT set in ~/.bashrc."
fi
# Check if GOPATH is already set
if grep -q "GOPATH=$HOME/go" ~/.bashrc; then
echo "GOPATH already set in ~/.bashrc."
else
echo "GOPATH=$HOME/go" >> ~/.bashrc
echo "GOPATH set in ~/.bashrc."
fi
# Check if PATH is already set
if grep -q 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' ~/.bashrc; then
echo "PATH already set in ~/.bashrc."
else
echo 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bashrc
echo "PATH set in ~/.bashrc."
fi
# Source .bashrc to apply changes
echo "⏳Sourcing .bashrc to apply changes"
source ~/.bashrc
sleep 2 # Add a 2-second delay
# Check GO Version
go version
sleep 2 # Add a 2-second delay
# Install gRPCurl
echo "⏳Installing gRPCurl"
sleep 1 # Add a 1-second delay
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest

177
install/install.sh Normal file
View File

@ -0,0 +1,177 @@
#!/bin/bash -i
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 "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!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
# Check if ceremonyclient service exists and stop it if it does
if sudo systemctl status ceremonyclient &> /dev/null; then
echo "Ceremonyclient service found. Stopping..."
sudo service ceremonyclient stop
sleep 2 # Add a 2-second delay
fi
# Step 0: Increase Swap Space
if [ ! -d /swap ]; then
echo "Increasing swap space..."
sudo mkdir /swap
sudo fallocate -l 16G /swap/swapfile
sudo chmod 600 /swap/swapfile
sudo mkswap /swap/swapfile
sudo swapon /swap/swapfile
echo '/swap/swapfile swap swap defaults 0 0' | sudo tee -a /etc/fstab
else
echo "Swap space already exists, skipping swap increase..."
fi
# Step 1: Update and Upgrade the Machine
echo "Updating the machine"
echo "⏳Processing..."
sleep 2 # Add a 2-second delay
apt update
apt upgrade -y
apt install sudo -y
apt install git -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
# Installing Go 1.20.14
wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz
sudo tar -xvf go1.22.4.linux-amd64.tar.gz || { echo "Failed to extract Go! Exiting..."; exit_message; exit 1; }
sudo mv go /usr/local || { echo "Failed to move go! Exiting..."; exit_message; exit 1; }
sudo rm go1.22.4.linux-amd64.tar.gz || { echo "Failed to remove downloaded archive! Exiting..."; exit_message; exit 1; }
# Step 4: Set Go environment variables
echo "⏳Setting Go environment variables..."
sleep 5 # Add a 5-second delay
# Check if GOROOT is already set
if grep -q 'GOROOT=/usr/local/go' ~/.bashrc; then
echo "GOROOT already set in ~/.bashrc."
else
echo 'GOROOT=/usr/local/go' >> ~/.bashrc
echo "GOROOT set in ~/.bashrc."
fi
# Check if GOPATH is already set
if grep -q "GOPATH=$HOME/go" ~/.bashrc; then
echo "GOPATH already set in ~/.bashrc."
else
echo "GOPATH=$HOME/go" >> ~/.bashrc
echo "GOPATH set in ~/.bashrc."
fi
# Check if PATH is already set
if grep -q 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' ~/.bashrc; then
echo "PATH already set in ~/.bashrc."
else
echo 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bashrc
echo "PATH set in ~/.bashrc."
fi
# Source .bashrc to apply changes
echo "⏳Sourcing .bashrc to apply changes"
source ~/.bashrc
sleep 5 # Add a 5-second delay
# Check GO Version
go version
sleep 5 # Add a 5-second delay
# Install gRPCurl
echo "⏳Installing gRPCurl"
sleep 1 # Add a 1-second delay
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
# Download Ceremonyclient
echo "⏳Downloading Ceremonyclient"
sleep 1 # Add a 1-second delay
cd ~
if [ -d "ceremonyclient" ]; then
echo "Directory ceremonyclient already exists, skipping git clone..."
else
until git clone https://source.quilibrium.com/quilibrium/ceremonyclient.git || git clone https://git.quilibrium-mirror.ch/agostbiro/ceremonyclient.git; do
echo "Git clone failed, retrying..."
sleep 2
done
fi
cd ~/ceremonyclient/
git checkout release-cdn
# Build Ceremonyclient qClient
echo "⏳Building qCiient"
sleep 1 # Add a 1-second delay
cd ~/ceremonyclient/node
GOEXPERIMENT=arenas go build -o qclient main.go
# 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/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Create Ceremonyclient Service
echo "⏳Creating Ceremonyclient Service"
sleep 1 # Add a 1-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
[Unit]
Description=Ceremony Client Go App Service
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
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 Service"
sleep 1 # Add a 1-second delay
sudo service ceremonyclient start
# Step 8: See the logs of the ceremonyclient service
echo "🎉Welcome to Quilibrium Ceremonyclient"
echo "⏳Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 5 # Add a 5-second delay
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat

View File

@ -3,7 +3,7 @@
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur.eth"
echo "This script is made with ❤️ by 0xOzgur @ 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
@ -60,15 +60,18 @@ 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.18 .
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium:2.0 .2.0
# Step 8:Run Ceremonyclient Container
echo "✅Running Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker compose up -d
docker compose -f docker/docker-compose.yml up -d
# Step 9:Logs Ceremonyclient Container
echo "🎉Welcome to Quilibrium Ceremonyclient"
echo "⏳Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 5 # Add a 5-second delay
docker compose logs -f -n, --tail 100
docker compose -f docker/docker-compose.yml logs -f -n, --tail 100

View File

@ -1,17 +1,43 @@
#!/bin/bash -i
#!/bin/bash
# Set the version number
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
cd ~
# Step 0: Welcome
echo "This script is made with ❤️ by https://quilibrium.space @ 0xOzgur.eth"
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 "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!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
# Step 1: Update and Upgrade the Machine
sudo apt update
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
sudo apt install git -y
# Step 2: Adjust network buffer sizes
echo "Adjusting network buffer sizes..."
@ -27,51 +53,210 @@ else
fi
sudo sysctl -p
# Step 3:Download Ceremonyclient
# Step 3: Check if directory ~/ceremonyclient exists, download from github
if [ -d ~/ceremonyclient ]; then
# Check if backup directory ~/backup/qnode_keys exists, if not create it
if [ ! -d ~/backup/qnode_keys ]; then
mkdir -p ~/backup/qnode_keys
fi
# Check if files exist, then backup
if [ -f ~/ceremonyclient/node/.config/keys.yml ]; then
cp ~/ceremonyclient/node/.config/keys.yml ~/backup/qnode_keys/
echo "✅ Backup of keys.yml created in ~/backup/qnode_keys folder"
fi
if [ -f ~/ceremonyclient/node/.config/config.yml ]; then
cp ~/ceremonyclient/node/.config/config.yml ~/backup/qnode_keys/
echo "✅ Backup of config.yml created in ~/backup/qnode_keys folder"
fi
fi
# Step 4:Download Ceremonyclient
echo "⏳Downloading Ceremonyclient"
sleep 1 # Add a 1-second delay
cd ~
if [ -d "ceremonyclient" ]; then
echo "Directory ceremonyclient already exists, skipping git clone..."
else
until git clone https://source.quilibrium.com/quilibrium/ceremonyclient.git; do
until git clone https://github.com/QuilibriumNetwork/ceremonyclient.git || git clone https://source.quilibrium.com/quilibrium/ceremonyclient.git; do
echo "Git clone failed, retrying..."
sleep 2
done
fi
cd ~/ceremonyclient/
git checkout release-cdn
# 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
# Set the version number
VERSION="1.4.18"
#==========================
# NODE BINARY DOWNLOAD
#==========================
# Get the system architecture
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)
# 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
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
# 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/ceremonyclient/node"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Step4:Determine the ExecStart line based on the architecture
if [ "$ARCH" = "x86_64" ]; then
EXEC_START="$NODE_PATH/node-$VERSION-linux-amd64"
elif [ "$ARCH" = "aarch64" ]; then
EXEC_START="$NODE_PATH/node-$VERSION-linux-arm64"
elif [ "$ARCH" = "arm64" ]; then
EXEC_START="$NODE_PATH/node-$VERSION-darwin-arm64"
# Step 6:Create Ceremonyclient Service
echo "⏳ 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
echo "Unsupported architecture: $ARCH"
exit 1
# If the file does not exist, inform the user
echo "ceremonyclient.service file does not exist. No action taken."
fi
# Step5:Create Ceremonyclient Service
# Check if the ceremonyclient.service file exists
if [ -f /lib/systemd/system/ceremonyclient.service ]; then
# If it exists, remove it
sudo rm /lib/systemd/system/ceremonyclient.service
fi
sudo tee /lib/systemd/system/ceremonyclient.service > /dev/null <<EOF
[Unit]
Description=Ceremony Client Go App Service
@ -80,14 +265,25 @@ Description=Ceremony Client Go App Service
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=/root/ceremonyclient/node
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
KillSignal=SIGINT
TimeoutStopSec=75s
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
# Start the ceremonyclient service
sudo service ceremonyclient start
# Step 7: Start the ceremonyclient service
echo "✅Starting Ceremonyclient Service"
sleep 1 # Add a 1-second delay
sudo service ceremonyclient start
# Step 8: See the logs of the ceremonyclient service
echo "🎉Welcome to Quilibrium Ceremonyclient"
echo "⏳Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 5 # Add a 5-second delay
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat

173
install/testnet.sh Normal file
View File

@ -0,0 +1,173 @@
#!/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

98
node-monitor.sh Normal file
View File

@ -0,0 +1,98 @@
#!/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

@ -12,7 +12,7 @@ fi
export HISTTIMEFORMAT="%d/%m/%y %T "
# Shortcuts for General Management
alias e="exit"
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
@ -21,7 +21,28 @@ alias wttr='curl wttr.in'
neofetch
# 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-2.0-linux-amd64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-2.0-darwin-amd64'
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY='node-2.0-linux-arm64'
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY='node-2.0-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 ~'
@ -30,12 +51,13 @@ 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-1.4.18-linux-amd64 -node-info && cd ~'
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -balance && 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 ~'
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 nstop='service ceremonyclient stop'
alias benchmark='last_next_difficulty=$(journalctl -u ceremonyclient -ocat -n 100 | grep difficulty | awk -F'"'"'[:,}]'"'"' '"'"'{for(i=1;i<=NF;i++){if($i~"next_difficulty_metric"){gsub(/[ "]/,"",$i); print $(i+1)}}}'"'"' | tail -n 1) && cpus=$(nproc) && echo "" && echo "Your Benchmark Details" && echo "Difficulty: $last_next_difficulty" && echo "CPU(s): $cpus" && if [ $cpus -gt 0 ]; then difficulty_per_core=$(echo "scale=2; ($cpus*$cpus*1000)/$last_next_difficulty" | bc); echo "Score: $difficulty_per_core"; fi'

38
profile/.profile Normal file
View File

@ -0,0 +1,38 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n 2> /dev/null || true
# Shortcuts for General Management
alias e="exit"
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
alias myip='curl icanhazip.com'
alias wttr='curl wttr.in'
neofetch
# 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 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"

View File

@ -1,28 +0,0 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n 2> /dev/null || true
alias e="exit"
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
alias myip='curl icanhazip.com'
alias wttr='curl wttr.in'
neofetch
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 PeerManifests='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -node-info && cd ~'
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -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'

View File

@ -1,37 +0,0 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n 2> /dev/null || true
alias e="exit"
alias cm="ps -eo comm,pcpu --sort -pcpu | head -8; ps -eo comm,pmem --sort -pmem | head -8"
alias st='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3'
alias myip='curl icanhazip.com'
alias wttr='curl wttr.in'
neofetch
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 ~'
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.18-linux-amd64 -node-info && cd ~'
alias db-console='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 --db-console && cd ~'
alias balance='cd ~/ceremonyclient/node && ./node-1.4.18-linux-amd64 -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'

View File

@ -6,7 +6,10 @@ source ~/.bashrc
clear
# Set the version number
VERSION="1.4.20"
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
# Determine the ExecStart line based on the architecture
ARCH=$(uname -m)
@ -16,376 +19,62 @@ OS=$(uname -s)
if [ "$ARCH" = "x86_64" ]; then
if [ "$OS" = "Linux" ]; then
NODE_BINARY="node-$VERSION-linux-amd64"
GO_BINARY="go1.20.14.linux-amd64.tar.gz"
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.20.14.linux-amd64.tar.gz"
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.20.14.linux-arm64.tar.gz"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
elif [ "$OS" = "Darwin" ]; then
NODE_BINARY="node-$VERSION-darwin-arm64"
GO_BINARY="go1.20.14.linux-arm64.tar.gz"
GO_BINARY="go1.22.4.linux-arm64.tar.gz"
QCLIENT_BINARY="qclient-$qClientVERSION-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"
# Function for each menu option
install_prerequisites() {
echo "Installing prerequisites..."
sleep 1 # Add a 1-second delay
echo "Updating the machine"
echo "⏳Processing..."
sleep 1 # Add a 1-second delay
# Fof DEBIAN OS - Check if sudo and git is installed
# Step 1.1: Prepare Machine
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
# ınstall git if not installed
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
# Update the machine
sudo apt update
sudo apt upgrade -y
# Install cpu limit and gawk
apt install cpulimit -y
apt install gawk -y #incase it is not installed
# Download and install Go
wget https://go.dev/dl/$GO_BINARY || { echo "Failed to download Node! Exiting..."; exit_message; exit 1; }
sudo tar -xvf $GO_BINARY || { echo "Failed to extract Go! Exiting..."; exit_message; exit 1; }
sudo rm -rf /usr/local/go || { echo "Failed to remove existing Go! Exiting..."; exit_message; exit 1; }
sudo mv go /usr/local || { echo "Failed to move go! Exiting..."; exit_message; exit 1; }
sudo rm $GO_BINARY || { echo "Failed to remove downloaded archive! Exiting..."; exit_message; exit 1; }
# Set Go environment variables
echo "⏳Setting Go environment variables..."
sleep 2 # Add a 2-second delay
# Check if GOROOT is already set
if grep -q 'GOROOT=/usr/local/go' ~/.bashrc; then
echo "GOROOT already set in ~/.bashrc."
else
echo 'GOROOT=/usr/local/go' >> ~/.bashrc
echo "GOROOT set in ~/.bashrc."
fi
# Check if GOPATH is already set
if grep -q "GOPATH=$HOME/go" ~/.bashrc; then
echo "GOPATH already set in ~/.bashrc."
else
echo "GOPATH=$HOME/go" >> ~/.bashrc
echo "GOPATH set in ~/.bashrc."
fi
# Check if PATH is already set
if grep -q 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' ~/.bashrc; then
echo "PATH already set in ~/.bashrc."
else
echo 'PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bashrc
echo "PATH set in ~/.bashrc."
fi
# Source .bashrc to apply changes
echo "⏳Sourcing .bashrc to apply changes"
source ~/.bashrc
sleep 2 # Add a 2-second delay
# Check GO Version
go version
sleep 2 # Add a 2-second delay
# Install gRPCurl
echo "⏳Installing gRPCurl"
sleep 1 # Add a 1-second delay
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
echo ""
echo "⌛️ Preparing server with necessary apps and settings..."
wget --no-cache -O - "$PREREQUISITES_URL" | bash
}
# Install Node
install_node() {
echo "Installing node..."
# 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
# Check if directory ~/ceremonyclient exists, download from github
if [ -d ~/ceremonyclient ]; then
# Check if backup directory ~/backup/qnode_keys exists, if not create it
if [ ! -d ~/backup/qnode_keys ]; then
mkdir -p ~/backup/qnode_keys
fi
# Check if files exist, then backup
if [ -f ~/ceremonyclient/node/.config/keys.yml ]; then
cp ~/ceremonyclient/node/.config/keys.yml ~/backup/qnode_keys/
echo "✅ Backup of keys.yml created in ~/backup/qnode_keys folder"
fi
if [ -f ~/ceremonyclient/node/.config/config.yml ]; then
cp ~/ceremonyclient/node/.config/config.yml ~/backup/qnode_keys/
echo "✅ Backup of config.yml created in ~/backup/qnode_keys folder"
fi
fi
# Download Ceremonyclient
echo "⏳Downloading Ceremonyclient"
sleep 1 # Add a 1-second delay
cd ~
if [ -d "ceremonyclient" ]; then
echo "Directory ceremonyclient already exists, skipping git clone..."
else
until git clone https://source.quilibrium.com/quilibrium/ceremonyclient.git || git clone https://git.quilibrium-mirror.ch/agostbiro/ceremonyclient.git; do
echo "Git clone failed, retrying..."
sleep 2
done
fi
cd ~/ceremonyclient/
git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git || git remote set-url origin https://git.quilibrium-mirror.ch/agostbiro/ceremonyclient.git
git checkout release-cdn-cdn
# 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/release_autorun.sh"
# Create Ceremonyclient Service
echo "⏳ 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
[Unit]
Description=Ceremony Client Go App Service
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
# Start the ceremonyclient service
echo "✅Starting Ceremonyclient Service"
sleep 1 # Add a 1-second delay
sudo service ceremonyclient start
# See the logs of the ceremonyclient service
echo "🎉Welcome to Quilibrium Ceremonyclient"
echo ""
echo "⌛️ Installing node as a service..."
wget --no-cache -O - "$NODE_INSTALL_URL" | bash
}
configure_grpcurl() {
echo "Configuring grpcurl..."
line_exists() {
grep -qF "$1" "$2"
}
# Enable gRPC
echo "Enabling gRPC..."
cd "$HOME/ceremonyclient/node" || { echo "Failed to change directory to ~/ceremonyclient/node! Exiting..."; exit 1; }
# Check if the line listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337 exists
if ! line_exists "listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337" .config/config.yml; then
# Check if the line listenGrpcMultiaddr: "" exists
if line_exists "listenGrpcMultiaddr: \"\"" .config/config.yml; then
# Substitute listenGrpcMultiaddr: "" with listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337
sudo sed -i 's#^listenGrpcMultiaddr:.*$#listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337#' .config/config.yml || { echo "Failed to enable gRPC! Exiting..."; exit 1; }
else
# Add listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337
echo "listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337" | sudo tee -a .config/config.yml > /dev/null || { echo "Failed to enable gRPC! Exiting..."; exit 1; }
fi
else
echo "gRPC already enabled."
fi
# Check if the line listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338 exists
if ! line_exists "listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338" .config/config.yml; then
# Check if the line listenRESTMultiaddr: "" exists
if line_exists "listenRESTMultiaddr: \"\"" .config/config.yml; then
# Substitute listenRESTMultiaddr: "" with listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338
sudo sed -i 's#^listenRESTMultiaddr:.*$#listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338#' .config/config.yml || { echo "Failed to enable gRPC! Exiting..."; exit 1; }
else
# Add listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338
echo "listenRESTMultiaddr: /ip4/127.0.0.1/tcp/8338" | sudo tee -a .config/config.yml > /dev/null || { echo "Failed to enable gRPC! Exiting..."; exit 1; }
fi
else
echo "gRPC already enabled."
fi
# Enable Stats Collection
echo "Enabling Stats Collection..."
if ! line_exists " statsMultiaddr: \"/dns/stats.quilibrium.com/tcp/443\"" .config/config.yml; then
sudo sed -i '/^ *engine:/a\ statsMultiaddr: "/dns/stats.quilibrium.com/tcp/443"' .config/config.yml || { echo "Failed to enable Stats Collection! Exiting..."; exit 1; }
else
echo "Stats Collection already enabled."
fi
# Check if both lines were added successfully
if line_exists "listenGrpcMultiaddr: /ip4/127.0.0.1/tcp/8337" .config/config.yml && line_exists " statsMultiaddr: \"/dns/stats.quilibrium.com/tcp/443\"" .config/config.yml; then
echo "Success: The script successfully edited your config.yml file."
else
echo "ERROR: The script failed to correctly edit your config.yml file."
echo "You may want to follow the online guide to do it manually."
exit 1
fi
echo "gRPC calls setup was successful."
echo ""
echo "⌛️ Configuring grpCurl..."
wget --no-cache -O - "$GRPCURL_CONFIG_URL" | bash
}
update_node() {
echo "Updating node..."
service ceremonyclient stop
apt install cpulimit -y
apt install gawk -y #incase it is not installed
# Download Binary
echo "⏳ Downloading New Release v$VERSION"
cd ~/ceremonyclient
git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git || git remote set-url origin https://git.quilibrium-mirror.ch/agostbiro/ceremonyclient.git
git pull
git checkout release-cdn-cdn
# 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/release_autorun.sh"
# Re-Create Ceremonyclient Service
echo "⏳ Re-Creating Ceremonyclient Service"
sleep 2 # Add a 2-second delay
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
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
[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 service ceremonyclient start
# See the logs of the ceremonyclient service
echo "🎉 Welcome to Quilibrium Ceremonyclient v$VERSION"
echo ""
echo "⌛️ Updating node..."
wget --no-cache -O - "$NODE_UPDATE_URL" | bash
}
check_visibility() {
echo "⏳Processing..."
sleep 2 # Add a 2-second delay
# Bootstrap peer list
bootstrap_peers=(
"EiDpYbDwT2rZq70JNJposqAC+vVZ1t97pcHbK8kr5G4ZNA=="
"EiCcVN/KauCidn0nNDbOAGMHRZ5psz/lthpbBeiTAUEfZQ=="
"EiDhVHjQKgHfPDXJKWykeUflcXtOv6O2lvjbmUnRrbT2mw=="
"EiDHhTNA0yf07ljH+gTn0YEk/edCF70gQqr7QsUr8RKbAA=="
"EiAnwhEcyjsHiU6cDCjYJyk/1OVsh6ap7E3vDfJvefGigw=="
"EiB75ZnHtAOxajH2hlk9wD1i9zVigrDKKqYcSMXBkKo4SA=="
"EiDEYNo7GEfMhPBbUo+zFSGeDECB0RhG0GfAasdWp2TTTQ=="
"EiCzMVQnCirB85ITj1x9JOEe4zjNnnFIlxuXj9m6kGq1SQ=="
)
# Run the grpcurl command and capture its output
output=$(grpcurl -plaintext localhost:8337 quilibrium.node.node.pb.NodeService.GetNetworkInfo)
# Check if any of the specific peers are in the output
visible=false
for peer in "${bootstrap_peers[@]}"; do
if [[ $output == *"$peer"* ]]; then
visible=true
echo "You see $peer as a bootstrap peer"
else
echo "Peer $peer not found"
fi
done
if $visible ; then
echo "Great, your node is visible!"
else
echo "Sorry, your node is not visible. Please restart your node and try again."
fi
echo ""
echo "⌛️ Checking visibility..."
wget --no-cache -O - "$CHECK_VISIBILITY_URL" | bash
}
node_info() {
@ -397,7 +86,6 @@ node_info() {
node_logs() {
echo "Getting node logs..."
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat
# sudo journalctl -u ceremonyclient.service -n 100 --no-hostname -o cat
}
restart_node() {
@ -415,9 +103,8 @@ stop_node() {
# Menu
while true; do
clear
echo "This script is made with ❤️ by 0xOzgur.eth @ https://quilibrium.space"
echo "This script is made with ❤️ by 0xOzgur @ https://quilibrium.space"
echo "Welcome to Quilibrium for Dummies!"
echo "
_____ _ _ _ _ _
/ ___ \ (_) (_) | (_)
@ -450,10 +137,10 @@ echo "
echo ""
echo "Please choose an option:"
echo ""
echo "1) Install Prerequisites 5) Check Visibility 9) Stop Node"
echo "2) Install Node 6) Node Info e) Exit"
echo "3) Configure grpCurl 7) Node Logs "
echo "4) Update Node 8) Restart Node"
echo "1) Install Prerequisites 5) Check Visibility 9) Stop Node"
echo "2) Install Node 6) Node Info e) Exit"
echo "3) Configure grpCurl 7) Node Logs"
echo "4) Update Node 8) Restart Node"
echo ""
read -p "Enter your choice: " choice
@ -473,4 +160,4 @@ echo "
esac
echo ""
read -n 1 -s -r -p "Press any key to continue"
done
done

View File

@ -1,29 +1,213 @@
#!/bin/bash
# Set the version number
VERSION="1.4.20"
VERSION="2.0.4.1"
qClientVERSION="2.0.4.1"
# Step 0: Welcome
echo "This script is made with ❤️ by https://quilibrium.space @ 0xOzgur.eth for scalepod.io"
sleep 2 # Add a 2-second delay
echo "This script is made with ❤️ by 0xOzgur @ 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..."
sleep 5 # Add a 5-second delay
# Stop the ceremonyclient service
service ceremonyclient stop
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
# Step 1:Download Binary
# apt install cpulimit -y
# apt install gawk -y #incase it is not installed
# Download Binary
echo "⏳ Downloading New Release v$VERSION"
cd ~/ceremonyclient
git remote set-url origin https://github.com/QuilibriumNetwork/ceremonyclient.git
git checkout main
git branch -D release
git pull
git checkout release-cdn
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)
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
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
# 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/release_autorun.sh"
EXEC_START="$NODE_PATH/$NODE_BINARY"
# Step 6:Create Ceremonyclient Service
echo "⏳ 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
# Step 3:Re-Create Ceremonyclient Service
rm /lib/systemd/system/ceremonyclient.service
sudo tee /lib/systemd/system/ceremonyclient.service > /dev/null <<EOF
[Unit]
Description=Ceremony Client Go App Service
@ -34,15 +218,22 @@ Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
KillSignal=SIGINT
TimeoutStopSec=75s
[Install]
WantedBy=multi-user.target
EOF
# Step 3: Update the ExecStart line in the Ceremonyclient Service file
# sudo sed -i "s|ExecStart=.*|ExecStart=$EXEC_START|" /lib/systemd/system/ceremonyclient.service
# Step 4:Start the ceremonyclient service
# Start the ceremonyclient service
echo "✅ Starting Ceremonyclient Service"
sleep 2 # Add a 2-second delay
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
sudo service ceremonyclient start
sudo systemctl start ceremonyclient
# 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
sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat

View File

@ -1,8 +1,10 @@
#!/bin/bash
# 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.18!"
echo "This script is made with ❤️ by 0xOzgur"
echo "⏳Enjoy and sit back while you are upgrading your Quilibrium Node to v2.0!"
echo "⏳Processing..."
sleep 10 # Add a 10-second delay
@ -10,7 +12,9 @@ sleep 10 # Add a 10-second delay
service ceremonyclient stop
# Step 1:Download Binary
echo "⏳ Downloading New Release v1.4.18"
echo "⏳ Downloading New Release v2.0"
cd ~/ceremonyclient
git pull
git checkout release-cdn
@ -18,15 +22,17 @@ 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.18 .
docker build --build-arg GIT_COMMIT=$(git log -1 --format=%h) -t quilibrium -t quilibrium:2.0 .
# Step 8:Run Ceremonyclient Container
echo "✅Running Ceremonyclient Container"
sleep 2 # Add a 2-second delay
docker compose up -d
docker compose -f docker/docker-compose.yml up -d
# Step 9:Logs Ceremonyclient Container
echo "🎉Welcome to Quilibrium Ceremonyclient"
echo "⏳Please let it flow node logs at least 5 minutes then you can press CTRL + C to exit the logs."
sleep 5 # Add a 5-second delay
docker compose logs -f -n, --tail 100
docker compose -f docker/docker-compose.yml logs -f -n, --tail 100

View File

@ -1,49 +0,0 @@
#!/bin/bash
# Set the version number
VERSION="1.4.18"
# Step 0: Welcome
echo "This script is made with ❤️ by https://quilibrium.space @ 0xOzgur.eth for scalepod.io"
sleep 2 # Add a 2-second delay
# Stop the ceremonyclient service
service ceremonyclient stop
# Step 1:Download Binary
cd ~/ceremonyclient
git remote set-url origin https://source.quilibrium.com/quilibrium/ceremonyclient.git
git pull
git checkout release-cdn
# 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-$VERSION-linux-arm64"
# Step 3:Re-Create Ceremonyclient Service
rm /lib/systemd/system/ceremonyclient.service
sudo tee /lib/systemd/system/ceremonyclient.service > /dev/null <<EOF
[Unit]
Description=Ceremony Client Go App Service
[Service]
Type=simple
Restart=always
RestartSec=5s
WorkingDirectory=$NODE_PATH
ExecStart=$EXEC_START
[Install]
WantedBy=multi-user.target
EOF
# Step 3: Update the ExecStart line in the Ceremonyclient Service file
# sudo sed -i "s|ExecStart=.*|ExecStart=$EXEC_START|" /lib/systemd/system/ceremonyclient.service
# Step 4:Start the ceremonyclient service
sudo systemctl daemon-reload
sudo systemctl enable ceremonyclient
sudo service ceremonyclient start

40
visibility_check.sh Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Step 0: Welcome
echo "This script is made with ❤️ by 0xOzgur @ 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..."
sleep 5 # Add a 5-second delay
# Bootstrap peer list
bootstrap_peers=(
"EiDpYbDwT2rZq70JNJposqAC+vVZ1t97pcHbK8kr5G4ZNA=="
"EiCcVN/KauCidn0nNDbOAGMHRZ5psz/lthpbBeiTAUEfZQ=="
"EiDhVHjQKgHfPDXJKWykeUflcXtOv6O2lvjbmUnRrbT2mw=="
"EiDHhTNA0yf07ljH+gTn0YEk/edCF70gQqr7QsUr8RKbAA=="
"EiAnwhEcyjsHiU6cDCjYJyk/1OVsh6ap7E3vDfJvefGigw=="
"EiB75ZnHtAOxajH2hlk9wD1i9zVigrDKKqYcSMXBkKo4SA=="
"EiDEYNo7GEfMhPBbUo+zFSGeDECB0RhG0GfAasdWp2TTTQ=="
"EiCzMVQnCirB85ITj1x9JOEe4zjNnnFIlxuXj9m6kGq1SQ=="
)
# Run the grpcurl command and capture its output
output=$(grpcurl -plaintext localhost:8337 quilibrium.node.node.pb.NodeService.GetNetworkInfo)
# Check if any of the specific peers are in the output
visible=false
for peer in "${bootstrap_peers[@]}"; do
if [[ $output == *"$peer"* ]]; then
visible=true
echo "You see $peer as a bootstrap peer"
else
echo "Peer $peer not found"
fi
done
if $visible ; then
echo "Great, your node is visible!"
else
echo "Sorry, your node is not visible. Please restart your node and wait 15 minutes then try again."
fi