When using the stellar/quickstart docker image, how can I configure horizon (stellar-core?) to download and retain the entire history and never delete it? By default it seems to only download the last few thousand ledgers.
2 Answers
Edit your stellar-core config (/yourpath/core/etc/stellar-core.cfg
)
- Remove
CATCHUP_RECENT=X
- Add
CATCHUP_COMPLETE=true
Horizon will store the entire history as well.
-
Do I need to do any other commands to stellar core or horizon to have it download the history other than just restart the docker container?– JeffCommented Jan 30, 2018 at 16:03
-
Assuming you have an empty database (
stellar-core --newdb
in case you need to clear it), it should just work after restart.– mpromCommented Jan 30, 2018 at 16:12
In order to achieve this (ie have a horizon with a complete tx history), you need two things:
- a core that has processed the entire history
- a horizon that is synced to that core, and that is set to not evict history from its database.
as noted in another answer here, the first item means that your core must perform full catchup. depending on how long the particular blockchain you're working has been alive, this can take a while. weeks even.
As to the second item, you need to set the history-retention-count to a very large number of ledgers, or otherwise the horizon will throw out old ledgers.