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 1c36b0a commit 0337c87
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,13 +7,12 @@ ARG P2P_PORT
ARG DATA_DIR
ARG STAKER_SCRIPTS_VERSION

ENV JWT_SECRET_FILE=/jwtsecret \
ENV JWT_SECRET_FILE=/jwtsecret.hex \
P2P_PORT=${P2P_PORT} \
DATA_DIR=${DATA_DIR} \
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,18 +1,20 @@
#!/bin/sh

SUPPORTED_NETWORKS="gnosis holesky mainnet lukso"
CHECKPOINT_SYNC_FLAG="--initial-state"
MEVBOOST_FLAG_KEYS="--builder-endpoint"
TEKU_FORMAT_CHECKPOINT_URL="$(echo "${CHECKPOINT_SYNC_URL}" | sed 's:/*$::')/eth/v2/debug/beacon/states/finalized"

# 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}")
CHECKPOINT_SYNC_FLAG=$(get_checkpoint_sync_flag "${CHECKPOINT_SYNC_FLAG}" "${TEKU_FORMAT_CHECKPOINT_URL}")
MEVBOOST_FLAG=$(get_mevboost_flag "${NETWORK}" "${MEVBOOST_FLAG_KEYS}")

JWT_SECRET=$(get_jwt_secret_by_network "${NETWORK}")
echo "${JWT_SECRET}" >"${JWT_FILE_PATH}"

echo "[INFO - entrypoint] Starting beacon node"

# shellcheck disable=SC2086
Expand Down
1 change: 0 additions & 1 deletion beacon-chain/jwtsecret.hex

This file was deleted.

0 comments on commit 0337c87

Please sign in to comment.