Skip to content

Commit fd54534

Browse files
authored
Merge pull request #14 from bcdevtools/feat/auto-backup-priv-validator-state
feat: auto backup priv validator state and kill node if content decreased
2 parents bfa1187 + 37a92dc commit fd54534

File tree

9 files changed

+528
-21
lines changed

9 files changed

+528
-21
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ cd ~ && go install github.com/bcdevtools/node-management/cmd/nmngd@latest
1111

1212
```bash
1313
nmngd node setup-check ~/.node_home --type validator/rpc/snapshot/archival
14+
```
15+
16+
## Node management
17+
18+
```bash
1419
nmngd node extract-addrbook ~/.node_home_source/config/addrbook.json ~/.node_home_dst/config/addrbook.json
1520
nmngd node prune-addrbook ~/.node_home/config/addrbook.json
1621
nmngd node prune-data ~/.node_home --binary xxxd [--backup-pvs ~/priv_validator_state.json.backup]
1722
nmngd node state-sync ~/.node_home --binary xxxd --rpc http://localhost:26657 [--address-book /home/x/.node/config/addrbook.json] [--peers [email protected]:26656] [--seeds [email protected]:26656] [--max-duration 12h]
1823
nmngd node zip-snapshot ~/.node_home
1924
```
2025

26+
### For validator node
27+
```bash
28+
nmngd node auto-backup-priv-validator-state-json ~/.node_home --binary xxxd
29+
```
30+
2131
## Run web server
2232
```bash
2333
nmngd start-web ~/.rpc-gaia \

cmd/gen_start_web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func GetGenStartWebCmd() *cobra.Command {
256256
sb.WriteString(" --")
257257
sb.WriteString(flagChainDescription)
258258
sb.WriteString(" '")
259-
sb.WriteString(chainDescription)
259+
sb.WriteString(strings.ReplaceAll(chainDescription, "\\n", "\\\\n"))
260260
sb.WriteString("'")
261261
}
262262
{

0 commit comments

Comments
 (0)