From e1f62bf34cf047156dbb599b3c7dff52283ac696 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Tue, 10 Dec 2024 07:28:21 +0100 Subject: [PATCH] Rename soroban-rpc to stellar-rpc (#644) --- .do/deploy.template.yaml | 2 +- .github/workflows/build-future.yml | 4 +- .github/workflows/build-latest.yml | 4 +- .github/workflows/build-testing.yml | 4 +- .github/workflows/build.yml | 58 ++++++------ Dockerfile | 6 +- Makefile | 22 ++--- README.md | 18 ++-- .../{soroban-rpc.conf => stellar-rpc.conf} | 0 common/soroban-rpc/bin/start | 7 -- common/stellar-rpc/bin/start | 7 ++ .../etc/supervisord.conf.d/soroban-rpc.conf | 9 -- .../etc/supervisord.conf.d/stellar-rpc.conf | 9 ++ .../etc/stellar-captive-core.cfg | 0 .../etc/stellar-rpc.cfg} | 8 +- .../etc/stellar-captive-core.cfg | 0 .../etc/stellar-rpc.cfg} | 8 +- .../etc/stellar-captive-core.cfg | 0 .../etc/stellar-rpc.cfg} | 8 +- scripts/rpc_repo_to_horizon_repo.sh | 31 +++++++ scripts/soroban_repo_to_horizon_repo.sh | 31 ------- start | 93 ++++++++++--------- ..._healthy.go => test_stellar_rpc_healthy.go | 6 +- ...oroban_rpc_up.go => test_stellar_rpc_up.go | 6 +- .../etc/stellar-captive-core.cfg | 0 .../etc/stellar-rpc.cfg} | 8 +- 26 files changed, 179 insertions(+), 170 deletions(-) rename common/nginx/etc/conf.d/{soroban-rpc.conf => stellar-rpc.conf} (100%) delete mode 100755 common/soroban-rpc/bin/start create mode 100755 common/stellar-rpc/bin/start delete mode 100644 common/supervisor/etc/supervisord.conf.d/soroban-rpc.conf create mode 100644 common/supervisor/etc/supervisord.conf.d/stellar-rpc.conf rename futurenet/{soroban-rpc => stellar-rpc}/etc/stellar-captive-core.cfg (100%) rename futurenet/{soroban-rpc/etc/soroban-rpc.cfg => stellar-rpc/etc/stellar-rpc.cfg} (60%) rename local/{soroban-rpc => stellar-rpc}/etc/stellar-captive-core.cfg (100%) rename local/{soroban-rpc/etc/soroban-rpc.cfg => stellar-rpc/etc/stellar-rpc.cfg} (60%) rename pubnet/{soroban-rpc => stellar-rpc}/etc/stellar-captive-core.cfg (100%) rename pubnet/{soroban-rpc/etc/soroban-rpc.cfg => stellar-rpc/etc/stellar-rpc.cfg} (56%) create mode 100755 scripts/rpc_repo_to_horizon_repo.sh delete mode 100755 scripts/soroban_repo_to_horizon_repo.sh rename test_soroban_rpc_healthy.go => test_stellar_rpc_healthy.go (87%) rename test_soroban_rpc_up.go => test_stellar_rpc_up.go (87%) rename testnet/{soroban-rpc => stellar-rpc}/etc/stellar-captive-core.cfg (100%) rename testnet/{soroban-rpc/etc/soroban-rpc.cfg => stellar-rpc/etc/stellar-rpc.cfg} (59%) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index abec5077d..b87e61676 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -19,7 +19,7 @@ spec: - key: NETWORK value: 'local' scope: RUN_TIME - - key: ENABLE_SOROBAN_RPC + - key: ENABLE_RPC value: 'false' scope: RUN_TIME - key: DISABLE_SOROBAN_DIAGNOSTIC_EVENTS diff --git a/.github/workflows/build-future.yml b/.github/workflows/build-future.yml index 33ae129ca..e93fcc311 100644 --- a/.github/workflows/build-future.yml +++ b/.github/workflows/build-future.yml @@ -35,7 +35,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.0.0-rc3 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { @@ -59,7 +59,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.0.0-rc3 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml index 7817010ba..fe69c4e80 100644 --- a/.github/workflows/build-latest.yml +++ b/.github/workflows/build-latest.yml @@ -36,7 +36,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.1.0 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { @@ -60,7 +60,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.1.0 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { diff --git a/.github/workflows/build-testing.yml b/.github/workflows/build-testing.yml index ecc1b2511..e3b472a2c 100644 --- a/.github/workflows/build-testing.yml +++ b/.github/workflows/build-testing.yml @@ -37,7 +37,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.1.0 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { @@ -61,7 +61,7 @@ jobs: xdr_ref: v22.0.0 core_ref: v22.0.0 horizon_ref: horizon-v22.0.1 - soroban_rpc_ref: v22.1.0 + stellar_rpc_ref: v22.1.1 friendbot_ref: horizon-v22.0.1 test_matrix: | { diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24820387e..8c4e2e837 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,8 +42,8 @@ on: description: 'Git ref for the stellar/rs-stellar-xdr repo' type: 'string' required: false - soroban_rpc_ref: - description: 'Git ref for the stellar/soroban-rpc repo (soroban-rpc)' + stellar_rpc_ref: + description: 'Git ref for the stellar/stellar-rpc repo (stellar-rpc)' type: 'string' required: true friendbot_ref: @@ -63,7 +63,7 @@ env: IMAGE: ${{ format('{0}/{1}:{2}', secrets.DOCKERHUB_TOKEN && 'docker.io' || 'ghcr.io', github.repository, github.event_name == 'pull_request' && format('pr{0}-{1}', github.event.pull_request.number, inputs.tag) || inputs.tag) }} HORIZON_REPO_REF: ${{ inputs.horizon_ref }} FRIENDBOT_REPO_REF: ${{ inputs.friendbot_ref }} - SOROBAN_RPC_REPO_BRANCH: ${{ inputs.soroban_rpc_ref }} + STELLAR_RPC_REPO_BRANCH: ${{ inputs.stellar_rpc_ref }} CORE_REPO: ${{ inputs.core_repo }} CORE_REPO_REF: ${{ inputs.core_ref }} XDR_REPO_REF: ${{ inputs.xdr_ref }} @@ -163,7 +163,7 @@ jobs: name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image - load-stellar-soroban-rpc-from-cache: + load-stellar-rpc-from-cache: runs-on: ubuntu-latest outputs: cache-hit: ${{ steps.cache.outputs.cache-hit }} @@ -172,41 +172,41 @@ jobs: uses: actions/cache@v3 with: path: /tmp/image - key: image-stellar-soroban-rpc-${{ inputs.arch }}-${{ env.SOROBAN_RPC_REPO_BRANCH }} + key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} - name: Upload Stellar-Core Image if: steps.cache.outputs.cache-hit == 'true' uses: actions/upload-artifact@v4 with: - name: image-stellar-soroban-rpc-${{ inputs.tag }}-${{ inputs.arch }} + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image - build-stellar-soroban-rpc: - needs: [load-stellar-soroban-rpc-from-cache] - if: ${{ needs.load-stellar-soroban-rpc-from-cache.outputs.cache-hit != 'true' }} + build-stellar-rpc: + needs: [load-stellar-rpc-from-cache] + if: ${{ needs.load-stellar-rpc-from-cache.outputs.cache-hit != 'true' }} runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }} steps: - id: cache uses: actions/cache@v3 with: path: /tmp/image - key: image-stellar-soroban-rpc-${{ inputs.arch }}-${{ env.SOROBAN_RPC_REPO_BRANCH }} + key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} - if: inputs.arch == 'arm64' uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 with: platforms: arm64 - uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f - - name: Build Stellar-Soroban-Rpc Image + - name: Build Stellar-rpc Image run: > docker buildx build --platform linux/${{ inputs.arch }} - -f cmd/soroban-rpc/docker/Dockerfile --target build - -t stellar-soroban-rpc:${{ inputs.arch }} + -f cmd/stellar-rpc/docker/Dockerfile --target build + -t stellar-rpc:${{ inputs.arch }} -o type=docker,dest=/tmp/image --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true - https://github.com/stellar/soroban-rpc.git#${{ env.SOROBAN_RPC_REPO_BRANCH }} - - name: Upload Stellar-Soroban-Rpc Image + https://github.com/stellar/stellar-rpc.git#${{ env.STELLAR_RPC_REPO_BRANCH }} + - name: Upload Stellar-rpc Image uses: actions/upload-artifact@v4 with: - name: image-stellar-soroban-rpc-${{ inputs.tag }}-${{ inputs.arch }} + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image load-rs-stellar-xdr-from-cache: @@ -260,7 +260,7 @@ jobs: path: /tmp/image build: - needs: [build-stellar-core, build-stellar-horizon, build-rs-stellar-xdr, build-stellar-friendbot, build-stellar-soroban-rpc] + needs: [build-stellar-core, build-stellar-horizon, build-rs-stellar-xdr, build-stellar-friendbot, build-stellar-rpc] if: always() outputs: image: ${{ steps.image.outputs.name }} @@ -289,19 +289,19 @@ jobs: with: name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/stellar-friendbot - - name: Download Stellar-Soroban-Rpc Image + - name: Download Stellar-rpc Image uses: actions/download-artifact@v4 with: - name: image-stellar-soroban-rpc-${{ inputs.tag }}-${{ inputs.arch }} - path: /tmp/stellar-soroban-rpc + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} + path: /tmp/stellar-rpc - name: Load Stellar-Core Image run: docker load -i /tmp/stellar-core/image - name: Load Stellar-Horizon Image run: docker load -i /tmp/stellar-horizon/image - name: Load Stellar-Friendbot Image run: docker load -i /tmp/stellar-friendbot/image - - name: Load Stellar-Soroban-Rpc Image - run: docker load -i /tmp/stellar-soroban-rpc/image + - name: Load Stellar-rpc Image + run: docker load -i /tmp/stellar-rpc/image - name: Load Stellar-Rs-Xdr Image run: docker load -i /tmp/stellar-xdr/image - if: inputs.arch == 'arm64' @@ -333,7 +333,7 @@ jobs: --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 STELLAR_RPC_IMAGE_REF=stellar-rpc:${{ inputs.arch }} - name: Save Quickstart Image run: docker save $IMAGE -o /tmp/image - name: Upload Quickstart Image @@ -423,18 +423,18 @@ jobs: echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & go run test_friendbot.go - - name: Run soroban rpc up test + - name: Run stellar rpc up test if: ${{ matrix.rpc }} run: | docker logs stellar -f & - echo "supervisorctl tail -f soroban-rpc" | docker exec -i stellar sh & - go run test_soroban_rpc_up.go - - name: Run soroban rpc healthy test + echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & + go run test_stellar_rpc_up.go + - name: Run stellar rpc healthy test if: ${{ matrix.rpc && matrix.network != 'pubnet' }} run: | docker logs stellar -f & - echo "supervisorctl tail -f soroban-rpc" | docker exec -i stellar sh & - go run test_soroban_rpc_healthy.go + echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & + go run test_stellar_rpc_healthy.go - name: Prepare Test Logs if: always() run: sudo chmod -R a+r logs diff --git a/Dockerfile b/Dockerfile index c25626335..023604d57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ ARG STELLAR_XDR_IMAGE_REF ARG STELLAR_CORE_IMAGE_REF ARG HORIZON_IMAGE_REF ARG FRIENDBOT_IMAGE_REF -ARG SOROBAN_RPC_IMAGE_REF +ARG STELLAR_RPC_IMAGE_REF FROM $STELLAR_XDR_IMAGE_REF AS stellar-xdr FROM $STELLAR_CORE_IMAGE_REF AS stellar-core FROM $HORIZON_IMAGE_REF AS horizon FROM $FRIENDBOT_IMAGE_REF AS friendbot -FROM $SOROBAN_RPC_IMAGE_REF AS soroban-rpc +FROM $STELLAR_RPC_IMAGE_REF AS stellar-rpc FROM ubuntu:22.04 @@ -33,7 +33,7 @@ COPY --from=horizon /go/bin/horizon /usr/bin/stellar-horizon COPY --from=friendbot /app/friendbot /usr/local/bin/friendbot -COPY --from=soroban-rpc /bin/soroban-rpc /usr/bin/stellar-soroban-rpc +COPY --from=stellar-rpc /bin/stellar-rpc /usr/bin/stellar-rpc RUN adduser --system --group --quiet --home /var/lib/stellar --disabled-password --shell /bin/bash stellar; diff --git a/Makefile b/Makefile index f4c6e266d..c8fb8c537 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -__PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-deps-friendbot build-deps-soroban-rpc +__PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-deps-friendbot build-deps-stellar-rpc REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty) TAG?=dev @@ -8,12 +8,12 @@ XDR_REF?=main CORE_REPO?=https://github.com/stellar/stellar-core.git CORE_REF?=master CORE_CONFIGURE_FLAGS?=--disable-tests -SOROBAN_RPC_REF?=main -HORIZON_REF?=$(shell ./scripts/soroban_repo_to_horizon_repo.sh $(SOROBAN_RPC_REF)) +STELLAR_RPC_REF?=main +HORIZON_REF?=$(shell ./scripts/soroban_repo_to_horizon_repo.sh $(STELLAR_RPC_REF)) FRIENDBOT_REF?=$(HORIZON_REF) run: - docker run --rm --name stellar -p 8000:8000 stellar/quickstart:$(TAG) --local --enable-soroban-rpc + docker run --rm --name stellar -p 8000:8000 stellar/quickstart:$(TAG) --local --enable-stellar-rpc logs: docker exec stellar /bin/sh -c 'tail -F /var/log/supervisor/*' @@ -27,7 +27,7 @@ build-latest: XDR_REF=v22.0.0 \ CORE_REF=v22.0.0 \ HORIZON_REF=horizon-v22.0.1 \ - SOROBAN_RPC_REF=v22.1.0 \ + STELLAR_RPC_REF=v22.1.0 \ FRIENDBOT_REF=31fc8f4236388f12fc609228b7a7f5494867a1f9 build-testing: @@ -36,7 +36,7 @@ build-testing: XDR_REF=v22.0.0 \ CORE_REF=v22.0.0 \ HORIZON_REF=horizon-v22.0.1 \ - SOROBAN_RPC_REF=v22.1.0 \ + STELLAR_RPC_REF=v22.1.0 \ FRIENDBOT_REF=horizon-v22.0.1 build-future: @@ -45,7 +45,7 @@ build-future: XDR_REF=v22.0.0 \ CORE_REF=v22.0.0 \ HORIZON_REF=horizon-v22.0.1 \ - SOROBAN_RPC_REF=v22.1.0 \ + STELLAR_RPC_REF=v22.1.0 \ FRIENDBOT_REF=horizon-v22.0.1 build: @@ -57,9 +57,9 @@ build: --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 STELLAR_RPC_IMAGE_REF=stellar-rpc:$(STELLAR_RPC_REF) \ -build-deps: build-deps-xdr build-deps-core build-deps-horizon build-deps-friendbot build-deps-soroban-rpc +build-deps: build-deps-xdr build-deps-core build-deps-horizon build-deps-friendbot build-deps-stellar-rpc build-deps-xdr: docker build -t stellar-xdr:$(XDR_REF) -f Dockerfile.xdr --target builder . --build-arg REPO="$(XDR_REPO)" --build-arg REF="$(XDR_REF)" @@ -73,5 +73,5 @@ build-deps-horizon: build-deps-friendbot: docker build -t stellar-friendbot:$(FRIENDBOT_REF) -f services/friendbot/docker/Dockerfile https://github.com/stellar/go.git#$(FRIENDBOT_REF) -build-deps-soroban-rpc: - docker build -t stellar-soroban-rpc:$(SOROBAN_RPC_REF) -f cmd/soroban-rpc/docker/Dockerfile --target build https://github.com/stellar/soroban-rpc.git#$(SOROBAN_RPC_REF) --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true +build-deps-stellar-rpc: + docker build -t stellar-rpc:$(STELLAR_RPC_REF) -f cmd/stellar-rpc/docker/Dockerfile --target build https://github.com/stellar/stellar-rpc.git#$(STELLAR_RPC_REF) --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true diff --git a/README.md b/README.md index 7683d3dc2..2642e352b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The image uses the following software: - [stellar-core](https://github.com/stellar/stellar-core) - [horizon](https://github.com/stellar/go/tree/master/services/horizon) - [friendbot](https://github.com/stellar/go/tree/master/services/friendbot) -- [soroban-rpc](https://github.com/stellar/soroban-rpc/tree/main/cmd/soroban-rpc) +- [stellar-rpc](https://github.com/stellar/stellar-rpc/tree/main/cmd/stellar-rpc) - [Supervisord](http://supervisord.org) is used from managing the processes of the above services. ## Usage @@ -119,9 +119,9 @@ _Note: In local mode a local friendbot is running. In testnet and futurenet mode ### Soroban Development -The RPC Server will be avaialble on port 8000 of the container, and the base URL path for Soroban RPC will be `http://:8000/rpc`. This endpoint uses [JSON-RPC](https://www.jsonrpc.org/specification) protocol. Refer to example usages in [soroban-example-dapp](https://github.com/stellar/soroban-example-dapp). +The RPC Server will be avaialble on port 8000 of the container, and the base URL path for Stellar RPC will be `http://:8000/rpc`. This endpoint uses [JSON-RPC](https://www.jsonrpc.org/specification) protocol. Refer to example usages in [soroban-example-dapp](https://github.com/stellar/soroban-example-dapp). -To enable soroban rpc admin endpoint for access to metrics and [Go pprof (profiling)](https://pkg.go.dev/net/http/pprof), include the `--enable-soroban-rpc-admin-endpoint` flag, the HTTP endpoint will be listening on container port 6061, which can be exposed with standard docker port rule `-p "6061:6061"`, the published endpoints are: +To enable stellar rpc admin endpoint for access to metrics and [Go pprof (profiling)](https://pkg.go.dev/net/http/pprof), include the `--enable-stellar-rpc-admin-endpoint` flag, the HTTP endpoint will be listening on container port 6061, which can be exposed with standard docker port rule `-p "6061:6061"`, the published endpoints are: ``` http://:6061/metrics @@ -177,7 +177,7 @@ built with. `--enable-next-protocol-version-unsafe-for-production`. - `HORIZON_REF`: The git reference of stellar-horizon to build. - `FRIENDBOT_REF`: The git reference of stellar-friendbot to build. -- `SOROBAN_RPC_REF`: The git reference of soroban-rpc to build. +- `STELLAR_RPC_REF`: The git reference of stellar-rpc to build. For example: @@ -188,7 +188,7 @@ make build \ CORE_CONFIGURE_FLAGS=... \ HORIZON_REF=... \ FRIENDBOT_REF=... \ - SOROBAN_RPC_REF=... + STELLAR_RPC_REF=... ``` ### Background vs. Interactive containers @@ -239,7 +239,7 @@ The image exposes one main port through which services provide their APIs: | Port | Service | Description | | ---- | ------------------------------- | -------------- | -| 8000 | horizon, soroban-rpc, friendbot | main http port | +| 8000 | horizon, stellar-rpc, friendbot | main http port | The image also exposes a few other ports that most developers do not need, but area available: @@ -247,13 +247,13 @@ The image also exposes a few other ports that most developers do not need, but a | ----- | -------------------------- | -------------------- | | 5432 | postgresql | database access port | | 6060 | horizon | admin port | -| 6061 | soroban-rpc | admin port | +| 6061 | stellar-rpc | admin port | | 11625 | stellar-core | peer node port | | 11626 | stellar-core | main http port | | 11725 | stellar-core (horizon) | peer node port | | 11726 | stellar-core (horizon) | main http port | -| 11825 | stellar-core (soroban-rpc) | peer node port | -| 11826 | stellar-core (soroban-rpc) | main http port | +| 11825 | stellar-core (stellar-rpc) | peer node port | +| 11826 | stellar-core (stellar-rpc) | main http port | ### Security Considerations diff --git a/common/nginx/etc/conf.d/soroban-rpc.conf b/common/nginx/etc/conf.d/stellar-rpc.conf similarity index 100% rename from common/nginx/etc/conf.d/soroban-rpc.conf rename to common/nginx/etc/conf.d/stellar-rpc.conf diff --git a/common/soroban-rpc/bin/start b/common/soroban-rpc/bin/start deleted file mode 100755 index 9ef666159..000000000 --- a/common/soroban-rpc/bin/start +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -set -e -set -o pipefail - -echo "starting soroban-rpc..." -exec /usr/bin/stellar-soroban-rpc --config-path=/opt/stellar/soroban-rpc/etc/soroban-rpc.cfg diff --git a/common/stellar-rpc/bin/start b/common/stellar-rpc/bin/start new file mode 100755 index 000000000..15c8878d6 --- /dev/null +++ b/common/stellar-rpc/bin/start @@ -0,0 +1,7 @@ +#! /bin/bash + +set -e +set -o pipefail + +echo "starting stellar-rpc..." +exec /usr/bin/stellar-rpc --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.cfg diff --git a/common/supervisor/etc/supervisord.conf.d/soroban-rpc.conf b/common/supervisor/etc/supervisord.conf.d/soroban-rpc.conf deleted file mode 100644 index e47fd90dc..000000000 --- a/common/supervisor/etc/supervisord.conf.d/soroban-rpc.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:soroban-rpc] -user=stellar -directory=/opt/stellar/soroban-rpc -command=/opt/stellar/soroban-rpc/bin/start -autostart=false -startretries=50 -autorestart=true -priority=60 -redirect_stderr=true diff --git a/common/supervisor/etc/supervisord.conf.d/stellar-rpc.conf b/common/supervisor/etc/supervisord.conf.d/stellar-rpc.conf new file mode 100644 index 000000000..75823db35 --- /dev/null +++ b/common/supervisor/etc/supervisord.conf.d/stellar-rpc.conf @@ -0,0 +1,9 @@ +[program:stellar-rpc] +user=stellar +directory=/opt/stellar/stellar-rpc +command=/opt/stellar/stellar-rpc/bin/start +autostart=false +startretries=50 +autorestart=true +priority=60 +redirect_stderr=true diff --git a/futurenet/soroban-rpc/etc/stellar-captive-core.cfg b/futurenet/stellar-rpc/etc/stellar-captive-core.cfg similarity index 100% rename from futurenet/soroban-rpc/etc/stellar-captive-core.cfg rename to futurenet/stellar-rpc/etc/stellar-captive-core.cfg diff --git a/futurenet/soroban-rpc/etc/soroban-rpc.cfg b/futurenet/stellar-rpc/etc/stellar-rpc.cfg similarity index 60% rename from futurenet/soroban-rpc/etc/soroban-rpc.cfg rename to futurenet/stellar-rpc/etc/stellar-rpc.cfg index 580d62333..15f0f08b0 100644 --- a/futurenet/soroban-rpc/etc/soroban-rpc.cfg +++ b/futurenet/stellar-rpc/etc/stellar-rpc.cfg @@ -1,13 +1,13 @@ ENDPOINT="localhost:8003" -ADMIN_ENDPOINT="__SOROBAN_RPC_ADMIN_ENDPOINT__" +ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" FRIENDBOT_URL="https://friendbot-futurenet.stellar.org/" NETWORK_PASSPHRASE="__NETWORK__" STELLAR_CORE_URL="http://localhost:11826" -CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg" -CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/soroban-rpc/captive-core" +CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" CAPTIVE_CORE_USE_DB=true STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" HISTORY_ARCHIVE_URLS="__ARCHIVE__" -DB_PATH="/opt/stellar/soroban-rpc/rpc_db.sqlite" +DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 CHECKPOINT_FREQUENCY=64 diff --git a/local/soroban-rpc/etc/stellar-captive-core.cfg b/local/stellar-rpc/etc/stellar-captive-core.cfg similarity index 100% rename from local/soroban-rpc/etc/stellar-captive-core.cfg rename to local/stellar-rpc/etc/stellar-captive-core.cfg diff --git a/local/soroban-rpc/etc/soroban-rpc.cfg b/local/stellar-rpc/etc/stellar-rpc.cfg similarity index 60% rename from local/soroban-rpc/etc/soroban-rpc.cfg rename to local/stellar-rpc/etc/stellar-rpc.cfg index 065a5f051..0e208dbcb 100644 --- a/local/soroban-rpc/etc/soroban-rpc.cfg +++ b/local/stellar-rpc/etc/stellar-rpc.cfg @@ -1,13 +1,13 @@ ENDPOINT="localhost:8003" -ADMIN_ENDPOINT="__SOROBAN_RPC_ADMIN_ENDPOINT__" +ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" FRIENDBOT_URL="http://localhost:8000/friendbot" NETWORK_PASSPHRASE="__NETWORK__" STELLAR_CORE_URL="http://localhost:11826" -CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg" -CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/soroban-rpc/captive-core" +CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" CAPTIVE_CORE_USE_DB=true STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" HISTORY_ARCHIVE_URLS=["__ARCHIVE__"] -DB_PATH="/opt/stellar/soroban-rpc/rpc_db.sqlite" +DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 CHECKPOINT_FREQUENCY=8 diff --git a/pubnet/soroban-rpc/etc/stellar-captive-core.cfg b/pubnet/stellar-rpc/etc/stellar-captive-core.cfg similarity index 100% rename from pubnet/soroban-rpc/etc/stellar-captive-core.cfg rename to pubnet/stellar-rpc/etc/stellar-captive-core.cfg diff --git a/pubnet/soroban-rpc/etc/soroban-rpc.cfg b/pubnet/stellar-rpc/etc/stellar-rpc.cfg similarity index 56% rename from pubnet/soroban-rpc/etc/soroban-rpc.cfg rename to pubnet/stellar-rpc/etc/stellar-rpc.cfg index c82c948a5..0497c71db 100644 --- a/pubnet/soroban-rpc/etc/soroban-rpc.cfg +++ b/pubnet/stellar-rpc/etc/stellar-rpc.cfg @@ -1,12 +1,12 @@ ENDPOINT="localhost:8003" -ADMIN_ENDPOINT="__SOROBAN_RPC_ADMIN_ENDPOINT__" +ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" NETWORK_PASSPHRASE="__NETWORK__" STELLAR_CORE_URL="http://localhost:11826" -CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg" -CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/soroban-rpc/captive-core" +CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" CAPTIVE_CORE_USE_DB=true STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" HISTORY_ARCHIVE_URLS="__ARCHIVE__" -DB_PATH="/opt/stellar/soroban-rpc/rpc_db.sqlite" +DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 CHECKPOINT_FREQUENCY=64 diff --git a/scripts/rpc_repo_to_horizon_repo.sh b/scripts/rpc_repo_to_horizon_repo.sh new file mode 100755 index 000000000..596752396 --- /dev/null +++ b/scripts/rpc_repo_to_horizon_repo.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# rpc_repo_to_horizon_repo.sh - given an rpc branch to horizon branch +# +# Syntax: rpc_repo_to_horizon_repo.sh +# +# Examples: rpc_repo_to_horizon_repo.sh main + +set -e +set -o pipefail + +if [ "$#" -ne 1 ]; then + echo "Syntax: ${0} " + exit 1 +fi + +GO_MONOREPO=github.com/stellar/go +RPC_BRANCH=$1 +RPC_REPO_GOMOD=https://raw.githubusercontent.com/stellar/stellar-rpc/${RPC_BRANCH}/go.mod + +# find the short commit from the stellar-rpc repository. +SHORT_COMMIT=$(curl -s ${RPC_REPO_GOMOD} -o - | grep "${GO_MONOREPO} " | cut -d- -f3) + +# find the long commit from the actual go repository using the short commit. +TEMPDIR=$(mktemp -d) +git clone -q https://${GO_MONOREPO}.git ${TEMPDIR} +CURRENT_DIR=$(pwd) +cd ${TEMPDIR} +git rev-parse ${SHORT_COMMIT} +rm -rf ${TEMPDIR} +cd ${CURRENT_DIR} diff --git a/scripts/soroban_repo_to_horizon_repo.sh b/scripts/soroban_repo_to_horizon_repo.sh deleted file mode 100755 index 812cefe90..000000000 --- a/scripts/soroban_repo_to_horizon_repo.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# soroban_repo_to_horizon_repo.sh - given a soroban branch to horizon branch -# -# Syntax: soroban_repo_to_horizon_repo.sh -# -# Examples: soroban_repo_to_horizon_repo.sh main - -set -e -set -o pipefail - -if [ "$#" -ne 1 ]; then - echo "Syntax: ${0} " - exit 1 -fi - -GO_MONOREPO=github.com/stellar/go -SOROBAN_BRANCH=$1 -SOROBAN_REPO_GOMOD=https://raw.githubusercontent.com/stellar/soroban-rpc/${SOROBAN_BRANCH}/go.mod - -# find the short commit from the soroban-rpc repository. -SHORT_COMMIT=$(curl -s ${SOROBAN_REPO_GOMOD} -o - | grep "${GO_MONOREPO} " | cut -d- -f3) - -# find the long commit from the actual go repository using the short commit. -TEMPDIR=$(mktemp -d) -git clone -q https://${GO_MONOREPO}.git ${TEMPDIR} -CURRENT_DIR=$(pwd) -cd ${TEMPDIR} -git rev-parse ${SHORT_COMMIT} -rm -rf ${TEMPDIR} -cd ${CURRENT_DIR} diff --git a/start b/start index e40ceeb71..013456c01 100644 --- a/start +++ b/start @@ -14,7 +14,7 @@ export COREHOME="$STELLAR_HOME/core" export HZHOME="$STELLAR_HOME/horizon" export FBHOME="$STELLAR_HOME/friendbot" export NXHOME="$STELLAR_HOME/nginx" -export SOROBAN_RPC_HOME="$STELLAR_HOME/soroban-rpc" +export STELLAR_RPC_HOME="$STELLAR_HOME/stellar-rpc" export PGBIN="/usr/lib/postgresql/14/bin/" export PGDATA="$PGHOME/data" @@ -26,10 +26,14 @@ export PGPORT=5432 : "${ENABLE_LOGS:=false}" : "${ENABLE_CORE:=false}" : "${ENABLE_HORIZON:=false}" +# TODO: Remove once the Soroban RPC name is fully deprecated : "${ENABLE_SOROBAN_RPC:=false}" +: "${ENABLE_RPC:=$ENABLE_SOROBAN_RPC}" : "${ENABLE_SOROBAN_DIAGNOSTIC_EVENTS:=false}" : "${DISABLE_SOROBAN_DIAGNOSTIC_EVENTS:=false}" +# TODO: Remove once the Soroban RPC name is fully deprecated : "${ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT:=false}" +: "${ENABLE_RPC_ADMIN_ENDPOINT:=$ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT}" : "${ENABLE_CORE_MANUAL_CLOSE:=false}" : "${LIMITS:=testnet}" @@ -43,8 +47,8 @@ function main() { } function validate_before_start() { - if [ "$ENABLE_SOROBAN_RPC" != "true" ] && [ "$ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT" = "true" ]; then - echo "--enable-soroban-rpc-admin-endpoint usage only supported with --enable-soroban-rpc" >&2 + if [ "$ENABLE_RPC" != "true" ] && [ "$ENABLE_RPC_ADMIN_ENDPOINT" = "true" ]; then + echo "--enable-stellar-rpc-admin-endpoint usage only supported with --enable-stellar-rpc" >&2 exit 1 fi if [ "$NETWORK" != "local" ] && [ "$RANDOMIZE_NETWORK_PASSPHRASE" = "true" ]; then @@ -76,8 +80,8 @@ function start() { echo "$(stellar-core version 2>/dev/null | sed 's/^/ /')" echo " horizon:" echo "$(stellar-horizon version | sed 's/^/ /')" - echo " soroban-rpc:" - echo "$(stellar-soroban-rpc version | sed 's/^/ /')" + echo " stellar-rpc:" + echo "$(stellar-rpc version | sed 's/^/ /')" echo "mode: $STELLAR_MODE" echo "network: $NETWORK" @@ -92,7 +96,7 @@ function start() { init_stellar_core init_horizon copy_pgpass - init_soroban_rpc + init_stellar_rpc stop_postgres # this gets started in init_db @@ -147,8 +151,9 @@ function process_args() { ENABLE="$1" shift ;; + # TODO: remove once the Soroban RPC name is fully deprecated --enable-soroban-rpc) - ENABLE_SOROBAN_RPC=true + ENABLE_RPC=true ;; --enable-soroban-diagnostic-events) ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=true @@ -156,9 +161,13 @@ function process_args() { --disable-soroban-diagnostic-events) DISABLE_SOROBAN_DIAGNOSTIC_EVENTS=true ;; + --enable-stellar-rpc-admin-endpoint) + ENABLE_RPC_ADMIN_ENDPOINT=true + ;; + # TODO: remove once the Soroban RPC name is fully deprecated --enable-soroban-rpc-admin-endpoint) - ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT=true - ;; + ENABLE_RPC_ADMIN_ENDPOINT=true + ;; --enable-core-manual-close) ENABLE_CORE_MANUAL_CLOSE=true ;; @@ -183,7 +192,7 @@ function process_args() { ENABLE_HORIZON=true fi if [[ ",$ENABLE," = *",rpc,"* ]]; then - ENABLE_SOROBAN_RPC=true + ENABLE_RPC=true fi case "$NETWORK" in @@ -200,7 +209,7 @@ function process_args() { # h1570ry - we'll start a webserver connected to history directory later on export HISTORY_ARCHIVE_URLS="http://localhost:1570" ENABLE_CORE=true - if [[ "$ENABLE_SOROBAN_RPC" = "true" ]]; then + if [[ "$ENABLE_RPC" = "true" ]]; then ENABLE_HORIZON=true fi ;; @@ -287,8 +296,8 @@ function copy_defaults() { echo "supervisor: config directory exists, skipping copy" else $CP /opt/stellar-default/common/supervisor/ $SUPHOME - if [ "$ENABLE_SOROBAN_RPC" = "true" ]; then - cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/soroban-rpc.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true + if [ "$ENABLE_RPC" = "true" ]; then + cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/stellar-rpc.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true fi cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/friendbot.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/history-archive.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true @@ -310,12 +319,12 @@ function copy_defaults() { fi fi - if [ -d $SOROBAN_RPC_HOME/etc ]; then - echo "soroban-rpc: config directory exists, skipping copy" + if [ -d $STELLAR_RPC_HOME/etc ]; then + echo "stellar-rpc: config directory exists, skipping copy" else - $CP /opt/stellar-default/common/soroban-rpc/ $SOROBAN_RPC_HOME - if [ -d /opt/stellar-default/$NETWORK/soroban-rpc/ ]; then - $CP /opt/stellar-default/$NETWORK/soroban-rpc/ $SOROBAN_RPC_HOME + $CP /opt/stellar-default/common/stellar-rpc/ $STELLAR_RPC_HOME + if [ -d /opt/stellar-default/$NETWORK/stellar-rpc/ ]; then + $CP /opt/stellar-default/$NETWORK/stellar-rpc/ $STELLAR_RPC_HOME fi fi @@ -473,34 +482,34 @@ EOF popd } -function init_soroban_rpc() { - if [ "$ENABLE_SOROBAN_RPC" != "true" ]; then +function init_stellar_rpc() { + if [ "$ENABLE_RPC" != "true" ]; then return 0 fi - if [ -f $SOROBAN_RPC_HOME/.quickstart-initialized ]; then - echo "soroban rpc: already initialized" + if [ -f $STELLAR_RPC_HOME/.quickstart-initialized ]; then + echo "stellar rpc: already initialized" return 0 fi - pushd $SOROBAN_RPC_HOME + pushd $STELLAR_RPC_HOME mkdir ./captive-core - SOROBAN_RPC_CAPTIVE_CORE_CFG=$SOROBAN_RPC_HOME/etc/stellar-captive-core.cfg - 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-soroban-rpc-captivecore-config-enable-soroban-diagnostic-events" perl -pi -e "s/__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__/$ENABLE_SOROBAN_DIAGNOSTIC_EVENTS/g" $SOROBAN_RPC_CAPTIVE_CORE_CFG + STELLAR_RPC_CAPTIVE_CORE_CFG=$STELLAR_RPC_HOME/etc/stellar-captive-core.cfg + run_silent "finalize-stellar-rpc-captivecore-db" perl -pi -e "s*__DATABASE__*sqlite3://$STELLAR_RPC_HOME/captive-core/stellar-rpc.db*g" $STELLAR_RPC_CAPTIVE_CORE_CFG + perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" $STELLAR_RPC_CAPTIVE_CORE_CFG + run_silent "finalize-stellar-rpc-captivecore-config-enable-soroban-diagnostic-events" perl -pi -e "s/__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__/$ENABLE_SOROBAN_DIAGNOSTIC_EVENTS/g" $STELLAR_RPC_CAPTIVE_CORE_CFG local ADMIN_ENDPOINT=0.0.0.0:6061 - if [ "$ENABLE_SOROBAN_RPC_ADMIN_ENDPOINT" != "true" ]; then + if [ "$ENABLE_RPC_ADMIN_ENDPOINT" != "true" ]; then ADMIN_ENDPOINT= fi - perl -pi -e "s/__SOROBAN_RPC_ADMIN_ENDPOINT__/$ADMIN_ENDPOINT/g" etc/soroban-rpc.cfg - perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" etc/soroban-rpc.cfg - perl -pi -e "s=__ARCHIVE__=$HISTORY_ARCHIVE_URLS=g" etc/soroban-rpc.cfg + perl -pi -e "s/__STELLAR_RPC_ADMIN_ENDPOINT__/$ADMIN_ENDPOINT/g" etc/stellar-rpc.cfg + perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" etc/stellar-rpc.cfg + perl -pi -e "s=__ARCHIVE__=$HISTORY_ARCHIVE_URLS=g" etc/stellar-rpc.cfg - run_silent "init-soroban-rpc" chown -R stellar:stellar . + run_silent "init-stellar-rpc" chown -R stellar:stellar . touch .quickstart-initialized popd @@ -617,8 +626,8 @@ function start_optional_services() { supervisorctl start postgresql supervisorctl start horizon fi - if [ "$ENABLE_SOROBAN_RPC" == "true" ]; then - supervisorctl start soroban-rpc + if [ "$ENABLE_RPC" == "true" ]; then + supervisorctl start stellar-rpc fi } @@ -649,8 +658,8 @@ function print_service_logs() { if [ "$ENABLE_HORIZON" = "true" ]; then supervisorctl tail -f horizon stdout > >(sed "s/^/${green}horizon | $clear/") & fi - if [ "$ENABLE_SOROBAN_RPC" = "true" ]; then - supervisorctl tail -f soroban-rpc stdout > >(sed "s/^/${blue}soroban-rpc | $clear/") & + if [ "$ENABLE_RPC" = "true" ]; then + supervisorctl tail -f stellar-rpc stdout > >(sed "s/^/${blue}stellar-rpc | $clear/") & fi } @@ -735,9 +744,9 @@ function service_status() { stellar_core_status "horizon" 11726 & horizon_status & fi - if [ "$ENABLE_SOROBAN_RPC" = "true" ]; then + if [ "$ENABLE_RPC" = "true" ]; then stellar_core_status "rpc" 11826 & - soroban_rpc_status & + stellar_rpc_status & fi } @@ -755,8 +764,8 @@ function stellar_core_status() { done } -function soroban_rpc_status() { - echo "soroban-rpc: waiting for ready state..." +function stellar_rpc_status() { + echo "stellar-rpc: waiting for ready state..." COUNTER=1 while ! $(curl --silent --location --request POST 'http://localhost:8003' \ --header 'Content-Type: application/json' \ @@ -764,12 +773,12 @@ function soroban_rpc_status() { jq --exit-status '.result.status == "healthy"' 2>/dev/null | grep -o true || echo false); do if [ $(expr $COUNTER % 12) -eq 0 ]; then - echo "soroban-rpc: waiting for ready state, $(expr $COUNTER / 12) minutes..." + echo "stellar-rpc: waiting for ready state, $(expr $COUNTER / 12) minutes..." fi COUNTER=$[$COUNTER +1] sleep 5 done - echo "soroban-rpc: up and ready" + echo "stellar-rpc: up and ready" } function horizon_status() { diff --git a/test_soroban_rpc_healthy.go b/test_stellar_rpc_healthy.go similarity index 87% rename from test_soroban_rpc_healthy.go rename to test_stellar_rpc_healthy.go index f84535320..3a1d8a951 100644 --- a/test_soroban_rpc_healthy.go +++ b/test_stellar_rpc_healthy.go @@ -32,7 +32,7 @@ func main() { for { time.Sleep(5 * time.Second) - logLine("Waiting for Soroban RPC to start") + logLine("Waiting for Stellar RPC to start") if time.Since(startTime) > timeout { logLine("Timeout") @@ -53,10 +53,10 @@ func main() { continue } - logLine(fmt.Sprintf("Soroban RPC health reponse %#v", rpcResponse)) + logLine(fmt.Sprintf("Stellar RPC health reponse %#v", rpcResponse)) if rpcResponse.Result.Status == "healthy" { - logLine("Soroban RPC is healthy!") + logLine("Stellar RPC is healthy!") os.Exit(0) } } diff --git a/test_soroban_rpc_up.go b/test_stellar_rpc_up.go similarity index 87% rename from test_soroban_rpc_up.go rename to test_stellar_rpc_up.go index a3565f4e1..6f62cc785 100644 --- a/test_soroban_rpc_up.go +++ b/test_stellar_rpc_up.go @@ -32,7 +32,7 @@ func main() { for { time.Sleep(5 * time.Second) - logLine("Waiting for Soroban RPC to start") + logLine("Waiting for Stellar RPC to start") if time.Since(startTime) > timeout { logLine("Timeout") @@ -53,10 +53,10 @@ func main() { continue } - logLine(fmt.Sprintf("Soroban RPC health reponse %#v", rpcResponse)) + logLine(fmt.Sprintf("Stellar RPC health reponse %#v", rpcResponse)) if rpcResponse.Result.Status != "" || rpcResponse.Error.Message != "" { - logLine("Soroban RPC has started!") + logLine("Stellar RPC has started!") os.Exit(0) } } diff --git a/testnet/soroban-rpc/etc/stellar-captive-core.cfg b/testnet/stellar-rpc/etc/stellar-captive-core.cfg similarity index 100% rename from testnet/soroban-rpc/etc/stellar-captive-core.cfg rename to testnet/stellar-rpc/etc/stellar-captive-core.cfg diff --git a/testnet/soroban-rpc/etc/soroban-rpc.cfg b/testnet/stellar-rpc/etc/stellar-rpc.cfg similarity index 59% rename from testnet/soroban-rpc/etc/soroban-rpc.cfg rename to testnet/stellar-rpc/etc/stellar-rpc.cfg index 075a5b4ad..7ef9ea3df 100644 --- a/testnet/soroban-rpc/etc/soroban-rpc.cfg +++ b/testnet/stellar-rpc/etc/stellar-rpc.cfg @@ -1,13 +1,13 @@ ENDPOINT="localhost:8003" -ADMIN_ENDPOINT="__SOROBAN_RPC_ADMIN_ENDPOINT__" +ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" FRIENDBOT_URL="https://friendbot.stellar.org/" NETWORK_PASSPHRASE="__NETWORK__" STELLAR_CORE_URL="http://localhost:11826" -CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg" -CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/soroban-rpc/captive-core" +CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" CAPTIVE_CORE_USE_DB=true STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" HISTORY_ARCHIVE_URLS="__ARCHIVE__" -DB_PATH="/opt/stellar/soroban-rpc/rpc_db.sqlite" +DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 CHECKPOINT_FREQUENCY=64