Skip to content

Add how-to guide for storage data migration (#2228)#2299

Open
carstenjacobsen wants to merge 3 commits intomainfrom
migrate-contract-storage
Open

Add how-to guide for storage data migration (#2228)#2299
carstenjacobsen wants to merge 3 commits intomainfrom
migrate-contract-storage

Conversation

@carstenjacobsen
Copy link
Contributor

PR for issue #2228

Copilot AI review requested due to automatic review settings March 6, 2026 12:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new how-to guide explaining how to safely migrate Soroban contract storage data when upgrading stored data structures, focusing on why naïve decoding traps and how to use explicit versioning patterns.

Changes:

  • Introduces a “Version Marker Pattern” guide for per-record versioning and safe reads/writes across upgrades.
  • Explains lazy vs eager migration tradeoffs for Soroban.
  • Provides example test approaches for validating upgrade/migration behavior, plus an alternative “Versioned Enum Pattern”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Mar 6, 2026

@carstenjacobsen I've opened a new pull request, #2300, to work on those changes. Once the pull request is ready, I'll request review from you.

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

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.

4 participants