Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 81186c4

Browse files
authored
Add docs on --captive-core-use-db flag (#644)
1 parent efbc30b commit 81186c4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

content/docs/run-api-server/configuring.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ As outlined at the beginning, we presume you are interested in starting an inges
4747
| ---- | ------ | ------- |
4848
| `--captive-core-config-path` | `CAPTIVE_CORE_CONFIG_PATH` | /etc/default/stellar-captive-core.toml |
4949
| `--stellar-core-binary-path` | `STELLAR_CORE_BINARY_PATH` | /usr/bin/stellar-core |
50+
| `--captive-core-use-db` | `CAPTIVE_CORE_USE_DB` | true |
5051

5152
Note that **ingestion is enabled by default**.
5253

5354
- The first parameter, `--captive-core-config-path`, points to a Captive Core configuration file. This TOML file only requires a few fields (explained [below](#configuring-captive-core)) to get up and running.
5455
- The second parameter, `--stellar-core-binary-path`, is a filesystem path to a Stellar Core binary. Horizon will actually search your PATH for `stellar-core` by default, so if your environment is configured appropriately, you don't need to pass this.
56+
- The third parameter, `--captive-core-use-db`, by default this value is false, which means Captive Core ingestion will run with ledger states stored in RAM. When set to true, enables Captive Core ingestion to store ledger states in local SQLite database rather than in memory (RAM). As of this writing, ledger states require approximately 8GB, but this will continue to increase as the ledger grows over time. The database location is determined by the `DATABASE` parameter within the `--captive-core-config-path` file. By default, it is set to `sqlite3://stellar.db`, which resolves to runtime directory location derived from `--captive-core-storage-path`.
5557

5658
#### Without Ingestion
5759
If you aren't configuring your Horizon instance to perform ingestion, it still needs awareness about what's going on in the Stellar network to be useful. Thus, you need to point Horizon to a running Stellar Core instance:

content/docs/run-api-server/ingestion.mdx

+7-1
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,15 @@ export PARALLEL_JOB_SIZE=100000
154154
export RETRIES=10
155155
export RETRY_BACKOFF_SECONDS=20
156156

157-
# Enable following config for stellar-horizon to download buckets locally at specific location.
157+
# Enable optional config when running captive core ingestion
158+
159+
# For stellar-horizon to download buckets locally at specific location.
158160
# If not enabled, stellar-horizon would download data in the current working directory.
159161
# export CAPTIVE_CORE_STORAGE_PATH="/var/lib/stellar"
162+
163+
# For stellar-horizon to use local disk file for ledger states rather than in memory(RAM), approximately
164+
# 8GB of space and increasing as size of ledger entries grows over time.
165+
# export CAPTIVE_CORE_USE_DB=true
160166
```
161167

162168
</CodeExample>

0 commit comments

Comments
 (0)