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
2 changes: 1 addition & 1 deletion .github/workflows/internal-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:
cache_id:
description: "A value insert into cache keys to namespace cache usage, or invalidate it by incrementing"
type: "string"
default: 19
default: 20
cache_prefix:
description: "A prefix added to all cache keys generated by this workflow"
type: "string"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ COPY apt-retry /usr/local/bin/
RUN apt-retry sh -c 'apt-get update && apt-get install -y build-essential jq' && apt-get clean
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_TOOLCHAIN_VERSION

RUN make build-stellar-rpc
RUN make build-stellar-rpc RPCV2=true

FROM scratch AS stellar-rpc-stage

Expand Down
2 changes: 1 addition & 1 deletion common/stellar-rpc/bin/start
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e
set -o pipefail

echo "starting stellar-rpc..."
exec /usr/bin/stellar-rpc --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.cfg
exec /usr/bin/stellar-rpc --enable-rpcv2 --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.toml
13 changes: 0 additions & 13 deletions futurenet/stellar-rpc/etc/stellar-rpc.cfg

This file was deleted.

24 changes: 24 additions & 0 deletions futurenet/stellar-rpc/etc/stellar-rpc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The start script fills in the __X__ values.

[storage]
default_data_dir = "/opt/stellar/stellar-rpc/data"

[retention]
# Backfilling from genesis would take days, so keep history from the
# 10,000-ledger chunk holding the network tip at first start.
earliest_ledger = "now"

[service]
endpoint = "localhost:8003"
admin_endpoint = "__STELLAR_RPC_ADMIN_ENDPOINT__"

[service.methods.getNetwork]
friendbot_url = "https://friendbot-futurenet.stellar.org/"

[ingestion]
# rpcv2 reads the network passphrase from the captive-core config.
captive_core_config = "/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg"
captive_core_storage_path = "/opt/stellar/stellar-rpc/captive-core"
history_archive_urls = ["__ARCHIVE__"]
stellar_core_binary_path = "/usr/bin/stellar-core"
core_http_port = 11826
13 changes: 0 additions & 13 deletions local/stellar-rpc/etc/stellar-rpc.cfg

This file was deleted.

23 changes: 23 additions & 0 deletions local/stellar-rpc/etc/stellar-rpc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The start script fills in the __X__ values.

[storage]
default_data_dir = "/opt/stellar/stellar-rpc/data"

[retention]
# The local network is new, so keep all of its history.
earliest_ledger = "genesis"

[service]
endpoint = "localhost:8003"
admin_endpoint = "__STELLAR_RPC_ADMIN_ENDPOINT__"

[service.methods.getNetwork]
friendbot_url = "http://localhost:8000/friendbot"

[ingestion]
# rpcv2 reads the network passphrase from the captive-core config.
captive_core_config = "/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg"
captive_core_storage_path = "/opt/stellar/stellar-rpc/captive-core"
history_archive_urls = ["__ARCHIVE__"]
stellar_core_binary_path = "/usr/bin/stellar-core"
core_http_port = 11826
12 changes: 0 additions & 12 deletions pubnet/stellar-rpc/etc/stellar-rpc.cfg

This file was deleted.

21 changes: 21 additions & 0 deletions pubnet/stellar-rpc/etc/stellar-rpc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The start script fills in the __X__ values.

[storage]
default_data_dir = "/opt/stellar/stellar-rpc/data"

[retention]
# Backfilling from genesis would take days, so keep history from the
# 10,000-ledger chunk holding the network tip at first start.
earliest_ledger = "now"

[service]
endpoint = "localhost:8003"
admin_endpoint = "__STELLAR_RPC_ADMIN_ENDPOINT__"

[ingestion]
# rpcv2 reads the network passphrase from the captive-core config.
captive_core_config = "/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg"
captive_core_storage_path = "/opt/stellar/stellar-rpc/captive-core"
history_archive_urls = ["__ARCHIVE__"]
stellar_core_binary_path = "/usr/bin/stellar-core"
core_http_port = 11826
5 changes: 2 additions & 3 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,8 @@ function init_stellar_rpc() {
ADMIN_ENDPOINT=
fi

perl -pi -e "s/__STELLAR_RPC_ADMIN_ENDPOINT__/$ADMIN_ENDPOINT/g" etc/stellar-rpc.cfg
perl -pi -e "s/__NETWORK__/$NETWORK_PASSPHRASE/g" etc/stellar-rpc.cfg
perl -pi -e "s=__ARCHIVE__=$HISTORY_ARCHIVE_URLS=g" etc/stellar-rpc.cfg
perl -pi -e "s/__STELLAR_RPC_ADMIN_ENDPOINT__/$ADMIN_ENDPOINT/g" etc/stellar-rpc.toml
perl -pi -e "s=__ARCHIVE__=$HISTORY_ARCHIVE_URLS=g" etc/stellar-rpc.toml

run_silent "init-stellar-rpc" chown -R stellar:stellar .

Expand Down
13 changes: 0 additions & 13 deletions testnet/stellar-rpc/etc/stellar-rpc.cfg

This file was deleted.

24 changes: 24 additions & 0 deletions testnet/stellar-rpc/etc/stellar-rpc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The start script fills in the __X__ values.

[storage]
default_data_dir = "/opt/stellar/stellar-rpc/data"

[retention]
# Backfilling from genesis would take days, so keep history from the
# 10,000-ledger chunk holding the network tip at first start.
earliest_ledger = "now"

[service]
endpoint = "localhost:8003"
admin_endpoint = "__STELLAR_RPC_ADMIN_ENDPOINT__"

[service.methods.getNetwork]
friendbot_url = "https://friendbot.stellar.org/"

[ingestion]
# rpcv2 reads the network passphrase from the captive-core config.
captive_core_config = "/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg"
captive_core_storage_path = "/opt/stellar/stellar-rpc/captive-core"
history_archive_urls = ["__ARCHIVE__"]
stellar_core_binary_path = "/usr/bin/stellar-core"
core_http_port = 11826
Loading