Skip to content

apollo_storage: add fee_proposal_fri migrator and bump blocks version to 6.1#13936

Open
sirandreww-starkware wants to merge 1 commit intomainfrom
04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1
Open

apollo_storage: add fee_proposal_fri migrator and bump blocks version to 6.1#13936
sirandreww-starkware wants to merge 1 commit intomainfrom
04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

sirandreww-starkware commented Apr 30, 2026

@sirandreww-starkware sirandreww-starkware self-assigned this Apr 30, 2026
@sirandreww-starkware sirandreww-starkware marked this pull request as ready for review April 30, 2026 13:51
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 30, 2026

PR Summary

Medium Risk
Introduces a new on-read migration path for persisted headers records and bumps the blocks storage version; mistakes could prevent opening or reading existing databases until resynced.

Overview
Adds a generic VersionWrapper/Migratable mechanism for versioned DB values (no longer test-only), enabling automatic migration when deserializing older records.

Implements a v0→v1 migrator for StorageBlockHeader (handling the new fee_proposal_fri field by defaulting to None) and adds deprecated v0 header type + serialization/test-instance support.

Switches the headers table to VersionWrapper<StorageBlockHeader, 1> and bumps STORAGE_VERSION_BLOCKS from 6.0 to 6.1 to reflect the migratable blocks-format change.

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

@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from 1b57f15 to d961488 Compare May 1, 2026 15:06
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_partialblockhashcomponents branch from 62e988c to 88855dd Compare May 1, 2026 15:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

@sirandreww-starkware sirandreww-starkware changed the title apollo_storage: add fee_proposal_fri migrator and bump blocks version to 6.1 apollo_storage: add fee_proposal_fri migrators and bump blocks version to 6.1 May 1, 2026
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_partialblockhashcomponents branch from 88855dd to c63c17b Compare May 1, 2026 15:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_partialblockhashcomponents branch from a8476f4 to a942277 Compare May 4, 2026 10:25
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_partialblockhashcomponents branch from a942277 to 4f8ff9e Compare May 4, 2026 13:20
@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from e5cd165 to 3bf12c1 Compare May 4, 2026 13:20
@sirandreww-starkware sirandreww-starkware changed the base branch from 04-19-starknet_api_add_fee_proposal_to_partialblockhashcomponents to graphite-base/13936 May 5, 2026 06:53
@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from 3bf12c1 to 6a92d7c Compare May 5, 2026 06:53
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/13936 to 05-04-apollo_protobuf_add_fee_proposal_fri_to_sync_proto_signedblockheader May 5, 2026 06:53
@sirandreww-starkware sirandreww-starkware force-pushed the 05-04-apollo_protobuf_add_fee_proposal_fri_to_sync_proto_signedblockheader branch from 3e86fde to e9914f7 Compare May 6, 2026 06:29
@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from 6a92d7c to c202246 Compare May 6, 2026 06:29
Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

@ShahakShama reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware and sirandreww-starkware).


crates/apollo_storage/src/deprecated/migrations.rs line 32 at r2 (raw file):

            CURRENT_VERSION.. => {
                error!(
                    "Unable to migrate stored header from version {} to current version.",

The message here should make it clear that the problem is in the version number
Maybe something like "Version {} is >= current version. Can't migrate"

Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware and sirandreww-starkware).

@sirandreww-starkware sirandreww-starkware changed the base branch from 05-04-apollo_protobuf_add_fee_proposal_fri_to_sync_proto_signedblockheader to graphite-base/13936 May 6, 2026 09:06
@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from c202246 to fafa7d5 Compare May 6, 2026 09:11
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/13936 to 05-04-apollo_protobuf_add_fee_proposal_fri_to_sync_proto_signedblockheader May 6, 2026 09:12
Copy link
Copy Markdown
Contributor Author

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

@sirandreww-starkware resolved 1 discussion.
Reviewable status: 4 of 5 files reviewed, all discussions resolved (waiting on dorimedini-starkware and ShahakShama).

Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@graphite-app graphite-app Bot changed the base branch from 05-04-apollo_protobuf_add_fee_proposal_fri_to_sync_proto_signedblockheader to graphite-base/13936 May 6, 2026 14:57
@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from fafa7d5 to b0f1afe Compare May 6, 2026 15:32
@graphite-app graphite-app Bot changed the base branch from graphite-base/13936 to main May 6, 2026 15:32
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 6, 2026

Merge activity

  • May 6, 3:32 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@sirandreww-starkware sirandreww-starkware force-pushed the 04-30-apollo_storage_add_fee_proposal_fri_migrator_and_bump_blocks_version_to_6.1 branch from b0f1afe to a2d833c Compare May 8, 2026 12:36
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.

3 participants