Skip to content

Commit

Permalink
enable all services under --local network when just rpc is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Jul 10, 2024
1 parent 837677e commit 5381df9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ 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

- `--enable {core, horizon, rpc}` to further select which services are started in the quickstart container. Since using a 'local' network, the core service will be started regardless as it runs the 'local' network, and these additional permutations of `--enable` are applicable:
- not specified, the default behavior will be to run core, horizon, friendbot, rpc.
- `core` only runs the stellar core and an associated archive server.
- `core,horizon` runs core, horizon, friendbot
- `horizon` runs core, horizon, friendbot
- `rpc` runs core, horizon, friendbot, rpc.

The network passphrase of the network defaults to:
```
Standalone Network ; February 2017
Expand Down Expand Up @@ -94,8 +101,6 @@ 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.__

### Faucet (Friendbot)

Stellar development/test networks use friendbot as a faucet for the native asset.
Expand Down
23 changes: 13 additions & 10 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,6 +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
if [[ "$ENABLE_SOROBAN_RPC" = "true" ]]; then
ENABLE_HORIZON=true
fi
;;
futurenet)
export NETWORK_PASSPHRASE="Test SDF Future Network ; October 2022"
Expand All @@ -200,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

0 comments on commit 5381df9

Please sign in to comment.