Skip to content

3.12 Both cstore and cload are not treated as canonical storage operations in libyul #203

Merged
cdrappi merged 2 commits intozellic-auditfrom
cops-canonical-storage-libyul
Feb 16, 2026
Merged

3.12 Both cstore and cload are not treated as canonical storage operations in libyul #203
cdrappi merged 2 commits intozellic-auditfrom
cops-canonical-storage-libyul

Conversation

@cdrappi
Copy link
Contributor

@cdrappi cdrappi commented Feb 16, 2026

No description provided.

@cdrappi cdrappi force-pushed the cops-canonical-storage-libyul branch 2 times, most recently from 18ca554 to 6ab7b30 Compare February 16, 2026 15:26
Add tests for LoadResolver and EqualStoreEliminator to verify that
cstore/cload confidential storage operations are optimized by the
data-flow analysis passes, and that cross-domain independence between
sstore/sload and cstore/cload is maintained. Includes a test verifying
that cstore invalidates sload knowledge for the same key.
Add ConfidentialStorage as a third StoreLoadLocation in the
DataFlowAnalyzer, enabling LoadResolver and EqualStoreEliminator to
optimize cload/cstore the same way they handle sload/sstore.

cstore/cload operate on an independent storage domain from sstore/sload,
so they are tracked in a separate environment map. When cstore(k, v)
is encountered, regular storage knowledge for key k is invalidated
because a subsequent sload would HALT at runtime (the slot is now
private). The reverse invalidation is not needed: sstore on a private
slot always HALTs, so sstore can never affect confidential storage.
@cdrappi cdrappi force-pushed the cops-canonical-storage-libyul branch from 6ab7b30 to 55372e2 Compare February 16, 2026 15:34
@cdrappi cdrappi merged commit fa63127 into zellic-audit Feb 16, 2026
1 check passed
@cdrappi cdrappi deleted the cops-canonical-storage-libyul branch February 16, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant