-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathakash.sh
More file actions
154 lines (104 loc) · 5.63 KB
/
akash.sh
File metadata and controls
154 lines (104 loc) · 5.63 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
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
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export PATH=$GOPATH/bin:$PATH" >> ~/.bashrc
#source ~/.bashrc
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt upgrade -y
#go 1.13
sudo apt-get install -y golang-go make gcc python jq liblz4-tool npm
sudo npm install pm2@latest -g
go get -d github.com/ovrclk/akash
cd $GOPATH/src/github.com/ovrclk/akash
make deps-install
make install
akash key list
akash query account
Deployment
==========
Deployment ID: 92f2f8ee927f6b6c0584cf58201594eff0430e3728d07118d2f73b4db81008dc
Deployment Groups(s): Group: global
Requirements:
Resources: Count: 1
Price: 500
CPU: 250
Memory: 536870912
Disk: 1000000000
Fulfillment(s): GROUP PRICE PROVIDER
1 27 a033e7b1768b2d05c26a71754c2811f6758b6f6434b1f5cbc2d7f25dbc2607e1
1 28 a34ee2789ba2e507656929c104e001d0cd42f3e7e5368672799397a9584a9b42
1 29 6eaef3c002f468c46de628705f010d837e5468e9ea43a3997968026b5b5584fb
Lease(s)
========
Lease ID: 92f2f8ee927f6b6c0584cf58201594eff0430e3728d07118d2f73b4db81008dc/1/2/6a3d63710e810f52937867ca805fd1295ece6f3770adeb69d78d8602d509c327
Services(s): NAME HOST(S) / IP(S) AVAILABLE TOTAL
web akash.moonlet.network 0 0
web 9mhww2nerqlzwvj9m9g7ps.akashdevnet1.kysenpool.io 0 0
web 147.75.74.207 0 0
git clone https://github.com/cosmos/cosmos-sdk.git
cd cosmos-sdk
git checkout v0.34.9; GO111MODULE=on; make install
gaiad version --long
gaiad init moonlet
#gaiad unsafe-reset-all
vi .gaiad/config/gaiad.toml
#minimum-gas-prices = "0.025uatom"
curl https://raw.githubusercontent.com/cosmos/launch/master/genesis.json > $HOME/.gaiad/config/genesis.json
wget http://quicksync.chainlayer.io/cosmos/cosmoshub-2.20190924.0605.tar.lz4
lz4 -d cosmoshub-2.20190924.0605.tar.lz4| tar xf -
#add seeds in .gaiad/config/config.toml
#seeds = "3e16af0cead27979e1fc3dac57d03df3c7a77acc@3.87.179.235:26656,ba3bacc714817218562f743178228f23678b2873@public-seed-node.cosmoshub.certus.one:26656"
#get seeds from https://github.com/cosmos/launch or https://github.com/cosmos/gaia/blob/master/docs/join-mainnet.md
gaiad tendermint show-validator
gaiad start
#show status, if caught up
gaiacli status|jq
#show keys
#show address and pk
gaiacli keys list
#see valoper keys
gaiacli keys show moonlet --bech=val
#create new key
gaiacli keys add moonlet
#
gaiacli q account cosmos1wk7cej3utkgxexktwlf20x7zlv4575w8kafq8k --chain-id gaia-13006
#get validatior cosmosvalconspub
gaiad tendermint show-validator
#get validator address
gaiad tendermint show-address
#see your account
gaiacli q account <cosmosvalconspub>
#create a validator
gaiacli tx staking create-validator --amount=1000000uatom --pubkey=$(gaiad tendermint show-validator) --moniker="moonlet" --chain-id=cosmoshub-2 --commission-rate="0.10" --commission-max-rate="0.20" --commission-max-change-rate="0.01" --min-self-delegation="1" --gas="auto" --gas-prices="0.025uatom" --from=moonlet
#verify you validator
gaiacli tx slashing unjail --from moonlet --chain-id=gaia-13006
#see all staking validators
gaiacli q staking validators --chain-id=gaia-13006
#get cosmosvaloper address
gaiacli keys show moonlet --bech=val
#delegate
gaiacli tx staking delegate cosmosvaloper 100muon --from account_name --gas auto --gas-adjustment 1.5 --chain-id=gaia-13006
#you should appear here
#https://hubble.figment.network/cosmos/chains/gaia-13006
#see all peers
curl -s http://localhost:26657/net_info |grep n_peers
#see valoper keys
gaiacli keys show moonlet --bech=val
#see validator details
gaiacli query staking validator cosmosvaloper --chain-id=gaia-1300
#check voting progress, jailed status, ..
gaiacli query slashing signing-info cosmosvalconspub --chain-id=gaia-13006
#check if validator is jailed
gaiacli q staking validator --validator cosmosvaloper... --trust-node
#unjail in case of downtime
gaiacli tx slashing unjail --from moonlet --chain-id=gaia-13006
#show voting. get address
curl 0:26657/consensus_state
#peers that i'm connected to
curl 0:26657/net_info
#byte_address can be found in priv_validator_key.json
# get my peer info. node_id@ip:port (node_id found using gaiad tendermint show-node-id)
# gaiad tendermint show-node-id
#check if you have voted
curl localhost:26657/consensus_state -s | grep $(gaiacli status | jq -r .validator_info.address[:12])