From ede86b68ce7e643eab8695fdeb21c05459e872cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 25 Jan 2022 10:59:59 +0100 Subject: [PATCH] gen_config.sh: add default retenetion of 30 days MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to this question on our Discourse: https://discuss.status.im/t/status-node-growing-storage-size/2970 Signed-off-by: Jakub SokoĊ‚owski --- _assets/scripts/gen_config.sh | 2 ++ config/README.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_assets/scripts/gen_config.sh b/_assets/scripts/gen_config.sh index 11afa9b43..272d6b364 100755 --- a/_assets/scripts/gen_config.sh +++ b/_assets/scripts/gen_config.sh @@ -9,6 +9,7 @@ RPC_PORT="${RPC_PORT:-8545}" LISTEN_PORT="${LSTEN_PORT:-30303}" API_MODULES="${API_MODULES:-eth,web3,admin}" MAX_PEERS="${MAX_PEERS:-50}" +DAYS_KEPT="${DAYS_KEPT-30}" FLEET_NAME="${FLEET_NAME:-eth.prod}" REGISTER_TOPIC="${REGISTER_TOPIC:-whispermail}" MAIL_PASSWORD="${MAIL_PASSWORD:-status-offline-inbox}" @@ -40,6 +41,7 @@ JQ_FILTER_ARRAY=( ".WakuConfig.EnableMailServer = true" ".WakuConfig.DataDir = \"${DATA_PATH}/waku\"" ".WakuConfig.MailServerPassword = \"${MAIL_PASSWORD}\"" + ".WakuConfig.MailServerDataRetention = ${DAYS_KEPT}" ) JQ_FILTER=$(printf " | %s" "${JQ_FILTER_ARRAY[@]}") diff --git a/config/README.md b/config/README.md index aa7d7cb3f..004a52eba 100644 --- a/config/README.md +++ b/config/README.md @@ -60,11 +60,13 @@ If you want your node to relay Waku(modified Whisper) protocol messages you'll w "Enabled": true, "EnableMailServer": true, "DataDir": "/tmp/status-go-data/waku", - "MailServerPassword": "status-offline-inbox" + "MailServerPassword": "status-offline-inbox", + "MailServerDataRetention": 30 } } ``` The `MailServerPassword` is used for symmetric encryption of history requests. +The `MailServerDataRetention` defines number of days for which to keep messages. By default it will use `leveldb` embedded database. To use postgres instead you need to add this to your config: