Summary
There is no safe way to evolve pool 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
- Store a
schema_version; expose it via a read view.
- Add an admin-guarded
migrate() that upgrades in-place, gated on the current version.
- Migration is idempotent — running it twice is a no-op.
- Emit an event recording the version transition.
Technical guidance
- Refuse to migrate from an unexpected version.
- Keep pre/post invariants asserted in tests.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- Automatic on-read migration
- Downgrade path
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.
Summary
There is no safe way to evolve pool 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.