Skip to content

Commit dbc2947

Browse files
authored
Merge pull request 0xPolygon#501 from 0xPolygon/pos-review
PoS space review
2 parents d06620f + 6cd58d8 commit dbc2947

File tree

76 files changed

+1311
-1366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1311
-1366
lines changed
159 KB
Loading

docs/img/pos/stake-management-flow.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/pos/architecture/bor/commands.md

Lines changed: 37 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
This guide provides a curated list of common commands and Polygon-specific operations essential for node operators. Whether you're setting up a full node, validator node or troubleshooting, these commands will assist you in managing your Polygon PoS environment effectively.
22

3-
## Frequently Used Commands for Bor & Heimdall
3+
## Frequently used commands
44

5-
Use the tabs below to switch between commands for Bor and Heimdall:
6-
7-
<Tabs
8-
defaultValue="bor"
9-
values={[
10-
{ label: 'Bor Commands', value: 'bor', },
11-
{ label: 'Heimdall Commands', value: 'heimdall', },
12-
]
13-
}>
14-
<TabItem value="bor">
5+
### Bor
156

167
To execute Bor IPC commands, use the following syntax:
178

@@ -32,8 +23,7 @@ bor attach .bor/data/bor.ipc <command>
3223
| `eth.getBlock("latest").number` | `curl http://YourIP:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"bor_getSigners", "params":["0x98b3ea"]}'` | Queries the height of the latest Bor block. |
3324
| | `curl http://YourIP:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'` | Retrieves the `chainID`. |
3425

35-
</TabItem>
36-
<TabItem value="heimdall">
26+
### Heimdall
3727

3828
| Command | Description |
3929
| ------- | ----------- |
@@ -45,87 +35,84 @@ bor attach .bor/data/bor.ipc <command>
4535
| `heimdalld unsafe-reset-all` | Resets the database in case of issues. |
4636
| `curl localhost:26657/status` | Provides comprehensive information about Heimdall. |
4737

48-
</TabItem>
49-
</Tabs>
50-
51-
## Node Management Commands
38+
## Node management commands
5239

5340
| Description | Command |
5441
| ------------------------------------- | ---------------------------------------------- |
55-
| **Locate Heimdall genesis file** | `$CONFIGPATH/heimdall/config/genesis.json` |
56-
| **Locate heimdall-config.toml** | `/etc/heimdall/config/heimdall-config.toml` |
57-
| **Locate config.toml** | `/etc/heimdall/config/config.toml` |
58-
| **Locate heimdall-seeds.txt** | `$CONFIGPATH/heimdall/heimdall-seeds.txt` |
59-
| **Start Heimdall** | `$ sudo service heimdalld start` |
60-
| **Start Heimdall rest-server** | `$ sudo service heimdalld-rest-server start` |
61-
| **Start Heimdall bridge-server** | `$ sudo service heimdalld-bridge start` |
62-
| **Locate Bor genesis file** | `$CONFIGPATH/bor/genesis.json` |
63-
| **Start Bor** | `sudo service bor start` |
64-
| **Retrieve Heimdall logs** | `/var/log/matic-logs/` |
65-
| **Check Heimdall logs** | `tail -f heimdalld.log` |
66-
| **Check Heimdall rest-server logs** | `tail -f heimdalld-rest-server.log` |
67-
| **Check Heimdall bridge logs** | `tail -f heimdalld-bridge.log` |
68-
| **Check Bor logs** | `tail -f bor.log` |
69-
70-
## Useful Configuration Commands
71-
72-
### Sync Status of Heimdall
42+
| Locate Heimdall genesis file | `$CONFIGPATH/heimdall/config/genesis.json` |
43+
| Locate heimdall-config.toml | `/etc/heimdall/config/heimdall-config.toml` |
44+
| Locate config.toml | `/etc/heimdall/config/config.toml` |
45+
| Locate heimdall-seeds.txt | `$CONFIGPATH/heimdall/heimdall-seeds.txt` |
46+
| Start Heimdall | `$ sudo service heimdalld start` |
47+
| Start Heimdall rest-server | `$ sudo service heimdalld-rest-server start` |
48+
| Start Heimdall bridge-server | `$ sudo service heimdalld-bridge start` |
49+
| Locate Bor genesis file | `$CONFIGPATH/bor/genesis.json` |
50+
| Start Bor | `sudo service bor start` |
51+
| Retrieve Heimdall logs | `/var/log/matic-logs/` |
52+
| Check Heimdall logs | `tail -f heimdalld.log` |
53+
| Check Heimdall rest-server logs | `tail -f heimdalld-rest-server.log` |
54+
| Check Heimdall bridge logs | `tail -f heimdalld-bridge.log` |
55+
| Check Bor logs | `tail -f bor.log` |
56+
57+
## Useful configuration commands
58+
59+
### Sync Heimdall status
7360

7461
To check if Heimdall is synced, run:
7562

7663
```bash
7764
curl http://localhost:26657/status
7865
```
7966

80-
### Latest Block Height on Heimdall
67+
### Latest block height on Heimdall
8168

8269
To check the latest block height on Heimdall, run:
8370

8471
```bash
8572
curl localhost:26657/status
8673
```
8774

88-
### Latest Block Height on Bor
75+
### Latest block height on Bor
8976

9077
To check the latest block height on Bor, use:
9178

9279
```bash
9380
curl http://<your ip>:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"bor_getSigners", "params":["0x98b3ea"]}'
9481
```
9582

96-
### Cleanup: Deleting Remnants of Heimdall and Bor
83+
### Cleanup: Deleting remnants of Heimdall and Bor
9784

98-
**For Linux package:**
85+
##### For Linux package
9986

10087
```bash
10188
sudo dpkg -i matic-bor
10289
sudo rm -rf /etc/bor
10390
```
10491

105-
**For Binaries:**
92+
##### For binaries
10693

10794
```bash
10895
sudo rm -rf /etc/bor
10996
sudo rm /etc/heimdall
11097
```
11198

112-
### Terminate Bor Process
99+
### Terminate Bor process
113100

114-
**For Linux:**
101+
##### For Linux package
115102

116103
```bash
117104
ps -aux | grep bor
118105
sudo kill -9 <PID>
119106
```
120107

121-
**For Binaries:**
108+
##### For binaries
122109

123110
```bash
124111
cd CS-2003/bor
125112
bash stop.sh
126113
```
127114

128-
### Retrieve Latest Peer Details
115+
### Retrieve latest peer details
129116

130117
To retrieve the latest peer details, run:
131118

@@ -137,16 +124,16 @@ admin.peers.forEach(function(value){
137124
exit
138125
```
139126

140-
### Stop Heimdall and Bor Services
127+
### Stop Heimdall and Bor services
141128

142-
**For Linux packages:**
129+
##### For Linux packages
143130

144131
```bash
145132
sudo service heimdalld stop
146133
sudo service bor stop
147134
```
148135

149-
**For Binaries:**
136+
##### For binaries
150137

151138
```bash
152139
pkill heimdalld
@@ -155,16 +142,16 @@ cd CS-2001/bor
155142
bash stop.sh
156143
```
157144

158-
### Remove Heimdall and Bor Directories
145+
### Remove Heimdall and Bor directories
159146

160-
**For Linux packages:**
147+
##### For Linux packages
161148

162149
```bash
163150
sudo rm -rf /etc/heimdall/*
164151
sudo rm -rf /etc/bor/*
165152
```
166153

167-
**For Binaries:**
154+
##### For binaries
168155

169156
```bash
170157
sudo rm -rf /var/lib/heimdalld/

0 commit comments

Comments
 (0)