Skip to content

Commit

Permalink
iota-wasp: Add parameter for pruning config
Browse files Browse the repository at this point in the history
  • Loading branch information
bogenlos committed Mar 5, 2024
1 parent e454345 commit a4cb6ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions iota-wasp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ WASP_HOST=node.your-domain.com
# WASP_PEERING_PORT=4000
# WASP_DATA_DIR=<absolute path to data dir>
# WASP_IDENTITY_PRIVATE_KEY=<optional>
# WASP_PRUNING_MIN_STATES_TO_KEEP=10000
# DASHBOARD_USERNAME=admin
DASHBOARD_PASSWORD=<password hash>
Expand All @@ -52,6 +53,7 @@ DASHBOARD_SALT=<password salt>
| WASP_PEERING_PORT | | 4000 | Peering port |
| WASP_DATA_DIR | | .data | Directory containing configuration, database etc. |
| WASP_IDENTITY_PRIVATE_KEY | | | Private key used to derive the node identity |
| WASP_PRUNING_MIN_STATES_TO_KEEP | | 10000 | Minimum number of states to keep in the database. If the number of states exceeds this value, the oldest states are pruned. |
| DASHBOARD_USERNAME | | wasp | Username to access dashboard |
| DASHBOARD_PASSWORD | x | | Password hash (can be generated with `docker run --rm -it iotaledger/hornet:2.0-rc tool pwd-hash` or non-interactively with `docker run --rm iotaledger/hornet:2.0-rc tool pwd-hash --json --password <password>`) |
| DASHBOARD_SALT | x | | Password salt (can be generated with `docker run --rm -it iotaledger/hornet:2.0-rc tool pwd-hash` or non-interactively with `docker run --rm iotaledger/hornet:2.0-rc tool pwd-hash --json --password <password>`) |
Expand Down
2 changes: 2 additions & 0 deletions iota-wasp/prepare_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ set_config "${configPath}" ".webapi.auth.basic.username" "\"${DASHBOARD_USERN
set_config "${configPath}" ".prometheus.bindAddress" "\"0.0.0.0:9312\""
set_config "${configPath}" ".db.debugSkipHealthCheck" "false"

set_config_if_present_in_env "${configPath}" "WASP_PRUNING_MIN_STATES_TO_KEEP" ".stateManager.pruningMinStatesToKeep"

echo "Configure users defined in .env..."
echo "{}" > "${usersConfigPath}"
set_config "${usersConfigPath}" ".users.users[\"${DASHBOARD_USERNAME:-wasp}\"].passwordHash" "\"${DASHBOARD_PASSWORD}\"" "secret"
Expand Down
2 changes: 1 addition & 1 deletion shimmer-wasp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ WASP_HOST=node.your-domain.com
# WASP_PEERING_PORT=4000
# WASP_DATA_DIR=<absolute path to data dir>
# WASP_IDENTITY_PRIVATE_KEY=<optional>
# WASP_PRUNING_MIN_STATES_TO_KEEP=10000
# DASHBOARD_USERNAME=admin
DASHBOARD_PASSWORD=<password hash>
DASHBOARD_SALT=<password salt>
# WASP_WEBAPI_AUTH_SCHEME=jwt
# WASP_JWT_DURATION=24h
# WASP_PRUNING_MIN_STATES_TO_KEEP=10000
# WASP_TRUSTED_NODE_0_NETID=trusted.node:4000
# WASP_TRUSTED_NODE_0_PUBKEY=<pubkey>
Expand Down

0 comments on commit a4cb6ef

Please sign in to comment.