-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.polkacli
28 lines (24 loc) · 1.94 KB
/
.polkacli
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
# Validator service
alias edit="sudo micro /etc/systemd/system/ksm-validator.service"
alias enable="sudo systemctl enable ksm-validator.service"
alias disable="sudo systemctl disable ksm-validator.service"
alias start="sudo systemctl start ksm-validator.service"
alias stop="sudo systemctl stop ksm-validator.service"
alias status="sudo systemctl status ksm-validator.service"
alias reload="sudo systemctl daemon-reload"
alias restart="sudo systemctl restart ksm-validator.service"
# Logs CentOS/Rocky
alias logsnow="sudo tail -f /var/log/messages"
alias logs="sudo tail -1000 /var/log/messages"
# Updating polkadot client
alias version="polkadot --version"
alias download="curl -s https://api.github.com/repos/paritytech/polkadot/releases/latest | jq -r '.assets[] | select(.name | endswith(\"polkadot\")) | .browser_download_url' | xargs sudo curl -L -o polkadot_latest && sudo chmod +x polkadot_latest && ./polkadot_latest --version"
alias update="stop && sudo cp polkadot_latest /usr/local/bin/polkadot && start"
alias scriptupdate='git clone https://github.com/kusamaxi/polkacli ~/polkacli && mv ~/polkacli/.polkacli ~/.polkacli && source ~/.bashrc && rm -rf ~/polkacli'
# Installing polkashots (https://ksm-rocksdb.polkashots.io/)
alias shotdl="wget https://ksm-rocksdb.polkashots.io/snapshot -O ~/kusama.RocksDb.tar.lz4"
alias shotupdate="stop || rm -rf ~/.local/share/polkadot && mkdir -p ~/.local/share/polkadot/chains/ksmcc3 && lz4 -c -d kusama.RocksDb.tar.lz4 | tar -x -C ~/.local/share/polkadot/chains/ksmcc3 && start"
alias shotdel="rm -v ~/kusama.RocksDb.tar.lz4"
# RPC-commands(advanced)
alias rotatekeys='curl -H "Content-Type: application/json" -d '\''{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}'\'' http://localhost:9933 >> ~/sessionkeys.log && tail -1 ~/sessionkeys.log'
alias epochauthorship='curl -H "Content-Type: application/json" -d '\''{"id":1, "jsonrpc":"2.0", "method": "babe_epochAuthorship", "params":[]}'\'' http://localhost:9933'