Skip to content

Commit

Permalink
Merge of #6065
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 19, 2024
2 parents 3859c9b + bf0a679 commit 6f1b0a8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions scripts/local_testnet/network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ network_params:
seconds_per_slot: 3
global_log_level: debug
snooper_enabled: false
additional_services:
- dora
- prometheus_grafana
19 changes: 12 additions & 7 deletions scripts/local_testnet/start_local_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ NETWORK_PARAMS_FILE=$SCRIPT_DIR/network_params.yaml
BUILD_IMAGE=true
BUILDER_PROPOSALS=false
CI=false
KEEP_ENCLAVE=false

# Get options
while getopts "e:b:n:phc" flag; do
while getopts "e:b:n:phck" flag; do
case "${flag}" in
e) ENCLAVE_NAME=${OPTARG};;
b) BUILD_IMAGE=${OPTARG};;
n) NETWORK_PARAMS_FILE=${OPTARG};;
p) BUILDER_PROPOSALS=true;;
c) CI=true;;
k) KEEP_ENCLAVE=true;;
h)
echo "Start a local testnet with kurtosis."
echo
Expand All @@ -31,6 +33,7 @@ while getopts "e:b:n:phc" flag; do
echo " -n: kurtosis network params file path default: $NETWORK_PARAMS_FILE"
echo " -p: enable builder proposals"
echo " -c: CI mode, run without other additional services like Grafana and Dora explorer"
echo " -k: keeping enclave to allow starting the testnet without destroying the existing one"
echo " -h: this help"
exit
;;
Expand Down Expand Up @@ -62,9 +65,6 @@ if [ "$CI" = true ]; then
# TODO: run assertoor tests
yq eval '.additional_services = []' -i $NETWORK_PARAMS_FILE
echo "Running without additional services (CI mode)."
else
yq eval '.additional_services = ["dora", "prometheus_grafana"]' -i $NETWORK_PARAMS_FILE
echo "Additional services dora and prometheus_grafana added to network_params.yaml"
fi

if [ "$BUILD_IMAGE" = true ]; then
Expand All @@ -75,9 +75,14 @@ else
echo "Not rebuilding Lighthouse Docker image."
fi

# Stop local testnet
kurtosis enclave rm -f $ENCLAVE_NAME 2>/dev/null || true
IMAGE_DOWNLOAD_FLAG=""

if [ "$KEEP_ENCLAVE" = false ]; then
# Stop local testnet
kurtosis enclave rm -f $ENCLAVE_NAME 2>/dev/null || true
IMAGE_DOWNLOAD_FLAG="--image-download always"
fi

kurtosis run --enclave $ENCLAVE_NAME github.com/ethpandaops/ethereum-package --args-file $NETWORK_PARAMS_FILE
kurtosis run --enclave $ENCLAVE_NAME github.com/ethpandaops/ethereum-package $IMAGE_DOWNLOAD_FLAG --args-file $NETWORK_PARAMS_FILE

echo "Started!"

0 comments on commit 6f1b0a8

Please sign in to comment.