|
| 1 | +# Setting up a node |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
1 | 5 | mkdir -p ~/Downloads
|
2 | 6 | cd ~/Downloads
|
| 7 | +sudo apt-get install -y unzip |
3 | 8 |
|
4 |
| -# Download the binaries. |
5 |
| -wget https://github.com/InjectiveLabs/injective-chain-releases/releases/download/v0.4.17-1635998233/linux-amd64.zip |
| 9 | +## Using a snapshot for mainnet. |
6 | 10 |
|
7 |
| -# Unzip and add the binaries to the path. |
| 11 | +### Check out https://docs.injective.network/docs/staking/mainnet/validate-on-mainnet/sync-from-snapshot/ |
| 12 | + |
| 13 | +### Install awscli |
| 14 | +mkdir -p ~/Downloads |
| 15 | +cd ~/Downloads |
| 16 | +curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
| 17 | +unzip awscliv2.zip |
| 18 | +sudo ./aws/install |
| 19 | + |
| 20 | +### Download the snapshot without using any credentials. |
| 21 | +aws s3 sync --delete s3://injective-snapshots/mainnet/injectived/data /mnt/injective/data/ --no-sign-request |
| 22 | + |
| 23 | +### Download the latest binaries. |
| 24 | +export INJ_VER=v1.1.1-1636733798 ## Check for the latest at https://github.com/InjectiveLabs/injective-chain-releases/releases |
| 25 | +mkdir ~/Downloads/$INJ_VER |
| 26 | +cd ~/Downloads/$INJ_VER |
| 27 | +wget https://github.com/InjectiveLabs/injective-chain-releases/releases/download/$INJ_VER/linux-amd64.zip |
| 28 | + |
| 29 | +### Unzip and add the binaries to the path. |
8 | 30 | unzip linux-amd64.zip
|
9 | 31 | sudo mv -i injectived peggo injective-exchange /usr/bin
|
10 | 32 |
|
11 |
| -# Check the version. |
12 |
| -injectived version |
13 |
| -# Version dev (639589c) |
| 33 | +### Check the version. |
| 34 | +injectived version #Version dev (096cbe5) |
14 | 35 |
|
15 |
| -peggo version |
16 |
| -# Version dev (5c7638b) |
| 36 | +### Initialize a new chain node. |
| 37 | +./mainnet.sh |
| 38 | +injectived init $MONIKER --chain-id $CHAIN_ID |
17 | 39 |
|
18 |
| -injective-exchange version |
19 |
| -# Version dev (102daa7) |
| 40 | +### Complete preparations. |
| 41 | +cd ~/Downloads |
| 42 | +git clone https://github.com/InjectiveLabs/mainnet-config |
| 43 | +cp mainnet-config/10001/genesis.json ~/.injectived/config/genesis.json |
| 44 | +cp mainnet-config/10001/app.toml ~/.injectived/config/app.toml |
| 45 | +sha256sum ~/.injectived/config/genesis.json # 573b89727e42b41d43156cd6605c0c8ad4a1ce16d9aad1e1604b02864015d528 |
20 | 46 |
|
21 |
| -# Initialize a new chain node. |
22 |
| -export MONIKER=CloverStake |
23 |
| -injectived init $MONIKER --chain-id injective-888 |
| 47 | +### Update `persistent_peers` with the seeds value and `timeout_commit = 2500ms`. |
| 48 | +cat mainnet-config/10001/seeds.txt |
| 49 | +vi ~/.injectived/config/config.toml |
24 | 50 |
|
25 |
| -# Complete the preparations. |
26 |
| -git clone https://github.com/InjectiveLabs/testnet-config/ |
| 51 | +### Start syncing the node |
| 52 | +injectived start |
27 | 53 |
|
28 |
| -# copy genesis file to config directory |
29 |
| -cp testnet-config/staking/40017/genesis.json ~/.injectived/config/genesis.json |
| 54 | +## For testnet. |
| 55 | + |
| 56 | +### Download the binaries. |
| 57 | +export INJ_VER=v0.4.17-1635998233 |
| 58 | +mkdir ~/Downloads/$INJ_VER |
| 59 | +cd ~/Downloads/$INJ_VER |
| 60 | +wget https://github.com/InjectiveLabs/injective-chain-releases/releases/download/$INJ_VER/linux-amd64.zip |
| 61 | + |
| 62 | +### Unzip and add the binaries to the path. |
| 63 | +unzip linux-amd64.zip |
| 64 | +sudo mv -i injectived peggo injective-exchange /usr/bin |
| 65 | + |
| 66 | +### Check the version. |
| 67 | +injectived version # Version dev (639589c) |
| 68 | +peggo version # Version dev (5c7638b) |
| 69 | +injective-exchange version # Version dev (102daa7) |
30 | 70 |
|
31 |
| -# copy config file to config directory |
| 71 | +### Initialize a new chain node. |
| 72 | +./testnet.sh |
| 73 | +injectived init $MONIKER --chain-id $CHAIN_ID |
| 74 | + |
| 75 | +### Complete the preparations. |
| 76 | +git clone https://github.com/InjectiveLabs/testnet-config/ |
| 77 | +cp testnet-config/staking/40017/genesis.json ~/.injectived/config/genesis.json |
32 | 78 | cp testnet-config/staking/40017/app.toml ~/.injectived/config/app.toml
|
33 | 79 |
|
34 |
| -# Add seeds to `persistent_peers`. |
| 80 | +### Update `persistent_peers` with the seeds value and `timeout_commit = 1500ms`. |
35 | 81 | cat testnet-config/staking/40017/seeds.txt
|
36 | 82 | vi ~/.injectived/config/config.toml
|
37 | 83 |
|
38 |
| -# Change timeout_commit = 1500ms |
39 |
| -vi ~/.injectived/config/config.toml |
40 |
| - |
41 |
| -# Start the node. |
| 84 | +### Start syncing the node. |
42 | 85 | injectived start
|
43 | 86 |
|
44 |
| -# Create the validator account. |
| 87 | +### Create the validator account. |
45 | 88 | export VALIDATOR_KEY_NAME=validator-inj
|
46 | 89 | injectived keys add $VALIDATOR_KEY_NAME
|
47 | 90 | export VALIDATOR_ADDR=<>
|
48 | 91 | export VALIDATOR_PUBKEY=$(injectived tendermint show-validator)
|
49 | 92 |
|
50 |
| -# Copy the secret phase. |
| 93 | +### Copy the secret phase. |
51 | 94 |
|
52 |
| -# Transfer KINJ token to the validator account |
| 95 | +### Transfer KINJ token to the validator account |
53 | 96 |
|
54 |
| -# Check for balance. |
| 97 | +### Check for balance. |
55 | 98 | injectived q bank balances $VALIDATOR_ADDR
|
56 | 99 |
|
57 | 100 | # Create validator.
|
58 |
| -AMOUNT=30000000000000000000inj # 10inj |
| 101 | +AMOUNT=3000000000000000000inj # 3inj |
59 | 102 | MAX_CHANGE_RATE=0.1
|
60 | 103 | MAX_RATE=0.4
|
61 | 104 | RATE=0.05
|
62 |
| -MIN_SELF_DELEGATION=1000000000000000000inj |
| 105 | +MIN_SELF_DELEGATION=1000000000000000000 # 1inj |
63 | 106 | injectived tx staking create-validator \
|
64 | 107 | --moniker=$MONIKER \
|
65 | 108 | --amount=$AMOUNT \
|
66 | 109 | --pubkey=$VALIDATOR_PUBKEY \
|
67 | 110 | --from=$VALIDATOR_KEY_NAME \
|
68 |
| ---keyring-backend=file |
| 111 | +--keyring-backend=file \ |
69 | 112 | --node=tcp://localhost:26657 \
|
70 |
| ---chain-id=injective-888 \ |
| 113 | +---chain-id=$CHAIN_ID \ |
71 | 114 | --commission-max-change-rate=$MAX_CHANGE_RATE \
|
72 | 115 | --commission-max-rate=$MAX_RATE \
|
73 | 116 | --commission-rate=$RATE \
|
74 | 117 | --min-self-delegation=$MIN_SELF_DELEGATION
|
75 |
| - |
76 |
| -##### |
77 |
| -# Sync the node |
78 |
| -## Install awscli |
79 |
| -curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
80 |
| -unzip awscliv2.zip |
81 |
| -sudo ./aws/install |
| 118 | +--identity= |
| 119 | +--security-contact= |
| 120 | +--website= |
0 commit comments