We need to make out contracts upgradeable, our contracts already have initialize() functions, which suggests they're meant to be upgradeable. But we're deploying them directly without proxy patterns.
This means every time we need to fix a bug or add a feature:
- We deploy new contract instances
- All the addresses change
- Every ciphernode operator has to update their
enclave.config.yaml with new addresses
- Nodes go offline, have to restart, reconfigure, etc.
- It'll be a pain for testnet where we're iterating quickly
On testnet we're probably going to:
- Fix bugs we discover
- Add new features (like the refund mechanism)
- Adjust parameters
- Maybe add new storage variables
Each time we do this, if addresses change, we're asking all testnet operators to:
- Stop their nodes
- Update config files
- Restart nodes
- Hope they don't miss anything
That's... not ideal for rapid iteration.
We should use a proxy pattern (UUPS or Transparent Proxy) so proxy address stays constant, nodes configure once, never change, we can publish the contracts in our docs and forget about it.
Implementation can be upgraded, we deploy new implementations and point proxy to them, we can fix bugs without disrupting nodes
I'd say this is high priority for testnet. We're going to be iterating a lot, and having stable addresses will make the experience much smoother for operators.
We need to make out contracts upgradeable, our contracts already have
initialize()functions, which suggests they're meant to be upgradeable. But we're deploying them directly without proxy patterns.This means every time we need to fix a bug or add a feature:
enclave.config.yamlwith new addressesOn testnet we're probably going to:
Each time we do this, if addresses change, we're asking all testnet operators to:
That's... not ideal for rapid iteration.
We should use a proxy pattern (UUPS or Transparent Proxy) so proxy address stays constant, nodes configure once, never change, we can publish the contracts in our docs and forget about it.
Implementation can be upgraded, we deploy new implementations and point proxy to them, we can fix bugs without disrupting nodes
I'd say this is high priority for testnet. We're going to be iterating a lot, and having stable addresses will make the experience much smoother for operators.