Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE for standalone network #492

Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/build-soroban-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 \
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions local/core/etc/stellar-core.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
1 change: 1 addition & 0 deletions local/horizon/etc/stellar-captive-core.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions local/soroban-rpc/etc/stellar-captive-core.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 20 additions & 1 deletion start
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be checking for NETWORK=local now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened fix in #493

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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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=
Expand Down