What upgrade pattern does openzeppelin use?


I am wondering which patterns openzeppelin use for upgradable contracts(I am mostly curious how you deal with storages).

Do you guys follow the strict storage rules, where you can’t add/remove/change order of variables in the new contract ? I’d ask if so, how did this pattern work for you ? isn’t it a big pain for developers to follow such conventions in the practice ?

Thanks a lot.

There are some proxy patterns, and I think you can have a look at this tutorial: Upgrades - OpenZeppelin Docs And now UUPS proxies are recommended,

you can have a try following this tutorial: UUPS Proxies: Tutorial (Solidity + JavaScript) | OpenZeppelin Community

Yes, I think when you use the plugin to use proxy, it will have a check. Look at this documentation:
And https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#what-does-it-mean-for-a-contract-to-be-upgrade-safe

We haven’t heard complaints about it. It’s not really a convention but a safety requirement! If you reorder variables you are basically corrupting storage layout.