Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Restart the SSH service:
sudo systemctl restart ssh
```

Keep your private key (`~/.ssh/id_rsa`) safe. You will need it for all future logins.
Keep your private key (`~/.ssh/id_rsa`) safe. You will need it for all future logins.
**Do not upload it to the server**

---
Expand Down Expand Up @@ -189,6 +189,17 @@ sudo ufw allow 8989

Once your server is secured and accessible, proceed with the standard masternode setup.

### Log Retention Settings

The startup scripts for `mainnet`, `testnet`, and `devnet` support two log retention environment variables:

* `LOG_KEEP_DAYS`: total number of calendar days of node logs to retain. Minimum value: `3`.
* `LOG_UNCOMPRESSED_DAYS`: number of recent calendar days to keep as plain `.log` files before older retained logs are compressed to `.log.gz`. Minimum value: `2`.

Default values are `LOG_KEEP_DAYS=30` and `LOG_UNCOMPRESSED_DAYS=3`. If `LOG_KEEP_DAYS` is below `3`, or `LOG_UNCOMPRESSED_DAYS` is below `2`, or `LOG_UNCOMPRESSED_DAYS` is greater than `LOG_KEEP_DAYS`, the node exits during startup with an error.

Mainnet and testnet read these values from their `.env` files. Devnet reads them from the per-node files under `devnet/envs/${HOSTIP}-1` and `devnet/envs/${HOSTIP}-2`. Old `.log` files are compressed only after rotation, and the original file is removed only after the `.log.gz` file has been written successfully.

---

## How to Setup XinFin Masternode
Expand Down
2 changes: 1 addition & 1 deletion devnet/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SYNC_MODE=full
GC_MODE=archive
NETWORK=devnet
PRIVATE_KEY=3333333333333333333333333333333333333333333333333333333333333333
LOG_LEVEL=2
LOG_LEVEL=3
ENABLE_RPC=false

# RPC API setting
Expand Down
10 changes: 6 additions & 4 deletions devnet/docker-compose-group.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
xinfinnetwork1:
build:
context: .
dockerfile: .
context: .
dockerfile: .
volumes:
- "./xdcchain-1:/work/xdcchain"
- "./genesis.json:/work/genesis.json"
Expand All @@ -11,6 +11,7 @@ services:
- "./.pwd:/work/.pwd"
- "/etc/localtime:/etc/localtime:ro"
restart: "always"
stop_grace_period: 60s
env_file: "./envs/${HOSTIP}-1"
ports:
- "30303:30303"
Expand All @@ -19,8 +20,8 @@ services:

xinfinnetwork2:
build:
context: .
dockerfile: .
context: .
dockerfile: .
volumes:
- "./xdcchain-2:/work/xdcchain"
- "./genesis.json:/work/genesis.json"
Expand All @@ -29,6 +30,7 @@ services:
- "./.pwd:/work/.pwd"
- "/etc/localtime:/etc/localtime:ro"
restart: "always"
stop_grace_period: 60s
env_file: "./envs/${HOSTIP}-2"
ports:
- "30304:30304"
1 change: 1 addition & 0 deletions devnet/docker-compose-hash-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
volumes:
- "./xdcchain-1:/work/xdcchain"
restart: "always"
stop_grace_period: 60s
env_file: "./.env"
ports:
- "30303:30303"
1 change: 1 addition & 0 deletions devnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- "./.pwd:/work/.pwd"
- "/etc/localtime:/etc/localtime:ro"
restart: "always"
stop_grace_period: 60s
env_file: "./.env"
ports:
- "30303:30303"
2 changes: 2 additions & 0 deletions devnet/envs/144.126.140.3-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=77e0b4a7aabef3b07db42f1f2aa43130ba5a3175ec47f2ff8891d49ad87cbed9
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/144.126.140.3-2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=31b0fbcba7b60ea9974ae1bac0523af8cd72661de47ea2d3569344c975b93801
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/194.163.167.177-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=5a3457e9323ef7f9351d7b6d8f4d5c2c7c66a5e094142d6e186c86402b29a787
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/194.163.167.177-2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=363f48b205f95859e13ea1acf6b047631ab34e69d193bbf5eb0df871decca69e
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/194.233.77.19-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=bde24b587c04ab8d8cc2acc176a4b85e646d3c89f4d98d570629d756aea68303
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/194.233.77.19-2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=3efdb44088929167487da052125162b48d8d54fe8f7b7db11b5d5cc3b9a1c14b
PORT=30304
RPCPORT=8546
WSPORT=8556
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/66.94.121.151-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=1c40ebf394c9c9db15f60528f6a030ba9f465a7c615acd9b9d79792175b6bcd6
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/66.94.121.151-2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=58fbe847ab6faa2fb5559b4d1f1e02573e222d2524b6f4598a301897c0881e71
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/66.94.98.186-1
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=64651f33879becd32391e3cf802680f3621500c55fb53db7b6b041ff74c3a62f
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
2 changes: 2 additions & 0 deletions devnet/envs/66.94.98.186-2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ PRIVATE_KEY=e754b95280b2232ffb4398de0cdda06c2be24ef8aa5c6aba090802e0cd706022
PORT=30303
RPCPORT=8545
WSPORT=8555
LOG_KEEP_DAYS=30
LOG_UNCOMPRESSED_DAYS=3
Loading