Skip to content

Commit 0910df4

Browse files
chore: remove unneeded changes
1 parent d981241 commit 0910df4

3 files changed

Lines changed: 12 additions & 26 deletions

File tree

‎scripts/tests/external-rpc-checks/docker-compose.yaml‎

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ x-forest-service: &forest-service
99
- FOREST_PATH=/data
1010
user: 0:0
1111

12-
# Talks to the node from inside the compose network, so its RPC port is never published.
13-
x-rpc-client: &rpc-client
14-
image: ghcr.io/chainsafe/forest-rpc-checks:latest
15-
depends_on:
16-
forest:
17-
condition: service_healthy
18-
environment:
19-
FOREST_RPC_URL: forest:${FOREST_RPC_PORT}/rpc/v1
20-
2112
services:
2213
resolve:
2314
image: ghcr.io/chainsafe/forest-rpc-checks:latest
@@ -64,16 +55,12 @@ services:
6455
start_period: 5m
6556
start_interval: 5s
6657

67-
# Waits for the node to sync past the day the checks cover.
68-
wait:
69-
<<: *rpc-client
70-
volumes:
71-
- ./wait.rb:/wait.rb:ro
72-
entrypoint: ["ruby", "/wait.rb"]
73-
7458
# Probes the node for the epochs the checks are about to query.
7559
verify:
76-
<<: *rpc-client
60+
image: ghcr.io/chainsafe/forest-rpc-checks:latest
61+
depends_on:
62+
forest:
63+
condition: service_healthy
7764
volumes:
7865
- ./verify.rb:/verify.rb:ro
7966
entrypoint: ["ruby", "/verify.rb"]

‎scripts/tests/external-rpc-checks/resolve.rb‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# frozen_string_literal: true
22

3-
# Picks the ${FOREST_CHAIN} snapshot the checks start from and records under /data its URL,
4-
# its head epoch, and the chain plus the epoch range of the UTC day DAYS_AGO days ago, which
5-
# is what the dataset's daily archives cover.
6-
#
7-
# The archive's snapshots carry the state of their last 2000 epochs and the index backfill
8-
# re-executes every epoch down and the node syncs the rest upwards (see ./wait.rb).
3+
# Picks the ${FOREST_CHAIN} snapshot published DAYS_AGO days ago (UTC), by the date in its name,
4+
# and records under /data what the rest of the harness needs: its URL, its head epoch, and the
5+
# chain plus the ${FOREST_CHECK_EPOCHS}-epoch range the checks cover.
6+
# Runs in the checks image, which has Ruby, so the Forest image needs no curl.
97

108
require 'date'
119
require 'json'

‎scripts/tests/external-rpc-checks/setup.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ pushd "${PARENT_PATH}"
1010
# This should not be needed in GH. It is useful for running locally.
1111
docker compose down --remove-orphans --volumes
1212

13-
# Resolves the snapshot and probes the dataset for DAYS_AGO. Sets CHAIN,
14-
# START and END on success; returns 2 after saying what that day lacks.
13+
# Resolves the snapshot and probes the dataset for DAYS_AGO.
14+
# Sets CHAIN, START and END on success.
15+
# Returns 2 on failure
1516
check_day() {
1617
local status=0
1718
docker compose run --rm --env DAYS_AGO="$1" resolve || status=$?
1819
case ${status} in
1920
0) ;;
20-
2) return 2 ;; # resolve said why
21+
2) return 2 ;;
2122
*) exit "${status}" ;;
2223
esac
2324

0 commit comments

Comments
 (0)