Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JWT from staker tools #3

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

12 changes: 1 addition & 11 deletions package_variants/gnosis/dappnode_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,5 @@
"homepage": "https://nimbus.team/",
"readme": "https://github.com/dappnode/DAppNodePackage-nimbus-generic",
"docs": "https://nimbus.guide"
},
"globalEnvs": [
{
"envs": ["EXECUTION_CLIENT_GNOSIS", "MEVBOOST_GNOSIS"],
"services": ["beacon-chain"]
},
{
"envs": ["MEVBOOST_GNOSIS"],
"services": ["validator"]
}
]
}
}
6 changes: 1 addition & 5 deletions package_variants/holesky/dappnode_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
"docs": "https://nimbus.guide"
},
"globalEnvs": [
{
"envs": ["EXECUTION_CLIENT_HOLESKY", "MEVBOOST_HOLESKY"],
"services": ["beacon-chain"]
},
{
"envs": ["MEVBOOST_HOLESKY"],
"services": ["validator"]
"services": ["validator", "beacon-chain"]
}
]
}
6 changes: 1 addition & 5 deletions package_variants/mainnet/dappnode_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
"docs": "https://nimbus.guide"
},
"globalEnvs": [
{
"envs": ["EXECUTION_CLIENT_MAINNET", "MEVBOOST_MAINNET"],
"services": ["beacon-chain"]
},
{
"envs": ["MEVBOOST_MAINNET"],
"services": ["validator"]
"services": ["validator", "beacon-chain"]
}
]
}