Skip to content

Commit b53af3d

Browse files
anilcseSai Kumar
and
Sai Kumar
authored
Add mainnet script & gentx instructions (#1)
* added one week time interval for vesting accounts * Init * Fix build issues * refactor: refactored the code as per passage3d * Fix gen genesis Co-authored-by: Sai Kumar <[email protected]>
1 parent 834c49b commit b53af3d

40 files changed

+6721
-2
lines changed

.github/workflows/go.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.15
20+
21+
- name: Build
22+
run: go build -v ./...
23+
24+
- name: Test
25+
run: go test -v ./...

.github/workflows/validate-gentx.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Gentx
2+
on: [pull_request]
3+
jobs:
4+
validate-gentx:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install Go
8+
uses: actions/[email protected]
9+
with:
10+
go-version: 1.15.6
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Display go version
14+
run: go version
15+
- name: validate-gentx
16+
run: |
17+
bash -x ./scripts/validate-gentx.sh

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.idea/
12
# Binaries for programs and plugins
23
*.exe
34
*.exe~

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
all: passage-1
2+
3+
.PHONY: passage-1
4+
5+
passage-1:
6+
go run . build-genesis passage-1
7+
mv -f passage-1/genesis.json passage-1/genesis-prelaunch.json
8+
bash -x ./scripts/gen-genesis.sh

README.md

+120-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,120 @@
1-
# mainnet
2-
Passage3d mainnet repository
1+
# Passage3D Mainnet
2+
3+
This code is inspired from Regen Network's mainnet script
4+
5+
## Building genesis.json (For admin use)
6+
7+
Execute:
8+
```shell
9+
go run . build-genesis passage-1
10+
```
11+
12+
For pre-launch, we can ignore errors:
13+
14+
```shell
15+
go run . build-genesis passage-prelaunch-1 --errors-as-warnings
16+
```
17+
18+
## Join as a validator
19+
20+
### Requirements
21+
22+
Check out these [instructions](./passage-1/README.md#Requirements) for installing `[email protected]`
23+
24+
If you haven't initialized your node, init passage chain by running
25+
26+
```sh
27+
passage init --chain-id passage-1 <my_node_moniker>
28+
```
29+
30+
### Start your validator node
31+
32+
- Step-1: Verify installation
33+
```sh
34+
passage version --long
35+
```
36+
37+
it should display the following details:
38+
```sh
39+
name: passage
40+
server_name: passage
41+
version: v1.0.0
42+
commit: 1b7c80ef102d3ae7cc40bba3ceccd97a64dadbfd
43+
build_tags: netgo,ledger
44+
go: go version go1.15.6 linux/amd64
45+
```
46+
47+
- Step-2: Download the mainnet genesis
48+
```sh
49+
curl -s https://raw.githubusercontent.com/envadiv/mainnet/main/passage-1/genesis.json > ~/.passage/config/genesis.json
50+
```
51+
52+
- Step-3: Verify genesis
53+
```sh
54+
jq -S -c -M '' ~/.passage/config/genesis.json | shasum -a 256
55+
```
56+
It should be equal to the contents in [checksum](passage-1/checksum.txt)
57+
58+
- Step-4: Update seeds and persistent peers
59+
60+
Open `~/.passage/config/config.toml` and update `persistent_peers` and `seeds` (comma separated list)
61+
#### Persistent peers
62+
```sh
63+
64+
```
65+
#### Seeds
66+
```sh
67+
68+
```
69+
70+
- Step-5: Create systemd
71+
```sh
72+
DAEMON_PATH=$(which passage)
73+
74+
echo "[Unit]
75+
Description=passage daemon
76+
After=network-online.target
77+
[Service]
78+
User=${USER}
79+
ExecStart=${DAEMON_PATH} start
80+
Restart=always
81+
RestartSec=3
82+
LimitNOFILE=4096
83+
[Install]
84+
WantedBy=multi-user.target
85+
" >passage.service
86+
```
87+
88+
- Step-6: Update system daemon and start passage node
89+
90+
```
91+
sudo mv passage.service /lib/systemd/system/passage.service
92+
sudo -S systemctl daemon-reload
93+
sudo -S systemctl enable passage
94+
sudo -S systemctl start passage
95+
```
96+
97+
That's all! Your node should be up and running now. You can query your node by executing the following command after the genesis time
98+
99+
```sh
100+
passage status
101+
```
102+
103+
### Create validator (Optional)
104+
Note: This section is applicable for validators who wants to join post genesis time.
105+
106+
> **IMPORTANT:** Make sure your validator node is fully synced before running this command. Otherwise your validator will start missing blocks.
107+
108+
```sh
109+
passage tx staking create-validator \
110+
--amount=9000000upasg \
111+
--pubkey=$(passage tendermint show-validator) \
112+
--moniker="<your_moniker>" \
113+
--chain-id=passage-1 \
114+
--commission-rate="0.10" \
115+
--commission-max-rate="0.20" \
116+
--commission-max-change-rate="0.01" \
117+
--min-self-delegation="1" \
118+
--gas="auto" \
119+
--from=<your_wallet_name>
120+
```

0 commit comments

Comments
 (0)