Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ jobs:
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Checkout Quickstart for Core patches
uses: actions/checkout@v3
with:
ref: ${{ inputs.sha }}
- id: cache
uses: actions/cache@v3
with:
path: /tmp/image
key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }}
key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }}-${{ hashFiles('patches/stellar-core/*.patch') }}
- name: Upload Stellar-Core Image
if: steps.cache.outputs.cache-hit == 'true'
uses: actions/upload-artifact@v4
Expand All @@ -97,11 +101,15 @@ jobs:
if: ${{ needs.load-stellar-core-from-cache.outputs.cache-hit != 'true' }}
runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }}
steps:
- name: Checkout Quickstart for Core docker file and patches
uses: actions/checkout@v3
with:
ref: ${{ inputs.sha }}
- id: cache
uses: actions/cache@v3
with:
path: /tmp/image
key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }}
key: image-stellar-core-${{ inputs.arch }}-${{ env.CORE_REPO_REF }}-${{ inputs.core_configure_flags }}-${{ hashFiles('patches/stellar-core/*.patch') }}
- if: inputs.arch == 'arm64'
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18
with:
Expand All @@ -110,11 +118,12 @@ jobs:
- name: Build Stellar-Core Image
run: >
docker buildx build --platform linux/${{ inputs.arch }}
-f docker/Dockerfile.testing -t stellar-core:${{ inputs.arch }}
-f Dockerfile.core -t stellar-core:${{ inputs.arch }}
-o type=docker,dest=/tmp/image
${{ env.CORE_REPO }}#${{ env.CORE_REPO_REF }}
--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true
--build-arg REPO='${{ env.CORE_REPO }}'
--build-arg REF='${{ env.CORE_REPO_REF }}'
--build-arg CONFIGURE_FLAGS='${{ inputs.core_configure_flags }}'
.
- name: Upload Stellar-Core Image
uses: actions/upload-artifact@v4
with:
Expand Down
44 changes: 44 additions & 0 deletions Dockerfile.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ubuntu:focal as builder

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install iproute2 procps lsb-release \
git build-essential pkg-config autoconf automake libtool \
bison flex sed perl libpq-dev parallel libunwind-dev \
clang-12 libc++abi-12-dev libc++-12-dev \
postgresql curl

RUN git config --global user.email '<>'
RUN git config --global user.name 'Build'

ARG REPO
ARG REF
WORKDIR /wd
RUN git clone ${REPO} /wd
RUN git fetch origin ${REF}
RUN git checkout ${REF}

ADD patches/stellar-core /patches
RUN git am /patches/*.patch
RUN git log

RUN git clean -dXf
RUN git submodule foreach --recursive git clean -dXf

ARG CC=clang-12
ARG CXX=clang++-12
ARG CFLAGS='-O3 -g1 -fno-omit-frame-pointer'
ARG CXXFLAGS='-O3 -g1 -fno-omit-frame-pointer -stdlib=libc++'
ARG CONFIGURE_FLAGS='--enable-tracy --enable-sdfprefs --enable-next-protocol-version-unsafe-for-production'

# Asan in llvm provided in ubuntu 22.04 is incompatible with
# high-entropy ASLR in much newer kernels that GitHub runners are
# using leading to random crashes: https://reviews.llvm.org/D148280
RUN sysctl vm.mmap_rnd_bits=28

RUN ./autogen.sh
RUN ./install-rust.sh
ENV PATH "/root/.cargo/bin:$PATH"
RUN ./configure CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" ${CONFIGURE_FLAGS}
RUN sh -c 'make -j $(nproc)'
RUN make install
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ build-deps-xdr:
docker build -t stellar-xdr:$(XDR_REF) -f Dockerfile.xdr --target builder . --build-arg REPO="$(XDR_REPO)" --build-arg REF="$(XDR_REF)"

build-deps-core:
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)"
docker build --progress=plain -t stellar-core:$(CORE_REF) -f Dockerfile.core --target builder . --build-arg REPO="$(CORE_REPO)" --build-arg REF="$(CORE_REF)" --build-arg CONFIGURE_FLAGS="$(CORE_CONFIGURE_FLAGS)"

build-deps-horizon:
docker build -t stellar-horizon:$(HORIZON_REF) -f Dockerfile.horizon --target builder . --build-arg REF="$(HORIZON_REF)"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ The image also exposes a few other ports that most developers do not need, but a
| 6061 | stellar-rpc | admin port |
| 11625 | stellar-core | peer node port |
| 11626 | stellar-core | main http port |
| 11627 | stellar-core | query http port |
| 11725 | stellar-core (horizon) | peer node port |
| 11726 | stellar-core (horizon) | main http port |
| 11825 | stellar-core (stellar-rpc) | peer node port |
Expand Down
4 changes: 4 additions & 0 deletions common/nginx/etc/conf.d/stellar-core-query.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
location /query/ {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:11627/;
}
3 changes: 3 additions & 0 deletions futurenet/core/etc/stellar-core.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PEER_PORT=11625
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
HTTP_QUERY_PORT=11627

LOG_FILE_PATH="/var/log/stellar-core/stellar-core-{datetime:%Y-%m-%d_%H-%M-%S}.log"
MANUAL_CLOSE=__MANUAL_CLOSE__

Expand Down
3 changes: 3 additions & 0 deletions local/core/etc/stellar-core.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# simple configuration for a local test "network"
# see stellar-core_example.cfg for a description of the configuration parameters

PEER_PORT=11625
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
HTTP_QUERY_PORT=11627

LOG_FILE_PATH="/var/log/stellar-core/stellar-core-{datetime:%Y-%m-%d_%H-%M-%S}.log"
MANUAL_CLOSE=__MANUAL_CLOSE__
ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 75412bab790a63ba02ed311af5eb1f86cefaa999 Mon Sep 17 00:00:00 2001
From: Leigh McCulloch <[email protected]>
Date: Mon, 21 Jul 2025 11:35:27 +1000
Subject: [PATCH] Allow HTTP_QUERY_PORT with NODE_IS_VALIDATOR

---
src/main/ApplicationImpl.cpp | 7 -------
1 file changed, 7 deletions(-)

diff --git a/src/main/ApplicationImpl.cpp b/src/main/ApplicationImpl.cpp
index cb633fa5b..541e3906c 100644
--- a/src/main/ApplicationImpl.cpp
+++ b/src/main/ApplicationImpl.cpp
@@ -712,13 +712,6 @@ ApplicationImpl::validateAndLogConfig()

if (mConfig.HTTP_QUERY_PORT != 0)
{
- if (isNetworkedValidator)
- {
- throw std::invalid_argument("HTTP_QUERY_PORT is non-zero, "
- "NODE_IS_VALIDATOR is set, and "
- "RUN_STANDALONE is not set");
- }
-
if (mConfig.HTTP_QUERY_PORT == mConfig.HTTP_PORT)
{
throw std::invalid_argument(
--
2.49.0

3 changes: 3 additions & 0 deletions pubnet/core/etc/stellar-core.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PEER_PORT=11625
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
HTTP_QUERY_PORT=11627

LOG_FILE_PATH="/var/log/stellar-core/stellar-core-{datetime:%Y-%m-%d_%H-%M-%S}.log"
MANUAL_CLOSE=__MANUAL_CLOSE__

Expand Down
3 changes: 3 additions & 0 deletions testnet/core/etc/stellar-core.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PEER_PORT=11625
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
HTTP_QUERY_PORT=11627

LOG_FILE_PATH="/var/log/stellar-core/stellar-core-{datetime:%Y-%m-%d_%H-%M-%S}.log"
MANUAL_CLOSE=__MANUAL_CLOSE__

Expand Down
Loading