Skip to content

Commit

Permalink
Merge branch 'main' into r2-support
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmih authored Nov 23, 2023
2 parents 815e51c + 152576f commit ac55858
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion terraform/daily_snapshot/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module "daily_snapshot" {

# Configure service:
name = "forest-snapshot-dev" # droplet name
size = "s-4vcpu-16gb-amd" # droplet size
size = "c2-8vcpu-16gb" # droplet size
slack_channel = "#forest-dump" # slack channel for notifications
snapshot_bucket = "forest-archive-dev"
snapshot_endpoint = "fra1.digitaloceanspaces.com"
Expand Down
4 changes: 2 additions & 2 deletions terraform/daily_snapshot/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ module "daily_snapshot" {

# Configure service:
name = "forest-snapshot" # droplet name
size = "s-4vcpu-16gb-amd" # droplet size
size = "c2-8vcpu-16gb" # droplet size
slack_channel = "#forest-notifications" # slack channel for notifications
snapshot_bucket = "forest-archive"
forest_tag = "2023-11-14-ddbdbb7"
forest_tag = "v0.16.2"
r2_endpoint = "https://2238a825c5aca59233eab1f221f7aefb.r2.cloudflarestorage.com/"

# Variable passthrough:
Expand Down
9 changes: 2 additions & 7 deletions terraform/modules/daily_snapshot/service/upload_snapshot.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# If Forest hasn't synced to the network after 3 hours, something has gone wrong.
SYNC_TIMEOUT=3h
# If Forest hasn't synced to the network after 6 hours, something has gone wrong.
SYNC_TIMEOUT=6h

if [[ $# != 3 ]]; then
echo "Usage: bash $0 CHAIN_NAME LOG_EXPORT_DAEMON LOG_EXPORT_METRICS"
Expand Down Expand Up @@ -67,11 +67,6 @@ forest-tool db destroy --force --config config.toml --chain "$CHAIN_NAME"
forest --config config.toml --chain "$CHAIN_NAME" --auto-download-snapshot --halt-after-import
forest --config config.toml --chain "$CHAIN_NAME" --no-gc --save-token=token.txt --detach
timeout "$SYNC_TIMEOUT" forest-cli sync wait
# Forest isn't waiting until fully synced. Tracking issue: https://github.com/ChainSafe/forest/issues/3540
# Calling 'sync wait' multiple times is a work-around.
timeout "$SYNC_TIMEOUT" forest-cli sync wait
timeout "$SYNC_TIMEOUT" forest-cli sync wait
timeout "$SYNC_TIMEOUT" forest-cli sync wait
forest-cli snapshot export -o forest_db/
forest-cli --token=\$(cat token.txt) shutdown --force
Expand Down

0 comments on commit ac55858

Please sign in to comment.