From e6abccb5d7333d5f0551825014761f8808564818 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 7 Aug 2024 16:46:28 +0200 Subject: [PATCH] Use JWT from staker tools --- beacon-chain/Dockerfile | 3 +-- beacon-chain/entrypoint.sh | 6 ++++-- beacon-chain/jwtsecret.hex | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 beacon-chain/jwtsecret.hex diff --git a/beacon-chain/Dockerfile b/beacon-chain/Dockerfile index ea54295..ef42ff9 100644 --- a/beacon-chain/Dockerfile +++ b/beacon-chain/Dockerfile @@ -7,7 +7,7 @@ ARG STAKER_SCRIPTS_VERSION ARG DATA_DIR ARG P2P_PORT -ENV JWT_SECRET_FILE=/jwtsecret \ +ENV JWT_SECRET_FILE=/jwtsecret.hex \ VALIDATOR_PORT=3500 \ DATA_DIR=${DATA_DIR} \ P2P_PORT=${P2P_PORT} \ @@ -15,7 +15,6 @@ ENV JWT_SECRET_FILE=/jwtsecret \ STAKER_SCRIPTS_URL=https://github.com/dappnode/staker-package-scripts/releases/download/${STAKER_SCRIPTS_VERSION} COPY entrypoint.sh /usr/local/bin/entrypoint.sh -COPY jwtsecret.hex ${JWT_SECRET_FILE} ADD ${STAKER_SCRIPTS_URL}/consensus_tools.sh /etc/profile.d/ diff --git a/beacon-chain/entrypoint.sh b/beacon-chain/entrypoint.sh index f0e371c..1e874d3 100755 --- a/beacon-chain/entrypoint.sh +++ b/beacon-chain/entrypoint.sh @@ -1,15 +1,17 @@ #!/bin/sh -SUPPORTED_NETWORKS="gnosis holesky mainnet" MEVBOOST_FLAG_KEYS="--payload-builder=true --payload-builder-url" # shellcheck disable=SC1091 # Path is relative to the Dockerfile . /etc/profile -ENGINE_URL=$(get_engine_api_url "${NETWORK}" "${SUPPORTED_NETWORKS}") +ENGINE_URL="http://execution.${NETWORK}.staker.dappnode:8551" VALID_FEE_RECIPIENT=$(get_valid_fee_recipient "${FEE_RECIPIENT}") MEVBOOST_FLAG=$(get_mevboost_flag "${NETWORK}" "${MEVBOOST_FLAG_KEYS}") +JWT_SECRET=$(get_jwt_secret_by_network "${NETWORK}") +echo "${JWT_SECRET}" >"${JWT_FILE_PATH}" + if [ -n "$(ls -A "${DATA_DIR}/db" 2>/dev/null)" ]; then echo "[INFO - entrypoint] Data directory has already been initialized, skipping checkpoint sync." diff --git a/beacon-chain/jwtsecret.hex b/beacon-chain/jwtsecret.hex deleted file mode 100644 index 53d2fa8..0000000 --- a/beacon-chain/jwtsecret.hex +++ /dev/null @@ -1 +0,0 @@ -7ad9cfdec75eceb662f5e48f5765701c17f51a5233a60fbcfa5f9e495fa99d17 \ No newline at end of file