OpenZeppelin / OpenZeppelin/openzeppelin-upgrades
Check struct compatibility in diamond storage pattern
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 658
- Forks
- 286
- PR merge metrics
- No merged PRs in 30d
Description
The diamond storage pattern described in EIP-2535 is gaining popularity. It consists of an internal getter that returns a storage pointer to a struct that is placed in some random location in storage. This is an alternative to storage gaps that is more powerful because it also tolerates different inheritance linearization.
A struct defined in a contract used only in a diamond storage getter should also be checked for layout incompatibilities, but currently isn't
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the EIP-2535 section linked in the issue, then inspect the repository's existing storage-layout compatibility checks for how structs in diamond storage getters are handled. Done means incompatible struct layouts are detected while compatible layouts continue to pass the relevant upgrade validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100