Skip to content

feat/store: prune account code#1772

Open
drahnr wants to merge 4 commits intonextfrom
bernhard-prune-account-code
Open

feat/store: prune account code#1772
drahnr wants to merge 4 commits intonextfrom
bernhard-prune-account-code

Conversation

@drahnr
Copy link
Contributor

@drahnr drahnr commented Mar 10, 2026

We currently prune outdated storage items and vault entries, but not yet account code.

The PR adds that cleanup.

@drahnr drahnr added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Mar 11, 2026

diesel::sql_query(
"DELETE FROM account_codes \
WHERE code_commitment NOT IN ( \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do delete everything that is not referenced by accounts in the latest 50 blocks or is_latest=1

@drahnr drahnr marked this pull request as ready for review March 11, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant