-
Notifications
You must be signed in to change notification settings - Fork 9
/
v0.2.0-to-v0.3.0
68 lines (52 loc) · 2.3 KB
/
v0.2.0-to-v0.3.0
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
#!/bin/bash
# Enter user directory
cd ~ || exit
# Stop old titan program
apt install rsync
sudo systemctl stop titan
# Remove old titand program
sudo rm $(which titand)
# Download new programs
rm -rf /root/.titan/cosmovisor/genesis/bin/titand
wget -P /root https://github.com/Titannet-dao/titan-chain/releases/download/v0.3.0/titand_0.3.0-1_g167b7fd6.tar.gz
tar -xvzf /root/titand_0.3.0-1_g167b7fd6.tar.gz -C /root
rm -rf /root/titand_0.3.0-1_g167b7fd6.tar.gz
mv /root/titand_0.3.0-1_g167b7fd6/titand /root/.titan/cosmovisor/genesis/bin/
rm -rf /root/titand_0.3.0-1_g167b7fd6/
chmod +x /root/.titan/cosmovisor/genesis/bin/titand
# Back up the .titan directory. If something goes wrong in the middle, you can use the backup to restore and then execute again.
mv ~/.titan ~/titan_bak_test_3
# Copy directory and other information to the new path
rsync -av --exclude "data" ~/titan_bak_test_3/* ~/.titan
rm -rf /root/.titan/config/genesis.json
# Download new genesis file
curl -Ls https://raw.githubusercontent.com/hazennetworksolutions/titannetwork/refs/heads/main/genesis.json > $HOME/.titan/config/genesis.json
wget -P ~/. https://github.com/Titannet-dao/titan-chain/releases/download/v0.3.0/libwasmvm.x86_64.so
mv ~/libwasmvm.x86_64.so /usr/local/lib/libwasmvm.x86_64.so
sudo ldconfig
mkdir ~/.titan/data
# Build data/priv_validator_state.json 文件
echo '{
"height": "0",
"round": 0,
"step": 0
}' > ~/.titan/data/priv_validator_state.json
# Update config/client.toml chain-id
echo '# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
###############################################################################
### Client Configuration ###
###############################################################################
# The network chain ID
chain-id = "titan-test-4"
# The keyring s backend, where the keys are stored (os|file|kwallet|pass|test|memory)
keyring-backend = "os"
# CLI output format (text|json)
output = "json"
# <host>:<port> to Tendermint RPC interface for this chain
node = "tcp://localhost:29657"
# Transaction broadcasting mode (sync|async)
broadcast-mode = "sync"' > ~/.titan/config/client.toml
sudo systemctl daemon-reload
sudo systemctl restart titan
sudo journalctl -u titan.service -f --no-hostname -o cat