Skip to content

Commit

Permalink
chore: forest-archive dns migration to forest-internal (#453)
Browse files Browse the repository at this point in the history
Signed-off-by: samuelarogbonlo <[email protected]>
  • Loading branch information
samuelarogbonlo authored Jun 24, 2024
1 parent 3d0c9a7 commit d427c92
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cf/forest-snapshot-listing/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot listing worker

This worker acts on endpoints at `https://forest-archive.chainsafe.dev/list**` and will list objects with `diff`, `lite`, and `latest` prefixes.
This worker acts on endpoints at `https://forest-internal.chainsafe.dev/list**` and will list objects with `diff`, `lite`, and `latest` prefixes.

# Local deployment

Expand Down
2 changes: 1 addition & 1 deletion cf/forest-snapshot-listing/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BASE_URL = 'https://forest-archive.chainsafe.dev';
const BASE_URL = 'https://forest-internal.chainsafe.dev';

interface Env {
FOREST_ARCHIVE: R2Bucket;
Expand Down
2 changes: 1 addition & 1 deletion cf/forest-snapshot-listing/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ usage_model = "bundled"
env = {}

[route]
pattern = "forest-archive.chainsafe.dev/list*"
pattern = "forest-internal.chainsafe.dev/list*"
zone_name = "chainsafe.dev"
#script = "forest-snapshot-listing"

Expand Down
10 changes: 5 additions & 5 deletions cf/latest-snapshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

This worker acts on two endpoints:

- `https://forest-archive.chainsafe.dev/latest/calibnet/`
- `https://forest-archive.chainsafe.dev/latest/mainnet/`
- `https://forest-internal.chainsafe.dev/latest/calibnet/`
- `https://forest-internal.chainsafe.dev/latest/mainnet/`

- `https://forest-archive.chainsafe.dev/archive/calibnet/*`
- `https://forest-archive.chainsafe.dev/archive/mainnet/*`
- `https://forest-archive.chainsafe.dev/archive/historical/*`
- `https://forest-internal.chainsafe.dev/archive/calibnet/*`
- `https://forest-internal.chainsafe.dev/archive/mainnet/*`
- `https://forest-internal.chainsafe.dev/archive/historical/*`

These links will download the latest available snapshot for calibnet and mainnet, respectively.

Expand Down
1 change: 1 addition & 0 deletions cf/latest-snapshot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions cf/latest-snapshot/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ compatibility_date = "2022-06-30"
logpush = true

routes = [
{ pattern = "forest-archive.chainsafe.dev/latest/calibnet", zone_name = "chainsafe.dev" },
{ pattern = "forest-archive.chainsafe.dev/latest/mainnet", zone_name = "chainsafe.dev" },
{ pattern = "forest-archive.chainsafe.dev/latest/calibnet/", zone_name = "chainsafe.dev" },
{ pattern = "forest-archive.chainsafe.dev/latest/mainnet/", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/latest/calibnet", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/latest/mainnet", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/latest/calibnet/", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/latest/mainnet/", zone_name = "chainsafe.dev" },

# below endpoints are for the archive
{ pattern = "forest-archive.chainsafe.dev/archive/calibnet/*", zone_name = "chainsafe.dev" },
{ pattern = "forest-archive.chainsafe.dev/archive/mainnet/*", zone_name = "chainsafe.dev" },
{ pattern = "forest-archive.chainsafe.dev/archive/historical/*", zone_name = "chainsafe.dev" }
{ pattern = "forest-internal.chainsafe.dev/archive/calibnet/*", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/archive/mainnet/*", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/archive/historical/*", zone_name = "chainsafe.dev" }
]

[[r2_buckets]]
Expand Down
2 changes: 1 addition & 1 deletion cf/prune-latest/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ main = "./src/index.ts"
compatibility_date = "2022-06-30"

routes = [
{ pattern = "forest-archive.chainsafe.dev/prune/", zone_name = "chainsafe.dev" },
{ pattern = "forest-internal.chainsafe.dev/prune/", zone_name = "chainsafe.dev" },
]

[[r2_buckets]]
Expand Down
2 changes: 1 addition & 1 deletion images/snapshot-service/src/upload_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ forest-tool db destroy --force --config config.toml --chain "$CHAIN_NAME"
# Normally, Forest should automatically download the latest snapshot. However, the performance
# of the download gets randomly bad, and the download times out.
# Retry logic, because CF occassionally returns 500 (not 503) errors.
for i in {1..5}; do aria2c -x5 https://forest-archive.chainsafe.dev/latest/$CHAIN_NAME/ && break || sleep 15; done
for i in {1..5}; do aria2c -x5 https://forest-internal.chainsafe.dev/latest/$CHAIN_NAME/ && break || sleep 15; done
forest --config config.toml --chain "$CHAIN_NAME" --consume-snapshot *.car.zst --halt-after-import
Expand Down
4 changes: 2 additions & 2 deletions tf-managed/modules/snapshot-monitoring/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Snapshot monitoring

This module creates New Relic resources to check the status of the global snapshot service. Note that this does not check the status of the [snapshot-service](../daily-snapshot), but rather the actual snapshots (and the epochs at which they were produced), available at:
- <https://forest-archive.chainsafe.dev/mainnet/latest/>
- <https://forest-archive.chainsafe.dev/calibnet/latest/>
- <https://forest-internal.chainsafe.dev/mainnet/latest/>
- <https://forest-internal.chainsafe.dev/calibnet/latest/>

The logic is contained in the [snapshot-age-monitor](./snapshot-age-monitor.js).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function check_snapshot(url, genesisTime) {
}

check_snapshot(
"https://forest-archive.chainsafe.dev/latest/calibnet/",
"https://forest-internal.chainsafe.dev/latest/calibnet/",
1667326380
);
check_snapshot(
"https://forest-archive.chainsafe.dev/latest/mainnet/",
"https://forest-internal.chainsafe.dev/latest/mainnet/",
1598306400
);

0 comments on commit d427c92

Please sign in to comment.