diff --git a/cf/forest-snapshot-listing/README.md b/cf/forest-snapshot-listing/README.md index c317eea2a..ad0ad9397 100644 --- a/cf/forest-snapshot-listing/README.md +++ b/cf/forest-snapshot-listing/README.md @@ -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 diff --git a/cf/forest-snapshot-listing/src/worker.ts b/cf/forest-snapshot-listing/src/worker.ts index 6cf3b950e..93cfd3a0b 100644 --- a/cf/forest-snapshot-listing/src/worker.ts +++ b/cf/forest-snapshot-listing/src/worker.ts @@ -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; diff --git a/cf/forest-snapshot-listing/wrangler.toml b/cf/forest-snapshot-listing/wrangler.toml index 479793db9..ade4cb38a 100644 --- a/cf/forest-snapshot-listing/wrangler.toml +++ b/cf/forest-snapshot-listing/wrangler.toml @@ -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" diff --git a/cf/latest-snapshot/README.md b/cf/latest-snapshot/README.md index 08aff3978..bc36345d6 100644 --- a/cf/latest-snapshot/README.md +++ b/cf/latest-snapshot/README.md @@ -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. diff --git a/cf/latest-snapshot/package-lock.json b/cf/latest-snapshot/package-lock.json index 195179b12..a0a092b97 100644 --- a/cf/latest-snapshot/package-lock.json +++ b/cf/latest-snapshot/package-lock.json @@ -963,6 +963,7 @@ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } diff --git a/cf/latest-snapshot/wrangler.toml b/cf/latest-snapshot/wrangler.toml index 0db68c666..1d0f90bc0 100644 --- a/cf/latest-snapshot/wrangler.toml +++ b/cf/latest-snapshot/wrangler.toml @@ -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]] diff --git a/cf/prune-latest/wrangler.toml b/cf/prune-latest/wrangler.toml index e16dee3cc..705d4194e 100644 --- a/cf/prune-latest/wrangler.toml +++ b/cf/prune-latest/wrangler.toml @@ -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]] diff --git a/images/snapshot-service/src/upload_snapshot.sh b/images/snapshot-service/src/upload_snapshot.sh index c1343cb05..d0c39aeab 100755 --- a/images/snapshot-service/src/upload_snapshot.sh +++ b/images/snapshot-service/src/upload_snapshot.sh @@ -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 diff --git a/tf-managed/modules/snapshot-monitoring/README.md b/tf-managed/modules/snapshot-monitoring/README.md index c96fb107c..13f5cee36 100644 --- a/tf-managed/modules/snapshot-monitoring/README.md +++ b/tf-managed/modules/snapshot-monitoring/README.md @@ -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: -- -- +- +- The logic is contained in the [snapshot-age-monitor](./snapshot-age-monitor.js). diff --git a/tf-managed/modules/snapshot-monitoring/snapshot-age-monitor.js b/tf-managed/modules/snapshot-monitoring/snapshot-age-monitor.js index 3efbaaf35..2bb01ea5a 100644 --- a/tf-managed/modules/snapshot-monitoring/snapshot-age-monitor.js +++ b/tf-managed/modules/snapshot-monitoring/snapshot-age-monitor.js @@ -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 );