Skip to content

Governance TODOs#674

Merged
thomas-waite merged 25 commits intofeat-governance-upgradefrom
gov-todos
Apr 25, 2022
Merged

Governance TODOs#674
thomas-waite merged 25 commits intofeat-governance-upgradefrom
gov-todos

Conversation

@thomas-waite
Copy link
Contributor

@thomas-waite thomas-waite commented Apr 8, 2022

Summary

Implements governance upgrade todos:

Main points

  • admin of a pod is set on a per pod basis via the PodConfig that is passed to factory.createOptimisticPod(). This is done for two reasons:
    • Allow the PodFactory to be be passed to PodAdminGateway, so that in veto() we can validate that podId corresponds to the passed timelock (there won't be a cyclical dependency)
    • Allow us to more easily upgrade the admin contract. An individual pod/safe can migrate itself, and then we will create all new pods in the future by passing a new admin. Rather than requiring to redeploy the factory
  • Consolidated specific pod admin roles into: admin and guardian. Map onto existing global role abilities
  • DAO vote will not be bricked by additional Orca pod deploys. We deploy the TribalCouncil first and get a unique podId. The DAO vote script will need updating with our TribalCouncil Id
  • Replaced used of OptimisticTimelock.sol with TimelockController.sol
  • Removed some unnecessary global roles and consolidated
  • Have a simplified deployGenesisPod() function to deploy the first pod. It is used to deploy the TribalCouncil before the DAO vote FIP. This means we have the podId. It is not placed in the constructor of the factory as it relies on args passed to the constructor which I want to be immutable for future deploys

@thomas-waite thomas-waite self-assigned this Apr 8, 2022
@thomas-waite thomas-waite requested a review from a team as a code owner April 8, 2022 20:26
@thomas-waite thomas-waite changed the title TODOs/Refactors Governance TODOs Apr 10, 2022
@thomas-waite thomas-waite changed the base branch from feat-gov-upgrade-v2 to feat-governance-upgrade April 10, 2022 19:28
// TODODODODODO: Use TimelockController from OZ
OptimisticTimelock timelock = new TimelockController(
address(core()),
TimelockController timelock = new TimelockController(
Copy link
Contributor

@Joeysantoro Joeysantoro Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use v4.6 when it releases https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.6/contracts/governance/TimelockController.sol and be more specific with the roles, specifically canceller

Copy link
Contributor Author

@thomas-waite thomas-waite Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Didn't want to pull the contract direct from Github pre-release. Have reached out to find out more about release timelines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looks to be 4.5. Can we import the more recent commits via npm override?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to update now in a seperate PR, merging this down

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgraded here: #739

Copy link
Contributor

@Joeysantoro Joeysantoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot better overall but still some important unresolved issues

needed to link podId and timelock
@thomas-waite thomas-waite merged commit 0034d60 into feat-governance-upgrade Apr 25, 2022
@thomas-waite thomas-waite deleted the gov-todos branch April 25, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments