Skip to content

Commit f6dc749

Browse files
ludamadclaude
andcommitted
chore: reorganize KIND test environments and cleanup obsolete scripts
- Create kind-provers.env (real provers, matches next-scenario.env) - Create kind-minimal.env (fast epochs + fake provers for quick iteration) - Remove kind-test.env (replaced by above) - Remove test_k8s.sh and test_prod_deployment.sh (obsolete) - Remove obsolete bootstrap.sh test commands that used test_k8s.sh - Update test_kind.sh to require env sourcing by caller - Filter eth-beacon/eth-execution from stern logs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6fbe4e4 commit f6dc749

File tree

7 files changed

+69
-229
lines changed

7 files changed

+69
-229
lines changed

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ case "$cmd" in
157157
export CI_DASHBOARD="network"
158158
export JOB_ID="x-network-tests-kind-${1:?test_command is required}"
159159
export AWS_SHUTDOWN_TIME=180 # 3 hours for KIND tests
160-
export CPUS=64
160+
export CPUS=192
161161
export INSTANCE_POSTFIX="n-kind"
162162
bootstrap_ec2 "./bootstrap.sh ci-network-tests-kind $*"
163163
;;

spartan/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ environments/*
2424
!environments/testnet-canary.env
2525
!environments/testnet.env
2626
!environments/tps-scenario.env
27-
!environments/kind-test.env
27+
!environments/kind-minimal.env
28+
!environments/kind-provers.env
2829
*.tfvars

spartan/bootstrap.sh

Lines changed: 2 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -252,97 +252,13 @@ case "$cmd" in
252252
test|test_cmds|gke|build|gcp_auth)
253253
$cmd
254254
;;
255-
"test-kind-smoke")
256-
OVERRIDES="telemetry.enabled=false,bot.enabled=false" \
257-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
258-
./scripts/test_k8s.sh kind src/spartan/smoke.test.ts 1-validators.yaml smoke${NAME_POSTFIX:-}
259-
;;
260-
"test-kind-4epochs")
261-
# TODO(#12163) reenable bot once not conflicting with transfer
262-
OVERRIDES="bot.enabled=false" \
263-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
264-
./scripts/test_k8s.sh kind src/spartan/4epochs.test.ts ci.yaml four-epochs${NAME_POSTFIX:-}
265-
;;
266-
"test-kind-4epochs-sepolia")
267-
OVERRIDES="bot.enabled=false" \
268-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false SEPOLIA_RUN=true \
269-
./scripts/test_k8s.sh kind src/spartan/4epochs.test.ts ci-sepolia.yaml four-epochs${NAME_POSTFIX:-}
270-
;;
271-
"test-kind-proving")
272-
OVERRIDES="bot.enabled=false" \
273-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
274-
./scripts/test_k8s.sh kind src/spartan/proving.test.ts ci.yaml proving${NAME_POSTFIX:-}
275-
;;
276-
"test-kind-transfer")
277-
# TODO(#12163) reenable bot once not conflicting with transfer
278-
OVERRIDES="bot.enabled=false" \
279-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
280-
./scripts/test_k8s.sh kind src/spartan/transfer.test.ts ci.yaml transfer${NAME_POSTFIX:-}
281-
;;
282-
"test-kind-1tps")
283-
OVERRIDES="bot.enabled=false" \
284-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false RESOURCES_FILE=gcloud-1tps-sim.yaml \
285-
./scripts/test_k8s.sh kind src/spartan/1tps.test.ts ci-1tps.yaml one-tps${NAME_POSTFIX:-}
286-
;;
287-
"test-kind-10tps-10%-drop")
288-
OVERRIDES="telemetry.enabled=false,bot.enabled=false,validator.p2p.dropTransactions=true,validator.p2p.dropTransactionsProbability=0.1" \
289-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
290-
./scripts/test_k8s.sh kind src/spartan/n_tps.test.ts ci-1tps.yaml ten-tps${NAME_POSTFIX:-}
291-
;;
292-
"test-kind-10tps-30%-drop")
293-
OVERRIDES="telemetry.enabled=false,bot.enabled=false,validator.p2p.dropTransactions=true,validator.p2p.dropTransactionsProbability=0.3" \
294-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
295-
./scripts/test_k8s.sh kind src/spartan/n_tps.test.ts ci-tx-drop.yaml ten-tps${NAME_POSTFIX:-}
296-
;;
297-
"test-kind-10tps-50%-drop")
298-
OVERRIDES="telemetry.enabled=false,bot.enabled=false,validator.p2p.dropTransactions=true,validator.p2p.dropTransactionsProbability=0.5" \
299-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
300-
./scripts/test_k8s.sh kind src/spartan/n_tps.test.ts ci-tx-drop.yaml ten-tps${NAME_POSTFIX:-}
301-
;;
302255
"test-kind-upgrade-rollup")
256+
source scripts/source_network_env.sh
257+
source_network_env kind-provers
303258
OVERRIDES="${OVERRIDES:-bot.enabled=false}" \
304259
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
305260
./scripts/test_kind.sh src/spartan/upgrade_via_cli.test.ts upgrade-rollup-version${NAME_POSTFIX:-}
306261
;;
307-
"test-prod-deployment")
308-
FRESH_INSTALL=false INSTALL_METRICS=false ./scripts/test_prod_deployment.sh
309-
;;
310-
"test-cli-upgrade")
311-
OVERRIDES="telemetry.enabled=false" \
312-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
313-
./scripts/test_k8s.sh kind src/spartan/upgrade_via_cli.test.ts 1-validators.yaml upgrade-via-cli${NAME_POSTFIX:-}
314-
;;
315-
"test-gke-transfer")
316-
execution_client="$1"
317-
# TODO(#12163) reenable bot once not conflicting with transfer
318-
OVERRIDES="bot.enabled=false"
319-
if [ -n "$execution_client" ]; then
320-
OVERRIDES="$OVERRIDES,ethereum.execution.client=$execution_client"
321-
fi
322-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false RESOURCES_FILE=gcloud-1tps-sim.yaml \
323-
./scripts/test_k8s.sh gke src/spartan/transfer.test.ts ci-fast-epoch.yaml ${NAMESPACE:-"transfer${NAME_POSTFIX:-}"}
324-
;;
325-
"test-gke-1tps")
326-
OVERRIDES="bot.enabled=false" \
327-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false RESOURCES_FILE=gcloud-1tps-sim.yaml \
328-
./scripts/test_k8s.sh gke src/spartan/1tps.test.ts ci-1tps.yaml ${NAMESPACE:-"one-tps${NAME_POSTFIX:-}"}
329-
;;
330-
"test-gke-4epochs")
331-
# TODO(#12163) reenable bot once not conflicting with transfer
332-
OVERRIDES="bot.enabled=false" \
333-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
334-
./scripts/test_k8s.sh gke src/spartan/4epochs.test.ts ci-1tps.yaml ${NAMESPACE:-"four-epochs${NAME_POSTFIX:-}"}
335-
;;
336-
"test-gke-upgrade-rollup-version")
337-
OVERRIDES="bot.enabled=false" \
338-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
339-
./scripts/test_k8s.sh gke src/spartan/upgrade_rollup_version.test.ts ci.yaml ${NAMESPACE:-"upgrade-rollup-version${NAME_POSTFIX:-}"}
340-
;;
341-
"test-gke-cli-upgrade")
342-
OVERRIDES="telemetry.enabled=false" \
343-
FRESH_INSTALL=${FRESH_INSTALL:-true} INSTALL_METRICS=false \
344-
./scripts/test_k8s.sh gke src/spartan/upgrade_via_cli.test.ts 1-validators.yaml ${NAMESPACE:-"upgrade-via-cli${NAME_POSTFIX:-}"}
345-
;;
346262
"network_teardown")
347263
env_file="$1"
348264
# Sets up basic env vars like CLUSTER for gcp auth
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# KIND environment for local Kubernetes testing
2-
# Uses minimal resource settings suitable for local KIND clusters
2+
# Minimal setup with fast epochs for quick iteration
33

44
NAMESPACE=${NAMESPACE:-kind}
55
CLUSTER=kind
@@ -9,12 +9,12 @@ CREATE_AZTEC_INFRA=true
99
LABS_INFRA_MNEMONIC="test test test test test test test test test test test junk"
1010
L1_ACCOUNT_MNEMONIC="test test test test test test test test test test test junk"
1111
FUNDING_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
12-
REAL_VERIFIER=true
12+
REAL_VERIFIER=false
1313
SENTINEL_ENABLED=false
1414

15-
# Epoch and slot timing
16-
AZTEC_EPOCH_DURATION=4
15+
# Fast epoch timing for quick iteration
1716
AZTEC_SLOT_DURATION=24
17+
AZTEC_EPOCH_DURATION=4
1818
AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS=2
1919
AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS=1
2020
AZTEC_SLASHING_OFFSET_IN_ROUNDS=1
@@ -54,6 +54,3 @@ PUBLISHERS_PER_PROVER=1
5454

5555
# RPC
5656
RPC_REPLICAS=1
57-
58-
# DO NOT auto-run tests - we want to run manually
59-
RUN_TESTS=false
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# KIND environment for local Kubernetes testing with real provers
2+
# Uses settings from next-scenario.env, adapted for KIND
3+
4+
NAMESPACE=${NAMESPACE:-kind}
5+
CLUSTER=kind
6+
CREATE_ETH_DEVNET=true
7+
CREATE_ROLLUP_CONTRACTS=true
8+
CREATE_AZTEC_INFRA=true
9+
LABS_INFRA_MNEMONIC="test test test test test test test test test test test junk"
10+
L1_ACCOUNT_MNEMONIC="test test test test test test test test test test test junk"
11+
FUNDING_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
12+
SENTINEL_ENABLED=false
13+
14+
# Epoch and slot timing (from next-scenario.env)
15+
AZTEC_EPOCH_DURATION=32
16+
AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET=2
17+
AZTEC_LAG_IN_EPOCHS_FOR_RANDAO=2
18+
19+
# Slashing settings (from next-scenario.env)
20+
AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS=1
21+
AZTEC_SLASHING_QUORUM=17
22+
AZTEC_SLASHING_OFFSET_IN_ROUNDS=2
23+
AZTEC_LOCAL_EJECTION_THRESHOLD=90000000000000000000
24+
25+
# Governance settings (from next-scenario.env)
26+
AZTEC_GOVERNANCE_PROPOSER_QUORUM=11
27+
AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE=20
28+
AZTEC_GOVERNANCE_VOTING_DURATION=300
29+
30+
R2_ACCESS_KEY_ID=""
31+
R2_SECRET_ACCESS_KEY=""
32+
33+
OTEL_COLLECTOR_ENDPOINT="http://metrics-opentelemetry-collector.metrics:4318"
34+
35+
# Docker image - use AZTEC_DOCKER_IMAGE if already set (e.g., by CI), otherwise default
36+
AZTEC_DOCKER_IMAGE=${AZTEC_DOCKER_IMAGE:-aztecprotocol/aztec:latest}
37+
38+
# Validators (from next-scenario.env)
39+
VALIDATOR_REPLICAS=4
40+
VALIDATORS_PER_NODE=12
41+
PUBLISHERS_PER_VALIDATOR_KEY=1
42+
VALIDATOR_PUBLISHER_MNEMONIC_START_INDEX=5000
43+
44+
# Provers (from next-scenario.env)
45+
PROVER_REPLICAS=8
46+
PROVER_AGENTS_PER_PROVER=1
47+
PROVER_PUBLISHER_MNEMONIC_START_INDEX=8000
48+
PUBLISHERS_PER_PROVER=1
49+
50+
# RPC
51+
RPC_REPLICAS=2

spartan/scripts/test_kind.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/usr/bin/env bash
2-
# Usage: ./test_kind.sh <test_file> [namespace]
2+
# Usage: source environments/kind-fake-provers.env && ./test_kind.sh <test_file> [namespace]
33
# Deploys a network to KIND and runs the specified test.
44
#
5+
# Prerequisites:
6+
# Source the appropriate env file before running:
7+
# - kind-fake-provers.env: Fast testing with fake provers (default for most tests)
8+
# - kind-provers.env: Real provers (slower, matches next-scenario.env)
9+
#
510
# Environment variables:
611
# FRESH_INSTALL (default: "true") - Delete namespace before deployment
712
# OVERRIDES (default: "") - Helm value overrides
@@ -18,10 +23,6 @@ source "${REPO_ROOT}/ci3/source"
1823

1924
cd "$SPARTAN_DIR"
2025

21-
# Source the KIND test environment configuration
22-
source scripts/source_network_env.sh
23-
source_network_env kind-test
24-
2526
test_file="${1:?test_file is required}"
2627
namespace="${2:-upgrade-test}"
2728

@@ -32,7 +33,7 @@ overrides="${OVERRIDES:-}"
3233
# Ensure KIND cluster is running
3334
./bootstrap.sh kind
3435

35-
# Set up namespace (override NAMESPACE from kind-test.env with specific test namespace)
36+
# Set up namespace (override NAMESPACE from env file with specific test namespace)
3637
export NAMESPACE="$namespace"
3738
export CLUSTER="kind"
3839

@@ -53,7 +54,8 @@ function start_stern {
5354
if command -v stern &>/dev/null; then
5455
echo "Starting stern log capture for namespace $namespace (streaming to cache_log)..."
5556
# Pipe stern directly to cache_log for live streaming to Redis
56-
stern ".*" -n "$namespace" --since=1s 2>&1 | cache_log "kind-$namespace-pods" &
57+
# Exclude noisy eth-beacon and eth-execution pods
58+
stern ".*" -n "$namespace" --exclude="eth-beacon.*" --exclude="eth-execution.*" --since=1s 2>&1 | cache_log "kind-$namespace-pods" &
5759
stern_pid=$!
5860
echo "Stern streaming started with PID $stern_pid"
5961
else

spartan/scripts/test_prod_deployment.sh

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)