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?
Stellar Stack Exchange is a question and answer site for developers and users of Stellar and the Stellar Distributed Exchange. It only takes a minute to sign up.
Sign up to join this communityIt 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).
/maintenance
command on a node connecting to the test network, I get [default INFO] No work performed
.
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.
Oct 6, 2018 at 1:13
CATCHUP_COMPLETE=false
and CATCHUP_COMPLETE=true
without touching CATCHUP_RECENT
. Both still produces the same result.
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.
Oct 6, 2018 at 2:05