Skip to content

refactor: drop canister_id from CanisterSnapshot struct#9370

Draft
mraszyk wants to merge 1 commit intomasterfrom
mraszyk/no-canister-id-in-snapshot
Draft

refactor: drop canister_id from CanisterSnapshot struct#9370
mraszyk wants to merge 1 commit intomasterfrom
mraszyk/no-canister-id-in-snapshot

Conversation

@mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Mar 14, 2026

This PR drops the canister_id field from struct CanisterSnapshot. The motivation is two fold:

  • the canister ID can be derived from the snapshot ID;
  • canister snapshots are now stored in the corresponding CanisterState and thus the canister ID is unambiguous anyway.

This change only concerns the in-memory struct CanisterSnapshot. The on-disk representation is unchanged:

  • such a change would be breaking;
  • the on-disk representation represents the snapshot ID as a pair of the canister ID and the snapshot sequence number within the single canister and thus the on-disk representation is already minimal.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant