Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

'--enable core --local' only runs core, no ancillary services #615

Merged
merged 5 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ jobs:
go run test_horizon_ingesting.go
curl http://localhost:8000
- name: Run friendbot test
if: ${{ matrix.network == 'local' }}
if: ${{ matrix.horizon && matrix.network == 'local' }}
run: |
docker logs stellar -f &
echo "supervisorctl tail -f friendbot" | docker exec -i stellar sh &
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ In local network mode, you can optionally pass:
- `testnet` sets limits to match those used on testnet (the default quickstart configuration)
- `unlimited` sets limits to the maximum resources that can be configured

__Note: The `--enable` options behaves differently in local network mode, see [Service Options](#service-otions) for more details.__
The network passphrase of the network defaults to:
```
Standalone Network ; February 2017
Expand Down Expand Up @@ -93,9 +94,7 @@ To run only select services, simply specify only those services. For example, to
```
--enable rpc
```

__Note: All services, and in addition friendbot, always run on a local network.__

__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.__
### Faucet (Friendbot)

Stellar development/test networks use friendbot as a faucet for the native asset.
Expand Down
28 changes: 16 additions & 12 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ function process_args() {
NETWORK="testnet"
fi

if [[ ",$ENABLE," = *",core,"* ]]; then
ENABLE_CORE=true
fi
if [[ ",$ENABLE," = *",horizon,"* ]]; then
ENABLE_HORIZON=true
fi
if [[ ",$ENABLE," = *",rpc,"* ]]; then
ENABLE_SOROBAN_RPC=true
fi

case "$NETWORK" in
testnet)
export NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
Expand All @@ -190,7 +200,9 @@ function process_args() {
# h1570ry - we'll start a webserver connected to history directory later on
export HISTORY_ARCHIVE_URLS="http://localhost:1570"
ENABLE_CORE=true
ENABLE_HORIZON=true
if [[ "$ENABLE_SOROBAN_RPC" = "true" ]]; then
ENABLE_HORIZON=true
fi
;;
futurenet)
export NETWORK_PASSPHRASE="Test SDF Future Network ; October 2022"
Expand All @@ -201,16 +213,6 @@ function process_args() {
exit 1
esac

if [[ ",$ENABLE," = *",core,"* ]]; then
ENABLE_CORE=true
fi
if [[ ",$ENABLE," = *",horizon,"* ]]; then
ENABLE_HORIZON=true
fi
if [[ ",$ENABLE," = *",rpc,"* ]]; then
ENABLE_SOROBAN_RPC=true
fi

if [ "$RANDOMIZE_NETWORK_PASSPHRASE" = "true" ]; then
NETWORK_PASSPHRASE="${NETWORK_PASSPHRASE} ; $(openssl rand -hex 32)"
fi
Expand Down Expand Up @@ -597,7 +599,9 @@ function upgrade_local() {
# account to submit txs. while friend it is not dependent on the config
# upgrade txs, it must not be started until the config upgrades are
# complete otherwise the txs sequence numbers will conflict.
supervisorctl start friendbot
if [ "$ENABLE_HORIZON" == "true" ]; then
supervisorctl start friendbot
fi
}

function start_optional_services() {
Expand Down
Loading