[Temp Check] Enable CANCEL role on the DAO

Hey Ben, thanks for taking some time to analyze the contracts and giving feedback.

I didn’t imagine this requeueing scenario, so I wasn’t sure if it was possible. I added a test case to make it easier to simulate and collaborate, feel free to run the repo and test.

What you mentioned is correct if we solely analyze the Governor.sol contract used in the ENSGovernor.sol

However, there appears to be some confusion regarding the behavior of the state function and the inheritance in the GovernorTimelockControl contract. Here’s a clarification:

  1. Inheritance Structure:
  • ENSGovernor contract inherits the GovernorTimelockControl contract that inherits the Governor contract, meaning it extends the functionality of Governor and can override its functions.
  1. GovernorTimelockControl.state() Function:
  • When state(proposalId) is called on GovernorTimelockControl, it first invokes the Governor.state() function, which will return succeeded.

  • After obtaining the initial state from Governor.state(), GovernorTimelockControl performs additional checks (see Line 49 of GovernorTimelockControl.sol).

  • If the proposal wasn’t queued before, it returns succeeded, otherwise it performs the checks below.

  • It checks the proposal status in the Timelock using timelock.isOperationDone, which returns false if the operation is not completed.

  • Based on these checks, if the proposal is not in an executed state in the Timelock, the function will return the proposal state as queued.

  1. Requeueing Constraints:
  • If an attempt is made to requeue a proposal that has been directly cancelled in the Timelock, the queue() call will revert with Governor: proposal not successful due to the proposal state being queued.

Conclusion

The feedback may not have fully accounted for the overridden state function in GovernorTimelockControl. The additional checks ensure the proposal’s status in the Timelock is accurately reflected. Therefore, a proposal cannot be requeued once it has been canceled directly in the Timelock.

I hope this clarifies how the state and queue function in ENSGovernor operates and addresses the concerns raised.

Again, thank you for bringing this up, the more eyes we have on those contracts and proposals on the DAO, the better. I encourage you to take a deeper look at the contracts so we can find more nuances.

3 Likes