From 2169d3d82604e60a4bbef50ee8e7ae0a6f0a0c01 Mon Sep 17 00:00:00 2001 From: yorickdowne <71337066+yorickdowne@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:13:39 -0400 Subject: [PATCH] Nethermind executable names for v1.21 (#1524) * Nethermind executable names for v1.21 * Do not offer Erigon on Gnosis ARM64 --- .github/check-service.sh | 6 ++---- ethd | 21 ++++++++++++++------- nethermind.yml | 3 +-- nethermind/Dockerfile.binary | 5 +++-- nethermind/Dockerfile.source | 3 ++- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/check-service.sh b/.github/check-service.sh index 39e0d83c..6113749d 100755 --- a/.github/check-service.sh +++ b/.github/check-service.sh @@ -4,12 +4,10 @@ __service=$1 __containerID=$(docker-compose ps -q "${__service}") -__initial_restart_count=$(docker inspect --format '{{ .RestartCount }}' "$__containerID") +__restart_count=$(docker inspect --format '{{ .RestartCount }}' "$__containerID") __is_running=$(docker inspect --format '{{ .State.Running }}' "$__containerID") -sleep 10 -__final_restart_count=$(docker inspect --format '{{ .RestartCount }}' "$__containerID") -if [ "$__is_running" != "true" ] || [ "$__final_restart_count" -gt "$__initial_restart_count" ]; then +if [ "$__is_running" != "true" ] || [ "$__restart_count" -gt 1 ]; then echo "$__service is either not running or continuously restarting" docker-compose ps "${__service}" docker-compose logs "${__service}" diff --git a/ethd b/ethd index e5199329..62d178f7 100755 --- a/ethd +++ b/ethd @@ -2089,18 +2089,25 @@ again or Cancel on the next screen." 10 75 query_execution_client() { if [ "${NETWORK}" = "gnosis" ]; then - EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ - "Which execution client do you want to run?" 9 60 2 \ - "nethermind.yml" "Nethermind (.NET)" \ - "erigon.yml" "Erigon (Go)" 3>&1 1>&2 2>&3) - elif [ "${NETWORK}" = "zhejiang" ]; then - EXECUTION_CLIENT=nethermind.yml + if uname -a | grep -q aarch64; then + EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ + "Which execution client do you want to run?" 9 60 2 \ + "nethermind.yml" "Nethermind (.NET)" \ + "NONE" "Custom - Distributed" 3>&1 1>&2 2>&3) + else + EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ + "Which execution client do you want to run?" 9 60 2 \ + "nethermind.yml" "Nethermind (.NET)" \ + "erigon.yml" "Erigon (Go)" \ + "NONE" "Custom - Distributed" 3>&1 1>&2 2>&3) + fi elif uname -a | grep -q aarch64; then EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ "Which execution client do you want to run?" 9 60 3 \ "besu.yml" "Besu (Java)" \ "nethermind.yml" "Nethermind (.NET)" \ - "geth.yml" "Geth (Go)" 3>&1 1>&2 2>&3) + "geth.yml" "Geth (Go)" \ + "NONE" "Custom - Distributed" 3>&1 1>&2 2>&3) else EXECUTION_CLIENT=$(whiptail --notags --title "Select execution client" --menu \ "Which execution client do you want to run?" 12 60 5 \ diff --git a/nethermind.yml b/nethermind.yml index 3db6027d..ce4d1168 100644 --- a/nethermind.yml +++ b/nethermind.yml @@ -42,8 +42,7 @@ services: <<: *logging entrypoint: - docker-entrypoint.sh - - dotnet - - /nethermind/Nethermind.Runner.dll + - /nethermind/nethermind - --datadir - /var/lib/nethermind - --Init.WebSocketsEnabled diff --git a/nethermind/Dockerfile.binary b/nethermind/Dockerfile.binary index 324d200e..6bc6b979 100644 --- a/nethermind/Dockerfile.binary +++ b/nethermind/Dockerfile.binary @@ -36,7 +36,8 @@ RUN set -eux; \ # This only goes so far. keystore, logs and nethermind_db are volumes and need to be chown'd in the entrypoint RUN chown -R ${USER}:${USER} /nethermind -RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind && chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret +RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind \ +&& chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret # Cannot assume buildkit, hence no chmod COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/ @@ -45,4 +46,4 @@ RUN chmod -R 755 /usr/local/bin/* USER ${USER} -ENTRYPOINT ["dotnet","/nethermind/Nethermind.Runner.dll"] +ENTRYPOINT ["./nethermind"] diff --git a/nethermind/Dockerfile.source b/nethermind/Dockerfile.source index f1f0886f..8ec62c12 100644 --- a/nethermind/Dockerfile.source +++ b/nethermind/Dockerfile.source @@ -49,7 +49,8 @@ WORKDIR /nethermind COPY --from=build --chown=${USER}:${USER} /nethermind/out . RUN chown -R ${USER}:${USER} /nethermind -RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind && chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret +RUN mkdir -p /var/lib/nethermind/ee-secret && chown -R ${USER}:${USER} /var/lib/nethermind \ +&& chmod -R 700 /var/lib/nethermind && chmod 777 /var/lib/nethermind/ee-secret # Cannot assume buildkit, hence no chmod COPY --chown=${USER}:${USER} ./docker-entrypoint.sh /usr/local/bin/