5

Does the Stellar network have the concept of pruning? If so, how do I go about configuring it?

I am running a node for development purposes but don't want the database and disk usage to become larger than a couple of gigs. Is that possible?

1 Answer 1

3

It looks like you are looking for the /maintenance HTTP command. It cleans unnecessary Stellar Core history, including XDR buckets stored on disk and records in the database.

If you plan to use Horizon in conjunction with Core node, you will only have access to the recent Stellar history, as a complete history archive requires a fully-synced Horizon node (currently more than 50 GB for public network).

4
  • I'm interested in this as well. Could you elaborate a little more about it? Is it taking old ledgers and simply deleting them? Or is it transferring those ledger data to an archive? When I run the /maintenance command on a node connecting to the test network, I get [default INFO] No work performed.
    – B.Li
    Oct 6, 2018 at 0:30
  • Probably you have CATCHUP_COMPLETE=false config parameter set. The /maintenance commands removes stale ledgers retaining only last CATCHUP_RECENT ledgers and performs /buckets dir cleanup. You can configure automatic maintenance task runner using AUTOMATIC_MAINTENANCE_PERIOD and AUTOMATIC_MAINTENANCE_COUNT config params.
    – Orbit Lens
    Oct 6, 2018 at 1:13
  • I just tried it both on nodes with CATCHUP_COMPLETE=false and CATCHUP_COMPLETE=true without touching CATCHUP_RECENT. Both still produces the same result.
    – B.Li
    Oct 6, 2018 at 1:25
  • 1
    Set CATCHUP_COMPLETE=false and just wait for some time. The /maintenance command only schedules a maintenance job. When I run /maintenance on my node there were no changes for quite some time. I even restarted the service a few times. And then, two hours later, it started to delete records from the database in huge batches. Don't know the internal mechanics of the process, so can't tell exactly how the maintenance is scheduled.
    – Orbit Lens
    Oct 6, 2018 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.