Cairo 1.x storage schema change and unresolved rollback safety
0 reputation · 24 Mar 2022, 02:53 UTC
Cairo 1.x storage schema change and unresolved rollback safety
The goal is to determine whether contract storage can be safely rolled back to a previous layout after a storage schema change in Cairo 1.x. Sierra compilation enforces memory safety and bounded computation, but it does not define database-style schema migration or transactional rollback of contract storage.
The Cairo language specification assumes Cairo 1.x and the StarkNet storage model, and it does not document a standard on-chain upgrade or rollback pattern after storage fields are added, removed, or reordered. Whether Sierra safety assertions extend to application-level state is not addressed by the specification.
Is storage rollback safe after a schema change in Cairo 1.x? Which Sierra assertions cover storage schema migration? What on-chain pattern is intended when storage layout changes?