├── .do ├── README.md └── deploy.template.yaml ├── .github ├── actions │ └── push │ │ └── action.yml └── workflows │ ├── action-test.yml │ ├── build-future.yml │ ├── build-latest.yml │ ├── build-start.yml │ ├── build-testing.yml │ ├── build.yml │ ├── manifest.yml │ └── stale.yml ├── .vscode └── temp.sql ├── Dockerfile ├── Dockerfile.horizon ├── Dockerfile.xdr ├── LICENSE ├── Makefile ├── README.md ├── action.yml ├── common ├── core │ └── bin │ │ └── start ├── friendbot │ ├── bin │ │ └── start │ └── etc │ │ └── friendbot.cfg ├── horizon │ ├── bin │ │ ├── horizon │ │ └── start │ └── etc │ │ └── horizon.env ├── nginx │ ├── bin │ │ └── start │ └── etc │ │ ├── conf.d │ │ ├── horizon.conf │ │ └── stellar-rpc.conf │ │ └── nginx.conf ├── postgresql │ ├── .pgpass │ └── etc │ │ ├── pg_hba.conf │ │ ├── pg_ident.conf │ │ └── postgresql.conf ├── stellar-rpc │ └── bin │ │ └── start └── supervisor │ └── etc │ ├── supervisord.conf │ └── supervisord.conf.d │ ├── horizon.conf │ ├── nginx.conf │ ├── postgresql.conf │ ├── stellar-core.conf │ └── stellar-rpc.conf ├── dependencies ├── futurenet ├── core │ └── etc │ │ └── stellar-core.cfg ├── horizon │ └── etc │ │ └── stellar-captive-core.cfg ├── nginx │ └── etc │ │ └── conf.d │ │ └── friendbot.conf └── stellar-rpc │ └── etc │ ├── stellar-captive-core.cfg │ └── stellar-rpc.cfg ├── local ├── core │ └── etc │ │ ├── config-settings │ │ ├── README.md │ │ ├── p21 │ │ │ ├── testnet.json │ │ │ └── unlimited.json │ │ └── p22 │ │ │ ├── testnet.json │ │ │ └── unlimited.json │ │ └── stellar-core.cfg ├── horizon │ └── etc │ │ ├── horizon.env │ │ └── stellar-captive-core.cfg ├── nginx │ └── etc │ │ └── conf.d │ │ ├── friendbot.conf │ │ └── history-archive.conf ├── stellar-rpc │ └── etc │ │ ├── stellar-captive-core.cfg │ │ └── stellar-rpc.cfg └── supervisor │ └── etc │ └── supervisord.conf.d │ ├── friendbot.conf │ └── history-archive.conf ├── pubnet ├── core │ └── etc │ │ └── stellar-core.cfg ├── horizon │ └── etc │ │ └── stellar-captive-core.cfg └── stellar-rpc │ └── etc │ ├── stellar-captive-core.cfg │ └── stellar-rpc.cfg ├── start ├── testnet ├── core │ └── etc │ │ └── stellar-core.cfg ├── horizon │ └── etc │ │ └── stellar-captive-core.cfg ├── nginx │ └── etc │ │ └── conf.d │ │ └── friendbot.conf └── stellar-rpc │ └── etc │ ├── stellar-captive-core.cfg │ └── stellar-rpc.cfg └── tests ├── test_core.go ├── test_friendbot.go ├── test_horizon_core_up.go ├── test_horizon_ingesting.go ├── test_horizon_up.go ├── test_stellar_rpc_healthy.go └── test_stellar_rpc_up.go /.do/README.md: -------------------------------------------------------------------------------- 1 | # Quickstart Deploy Template for Digital Ocean 2 | 3 | The files in this directory are a deploy template for the Digital Ocean App Platform that deploys the Quickstart image. 4 | 5 | See the repository [README] for instructions for how to use. 6 | 7 | [README]: /README.md#deploy-to-digital-ocean 8 | -------------------------------------------------------------------------------- /.do/deploy.template.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | name: stellar 3 | services: 4 | - name: stellar 5 | image: 6 | registry_type: DOCKER_HUB 7 | registry: stellar 8 | repository: quickstart 9 | tag: latest 10 | instance_count: 1 11 | http_port: 8000 12 | health_check: 13 | initial_delay_seconds: 30 14 | http_path: / 15 | routes: 16 | - path: / 17 | envs: 18 | # NETWORK chooses the network the image will connect to. Use "local" to 19 | # start a new network local to the container, ideal for development and 20 | # testing. 21 | - key: NETWORK 22 | value: 'local' 23 | scope: RUN_TIME 24 | 25 | # LIMITS sets the network configuration that is deployed on network start. 26 | # - "testnet" to match the network configuration of the public Stellar testnet. 27 | # - "unlimited" raises limits to max, useful for testing prior to optimization. 28 | - key: LIMITS 29 | value: 'testnet' 30 | scope: RUN_TIME 31 | 32 | # RANDOMIZE_NETWORK_PASSPHRASE sets a random network passphrase on network 33 | # start. Find out what the network passphrase is by requesting the root URL. 34 | - key: RANDOMIZE_NETWORK_PASSPHRASE 35 | value: 'false' 36 | scope: RUN_TIME 37 | 38 | # NETWORK_PASSPHRASE sets a network passphrase to uniquely identify the network 39 | # and prevent use of transactions for the test network with other networks. 40 | - key: NETWORK_PASSPHRASE 41 | value: '' 42 | scope: RUN_TIME 43 | -------------------------------------------------------------------------------- /.github/actions/push/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Push' 2 | inputs: 3 | head_sha: 4 | required: true 5 | artifact_name: 6 | required: true 7 | artifact_image_file: 8 | required: true 9 | artifact_image_name: 10 | required: true 11 | arch: 12 | required: true 13 | image: 14 | required: true 15 | default: ghcr.io/${{ github.repository }}:latest 16 | registry: 17 | required: true 18 | default: ghcr.io 19 | username: 20 | required: true 21 | default: ${{ github.actor }} 22 | password: 23 | required: true 24 | default: ${{ github.token }} 25 | runs: 26 | using: "composite" 27 | steps: 28 | - 29 | uses: actions/download-artifact@v4 30 | with: 31 | name: ${{ inputs.artifact_name }} 32 | path: /tmp/ 33 | - 34 | shell: bash 35 | run: docker load -i /tmp/${{ inputs.artifact_image_file }} 36 | - 37 | id: image_parts 38 | shell: bash 39 | run: | 40 | IMAGE_TAGLESS=$(echo ${{ inputs.image }} | cut -d':' -f1) 41 | IMAGE_REPO=$(echo $IMAGE_TAGLESS | cut -d'/' -f2,3) 42 | IMAGE_TAG=$(echo ${{ inputs.image }} | cut -d':' -f2) 43 | echo "::set-output name=repo::$IMAGE_REPO" 44 | echo "::set-output name=tag::$IMAGE_TAG" 45 | - 46 | uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 47 | with: 48 | registry: ${{ inputs.registry }} 49 | username: ${{ inputs.username }} 50 | password: ${{ inputs.password }} 51 | - 52 | shell: bash 53 | run: echo "IMAGE_URL=https://${{ inputs.image }}" >> $GITHUB_ENV 54 | - 55 | if: ${{ inputs.registry == 'docker.io' }} 56 | shell: bash 57 | run: | 58 | echo "IMAGE_URL=https://hub.docker.com/r/${{ steps.image_parts.outputs.repo }}/tags?name=${{ steps.image_parts.outputs.tag }}" >> $GITHUB_ENV 59 | - 60 | shell: bash 61 | run: | 62 | docker push ${{ inputs.image }} 63 | - 64 | uses: actions/github-script@v5 65 | with: 66 | script: | 67 | github.rest.repos.createCommitStatus({ 68 | owner: context.repo.owner, 69 | repo: context.repo.repo, 70 | sha: '${{ inputs.head_sha }}', 71 | state: 'success', 72 | context: `${{ inputs.image }}`, 73 | target_url: '${{ env.IMAGE_URL }}', 74 | description: 'Available', 75 | }); 76 | -------------------------------------------------------------------------------- /.github/workflows/action-test.yml: -------------------------------------------------------------------------------- 1 | name: Action test 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | test_tags: 7 | description: 'Test tags to use' 8 | type: 'string' 9 | default: '' 10 | 11 | jobs: 12 | basic-test: 13 | name: Basic tests 14 | strategy: 15 | fail-fast: false 16 | matrix: 17 | sys: 18 | # x64 19 | - os: ubuntu-latest-16-cores 20 | # ARM 21 | - os: ubuntu-jammy-16-cores-arm64 22 | # Intel 23 | - os: macos-13 24 | tag: ${{ fromJSON(inputs.test_tags) }} 25 | runs-on: ${{ matrix.sys.os }} 26 | steps: 27 | - uses: stellar/quickstart@main 28 | with: 29 | tag: ${{ matrix.tag }} 30 | - name: "Run basic test making sure RPC and Horizon are available" 31 | run: > 32 | RESP=`curl --no-progress-meter -X POST -H 'Content-Type: application/json' -d 33 | '{"jsonrpc": "2.0", "id": 8675309, "method": "getLatestLedger"}' http://localhost:8000/rpc` 34 | 35 | echo "RPC getLatestLedger response: $RESP" 36 | 37 | echo "$RESP" | grep sequence 38 | 39 | RESP=`curl -i -o - --silent 'http://localhost:8000/ledgers?limit=1' 40 | -H 'Accept: application/json'` 41 | 42 | echo "Horizon ledgers response: $RESP" 43 | 44 | echo "$RESP" | grep "200 OK" 45 | -------------------------------------------------------------------------------- /.github/workflows/build-future.yml: -------------------------------------------------------------------------------- 1 | name: Future 2 | 3 | # The `:future` tag points to a build containing unreleased versions of 4 | # software that have been informally released to the futurenet network. 5 | 6 | on: 7 | workflow_call: 8 | secrets: 9 | DOCKERHUB_USERNAME: 10 | required: false 11 | DOCKERHUB_TOKEN: 12 | required: false 13 | inputs: 14 | sha: 15 | description: 'Sha to build' 16 | type: 'string' 17 | required: true 18 | tag-prefix: 19 | description: 'Prefix for the tag name' 20 | type: 'string' 21 | default: '' 22 | 23 | jobs: 24 | 25 | amd64: 26 | uses: ./.github/workflows/build.yml 27 | secrets: 28 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 29 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 30 | with: 31 | sha: ${{ inputs.sha }} 32 | arch: amd64 33 | tag: ${{ inputs.tag-prefix }}future-amd64 34 | protocol_version_default: 22 35 | xdr_ref: v22.0.0 36 | core_ref: v22.3.0 37 | horizon_ref: horizon-v22.0.2 38 | stellar_rpc_ref: v22.1.2 39 | friendbot_ref: horizon-v22.0.2 40 | test_matrix: | 41 | { 42 | "network": ["local"], 43 | "core": ["core", null], 44 | "horizon": ["horizon", null], 45 | "rpc": ["rpc", null], 46 | "options": [""] 47 | } 48 | 49 | arm64: 50 | uses: ./.github/workflows/build.yml 51 | secrets: 52 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 53 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 54 | with: 55 | sha: ${{ inputs.sha }} 56 | arch: arm64 57 | tag: ${{ inputs.tag-prefix }}future-arm64 58 | protocol_version_default: 22 59 | xdr_ref: v22.0.0 60 | core_ref: v22.3.0 61 | horizon_ref: horizon-v22.0.2 62 | stellar_rpc_ref: v22.1.2 63 | friendbot_ref: horizon-v22.0.2 64 | test_matrix: | 65 | { 66 | "network": ["local"], 67 | "core": ["core", null], 68 | "horizon": ["horizon", null], 69 | "rpc": ["rpc", null], 70 | "options": [""] 71 | } 72 | 73 | manifest: 74 | needs: [amd64, arm64] 75 | uses: ./.github/workflows/manifest.yml 76 | secrets: 77 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 78 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 79 | with: 80 | tag: ${{ inputs.tag-prefix }}future 81 | tag-alias: future 82 | images: ${{ needs.amd64.outputs.image }} ${{ needs.arm64.outputs.image }} 83 | -------------------------------------------------------------------------------- /.github/workflows/build-latest.yml: -------------------------------------------------------------------------------- 1 | name: Latest 2 | 3 | # The `:latest` tag should only ever be formally released versions of 4 | # software. That means each ref should only ever be specified as a version 5 | # tag for software that's been released which is not a release candidate. 6 | 7 | on: 8 | workflow_call: 9 | secrets: 10 | DOCKERHUB_USERNAME: 11 | required: false 12 | DOCKERHUB_TOKEN: 13 | required: false 14 | inputs: 15 | sha: 16 | description: 'Sha to build' 17 | type: 'string' 18 | required: true 19 | tag-prefix: 20 | description: 'Prefix for the tag name' 21 | type: 'string' 22 | default: '' 23 | 24 | jobs: 25 | 26 | amd64: 27 | uses: ./.github/workflows/build.yml 28 | secrets: 29 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 30 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 31 | with: 32 | sha: ${{ inputs.sha }} 33 | arch: amd64 34 | tag: ${{ inputs.tag-prefix }}latest-amd64 35 | protocol_version_default: 22 36 | xdr_ref: v22.0.0 37 | core_ref: v22.3.0 38 | horizon_ref: horizon-v22.0.2 39 | stellar_rpc_ref: v22.1.2 40 | friendbot_ref: horizon-v22.0.2 41 | test_matrix: | 42 | { 43 | "network": ["pubnet", "local"], 44 | "core": ["core", null], 45 | "horizon": ["horizon", null], 46 | "rpc": ["rpc", null], 47 | "options": [""] 48 | } 49 | 50 | arm64: 51 | uses: ./.github/workflows/build.yml 52 | secrets: 53 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 54 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 55 | with: 56 | sha: ${{ inputs.sha }} 57 | arch: arm64 58 | tag: ${{ inputs.tag-prefix }}latest-arm64 59 | protocol_version_default: 22 60 | xdr_ref: v22.0.0 61 | core_ref: v22.3.0 62 | horizon_ref: horizon-v22.0.2 63 | stellar_rpc_ref: v22.1.2 64 | friendbot_ref: horizon-v22.0.2 65 | test_matrix: | 66 | { 67 | "network": ["pubnet", "local"], 68 | "core": ["core", null], 69 | "horizon": ["horizon", null], 70 | "rpc": ["rpc", null], 71 | "options": [""] 72 | } 73 | 74 | manifest: 75 | needs: [amd64, arm64] 76 | uses: ./.github/workflows/manifest.yml 77 | secrets: 78 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 79 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 80 | with: 81 | tag: ${{ inputs.tag-prefix }}latest 82 | tag-alias: latest 83 | images: ${{ needs.amd64.outputs.image }} ${{ needs.arm64.outputs.image }} 84 | -------------------------------------------------------------------------------- /.github/workflows/build-start.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | # Prevent more than one build of this workflow for a branch to be running at the 10 | # same time, and if multiple are queued, only run the latest, cancelling any 11 | # already running build. The exception being any protected branch, such as 12 | # main, where a build for every commit will run. 13 | concurrency: 14 | group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | 19 | complete: 20 | if: always() 21 | needs: 22 | - action-test-merge 23 | - action-test-pr 24 | # - future 25 | runs-on: ubuntu-latest 26 | steps: 27 | - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') 28 | run: exit 1 29 | 30 | setup: 31 | runs-on: ubuntu-latest 32 | outputs: 33 | tag-prefix: ${{ steps.tag-prefix.outputs.tag-prefix }} 34 | steps: 35 | - uses: actions/checkout@v2 36 | with: 37 | fetch-depth: 0 # Get all history for the sha count below. 38 | ref: ${{ github.event.pull_request.head.sha || github.sha }} 39 | - id: tag-prefix 40 | run: | 41 | count="$(git rev-list HEAD --count --first-parent)" 42 | echo "tag-prefix=v${count}-" >> $GITHUB_OUTPUT 43 | 44 | latest: 45 | needs: [setup] 46 | uses: ./.github/workflows/build-latest.yml 47 | secrets: 48 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 49 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 50 | with: 51 | sha: ${{ github.event.pull_request.head.sha || github.sha }} 52 | tag-prefix: ${{ needs.setup.outputs.tag-prefix }} 53 | 54 | testing: 55 | needs: [setup] 56 | uses: ./.github/workflows/build-testing.yml 57 | secrets: 58 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 59 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 60 | with: 61 | sha: ${{ github.event.pull_request.head.sha || github.sha }} 62 | tag-prefix: ${{ needs.setup.outputs.tag-prefix }} 63 | 64 | future: 65 | needs: [setup] 66 | uses: ./.github/workflows/build-future.yml 67 | secrets: 68 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 69 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 70 | with: 71 | sha: ${{ github.event.pull_request.head.sha || github.sha }} 72 | tag-prefix: ${{ needs.setup.outputs.tag-prefix }} 73 | 74 | action-test-merge: 75 | needs: [latest, testing] 76 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' 77 | uses: ./.github/workflows/action-test.yml 78 | with: 79 | test_tags: '["latest", "testing"]' 80 | 81 | action-test-pr: 82 | needs: [latest, testing] 83 | if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository 84 | uses: ./.github/workflows/action-test.yml 85 | with: 86 | test_tags: '["${{ needs.setup.outputs.tag-prefix }}latest", "${{ needs.setup.outputs.tag-prefix }}testing"]' -------------------------------------------------------------------------------- /.github/workflows/build-testing.yml: -------------------------------------------------------------------------------- 1 | name: Testing 2 | 3 | # The `:testing` tag should only ever be formally released or release candidate 4 | # versions of software. That means each ref should only ever be specified as a 5 | # version tag for software that's either the latest release candidate or latest 6 | # release. 7 | 8 | on: 9 | workflow_call: 10 | secrets: 11 | DOCKERHUB_USERNAME: 12 | required: false 13 | DOCKERHUB_TOKEN: 14 | required: false 15 | inputs: 16 | sha: 17 | description: 'Sha to build' 18 | type: 'string' 19 | required: true 20 | tag-prefix: 21 | description: 'Prefix for the tag name' 22 | type: 'string' 23 | default: '' 24 | 25 | jobs: 26 | 27 | amd64: 28 | uses: ./.github/workflows/build.yml 29 | secrets: 30 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 31 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 32 | with: 33 | sha: ${{ inputs.sha }} 34 | arch: amd64 35 | tag: ${{ inputs.tag-prefix }}testing-amd64 36 | protocol_version_default: 22 37 | xdr_ref: v22.0.0 38 | core_ref: v22.3.0 39 | horizon_ref: horizon-v22.0.2 40 | stellar_rpc_ref: v22.1.2 41 | friendbot_ref: horizon-v22.0.2 42 | test_matrix: | 43 | { 44 | "network": ["testnet", "pubnet", "local"], 45 | "core": ["core", null], 46 | "horizon": ["horizon", null], 47 | "rpc": ["rpc", null], 48 | "options": [""] 49 | } 50 | 51 | arm64: 52 | uses: ./.github/workflows/build.yml 53 | secrets: 54 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 55 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 56 | with: 57 | sha: ${{ inputs.sha }} 58 | arch: arm64 59 | tag: ${{ inputs.tag-prefix }}testing-arm64 60 | protocol_version_default: 22 61 | xdr_ref: v22.0.0 62 | core_ref: v22.3.0 63 | horizon_ref: horizon-v22.0.2 64 | stellar_rpc_ref: v22.1.2 65 | friendbot_ref: horizon-v22.0.2 66 | test_matrix: | 67 | { 68 | "network": ["testnet", "pubnet", "local"], 69 | "core": ["core", null], 70 | "horizon": ["horizon", null], 71 | "rpc": ["rpc", null], 72 | "options": [""] 73 | } 74 | 75 | manifest: 76 | needs: [amd64, arm64] 77 | uses: ./.github/workflows/manifest.yml 78 | secrets: 79 | DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} 80 | DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} 81 | with: 82 | tag: ${{ inputs.tag-prefix }}testing 83 | tag-alias: testing 84 | images: ${{ needs.amd64.outputs.image }} ${{ needs.arm64.outputs.image }} 85 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_call: 3 | secrets: 4 | DOCKERHUB_USERNAME: 5 | required: false 6 | DOCKERHUB_TOKEN: 7 | required: false 8 | inputs: 9 | sha: 10 | description: 'Sha to build' 11 | type: 'string' 12 | required: true 13 | arch: 14 | description: 'Architecture to build the image for (amd64, arm64)' 15 | type: 'string' 16 | required: true 17 | tag: 18 | description: 'Tag to use on the image name' 19 | type: 'string' 20 | required: true 21 | protocol_version_default: 22 | description: 'Default protocol version to use on local networks' 23 | type: 'number' 24 | required: true 25 | core_repo: 26 | description: 'Git repo for stellar-core' 27 | type: 'string' 28 | default: 'https://github.com/stellar/stellar-core.git' 29 | core_ref: 30 | description: 'Git ref for the stellar-core repo' 31 | type: 'string' 32 | required: true 33 | core_configure_flags: 34 | description: 'CONFIGURE_FLAGS used when building stellar-core' 35 | type: 'string' 36 | default: '--disable-tests' 37 | horizon_ref: 38 | description: 'Git ref for the stellar/go repo (horizon)' 39 | type: 'string' 40 | required: true 41 | xdr_ref: 42 | description: 'Git ref for the stellar/rs-stellar-xdr repo' 43 | type: 'string' 44 | required: false 45 | stellar_rpc_ref: 46 | description: 'Git ref for the stellar/stellar-rpc repo (stellar-rpc)' 47 | type: 'string' 48 | required: true 49 | friendbot_ref: 50 | description: 'Git ref for the stellar/go repo (friendbot)' 51 | type: 'string' 52 | required: true 53 | test_matrix: 54 | description: 'JSON matrix for the test job' 55 | type: 'string' 56 | required: true 57 | outputs: 58 | image: 59 | description: 'Image pushed as a result of this build' 60 | value: ${{ jobs.build.outputs.image }} 61 | 62 | env: 63 | 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) }} 64 | HORIZON_REPO_REF: ${{ inputs.horizon_ref }} 65 | FRIENDBOT_REPO_REF: ${{ inputs.friendbot_ref }} 66 | STELLAR_RPC_REPO_BRANCH: ${{ inputs.stellar_rpc_ref }} 67 | CORE_REPO: ${{ inputs.core_repo }} 68 | CORE_REPO_REF: ${{ inputs.core_ref }} 69 | XDR_REPO_REF: ${{ inputs.xdr_ref }} 70 | 71 | jobs: 72 | 73 | load-stellar-core-from-cache: 74 | runs-on: ubuntu-latest 75 | outputs: 76 | cache-hit: ${{ steps.cache.outputs.cache-hit }} 77 | steps: 78 | - id: cache 79 | uses: actions/cache@v3 80 | with: 81 | path: /tmp/image 82 | key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }} 83 | - name: Upload Stellar-Core Image 84 | if: steps.cache.outputs.cache-hit == 'true' 85 | uses: actions/upload-artifact@v4 86 | with: 87 | name: image-stellar-core-${{ inputs.tag }}-${{ inputs.arch }} 88 | path: /tmp/image 89 | 90 | build-stellar-core: 91 | needs: [load-stellar-core-from-cache] 92 | if: ${{ needs.load-stellar-core-from-cache.outputs.cache-hit != 'true' }} 93 | runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }} 94 | steps: 95 | - id: cache 96 | uses: actions/cache@v3 97 | with: 98 | path: /tmp/image 99 | key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }} 100 | - if: inputs.arch == 'arm64' 101 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 102 | with: 103 | platforms: arm64 104 | - uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f 105 | - name: Build Stellar-Core Image 106 | run: > 107 | docker buildx build --platform linux/${{ inputs.arch }} 108 | -f docker/Dockerfile.testing -t stellar-core:${{ inputs.arch }} 109 | -o type=docker,dest=/tmp/image 110 | ${{ env.CORE_REPO }}#${{ env.CORE_REPO_REF }} 111 | --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true 112 | --build-arg CONFIGURE_FLAGS='${{ inputs.core_configure_flags }}' 113 | - name: Upload Stellar-Core Image 114 | uses: actions/upload-artifact@v4 115 | with: 116 | name: image-stellar-core-${{ inputs.tag }}-${{ inputs.arch }} 117 | path: /tmp/image 118 | 119 | build-stellar-horizon: 120 | runs-on: ubuntu-latest 121 | steps: 122 | - name: Checkout Quickstart for Horizon docker file 123 | uses: actions/checkout@v3 124 | with: 125 | ref: ${{ inputs.sha }} 126 | - if: inputs.arch == 'arm64' 127 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 128 | with: 129 | platforms: arm64 130 | - name: Setup buildx 131 | uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f 132 | - name: Build Stellar-Horizon Image 133 | run: > 134 | docker buildx build --platform linux/${{ inputs.arch }} 135 | -f Dockerfile.horizon --target builder 136 | -t stellar-horizon:${{ inputs.arch }} -o type=docker,dest=/tmp/image 137 | --build-arg REF="${{ env.HORIZON_REPO_REF }}" . 138 | - name: Upload Stellar-Horizon Image 139 | uses: actions/upload-artifact@v4 140 | with: 141 | name: image-stellar-horizon-${{ inputs.tag }}-${{ inputs.arch }} 142 | path: /tmp/image 143 | 144 | build-stellar-friendbot: 145 | runs-on: ubuntu-latest 146 | steps: 147 | - if: inputs.arch == 'arm64' 148 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 149 | with: 150 | platforms: arm64 151 | - name: Setup buildx 152 | uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f 153 | - name: Build Stellar-Friendbot Image 154 | run: > 155 | docker buildx build --platform linux/${{ inputs.arch }} 156 | -f services/friendbot/docker/Dockerfile -t stellar-friendbot:${{ inputs.arch }} 157 | -o type=docker,dest=/tmp/image 158 | --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true 159 | https://github.com/stellar/go.git#${{ env.FRIENDBOT_REPO_REF }} 160 | - name: Upload Stellar-Friendbot Image 161 | uses: actions/upload-artifact@v4 162 | with: 163 | name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} 164 | path: /tmp/image 165 | 166 | load-stellar-rpc-from-cache: 167 | runs-on: ubuntu-latest 168 | outputs: 169 | cache-hit: ${{ steps.cache.outputs.cache-hit }} 170 | steps: 171 | - id: cache 172 | uses: actions/cache@v3 173 | with: 174 | path: /tmp/image 175 | key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} 176 | - name: Upload Stellar-Core Image 177 | if: steps.cache.outputs.cache-hit == 'true' 178 | uses: actions/upload-artifact@v4 179 | with: 180 | name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} 181 | path: /tmp/image 182 | 183 | build-stellar-rpc: 184 | needs: [load-stellar-rpc-from-cache] 185 | if: ${{ needs.load-stellar-rpc-from-cache.outputs.cache-hit != 'true' }} 186 | runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }} 187 | steps: 188 | - id: cache 189 | uses: actions/cache@v3 190 | with: 191 | path: /tmp/image 192 | key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} 193 | - if: inputs.arch == 'arm64' 194 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 195 | with: 196 | platforms: arm64 197 | - uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f 198 | - name: Build Stellar-rpc Image 199 | run: > 200 | docker buildx build --platform linux/${{ inputs.arch }} 201 | -f cmd/stellar-rpc/docker/Dockerfile --target build 202 | -t stellar-rpc:${{ inputs.arch }} 203 | -o type=docker,dest=/tmp/image 204 | --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true 205 | https://github.com/stellar/stellar-rpc.git#${{ env.STELLAR_RPC_REPO_BRANCH }} 206 | - name: Upload Stellar-rpc Image 207 | uses: actions/upload-artifact@v4 208 | with: 209 | name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} 210 | path: /tmp/image 211 | 212 | load-rs-stellar-xdr-from-cache: 213 | runs-on: ubuntu-latest 214 | outputs: 215 | cache-hit: ${{ steps.cache.outputs.cache-hit }} 216 | steps: 217 | - id: cache 218 | uses: actions/cache@v3 219 | with: 220 | path: /tmp/image 221 | key: image-rs-stellar-xdr-${{ inputs.arch }}-${{ env.XDR_REPO_REF }} 222 | - name: Upload Stellar-Core Image 223 | if: steps.cache.outputs.cache-hit == 'true' 224 | uses: actions/upload-artifact@v4 225 | with: 226 | name: image-rs-stellar-xdr-${{ inputs.tag }}-${{ inputs.arch }} 227 | path: /tmp/image 228 | 229 | build-rs-stellar-xdr: 230 | needs: [load-rs-stellar-xdr-from-cache] 231 | if: ${{ needs.load-rs-stellar-xdr-from-cache.outputs.cache-hit != 'true' }} 232 | runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }} 233 | steps: 234 | - name: Checkout Quickstart for Horizon docker file 235 | uses: actions/checkout@v3 236 | with: 237 | ref: ${{ inputs.sha }} 238 | - id: cache 239 | uses: actions/cache@v3 240 | with: 241 | path: /tmp/image 242 | key: image-rs-stellar-xdr-${{ inputs.arch }}-${{ env.XDR_REPO_REF }} 243 | - if: inputs.arch == 'arm64' 244 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 245 | with: 246 | platforms: arm64 247 | - uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f 248 | - name: Build Stellar-Rs-Xdr Image 249 | run: > 250 | docker buildx build --platform linux/${{ inputs.arch }} 251 | -f Dockerfile.xdr --target builder 252 | -t stellar-rs-xdr:${{ inputs.arch }} 253 | -o type=docker,dest=/tmp/image 254 | --build-arg REPO=https://github.com/stellar/rs-stellar-xdr.git 255 | --build-arg REF="${{ env.XDR_REPO_REF }}" . 256 | - name: Upload Stellar-Rs-Xdr Image 257 | uses: actions/upload-artifact@v4 258 | with: 259 | name: image-rs-stellar-xdr-${{ inputs.tag }}-${{ inputs.arch }} 260 | path: /tmp/image 261 | 262 | build: 263 | needs: [build-stellar-core, build-stellar-horizon, build-rs-stellar-xdr, build-stellar-friendbot, build-stellar-rpc] 264 | if: always() 265 | outputs: 266 | image: ${{ steps.image.outputs.name }} 267 | runs-on: ubuntu-latest 268 | steps: 269 | - uses: actions/checkout@v3 270 | with: 271 | ref: ${{ inputs.sha }} 272 | - name: Download Stellar XDR 273 | uses: actions/download-artifact@v4 274 | with: 275 | name: image-rs-stellar-xdr-${{ inputs.tag }}-${{ inputs.arch }} 276 | path: /tmp/stellar-xdr 277 | - name: Download Stellar-Core Image 278 | uses: actions/download-artifact@v4 279 | with: 280 | name: image-stellar-core-${{ inputs.tag }}-${{ inputs.arch }} 281 | path: /tmp/stellar-core 282 | - name: Download Stellar-Horizon Image 283 | uses: actions/download-artifact@v4 284 | with: 285 | name: image-stellar-horizon-${{ inputs.tag }}-${{ inputs.arch }} 286 | path: /tmp/stellar-horizon 287 | - name: Download Stellar-Friendbot Image 288 | uses: actions/download-artifact@v4 289 | with: 290 | name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} 291 | path: /tmp/stellar-friendbot 292 | - name: Download Stellar-rpc Image 293 | uses: actions/download-artifact@v4 294 | with: 295 | name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} 296 | path: /tmp/stellar-rpc 297 | - name: Load Stellar-Core Image 298 | run: docker load -i /tmp/stellar-core/image 299 | - name: Load Stellar-Horizon Image 300 | run: docker load -i /tmp/stellar-horizon/image 301 | - name: Load Stellar-Friendbot Image 302 | run: docker load -i /tmp/stellar-friendbot/image 303 | - name: Load Stellar-rpc Image 304 | run: docker load -i /tmp/stellar-rpc/image 305 | - name: Load Stellar-Rs-Xdr Image 306 | run: docker load -i /tmp/stellar-xdr/image 307 | - if: inputs.arch == 'arm64' 308 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 309 | with: 310 | platforms: arm64 311 | - id: image 312 | name: Image Name 313 | run: echo "name=$IMAGE" >> $GITHUB_OUTPUT 314 | - name: Pull Base Image 315 | run: docker pull --platform linux/${{ inputs.arch }} ubuntu:22.04 316 | # Docker buildx cannot be used to build the dev quickstart image because 317 | # buildx does not yet support importing existing images, like the core and 318 | # horizon images above, into a buildx builder's cache. Buildx would be 319 | # preferred because it can output a smaller image file faster than docker 320 | # save can. Once buildx supports it we can update. 321 | # https://github.com/docker/buildx/issues/847 322 | - name: Build Quickstart Image 323 | run: > 324 | docker build 325 | --platform linux/${{ inputs.arch }} 326 | -f Dockerfile 327 | -t $IMAGE 328 | --label org.opencontainers.image.revision="${{ inputs.sha }}" 329 | . 330 | --build-arg REVISION="${{ inputs.sha }}" 331 | --build-arg PROTOCOL_VERSION_DEFAULT="${{ inputs.protocol_version_default }}" 332 | --build-arg STELLAR_XDR_IMAGE_REF=stellar-rs-xdr:${{ inputs.arch }} 333 | --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} 334 | --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} 335 | --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} 336 | --build-arg STELLAR_RPC_IMAGE_REF=stellar-rpc:${{ inputs.arch }} 337 | - name: Save Quickstart Image 338 | run: docker save $IMAGE -o /tmp/image 339 | - name: Upload Quickstart Image 340 | uses: actions/upload-artifact@v4 341 | with: 342 | name: image-${{ inputs.tag }}-${{ inputs.arch }} 343 | path: /tmp/image 344 | 345 | test: 346 | needs: build 347 | if: always() 348 | strategy: 349 | matrix: ${{ fromJSON(inputs.test_matrix) }} 350 | fail-fast: false 351 | runs-on: ubuntu-latest 352 | steps: 353 | - uses: actions/checkout@v2 354 | with: 355 | ref: ${{ inputs.sha }} 356 | - name: Download Quickstart Image 357 | uses: actions/download-artifact@v4 358 | with: 359 | name: image-${{ inputs.tag }}-${{ inputs.arch }} 360 | path: /tmp/ 361 | - name: Load Quickstart Image 362 | run: docker load -i /tmp/image 363 | - if: inputs.arch == 'arm64' 364 | uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 365 | with: 366 | platforms: arm64 367 | - name: Prepare Logs Directory 368 | run: mkdir -p logs 369 | - name: Run Quickstart Image 370 | run: > 371 | docker run 372 | --platform linux/${{ inputs.arch }} 373 | --rm 374 | -d 375 | -p 376 | "8000:8000" 377 | -p "11626:11626" 378 | -v "$PWD/logs":/var/log/supervisor 379 | --name stellar 380 | $IMAGE 381 | --${{ matrix.network }} 382 | --enable ${{ matrix.core }},${{ matrix.horizon }},${{ matrix.rpc }} 383 | ${{ matrix.options }} 384 | - name: Set up Go 385 | uses: actions/setup-go@v2 386 | with: 387 | go-version: ^1 388 | - name: Sleep until supervisor is up 389 | run: sleep 10 390 | - name: Run core test 391 | if: ${{ matrix.core }} 392 | run: | 393 | docker logs stellar -f & 394 | echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & 395 | go run tests/test_core.go 396 | curl http://localhost:11626/info 397 | - name: Run horizon up test 398 | if: ${{ matrix.horizon }} 399 | run: | 400 | docker logs stellar -f & 401 | echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & 402 | go run tests/test_horizon_up.go 403 | curl http://localhost:8000 404 | - name: Run horizon core up test 405 | if: ${{ matrix.horizon && matrix.network != 'pubnet' }} 406 | run: | 407 | docker logs stellar -f & 408 | echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & 409 | go run tests/test_horizon_core_up.go 410 | curl http://localhost:8000 411 | - name: Run horizon ingesting test 412 | if: ${{ matrix.horizon && matrix.network != 'pubnet' }} 413 | run: | 414 | docker logs stellar -f & 415 | echo "supervisorctl tail -f stellar-core" | docker exec -i stellar sh & 416 | echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & 417 | go run tests/test_horizon_ingesting.go 418 | curl http://localhost:8000 419 | - name: Run friendbot test 420 | if: ${{ matrix.horizon && matrix.network == 'local' }} 421 | run: | 422 | docker logs stellar -f & 423 | echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh & 424 | echo "supervisorctl tail -f horizon" | docker exec -i stellar sh & 425 | go run tests/test_friendbot.go 426 | - name: Run stellar rpc up test 427 | if: ${{ matrix.rpc }} 428 | run: | 429 | docker logs stellar -f & 430 | echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & 431 | go run tests/test_stellar_rpc_up.go 432 | - name: Run stellar rpc healthy test 433 | if: ${{ matrix.rpc && matrix.network != 'pubnet' }} 434 | run: | 435 | docker logs stellar -f & 436 | echo "supervisorctl tail -f stellar-rpc" | docker exec -i stellar sh & 437 | go run tests/test_stellar_rpc_healthy.go 438 | - name: Prepare Test Logs 439 | if: always() 440 | run: sudo chmod -R a+r logs 441 | - name: Upload Test Logs 442 | if: always() 443 | uses: actions/upload-artifact@v4 444 | with: 445 | name: logs-${{ inputs.tag }}-${{ inputs.arch }}-test-${{ strategy.job-index }} 446 | path: logs 447 | 448 | push-pr: 449 | # Push image to registry after build for pull requests from a local branch. 450 | if: ${{ always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} 451 | needs: build 452 | permissions: 453 | packages: write 454 | statuses: write 455 | runs-on: ubuntu-latest 456 | steps: 457 | - uses: actions/checkout@v2 458 | with: 459 | ref: ${{ inputs.sha }} 460 | - id: push 461 | uses: ./.github/actions/push 462 | with: 463 | head_sha: ${{ inputs.sha }} 464 | artifact_name: image-${{ inputs.tag }}-${{ inputs.arch }} 465 | artifact_image_file: image 466 | arch: ${{ inputs.arch }} 467 | image: ${{ env.IMAGE }} 468 | registry: ${{ secrets.DOCKERHUB_TOKEN && 'docker.io' || 'ghcr.io' }} 469 | username: ${{ secrets.DOCKERHUB_USERNAME || github.actor }} 470 | password: ${{ secrets.DOCKERHUB_TOKEN || github.token }} 471 | 472 | push-release: 473 | # Push image to registry after test for main. 474 | if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} 475 | needs: [build, test] 476 | permissions: 477 | packages: write 478 | statuses: write 479 | runs-on: ubuntu-latest 480 | steps: 481 | - uses: actions/checkout@v2 482 | with: 483 | ref: ${{ inputs.sha }} 484 | - id: push 485 | uses: ./.github/actions/push 486 | with: 487 | head_sha: ${{ inputs.sha }} 488 | artifact_name: image-${{ inputs.tag }}-${{ inputs.arch }} 489 | artifact_image_file: image 490 | arch: ${{ inputs.arch }} 491 | image: ${{ env.IMAGE }} 492 | registry: ${{ secrets.DOCKERHUB_TOKEN && 'docker.io' || 'ghcr.io' }} 493 | username: ${{ secrets.DOCKERHUB_USERNAME || github.actor }} 494 | password: ${{ secrets.DOCKERHUB_TOKEN || github.token }} 495 | -------------------------------------------------------------------------------- /.github/workflows/manifest.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_call: 3 | secrets: 4 | DOCKERHUB_USERNAME: 5 | required: false 6 | DOCKERHUB_TOKEN: 7 | required: false 8 | inputs: 9 | tag: 10 | description: 'Tag to use as the manifest list image name' 11 | type: 'string' 12 | required: true 13 | tag-alias: 14 | description: 'Tag to alias to the tag of the manifest, e.g. "latest"' 15 | type: 'string' 16 | required: true 17 | images: 18 | description: 'Space separated list of images to include in the manifest list' 19 | type: 'string' 20 | required: true 21 | outputs: 22 | image: 23 | description: 'Image pushed as a result of this build' 24 | value: ${{ jobs.build.outputs.image }} 25 | 26 | env: 27 | HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} 28 | 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) }} 29 | IMAGE_ALIAS: ${{ 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-alias) || inputs.tag-alias) }} 30 | REGISTRY: ${{ secrets.DOCKERHUB_TOKEN && 'docker.io' || 'ghcr.io' }} 31 | 32 | jobs: 33 | 34 | push: 35 | if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} 36 | permissions: 37 | packages: write 38 | statuses: write 39 | runs-on: ubuntu-latest 40 | steps: 41 | - id: image_parts 42 | run: | 43 | IMAGE_TAGLESS=$(echo ${{ env.IMAGE }} | cut -d':' -f1) 44 | IMAGE_REPO=$(echo $IMAGE_TAGLESS | cut -d'/' -f2,3) 45 | IMAGE_TAG=$(echo ${{ env.IMAGE }} | cut -d':' -f2) 46 | echo "::set-output name=repo::$IMAGE_REPO" 47 | echo "::set-output name=tag::$IMAGE_TAG" 48 | - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 49 | with: 50 | registry: ${{ env.REGISTRY }} 51 | username: ${{ secrets.DOCKERHUB_USERNAME || github.actor }} 52 | password: ${{ secrets.DOCKERHUB_TOKEN || github.token }} 53 | - run: echo "IMAGE_URL=https://${{ env.IMAGE }}" >> $GITHUB_ENV 54 | - if: ${{ env.REGISTRY == 'docker.io' }} 55 | run: | 56 | echo "IMAGE_URL=https://hub.docker.com/r/${{ steps.image_parts.outputs.repo }}/tags?name=${{ steps.image_parts.outputs.tag }}" >> $GITHUB_ENV 57 | - run: | 58 | docker manifest create ${{ env.IMAGE }} ${{ inputs.images }} 59 | - run: | 60 | docker manifest push ${{ env.IMAGE }} 61 | - run: | 62 | docker buildx imagetools create -t ${{ env.IMAGE_ALIAS }} ${{ env.IMAGE }} 63 | - uses: actions/github-script@v5 64 | with: 65 | script: | 66 | github.rest.repos.createCommitStatus({ 67 | owner: context.repo.owner, 68 | repo: context.repo.repo, 69 | sha: '${{ env.HEAD_SHA }}', 70 | state: 'success', 71 | context: `${{ env.IMAGE }}`, 72 | target_url: '${{ env.IMAGE_URL }}', 73 | description: 'Available', 74 | }); 75 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Stale Issues' 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 18 * * *' # approx 9:30am daily 7 | 8 | jobs: 9 | stale: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/stale@v9 13 | with: 14 | debug-only: false 15 | days-before-stale: 90 16 | days-before-close: 90 17 | stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.' 18 | stale-pr-message: 'This pull request is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.' 19 | stale-issue-label: stale 20 | stale-pr-label: stale 21 | remove-stale-when-updated: true 22 | -------------------------------------------------------------------------------- /.vscode/temp.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stellar/quickstart/df3f3472abac8560e3c8c9efb6a370ebed124ef2/.vscode/temp.sql -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG STELLAR_XDR_IMAGE_REF 2 | ARG STELLAR_CORE_IMAGE_REF 3 | ARG HORIZON_IMAGE_REF 4 | ARG FRIENDBOT_IMAGE_REF 5 | ARG STELLAR_RPC_IMAGE_REF 6 | 7 | FROM $STELLAR_XDR_IMAGE_REF AS stellar-xdr 8 | FROM $STELLAR_CORE_IMAGE_REF AS stellar-core 9 | FROM $HORIZON_IMAGE_REF AS horizon 10 | FROM $FRIENDBOT_IMAGE_REF AS friendbot 11 | FROM $STELLAR_RPC_IMAGE_REF AS stellar-rpc 12 | 13 | FROM ubuntu:22.04 14 | 15 | ARG REVISION 16 | ENV REVISION $REVISION 17 | 18 | EXPOSE 5432 19 | EXPOSE 8000 20 | EXPOSE 6060 21 | EXPOSE 6061 22 | EXPOSE 11625 23 | EXPOSE 11626 24 | 25 | ADD dependencies / 26 | RUN /dependencies 27 | 28 | COPY --from=stellar-xdr /usr/local/cargo/bin/stellar-xdr /usr/local/bin/stellar-xdr 29 | 30 | COPY --from=stellar-core /usr/local/bin/stellar-core /usr/bin/stellar-core 31 | 32 | COPY --from=horizon /go/bin/horizon /usr/bin/stellar-horizon 33 | 34 | COPY --from=friendbot /app/friendbot /usr/local/bin/friendbot 35 | 36 | COPY --from=stellar-rpc /bin/stellar-rpc /usr/bin/stellar-rpc 37 | 38 | RUN adduser --system --group --quiet --home /var/lib/stellar --disabled-password --shell /bin/bash stellar; 39 | 40 | RUN ["mkdir", "-p", "/opt/stellar"] 41 | RUN ["touch", "/opt/stellar/.docker-ephemeral"] 42 | 43 | RUN ["ln", "-s", "/opt/stellar", "/stellar"] 44 | RUN ["ln", "-s", "/opt/stellar/core/etc/stellar-core.cfg", "/stellar-core.cfg"] 45 | RUN ["ln", "-s", "/opt/stellar/horizon/etc/horizon.env", "/horizon.env"] 46 | ADD common /opt/stellar-default/common 47 | ADD local /opt/stellar-default/local 48 | ADD pubnet /opt/stellar-default/pubnet 49 | ADD testnet /opt/stellar-default/testnet 50 | ADD futurenet /opt/stellar-default/futurenet 51 | 52 | ADD start / 53 | RUN ["chmod", "+x", "start"] 54 | 55 | ARG PROTOCOL_VERSION_DEFAULT 56 | RUN test -n "$PROTOCOL_VERSION_DEFAULT" || (echo "Image build arg PROTOCOL_VERSION_DEFAULT required and not set" && false) 57 | ENV PROTOCOL_VERSION_DEFAULT $PROTOCOL_VERSION_DEFAULT 58 | 59 | ENTRYPOINT ["/start"] 60 | -------------------------------------------------------------------------------- /Dockerfile.horizon: -------------------------------------------------------------------------------- 1 | FROM golang:1.23 AS builder 2 | 3 | ARG REF 4 | WORKDIR /go/src/github.com/stellar/go 5 | RUN git clone https://github.com/stellar/go /go/src/github.com/stellar/go 6 | RUN git fetch origin ${REF} 7 | RUN git checkout ${REF} 8 | ENV CGO_ENABLED=0 9 | ENV GOFLAGS="-ldflags=-X=github.com/stellar/go/support/app.version=${REF}-(built-from-source)" 10 | RUN go install github.com/stellar/go/services/horizon 11 | -------------------------------------------------------------------------------- /Dockerfile.xdr: -------------------------------------------------------------------------------- 1 | FROM rust AS builder 2 | 3 | ARG REPO 4 | ARG REF 5 | WORKDIR /wd 6 | RUN git clone ${REPO} /wd 7 | RUN git fetch origin ${REF} 8 | RUN git checkout ${REF} 9 | RUN rustup show active-toolchain || rustup toolchain install 10 | RUN cargo install stellar-xdr --features cli --path . --locked 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2015 Stellar Development Foundation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | __PHONY__: run logs build build-deps build-deps-core build-deps-horizon build-deps-friendbot build-deps-stellar-rpc 2 | 3 | REVISION=$(shell git -c core.abbrev=no describe --always --exclude='*' --long --dirty) 4 | TAG?=dev 5 | PROTOCOL_VERSION_DEFAULT?=22 6 | XDR_REPO?=https://github.com/stellar/rs-stellar-xdr.git 7 | XDR_REF?=main 8 | CORE_REPO?=https://github.com/stellar/stellar-core.git 9 | CORE_REF?=master 10 | CORE_CONFIGURE_FLAGS?=--disable-tests 11 | STELLAR_RPC_REF?=main 12 | HORIZON_REF?=master 13 | FRIENDBOT_REF?=$(HORIZON_REF) 14 | 15 | run: 16 | docker run --rm --name stellar -p 8000:8000 stellar/quickstart:$(TAG) --local --enable-stellar-rpc 17 | 18 | logs: 19 | docker exec stellar /bin/sh -c 'tail -F /var/log/supervisor/*' 20 | 21 | console: 22 | docker exec -it stellar /bin/bash 23 | 24 | build-latest: 25 | $(MAKE) build TAG=latest \ 26 | PROTOCOL_VERSION_DEFAULT=22 \ 27 | XDR_REF=v22.0.0 \ 28 | CORE_REF=v22.3.0 \ 29 | HORIZON_REF=horizon-v22.0.3 \ 30 | STELLAR_RPC_REF=v22.1.2 \ 31 | FRIENDBOT_REF=horizon-v22.0.3 32 | 33 | build-testing: 34 | $(MAKE) build TAG=testing \ 35 | PROTOCOL_VERSION_DEFAULT=22 \ 36 | XDR_REF=v22.0.0 \ 37 | CORE_REF=v22.3.0 \ 38 | HORIZON_REF=horizon-v22.0.3 \ 39 | STELLAR_RPC_REF=v22.1.2 \ 40 | FRIENDBOT_REF=horizon-v22.0.3 41 | 42 | build-future: 43 | $(MAKE) build TAG=future \ 44 | PROTOCOL_VERSION_DEFAULT=22 \ 45 | XDR_REF=v22.0.0 \ 46 | CORE_REF=v22.3.0 \ 47 | HORIZON_REF=horizon-v22.0.3 \ 48 | STELLAR_RPC_REF=v22.1.2 \ 49 | FRIENDBOT_REF=horizon-v22.0.3 50 | 51 | build: 52 | $(MAKE) -j 4 build-deps 53 | docker build -t stellar/quickstart:$(TAG) -f Dockerfile . \ 54 | --build-arg REVISION=$(REVISION) \ 55 | --build-arg PROTOCOL_VERSION_DEFAULT=$(PROTOCOL_VERSION_DEFAULT) \ 56 | --build-arg STELLAR_XDR_IMAGE_REF=stellar-xdr:$(XDR_REF) \ 57 | --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) \ 58 | --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) \ 59 | --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) \ 60 | --build-arg STELLAR_RPC_IMAGE_REF=stellar-rpc:$(STELLAR_RPC_REF) \ 61 | 62 | build-deps: build-deps-xdr build-deps-core build-deps-horizon build-deps-friendbot build-deps-stellar-rpc 63 | 64 | build-deps-xdr: 65 | docker build -t stellar-xdr:$(XDR_REF) -f Dockerfile.xdr --target builder . --build-arg REPO="$(XDR_REPO)" --build-arg REF="$(XDR_REF)" 66 | 67 | build-deps-core: 68 | docker build -t stellar-core:$(CORE_REF) -f docker/Dockerfile.testing $(CORE_REPO)#$(CORE_REF) --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true --build-arg CONFIGURE_FLAGS="$(CORE_CONFIGURE_FLAGS)" 69 | 70 | build-deps-horizon: 71 | docker build -t stellar-horizon:$(HORIZON_REF) -f Dockerfile.horizon --target builder . --build-arg REF="$(HORIZON_REF)" 72 | 73 | build-deps-friendbot: 74 | docker build -t stellar-friendbot:$(FRIENDBOT_REF) -f services/friendbot/docker/Dockerfile https://github.com/stellar/go.git#$(FRIENDBOT_REF) 75 | 76 | build-deps-stellar-rpc: 77 | 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 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stellar Quickstart Docker Image 2 | 3 | > [!TIP] 4 | > Install the [`stellar-cli`] and start development containers running this image with: 5 | > 6 | > ``` 7 | > stellar container start 8 | > ``` 9 | 10 | [`stellar-cli`]: https://github.com/stellar/stellar-cli 11 | 12 | --- 13 | 14 | This docker image provides a simple way to run all the components of a Stellar network locally or in CI for development and testing. 15 | 16 | > [!IMPORTANT] 17 | > This docker image is intended for use in development, not production. See these docs for how to run Stellar services in production: 18 | > - [How to run Stellar Core in production](https://developers.stellar.org/docs/run-core-node/) 19 | > - [How to run Horizon in production](https://developers.stellar.org/docs/data/horizon/admin-guide/overview) 20 | > - [How to run RPC in production](https://developers.stellar.org/docs/data/rpc/admin-guide) 21 | 22 | This image provides a default, non-validating, ephemeral configuration that should work for most developers. By configuring a container using this image with a host-based volume (described below in the "Usage" section) an operator gains access to full configuration customization and persistence of data. 23 | 24 | The image uses the following software: 25 | 26 | - [PostgreSQL](https://www.postgresql.org) 12 is used for storing both stellar-core and horizon data. 27 | - [stellar-core](https://github.com/stellar/stellar-core) 28 | - [horizon](https://github.com/stellar/go/tree/master/services/horizon) 29 | - [friendbot](https://github.com/stellar/go/tree/master/services/friendbot) 30 | - [stellar-rpc](https://github.com/stellar/stellar-rpc/tree/main/cmd/stellar-rpc) 31 | - [Supervisord](http://supervisord.org) is used from managing the processes of the above services. 32 | 33 | ## Usage 34 | 35 | To use this project successfully, you should first decide a few things: 36 | 37 | First, decide whether you want your container to be part of the public, production Stellar network (referred to as the _pubnet_) or the test network (called testnet) that we recommend you use while developing software because you need not worry about losing money on the testnet. Alternatively, choose to run a local network (called local) which allows you to run your own acellerated private Stellar network for testing. 38 | 39 | Next, you must decide whether you will use a docker volume or not. When not using a volume, we say that the container is in _ephemeral mode_, that is, nothing will be persisted between runs of the container. _Persistent mode_ is the alternative, which should be used in the case that you need to either customize your configuration (such as to add a validation seed) or would like avoid a slow catchup to the Stellar network in the case of a crash or server restart. We recommend persistent mode for anything besides a development or test environment. 40 | 41 | Finally, you must decide what ports to expose. The software in these images listen on 4 ports, each of which you may or may not want to expose to the network your host system is connected to. A container that exposes no ports isn't very useful, so we recommend at a minimum you expose the horizon http port. See the "Ports" section below for a more nuanced discussion regarding the decision about what ports to expose. 42 | 43 | After deciding on the questions above, you can setup your container. Please refer to the appropriate section below based upon what mode you will run the container in. 44 | 45 | ### Network Options 46 | 47 | Provide either `--pubnet`, `--testnet` or `--local` as a command line flag when starting the container to determine which network (and base configuration file) to use. 48 | 49 | #### `--pubnet` 50 | 51 | In public network mode, the node will join the public, production Stellar network. 52 | 53 | _Note: In pubnet mode the node will consume more disk, memory, and CPU resources because of the size of the ledger and frequency of transactions. If disk space warnings occur and the image is being used on a Docker runtime that uses a VM, like that of macOS and Windows, the VM may need to have its disk space allocation increased._ 54 | 55 | #### `--testnet` 56 | 57 | In test network mode, the node will join the network that developers use while developing software. Use the [Stellar Laboratory](https://laboratory.stellar.org/#account-creator?network=test) to create an account on the test network. 58 | 59 | #### `--futurenet` 60 | 61 | In futurenet network mode, the node will join the [Soroban] test network that developers use while developing smart contracts on Stellar. 62 | 63 | [Soroban]: https://soroban.stellar.org 64 | 65 | #### `--local` 66 | 67 | In local network mode, you can optionally pass: 68 | 69 | - `--protocol-version {version}` to run a specific protocol version (defaults to latest version). 70 | 71 | - `--limits {limits}` to configure specific Soroban resource limits to one of: 72 | - `default` leaves limits set extremely low which is stellar-core's default configuration 73 | - `testnet` sets limits to match those used on testnet (the default quickstart configuration) 74 | - `unlimited` sets limits to the maximum resources that can be configured 75 | 76 | **Note: The `--enable` options behaves differently in local network mode, see [Service Options](#service-otions) for more details.** 77 | The network passphrase of the network defaults to: 78 | 79 | ``` 80 | Standalone Network ; February 2017 81 | ``` 82 | 83 | Set the network passphrase in the SDK or tool you're using. If an incorrect network passphrase is used in clients signing transactions, the transactions will fail with a bad authentication error. 84 | 85 | The root account of the network is fixed to: 86 | 87 | ``` 88 | Public Key: GBZXN7PIRZGNMHGA7MUUUF4GWPY5AYPV6LY4UV2GL6VJGIQRXFDNMADI 89 | Secret Key: SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L 90 | ``` 91 | 92 | The root account is derived from the network passphrase and if the network passphrase is changed the root account will change. To find out the root account when changing the network passphrase view the logs for stellar-core on its first start. See [Viewing logs](#viewing-logs) for more details. 93 | 94 | In local network mode a ledger occurs every one second and so transactions 95 | are finalized faster than on deployed networks. 96 | 97 | _Note_: The local network in this container is not suitable for any production use as it has a fixed root account. Any private network intended for production use would also required a unique network passphrase. 98 | 99 | ### Service Options 100 | 101 | The image runs all services available by default, but can be configured to run only certain services as needed. The option for configuring which services run is the `--enable` option. 102 | 103 | The option takes a comma-separated list of service names to enable. To enable all services which is the default behavior, use: 104 | 105 | ``` 106 | --enable core,horizon,rpc 107 | ``` 108 | 109 | To run only select services, simply specify only those services. For example, to enable the RPC, use: 110 | 111 | ``` 112 | --enable rpc 113 | ``` 114 | 115 | **Note: In `--local` mode the `core` service always runs no matter what options are passed, the `friendbot` faucet service runs whenever `horizon` is running, and `horizon` is run when `rpc` is requested so that friendbot is available.** 116 | 117 | ### Faucet (Friendbot) 118 | 119 | Stellar development/test networks use friendbot as a faucet for the native asset. 120 | 121 | When running in local, testnet, and futurenet modes friendbot is available on `:8000/friendbot` and can be used to fund a new account. 122 | 123 | For example: 124 | 125 | ``` 126 | $ curl http://localhost:8000/friendbot?addr=G... 127 | ``` 128 | 129 | _Note: In local mode a local friendbot is running. In testnet and futurenet modes requests to the local `:8000/friendbot` endpoint will be proxied to the friendbot deployments for the respective network._ 130 | 131 | ### Soroban Development 132 | 133 | 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). 134 | 135 | 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: 136 | 137 | ``` 138 | http://:6061/metrics 139 | http://:6061/debug/pprof/ 140 | ``` 141 | 142 | ### Soroban Diagnostic Events 143 | 144 | Soroban diagnostic events contain logs about internal events that have occurred while a contract is executing. They're particularly useful for debugging why a contract trapped (panicked). 145 | 146 | To enable Soroban diagnostic events provide the following command line flag when starting the container: 147 | `--enable-soroban-diagnostic-events` 148 | 149 | In local network mode diagnostics are enabled by default and can be disabled with: 150 | `--disable-soroban-diagnostic-events` 151 | 152 | _Note: Diagnostic events are unmetered and their execution is not metered or contrained by network limits or transaction resource limits. This means the resources consumed by an instance with diagnostic events enabled may exceed resources typically required by a deployment with diagnostic events disabled._ 153 | 154 | ### Deploy to Digital Ocean 155 | 156 | You can deploy the quickstart image to DigitalOcean by clicking the button below. It will by default create a container that can be used for development and testing, running the `latest` tag, in ephemeral mode, and on the `local` network. 157 | 158 | [![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/stellar/quickstart/tree/master) 159 | 160 | After clicking the button above, the deployment can be configured to deploy a different variant of the image, or join a different network such as `testnet` or `futurenet` by changing environment variables. 161 | 162 | Some example configurations that can be used are: 163 | 164 | - Local network matching pubnet: 165 | `IMAGE`: `stellar/quickstart:latest` 166 | `NETWORK`: `local` 167 | - Local network matching testnet: 168 | `IMAGE`: `stellar/quickstart:testing` 169 | `NETWORK`: `local` 170 | - Testnet node: 171 | `IMAGE`: `stellar/quickstart:testnet` 172 | `NETWORK`: `testnet` 173 | 174 | _Disclaimer_: The DigitalOcean server is publicly accessible on the Internet. Do not put sensitive information on the network that you would not want someone else to know. Anyone with access to the network will be able to use the root account above. 175 | 176 | ### Building Custom Images 177 | 178 | To build a quickstart image with custom or specific versions of stellar-core, 179 | horizon, etc, use the `Makefile`. The following parameters can be specified to 180 | customize the version of each component, and for stellar-core the features it is 181 | built with. 182 | 183 | - `TAG`: The docker tag to assign to the build. Default `dev`. 184 | - `CORE_REF`: The git reference of stellar-core to build. 185 | - `CORE_CONFIGURE_FLAGS`: The `CONFIGURE_FLAGS` to configure the stellar-core 186 | build with. Typically include `--disable-tests`, and to enable the next protocol 187 | version that is still in development, add 188 | `--enable-next-protocol-version-unsafe-for-production`. 189 | - `HORIZON_REF`: The git reference of stellar-horizon to build. 190 | - `FRIENDBOT_REF`: The git reference of stellar-friendbot to build. 191 | - `STELLAR_RPC_REF`: The git reference of stellar-rpc to build. 192 | 193 | For example: 194 | 195 | ``` 196 | make build \ 197 | TAG=future \ 198 | CORE_REF=... \ 199 | CORE_CONFIGURE_FLAGS=... \ 200 | HORIZON_REF=... \ 201 | FRIENDBOT_REF=... \ 202 | STELLAR_RPC_REF=... 203 | ``` 204 | 205 | ### Background vs. Interactive containers 206 | 207 | Docker containers can be run interactively (using the `-it` flags) or in a detached, background state (using the `-d` flag). Many of the example commands below use the `-it` flags to aid in debugging but in many cases you will simply want to run a node in the background. It's recommended that you use the use [the tutorials at docker](https://docs.docker.com/engine/tutorials/usingdocker/) to familiarize yourself with using docker. 208 | 209 | ### Ephemeral mode 210 | 211 | Ephermeral mode is provided to support development and testing environments. Every time you start a container in ephemeral mode, the database starts empty and a default configuration file will be used for the appropriate network. 212 | 213 | Starting an ephemeral node is simple, just craft a `docker run` command to launch the appropriate image but _do not mount a volume_. To craft your docker command, you need the network name you intend to run against and the flags to expose the ports your want available (See the section named "Ports" below to learn about exposing ports). Thus, launching a testnet node while exposing horizon would be: 214 | 215 | ```shell 216 | $ docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet 217 | ``` 218 | 219 | As part of launching, an ephemeral mode container will generate a random password for securing the postgresql service and will output it to standard out. You may use this password (provided you have exposed the postgresql port) to access the running postgresql database (See the section "Accessing Databases" below). 220 | 221 | ### Persistent mode 222 | 223 | In comparison to ephemeral mode, persistent mode is more complicated to operate, but also more powerful. Persistent mode uses a mounted host volume, a directory on the host machine that is exposed to the running docker container, to store all database data as well as the configuration files used for running services. This allows you to manage and modify these files from the host system. 224 | 225 | Note that there is no guarantee that the organization of the files of the volume will remain consistent between releases of the image, that occur on every commit to the stellar/quickstart repository. At anytime new files may be added, old files removed, or dependencies and references between them changed. For this reason persistent mode is primarily intended for running short lived test instances for development. If consistency is required over any period of time use [image digest references] to pin to a specific build. 226 | 227 | [image digest references]: https://docs.docker.com/engine/reference/run/#imagedigest 228 | 229 | Starting a persistent mode container is the same as the ephemeral mode with one exception: 230 | 231 | ```shell 232 | $ docker run --rm -it -p "8000:8000" -v "/home/scott/stellar:/opt/stellar" --name stellar stellar/quickstart --testnet 233 | ``` 234 | 235 | The `-v` option in the example above tells docker to mount the host directory `/home/scott/stellar` into the container at the `/opt/stellar` path. You may customize the host directory to any location you like, simply make sure to use the same value every time you launch the container. Also note: an absolute directory path is required. The second portion of the volume mount (`/opt/stellar`) should never be changed. This special directory is checked by the container to see if it is mounted from the host system which is used to see if we should launch in ephemeral or persistent mode. 236 | 237 | Upon launching a persistent mode container for the first time, the launch script will notice that the mounted volume is empty. This will trigger an interactive initialization process to populate the initial configuration for the container. This interactive initialization adds some complications to the setup process because in most cases you won't want to run the container interactively during normal operation, but rather in the background. We recommend the following steps to setup a persistent mode node: 238 | 239 | 1. Run an interactive session of the container at first, ensuring that all services start and run correctly. 240 | 2. Shut down the interactive container (using Ctrl-C). 241 | 3. Start a new container using the same host directory in the background. 242 | 243 | ## Regarding user accounts 244 | 245 | Managing UIDs between a docker container and a host volume can be complicated. At present, this image simply tries to create a UID that does not conflict with the host system by using a preset UID: 10011001. Currently there is no way to customize this value. All data produced in the host volume be owned by 10011001. If this UID value is inappropriate for your infrastructure we recommend you fork this project and do a find/replace operation to change UIDs. We may improve this story in the future if enough users request it. 246 | 247 | ## Ports 248 | 249 | The image exposes one main port through which services provide their APIs: 250 | 251 | | Port | Service | Description | 252 | | ---- | ------------------------------- | -------------- | 253 | | 8000 | horizon, stellar-rpc, friendbot | main http port | 254 | 255 | The image also exposes a few other ports that most developers do not need, but area available: 256 | 257 | | Port | Service | Description | 258 | | ----- | -------------------------- | -------------------- | 259 | | 5432 | postgresql | database access port | 260 | | 6060 | horizon | admin port | 261 | | 6061 | stellar-rpc | admin port | 262 | | 11625 | stellar-core | peer node port | 263 | | 11626 | stellar-core | main http port | 264 | | 11725 | stellar-core (horizon) | peer node port | 265 | | 11726 | stellar-core (horizon) | main http port | 266 | | 11825 | stellar-core (stellar-rpc) | peer node port | 267 | | 11826 | stellar-core (stellar-rpc) | main http port | 268 | | 9001 | supervisord | supervisord port | 269 | 270 | ### Security Considerations 271 | 272 | Exposing the network ports used by your running container comes with potential risks. While many attacks are preventable due to the nature of the stellar network, it is extremely important that you maintain protected access to the postgresql server that runs within a quickstart container. An attacker who gains write access to this DB will be able to corrupt your view of the stellar network, potentially inserting fake transactions, accounts, etc. 273 | 274 | It is safe to open the horizon http port. Horizon is designed to listen on an internet-facing interface and provides no privileged operations on the port. At the same time admin port should only be exposed to a trusted network, as it provides no security itself. 275 | 276 | The HTTP port for stellar-core should only be exposed to a trusted network, as it provides no security itself. An attacker that can make requests to the port will be able to perform administrative commands such as forcing a catchup or changing the logging level and more, many of which could be used to disrupt operations or deny service. 277 | 278 | The peer port for stellar-core however can be exposed, and ideally would be routable from the internet. This would allow external peers to initiate connections to your node, improving connectivity of the overlay network. However, this is not required as your container will also establish outgoing connections to peers. 279 | 280 | ## Accessing and debugging a running container 281 | 282 | There will come a time when you want to inspect the running container, either to debug one of the services, to review logs, or perhaps some other administrative tasks. We do this by starting a new interactive shell inside the running container: 283 | 284 | ``` 285 | $ docker exec -it stellar /bin/bash 286 | ``` 287 | 288 | The command above assumes that you launched your container with the name `stellar`; Replace that name with whatever you chose if different. When run, it will open an interactive shell running as root within the container. 289 | 290 | ### Restarting services 291 | 292 | Services within the quickstart container are managed using [supervisord](http://supervisord.org/index.html) and we recommend you use supervisor's shell to interact with running services. To launch the supervisor shell, open an interactive shell to the container and then run `supervisorctl`. You should then see a command prompt that looks like: 293 | 294 | ```shell 295 | horizon RUNNING pid 143, uptime 0:01:12 296 | postgresql RUNNING pid 126, uptime 0:01:13 297 | stellar-core RUNNING pid 125, uptime 0:01:13 298 | supervisor> 299 | ``` 300 | 301 | From this prompt you can execute any of the supervisord commands: 302 | 303 | ```shell 304 | # restart horizon 305 | supervisor> restart horizon 306 | 307 | 308 | # stop stellar-core 309 | supervisor> stop stellar-core 310 | ``` 311 | 312 | You can learn more about what commands are available by using the `help` command. 313 | 314 | ### Viewing logs 315 | 316 | Logs can be found within the container at the path `/var/log/supervisor/`. A file is kept for both the stdout and stderr of the processes managed by supervisord. Additionally, you can use the `tail` command provided by supervisorctl. 317 | 318 | Alternatively, to tail all logs into the container's output for all services, append the `--logs` option. 319 | 320 | ### Accessing databases 321 | 322 | The point of this project is to make running stellar's software within your own infrastructure easier, so that your software can more easily integrate with the stellar network. In many cases, you can integrate with horizon's REST API, but often times you'll want direct access to the database either horizon or stellar-core provide. This allows you to craft your own custom sql queries against the stellar network data. 323 | 324 | This image manages two postgres databases: `core` for stellar-core's data and `horizon` for horizon's data. The username to use when connecting with your postgresql client or library is `stellar`. The password to use is dependent upon the mode your container is running in: Persistent mode uses a password supplied by you and ephemeral mode generates a password and prints it to the console upon container startup. 325 | 326 | ## Example launch commands 327 | 328 | Below is a list of various ways you might want to launch the quickstart container annotated to illustrate what options are enabled. It's also recommended that you should learn and get familiar with the docker command. 329 | 330 | _Launch an ephemeral local only dev/test network:_ 331 | 332 | ``` 333 | $ docker run -d -p "8000:8000" --name stellar stellar/quickstart --local 334 | ``` 335 | 336 | _Launch an ephemeral testnet node in the foreground:_ 337 | 338 | ``` 339 | $ docker run --rm -it \ 340 | -p "8000:8000" \ 341 | --name stellar \ 342 | stellar/quickstart --testnet 343 | ``` 344 | 345 | _Setup a new persistent node using the host directory `/str`:_ 346 | 347 | ``` 348 | $ docker run -it --rm \ 349 | -p "8000:8000" \ 350 | -v "/str:/opt/stellar" \ 351 | --name stellar \ 352 | stellar/quickstart --testnet 353 | ``` 354 | 355 | ## Troubleshooting 356 | 357 | Let us know what you're having trouble with! Open an issue or join us on our public [Discord server](https://discord.com/invite/stellardev). 358 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Run quickstart' 2 | description: 'Runs quickstart docker image' 3 | inputs: 4 | tag: 5 | description: "Image tag of quickstart image to use" 6 | required: true 7 | default: "latest" 8 | image: 9 | description: "Image for the quickstart image to use" 10 | required: true 11 | default: "docker.io/stellar/quickstart" 12 | enable: 13 | description: "Services to enable" 14 | default: "core,horizon,rpc" 15 | network: 16 | description: "Network to run" 17 | default: "local" 18 | enable_logs: 19 | description: "Boolean flag enabling the logs" 20 | default: "true" 21 | health_interval: 22 | description: "Time between running the check (in seconds)" 23 | default: "10" 24 | health_timeout: 25 | description: "Maximum time to allow one check to run (in seconds)" 26 | default: "5" 27 | health_retries: 28 | description: "Consecutive failures needed to report unhealthy" 29 | default: "50" 30 | runs: 31 | using: "composite" 32 | steps: 33 | - name: "Check if Windows (unsupported)" 34 | if: runner.os == 'Windows' 35 | shell: powershell 36 | run: | 37 | echo "Windows runners are not supported" 38 | exit 1 39 | - name: "Check if macOS Apple Silicon (unsupported)" 40 | if: runner.os == 'macOS' && (runner.arch == 'ARM' || runner.arch == 'ARM64') 41 | shell: bash 42 | run: | 43 | echo "ARM MacOS runner is not yet supported, see https://github.com/douglascamata/setup-docker-macos-action" 44 | exit 1 45 | - name: Setup Colima and Docker (macOS only) 46 | shell: bash 47 | if: runner.os == 'macos' 48 | run: | 49 | brew install --formula docker colima 50 | colima start 51 | - run: > 52 | docker run -d --name stellar 53 | -p 8000:8000 54 | -p 11626:11626 55 | -p 11726:11726 56 | -p 11826:11826 57 | -e ENABLE_LOGS="${{ inputs.enable_logs }}" 58 | -e ENABLE="${{ inputs.enable }}" 59 | -e NETWORK="${{ inputs.network }}" 60 | --health-cmd "curl --no-progress-meter -X POST -H 'Content-Type: application/json' -d 61 | '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"getHealth\"}' 'http://localhost:8000/rpc' 62 | | grep 'healthy' 63 | && curl --no-progress-meter \"http://localhost:8000/friendbot\" | 64 | grep '\"invalid_field\": \"addr\"'" 65 | --health-interval ${{ inputs.health_interval }}s 66 | --health-timeout ${{ inputs.health_timeout }}s 67 | --health-retries ${{ inputs.health_retries }} 68 | ${{ inputs.image }}:${{ inputs.tag }} 69 | shell: bash 70 | - name: "Wait for container to be healthy" 71 | run: | 72 | i=0 73 | while true; do 74 | status=`docker inspect -f {{.State.Health.Status}} stellar` 75 | echo "stellar image status: $status" 76 | if [ "$status" == "healthy" ]; then 77 | break 78 | fi 79 | sleep 1; 80 | i=$((i + 1)) 81 | if (( $i > 300 )); then 82 | echo "stellar image is slow to start, printing logs:" 83 | i=$((i - 300)) 84 | docker logs stellar 85 | fi 86 | done; 87 | shell: bash 88 | -------------------------------------------------------------------------------- /common/core/bin/start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while ! psql -U stellar -c 'select 1' core &> /dev/null ; do 4 | echo "Waiting for postgres to be available..." 5 | sleep 1 6 | done 7 | 8 | echo "starting core..." 9 | set -e 10 | exec /usr/bin/stellar-core --conf "/opt/stellar/core/etc/stellar-core.cfg" run 11 | -------------------------------------------------------------------------------- /common/friendbot/bin/start: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | set -e 4 | set -o pipefail 5 | 6 | while ! (curl -sf http://localhost:8001/ | jq --exit-status '.ingest_latest_ledger > 1'); do 7 | echo "Waiting for horizon to be available..." 8 | sleep 1 9 | done 10 | 11 | echo "starting friendbot..." 12 | exec /usr/local/bin/friendbot --conf /opt/stellar/friendbot/etc/friendbot.cfg 13 | -------------------------------------------------------------------------------- /common/friendbot/etc/friendbot.cfg: -------------------------------------------------------------------------------- 1 | port = 8002 2 | friendbot_secret = "__NETWORK_ROOT_SECRET_KEY__" 3 | network_passphrase = "__NETWORK__" 4 | horizon_url = "http://localhost:8001" 5 | starting_balance = "10000.00" 6 | num_minions = 10 7 | base_fee = 100000 8 | minion_batch_size = 10 9 | submit_tx_retries_allowed = 2 10 | -------------------------------------------------------------------------------- /common/horizon/bin/horizon: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # This file is a simple wrapper around horizon that establishes the proper 4 | # environment variables before executing the actual binary. 5 | 6 | source /opt/stellar/horizon/etc/horizon.env 7 | exec /usr/bin/stellar-horizon $@ 8 | -------------------------------------------------------------------------------- /common/horizon/bin/start: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | while ! psql -U stellar -c 'select 1' horizon &> /dev/null ; do 6 | echo "Waiting for postgres to be available..." 7 | sleep 1 8 | done 9 | 10 | echo "starting horizon..." 11 | set -e 12 | exec $DIR/horizon 13 | -------------------------------------------------------------------------------- /common/horizon/etc/horizon.env: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export DATABASE_URL="postgres://stellar:__PGPASS__@localhost/horizon" 4 | export STELLAR_CORE_URL="http://localhost:11726" 5 | export STELLAR_CORE_BINARY_PATH=/usr/bin/stellar-core 6 | export LOG_LEVEL="info" 7 | export ENABLE_CAPTIVE_CORE_INGESTION="true" 8 | export CAPTIVE_CORE_USE_DB=true 9 | export STELLAR_CAPTIVE_CORE_HTTP_PORT=11726 10 | export INGEST="true" 11 | export PER_HOUR_RATE_LIMIT="72000" 12 | export NETWORK_PASSPHRASE="__NETWORK__" 13 | export DISABLE_ASSET_STATS="true" 14 | export HISTORY_ARCHIVE_URLS="__ARCHIVE__" 15 | export ADMIN_PORT=6060 16 | export PORT=8001 17 | export CHECKPOINT_FREQUENCY=64 18 | -------------------------------------------------------------------------------- /common/nginx/bin/start: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | echo "starting nginx..." 4 | set -e 5 | exec /usr/sbin/nginx -c /opt/stellar/nginx/etc/nginx.conf 6 | -------------------------------------------------------------------------------- /common/nginx/etc/conf.d/horizon.conf: -------------------------------------------------------------------------------- 1 | location / { 2 | proxy_set_header Host $http_host; 3 | proxy_pass http://127.0.0.1:8001; 4 | } 5 | -------------------------------------------------------------------------------- /common/nginx/etc/conf.d/stellar-rpc.conf: -------------------------------------------------------------------------------- 1 | location /rpc { 2 | rewrite /rpc / break; 3 | proxy_set_header Host $http_host; 4 | proxy_pass http://127.0.0.1:8003; 5 | proxy_redirect off; 6 | } 7 | 8 | # Deprecated but kept indefinitely for backwards compatibility. 9 | location /soroban/rpc { 10 | rewrite /soroban/rpc / break; 11 | proxy_set_header Host $http_host; 12 | proxy_pass http://127.0.0.1:8003; 13 | proxy_redirect off; 14 | } 15 | -------------------------------------------------------------------------------- /common/nginx/etc/nginx.conf: -------------------------------------------------------------------------------- 1 | daemon off; 2 | pid /var/lib/nginx/pid; 3 | 4 | events { 5 | } 6 | 7 | http { 8 | error_log stderr info; 9 | 10 | server { 11 | listen 8000; 12 | 13 | error_page 502 @502; 14 | 15 | include conf.d/*.conf; 16 | 17 | location @502 { 18 | return 502 "502 Bad Gateway"; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /common/postgresql/.pgpass: -------------------------------------------------------------------------------- 1 | *:*:*:stellar:__PGPASS__ 2 | -------------------------------------------------------------------------------- /common/postgresql/etc/pg_hba.conf: -------------------------------------------------------------------------------- 1 | # PostgreSQL Client Authentication Configuration File 2 | # =================================================== 3 | # 4 | # Refer to the "Client Authentication" section in the PostgreSQL 5 | # documentation for a complete description of this file. A short 6 | # synopsis follows. 7 | # 8 | # This file controls: which hosts are allowed to connect, how clients 9 | # are authenticated, which PostgreSQL user names they can use, which 10 | # databases they can access. Records take one of these forms: 11 | # 12 | # local DATABASE USER METHOD [OPTIONS] 13 | # host DATABASE USER ADDRESS METHOD [OPTIONS] 14 | # hostssl DATABASE USER ADDRESS METHOD [OPTIONS] 15 | # hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] 16 | # 17 | # (The uppercase items must be replaced by actual values.) 18 | # 19 | # The first field is the connection type: "local" is a Unix-domain 20 | # socket, "host" is either a plain or SSL-encrypted TCP/IP socket, 21 | # "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a 22 | # plain TCP/IP socket. 23 | # 24 | # DATABASE can be "all", "sameuser", "samerole", "replication", a 25 | # database name, or a comma-separated list thereof. The "all" 26 | # keyword does not match "replication". Access to replication 27 | # must be enabled in a separate record (see example below). 28 | # 29 | # USER can be "all", a user name, a group name prefixed with "+", or a 30 | # comma-separated list thereof. In both the DATABASE and USER fields 31 | # you can also write a file name prefixed with "@" to include names 32 | # from a separate file. 33 | # 34 | # ADDRESS specifies the set of hosts the record matches. It can be a 35 | # host name, or it is made up of an IP address and a CIDR mask that is 36 | # an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that 37 | # specifies the number of significant bits in the mask. A host name 38 | # that starts with a dot (.) matches a suffix of the actual host name. 39 | # Alternatively, you can write an IP address and netmask in separate 40 | # columns to specify the set of hosts. Instead of a CIDR-address, you 41 | # can write "samehost" to match any of the server's own IP addresses, 42 | # or "samenet" to match any address in any subnet that the server is 43 | # directly connected to. 44 | # 45 | # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", 46 | # "ident", "peer", "pam", "ldap", "radius" or "cert". Note that 47 | # "password" sends passwords in clear text; "md5" is preferred since 48 | # it sends encrypted passwords. 49 | # 50 | # OPTIONS are a set of options for the authentication in the format 51 | # NAME=VALUE. The available options depend on the different 52 | # authentication methods -- refer to the "Client Authentication" 53 | # section in the documentation for a list of which options are 54 | # available for which authentication methods. 55 | # 56 | # Database and user names containing spaces, commas, quotes and other 57 | # special characters must be quoted. Quoting one of the keywords 58 | # "all", "sameuser", "samerole" or "replication" makes the name lose 59 | # its special character, and just match a database or username with 60 | # that name. 61 | # 62 | # This file is read on server startup and when the postmaster receives 63 | # a SIGHUP signal. If you edit the file on a running system, you have 64 | # to SIGHUP the postmaster for the changes to take effect. You can 65 | # use "pg_ctl reload" to do that. 66 | 67 | # Put your actual configuration here 68 | # ---------------------------------- 69 | # 70 | # If you want to allow non-local connections, you need to add more 71 | # "host" records. In that case you will also need to make PostgreSQL 72 | # listen on a non-local interface via the listen_addresses 73 | # configuration parameter, or via the -i or -h command line switches. 74 | 75 | 76 | 77 | 78 | # DO NOT DISABLE! 79 | # If you change this first entry you will need to make sure that the 80 | # database superuser can access the database using some other method. 81 | # Noninteractive access to all databases is required during automatic 82 | # maintenance (custom daily cronjobs, replication, and similar tasks). 83 | # 84 | # Database administrative login by Unix domain socket 85 | local all postgres peer 86 | 87 | # TYPE DATABASE USER ADDRESS METHOD 88 | 89 | # "local" is for Unix domain socket connections only 90 | local all all md5 91 | # IPv4 local connections: 92 | host all all 127.0.0.1/32 md5 93 | host all all 0.0.0.0/0 md5 94 | # IPv6 local connections: 95 | host all all ::1/128 md5 96 | # Allow replication connections from localhost, by a user with the 97 | # replication privilege. 98 | #local replication postgres peer 99 | #host replication postgres 127.0.0.1/32 md5 100 | #host replication postgres ::1/128 md5 101 | -------------------------------------------------------------------------------- /common/postgresql/etc/pg_ident.conf: -------------------------------------------------------------------------------- 1 | # PostgreSQL User Name Maps 2 | # ========================= 3 | # 4 | # Refer to the PostgreSQL documentation, chapter "Client 5 | # Authentication" for a complete description. A short synopsis 6 | # follows. 7 | # 8 | # This file controls PostgreSQL user name mapping. It maps external 9 | # user names to their corresponding PostgreSQL user names. Records 10 | # are of the form: 11 | # 12 | # MAPNAME SYSTEM-USERNAME PG-USERNAME 13 | # 14 | # (The uppercase quantities must be replaced by actual values.) 15 | # 16 | # MAPNAME is the (otherwise freely chosen) map name that was used in 17 | # pg_hba.conf. SYSTEM-USERNAME is the detected user name of the 18 | # client. PG-USERNAME is the requested PostgreSQL user name. The 19 | # existence of a record specifies that SYSTEM-USERNAME may connect as 20 | # PG-USERNAME. 21 | # 22 | # If SYSTEM-USERNAME starts with a slash (/), it will be treated as a 23 | # regular expression. Optionally this can contain a capture (a 24 | # parenthesized subexpression). The substring matching the capture 25 | # will be substituted for \1 (backslash-one) if present in 26 | # PG-USERNAME. 27 | # 28 | # Multiple maps may be specified in this file and used by pg_hba.conf. 29 | # 30 | # No map names are defined in the default configuration. If all 31 | # system user names and PostgreSQL user names are the same, you don't 32 | # need anything in this file. 33 | # 34 | # This file is read on server startup and when the postmaster receives 35 | # a SIGHUP signal. If you edit the file on a running system, you have 36 | # to SIGHUP the postmaster for the changes to take effect. You can 37 | # use "pg_ctl reload" to do that. 38 | 39 | # Put your actual configuration here 40 | # ---------------------------------- 41 | 42 | # MAPNAME SYSTEM-USERNAME PG-USERNAME 43 | -------------------------------------------------------------------------------- /common/postgresql/etc/postgresql.conf: -------------------------------------------------------------------------------- 1 | # ----------------------------- 2 | # PostgreSQL configuration file 3 | # ----------------------------- 4 | # 5 | # This file consists of lines of the form: 6 | # 7 | # name = value 8 | # 9 | # (The "=" is optional.) Whitespace may be used. Comments are introduced with 10 | # "#" anywhere on a line. The complete list of parameter names and allowed 11 | # values can be found in the PostgreSQL documentation. 12 | # 13 | # The commented-out settings shown in this file represent the default values. 14 | # Re-commenting a setting is NOT sufficient to revert it to the default value; 15 | # you need to reload the server. 16 | # 17 | # This file is read on server startup and when the server receives a SIGHUP 18 | # signal. If you edit the file on a running system, you have to SIGHUP the 19 | # server for the changes to take effect, or use "pg_ctl reload". Some 20 | # parameters, which are marked below, require a server shutdown and restart to 21 | # take effect. 22 | # 23 | # Any parameter can also be given as a command-line option to the server, e.g., 24 | # "postgres -c log_connections=on". Some parameters can be changed at run time 25 | # with the "SET" SQL command. 26 | # 27 | # Memory units: kB = kilobytes Time units: ms = milliseconds 28 | # MB = megabytes s = seconds 29 | # GB = gigabytes min = minutes 30 | # TB = terabytes h = hours 31 | # d = days 32 | 33 | 34 | #------------------------------------------------------------------------------ 35 | # FILE LOCATIONS 36 | #------------------------------------------------------------------------------ 37 | 38 | # The default values of these variables are driven from the -D command-line 39 | # option or PGDATA environment variable, represented here as ConfigDir. 40 | 41 | data_directory = '/opt/stellar/postgresql/data' 42 | hba_file = '/opt/stellar/postgresql/etc/pg_hba.conf' 43 | ident_file = '/opt/stellar/postgresql/etc/pg_ident.conf' 44 | 45 | #------------------------------------------------------------------------------ 46 | # CONNECTIONS AND AUTHENTICATION 47 | #------------------------------------------------------------------------------ 48 | 49 | # - Connection Settings - 50 | 51 | listen_addresses = '*' 52 | port = 5432 # (change requires restart) 53 | max_connections = 150 # (change requires restart) 54 | # Note: Increasing max_connections costs ~400 bytes of shared memory per 55 | # connection slot, plus lock space (see max_locks_per_transaction). 56 | #superuser_reserved_connections = 3 # (change requires restart) 57 | #unix_socket_directories = '/opt/stellar/postgresql/run' 58 | #unix_socket_group = '' # (change requires restart) 59 | #unix_socket_permissions = 0777 # begin with 0 to use octal notation 60 | # (change requires restart) 61 | #bonjour = off # advertise server via Bonjour 62 | # (change requires restart) 63 | #bonjour_name = '' # defaults to the computer name 64 | # (change requires restart) 65 | 66 | # - Security and Authentication - 67 | 68 | #authentication_timeout = 1min # 1s-600s 69 | ssl = true # (change requires restart) 70 | #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers 71 | # (change requires restart) 72 | #ssl_prefer_server_ciphers = on # (change requires restart) 73 | #ssl_ecdh_curve = 'prime256v1' # (change requires restart) 74 | #ssl_renegotiation_limit = 0 # amount of data between renegotiations 75 | ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart) 76 | ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart) 77 | #ssl_ca_file = '' # (change requires restart) 78 | #ssl_crl_file = '' # (change requires restart) 79 | #password_encryption = on 80 | #db_user_namespace = off 81 | 82 | # GSSAPI using Kerberos 83 | #krb_server_keyfile = '' 84 | #krb_caseins_users = off 85 | 86 | # - TCP Keepalives - 87 | # see "man 7 tcp" for details 88 | 89 | #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; 90 | # 0 selects the system default 91 | #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; 92 | # 0 selects the system default 93 | #tcp_keepalives_count = 0 # TCP_KEEPCNT; 94 | # 0 selects the system default 95 | 96 | 97 | #------------------------------------------------------------------------------ 98 | # RESOURCE USAGE (except WAL) 99 | #------------------------------------------------------------------------------ 100 | 101 | # - Memory - 102 | 103 | shared_buffers = 128MB # min 128kB 104 | # (change requires restart) 105 | #huge_pages = try # on, off, or try 106 | # (change requires restart) 107 | #temp_buffers = 8MB # min 800kB 108 | #max_prepared_transactions = 0 # zero disables the feature 109 | # (change requires restart) 110 | # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory 111 | # per transaction slot, plus lock space (see max_locks_per_transaction). 112 | # It is not advisable to set max_prepared_transactions nonzero unless you 113 | # actively intend to use prepared transactions. 114 | #work_mem = 4MB # min 64kB 115 | #maintenance_work_mem = 64MB # min 1MB 116 | #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem 117 | #max_stack_depth = 2MB # min 100kB 118 | dynamic_shared_memory_type = posix # the default is the first option 119 | # supported by the operating system: 120 | # posix 121 | # sysv 122 | # windows 123 | # mmap 124 | # use none to disable dynamic shared memory 125 | 126 | # - Disk - 127 | 128 | #temp_file_limit = -1 # limits per-session temp file space 129 | # in kB, or -1 for no limit 130 | 131 | # - Kernel Resource Usage - 132 | 133 | #max_files_per_process = 1000 # min 25 134 | # (change requires restart) 135 | #shared_preload_libraries = '' # (change requires restart) 136 | 137 | # - Cost-Based Vacuum Delay - 138 | 139 | #vacuum_cost_delay = 0 # 0-100 milliseconds 140 | #vacuum_cost_page_hit = 1 # 0-10000 credits 141 | #vacuum_cost_page_miss = 10 # 0-10000 credits 142 | #vacuum_cost_page_dirty = 20 # 0-10000 credits 143 | #vacuum_cost_limit = 200 # 1-10000 credits 144 | 145 | # - Background Writer - 146 | 147 | #bgwriter_delay = 200ms # 10-10000ms between rounds 148 | #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round 149 | #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round 150 | 151 | # - Asynchronous Behavior - 152 | 153 | #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching 154 | #max_worker_processes = 8 155 | 156 | 157 | #------------------------------------------------------------------------------ 158 | # WRITE AHEAD LOG 159 | #------------------------------------------------------------------------------ 160 | 161 | # - Settings - 162 | 163 | #wal_level = minimal # minimal, archive, hot_standby, or logical 164 | # (change requires restart) 165 | #fsync = on # turns forced synchronization on or off 166 | #synchronous_commit = on # synchronization level; 167 | # off, local, remote_write, or on 168 | #wal_sync_method = fsync # the default is the first option 169 | # supported by the operating system: 170 | # open_datasync 171 | # fdatasync (default on Linux) 172 | # fsync 173 | # fsync_writethrough 174 | # open_sync 175 | #full_page_writes = on # recover from partial page writes 176 | #wal_log_hints = off # also do full page writes of non-critical updates 177 | # (change requires restart) 178 | #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers 179 | # (change requires restart) 180 | #wal_writer_delay = 200ms # 1-10000 milliseconds 181 | 182 | #commit_delay = 0 # range 0-100000, in microseconds 183 | #commit_siblings = 5 # range 1-1000 184 | 185 | # - Checkpoints - 186 | 187 | #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each 188 | #checkpoint_timeout = 5min # range 30s-1h 189 | #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 190 | #checkpoint_warning = 30s # 0 disables 191 | 192 | # - Archiving - 193 | 194 | #archive_mode = off # allows archiving to be done 195 | # (change requires restart) 196 | #archive_command = '' # command to use to archive a logfile segment 197 | # placeholders: %p = path of file to archive 198 | # %f = file name only 199 | # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' 200 | #archive_timeout = 0 # force a logfile segment switch after this 201 | # number of seconds; 0 disables 202 | 203 | 204 | #------------------------------------------------------------------------------ 205 | # REPLICATION 206 | #------------------------------------------------------------------------------ 207 | 208 | # - Sending Server(s) - 209 | 210 | # Set these on the master and on any standby that will send replication data. 211 | 212 | #max_wal_senders = 0 # max number of walsender processes 213 | # (change requires restart) 214 | #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables 215 | #wal_sender_timeout = 60s # in milliseconds; 0 disables 216 | 217 | #max_replication_slots = 0 # max number of replication slots 218 | # (change requires restart) 219 | 220 | # - Master Server - 221 | 222 | # These settings are ignored on a standby server. 223 | 224 | #synchronous_standby_names = '' # standby servers that provide sync rep 225 | # comma-separated list of application_name 226 | # from standby(s); '*' = all 227 | #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed 228 | 229 | # - Standby Servers - 230 | 231 | # These settings are ignored on a master server. 232 | 233 | #hot_standby = off # "on" allows queries during recovery 234 | # (change requires restart) 235 | #max_standby_archive_delay = 30s # max delay before canceling queries 236 | # when reading WAL from archive; 237 | # -1 allows indefinite delay 238 | #max_standby_streaming_delay = 30s # max delay before canceling queries 239 | # when reading streaming WAL; 240 | # -1 allows indefinite delay 241 | #wal_receiver_status_interval = 10s # send replies at least this often 242 | # 0 disables 243 | #hot_standby_feedback = off # send info from standby to prevent 244 | # query conflicts 245 | #wal_receiver_timeout = 60s # time that receiver waits for 246 | # communication from master 247 | # in milliseconds; 0 disables 248 | 249 | 250 | #------------------------------------------------------------------------------ 251 | # QUERY TUNING 252 | #------------------------------------------------------------------------------ 253 | 254 | # - Planner Method Configuration - 255 | 256 | #enable_bitmapscan = on 257 | #enable_hashagg = on 258 | #enable_hashjoin = on 259 | #enable_indexscan = on 260 | #enable_indexonlyscan = on 261 | #enable_material = on 262 | #enable_mergejoin = on 263 | #enable_nestloop = on 264 | #enable_seqscan = on 265 | #enable_sort = on 266 | #enable_tidscan = on 267 | 268 | # - Planner Cost Constants - 269 | 270 | #seq_page_cost = 1.0 # measured on an arbitrary scale 271 | #random_page_cost = 4.0 # same scale as above 272 | #cpu_tuple_cost = 0.01 # same scale as above 273 | #cpu_index_tuple_cost = 0.005 # same scale as above 274 | #cpu_operator_cost = 0.0025 # same scale as above 275 | #effective_cache_size = 4GB 276 | 277 | # - Genetic Query Optimizer - 278 | 279 | #geqo = on 280 | #geqo_threshold = 12 281 | #geqo_effort = 5 # range 1-10 282 | #geqo_pool_size = 0 # selects default based on effort 283 | #geqo_generations = 0 # selects default based on effort 284 | #geqo_selection_bias = 2.0 # range 1.5-2.0 285 | #geqo_seed = 0.0 # range 0.0-1.0 286 | 287 | # - Other Planner Options - 288 | 289 | #default_statistics_target = 100 # range 1-10000 290 | #constraint_exclusion = partition # on, off, or partition 291 | #cursor_tuple_fraction = 0.1 # range 0.0-1.0 292 | #from_collapse_limit = 8 293 | #join_collapse_limit = 8 # 1 disables collapsing of explicit 294 | # JOIN clauses 295 | 296 | 297 | #------------------------------------------------------------------------------ 298 | # ERROR REPORTING AND LOGGING 299 | #------------------------------------------------------------------------------ 300 | 301 | # - Where to Log - 302 | 303 | #log_destination = 'stderr' # Valid values are combinations of 304 | # stderr, csvlog, syslog, and eventlog, 305 | # depending on platform. csvlog 306 | # requires logging_collector to be on. 307 | 308 | # This is used when logging to stderr: 309 | #logging_collector = off # Enable capturing of stderr and csvlog 310 | # into log files. Required to be on for 311 | # csvlogs. 312 | # (change requires restart) 313 | 314 | # These are only used if logging_collector is on: 315 | #log_directory = 'pg_log' # directory where log files are written, 316 | # can be absolute or relative to PGDATA 317 | #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, 318 | # can include strftime() escapes 319 | #log_file_mode = 0600 # creation mode for log files, 320 | # begin with 0 to use octal notation 321 | #log_truncate_on_rotation = off # If on, an existing log file with the 322 | # same name as the new log file will be 323 | # truncated rather than appended to. 324 | # But such truncation only occurs on 325 | # time-driven rotation, not on restarts 326 | # or size-driven rotation. Default is 327 | # off, meaning append to existing files 328 | # in all cases. 329 | #log_rotation_age = 1d # Automatic rotation of logfiles will 330 | # happen after that time. 0 disables. 331 | #log_rotation_size = 10MB # Automatic rotation of logfiles will 332 | # happen after that much log output. 333 | # 0 disables. 334 | 335 | # These are relevant when logging to syslog: 336 | #syslog_facility = 'LOCAL0' 337 | #syslog_ident = 'postgres' 338 | 339 | # This is only relevant when logging to eventlog (win32): 340 | #event_source = 'PostgreSQL' 341 | 342 | # - When to Log - 343 | 344 | #client_min_messages = notice # values in order of decreasing detail: 345 | # debug5 346 | # debug4 347 | # debug3 348 | # debug2 349 | # debug1 350 | # log 351 | # notice 352 | # warning 353 | # error 354 | 355 | #log_min_messages = warning # values in order of decreasing detail: 356 | # debug5 357 | # debug4 358 | # debug3 359 | # debug2 360 | # debug1 361 | # info 362 | # notice 363 | # warning 364 | # error 365 | # log 366 | # fatal 367 | # panic 368 | 369 | #log_min_error_statement = error # values in order of decreasing detail: 370 | # debug5 371 | # debug4 372 | # debug3 373 | # debug2 374 | # debug1 375 | # info 376 | # notice 377 | # warning 378 | # error 379 | # log 380 | # fatal 381 | # panic (effectively off) 382 | 383 | #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements 384 | # and their durations, > 0 logs only 385 | # statements running at least this number 386 | # of milliseconds 387 | 388 | 389 | # - What to Log - 390 | 391 | #debug_print_parse = off 392 | #debug_print_rewritten = off 393 | #debug_print_plan = off 394 | #debug_pretty_print = on 395 | #log_checkpoints = off 396 | #log_connections = off 397 | #log_disconnections = off 398 | #log_duration = off 399 | #log_error_verbosity = default # terse, default, or verbose messages 400 | #log_hostname = off 401 | log_line_prefix = '%t [%p-%l] %q%u@%d ' # special values: 402 | # %a = application name 403 | # %u = user name 404 | # %d = database name 405 | # %r = remote host and port 406 | # %h = remote host 407 | # %p = process ID 408 | # %t = timestamp without milliseconds 409 | # %m = timestamp with milliseconds 410 | # %i = command tag 411 | # %e = SQL state 412 | # %c = session ID 413 | # %l = session line number 414 | # %s = session start timestamp 415 | # %v = virtual transaction ID 416 | # %x = transaction ID (0 if none) 417 | # %q = stop here in non-session 418 | # processes 419 | # %% = '%' 420 | # e.g. '<%u%%%d> ' 421 | #log_lock_waits = off # log lock waits >= deadlock_timeout 422 | #log_statement = 'none' # none, ddl, mod, all 423 | #log_temp_files = -1 # log temporary files equal or larger 424 | # than the specified size in kilobytes; 425 | # -1 disables, 0 logs all temp files 426 | log_timezone = 'UTC' 427 | 428 | 429 | #------------------------------------------------------------------------------ 430 | # RUNTIME STATISTICS 431 | #------------------------------------------------------------------------------ 432 | 433 | # - Query/Index Statistics Collector - 434 | 435 | #track_activities = on 436 | #track_counts = on 437 | #track_io_timing = off 438 | #track_functions = none # none, pl, all 439 | #track_activity_query_size = 1024 # (change requires restart) 440 | #update_process_title = on 441 | # stats_temp_directory = '' 442 | 443 | 444 | # - Statistics Monitoring - 445 | 446 | #log_parser_stats = off 447 | #log_planner_stats = off 448 | #log_executor_stats = off 449 | #log_statement_stats = off 450 | 451 | 452 | #------------------------------------------------------------------------------ 453 | # AUTOVACUUM PARAMETERS 454 | #------------------------------------------------------------------------------ 455 | 456 | #autovacuum = on # Enable autovacuum subprocess? 'on' 457 | # requires track_counts to also be on. 458 | #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and 459 | # their durations, > 0 logs only 460 | # actions running at least this number 461 | # of milliseconds. 462 | #autovacuum_max_workers = 3 # max number of autovacuum subprocesses 463 | # (change requires restart) 464 | #autovacuum_naptime = 1min # time between autovacuum runs 465 | #autovacuum_vacuum_threshold = 50 # min number of row updates before 466 | # vacuum 467 | #autovacuum_analyze_threshold = 50 # min number of row updates before 468 | # analyze 469 | #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum 470 | #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze 471 | #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum 472 | # (change requires restart) 473 | #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age 474 | # before forced vacuum 475 | # (change requires restart) 476 | #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for 477 | # autovacuum, in milliseconds; 478 | # -1 means use vacuum_cost_delay 479 | #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for 480 | # autovacuum, -1 means use 481 | # vacuum_cost_limit 482 | 483 | 484 | #------------------------------------------------------------------------------ 485 | # CLIENT CONNECTION DEFAULTS 486 | #------------------------------------------------------------------------------ 487 | 488 | # - Statement Behavior - 489 | 490 | #search_path = '"$user",public' # schema names 491 | #default_tablespace = '' # a tablespace name, '' uses the default 492 | #temp_tablespaces = '' # a list of tablespace names, '' uses 493 | # only default tablespace 494 | #check_function_bodies = on 495 | #default_transaction_isolation = 'read committed' 496 | #default_transaction_read_only = off 497 | #default_transaction_deferrable = off 498 | #session_replication_role = 'origin' 499 | #statement_timeout = 0 # in milliseconds, 0 is disabled 500 | #lock_timeout = 0 # in milliseconds, 0 is disabled 501 | #vacuum_freeze_min_age = 50000000 502 | #vacuum_freeze_table_age = 150000000 503 | #vacuum_multixact_freeze_min_age = 5000000 504 | #vacuum_multixact_freeze_table_age = 150000000 505 | #bytea_output = 'hex' # hex, escape 506 | #xmlbinary = 'base64' 507 | #xmloption = 'content' 508 | #gin_fuzzy_search_limit = 0 509 | 510 | # - Locale and Formatting - 511 | 512 | datestyle = 'iso, mdy' 513 | #intervalstyle = 'postgres' 514 | timezone = 'UTC' 515 | #timezone_abbreviations = 'Default' # Select the set of available time zone 516 | # abbreviations. Currently, there are 517 | # Default 518 | # Australia (historical usage) 519 | # India 520 | # You can create your own file in 521 | # share/timezonesets/. 522 | #extra_float_digits = 0 # min -15, max 3 523 | #client_encoding = sql_ascii # actually, defaults to database 524 | # encoding 525 | 526 | # These settings are initialized by initdb, but they can be changed. 527 | lc_messages = 'C' # locale for system error message 528 | # strings 529 | lc_monetary = 'C' # locale for monetary formatting 530 | lc_numeric = 'C' # locale for number formatting 531 | lc_time = 'C' # locale for time formatting 532 | 533 | # default configuration for text search 534 | default_text_search_config = 'pg_catalog.english' 535 | 536 | # - Other Defaults - 537 | 538 | #dynamic_library_path = '$libdir' 539 | #local_preload_libraries = '' 540 | #session_preload_libraries = '' 541 | 542 | 543 | #------------------------------------------------------------------------------ 544 | # LOCK MANAGEMENT 545 | #------------------------------------------------------------------------------ 546 | 547 | #deadlock_timeout = 1s 548 | #max_locks_per_transaction = 64 # min 10 549 | # (change requires restart) 550 | # Note: Each lock table slot uses ~270 bytes of shared memory, and there are 551 | # max_locks_per_transaction * (max_connections + max_prepared_transactions) 552 | # lock table slots. 553 | #max_pred_locks_per_transaction = 64 # min 10 554 | # (change requires restart) 555 | 556 | 557 | #------------------------------------------------------------------------------ 558 | # VERSION/PLATFORM COMPATIBILITY 559 | #------------------------------------------------------------------------------ 560 | 561 | # - Previous PostgreSQL Versions - 562 | 563 | #array_nulls = on 564 | #backslash_quote = safe_encoding # on, off, or safe_encoding 565 | #default_with_oids = off 566 | #escape_string_warning = on 567 | #lo_compat_privileges = off 568 | #quote_all_identifiers = off 569 | #sql_inheritance = on 570 | #standard_conforming_strings = on 571 | #synchronize_seqscans = on 572 | 573 | # - Other Platforms and Clients - 574 | 575 | #transform_null_equals = off 576 | 577 | 578 | #------------------------------------------------------------------------------ 579 | # ERROR HANDLING 580 | #------------------------------------------------------------------------------ 581 | 582 | #exit_on_error = off # terminate session on any error? 583 | #restart_after_crash = on # reinitialize after backend crash? 584 | 585 | 586 | #------------------------------------------------------------------------------ 587 | # CONFIG FILE INCLUDES 588 | #------------------------------------------------------------------------------ 589 | 590 | # These options allow settings to be loaded from files other than the 591 | # default postgresql.conf. 592 | 593 | #include_dir = 'conf.d' # include files ending in '.conf' from 594 | # directory 'conf.d' 595 | #include_if_exists = 'exists.conf' # include file only if it exists 596 | #include = 'special.conf' # include file 597 | 598 | 599 | #------------------------------------------------------------------------------ 600 | # CUSTOMIZED OPTIONS 601 | #------------------------------------------------------------------------------ 602 | 603 | # Add settings for extensions here 604 | -------------------------------------------------------------------------------- /common/stellar-rpc/bin/start: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | set -e 4 | set -o pipefail 5 | 6 | echo "starting stellar-rpc..." 7 | exec /usr/bin/stellar-rpc --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.cfg 8 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf: -------------------------------------------------------------------------------- 1 | [inet_http_server] 2 | port=127.0.0.1:9001 3 | 4 | [supervisord] 5 | user=root 6 | logfile=/var/log/supervisor/supervisord.log 7 | pidfile=/var/run/supervisord.pid 8 | childlogdir=/var/log/supervisor 9 | 10 | [rpcinterface:supervisor] 11 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 12 | 13 | [supervisorctl] 14 | serverurl=http://127.0.0.1:9001 15 | 16 | [include] 17 | files=supervisord.conf.d/*.conf 18 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf.d/horizon.conf: -------------------------------------------------------------------------------- 1 | [program:horizon] 2 | user=stellar 3 | directory=/opt/stellar/horizon 4 | command=/opt/stellar/horizon/bin/start 5 | autostart=false 6 | autorestart=true 7 | priority=30 8 | # No idea why Horizon stdout goes to stderr log in supervisor... This is the 9 | # easiest fix. 10 | redirect_stderr=true 11 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf.d/nginx.conf: -------------------------------------------------------------------------------- 1 | [program:nginx] 2 | user=www-data 3 | directory=/opt/stellar/nginx 4 | command=/opt/stellar/nginx/bin/start 5 | autostart=true 6 | autorestart=true 7 | priority=50 8 | redirect_stderr=true 9 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf.d/postgresql.conf: -------------------------------------------------------------------------------- 1 | [program:postgresql] 2 | user=postgres 3 | command=/usr/lib/postgresql/14/bin/postgres -D "/opt/stellar/postgresql/data" -c config_file=/opt/stellar/postgresql/etc/postgresql.conf 4 | stopsignal=INT 5 | autostart=false 6 | autorestart=true 7 | priority=10 8 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf.d/stellar-core.conf: -------------------------------------------------------------------------------- 1 | [program:stellar-core] 2 | user=stellar 3 | directory=/opt/stellar/core 4 | command=/opt/stellar/core/bin/start 5 | autostart=false 6 | autorestart=true 7 | priority=20 8 | -------------------------------------------------------------------------------- /common/supervisor/etc/supervisord.conf.d/stellar-rpc.conf: -------------------------------------------------------------------------------- 1 | [program:stellar-rpc] 2 | user=stellar 3 | directory=/opt/stellar/stellar-rpc 4 | command=/opt/stellar/stellar-rpc/bin/start 5 | autostart=false 6 | startretries=50 7 | autorestart=true 8 | priority=60 9 | redirect_stderr=true 10 | -------------------------------------------------------------------------------- /dependencies: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | set -e 3 | 4 | # dependencies 5 | export DEBIAN_FRONTEND=noninteractive 6 | apt-get update 7 | apt-get install -y curl apt-transport-https \ 8 | postgresql-client postgresql postgresql-contrib \ 9 | sudo supervisor psmisc \ 10 | nginx rsync jq netcat \ 11 | libunwind8 sqlite libc++abi1-12 libc++1-12 12 | apt-get clean 13 | rm -rf /var/lib/apt/lists/* 14 | 15 | chown -R www-data:www-data /var/lib/nginx 16 | 17 | echo "\nDone installing dependencies...\n" 18 | -------------------------------------------------------------------------------- /futurenet/core/etc/stellar-core.cfg: -------------------------------------------------------------------------------- 1 | HTTP_PORT=11626 2 | PUBLIC_HTTP_PORT=true 3 | LOG_FILE_PATH="" 4 | MANUAL_CLOSE=__MANUAL_CLOSE__ 5 | 6 | NETWORK_PASSPHRASE="__NETWORK__" 7 | DATABASE="postgresql://dbname=core host=localhost user=stellar password=__PGPASS__" 8 | UNSAFE_QUORUM=true 9 | FAILURE_SAFETY=0 10 | CATCHUP_RECENT=100 11 | 12 | EXPERIMENTAL_BUCKETLIST_DB=true 13 | 14 | [[HOME_DOMAINS]] 15 | HOME_DOMAIN="futurenet.stellar.org" 16 | QUALITY="MEDIUM" 17 | 18 | [[VALIDATORS]] 19 | NAME="sdf_futurenet_1" 20 | HOME_DOMAIN="futurenet.stellar.org" 21 | PUBLIC_KEY="GBRIF2N52GVN3EXBBICD5F4L5VUFXK6S6VOUCF6T2DWPLOLGWEPPYZTF" 22 | ADDRESS="core-live-futurenet-a.stellar.org" 23 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_001/{0} -o {1}" 24 | [[VALIDATORS]] 25 | NAME="sdf_futurenet_2" 26 | HOME_DOMAIN="futurenet.stellar.org" 27 | PUBLIC_KEY="GAQM2MF22BYOGIF47RZ2523YK7ZL7Z3CIIX6CCPZBWWLE6KJTXMD4SLO" 28 | ADDRESS="core-live-futurenet-b.stellar.org" 29 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_002/{0} -o {1}" 30 | [[VALIDATORS]] 31 | NAME="sdf_futurenet_3" 32 | HOME_DOMAIN="futurenet.stellar.org" 33 | PUBLIC_KEY="GC2HLBHG4Z7KV73OPKZD6EWXIXM5QOIZVKN5OS4V2HISDOJC3TUORLY4" 34 | ADDRESS="core-live-futurenet-c.stellar.org" 35 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_003/{0} -o {1}" 36 | 37 | 38 | -------------------------------------------------------------------------------- /futurenet/horizon/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for futurenet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11726 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11725 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | 12 | FAILURE_SAFETY=0 13 | UNSAFE_QUORUM=true 14 | 15 | [[HOME_DOMAINS]] 16 | HOME_DOMAIN="futurenet.stellar.org" 17 | QUALITY="MEDIUM" 18 | 19 | [[VALIDATORS]] 20 | NAME="sdf_futurenet_1" 21 | HOME_DOMAIN="futurenet.stellar.org" 22 | PUBLIC_KEY="GBRIF2N52GVN3EXBBICD5F4L5VUFXK6S6VOUCF6T2DWPLOLGWEPPYZTF" 23 | ADDRESS="core-live-futurenet-a.stellar.org" 24 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_001/{0} -o {1}" 25 | [[VALIDATORS]] 26 | NAME="sdf_futurenet_2" 27 | HOME_DOMAIN="futurenet.stellar.org" 28 | PUBLIC_KEY="GAQM2MF22BYOGIF47RZ2523YK7ZL7Z3CIIX6CCPZBWWLE6KJTXMD4SLO" 29 | ADDRESS="core-live-futurenet-b.stellar.org" 30 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_002/{0} -o {1}" 31 | [[VALIDATORS]] 32 | NAME="sdf_futurenet_3" 33 | HOME_DOMAIN="futurenet.stellar.org" 34 | PUBLIC_KEY="GC2HLBHG4Z7KV73OPKZD6EWXIXM5QOIZVKN5OS4V2HISDOJC3TUORLY4" 35 | ADDRESS="core-live-futurenet-c.stellar.org" 36 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_003/{0} -o {1}" 37 | 38 | -------------------------------------------------------------------------------- /futurenet/nginx/etc/conf.d/friendbot.conf: -------------------------------------------------------------------------------- 1 | location /friendbot { 2 | rewrite /friendbot / break; 3 | proxy_pass https://friendbot-futurenet.stellar.org; 4 | proxy_ssl_server_name on; 5 | proxy_ssl_name friendbot-futurenet.stellar.org; 6 | proxy_set_header Host friendbot-futurenet.stellar.org; 7 | proxy_redirect off; 8 | } 9 | -------------------------------------------------------------------------------- /futurenet/stellar-rpc/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for futurenet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11826 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11825 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 12 | 13 | FAILURE_SAFETY=0 14 | UNSAFE_QUORUM=true 15 | 16 | [[HOME_DOMAINS]] 17 | HOME_DOMAIN="futurenet.stellar.org" 18 | QUALITY="MEDIUM" 19 | 20 | [[VALIDATORS]] 21 | NAME="sdf_futurenet_1" 22 | HOME_DOMAIN="futurenet.stellar.org" 23 | PUBLIC_KEY="GBRIF2N52GVN3EXBBICD5F4L5VUFXK6S6VOUCF6T2DWPLOLGWEPPYZTF" 24 | ADDRESS="core-live-futurenet-a.stellar.org" 25 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_001/{0} -o {1}" 26 | [[VALIDATORS]] 27 | NAME="sdf_futurenet_2" 28 | HOME_DOMAIN="futurenet.stellar.org" 29 | PUBLIC_KEY="GAQM2MF22BYOGIF47RZ2523YK7ZL7Z3CIIX6CCPZBWWLE6KJTXMD4SLO" 30 | ADDRESS="core-live-futurenet-b.stellar.org" 31 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_002/{0} -o {1}" 32 | [[VALIDATORS]] 33 | NAME="sdf_futurenet_3" 34 | HOME_DOMAIN="futurenet.stellar.org" 35 | PUBLIC_KEY="GC2HLBHG4Z7KV73OPKZD6EWXIXM5QOIZVKN5OS4V2HISDOJC3TUORLY4" 36 | ADDRESS="core-live-futurenet-c.stellar.org" 37 | HISTORY="curl -sf http://history.stellar.org/dev/core-futurenet/core_futurenet_003/{0} -o {1}" 38 | 39 | -------------------------------------------------------------------------------- /futurenet/stellar-rpc/etc/stellar-rpc.cfg: -------------------------------------------------------------------------------- 1 | ENDPOINT="localhost:8003" 2 | ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" 3 | FRIENDBOT_URL="https://friendbot-futurenet.stellar.org/" 4 | NETWORK_PASSPHRASE="__NETWORK__" 5 | STELLAR_CORE_URL="http://localhost:11826" 6 | CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" 7 | CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" 8 | CAPTIVE_CORE_USE_DB=true 9 | STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" 10 | HISTORY_ARCHIVE_URLS="__ARCHIVE__" 11 | DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" 12 | STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 13 | CHECKPOINT_FREQUENCY=64 14 | -------------------------------------------------------------------------------- /local/core/etc/config-settings/README.md: -------------------------------------------------------------------------------- 1 | # config-settings 2 | This directory contains Soroban settings upgrade files for each default protocol version (set with the arg `PROTOCOL_VERSION_DEFAULT`) specified on each on the three builds (`latest`, `testing`, and `future`). They need to be separated by protocol version because the number of cost types is dependant on protocol, and we specifically want to capture the cpu cost type changes we make outside of protocol boundaries. 3 | -------------------------------------------------------------------------------- /local/core/etc/config-settings/p21/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "updated_entry": [ 3 | { 4 | "contract_max_size_bytes": 65536 5 | }, 6 | { 7 | "contract_compute_v0": { 8 | "ledger_max_instructions": 500000000, 9 | "tx_max_instructions": 100000000, 10 | "fee_rate_per_instructions_increment": 25, 11 | "tx_memory_limit": 41943040 12 | } 13 | }, 14 | { 15 | "contract_ledger_cost_v0": { 16 | "ledger_max_read_ledger_entries": 200, 17 | "ledger_max_read_bytes": 500000, 18 | "ledger_max_write_ledger_entries": 125, 19 | "ledger_max_write_bytes": 143360, 20 | "tx_max_read_ledger_entries": 40, 21 | "tx_max_read_bytes": 200000, 22 | "tx_max_write_ledger_entries": 25, 23 | "tx_max_write_bytes": 132096, 24 | "fee_read_ledger_entry": 6250, 25 | "fee_write_ledger_entry": 10000, 26 | "fee_read1_kb": 1786, 27 | "bucket_list_target_size_bytes": 14495514624, 28 | "write_fee1_kb_bucket_list_low": -12034, 29 | "write_fee1_kb_bucket_list_high": 115390, 30 | "bucket_list_write_fee_growth_factor": 1000 31 | } 32 | }, 33 | { 34 | "contract_historical_data_v0": { 35 | "fee_historical1_kb": 16235 36 | } 37 | }, 38 | { 39 | "contract_events_v0": { 40 | "tx_max_contract_events_size_bytes": 8198, 41 | "fee_contract_events1_kb": 10000 42 | } 43 | }, 44 | { 45 | "contract_bandwidth_v0": { 46 | "ledger_max_txs_size_bytes": 71680, 47 | "tx_max_size_bytes": 71680, 48 | "fee_tx_size1_kb": 1624 49 | } 50 | }, 51 | { 52 | "contract_cost_params_cpu_instructions": [ 53 | { 54 | "ext": "v0", 55 | "const_term": 4, 56 | "linear_term": 0 57 | }, 58 | { 59 | "ext": "v0", 60 | "const_term": 434, 61 | "linear_term": 16 62 | }, 63 | { 64 | "ext": "v0", 65 | "const_term": 42, 66 | "linear_term": 16 67 | }, 68 | { 69 | "ext": "v0", 70 | "const_term": 44, 71 | "linear_term": 16 72 | }, 73 | { 74 | "ext": "v0", 75 | "const_term": 295, 76 | "linear_term": 0 77 | }, 78 | { 79 | "ext": "v0", 80 | "const_term": 60, 81 | "linear_term": 0 82 | }, 83 | { 84 | "ext": "v0", 85 | "const_term": 221, 86 | "linear_term": 26 87 | }, 88 | { 89 | "ext": "v0", 90 | "const_term": 331, 91 | "linear_term": 4369 92 | }, 93 | { 94 | "ext": "v0", 95 | "const_term": 3636, 96 | "linear_term": 7013 97 | }, 98 | { 99 | "ext": "v0", 100 | "const_term": 40256, 101 | "linear_term": 0 102 | }, 103 | { 104 | "ext": "v0", 105 | "const_term": 377551, 106 | "linear_term": 4059 107 | }, 108 | { 109 | "ext": "v0", 110 | "const_term": 417482, 111 | "linear_term": 45712 112 | }, 113 | { 114 | "ext": "v0", 115 | "const_term": 41142, 116 | "linear_term": 634 117 | }, 118 | { 119 | "ext": "v0", 120 | "const_term": 1945, 121 | "linear_term": 0 122 | }, 123 | { 124 | "ext": "v0", 125 | "const_term": 6481, 126 | "linear_term": 5943 127 | }, 128 | { 129 | "ext": "v0", 130 | "const_term": 711, 131 | "linear_term": 0 132 | }, 133 | { 134 | "ext": "v0", 135 | "const_term": 2314804, 136 | "linear_term": 0 137 | }, 138 | { 139 | "ext": "v0", 140 | "const_term": 4176, 141 | "linear_term": 0 142 | }, 143 | { 144 | "ext": "v0", 145 | "const_term": 4716, 146 | "linear_term": 0 147 | }, 148 | { 149 | "ext": "v0", 150 | "const_term": 4680, 151 | "linear_term": 0 152 | }, 153 | { 154 | "ext": "v0", 155 | "const_term": 4256, 156 | "linear_term": 0 157 | }, 158 | { 159 | "ext": "v0", 160 | "const_term": 884, 161 | "linear_term": 0 162 | }, 163 | { 164 | "ext": "v0", 165 | "const_term": 1059, 166 | "linear_term": 502 167 | }, 168 | { 169 | "ext": "v0", 170 | "const_term": 73077, 171 | "linear_term": 25410 172 | }, 173 | { 174 | "ext": "v0", 175 | "const_term": 0, 176 | "linear_term": 540752 177 | }, 178 | { 179 | "ext": "v0", 180 | "const_term": 0, 181 | "linear_term": 176363 182 | }, 183 | { 184 | "ext": "v0", 185 | "const_term": 0, 186 | "linear_term": 29989 187 | }, 188 | { 189 | "ext": "v0", 190 | "const_term": 0, 191 | "linear_term": 1061449 192 | }, 193 | { 194 | "ext": "v0", 195 | "const_term": 0, 196 | "linear_term": 237336 197 | }, 198 | { 199 | "ext": "v0", 200 | "const_term": 0, 201 | "linear_term": 328476 202 | }, 203 | { 204 | "ext": "v0", 205 | "const_term": 0, 206 | "linear_term": 701845 207 | }, 208 | { 209 | "ext": "v0", 210 | "const_term": 0, 211 | "linear_term": 429383 212 | }, 213 | { 214 | "ext": "v0", 215 | "const_term": 0, 216 | "linear_term": 28 217 | }, 218 | { 219 | "ext": "v0", 220 | "const_term": 43030, 221 | "linear_term": 0 222 | }, 223 | { 224 | "ext": "v0", 225 | "const_term": 0, 226 | "linear_term": 7556 227 | }, 228 | { 229 | "ext": "v0", 230 | "const_term": 0, 231 | "linear_term": 10711 232 | }, 233 | { 234 | "ext": "v0", 235 | "const_term": 0, 236 | "linear_term": 3300 237 | }, 238 | { 239 | "ext": "v0", 240 | "const_term": 0, 241 | "linear_term": 0 242 | }, 243 | { 244 | "ext": "v0", 245 | "const_term": 0, 246 | "linear_term": 23038 247 | }, 248 | { 249 | "ext": "v0", 250 | "const_term": 0, 251 | "linear_term": 42488 252 | }, 253 | { 254 | "ext": "v0", 255 | "const_term": 0, 256 | "linear_term": 828974 257 | }, 258 | { 259 | "ext": "v0", 260 | "const_term": 0, 261 | "linear_term": 297100 262 | }, 263 | { 264 | "ext": "v0", 265 | "const_term": 0, 266 | "linear_term": 14 267 | }, 268 | { 269 | "ext": "v0", 270 | "const_term": 1882, 271 | "linear_term": 0 272 | }, 273 | { 274 | "ext": "v0", 275 | "const_term": 3000906, 276 | "linear_term": 0 277 | } 278 | ] 279 | }, 280 | { 281 | "contract_data_key_size_bytes": 200 282 | }, 283 | { 284 | "contract_data_entry_size_bytes": 65536 285 | }, 286 | { 287 | "state_archival": { 288 | "max_entry_ttl": 3110400, 289 | "min_temporary_ttl": 17280, 290 | "min_persistent_ttl": 2073600, 291 | "persistent_rent_rate_denominator": 1402, 292 | "temp_rent_rate_denominator": 2804, 293 | "max_entries_to_archive": 1000, 294 | "bucket_list_size_window_sample_size": 30, 295 | "bucket_list_window_sample_period": 64, 296 | "eviction_scan_size": 100000, 297 | "starting_eviction_scan_level": 7 298 | } 299 | }, 300 | { 301 | "contract_execution_lanes": { 302 | "ledger_max_tx_count": 100 303 | } 304 | } 305 | ] 306 | } -------------------------------------------------------------------------------- /local/core/etc/config-settings/p21/unlimited.json: -------------------------------------------------------------------------------- 1 | { 2 | "updated_entry": [ 3 | { 4 | "contract_max_size_bytes": 4294967295 5 | }, 6 | { 7 | "contract_compute_v0": { 8 | "ledger_max_instructions": 2305843009213693951, 9 | "tx_max_instructions": 2305843009213693951, 10 | "fee_rate_per_instructions_increment": 100, 11 | "tx_memory_limit": 4294967295 12 | } 13 | }, 14 | { 15 | "contract_ledger_cost_v0": { 16 | "ledger_max_read_ledger_entries": 4294967295, 17 | "ledger_max_read_bytes": 4294967295, 18 | "ledger_max_write_ledger_entries": 4294967295, 19 | "ledger_max_write_bytes": 4294967295, 20 | "tx_max_read_ledger_entries": 4294967295, 21 | "tx_max_read_bytes": 4294967295, 22 | "tx_max_write_ledger_entries": 4294967295, 23 | "tx_max_write_bytes": 4294967295, 24 | "fee_read_ledger_entry": 1000, 25 | "fee_write_ledger_entry": 3000, 26 | "fee_read1_kb": 1000, 27 | "bucket_list_target_size_bytes": 2305843009213694000, 28 | "write_fee1_kb_bucket_list_low": 1000, 29 | "write_fee1_kb_bucket_list_high": 4000000, 30 | "bucket_list_write_fee_growth_factor": 1000 31 | } 32 | }, 33 | { 34 | "contract_historical_data_v0": { 35 | "fee_historical1_kb": 5000 36 | } 37 | }, 38 | { 39 | "contract_events_v0": { 40 | "tx_max_contract_events_size_bytes": 4294967295, 41 | "fee_contract_events1_kb": 300 42 | } 43 | }, 44 | { 45 | "contract_bandwidth_v0": { 46 | "ledger_max_txs_size_bytes": 4294967295, 47 | "tx_max_size_bytes": 4294967295, 48 | "fee_tx_size1_kb": 500 49 | } 50 | }, 51 | { 52 | "contract_cost_params_cpu_instructions": [ 53 | { 54 | "ext": "v0", 55 | "const_term": 4, 56 | "linear_term": 0 57 | }, 58 | { 59 | "ext": "v0", 60 | "const_term": 434, 61 | "linear_term": 16 62 | }, 63 | { 64 | "ext": "v0", 65 | "const_term": 42, 66 | "linear_term": 16 67 | }, 68 | { 69 | "ext": "v0", 70 | "const_term": 44, 71 | "linear_term": 16 72 | }, 73 | { 74 | "ext": "v0", 75 | "const_term": 295, 76 | "linear_term": 0 77 | }, 78 | { 79 | "ext": "v0", 80 | "const_term": 60, 81 | "linear_term": 0 82 | }, 83 | { 84 | "ext": "v0", 85 | "const_term": 221, 86 | "linear_term": 26 87 | }, 88 | { 89 | "ext": "v0", 90 | "const_term": 331, 91 | "linear_term": 4369 92 | }, 93 | { 94 | "ext": "v0", 95 | "const_term": 3636, 96 | "linear_term": 7013 97 | }, 98 | { 99 | "ext": "v0", 100 | "const_term": 40256, 101 | "linear_term": 0 102 | }, 103 | { 104 | "ext": "v0", 105 | "const_term": 377551, 106 | "linear_term": 4059 107 | }, 108 | { 109 | "ext": "v0", 110 | "const_term": 417482, 111 | "linear_term": 45712 112 | }, 113 | { 114 | "ext": "v0", 115 | "const_term": 41142, 116 | "linear_term": 634 117 | }, 118 | { 119 | "ext": "v0", 120 | "const_term": 1945, 121 | "linear_term": 0 122 | }, 123 | { 124 | "ext": "v0", 125 | "const_term": 6481, 126 | "linear_term": 5943 127 | }, 128 | { 129 | "ext": "v0", 130 | "const_term": 711, 131 | "linear_term": 0 132 | }, 133 | { 134 | "ext": "v0", 135 | "const_term": 2314804, 136 | "linear_term": 0 137 | }, 138 | { 139 | "ext": "v0", 140 | "const_term": 4176, 141 | "linear_term": 0 142 | }, 143 | { 144 | "ext": "v0", 145 | "const_term": 4716, 146 | "linear_term": 0 147 | }, 148 | { 149 | "ext": "v0", 150 | "const_term": 4680, 151 | "linear_term": 0 152 | }, 153 | { 154 | "ext": "v0", 155 | "const_term": 4256, 156 | "linear_term": 0 157 | }, 158 | { 159 | "ext": "v0", 160 | "const_term": 884, 161 | "linear_term": 0 162 | }, 163 | { 164 | "ext": "v0", 165 | "const_term": 1059, 166 | "linear_term": 502 167 | }, 168 | { 169 | "ext": "v0", 170 | "const_term": 73077, 171 | "linear_term": 25410 172 | }, 173 | { 174 | "ext": "v0", 175 | "const_term": 0, 176 | "linear_term": 540752 177 | }, 178 | { 179 | "ext": "v0", 180 | "const_term": 0, 181 | "linear_term": 176363 182 | }, 183 | { 184 | "ext": "v0", 185 | "const_term": 0, 186 | "linear_term": 29989 187 | }, 188 | { 189 | "ext": "v0", 190 | "const_term": 0, 191 | "linear_term": 1061449 192 | }, 193 | { 194 | "ext": "v0", 195 | "const_term": 0, 196 | "linear_term": 237336 197 | }, 198 | { 199 | "ext": "v0", 200 | "const_term": 0, 201 | "linear_term": 328476 202 | }, 203 | { 204 | "ext": "v0", 205 | "const_term": 0, 206 | "linear_term": 701845 207 | }, 208 | { 209 | "ext": "v0", 210 | "const_term": 0, 211 | "linear_term": 429383 212 | }, 213 | { 214 | "ext": "v0", 215 | "const_term": 0, 216 | "linear_term": 28 217 | }, 218 | { 219 | "ext": "v0", 220 | "const_term": 43030, 221 | "linear_term": 0 222 | }, 223 | { 224 | "ext": "v0", 225 | "const_term": 0, 226 | "linear_term": 7556 227 | }, 228 | { 229 | "ext": "v0", 230 | "const_term": 0, 231 | "linear_term": 10711 232 | }, 233 | { 234 | "ext": "v0", 235 | "const_term": 0, 236 | "linear_term": 3300 237 | }, 238 | { 239 | "ext": "v0", 240 | "const_term": 0, 241 | "linear_term": 0 242 | }, 243 | { 244 | "ext": "v0", 245 | "const_term": 0, 246 | "linear_term": 23038 247 | }, 248 | { 249 | "ext": "v0", 250 | "const_term": 0, 251 | "linear_term": 42488 252 | }, 253 | { 254 | "ext": "v0", 255 | "const_term": 0, 256 | "linear_term": 828974 257 | }, 258 | { 259 | "ext": "v0", 260 | "const_term": 0, 261 | "linear_term": 297100 262 | }, 263 | { 264 | "ext": "v0", 265 | "const_term": 0, 266 | "linear_term": 14 267 | }, 268 | { 269 | "ext": "v0", 270 | "const_term": 1882, 271 | "linear_term": 0 272 | }, 273 | { 274 | "ext": "v0", 275 | "const_term": 3000906, 276 | "linear_term": 0 277 | } 278 | ] 279 | }, 280 | { 281 | "contract_data_key_size_bytes": 4294967295 282 | }, 283 | { 284 | "contract_data_entry_size_bytes": 4294967295 285 | }, 286 | { 287 | "state_archival": { 288 | "max_entry_ttl": 3110400, 289 | "min_temporary_ttl": 16, 290 | "min_persistent_ttl": 120960, 291 | "persistent_rent_rate_denominator": 535680, 292 | "temp_rent_rate_denominator": 5356800, 293 | "max_entries_to_archive": 100, 294 | "bucket_list_size_window_sample_size": 30, 295 | "bucket_list_window_sample_period": 64, 296 | "eviction_scan_size": 100000, 297 | "starting_eviction_scan_level": 6 298 | } 299 | }, 300 | { 301 | "contract_execution_lanes": { 302 | "ledger_max_tx_count": 4294967295 303 | } 304 | } 305 | ] 306 | } 307 | -------------------------------------------------------------------------------- /local/core/etc/config-settings/p22/testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "updated_entry": [ 3 | { 4 | "contract_max_size_bytes": 65536 5 | }, 6 | { 7 | "contract_compute_v0": { 8 | "ledger_max_instructions": 500000000, 9 | "tx_max_instructions": 100000000, 10 | "fee_rate_per_instructions_increment": 25, 11 | "tx_memory_limit": 41943040 12 | } 13 | }, 14 | { 15 | "contract_ledger_cost_v0": { 16 | "ledger_max_read_ledger_entries": 200, 17 | "ledger_max_read_bytes": 500000, 18 | "ledger_max_write_ledger_entries": 125, 19 | "ledger_max_write_bytes": 143360, 20 | "tx_max_read_ledger_entries": 40, 21 | "tx_max_read_bytes": 200000, 22 | "tx_max_write_ledger_entries": 25, 23 | "tx_max_write_bytes": 132096, 24 | "fee_read_ledger_entry": 6250, 25 | "fee_write_ledger_entry": 10000, 26 | "fee_read1_kb": 1786, 27 | "bucket_list_target_size_bytes": 14495514624, 28 | "write_fee1_kb_bucket_list_low": -12034, 29 | "write_fee1_kb_bucket_list_high": 115390, 30 | "bucket_list_write_fee_growth_factor": 1000 31 | } 32 | }, 33 | { 34 | "contract_historical_data_v0": { 35 | "fee_historical1_kb": 16235 36 | } 37 | }, 38 | { 39 | "contract_events_v0": { 40 | "tx_max_contract_events_size_bytes": 8198, 41 | "fee_contract_events1_kb": 10000 42 | } 43 | }, 44 | { 45 | "contract_bandwidth_v0": { 46 | "ledger_max_txs_size_bytes": 71680, 47 | "tx_max_size_bytes": 71680, 48 | "fee_tx_size1_kb": 1624 49 | } 50 | }, 51 | { 52 | "contract_cost_params_cpu_instructions": [ 53 | { 54 | "ext": "v0", 55 | "const_term": 4, 56 | "linear_term": 0 57 | }, 58 | { 59 | "ext": "v0", 60 | "const_term": 434, 61 | "linear_term": 16 62 | }, 63 | { 64 | "ext": "v0", 65 | "const_term": 42, 66 | "linear_term": 16 67 | }, 68 | { 69 | "ext": "v0", 70 | "const_term": 44, 71 | "linear_term": 16 72 | }, 73 | { 74 | "ext": "v0", 75 | "const_term": 295, 76 | "linear_term": 0 77 | }, 78 | { 79 | "ext": "v0", 80 | "const_term": 60, 81 | "linear_term": 0 82 | }, 83 | { 84 | "ext": "v0", 85 | "const_term": 221, 86 | "linear_term": 26 87 | }, 88 | { 89 | "ext": "v0", 90 | "const_term": 331, 91 | "linear_term": 4369 92 | }, 93 | { 94 | "ext": "v0", 95 | "const_term": 3636, 96 | "linear_term": 7013 97 | }, 98 | { 99 | "ext": "v0", 100 | "const_term": 40256, 101 | "linear_term": 0 102 | }, 103 | { 104 | "ext": "v0", 105 | "const_term": 377551, 106 | "linear_term": 4059 107 | }, 108 | { 109 | "ext": "v0", 110 | "const_term": 417482, 111 | "linear_term": 45712 112 | }, 113 | { 114 | "ext": "v0", 115 | "const_term": 41142, 116 | "linear_term": 634 117 | }, 118 | { 119 | "ext": "v0", 120 | "const_term": 1945, 121 | "linear_term": 0 122 | }, 123 | { 124 | "ext": "v0", 125 | "const_term": 6481, 126 | "linear_term": 5943 127 | }, 128 | { 129 | "ext": "v0", 130 | "const_term": 711, 131 | "linear_term": 0 132 | }, 133 | { 134 | "ext": "v0", 135 | "const_term": 2314804, 136 | "linear_term": 0 137 | }, 138 | { 139 | "ext": "v0", 140 | "const_term": 4176, 141 | "linear_term": 0 142 | }, 143 | { 144 | "ext": "v0", 145 | "const_term": 4716, 146 | "linear_term": 0 147 | }, 148 | { 149 | "ext": "v0", 150 | "const_term": 4680, 151 | "linear_term": 0 152 | }, 153 | { 154 | "ext": "v0", 155 | "const_term": 4256, 156 | "linear_term": 0 157 | }, 158 | { 159 | "ext": "v0", 160 | "const_term": 884, 161 | "linear_term": 0 162 | }, 163 | { 164 | "ext": "v0", 165 | "const_term": 1059, 166 | "linear_term": 502 167 | }, 168 | { 169 | "ext": "v0", 170 | "const_term": 73077, 171 | "linear_term": 25410 172 | }, 173 | { 174 | "ext": "v0", 175 | "const_term": 0, 176 | "linear_term": 540752 177 | }, 178 | { 179 | "ext": "v0", 180 | "const_term": 0, 181 | "linear_term": 176363 182 | }, 183 | { 184 | "ext": "v0", 185 | "const_term": 0, 186 | "linear_term": 29989 187 | }, 188 | { 189 | "ext": "v0", 190 | "const_term": 0, 191 | "linear_term": 1061449 192 | }, 193 | { 194 | "ext": "v0", 195 | "const_term": 0, 196 | "linear_term": 237336 197 | }, 198 | { 199 | "ext": "v0", 200 | "const_term": 0, 201 | "linear_term": 328476 202 | }, 203 | { 204 | "ext": "v0", 205 | "const_term": 0, 206 | "linear_term": 701845 207 | }, 208 | { 209 | "ext": "v0", 210 | "const_term": 0, 211 | "linear_term": 429383 212 | }, 213 | { 214 | "ext": "v0", 215 | "const_term": 0, 216 | "linear_term": 28 217 | }, 218 | { 219 | "ext": "v0", 220 | "const_term": 43030, 221 | "linear_term": 0 222 | }, 223 | { 224 | "ext": "v0", 225 | "const_term": 0, 226 | "linear_term": 7556 227 | }, 228 | { 229 | "ext": "v0", 230 | "const_term": 0, 231 | "linear_term": 10711 232 | }, 233 | { 234 | "ext": "v0", 235 | "const_term": 0, 236 | "linear_term": 3300 237 | }, 238 | { 239 | "ext": "v0", 240 | "const_term": 0, 241 | "linear_term": 0 242 | }, 243 | { 244 | "ext": "v0", 245 | "const_term": 0, 246 | "linear_term": 23038 247 | }, 248 | { 249 | "ext": "v0", 250 | "const_term": 0, 251 | "linear_term": 42488 252 | }, 253 | { 254 | "ext": "v0", 255 | "const_term": 0, 256 | "linear_term": 828974 257 | }, 258 | { 259 | "ext": "v0", 260 | "const_term": 0, 261 | "linear_term": 297100 262 | }, 263 | { 264 | "ext": "v0", 265 | "const_term": 0, 266 | "linear_term": 14 267 | }, 268 | { 269 | "ext": "v0", 270 | "const_term": 1882, 271 | "linear_term": 0 272 | }, 273 | { 274 | "ext": "v0", 275 | "const_term": 3000906, 276 | "linear_term": 0 277 | }, 278 | { 279 | "ext": "v0", 280 | "const_term": 661, 281 | "linear_term": 0 282 | }, 283 | { 284 | "ext": "v0", 285 | "const_term": 985, 286 | "linear_term": 0 287 | }, 288 | { 289 | "ext": "v0", 290 | "const_term": 1934, 291 | "linear_term": 0 292 | }, 293 | { 294 | "ext": "v0", 295 | "const_term": 730510, 296 | "linear_term": 0 297 | }, 298 | { 299 | "ext": "v0", 300 | "const_term": 5921, 301 | "linear_term": 0 302 | }, 303 | { 304 | "ext": "v0", 305 | "const_term": 1057822, 306 | "linear_term": 0 307 | }, 308 | { 309 | "ext": "v0", 310 | "const_term": 92642, 311 | "linear_term": 0 312 | }, 313 | { 314 | "ext": "v0", 315 | "const_term": 100742, 316 | "linear_term": 0 317 | }, 318 | { 319 | "ext": "v0", 320 | "const_term": 7689, 321 | "linear_term": 0 322 | }, 323 | { 324 | "ext": "v0", 325 | "const_term": 2458985, 326 | "linear_term": 0 327 | }, 328 | { 329 | "ext": "v0", 330 | "const_term": 2426722, 331 | "linear_term": 96397671 332 | }, 333 | { 334 | "ext": "v0", 335 | "const_term": 1541554, 336 | "linear_term": 0 337 | }, 338 | { 339 | "ext": "v0", 340 | "const_term": 3211191, 341 | "linear_term": 6713 342 | }, 343 | { 344 | "ext": "v0", 345 | "const_term": 25207, 346 | "linear_term": 0 347 | }, 348 | { 349 | "ext": "v0", 350 | "const_term": 7873219, 351 | "linear_term": 0 352 | }, 353 | { 354 | "ext": "v0", 355 | "const_term": 8035968, 356 | "linear_term": 309667335 357 | }, 358 | { 359 | "ext": "v0", 360 | "const_term": 2420202, 361 | "linear_term": 0 362 | }, 363 | { 364 | "ext": "v0", 365 | "const_term": 7050564, 366 | "linear_term": 6797 367 | }, 368 | { 369 | "ext": "v0", 370 | "const_term": 10558948, 371 | "linear_term": 632860943 372 | }, 373 | { 374 | "ext": "v0", 375 | "const_term": 1994, 376 | "linear_term": 0 377 | }, 378 | { 379 | "ext": "v0", 380 | "const_term": 1155, 381 | "linear_term": 0 382 | }, 383 | { 384 | "ext": "v0", 385 | "const_term": 74, 386 | "linear_term": 0 387 | }, 388 | { 389 | "ext": "v0", 390 | "const_term": 332, 391 | "linear_term": 0 392 | }, 393 | { 394 | "ext": "v0", 395 | "const_term": 691, 396 | "linear_term": 74558 397 | }, 398 | { 399 | "ext": "v0", 400 | "const_term": 35421, 401 | "linear_term": 0 402 | } 403 | ] 404 | }, 405 | { 406 | "contract_data_key_size_bytes": 200 407 | }, 408 | { 409 | "contract_data_entry_size_bytes": 65536 410 | }, 411 | { 412 | "state_archival": { 413 | "max_entry_ttl": 3110400, 414 | "min_temporary_ttl": 17280, 415 | "min_persistent_ttl": 2073600, 416 | "persistent_rent_rate_denominator": 1402, 417 | "temp_rent_rate_denominator": 2804, 418 | "max_entries_to_archive": 1000, 419 | "bucket_list_size_window_sample_size": 30, 420 | "bucket_list_window_sample_period": 64, 421 | "eviction_scan_size": 100000, 422 | "starting_eviction_scan_level": 7 423 | } 424 | }, 425 | { 426 | "contract_execution_lanes": { 427 | "ledger_max_tx_count": 100 428 | } 429 | } 430 | ] 431 | } 432 | -------------------------------------------------------------------------------- /local/core/etc/config-settings/p22/unlimited.json: -------------------------------------------------------------------------------- 1 | { 2 | "updated_entry": [ 3 | { 4 | "contract_max_size_bytes": 4294967295 5 | }, 6 | { 7 | "contract_compute_v0": { 8 | "ledger_max_instructions": 2305843009213693951, 9 | "tx_max_instructions": 2305843009213693951, 10 | "fee_rate_per_instructions_increment": 100, 11 | "tx_memory_limit": 4294967295 12 | } 13 | }, 14 | { 15 | "contract_ledger_cost_v0": { 16 | "ledger_max_read_ledger_entries": 4294967295, 17 | "ledger_max_read_bytes": 4294967295, 18 | "ledger_max_write_ledger_entries": 4294967295, 19 | "ledger_max_write_bytes": 4294967295, 20 | "tx_max_read_ledger_entries": 4294967295, 21 | "tx_max_read_bytes": 4294967295, 22 | "tx_max_write_ledger_entries": 4294967295, 23 | "tx_max_write_bytes": 4294967295, 24 | "fee_read_ledger_entry": 1000, 25 | "fee_write_ledger_entry": 3000, 26 | "fee_read1_kb": 1000, 27 | "bucket_list_target_size_bytes": 2305843009213694000, 28 | "write_fee1_kb_bucket_list_low": 1000, 29 | "write_fee1_kb_bucket_list_high": 4000000, 30 | "bucket_list_write_fee_growth_factor": 1000 31 | } 32 | }, 33 | { 34 | "contract_historical_data_v0": { 35 | "fee_historical1_kb": 5000 36 | } 37 | }, 38 | { 39 | "contract_events_v0": { 40 | "tx_max_contract_events_size_bytes": 4294967295, 41 | "fee_contract_events1_kb": 300 42 | } 43 | }, 44 | { 45 | "contract_bandwidth_v0": { 46 | "ledger_max_txs_size_bytes": 4294967295, 47 | "tx_max_size_bytes": 4294967295, 48 | "fee_tx_size1_kb": 500 49 | } 50 | }, 51 | { 52 | "contract_cost_params_cpu_instructions": [ 53 | { 54 | "ext": "v0", 55 | "const_term": 4, 56 | "linear_term": 0 57 | }, 58 | { 59 | "ext": "v0", 60 | "const_term": 434, 61 | "linear_term": 16 62 | }, 63 | { 64 | "ext": "v0", 65 | "const_term": 42, 66 | "linear_term": 16 67 | }, 68 | { 69 | "ext": "v0", 70 | "const_term": 44, 71 | "linear_term": 16 72 | }, 73 | { 74 | "ext": "v0", 75 | "const_term": 295, 76 | "linear_term": 0 77 | }, 78 | { 79 | "ext": "v0", 80 | "const_term": 60, 81 | "linear_term": 0 82 | }, 83 | { 84 | "ext": "v0", 85 | "const_term": 221, 86 | "linear_term": 26 87 | }, 88 | { 89 | "ext": "v0", 90 | "const_term": 331, 91 | "linear_term": 4369 92 | }, 93 | { 94 | "ext": "v0", 95 | "const_term": 3636, 96 | "linear_term": 7013 97 | }, 98 | { 99 | "ext": "v0", 100 | "const_term": 40256, 101 | "linear_term": 0 102 | }, 103 | { 104 | "ext": "v0", 105 | "const_term": 377551, 106 | "linear_term": 4059 107 | }, 108 | { 109 | "ext": "v0", 110 | "const_term": 417482, 111 | "linear_term": 45712 112 | }, 113 | { 114 | "ext": "v0", 115 | "const_term": 41142, 116 | "linear_term": 634 117 | }, 118 | { 119 | "ext": "v0", 120 | "const_term": 1945, 121 | "linear_term": 0 122 | }, 123 | { 124 | "ext": "v0", 125 | "const_term": 6481, 126 | "linear_term": 5943 127 | }, 128 | { 129 | "ext": "v0", 130 | "const_term": 711, 131 | "linear_term": 0 132 | }, 133 | { 134 | "ext": "v0", 135 | "const_term": 2314804, 136 | "linear_term": 0 137 | }, 138 | { 139 | "ext": "v0", 140 | "const_term": 4176, 141 | "linear_term": 0 142 | }, 143 | { 144 | "ext": "v0", 145 | "const_term": 4716, 146 | "linear_term": 0 147 | }, 148 | { 149 | "ext": "v0", 150 | "const_term": 4680, 151 | "linear_term": 0 152 | }, 153 | { 154 | "ext": "v0", 155 | "const_term": 4256, 156 | "linear_term": 0 157 | }, 158 | { 159 | "ext": "v0", 160 | "const_term": 884, 161 | "linear_term": 0 162 | }, 163 | { 164 | "ext": "v0", 165 | "const_term": 1059, 166 | "linear_term": 502 167 | }, 168 | { 169 | "ext": "v0", 170 | "const_term": 73077, 171 | "linear_term": 25410 172 | }, 173 | { 174 | "ext": "v0", 175 | "const_term": 0, 176 | "linear_term": 540752 177 | }, 178 | { 179 | "ext": "v0", 180 | "const_term": 0, 181 | "linear_term": 176363 182 | }, 183 | { 184 | "ext": "v0", 185 | "const_term": 0, 186 | "linear_term": 29989 187 | }, 188 | { 189 | "ext": "v0", 190 | "const_term": 0, 191 | "linear_term": 1061449 192 | }, 193 | { 194 | "ext": "v0", 195 | "const_term": 0, 196 | "linear_term": 237336 197 | }, 198 | { 199 | "ext": "v0", 200 | "const_term": 0, 201 | "linear_term": 328476 202 | }, 203 | { 204 | "ext": "v0", 205 | "const_term": 0, 206 | "linear_term": 701845 207 | }, 208 | { 209 | "ext": "v0", 210 | "const_term": 0, 211 | "linear_term": 429383 212 | }, 213 | { 214 | "ext": "v0", 215 | "const_term": 0, 216 | "linear_term": 28 217 | }, 218 | { 219 | "ext": "v0", 220 | "const_term": 43030, 221 | "linear_term": 0 222 | }, 223 | { 224 | "ext": "v0", 225 | "const_term": 0, 226 | "linear_term": 7556 227 | }, 228 | { 229 | "ext": "v0", 230 | "const_term": 0, 231 | "linear_term": 10711 232 | }, 233 | { 234 | "ext": "v0", 235 | "const_term": 0, 236 | "linear_term": 3300 237 | }, 238 | { 239 | "ext": "v0", 240 | "const_term": 0, 241 | "linear_term": 0 242 | }, 243 | { 244 | "ext": "v0", 245 | "const_term": 0, 246 | "linear_term": 23038 247 | }, 248 | { 249 | "ext": "v0", 250 | "const_term": 0, 251 | "linear_term": 42488 252 | }, 253 | { 254 | "ext": "v0", 255 | "const_term": 0, 256 | "linear_term": 828974 257 | }, 258 | { 259 | "ext": "v0", 260 | "const_term": 0, 261 | "linear_term": 297100 262 | }, 263 | { 264 | "ext": "v0", 265 | "const_term": 0, 266 | "linear_term": 14 267 | }, 268 | { 269 | "ext": "v0", 270 | "const_term": 1882, 271 | "linear_term": 0 272 | }, 273 | { 274 | "ext": "v0", 275 | "const_term": 3000906, 276 | "linear_term": 0 277 | }, 278 | { 279 | "ext": "v0", 280 | "const_term": 661, 281 | "linear_term": 0 282 | }, 283 | { 284 | "ext": "v0", 285 | "const_term": 985, 286 | "linear_term": 0 287 | }, 288 | { 289 | "ext": "v0", 290 | "const_term": 1934, 291 | "linear_term": 0 292 | }, 293 | { 294 | "ext": "v0", 295 | "const_term": 730510, 296 | "linear_term": 0 297 | }, 298 | { 299 | "ext": "v0", 300 | "const_term": 5921, 301 | "linear_term": 0 302 | }, 303 | { 304 | "ext": "v0", 305 | "const_term": 1057822, 306 | "linear_term": 0 307 | }, 308 | { 309 | "ext": "v0", 310 | "const_term": 92642, 311 | "linear_term": 0 312 | }, 313 | { 314 | "ext": "v0", 315 | "const_term": 100742, 316 | "linear_term": 0 317 | }, 318 | { 319 | "ext": "v0", 320 | "const_term": 7689, 321 | "linear_term": 0 322 | }, 323 | { 324 | "ext": "v0", 325 | "const_term": 2458985, 326 | "linear_term": 0 327 | }, 328 | { 329 | "ext": "v0", 330 | "const_term": 2426722, 331 | "linear_term": 96397671 332 | }, 333 | { 334 | "ext": "v0", 335 | "const_term": 1541554, 336 | "linear_term": 0 337 | }, 338 | { 339 | "ext": "v0", 340 | "const_term": 3211191, 341 | "linear_term": 6713 342 | }, 343 | { 344 | "ext": "v0", 345 | "const_term": 25207, 346 | "linear_term": 0 347 | }, 348 | { 349 | "ext": "v0", 350 | "const_term": 7873219, 351 | "linear_term": 0 352 | }, 353 | { 354 | "ext": "v0", 355 | "const_term": 8035968, 356 | "linear_term": 309667335 357 | }, 358 | { 359 | "ext": "v0", 360 | "const_term": 2420202, 361 | "linear_term": 0 362 | }, 363 | { 364 | "ext": "v0", 365 | "const_term": 7050564, 366 | "linear_term": 6797 367 | }, 368 | { 369 | "ext": "v0", 370 | "const_term": 10558948, 371 | "linear_term": 632860943 372 | }, 373 | { 374 | "ext": "v0", 375 | "const_term": 1994, 376 | "linear_term": 0 377 | }, 378 | { 379 | "ext": "v0", 380 | "const_term": 1155, 381 | "linear_term": 0 382 | }, 383 | { 384 | "ext": "v0", 385 | "const_term": 74, 386 | "linear_term": 0 387 | }, 388 | { 389 | "ext": "v0", 390 | "const_term": 332, 391 | "linear_term": 0 392 | }, 393 | { 394 | "ext": "v0", 395 | "const_term": 691, 396 | "linear_term": 74558 397 | }, 398 | { 399 | "ext": "v0", 400 | "const_term": 35421, 401 | "linear_term": 0 402 | } 403 | ] 404 | }, 405 | { 406 | "contract_data_key_size_bytes": 4294967295 407 | }, 408 | { 409 | "contract_data_entry_size_bytes": 4294967295 410 | }, 411 | { 412 | "state_archival": { 413 | "max_entry_ttl": 3110400, 414 | "min_temporary_ttl": 16, 415 | "min_persistent_ttl": 120960, 416 | "persistent_rent_rate_denominator": 535680, 417 | "temp_rent_rate_denominator": 5356800, 418 | "max_entries_to_archive": 100, 419 | "bucket_list_size_window_sample_size": 30, 420 | "bucket_list_window_sample_period": 64, 421 | "eviction_scan_size": 100000, 422 | "starting_eviction_scan_level": 6 423 | } 424 | }, 425 | { 426 | "contract_execution_lanes": { 427 | "ledger_max_tx_count": 4294967295 428 | } 429 | } 430 | ] 431 | } 432 | -------------------------------------------------------------------------------- /local/core/etc/stellar-core.cfg: -------------------------------------------------------------------------------- 1 | # simple configuration for a local test "network" 2 | # see stellar-core_example.cfg for a description of the configuration parameters 3 | 4 | HTTP_PORT=11626 5 | PUBLIC_HTTP_PORT=true 6 | MANUAL_CLOSE=__MANUAL_CLOSE__ 7 | ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true 8 | 9 | NETWORK_PASSPHRASE="__NETWORK__" 10 | NODE_SEED="SDQVDISRYN2JXBS7ICL7QJAEKB3HWBJFP2QECXG7GZICAHBK4UNJCWK2 self" 11 | NODE_IS_VALIDATOR=true 12 | 13 | #DATABASE="postgresql://dbname=stellar user=postgres password=password host=localhost" 14 | #DATABASE="sqlite3://stellar.db" 15 | DATABASE="postgresql://dbname=core host=localhost user=stellar password=__PGPASS__" 16 | 17 | EXPERIMENTAL_BUCKETLIST_DB=true 18 | 19 | COMMANDS=["ll?level=debug"] 20 | 21 | FAILURE_SAFETY=0 22 | UNSAFE_QUORUM=true 23 | #The public keys of the Stellar testnet servers 24 | [QUORUM_SET] 25 | THRESHOLD_PERCENT=100 26 | VALIDATORS=["$self"] 27 | 28 | [HISTORY.vs] 29 | get="cp /tmp/stellar-core/history/vs/{0} {1}" 30 | put="cp {0} /tmp/stellar-core/history/vs/{1}" 31 | mkdir="mkdir -p /tmp/stellar-core/history/vs/{0}" 32 | -------------------------------------------------------------------------------- /local/horizon/etc/horizon.env: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export DATABASE_URL="postgres://stellar:__PGPASS__@localhost/horizon" 4 | export STELLAR_CORE_URL="http://localhost:11626" 5 | export STELLAR_CORE_BINARY_PATH=/usr/bin/stellar-core 6 | export LOG_LEVEL="info" 7 | export ENABLE_CAPTIVE_CORE_INGESTION="true" 8 | export CAPTIVE_CORE_USE_DB=true 9 | export STELLAR_CAPTIVE_CORE_HTTP_PORT=0 10 | export INGEST="true" 11 | export PER_HOUR_RATE_LIMIT="72000" 12 | export NETWORK_PASSPHRASE="__NETWORK__" 13 | export DISABLE_ASSET_STATS="true" 14 | export HISTORY_ARCHIVE_URLS="__ARCHIVE__" 15 | export ADMIN_PORT=6060 16 | export PORT=8001 17 | export CHECKPOINT_FREQUENCY=8 18 | -------------------------------------------------------------------------------- /local/horizon/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # simple captive core configuration for a local test "network" 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11726 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11725 8 | DATABASE="__DATABASE__" 9 | ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true 10 | 11 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 12 | 13 | UNSAFE_QUORUM=true 14 | FAILURE_SAFETY=0 15 | 16 | [[VALIDATORS]] 17 | NAME="local_core" 18 | HOME_DOMAIN="core.local" 19 | # From "SDQVDISRYN2JXBS7ICL7QJAEKB3HWBJFP2QECXG7GZICAHBK4UNJCWK2" 20 | PUBLIC_KEY="GCTI6HMWRH2QGMFKWVU5M5ZSOTKL7P7JAHZDMJJBKDHGWTEC4CJ7O3DU" 21 | ADDRESS="localhost:11625" 22 | QUALITY="MEDIUM" 23 | HISTORY="curl -sf http://localhost:1570/{0} -o {1}" 24 | -------------------------------------------------------------------------------- /local/nginx/etc/conf.d/friendbot.conf: -------------------------------------------------------------------------------- 1 | location /friendbot { 2 | rewrite /friendbot / break; 3 | proxy_pass http://127.0.0.1:8002; 4 | proxy_redirect off; 5 | } 6 | -------------------------------------------------------------------------------- /local/nginx/etc/conf.d/history-archive.conf: -------------------------------------------------------------------------------- 1 | location /archive { 2 | rewrite /archive/(.*) /$1 break; 3 | proxy_pass http://127.0.0.1:1570; 4 | proxy_redirect off; 5 | } 6 | -------------------------------------------------------------------------------- /local/stellar-rpc/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # simple captive core configuration for a local test "network" 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11826 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11825 8 | DATABASE="__DATABASE__" 9 | ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true 10 | 11 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 12 | ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 13 | 14 | UNSAFE_QUORUM=true 15 | FAILURE_SAFETY=0 16 | 17 | [[VALIDATORS]] 18 | NAME="local_core" 19 | HOME_DOMAIN="core.local" 20 | # From "SDQVDISRYN2JXBS7ICL7QJAEKB3HWBJFP2QECXG7GZICAHBK4UNJCWK2" 21 | PUBLIC_KEY="GCTI6HMWRH2QGMFKWVU5M5ZSOTKL7P7JAHZDMJJBKDHGWTEC4CJ7O3DU" 22 | ADDRESS="localhost:11625" 23 | QUALITY="MEDIUM" 24 | HISTORY="curl -sf http://localhost:1570/{0} -o {1}" 25 | -------------------------------------------------------------------------------- /local/stellar-rpc/etc/stellar-rpc.cfg: -------------------------------------------------------------------------------- 1 | ENDPOINT="localhost:8003" 2 | ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" 3 | FRIENDBOT_URL="http://localhost:8000/friendbot" 4 | NETWORK_PASSPHRASE="__NETWORK__" 5 | STELLAR_CORE_URL="http://localhost:11826" 6 | CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" 7 | CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" 8 | CAPTIVE_CORE_USE_DB=true 9 | STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" 10 | HISTORY_ARCHIVE_URLS=["__ARCHIVE__"] 11 | DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" 12 | STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 13 | CHECKPOINT_FREQUENCY=8 14 | -------------------------------------------------------------------------------- /local/supervisor/etc/supervisord.conf.d/friendbot.conf: -------------------------------------------------------------------------------- 1 | [program:friendbot] 2 | user=stellar 3 | directory=/opt/stellar/friendbot 4 | command=/opt/stellar/friendbot/bin/start 5 | autostart=false 6 | autorestart=true 7 | startretries=100 8 | priority=40 9 | redirect_stderr=true 10 | -------------------------------------------------------------------------------- /local/supervisor/etc/supervisord.conf.d/history-archive.conf: -------------------------------------------------------------------------------- 1 | [program:history-archive] 2 | user=stellar 3 | directory=/tmp/stellar-core/history/vs 4 | command=/usr/bin/python3 -m http.server 1570 5 | autostart=true 6 | autorestart=true 7 | startretries=100 8 | priority=10 9 | redirect_stderr=true 10 | -------------------------------------------------------------------------------- /pubnet/core/etc/stellar-core.cfg: -------------------------------------------------------------------------------- 1 | HTTP_PORT=11626 2 | PUBLIC_HTTP_PORT=true 3 | LOG_FILE_PATH="" 4 | MANUAL_CLOSE=__MANUAL_CLOSE__ 5 | 6 | DATABASE="postgresql://dbname=core host=localhost user=stellar password=__PGPASS__" 7 | NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015" 8 | CATCHUP_RECENT=100 9 | 10 | EXPERIMENTAL_BUCKETLIST_DB=true 11 | 12 | [[HOME_DOMAINS]] 13 | HOME_DOMAIN="publicnode.org" 14 | QUALITY="HIGH" 15 | 16 | [[HOME_DOMAINS]] 17 | HOME_DOMAIN="lobstr.co" 18 | QUALITY="HIGH" 19 | 20 | [[HOME_DOMAINS]] 21 | HOME_DOMAIN="www.franklintempleton.com" 22 | QUALITY="HIGH" 23 | 24 | [[HOME_DOMAINS]] 25 | HOME_DOMAIN="satoshipay.io" 26 | QUALITY="HIGH" 27 | 28 | [[HOME_DOMAINS]] 29 | HOME_DOMAIN="whalestack.com" 30 | QUALITY="HIGH" 31 | 32 | [[HOME_DOMAINS]] 33 | HOME_DOMAIN="www.stellar.org" 34 | QUALITY="HIGH" 35 | 36 | [[HOME_DOMAINS]] 37 | HOME_DOMAIN="stellar.blockdaemon.com" 38 | QUALITY="HIGH" 39 | 40 | [[VALIDATORS]] 41 | NAME="Boötes" 42 | PUBLIC_KEY="GCVJ4Z6TI6Z2SOGENSPXDQ2U4RKH3CNQKYUHNSSPYFPNWTLGS6EBH7I2" 43 | ADDRESS="bootes.publicnode.org:11625" 44 | HISTORY="curl -sf https://bootes-history.publicnode.org/{0} -o {1}" 45 | HOME_DOMAIN="publicnode.org" 46 | 47 | [[VALIDATORS]] 48 | NAME="Lyra by BP Ventures" 49 | PUBLIC_KEY="GCIXVKNFPKWVMKJKVK2V4NK7D4TC6W3BUMXSIJ365QUAXWBRPPJXIR2Z" 50 | ADDRESS="lyra.publicnode.org:11625" 51 | HISTORY="curl -sf https://lyra-history.publicnode.org/{0} -o {1}" 52 | HOME_DOMAIN="publicnode.org" 53 | 54 | [[VALIDATORS]] 55 | NAME="Hercules by OG Technologies" 56 | PUBLIC_KEY="GBLJNN3AVZZPG2FYAYTYQKECNWTQYYUUY2KVFN2OUKZKBULXIXBZ4FCT" 57 | ADDRESS="hercules.publicnode.org:11625" 58 | HISTORY="curl -sf https://hercules-history.publicnode.org/{0} -o {1}" 59 | HOME_DOMAIN="publicnode.org" 60 | 61 | [[VALIDATORS]] 62 | NAME="LOBSTR 3 (North America)" 63 | PUBLIC_KEY="GD5QWEVV4GZZTQP46BRXV5CUMMMLP4JTGFD7FWYJJWRL54CELY6JGQ63" 64 | ADDRESS="v3.stellar.lobstr.co:11625" 65 | HISTORY="curl -sf https://archive.v3.stellar.lobstr.co/{0} -o {1}" 66 | HOME_DOMAIN="lobstr.co" 67 | 68 | [[VALIDATORS]] 69 | NAME="LOBSTR 1 (Europe)" 70 | PUBLIC_KEY="GCFONE23AB7Y6C5YZOMKUKGETPIAJA4QOYLS5VNS4JHBGKRZCPYHDLW7" 71 | ADDRESS="v1.stellar.lobstr.co:11625" 72 | HISTORY="curl -sf https://archive.v1.stellar.lobstr.co/{0} -o {1}" 73 | HOME_DOMAIN="lobstr.co" 74 | 75 | [[VALIDATORS]] 76 | NAME="LOBSTR 2 (Europe)" 77 | PUBLIC_KEY="GCB2VSADESRV2DDTIVTFLBDI562K6KE3KMKILBHUHUWFXCUBHGQDI7VL" 78 | ADDRESS="v2.stellar.lobstr.co:11625" 79 | HISTORY="curl -sf https://archive.v2.stellar.lobstr.co/{0} -o {1}" 80 | HOME_DOMAIN="lobstr.co" 81 | 82 | [[VALIDATORS]] 83 | NAME="LOBSTR 4 (Asia)" 84 | PUBLIC_KEY="GA7TEPCBDQKI7JQLQ34ZURRMK44DVYCIGVXQQWNSWAEQR6KB4FMCBT7J" 85 | ADDRESS="v4.stellar.lobstr.co:11625" 86 | HISTORY="curl -sf https://archive.v4.stellar.lobstr.co/{0} -o {1}" 87 | HOME_DOMAIN="lobstr.co" 88 | 89 | [[VALIDATORS]] 90 | NAME="LOBSTR 5 (India)" 91 | PUBLIC_KEY="GA5STBMV6QDXFDGD62MEHLLHZTPDI77U3PFOD2SELU5RJDHQWBR5NNK7" 92 | ADDRESS="v5.stellar.lobstr.co:11625" 93 | HISTORY="curl -sf https://archive.v5.stellar.lobstr.co/{0} -o {1}" 94 | HOME_DOMAIN="lobstr.co" 95 | 96 | [[VALIDATORS]] 97 | NAME="FT SCV 2" 98 | PUBLIC_KEY="GCMSM2VFZGRPTZKPH5OABHGH4F3AVS6XTNJXDGCZ3MKCOSUBH3FL6DOB" 99 | ADDRESS="stellar2.franklintempleton.com:11625" 100 | HISTORY="curl -sf https://stellar-history-usc.franklintempleton.com/azuscshf401/{0} -o {1}" 101 | HOME_DOMAIN="www.franklintempleton.com" 102 | 103 | [[VALIDATORS]] 104 | NAME="FT SCV 3" 105 | PUBLIC_KEY="GA7DV63PBUUWNUFAF4GAZVXU2OZMYRATDLKTC7VTCG7AU4XUPN5VRX4A" 106 | ADDRESS="stellar3.franklintempleton.com:11625" 107 | HISTORY="curl -sf https://stellar-history-ins.franklintempleton.com/azinsshf401/{0} -o {1}" 108 | HOME_DOMAIN="www.franklintempleton.com" 109 | 110 | [[VALIDATORS]] 111 | NAME="FT SCV 1" 112 | PUBLIC_KEY="GARYGQ5F2IJEBCZJCBNPWNWVDOFK7IBOHLJKKSG2TMHDQKEEC6P4PE4V" 113 | ADDRESS="stellar1.franklintempleton.com:11625" 114 | HISTORY="curl -sf https://stellar-history-usw.franklintempleton.com/azuswshf401/{0} -o {1}" 115 | HOME_DOMAIN="www.franklintempleton.com" 116 | 117 | [[VALIDATORS]] 118 | NAME="SatoshiPay Frankfurt" 119 | PUBLIC_KEY="GC5SXLNAM3C4NMGK2PXK4R34B5GNZ47FYQ24ZIBFDFOCU6D4KBN4POAE" 120 | ADDRESS="stellar-de-fra.satoshipay.io:11625" 121 | HISTORY="curl -sf https://stellar-history-de-fra.satoshipay.io/{0} -o {1}" 122 | HOME_DOMAIN="satoshipay.io" 123 | 124 | [[VALIDATORS]] 125 | NAME="SatoshiPay Singapore" 126 | PUBLIC_KEY="GBJQUIXUO4XSNPAUT6ODLZUJRV2NPXYASKUBY4G5MYP3M47PCVI55MNT" 127 | ADDRESS="stellar-sg-sin.satoshipay.io:11625" 128 | HISTORY="curl -sf https://stellar-history-sg-sin.satoshipay.io/{0} -o {1}" 129 | HOME_DOMAIN="satoshipay.io" 130 | 131 | [[VALIDATORS]] 132 | NAME="SatoshiPay Iowa" 133 | PUBLIC_KEY="GAK6Z5UVGUVSEK6PEOCAYJISTT5EJBB34PN3NOLEQG2SUKXRVV2F6HZY" 134 | ADDRESS="stellar-us-iowa.satoshipay.io:11625" 135 | HISTORY="curl -sf https://stellar-history-us-iowa.satoshipay.io/{0} -o {1}" 136 | HOME_DOMAIN="satoshipay.io" 137 | 138 | [[VALIDATORS]] 139 | NAME="Whalestack (Germany)" 140 | PUBLIC_KEY="GD6SZQV3WEJUH352NTVLKEV2JM2RH266VPEM7EH5QLLI7ZZAALMLNUVN" 141 | ADDRESS="germany.stellar.whalestack.com:11625" 142 | HISTORY="curl -sf https://germany.stellar.whalestack.com/history/{0} -o {1}" 143 | HOME_DOMAIN="whalestack.com" 144 | 145 | [[VALIDATORS]] 146 | NAME="Whalestack (Hong Kong)" 147 | PUBLIC_KEY="GAZ437J46SCFPZEDLVGDMKZPLFO77XJ4QVAURSJVRZK2T5S7XUFHXI2Z" 148 | ADDRESS="hongkong.stellar.whalestack.com:11625" 149 | HISTORY="curl -sf https://hongkong.stellar.whalestack.com/history/{0} -o {1}" 150 | HOME_DOMAIN="whalestack.com" 151 | 152 | [[VALIDATORS]] 153 | NAME="Whalestack (Finland)" 154 | PUBLIC_KEY="GADLA6BJK6VK33EM2IDQM37L5KGVCY5MSHSHVJA4SCNGNUIEOTCR6J5T" 155 | ADDRESS="finland.stellar.whalestack.com:11625" 156 | HISTORY="curl -sf https://finland.stellar.whalestack.com/history/{0} -o {1}" 157 | HOME_DOMAIN="whalestack.com" 158 | 159 | [[VALIDATORS]] 160 | NAME="SDF 2" 161 | PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK" 162 | ADDRESS="core-live-b.stellar.org:11625" 163 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}" 164 | HOME_DOMAIN="www.stellar.org" 165 | 166 | [[VALIDATORS]] 167 | NAME="SDF 1" 168 | PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH" 169 | ADDRESS="core-live-a.stellar.org:11625" 170 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}" 171 | HOME_DOMAIN="www.stellar.org" 172 | 173 | [[VALIDATORS]] 174 | NAME="SDF 3" 175 | PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ" 176 | ADDRESS="core-live-c.stellar.org:11625" 177 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}" 178 | HOME_DOMAIN="www.stellar.org" 179 | 180 | [[VALIDATORS]] 181 | NAME="Blockdaemon Validator 3" 182 | PUBLIC_KEY="GAYXZ4PZ7P6QOX7EBHPIZXNWY4KCOBYWJCA4WKWRKC7XIUS3UJPT6EZ4" 183 | ADDRESS="stellar-full-validator3.bdnodes.net:11625" 184 | HISTORY="curl -sf https://stellar-full-history3.bdnodes.net/{0} -o {1}" 185 | HOME_DOMAIN="stellar.blockdaemon.com" 186 | 187 | [[VALIDATORS]] 188 | NAME="Blockdaemon Validator 2" 189 | PUBLIC_KEY="GAVXB7SBJRYHSG6KSQHY74N7JAFRL4PFVZCNWW2ARI6ZEKNBJSMSKW7C" 190 | ADDRESS="stellar-full-validator2.bdnodes.net:11625" 191 | HISTORY="curl -sf https://stellar-full-history2.bdnodes.net/{0} -o {1}" 192 | HOME_DOMAIN="stellar.blockdaemon.com" 193 | 194 | [[VALIDATORS]] 195 | NAME="Blockdaemon Validator 1" 196 | PUBLIC_KEY="GAAV2GCVFLNN522ORUYFV33E76VPC22E72S75AQ6MBR5V45Z5DWVPWEU" 197 | ADDRESS="stellar-full-validator1.bdnodes.net:11625" 198 | HISTORY="curl -sf https://stellar-full-history1.bdnodes.net/{0} -o {1}" 199 | HOME_DOMAIN="stellar.blockdaemon.com" 200 | -------------------------------------------------------------------------------- /pubnet/horizon/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for futurenet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11726 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11725 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | 12 | [[HOME_DOMAINS]] 13 | HOME_DOMAIN="publicnode.org" 14 | QUALITY="HIGH" 15 | 16 | [[HOME_DOMAINS]] 17 | HOME_DOMAIN="lobstr.co" 18 | QUALITY="HIGH" 19 | 20 | [[HOME_DOMAINS]] 21 | HOME_DOMAIN="www.franklintempleton.com" 22 | QUALITY="HIGH" 23 | 24 | [[HOME_DOMAINS]] 25 | HOME_DOMAIN="satoshipay.io" 26 | QUALITY="HIGH" 27 | 28 | [[HOME_DOMAINS]] 29 | HOME_DOMAIN="whalestack.com" 30 | QUALITY="HIGH" 31 | 32 | [[HOME_DOMAINS]] 33 | HOME_DOMAIN="www.stellar.org" 34 | QUALITY="HIGH" 35 | 36 | [[HOME_DOMAINS]] 37 | HOME_DOMAIN="stellar.blockdaemon.com" 38 | QUALITY="HIGH" 39 | 40 | [[VALIDATORS]] 41 | NAME="Boötes" 42 | PUBLIC_KEY="GCVJ4Z6TI6Z2SOGENSPXDQ2U4RKH3CNQKYUHNSSPYFPNWTLGS6EBH7I2" 43 | ADDRESS="bootes.publicnode.org:11625" 44 | HISTORY="curl -sf https://bootes-history.publicnode.org/{0} -o {1}" 45 | HOME_DOMAIN="publicnode.org" 46 | 47 | [[VALIDATORS]] 48 | NAME="Lyra by BP Ventures" 49 | PUBLIC_KEY="GCIXVKNFPKWVMKJKVK2V4NK7D4TC6W3BUMXSIJ365QUAXWBRPPJXIR2Z" 50 | ADDRESS="lyra.publicnode.org:11625" 51 | HISTORY="curl -sf https://lyra-history.publicnode.org/{0} -o {1}" 52 | HOME_DOMAIN="publicnode.org" 53 | 54 | [[VALIDATORS]] 55 | NAME="Hercules by OG Technologies" 56 | PUBLIC_KEY="GBLJNN3AVZZPG2FYAYTYQKECNWTQYYUUY2KVFN2OUKZKBULXIXBZ4FCT" 57 | ADDRESS="hercules.publicnode.org:11625" 58 | HISTORY="curl -sf https://hercules-history.publicnode.org/{0} -o {1}" 59 | HOME_DOMAIN="publicnode.org" 60 | 61 | [[VALIDATORS]] 62 | NAME="LOBSTR 3 (North America)" 63 | PUBLIC_KEY="GD5QWEVV4GZZTQP46BRXV5CUMMMLP4JTGFD7FWYJJWRL54CELY6JGQ63" 64 | ADDRESS="v3.stellar.lobstr.co:11625" 65 | HISTORY="curl -sf https://archive.v3.stellar.lobstr.co/{0} -o {1}" 66 | HOME_DOMAIN="lobstr.co" 67 | 68 | [[VALIDATORS]] 69 | NAME="LOBSTR 1 (Europe)" 70 | PUBLIC_KEY="GCFONE23AB7Y6C5YZOMKUKGETPIAJA4QOYLS5VNS4JHBGKRZCPYHDLW7" 71 | ADDRESS="v1.stellar.lobstr.co:11625" 72 | HISTORY="curl -sf https://archive.v1.stellar.lobstr.co/{0} -o {1}" 73 | HOME_DOMAIN="lobstr.co" 74 | 75 | [[VALIDATORS]] 76 | NAME="LOBSTR 2 (Europe)" 77 | PUBLIC_KEY="GCB2VSADESRV2DDTIVTFLBDI562K6KE3KMKILBHUHUWFXCUBHGQDI7VL" 78 | ADDRESS="v2.stellar.lobstr.co:11625" 79 | HISTORY="curl -sf https://archive.v2.stellar.lobstr.co/{0} -o {1}" 80 | HOME_DOMAIN="lobstr.co" 81 | 82 | [[VALIDATORS]] 83 | NAME="LOBSTR 4 (Asia)" 84 | PUBLIC_KEY="GA7TEPCBDQKI7JQLQ34ZURRMK44DVYCIGVXQQWNSWAEQR6KB4FMCBT7J" 85 | ADDRESS="v4.stellar.lobstr.co:11625" 86 | HISTORY="curl -sf https://archive.v4.stellar.lobstr.co/{0} -o {1}" 87 | HOME_DOMAIN="lobstr.co" 88 | 89 | [[VALIDATORS]] 90 | NAME="LOBSTR 5 (India)" 91 | PUBLIC_KEY="GA5STBMV6QDXFDGD62MEHLLHZTPDI77U3PFOD2SELU5RJDHQWBR5NNK7" 92 | ADDRESS="v5.stellar.lobstr.co:11625" 93 | HISTORY="curl -sf https://archive.v5.stellar.lobstr.co/{0} -o {1}" 94 | HOME_DOMAIN="lobstr.co" 95 | 96 | [[VALIDATORS]] 97 | NAME="FT SCV 2" 98 | PUBLIC_KEY="GCMSM2VFZGRPTZKPH5OABHGH4F3AVS6XTNJXDGCZ3MKCOSUBH3FL6DOB" 99 | ADDRESS="stellar2.franklintempleton.com:11625" 100 | HISTORY="curl -sf https://stellar-history-usc.franklintempleton.com/azuscshf401/{0} -o {1}" 101 | HOME_DOMAIN="www.franklintempleton.com" 102 | 103 | [[VALIDATORS]] 104 | NAME="FT SCV 3" 105 | PUBLIC_KEY="GA7DV63PBUUWNUFAF4GAZVXU2OZMYRATDLKTC7VTCG7AU4XUPN5VRX4A" 106 | ADDRESS="stellar3.franklintempleton.com:11625" 107 | HISTORY="curl -sf https://stellar-history-ins.franklintempleton.com/azinsshf401/{0} -o {1}" 108 | HOME_DOMAIN="www.franklintempleton.com" 109 | 110 | [[VALIDATORS]] 111 | NAME="FT SCV 1" 112 | PUBLIC_KEY="GARYGQ5F2IJEBCZJCBNPWNWVDOFK7IBOHLJKKSG2TMHDQKEEC6P4PE4V" 113 | ADDRESS="stellar1.franklintempleton.com:11625" 114 | HISTORY="curl -sf https://stellar-history-usw.franklintempleton.com/azuswshf401/{0} -o {1}" 115 | HOME_DOMAIN="www.franklintempleton.com" 116 | 117 | [[VALIDATORS]] 118 | NAME="SatoshiPay Frankfurt" 119 | PUBLIC_KEY="GC5SXLNAM3C4NMGK2PXK4R34B5GNZ47FYQ24ZIBFDFOCU6D4KBN4POAE" 120 | ADDRESS="stellar-de-fra.satoshipay.io:11625" 121 | HISTORY="curl -sf https://stellar-history-de-fra.satoshipay.io/{0} -o {1}" 122 | HOME_DOMAIN="satoshipay.io" 123 | 124 | [[VALIDATORS]] 125 | NAME="SatoshiPay Singapore" 126 | PUBLIC_KEY="GBJQUIXUO4XSNPAUT6ODLZUJRV2NPXYASKUBY4G5MYP3M47PCVI55MNT" 127 | ADDRESS="stellar-sg-sin.satoshipay.io:11625" 128 | HISTORY="curl -sf https://stellar-history-sg-sin.satoshipay.io/{0} -o {1}" 129 | HOME_DOMAIN="satoshipay.io" 130 | 131 | [[VALIDATORS]] 132 | NAME="SatoshiPay Iowa" 133 | PUBLIC_KEY="GAK6Z5UVGUVSEK6PEOCAYJISTT5EJBB34PN3NOLEQG2SUKXRVV2F6HZY" 134 | ADDRESS="stellar-us-iowa.satoshipay.io:11625" 135 | HISTORY="curl -sf https://stellar-history-us-iowa.satoshipay.io/{0} -o {1}" 136 | HOME_DOMAIN="satoshipay.io" 137 | 138 | [[VALIDATORS]] 139 | NAME="Whalestack (Germany)" 140 | PUBLIC_KEY="GD6SZQV3WEJUH352NTVLKEV2JM2RH266VPEM7EH5QLLI7ZZAALMLNUVN" 141 | ADDRESS="germany.stellar.whalestack.com:11625" 142 | HISTORY="curl -sf https://germany.stellar.whalestack.com/history/{0} -o {1}" 143 | HOME_DOMAIN="whalestack.com" 144 | 145 | [[VALIDATORS]] 146 | NAME="Whalestack (Hong Kong)" 147 | PUBLIC_KEY="GAZ437J46SCFPZEDLVGDMKZPLFO77XJ4QVAURSJVRZK2T5S7XUFHXI2Z" 148 | ADDRESS="hongkong.stellar.whalestack.com:11625" 149 | HISTORY="curl -sf https://hongkong.stellar.whalestack.com/history/{0} -o {1}" 150 | HOME_DOMAIN="whalestack.com" 151 | 152 | [[VALIDATORS]] 153 | NAME="Whalestack (Finland)" 154 | PUBLIC_KEY="GADLA6BJK6VK33EM2IDQM37L5KGVCY5MSHSHVJA4SCNGNUIEOTCR6J5T" 155 | ADDRESS="finland.stellar.whalestack.com:11625" 156 | HISTORY="curl -sf https://finland.stellar.whalestack.com/history/{0} -o {1}" 157 | HOME_DOMAIN="whalestack.com" 158 | 159 | [[VALIDATORS]] 160 | NAME="SDF 2" 161 | PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK" 162 | ADDRESS="core-live-b.stellar.org:11625" 163 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}" 164 | HOME_DOMAIN="www.stellar.org" 165 | 166 | [[VALIDATORS]] 167 | NAME="SDF 1" 168 | PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH" 169 | ADDRESS="core-live-a.stellar.org:11625" 170 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}" 171 | HOME_DOMAIN="www.stellar.org" 172 | 173 | [[VALIDATORS]] 174 | NAME="SDF 3" 175 | PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ" 176 | ADDRESS="core-live-c.stellar.org:11625" 177 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}" 178 | HOME_DOMAIN="www.stellar.org" 179 | 180 | [[VALIDATORS]] 181 | NAME="Blockdaemon Validator 3" 182 | PUBLIC_KEY="GAYXZ4PZ7P6QOX7EBHPIZXNWY4KCOBYWJCA4WKWRKC7XIUS3UJPT6EZ4" 183 | ADDRESS="stellar-full-validator3.bdnodes.net:11625" 184 | HISTORY="curl -sf https://stellar-full-history3.bdnodes.net/{0} -o {1}" 185 | HOME_DOMAIN="stellar.blockdaemon.com" 186 | 187 | [[VALIDATORS]] 188 | NAME="Blockdaemon Validator 2" 189 | PUBLIC_KEY="GAVXB7SBJRYHSG6KSQHY74N7JAFRL4PFVZCNWW2ARI6ZEKNBJSMSKW7C" 190 | ADDRESS="stellar-full-validator2.bdnodes.net:11625" 191 | HISTORY="curl -sf https://stellar-full-history2.bdnodes.net/{0} -o {1}" 192 | HOME_DOMAIN="stellar.blockdaemon.com" 193 | 194 | [[VALIDATORS]] 195 | NAME="Blockdaemon Validator 1" 196 | PUBLIC_KEY="GAAV2GCVFLNN522ORUYFV33E76VPC22E72S75AQ6MBR5V45Z5DWVPWEU" 197 | ADDRESS="stellar-full-validator1.bdnodes.net:11625" 198 | HISTORY="curl -sf https://stellar-full-history1.bdnodes.net/{0} -o {1}" 199 | HOME_DOMAIN="stellar.blockdaemon.com" 200 | -------------------------------------------------------------------------------- /pubnet/stellar-rpc/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for testnet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11826 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11825 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 12 | 13 | # TODO: Connect only to the local node after 14 | # https://github.com/stellar/go/pull/5053 is available. 15 | # PREFERRED_PEERS=["127.0.0.1:11625"] 16 | # PREFERRED_PEER_KEYS=["GCTI6HMWRH2QGMFKWVU5M5ZSOTKL7P7JAHZDMJJBKDHGWTEC4CJ7O3DU"] 17 | # PREFERRED_PEERS_ONLY=true 18 | 19 | [[HOME_DOMAINS]] 20 | HOME_DOMAIN="publicnode.org" 21 | QUALITY="HIGH" 22 | 23 | [[HOME_DOMAINS]] 24 | HOME_DOMAIN="lobstr.co" 25 | QUALITY="HIGH" 26 | 27 | [[HOME_DOMAINS]] 28 | HOME_DOMAIN="www.franklintempleton.com" 29 | QUALITY="HIGH" 30 | 31 | [[HOME_DOMAINS]] 32 | HOME_DOMAIN="satoshipay.io" 33 | QUALITY="HIGH" 34 | 35 | [[HOME_DOMAINS]] 36 | HOME_DOMAIN="whalestack.com" 37 | QUALITY="HIGH" 38 | 39 | [[HOME_DOMAINS]] 40 | HOME_DOMAIN="www.stellar.org" 41 | QUALITY="HIGH" 42 | 43 | [[HOME_DOMAINS]] 44 | HOME_DOMAIN="stellar.blockdaemon.com" 45 | QUALITY="HIGH" 46 | 47 | [[VALIDATORS]] 48 | NAME="Boötes" 49 | PUBLIC_KEY="GCVJ4Z6TI6Z2SOGENSPXDQ2U4RKH3CNQKYUHNSSPYFPNWTLGS6EBH7I2" 50 | ADDRESS="bootes.publicnode.org:11625" 51 | HISTORY="curl -sf https://bootes-history.publicnode.org/{0} -o {1}" 52 | HOME_DOMAIN="publicnode.org" 53 | 54 | [[VALIDATORS]] 55 | NAME="Lyra by BP Ventures" 56 | PUBLIC_KEY="GCIXVKNFPKWVMKJKVK2V4NK7D4TC6W3BUMXSIJ365QUAXWBRPPJXIR2Z" 57 | ADDRESS="lyra.publicnode.org:11625" 58 | HISTORY="curl -sf https://lyra-history.publicnode.org/{0} -o {1}" 59 | HOME_DOMAIN="publicnode.org" 60 | 61 | [[VALIDATORS]] 62 | NAME="Hercules by OG Technologies" 63 | PUBLIC_KEY="GBLJNN3AVZZPG2FYAYTYQKECNWTQYYUUY2KVFN2OUKZKBULXIXBZ4FCT" 64 | ADDRESS="hercules.publicnode.org:11625" 65 | HISTORY="curl -sf https://hercules-history.publicnode.org/{0} -o {1}" 66 | HOME_DOMAIN="publicnode.org" 67 | 68 | [[VALIDATORS]] 69 | NAME="LOBSTR 3 (North America)" 70 | PUBLIC_KEY="GD5QWEVV4GZZTQP46BRXV5CUMMMLP4JTGFD7FWYJJWRL54CELY6JGQ63" 71 | ADDRESS="v3.stellar.lobstr.co:11625" 72 | HISTORY="curl -sf https://archive.v3.stellar.lobstr.co/{0} -o {1}" 73 | HOME_DOMAIN="lobstr.co" 74 | 75 | [[VALIDATORS]] 76 | NAME="LOBSTR 1 (Europe)" 77 | PUBLIC_KEY="GCFONE23AB7Y6C5YZOMKUKGETPIAJA4QOYLS5VNS4JHBGKRZCPYHDLW7" 78 | ADDRESS="v1.stellar.lobstr.co:11625" 79 | HISTORY="curl -sf https://archive.v1.stellar.lobstr.co/{0} -o {1}" 80 | HOME_DOMAIN="lobstr.co" 81 | 82 | [[VALIDATORS]] 83 | NAME="LOBSTR 2 (Europe)" 84 | PUBLIC_KEY="GCB2VSADESRV2DDTIVTFLBDI562K6KE3KMKILBHUHUWFXCUBHGQDI7VL" 85 | ADDRESS="v2.stellar.lobstr.co:11625" 86 | HISTORY="curl -sf https://archive.v2.stellar.lobstr.co/{0} -o {1}" 87 | HOME_DOMAIN="lobstr.co" 88 | 89 | [[VALIDATORS]] 90 | NAME="LOBSTR 4 (Asia)" 91 | PUBLIC_KEY="GA7TEPCBDQKI7JQLQ34ZURRMK44DVYCIGVXQQWNSWAEQR6KB4FMCBT7J" 92 | ADDRESS="v4.stellar.lobstr.co:11625" 93 | HISTORY="curl -sf https://archive.v4.stellar.lobstr.co/{0} -o {1}" 94 | HOME_DOMAIN="lobstr.co" 95 | 96 | [[VALIDATORS]] 97 | NAME="LOBSTR 5 (India)" 98 | PUBLIC_KEY="GA5STBMV6QDXFDGD62MEHLLHZTPDI77U3PFOD2SELU5RJDHQWBR5NNK7" 99 | ADDRESS="v5.stellar.lobstr.co:11625" 100 | HISTORY="curl -sf https://archive.v5.stellar.lobstr.co/{0} -o {1}" 101 | HOME_DOMAIN="lobstr.co" 102 | 103 | [[VALIDATORS]] 104 | NAME="FT SCV 2" 105 | PUBLIC_KEY="GCMSM2VFZGRPTZKPH5OABHGH4F3AVS6XTNJXDGCZ3MKCOSUBH3FL6DOB" 106 | ADDRESS="stellar2.franklintempleton.com:11625" 107 | HISTORY="curl -sf https://stellar-history-usc.franklintempleton.com/azuscshf401/{0} -o {1}" 108 | HOME_DOMAIN="www.franklintempleton.com" 109 | 110 | [[VALIDATORS]] 111 | NAME="FT SCV 3" 112 | PUBLIC_KEY="GA7DV63PBUUWNUFAF4GAZVXU2OZMYRATDLKTC7VTCG7AU4XUPN5VRX4A" 113 | ADDRESS="stellar3.franklintempleton.com:11625" 114 | HISTORY="curl -sf https://stellar-history-ins.franklintempleton.com/azinsshf401/{0} -o {1}" 115 | HOME_DOMAIN="www.franklintempleton.com" 116 | 117 | [[VALIDATORS]] 118 | NAME="FT SCV 1" 119 | PUBLIC_KEY="GARYGQ5F2IJEBCZJCBNPWNWVDOFK7IBOHLJKKSG2TMHDQKEEC6P4PE4V" 120 | ADDRESS="stellar1.franklintempleton.com:11625" 121 | HISTORY="curl -sf https://stellar-history-usw.franklintempleton.com/azuswshf401/{0} -o {1}" 122 | HOME_DOMAIN="www.franklintempleton.com" 123 | 124 | [[VALIDATORS]] 125 | NAME="SatoshiPay Frankfurt" 126 | PUBLIC_KEY="GC5SXLNAM3C4NMGK2PXK4R34B5GNZ47FYQ24ZIBFDFOCU6D4KBN4POAE" 127 | ADDRESS="stellar-de-fra.satoshipay.io:11625" 128 | HISTORY="curl -sf https://stellar-history-de-fra.satoshipay.io/{0} -o {1}" 129 | HOME_DOMAIN="satoshipay.io" 130 | 131 | [[VALIDATORS]] 132 | NAME="SatoshiPay Singapore" 133 | PUBLIC_KEY="GBJQUIXUO4XSNPAUT6ODLZUJRV2NPXYASKUBY4G5MYP3M47PCVI55MNT" 134 | ADDRESS="stellar-sg-sin.satoshipay.io:11625" 135 | HISTORY="curl -sf https://stellar-history-sg-sin.satoshipay.io/{0} -o {1}" 136 | HOME_DOMAIN="satoshipay.io" 137 | 138 | [[VALIDATORS]] 139 | NAME="SatoshiPay Iowa" 140 | PUBLIC_KEY="GAK6Z5UVGUVSEK6PEOCAYJISTT5EJBB34PN3NOLEQG2SUKXRVV2F6HZY" 141 | ADDRESS="stellar-us-iowa.satoshipay.io:11625" 142 | HISTORY="curl -sf https://stellar-history-us-iowa.satoshipay.io/{0} -o {1}" 143 | HOME_DOMAIN="satoshipay.io" 144 | 145 | [[VALIDATORS]] 146 | NAME="Whalestack (Germany)" 147 | PUBLIC_KEY="GD6SZQV3WEJUH352NTVLKEV2JM2RH266VPEM7EH5QLLI7ZZAALMLNUVN" 148 | ADDRESS="germany.stellar.whalestack.com:11625" 149 | HISTORY="curl -sf https://germany.stellar.whalestack.com/history/{0} -o {1}" 150 | HOME_DOMAIN="whalestack.com" 151 | 152 | [[VALIDATORS]] 153 | NAME="Whalestack (Hong Kong)" 154 | PUBLIC_KEY="GAZ437J46SCFPZEDLVGDMKZPLFO77XJ4QVAURSJVRZK2T5S7XUFHXI2Z" 155 | ADDRESS="hongkong.stellar.whalestack.com:11625" 156 | HISTORY="curl -sf https://hongkong.stellar.whalestack.com/history/{0} -o {1}" 157 | HOME_DOMAIN="whalestack.com" 158 | 159 | [[VALIDATORS]] 160 | NAME="Whalestack (Finland)" 161 | PUBLIC_KEY="GADLA6BJK6VK33EM2IDQM37L5KGVCY5MSHSHVJA4SCNGNUIEOTCR6J5T" 162 | ADDRESS="finland.stellar.whalestack.com:11625" 163 | HISTORY="curl -sf https://finland.stellar.whalestack.com/history/{0} -o {1}" 164 | HOME_DOMAIN="whalestack.com" 165 | 166 | [[VALIDATORS]] 167 | NAME="SDF 2" 168 | PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK" 169 | ADDRESS="core-live-b.stellar.org:11625" 170 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}" 171 | HOME_DOMAIN="www.stellar.org" 172 | 173 | [[VALIDATORS]] 174 | NAME="SDF 1" 175 | PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH" 176 | ADDRESS="core-live-a.stellar.org:11625" 177 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}" 178 | HOME_DOMAIN="www.stellar.org" 179 | 180 | [[VALIDATORS]] 181 | NAME="SDF 3" 182 | PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ" 183 | ADDRESS="core-live-c.stellar.org:11625" 184 | HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}" 185 | HOME_DOMAIN="www.stellar.org" 186 | 187 | [[VALIDATORS]] 188 | NAME="Blockdaemon Validator 3" 189 | PUBLIC_KEY="GAYXZ4PZ7P6QOX7EBHPIZXNWY4KCOBYWJCA4WKWRKC7XIUS3UJPT6EZ4" 190 | ADDRESS="stellar-full-validator3.bdnodes.net:11625" 191 | HISTORY="curl -sf https://stellar-full-history3.bdnodes.net/{0} -o {1}" 192 | HOME_DOMAIN="stellar.blockdaemon.com" 193 | 194 | [[VALIDATORS]] 195 | NAME="Blockdaemon Validator 2" 196 | PUBLIC_KEY="GAVXB7SBJRYHSG6KSQHY74N7JAFRL4PFVZCNWW2ARI6ZEKNBJSMSKW7C" 197 | ADDRESS="stellar-full-validator2.bdnodes.net:11625" 198 | HISTORY="curl -sf https://stellar-full-history2.bdnodes.net/{0} -o {1}" 199 | HOME_DOMAIN="stellar.blockdaemon.com" 200 | 201 | [[VALIDATORS]] 202 | NAME="Blockdaemon Validator 1" 203 | PUBLIC_KEY="GAAV2GCVFLNN522ORUYFV33E76VPC22E72S75AQ6MBR5V45Z5DWVPWEU" 204 | ADDRESS="stellar-full-validator1.bdnodes.net:11625" 205 | HISTORY="curl -sf https://stellar-full-history1.bdnodes.net/{0} -o {1}" 206 | HOME_DOMAIN="stellar.blockdaemon.com" 207 | -------------------------------------------------------------------------------- /pubnet/stellar-rpc/etc/stellar-rpc.cfg: -------------------------------------------------------------------------------- 1 | ENDPOINT="localhost:8003" 2 | ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" 3 | NETWORK_PASSPHRASE="__NETWORK__" 4 | STELLAR_CORE_URL="http://localhost:11826" 5 | CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" 6 | CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" 7 | CAPTIVE_CORE_USE_DB=true 8 | STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" 9 | HISTORY_ARCHIVE_URLS="__ARCHIVE__" 10 | DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" 11 | STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 12 | CHECKPOINT_FREQUENCY=64 13 | -------------------------------------------------------------------------------- /testnet/core/etc/stellar-core.cfg: -------------------------------------------------------------------------------- 1 | HTTP_PORT=11626 2 | PUBLIC_HTTP_PORT=true 3 | LOG_FILE_PATH="" 4 | MANUAL_CLOSE=__MANUAL_CLOSE__ 5 | 6 | NETWORK_PASSPHRASE="__NETWORK__" 7 | DATABASE="postgresql://dbname=core host=localhost user=stellar password=__PGPASS__" 8 | CATCHUP_RECENT=100 9 | 10 | UNSAFE_QUORUM=true 11 | FAILURE_SAFETY=1 12 | 13 | EXPERIMENTAL_BUCKETLIST_DB=true 14 | 15 | [[HOME_DOMAINS]] 16 | HOME_DOMAIN="testnet.stellar.org" 17 | QUALITY="HIGH" 18 | 19 | [[VALIDATORS]] 20 | NAME="sdf_testnet_1" 21 | HOME_DOMAIN="testnet.stellar.org" 22 | PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y" 23 | ADDRESS="core-testnet1.stellar.org" 24 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}" 25 | 26 | [[VALIDATORS]] 27 | NAME="sdf_testnet_2" 28 | HOME_DOMAIN="testnet.stellar.org" 29 | PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP" 30 | ADDRESS="core-testnet2.stellar.org" 31 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}" 32 | 33 | [[VALIDATORS]] 34 | NAME="sdf_testnet_3" 35 | HOME_DOMAIN="testnet.stellar.org" 36 | PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z" 37 | ADDRESS="core-testnet3.stellar.org" 38 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}" 39 | -------------------------------------------------------------------------------- /testnet/horizon/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for futurenet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11726 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11725 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | 12 | UNSAFE_QUORUM=true 13 | FAILURE_SAFETY=1 14 | 15 | [[HOME_DOMAINS]] 16 | HOME_DOMAIN="testnet.stellar.org" 17 | QUALITY="HIGH" 18 | 19 | [[VALIDATORS]] 20 | NAME="sdf_testnet_1" 21 | HOME_DOMAIN="testnet.stellar.org" 22 | PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y" 23 | ADDRESS="core-testnet1.stellar.org" 24 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}" 25 | 26 | [[VALIDATORS]] 27 | NAME="sdf_testnet_2" 28 | HOME_DOMAIN="testnet.stellar.org" 29 | PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP" 30 | ADDRESS="core-testnet2.stellar.org" 31 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}" 32 | 33 | [[VALIDATORS]] 34 | NAME="sdf_testnet_3" 35 | HOME_DOMAIN="testnet.stellar.org" 36 | PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z" 37 | ADDRESS="core-testnet3.stellar.org" 38 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}" 39 | -------------------------------------------------------------------------------- /testnet/nginx/etc/conf.d/friendbot.conf: -------------------------------------------------------------------------------- 1 | location /friendbot { 2 | rewrite /friendbot / break; 3 | proxy_pass https://friendbot.stellar.org; 4 | proxy_ssl_server_name on; 5 | proxy_ssl_name friendbot.stellar.org; 6 | proxy_set_header Host friendbot.stellar.org; 7 | proxy_redirect off; 8 | } 9 | -------------------------------------------------------------------------------- /testnet/stellar-rpc/etc/stellar-captive-core.cfg: -------------------------------------------------------------------------------- 1 | # captive core config for testnet 2 | NETWORK_PASSPHRASE="__NETWORK__" 3 | # disable the web service port, not used 4 | HTTP_PORT=11826 5 | PUBLIC_HTTP_PORT=false 6 | # To avoid conflicts with the core instance 7 | PEER_PORT=11825 8 | DATABASE="__DATABASE__" 9 | 10 | ENABLE_SOROBAN_DIAGNOSTIC_EVENTS=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 11 | ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION=__ENABLE_SOROBAN_DIAGNOSTIC_EVENTS__ 12 | 13 | # TODO: Connect only to the local node after 14 | # https://github.com/stellar/go/pull/5053 is available. 15 | # PREFERRED_PEERS=["127.0.0.1:11625"] 16 | # PREFERRED_PEER_KEYS=["GCTI6HMWRH2QGMFKWVU5M5ZSOTKL7P7JAHZDMJJBKDHGWTEC4CJ7O3DU"] 17 | # PREFERRED_PEERS_ONLY=true 18 | 19 | UNSAFE_QUORUM=true 20 | FAILURE_SAFETY=1 21 | 22 | [[HOME_DOMAINS]] 23 | HOME_DOMAIN="testnet.stellar.org" 24 | QUALITY="HIGH" 25 | 26 | [[VALIDATORS]] 27 | NAME="sdf_testnet_1" 28 | HOME_DOMAIN="testnet.stellar.org" 29 | PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y" 30 | ADDRESS="core-testnet1.stellar.org" 31 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}" 32 | 33 | [[VALIDATORS]] 34 | NAME="sdf_testnet_2" 35 | HOME_DOMAIN="testnet.stellar.org" 36 | PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP" 37 | ADDRESS="core-testnet2.stellar.org" 38 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}" 39 | 40 | [[VALIDATORS]] 41 | NAME="sdf_testnet_3" 42 | HOME_DOMAIN="testnet.stellar.org" 43 | PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z" 44 | ADDRESS="core-testnet3.stellar.org" 45 | HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}" 46 | -------------------------------------------------------------------------------- /testnet/stellar-rpc/etc/stellar-rpc.cfg: -------------------------------------------------------------------------------- 1 | ENDPOINT="localhost:8003" 2 | ADMIN_ENDPOINT="__STELLAR_RPC_ADMIN_ENDPOINT__" 3 | FRIENDBOT_URL="https://friendbot.stellar.org/" 4 | NETWORK_PASSPHRASE="__NETWORK__" 5 | STELLAR_CORE_URL="http://localhost:11826" 6 | CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" 7 | CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" 8 | CAPTIVE_CORE_USE_DB=true 9 | STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" 10 | HISTORY_ARCHIVE_URLS="__ARCHIVE__" 11 | DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" 12 | STELLAR_CAPTIVE_CORE_HTTP_PORT=11826 13 | CHECKPOINT_FREQUENCY=64 14 | -------------------------------------------------------------------------------- /tests/test_core.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "net/http" 7 | "os" 8 | "time" 9 | ) 10 | 11 | const timeout = 3 * time.Minute 12 | 13 | type Info struct { 14 | Info struct { 15 | State string `json:"state"` 16 | } `json:"info"` 17 | } 18 | 19 | func main() { 20 | startTime := time.Now() 21 | 22 | for { 23 | time.Sleep(5 * time.Second) 24 | logLine("Waiting for stellar-core to start catching up and sync") 25 | 26 | if time.Since(startTime) > timeout { 27 | logLine("Timeout") 28 | os.Exit(-1) 29 | } 30 | 31 | resp, err := http.Get("http://localhost:11626/info") 32 | if err != nil { 33 | logLine(err) 34 | continue 35 | } 36 | 37 | var info Info 38 | decoder := json.NewDecoder(resp.Body) 39 | err = decoder.Decode(&info) 40 | if err != nil { 41 | logLine(err) 42 | continue 43 | } 44 | 45 | logLine("Stellar-core is " + info.Info.State) 46 | if info.Info.State == "Catching up" || info.Info.State == "Synced!" { 47 | os.Exit(0) 48 | } 49 | } 50 | } 51 | 52 | func logLine(text interface{}) { 53 | log.Println("\033[32;1m[test]\033[0m", text) 54 | } 55 | -------------------------------------------------------------------------------- /tests/test_friendbot.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "net/url" 7 | "os" 8 | "time" 9 | ) 10 | 11 | const timeout = 10 * time.Minute 12 | 13 | func main() { 14 | startTime := time.Now() 15 | 16 | for { 17 | time.Sleep(10 * time.Second) 18 | logLine("Waiting for Friendbot to be available") 19 | 20 | if time.Since(startTime) > timeout { 21 | logLine("Timeout") 22 | os.Exit(-1) 23 | } 24 | 25 | params := url.Values{} 26 | params.Set("addr", "GDDVAW5VBBMSKIGNHCZIRZ3BCDQXKO7TCPGEPJR4KL72RHAL2R2ETEST") 27 | resp, err := http.Get("http://localhost:8000/friendbot?" + params.Encode()) 28 | if err != nil { 29 | logLine(err) 30 | continue 31 | } 32 | 33 | if resp.StatusCode == 200 { 34 | logLine("Friendbot is available!") 35 | os.Exit(0) 36 | } 37 | } 38 | } 39 | 40 | func logLine(text interface{}) { 41 | log.Println("\033[32;1m[test_friendbot]\033[0m", text) 42 | } 43 | -------------------------------------------------------------------------------- /tests/test_horizon_core_up.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "net/http" 7 | "os" 8 | "time" 9 | ) 10 | 11 | const timeout = 10 * time.Minute 12 | 13 | type Root struct { 14 | CoreSupportedProtocolVersion int32 `json:"core_supported_protocol_version"` 15 | } 16 | 17 | func main() { 18 | startTime := time.Now() 19 | 20 | for { 21 | time.Sleep(5 * time.Second) 22 | logLine("Waiting for Horizon's stellar-core to start reporting") 23 | 24 | if time.Since(startTime) > timeout { 25 | logLine("Timeout") 26 | os.Exit(-1) 27 | } 28 | 29 | resp, err := http.Get("http://localhost:8000") 30 | if err != nil { 31 | logLine(err) 32 | continue 33 | } 34 | 35 | var root Root 36 | decoder := json.NewDecoder(resp.Body) 37 | err = decoder.Decode(&root) 38 | if err != nil { 39 | logLine(err) 40 | continue 41 | } 42 | 43 | if root.CoreSupportedProtocolVersion > 0 { 44 | logLine("Horizon is communicating with stellar-core!") 45 | os.Exit(0) 46 | } 47 | } 48 | } 49 | 50 | func logLine(text interface{}) { 51 | log.Println("\033[32;1m[test]\033[0m", text) 52 | } 53 | -------------------------------------------------------------------------------- /tests/test_horizon_ingesting.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "net/http" 7 | "os" 8 | "time" 9 | ) 10 | 11 | const timeout = 2 * time.Hour 12 | 13 | type Root struct { 14 | HorizonSequence int32 `json:"history_latest_ledger"` 15 | CoreSequence int32 `json:"core_latest_ledger"` 16 | } 17 | 18 | func main() { 19 | startTime := time.Now() 20 | 21 | for { 22 | time.Sleep(10 * time.Second) 23 | logLine("Waiting for Horizon to start ingesting") 24 | 25 | if time.Since(startTime) > timeout { 26 | logLine("Timeout") 27 | os.Exit(-1) 28 | } 29 | 30 | resp, err := http.Get("http://localhost:8000") 31 | if err != nil { 32 | logLine(err) 33 | continue 34 | } 35 | 36 | var root Root 37 | decoder := json.NewDecoder(resp.Body) 38 | err = decoder.Decode(&root) 39 | if err != nil { 40 | logLine(err) 41 | continue 42 | } 43 | 44 | if root.HorizonSequence > 0 { 45 | logLine("Horizon started ingesting!") 46 | os.Exit(0) 47 | } 48 | } 49 | } 50 | 51 | func logLine(text interface{}) { 52 | log.Println("\033[32;1m[test]\033[0m", text) 53 | } 54 | -------------------------------------------------------------------------------- /tests/test_horizon_up.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | "net/http" 7 | "os" 8 | "time" 9 | ) 10 | 11 | const timeout = 3 * time.Minute 12 | 13 | type Root struct { 14 | SupportedProtocolVersion int32 `json:"supported_protocol_version"` 15 | } 16 | 17 | func main() { 18 | startTime := time.Now() 19 | 20 | for { 21 | time.Sleep(5 * time.Second) 22 | logLine("Waiting for Horizon to start") 23 | 24 | if time.Since(startTime) > timeout { 25 | logLine("Timeout") 26 | os.Exit(-1) 27 | } 28 | 29 | resp, err := http.Get("http://localhost:8000") 30 | if err != nil { 31 | logLine(err) 32 | continue 33 | } 34 | 35 | var root Root 36 | decoder := json.NewDecoder(resp.Body) 37 | err = decoder.Decode(&root) 38 | if err != nil { 39 | logLine(err) 40 | continue 41 | } 42 | 43 | if root.SupportedProtocolVersion > 0 { 44 | logLine("Horizon has started!") 45 | os.Exit(0) 46 | } 47 | } 48 | } 49 | 50 | func logLine(text interface{}) { 51 | log.Println("\033[32;1m[test]\033[0m", text) 52 | } 53 | -------------------------------------------------------------------------------- /tests/test_stellar_rpc_healthy.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | "net/http" 9 | "os" 10 | "time" 11 | ) 12 | 13 | const timeout = 6 * time.Minute 14 | 15 | type RPCResponse struct { 16 | Result struct { 17 | Status string `json:"status"` 18 | } `json:"result"` 19 | Error struct { 20 | Message string `json:"message"` 21 | } `json:"error"` 22 | } 23 | 24 | func main() { 25 | startTime := time.Now() 26 | 27 | getHealthRPCRequest := []byte(`{ 28 | "jsonrpc": "2.0", 29 | "id": 10235, 30 | "method": "getHealth" 31 | }`) 32 | 33 | for { 34 | time.Sleep(5 * time.Second) 35 | logLine("Waiting for Stellar RPC to start") 36 | 37 | if time.Since(startTime) > timeout { 38 | logLine("Timeout") 39 | os.Exit(-1) 40 | } 41 | 42 | resp, err := http.Post("http://localhost:8000/rpc", "application/json", bytes.NewBuffer(getHealthRPCRequest)) 43 | if err != nil { 44 | logLine(err) 45 | continue 46 | } 47 | 48 | var rpcResponse RPCResponse 49 | decoder := json.NewDecoder(resp.Body) 50 | err = decoder.Decode(&rpcResponse) 51 | if err != nil { 52 | logLine(err) 53 | continue 54 | } 55 | 56 | logLine(fmt.Sprintf("Stellar RPC health reponse %#v", rpcResponse)) 57 | 58 | if rpcResponse.Result.Status == "healthy" { 59 | logLine("Stellar RPC is healthy!") 60 | os.Exit(0) 61 | } 62 | } 63 | } 64 | 65 | func logLine(text interface{}) { 66 | log.Println("\033[32;1m[test]\033[0m", text) 67 | } 68 | -------------------------------------------------------------------------------- /tests/test_stellar_rpc_up.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "fmt" 7 | "log" 8 | "net/http" 9 | "os" 10 | "time" 11 | ) 12 | 13 | const timeout = 6 * time.Minute 14 | 15 | type RPCResponse struct { 16 | Result struct { 17 | Status string `json:"status"` 18 | } `json:"result"` 19 | Error struct { 20 | Message string `json:"message"` 21 | } `json:"error"` 22 | } 23 | 24 | func main() { 25 | startTime := time.Now() 26 | 27 | getHealthRPCRequest := []byte(`{ 28 | "jsonrpc": "2.0", 29 | "id": 10235, 30 | "method": "getHealth" 31 | }`) 32 | 33 | for { 34 | time.Sleep(5 * time.Second) 35 | logLine("Waiting for Stellar RPC to start") 36 | 37 | if time.Since(startTime) > timeout { 38 | logLine("Timeout") 39 | os.Exit(-1) 40 | } 41 | 42 | resp, err := http.Post("http://localhost:8000/rpc", "application/json", bytes.NewBuffer(getHealthRPCRequest)) 43 | if err != nil { 44 | logLine(err) 45 | continue 46 | } 47 | 48 | var rpcResponse RPCResponse 49 | decoder := json.NewDecoder(resp.Body) 50 | err = decoder.Decode(&rpcResponse) 51 | if err != nil { 52 | logLine(err) 53 | continue 54 | } 55 | 56 | logLine(fmt.Sprintf("Stellar RPC health reponse %#v", rpcResponse)) 57 | 58 | if rpcResponse.Result.Status != "" || rpcResponse.Error.Message != "" { 59 | logLine("Stellar RPC has started!") 60 | os.Exit(0) 61 | } 62 | } 63 | } 64 | 65 | func logLine(text interface{}) { 66 | log.Println("\033[32;1m[test]\033[0m", text) 67 | } 68 | --------------------------------------------------------------------------------