-
Notifications
You must be signed in to change notification settings - Fork 29
Improve safety checks for the upgradeability mechanism #28
Comments
@frangio you raised this issue, please add your ideas or edit the description directly, thx! |
This refers to the fact that the I see this as a problem in the conceptual model. Proxies' implementations should only be upgraded to other compatible implementations. The current notion of compatibility between older and newer implementations seems to be that they have the same This leaves out the possibility of upgrading from |
This is not possible to do on-chain. Off-chain, we could and should definitely check some of these things. Storage layout (#63) is the obvious one. I think these checks should part of our toolchain to register new versions. |
Additionally, a very simple one that we should add is checking that an implementation has any code in it (via |
See zeppelinos/zos-cli#320 for another safety issue to tackle. |
I'm closing this issue since we are already exploring some improvements in separate issues. In case we decide to tackle any other particular edge case or scenario, we could open another issue for that. Improving safety is something that never ends :) |
The current upgradeability model only prevents you from registering or upgrading to a zero address. Apart from that, it does not check if you upgrade a contract to a version registered for another contract, or if the contract that you are upgrading follows whatever was required by your previous version (e.g. storage or function signatures), etc.
We should explore how we can improve current model to handle most of these scenarios preventing projects from registering and/or upgrading to undesired addresses.
The text was updated successfully, but these errors were encountered: