reserve-protocol/rsd

No way to transfer ownership of Storage contract at upgrade time

Closed this issue · 2 comments

Current problem: After deployment, ReserveDollar ("Logic") becomes the owner of ReserveDollarEternalStorage ("Storage"). When we want to upgrade Logic, we'll need to transfer ownership of Storage to the new Logic. The old Logic owns Storage, and has no way to call transferOwnership.

Potential solutions:

  1. Storage has separate "owner" and "impl" roles. The setters and getters are all onlyImpl; the change-of-role functions are onlyOwner.
  2. Storage keeps just the "owner" role, and every Logic contract has a way to call "transferOwnership".

So far, I most prefer option 1, because option 2 adds failure modes where we lose control of Storage during upgrades.

This is currently pending on tests for upgrading, so that we have some solid examples to point to while we do the thing.