diff --git a/.github/workflows/build-soroban-dev.yml b/.github/workflows/build-soroban-dev.yml index 12670cc6..4d4da37f 100644 --- a/.github/workflows/build-soroban-dev.yml +++ b/.github/workflows/build-soroban-dev.yml @@ -36,6 +36,7 @@ jobs: tag: soroban-dev-amd64 core_ref: v20.0.0rc1 core_configure_flags: --disable-tests + core_supports_testing_soroban_high_limit_override: 'true' go_ref: soroban-v1.0.0-rc soroban_tools_ref: v20.0.0-rc1 test_matrix: | @@ -54,6 +55,7 @@ jobs: tag: soroban-dev-arm64 core_ref: v20.0.0rc1 core_configure_flags: --disable-tests + core_supports_testing_soroban_high_limit_override: 'true' core_build_runner_type: ubuntu-latest-16-cores go_ref: soroban-v1.0.0-rc soroban_tools_ref: v20.0.0-rc1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af3edca2..cdfb71c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,10 @@ on: description: 'CONFIGURE_FLAGS used when building stellar-core' type: 'string' default: '--disable-tests' + core_supports_testing_soroban_high_limit_override: + description: 'Indicator whether stellar-core supports the TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE config' + type: 'string' + default: 'false' core_build_runner_type: description: 'The GitHub Runner instance type to build stellar-core on' type: 'string' @@ -218,7 +222,7 @@ jobs: # save can. Once buildx supports it we can update. # https://github.com/docker/buildx/issues/847 - name: Build Quickstart Image - run: docker build --platform linux/${{ inputs.arch }} -f Dockerfile -t $IMAGE --label org.opencontainers.image.revision="${{ env.HEAD_SHA }}" . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:${{ inputs.arch }} + run: docker build --platform linux/${{ inputs.arch }} -f Dockerfile -t $IMAGE --label org.opencontainers.image.revision="${{ env.HEAD_SHA }}" . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:${{ inputs.arch }} --build-arg CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=${{ inputs.core_supports_testing_soroban_high_limit_override }} - name: Save Quickstart Image run: docker save $IMAGE -o /tmp/image - name: Upload Quickstart Image diff --git a/Dockerfile b/Dockerfile index f868c9ee..4a0a2aec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,8 @@ ADD pubnet /opt/stellar-default/pubnet ADD testnet /opt/stellar-default/testnet ADD futurenet /opt/stellar-default/futurenet +ARG CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE +ENV CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE $CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE ADD start / RUN ["chmod", "+x", "start"] diff --git a/Makefile b/Makefile index 85c34423..29a3a582 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-de TAG?=dev CORE_REF?=master CORE_CONFIGURE_FLAGS?=--disable-tests +CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE?=false SOROBAN_RPC_REF?=main HORIZON_REF?=$(shell ./scripts/soroban_repo_to_horizon_repo.sh $(SOROBAN_RPC_REF)) FRIENDBOT_REF?=$(HORIZON_REF) @@ -13,6 +14,9 @@ run: logs: docker exec stellar /bin/sh -c 'tail -F /var/log/supervisor/*' +console: + docker exec -it stellar /bin/bash + build-latest: $(MAKE) build TAG=latest \ CORE_REF=v19.13.0 \ @@ -29,12 +33,13 @@ build-soroban-dev: $(MAKE) build TAG=soroban-dev \ CORE_REF=v20.0.0rc1 \ CORE_CONFIGURE_FLAGS='--disable-tests' \ + CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=true \ HORIZON_REF=soroban-v1.0.0-rc \ SOROBAN_RPC_REF=v20.0.0-rc1 build: $(MAKE) -j 4 build-deps - docker build -t stellar/quickstart:$(TAG) -f Dockerfile . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:$(SOROBAN_RPC_REF) + docker build -t stellar/quickstart:$(TAG) -f Dockerfile . --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) --build-arg SOROBAN_RPC_IMAGE_REF=stellar-soroban-rpc:$(SOROBAN_RPC_REF) --build-arg CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=$(CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE) build-deps: build-deps-core build-deps-horizon build-deps-friendbot build-deps-soroban-rpc diff --git a/local/core/etc/stellar-core.cfg b/local/core/etc/stellar-core.cfg index 05a60aa7..238886e8 100644 --- a/local/core/etc/stellar-core.cfg +++ b/local/core/etc/stellar-core.cfg @@ -6,6 +6,7 @@ PUBLIC_HTTP_PORT=true RUN_STANDALONE=__RUN_STANDALONE__ MANUAL_CLOSE=__MANUAL_CLOSE__ ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true +__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__ NETWORK_PASSPHRASE="__NETWORK__" KNOWN_CURSORS=["HORIZON"] diff --git a/local/horizon/etc/stellar-captive-core.cfg b/local/horizon/etc/stellar-captive-core.cfg index 14bfe3fa..e5e7ff21 100644 --- a/local/horizon/etc/stellar-captive-core.cfg +++ b/local/horizon/etc/stellar-captive-core.cfg @@ -7,6 +7,7 @@ PUBLIC_HTTP_PORT=false PEER_PORT=11725 DATABASE="__DATABASE__" ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true +__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__ UNSAFE_QUORUM=true FAILURE_SAFETY=0 diff --git a/local/soroban-rpc/etc/stellar-captive-core.cfg b/local/soroban-rpc/etc/stellar-captive-core.cfg index 24cfe337..45ea73d0 100644 --- a/local/soroban-rpc/etc/stellar-captive-core.cfg +++ b/local/soroban-rpc/etc/stellar-captive-core.cfg @@ -7,6 +7,7 @@ PUBLIC_HTTP_PORT=false PEER_PORT=11726 DATABASE="__DATABASE__" ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true +__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__ ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ EXPERIMENTAL_BUCKETLIST_DB=true diff --git a/start b/start index 90bb310e..6e68884a 100644 --- a/start +++ b/start @@ -27,6 +27,7 @@ export PGPORT=5432 : "${ENABLE_SOROBAN_DIAGNOSTIC_EVENTS:=false}" : "${ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT:=false}" : "${ENABLE_CORE_MANUAL_CLOSE:=false}" +: "${CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE:=false}" QUICKSTART_INITIALIZED=false CURRENT_POSTGRES_PID="" @@ -361,6 +362,12 @@ function init_stellar_core() { run_silent "finalize-core-config-run-local" perl -pi -e "s/__RUN_STANDALONE__/$RUN_STANDALONE/g" etc/stellar-core.cfg run_silent "finalize-core-config-manual-close" perl -pi -e "s/__MANUAL_CLOSE__/$ENABLE_CORE_MANUAL_CLOSE/g" etc/stellar-core.cfg + if [ "$NETWORK" = "standalone" ] && [ "${CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE}" = "true" ]; then + run_silent "finalize-core-config-testing-soroban-high-limit-override-set-true" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__/TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=true/g" etc/stellar-core.cfg + else + run_silent "finalize-core-config-testing-soroban-high-limit-override-unset" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__//g" etc/stellar-core.cfg + fi + start_postgres run_silent "init-core-db" sudo -u stellar stellar-core new-db --conf etc/stellar-core.cfg @@ -397,6 +404,12 @@ function init_horizon() { run_silent "finalize-horizon-captivecore-db" perl -pi -e "s*__DATABASE__*sqlite3://$HZHOME/captive-core/stellar.db*g" $HORIZON_CAPTIVE_CORE_CFG perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" $HORIZON_CAPTIVE_CORE_CFG + if [ "$NETWORK" = "standalone" ] && [ "${CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE}" = "true" ]; then + run_silent "finalize-horizon-captivecore-config-testing-soroban-high-limit-override-set-true" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__/TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=true/g" $HORIZON_CAPTIVE_CORE_CFG + else + run_silent "finalize-horizon-captivecore-config-testing-soroban-high-limit-override-unset" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__//g" $HORIZON_CAPTIVE_CORE_CFG + fi + cat << EOF >> etc/horizon.env export ENABLE_CAPTIVE_CORE_INGESTION=true export STELLAR_CORE_BINARY_PATH=/usr/bin/stellar-core @@ -438,7 +451,13 @@ function init_soroban_rpc() { run_silent "finalize-soroban-rpc-captivecore-db" perl -pi -e "s*__DATABASE__*sqlite3://$SOROBAN_RPC_HOME/captive-core/stellar-rpc.db*g" $SOROBAN_RPC_CAPTIVE_CORE_CFG perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" $SOROBAN_RPC_CAPTIVE_CORE_CFG run_silent "finalize-core-config-enable-soroban-diagnostic-events" perl -pi -e "s/__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__/$ENABLE_SOROBAN_DIAGNOSTIC_EVENTS/g" $SOROBAN_RPC_CAPTIVE_CORE_CFG - + + if [ "$NETWORK" = "standalone" ] && [ "${CORE_SUPPORTS_TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE}" = "true" ]; then + run_silent "finalize-soroban-rpc-captivecore-config-testing-soroban-high-limit-override-set-true" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__/TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE=true/g" $SOROBAN_RPC_CAPTIVE_CORE_CFG + else + run_silent "finalize-soroban-rpc-captivecore-config-testing-soroban-high-limit-override-unset" perl -pi -e "s/__TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE__//g" $SOROBAN_RPC_CAPTIVE_CORE_CFG + fi + local ADMIN_ENDPOINT=0.0.0.0:6061 if [ "$ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT" != "true" ]; then ADMIN_ENDPOINT=