Skip to content

Commit

Permalink
Use JWT from staker tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed Aug 7, 2024
1 parent 5e868da commit e6abccb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions beacon-chain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ 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} \
NIMBUS_BIN="/home/user/nimbus_beacon_node" \
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/

Expand Down
6 changes: 4 additions & 2 deletions beacon-chain/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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."

Expand Down
1 change: 0 additions & 1 deletion beacon-chain/jwtsecret.hex

This file was deleted.

0 comments on commit e6abccb

Please sign in to comment.