celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
697 stars 370 forks source link

Devs SBAT create governance proposal to upgrade changed contracts #501

Closed timmoreton closed 4 years ago

timmoreton commented 5 years ago

Expected Behavior

Detect changes, deploy new contracts, create a governance proposal that repoints proxies at new contracts.

Current Behavior

Governance now owns Proxy contracts, so yarn run upgrade no longer works to upgrade contract changes on specified network. (The script at packages/protocol/scripts/truffle/upgrade.ts is outdated, as it assumes the MultiSig contract is deployed. However, we don't deploy it anymore, so the script breaks.)

yorhodes commented 4 years ago

2 options:

  1. use hotfixes
  2. use governance proposals

Analysis:

Concrete steps:

  1. migrate functionality from protocol upgrade script to contractkit for constructing proxy logic update transaction
  2. add functionality to contractkit Governance wrapper for <encoding/hashing> transaction and submitting <proposal/hotfix>
  3. add validator commands to CLI for interacting with governance <hotfix/proposals>
  4. migrate functionality from protocol upgrade script to for detecting changes between network bytecode and local bytecode and performing upgrade via CLI/contractkit
yorhodes commented 4 years ago

closing due to #2142 being merged