pub fn is_backward_readable(
older: &LayoutManifest,
newer: &LayoutManifest,
) -> boolExpand description
Check if accounts written by newer can still be parsed by code expecting older.
Backward-readable means:
- Same discriminator
- All fields in
olderexist innewerwith the same name, type, and size - No fields were reordered (shared prefix is intact)
This is useful for progressive rollouts: if backward-readable, both V(N) and V(N+1) code can coexist, reading each other’s accounts (V(N) ignores extra fields at the end).
Note: This does NOT mean no migration is needed – the layout_id will still differ, so strict loaders will reject the data. This checks the wire-level compatibility of the prefix.