forked from alpha-omega-labs/genesis-ethermint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenesisd-node.sh
155 lines (126 loc) · 6.7 KB
/
genesisd-node.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/bash
cat << "EOF"
/$$$$$$ /$$ /$$ /$$
/$$__ $$ |__/ | $$ /$$$$
| $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$ | $$ |_ $$
| $$ /$$$$ /$$__ $$| $$__ $$ /$$__ $$ /$$_____/| $$ /$$_____/ | $$ | $$
| $$|_ $$| $$$$$$$$| $$ \ $$| $$$$$$$$| $$$$$$ | $$| $$$$$$ | $$ | $$
| $$ \ $$| $$_____/| $$ | $$| $$_____/ \____ $$| $$ \____ $$ | $$ | $$
| $$$$$$/| $$$$$$$| $$ | $$| $$$$$$$ /$$$$$$$/| $$ /$$$$$$$/ | $$$$$$$$ /$$$$$$
\______/ \_______/|__/ |__/ \_______/|_______/ |__/|_______/ |________/|______/
/$$ /$$ /$$$$$$$$ /$$$$$$ /$$ /$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$
| $$$ | $$| $$_____/ /$$__ $$| $$ |_ $$_/|__ $$__/| $$ | $$|_ $$_/ /$$__ $$
| $$$$| $$| $$ | $$ \ $$| $$ | $$ | $$ | $$ | $$ | $$ | $$ \__/
| $$ $$ $$| $$$$$ | $$ | $$| $$ | $$ | $$ | $$$$$$$$ | $$ | $$
| $$ $$$$| $$__/ | $$ | $$| $$ | $$ | $$ | $$__ $$ | $$ | $$
| $$\ $$$| $$ | $$ | $$| $$ | $$ | $$ | $$ | $$ | $$ | $$ $$
| $$ \ $$| $$$$$$$$| $$$$$$/| $$$$$$$$ /$$$$$$ | $$ | $$ | $$ /$$$$$$| $$$$$$/
|__/ \__/|________/ \______/ |________/|______/ |__/ |__/ |__/|______/ \______/
/$$$$$$$$
| $$_____/
| $$ /$$$$$$ /$$$$$$
| $$$$$ /$$__ $$|____ $$
| $$__/ | $$ \__/ /$$$$$$$
| $$ | $$ /$$__ $$
| $$$$$$$$| $$ | $$$$$$$
|________/|__/ \_______/
Welcome to the decentralized blockchain Renaissance, above money & beyond cryptocurrency!
This script should install genesis_29-2 blockchain full node while running under root user.
GENESIS L1 is a highly experimental decentralized project, provided AS IS, with NO WARRANTY.
GENESIS L1 IS A NON COMMERCIAL OPEN DECENRALIZED BLOCKCHAIN PROJECT RELATED TO SCIENCE AND ART
Mainnet EVM chain ID: 29
Cosmos chain ID: genesis_29-2
Blockchain utilitarian coin: L1
Min. coin unit: el1
1 L1 = 1 000 000 000 000 000 000 el1
Initial supply: 21 000 000 L1
genesis_29-2 circulation: ~22 000 000 L1
Mint rate: < 20% annual
Block target time: ~5s
Binary name: genesisd
genesis_29-1 start: Nov 30, 2021
genesis_29-2 start: Apr 16, 2022
EOF
sleep 15s
# SYSTEM UPDATE, INSTALLATION OF THE FOLLOWING PACKAGES: jq git wget make gcc build-essential snapd wget ponysay, INSTALLATION OF GO 1.17 via snap
sudo apt-get update -y
sudo apt-get install jq git wget make gcc build-essential snapd wget -y
snap install --channel=1.17/stable go --classic
export PATH=$PATH:$(go env GOPATH)/bin
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
# GLOBAL CHANGE OF OPEN FILE LIMITS
echo "* - nofile 50000" >> /etc/security/limits.conf
echo "root - nofile 50000" >> /etc/security/limits.conf
echo "fs.file-max = 50000" >> /etc/sysctl.conf
ulimit -n 50000
#PONYSAY
snap install ponysay
sleep 5s
ponysay "BE READY TO WRITE DOWN AND REMEMBER YOUR NEW SECRET SEED PHRASE GENERATED WITH THIS SCRIPT FOR YOUR NEW KEY NAMED *mygenesiskey* AND PASSWORDS FOR IT"
sleep 5s
ponysay "Installing genesisd from source code with updated genesis_29-2 mainnet!"
sleep 5s
ponysay "WARNING: cosmosvisor, evmosd processes will be killed and genesis, genesisd, evmos, evmosd system services will be stopped with this script on the next step. If you have other blockchains running, you might want to delete those parts of the script!"
sleep 20s
#STOPPING EVMOSD DAEMON AND COSMOVISOR IF IT WAS NOT STOPPED
pkill evmosd
pkill cosmovisor
service genesis stop
service genesisd stop
service evmos stop
service evmosd stop
# BACKUP PREVIOUS .genesisd
cd
rsync -r --verbose --exclude 'data' ./.genesisd/ ./.genesisd_backup/
# DELETING OF .genesisd FOLDER (PREVIOUS INSTALLATIONS)
cd
rm -r .genesisd
# BUILDING genesisd BINARIES
cd genesisd
make install
export PATH=$PATH:$(go env GOPATH)/bin
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
# SETTING CONFIG AND NEW KEYS
genesisd config chain-id genesis_29-2
genesisd config keyring-backend os
ponysay "IN A FEW MOMENTS GET READY TO WRITE YOUR SECRET SEED PHRASE FOR YOUR NEW KEY NAMED *mygenesiskey*, YOU WILL HAVE 2 MINUTES FOR THIS!!!"
sleep 20s
genesisd keys add mygenesiskey --keyring-backend os --algo eth_secp256k1
sleep 120s
genesisd init $1 --chain-id genesis_29-2
#IMPORTING THE GENESIS STATE
cd
cd .genesisd/config
rm -r genesis.json
wget https://github.com/alpha-omega-labs/genesisd/raw/neolithic/genesis_29-1-state/genesis.json
cd
# RESET TO IMPORTED genesis.json
genesisd unsafe-reset-all
# ADD PEERS, ADJUST SETTINGS
cd
cd .genesisd/config
sed -i 's/seeds = ""/seeds = "[email protected]:26656"/' config.toml
sed -i 's/persistent_peers = ""/persistent_peers = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"/' config.toml
sed -i 's/minimum-gas-prices = "0aphoton"/minimum-gas-prices = "0el1"/g' app.toml
sed -i '212s/.*/enable = false/' app.toml
# STARTING genesisd AS A SERVICE
cd
cd /etc/systemd/system
rm -r genesis.service
wget https://raw.githubusercontent.com/alpha-omega-labs/genesisd/neolithic/genesisd.service
systemctl daemon-reload
systemctl enable genesisd.service
echo All set!
sleep 3s
# STARTING NODE
cat << "EOF"
\\
\\_
.---(')
o( )_-\_
Node start
EOF
sleep 5s
service genesisd start
# genesisd start
ponysay "genesisd node service started, you may try *service genesisd status* command to see it! Welcome to the GenesisL1 blockchain! After the full sync you can start validator! Full sync should take 30min to 6h depending on Internet Connectio!"