From d97c7265fc43ac41f010347665ef4c14466ce6c9 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:46:36 +1000 Subject: [PATCH 1/4] Require PROTOCOL_VERSION_DEFAULT --- Dockerfile | 1 + Makefile | 2 +- start | 5 ----- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 023604d5..1d3d93c8 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 "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 From e45df66881d1bbccc3bb0d728a2d9bfa204d12d9 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:56:39 -0800 Subject: [PATCH 2/4] typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d3d93c8..4fe3a29f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ ADD start / RUN ["chmod", "+x", "start"] ARG PROTOCOL_VERSION_DEFAULT -RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "PROTOCOL_VERSION_DEFAULT required and not set" && false) +RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "PROTOCOL_VERSION_DEFAULT required and not set" && false) ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT ENTRYPOINT ["/start"] From c457927e693f83d3d7caafc2273503a878324b97 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:57:28 -0800 Subject: [PATCH 3/4] tweak --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4fe3a29f..3ec83004 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ ADD start / RUN ["chmod", "+x", "start"] ARG PROTOCOL_VERSION_DEFAULT -RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "PROTOCOL_VERSION_DEFAULT required and not set" && false) +RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "Docker build arg PROTOCOL_VERSION_DEFAULT required and not set" && false) ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT ENTRYPOINT ["/start"] From c7ae6214b17575ffa12c688c4efb336e80f8d365 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:57:46 -0800 Subject: [PATCH 4/4] tweak --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3ec83004..f3d59c12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ ADD start / RUN ["chmod", "+x", "start"] ARG PROTOCOL_VERSION_DEFAULT -RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "Docker build arg PROTOCOL_VERSION_DEFAULT required and not set" && false) +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"]