From 65efdfc6007752274a877505afa33f76c6eb556b Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:22:44 +1000 Subject: [PATCH] Require PROTOCOL_VERSION_DEFAULT (#655) --- Dockerfile | 1 + Makefile | 2 +- start | 5 ----- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 023604d5..f3d59c12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,6 +53,7 @@ ADD start / RUN ["chmod", "+x", "start"] ARG PROTOCOL_VERSION_DEFAULT +RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "Image build arg PROTOCOL_VERSION_DEFAULT required and not set" && false) ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT ENTRYPOINT ["/start"] diff --git a/Makefile b/Makefile index ed029899..57e1a5da 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-de REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty) TAG?=dev -PROTOCOL_VERSION_DEFAULT?= +PROTOCOL_VERSION_DEFAULT?=22 XDR_REPO?=https://github.com/stellar/rs-stellar-xdr.git XDR_REF?=main CORE_REPO?=https://github.com/stellar/stellar-core.git diff --git a/start b/start index b138ad69..bc679b39 100644 --- a/start +++ b/start @@ -531,11 +531,6 @@ function upgrade_local() { # Wait for server while ! echo "Stellar-core http server listening!" | nc localhost 11626 &> /dev/null; do sleep 1; done - # Default to latest version supported by core if no default or explicit version was set - if [ -z "$PROTOCOL_VERSION" ]; then - export PROTOCOL_VERSION=`curl -s http://localhost:11626/info | jq -r '.info.protocol_version'` - fi - if [ ".$PROTOCOL_VERSION" == ".none" ] ; then return fi