Context
Morpho Midnight downstream identity and mapping docs still carry storage-layout drift even after direct Verity emission of the CREATE2/SSTORE2 surface.
Current Midnight Yul identity report shape:
onlyInSolidity: 75
onlyInVerity: 226
hashMismatch: 0
Storage-related Solidity-only helper families include:
update_storage_value_offset_12_uint16_to_uint16#0
update_storage_value_offset_2_uint16_to_uint16#0
update_storage_value_offset_4_uint16_to_uint16#0
update_storage_value_offset_8_uint16_to_uint16#0
update_storage_value_offset_t_uint16_to_t_uint16#0
update_storage_value_offset_uint128_to_uint128#0
update_storage_value_offset_uint16_to_uint16#0
update_storage_value_offset_uint32_to_uint32#0
update_storage_value_uint128_to_uint128#0
storage_array_index_access_uint#0
storage_array_index_access_uint128_#0
The downstream MORPHO_MIDNIGHT_MAPPING.md also notes that collateral storage uses wider word slots rather than exact uint128 packing until Verity supports packed fixed-array elements.
Feature request
Add first-class Solidity-compatible packed storage lowering for fixed-size narrow integer fields and packed fixed-array elements, with solc-shaped Yul helper emission where possible.
The feature should cover:
- Slot/offset writes for
uint16, uint32, and uint128 packed fields.
- Fixed-array element packing for
uint128 collateral/accounting style arrays.
- Storage array index access helper emission that can converge with solc
irOptimized Yul.
- Proof obligations or metadata that make the packed layout auditable in downstream parity/proof artifacts.
Why this matters
This closes a concrete Midnight source-faithfulness gap and removes a recognizable Solidity-only helper family from the fail-closed Yul identity manifest. It is also a prerequisite for reducing the mapping doc's storage-layout caveat from medium to high source faithfulness for collateral paths.
Related broad roadmap issue: #1982.
Context
Morpho Midnight downstream identity and mapping docs still carry storage-layout drift even after direct Verity emission of the CREATE2/SSTORE2 surface.
Current Midnight Yul identity report shape:
onlyInSolidity: 75onlyInVerity: 226hashMismatch: 0Storage-related Solidity-only helper families include:
update_storage_value_offset_12_uint16_to_uint16#0update_storage_value_offset_2_uint16_to_uint16#0update_storage_value_offset_4_uint16_to_uint16#0update_storage_value_offset_8_uint16_to_uint16#0update_storage_value_offset_t_uint16_to_t_uint16#0update_storage_value_offset_uint128_to_uint128#0update_storage_value_offset_uint16_to_uint16#0update_storage_value_offset_uint32_to_uint32#0update_storage_value_uint128_to_uint128#0storage_array_index_access_uint#0storage_array_index_access_uint128_#0The downstream
MORPHO_MIDNIGHT_MAPPING.mdalso notes that collateral storage uses wider word slots rather than exactuint128packing until Verity supports packed fixed-array elements.Feature request
Add first-class Solidity-compatible packed storage lowering for fixed-size narrow integer fields and packed fixed-array elements, with solc-shaped Yul helper emission where possible.
The feature should cover:
uint16,uint32, anduint128packed fields.uint128collateral/accounting style arrays.irOptimizedYul.Why this matters
This closes a concrete Midnight source-faithfulness gap and removes a recognizable Solidity-only helper family from the fail-closed Yul identity manifest. It is also a prerequisite for reducing the mapping doc's storage-layout caveat from medium to high source faithfulness for collateral paths.
Related broad roadmap issue: #1982.