forked from crypto-org-chain/cronos-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request crypto-org-chain#233 from crypto-org-chain/232-pro…
…blem-add-doc-for-best-practises-for-node-hosts Config best practises for node hosts
- Loading branch information
Showing
3 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Best Practices for node hosts in Cronos | ||
|
||
In order to make it more convenient for Dapps and node hosts to setup a node, we put together a list of useful settings and configurations. Feel free to refer to this guide, and adapt settings to suit your use-case. | ||
|
||
## config.toml | ||
|
||
### Log_level | ||
- `info` Depending on the needs of your application it is ok to stick to `info` (default), but do consider setting up log-rotation for your logs, and archive logs after a certain amount of time or size, e.g. use a cron job with weekly rotation or until your file size hits ~5GB. | ||
- set to `debug` only for debugging purpose, turn off after you are finished with debugging. | ||
|
||
### db_backend | ||
- `goleveldb` (default) db: for low / medium level traffic use case. The reason being there can be some lock contention, especially with P2P. | ||
- `rocksdb` suited for a lot of use-cases, especially for high query load ~ few M / day. Has a better balance between rpc queries and p2p at high traffic. Note that`Rocksdb` however might have a slower startup time and requires a higher memory allocation. | ||
|
||
### max_num_inbound_peers and max_num_outbound_peers | ||
- `max_num_inbound_peers` For node providers the number of inbound peers can be set to a higher value for example 50. | ||
- `max_num_outbound_peers` For users on a private network set a higher number of outbound peers to 30 for example. | ||
- After peers are connected, set it back to its default value. Note that some trial values might be needed to get it right. | ||
|
||
|
||
## app.toml | ||
|
||
### pruning | ||
- `default` Normal usage can just set to default. In the Cosmos SDK this is defined as: | ||
```go | ||
PruneDefault = NewPruningOptions(362880, 100, 10) | ||
``` | ||
meaning the app will keep the latest 362880 versions (around 21 days by 5 secs block time), and then only keep 1 version for every 100 blocks past the keepRecent period( the rest will be put into the pruning list), and then execute the pruning every 10 blocks. | ||
- `everything` if you only need to do transaction broadcasting and only need the last blocks. | ||
- `nothing` for DApps that want to be able to query information at a certain known blockheight. Note that this is only needed for `archive` nodes. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.