Skip to content

apollo_storage: drop the legacy state commitment infos table and file at startup - #15075

Open
yoavGrs wants to merge 1 commit into
commitment-infos-4-remove-storagefrom
commitment-infos-5-drop-legacy-storage-table
Open

apollo_storage: drop the legacy state commitment infos table and file at startup#15075
yoavGrs wants to merge 1 commit into
commitment-infos-4-remove-storagefrom
commitment-infos-5-drop-legacy-storage-table

Conversation

@yoavGrs

@yoavGrs yoavGrs commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

yoavGrs commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@yoavGrs
yoavGrs force-pushed the commitment-infos-5-drop-legacy-storage-table branch from 2a8de04 to 527a51f Compare August 30, 2026 11:20
@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from 6eafd67 to 4d9c466 Compare August 30, 2026 11:20
@yoavGrs yoavGrs self-assigned this Aug 30, 2026
@yoavGrs
yoavGrs marked this pull request as ready for review August 30, 2026 11:21
@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped startup migration deleting a fixed legacy table and file; failure modes are mostly I/O or MDBX drop errors during open, not changes to live state paths.

Overview
On storage open, nodes that still have pre-migration artifacts from when state commitment infos lived in storage get a one-time cleanup: the legacy MDBX table state_commitment_infos and the on-disk file state_commitment_infos.dat are removed before normal table setup.

New DB helper DbWriter::drop_table_if_exists opens a short RW transaction, drops the named table when present (returns whether anything was dropped), and treats NotFound as a no-op—intended for schema tables that older databases may still carry.

Tests cover full table removal (not just emptying) and an integration test that seeds the legacy table/file and asserts open_storage clears both.

Reviewed by Cursor Bugbot for commit 685b9d2. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

@yoavGrs
yoavGrs force-pushed the commitment-infos-4-remove-storage branch from 3ae5f21 to 5f01d2f Compare August 31, 2026 07:12
@yoavGrs
yoavGrs force-pushed the commitment-infos-5-drop-legacy-storage-table branch from 1ed779a to 685b9d2 Compare August 31, 2026 07:12
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.

2 participants