Skip to content

CYS3-02: Upgradeable Storage Layout Changes Can Corrupt Live Proxies - #542

Merged
evercoinx merged 1 commit into
mainfrom
serge/CYS3-02
May 10, 2026
Merged

CYS3-02: Upgradeable Storage Layout Changes Can Corrupt Live Proxies #542
evercoinx merged 1 commit into
mainfrom
serge/CYS3-02

Conversation

@evercoinx

@evercoinx evercoinx commented May 9, 2026

Copy link
Copy Markdown
Contributor

Note

Low Risk
Adds a new regression test that will fail on any storage layout drift in upgradeable contracts; runtime/protocol behavior is unchanged, but CI may start failing if layouts change without updating the baseline.

Overview
Adds StorageLayout.t.sol, a Foundry unit test that reads each contract’s out/<Contract>.json storageLayout output and asserts a pinned baseline (label/slot/offset/type) for core UUPS proxies (StakeManager, RewardsManager, SlashingManager, SSPRouter, OraclePriceFeed, SymbioticAdapter, EigenAdapter).

Includes helper logic to normalize solc/Foundry type identifiers by stripping build-dependent AST node IDs before comparison, so the test only fails on real storage layout changes.

Reviewed by Cursor Bugbot for commit 48357ad. Bugbot is set up for automated code reviews on this repo. Configure here.

@evercoinx
evercoinx requested a review from dB2510 May 9, 2026 14:58
@evercoinx evercoinx self-assigned this May 9, 2026
@evercoinx
evercoinx merged commit 85e4165 into main May 10, 2026
2 checks passed
@evercoinx
evercoinx deleted the serge/CYS3-02 branch May 10, 2026 12:53
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.

2 participants