Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/auto_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: npx @dappnode/dappnodesdk github-action bump-upstream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
name: Build test
if: github.event_name != 'push'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: npx @dappnode/dappnodesdk build --skip_save

release:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Publish
run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset
env:
Expand Down
4 changes: 2 additions & 2 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "stakewise-operator-prater.dnp.dappnode.eth",
"name": "stakewise-operator-holesky.dnp.dappnode.eth",
"version": "0.1.0",
"upstreamVersion": "v1.0.7",
"upstreamRepo": "stakewise/v3-operator",
Expand All @@ -14,7 +14,7 @@
"license": "GPL-3.0",
"globalEnvs": [
{
"envs": ["CONSENSUS_CLIENT_PRATER", "EXECUTION_CLIENT_PRATER"],
"envs": ["CONSENSUS_CLIENT_HOLESKY", "EXECUTION_CLIENT_HOLESKY"],
"services": ["operator"]
}
],
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3.5"
services:
operator:
image: "operator.stakewise-operator-prater.dnp.dappnode.eth:0.1.0"
build:
context: operator
args:
Expand Down
2 changes: 2 additions & 0 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FROM europe-west4-docker.pkg.dev/stakewiselabs/public/v3-operator:${UPSTREAM_VER

RUN mkdir -p /app/data/keystores /app/data/operator /app/data/stakewise

ENV NETWORK=holesky

USER root

# Install python3
Expand Down
56 changes: 33 additions & 23 deletions operator/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,66 @@

# TODO: Allow adding more than 1 keystore (upload compressed file and extract inside keystore dir)

# NETWORK to upper case
UPPER_CASE_NETWORK=$(echo "$NETWORK" | tr '[:lower:]' '[:upper:]')

get_execution_endpoint() {
case $_DAPPNODE_GLOBAL_EXECUTION_CLIENT_PRATER in
"goerli-geth.dnp.dappnode.eth")
echo "http://goerli-geth.dappnode:8545"
case $_DAPPNODE_GLOBAL_EXECUTION_CLIENT_${UPPER_CASE_NETWORK} in
"${NETWORK}-geth.dnp.dappnode.eth")
echo "http://${NETWORK}-geth.dappnode:8545"
;;
"goerli-nethermind.dnp.dappnode.eth")
echo "http://goerli-nethermind.dappnode:8545"
"${NETWORK}-nethermind.dnp.dappnode.eth")
echo "http://${NETWORK}-nethermind.dappnode:8545"
;;
"goerli-besu.dnp.dappnode.eth")
echo "http://goerli-besu.dappnode:8545"
"${NETWORK}-besu.dnp.dappnode.eth")
echo "http://${NETWORK}-besu.dappnode:8545"
;;
"goerli-erigon.dnp.dappnode.eth")
echo "http://goerli-erigon.dappnode:8545"
"${NETWORK}-erigon.dnp.dappnode.eth")
echo "http://${NETWORK}-erigon.dappnode:8545"
;;
*)
echo "$_DAPPNODE_GLOBAL_EXECUTION_CLIENT_PRATER"
echo "$_DAPPNODE_GLOBAL_EXECUTION_CLIENT_${UPPER_CASE_NETWORK}"
;;
esac
}

get_beacon_node_endpoint() {
case "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_PRATER" in
"prysm-prater.dnp.dappnode.eth")
echo "http://beacon-chain.prysm-prater.dappnode:3500"
case "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_${UPPER_CASE_NETWORK}" in
"prysm-${NETWORK}.dnp.dappnode.eth")
echo "http://beacon-chain.prysm-${NETWORK}.dappnode:3500"
;;
"teku-prater.dnp.dappnode.eth")
echo "http://beacon-chain.teku-prater.dappnode:3500"
"teku-${NETWORK}.dnp.dappnode.eth")
echo "http://beacon-chain.teku-${NETWORK}.dappnode:3500"
;;
"lighthouse-prater.dnp.dappnode.eth")
echo "http://beacon-chain.lighthouse-prater.dappnode:3500"
"lighthouse-${NETWORK}.dnp.dappnode.eth")
echo "http://beacon-chain.lighthouse-${NETWORK}.dappnode:3500"
;;
"nimbus-prater.dnp.dappnode.eth")
echo "http://beacon-validator.nimbus-prater.dappnode:4500"
"nimbus-${NETWORK}.dnp.dappnode.eth")
echo "http://beacon-validator.nimbus-${NETWORK}.dappnode:4500"
;;
"lodestar-prater.dnp.dappnode.eth")
echo "http://beacon-chain.lodestar-prater.dappnode:3500"
"lodestar-${NETWORK}.dnp.dappnode.eth")
echo "http://beacon-chain.lodestar-${NETWORK}.dappnode:3500"
;;
*)
echo "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_PRATER"
echo "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_${UPPER_CASE_NETWORK}"
;;
esac
}

# These files need to be uploaded (via setup wizard or restoring backup)
if [ ! -f "/app/data/operator/wallet.json" ] || [ ! -f "/app/data/operator/deposit_data.json" ] || [ ! -f "/app/data/keystores/keystore.json" ]; then
echo "Waiting for files to be uploaded (operator wallet, validator key and deposit files)..."
sleep 600
exit 1
fi

# Write keystore password to file
echo "$KEYSTORES_PASSWORD" >/app/data/keystores/password.txt

# Write hot wallet password to file
echo "$OPERATOR_WALLET_PASSWORD" >/app/data/operator/password.txt

exec python3 /app/src/main.py start --network goerli \
exec python3 /app/src/main.py start --network ${NETWORK} \
--deposit-data-file /app/data/deposit_data.json \
--keystores-dir /app/data/keystores \
--keystores-password-file /app/data/keystores/password.txt \
Expand Down