Skip to content

Commit

Permalink
serve light client data in CI / dev builds
Browse files Browse the repository at this point in the history
Adjust config for CI / dev builds to serve light client data by default:
`--serve-light-client-data=1 --import-light-client-data=only-new`
  • Loading branch information
etan-status committed Mar 11, 2022
1 parent ae408c2 commit 4c38bfe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ define CONNECT_TO_NETWORK_IN_DEV_MODE
--network=$(1) $(3) $(GOERLI_TESTNETS_PARAMS) \
--log-level="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" \
--data-dir=build/data/shared_$(1)_$(NODE_ID) \
--serve-light-client-data=1 --import-light-client-data=only-new \
--dump $(NODE_PARAMS)
endef

Expand Down
14 changes: 13 additions & 1 deletion scripts/launch_local_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [[ ${PIPESTATUS[0]} != 4 ]]; then
fi

OPTS="ht:n:d:g"
LONGOPTS="help,preset:,nodes:,data-dir:,with-ganache,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:"
LONGOPTS="help,preset:,nodes:,data-dir:,with-ganache,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:,serve-light-client-data:,import-light-client-data:"

# default values
NUM_NODES="10"
Expand All @@ -64,6 +64,8 @@ TIMEOUT_DURATION="0"
CONST_PRESET="mainnet"
KILL_OLD_PROCESSES="0"
ETH2_DOCKER_IMAGE=""
SERVE_LIGHT_CLIENT_DATA="1"
IMPORT_LIGHT_CLIENT_DATA="only-new"

print_help() {
cat <<EOF
Expand Down Expand Up @@ -187,6 +189,14 @@ while true; do
LIGHTHOUSE_VC_NODES="$2"
shift 2
;;
--serve-light-client-data)
SERVE_LIGHT_CLIENT_DATA="$2"
shift 2
;;
--import-light-client-data)
IMPORT_LIGHT_CLIENT_DATA="$2"
shift 2
;;
--)
shift
break
Expand Down Expand Up @@ -597,6 +607,8 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
${STOP_AT_EPOCH_FLAG} \
--rest-port="$(( BASE_REST_PORT + NUM_NODE ))" \
--metrics-port="$(( BASE_METRICS_PORT + NUM_NODE ))" \
--serve-light-client-data="${SERVE_LIGHT_CLIENT_DATA}" \
--import-light-client-data="${IMPORT_LIGHT_CLIENT_DATA}" \
${EXTRA_ARGS} \
&> "${DATA_DIR}/log${NUM_NODE}.txt" &

Expand Down

0 comments on commit 4c38bfe

Please sign in to comment.