Expand description
Migration helpers – safe version upgrades for on-chain accounts.
Hopper’s migration system supports three patterns:
- Append-safe: New fields appended to the end, realloc to larger size
- Segment-safe: New segments added to the segment table
- Full migration: Data reshuffled between versions
§Safety
- Migration always validates the source layout_id before touching data
- The destination version must be strictly greater than the source
- Realloc is rent-safe (payer provides lamports for the delta)
Structs§
- Migration
Descriptor - Migration descriptor for schema export.
Enums§
- Migration
Kind - The kind of migration.
Functions§
- is_
append_ compatible - Check if a migration from OldLayout to NewLayout would be append-compatible.
- migrate_
append - Migrate an account in-place by appending new fields.