From 4a2ae8a1f78bddab8313bc86d2ff3a2440fbd8e5 Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Sat, 26 Aug 2023 06:20:44 +0200 Subject: [PATCH] nimbus needs build files --- nimbus/Dockerfile | 12 ++++++++++++ nimbus/entrypoint.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 nimbus/Dockerfile create mode 100644 nimbus/entrypoint.sh diff --git a/nimbus/Dockerfile b/nimbus/Dockerfile new file mode 100644 index 00000000..b278e19e --- /dev/null +++ b/nimbus/Dockerfile @@ -0,0 +1,12 @@ +ARG UPSTREAM_VERSION + +FROM statusim/nimbus-eth2:multiarch-${UPSTREAM_VERSION} + +USER root +RUN apt update && apt install curl jq -y + +COPY entrypoint.sh /usr/bin/entrypoint.sh +COPY auth-token /home/user/nimbus-eth2/build/data/auth-token +COPY jwtsecret.hex /jwtsecret + +ENTRYPOINT [ "entrypoint.sh" ] \ No newline at end of file diff --git a/nimbus/entrypoint.sh b/nimbus/entrypoint.sh new file mode 100644 index 00000000..1363861b --- /dev/null +++ b/nimbus/entrypoint.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +NETWORK="mainnet" +VALIDATOR_PORT=3500 + +DATA_DIR="/home/user/nimbus-eth2/build/data" +VALIDATORS_DIR="${DATA_DIR}/validators" +TOKEN_FILE="${DATA_DIR}/auth-token" + +mkdir -p ${VALIDATORS_DIR} + +HTTP_ENGINE=${EXECUTION_ENDPOINT} + +# Run checkpoint sync script if provided +[[ -n $CHECKPOINT_SYNC_URL ]] && + /home/user/nimbus-eth2/build/nimbus_beacon_node trustedNodeSync \ + --network=${NETWORK} \ + --trusted-node-url=${CHECKPOINT_SYNC_URL} \ + --backfill=false \ + --data-dir=//home/user/nimbus-eth2/build/data + +exec -c /home/user/nimbus_beacon_node \ + --network=${NETWORK} \ + --data-dir=${DATA_DIR} \ + --tcp-port=$P2P_TCP_PORT \ + --udp-port=$P2P_UDP_PORT \ + --validators-dir=${VALIDATORS_DIR} \ + --log-level=${LOG_TYPE} \ + --rest \ + --rest-port=4500 \ + --rest-address=0.0.0.0 \ + --metrics \ + --metrics-address=0.0.0.0 \ + --metrics-port=8008 \ + --keymanager \ + --keymanager-port=${VALIDATOR_PORT} \ + --keymanager-address=0.0.0.0 \ + --keymanager-token-file=${TOKEN_FILE} \ + --graffiti="${graffitiString}" \ + --jwt-secret=/jwtsecret \ + --web3-url=$HTTP_ENGINE \ + --suggested-fee-recipient="${FEE_RECIPIENT_ADDRESS}" \ + $EXTRA_OPTS