-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreg.sh
165 lines (107 loc) · 4.99 KB
/
reg.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
156
157
158
159
160
161
162
163
164
165
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt upgrade -y
#go 1.13
sudo apt-get install -y golang-go make gcc python jq g++ build-essential
#Install regen
mkdir -p $GOPATH/src/github.com/regen
cd $GOPATH/src/github.com/regen
git clone -b v0.5.2 https://github.com/regen-network/regen-ledger
cd regen-ledger
make install
xrnd version --long
xrncli version --long
xrnd init --chain-id=algradigon-1 Moonlet
xrncli keys add moonlet
#get genesis
curl https://raw.githubusercontent.com/regen-network/testnets/master/algradigon-1/genesis.json > $HOME/.xrnd/config/genesis.json
#add peers
vi $HOME/.xrnd/config/config.toml
#seeds = "15ee12ae5fe8256ee94d1065e0000893e52532d9@regen-seed-eu.chorus.one:36656,ca130fd7ca16a957850a96ee9bdb74a351c4929f@regen-seed-us.chorus.one:36656"
ulimit -n 4096
https://github.com/regen-network/testnets
https://github.com/regen-network/testnets/blob/master/algradigon-1/upgrades/papua-upgrade-guide.md#configure-papua-upgrade
systemctl enable xrnd
systemctl start xrnd
journalctl -u xrnd -f --lines 50
xrncli keys show moonlet --bech=val
xrncli keys show moonlet
xrncli q account xrn:1czqefutujemr7cat6jxyvkeht26jkn2mdwf4z9 --chain-id algradigon-1
xrnd tendermint show-validator
xrnd tendermint show-address
xrncli tx staking create-validator --amount=9000000utree --pubkey=$(xrnd tendermint show-validator) --moniker="Moonlet" --chain-id=algradigon-1 --commission-rate="0.03" --commission-max-rate="0.20" --commission-max-change-rate="0.01" --min-self-delegation="1" --gas="auto" --from=moonlet
#see votes
xrncli query gov votes 4 --chain-id algradigon-1 -o json --node localhost:26657|jq
#vote to proposal 4
xrncli tx gov vote 4 yes --from=moonlet --trust-node --node=localhost:26657 --chain-id=algradigon-1
#cosmos Cosmos Account Address
#cosmospub Cosmos Account Public Key
#cosmosvalcons Cosmos Validator Consensus Address
#cosmosvalconspub Cosmos Validator Consensus Public Key
#cosmosvaloper Cosmos Validator Operator Address
#cosmosvaloperpub Cosmos Validator Operator Public Key
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 = "[email protected]: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])