-
Notifications
You must be signed in to change notification settings - Fork 33
schema-versioned migration/upgrade path for settlement storage #452
Copy link
Copy link
Open
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignTHIRD CAMPAIGNarea:settlementsettlementsettlementpriority:highHigh priorityHigh prioritystack:rustRustRuststack:sorobanSoroban smart contractSoroban smart contracttype:featureNew functionalityNew functionality
Description
Activity
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignTHIRD CAMPAIGNarea:settlementsettlementsettlementpriority:highHigh priorityHigh prioritystack:rustRustRuststack:sorobanSoroban smart contractSoroban smart contracttype:featureNew functionalityNew functionality
Summary
There is no safe way to evolve settlement storage — an upgrade risks reading stale layouts. Add a schema-version field and a guarded migration entrypoint.
Why this matters
Storage evolution without versioning corrupts state on upgrade. A version gate + migration makes upgrades safe and idempotent.
Requirements
schema_version; expose it via a read view.migrate()that upgrades in-place, gated on the current version.Technical guidance
Edge cases — each must have a test
Acceptance criteria
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo testall pass locallyCloses #<issue>Out of scope
Rewards
Part of the GrantFox OSS / Official Campaign (FWC26) — this task may be rewarded. PR quality is assessed by AI: depth, correctness under edge cases, meaningful tests, and clean design are what earn the reward. Shallow changes (typos, formatting, trivial docs) do not qualify.