-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHAQQ
More file actions
121 lines (89 loc) · 3.43 KB
/
HAQQ
File metadata and controls
121 lines (89 loc) · 3.43 KB
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
sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git wget jq make gcc tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
ver="1.18.2" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
git clone https://github.com/haqq-network/haqq.git
cd haqq
make install
chmod +x /root/go/bin/haqqd && sudo mv /root/go/bin/haqqd /usr/local/bin/haqqd
cd $HOME
MONIKER="your_name"
CHAIN="haqq_53211-1"
WALLET_NAME="your_name"
echo 'export MONIKER='${MONIKER} >> $HOME/.bash_profile
echo 'export CHAIN='${CHAIN} >> $HOME/.bash_profile
echo 'export WALLET_NAME='${WALLET_NAME} >> $HOME/.bash_profile
source $HOME/.bash_profile
haqqd init $MONIKER --chain-id $CHAIN
haqqd config chain-id $CHAIN
curl -OL https://storage.googleapis.com/haqq-testedge-snapshots/genesis.json
mv genesis.json $HOME/.haqqd/config/genesis.json
haqqd validate-genesis
haqqd tendermint unsafe-reset-all --home $HOME/.haqqd
curl -OL https://raw.githubusercontent.com/haqq-network/testnets/main/TestEdge/state_sync.sh
chmod +x state_sync.sh
./state_sync.sh
pruning="custom" && \
pruning_keep_recent="100" && \
pruning_keep_every="0" && \
pruning_interval="50" && \
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.haqqd/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.haqqd/config/app.toml && \
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.haqqd/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.haqqd/config/app.toml
indexer="null" && \
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.haqqd/config/config.toml
sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=haqqd
After=network-online.target
[Service]
User=$USER
ExecStart=$(which haqqd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && \
sudo systemctl enable haqqd && \
sudo systemctl restart haqqd
Logs
sudo journalctl -u haqqd -f -o cat
Sync
curl localhost:26657/status
haqqd keys add $WALLET_NAME
haqqd keys add $WALLET_NAME --recover
WALLET_ADDRESS=$(haqqd keys show $WALLET_NAME -a)
echo 'export WALLET_ADDRESS='${WALLET_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
haqqd debug addr wallet_haqq
EIP-55
haqqd query bank balances $WALLET_ADDRESS
haqqd tx staking create-validator \
--amount=980000000000000000aISLM \
--pubkey=$(haqqd tendermint show-validator) \
--moniker=$MONIKER \
--chain-id=haqq_53211-1 \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--gas="auto" \
--from=$WALLET_NAME \
--node https://rpc.tm.testedge.haqq.network:443
VALOPER=$(haqqd keys show $WALLET_ADDRESS --bech val -a)
echo 'export VALOPER='${VALOPER} >> $HOME/.bash_profile
source $HOME/.bash_profile
Validator status
haqqd query staking validator $VALOPER
haqqd tx staking delegate $VALOPER 1000000aISLM --from $WALLET_NAME --chain-id $CHAIN
Ujail
haqqd tx slashing unjail --from $WALLET_NAME --chain-id $CHAIN