Skip to content

Prune spendjournal depth - #8

Open
allocz wants to merge 1 commit into
masterfrom
prune_spendjournal_depth
Open

Prune spendjournal depth#8
allocz wants to merge 1 commit into
masterfrom
prune_spendjournal_depth

Conversation

@allocz

@allocz allocz commented Jul 27, 2026

Copy link
Copy Markdown
Owner

This patch implements spend journal pruning by deleting spend journal entries older than the default target of 288 entries, this means that we can process up to 288 blocks (~2 days) of chain re-org.

Previously, archival nodes stored all the spend journal entries forever, ~75GiB of the ~90GiB used by leveldb was being used by the spend journal.

This patch makes possible to run archive nodes with better performance in devices constrained in RAM and SSD, by keeping leveldb in a small SSD and the blocks in an HDD.

This patch implements spend journal pruning by deleting spend journal
entries older than the default target of 288 entries, this means that we
can process up to 288 blocks (~2 days) of chain re-org.

Previously, archival nodes stored all the spend journal entries forever,
~75GiB of the ~90GiB used by leveldb was being used by the spend
journal.

This patch makes possible to run archive nodes with better performance
in devices constrained in RAM and SSD, by keeping leveldb in a small
SSD and the blocks in an HDD.
@allocz

allocz commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

Note: for nodes with IBD complete, a manual leveldb compaction should be ran to release the storage used by the deleted data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant