-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contract pausing #164
Contract pausing #164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, but in general looks good! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of having standalone smart contract as a pauser ?
We could have multisig as a Pauser (since multisig needs to set pauser anyways and only owner = multisig of pauser can actually pause the smart contract). If multisig would be the pauser, we could simplify the design quite a bit since pausing would be allowed only to owner of the smart contracts which is already a multisig.
You're right, now that I think about it, I don't think it's necessary and could be simplified to put all the functionality in the MultiSig. I think this architecture was necessary when I had some different ideas about how to disable the MultiSig executing proposals and unpausing before, but shouldn't be necessary anymore. I guess the one argument for keeping the separate contract would be for better modularity (e.g. if in the future we'd want to swap out our custom MultiSig for something like a Gnosis Safe). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💚 Looks cleaner now without the Pauser
contract!
Description
Adds a mechanism for pausing the protocol to prevent/mitigate damages in case of an exploit.
The basic design is as follows:
pauser
is the address that is permissioned to pause/unpause the contract.paused
is a boolean indicating whether or not the contract is paused.onlyWhenNotPaused
modifier.pauser
address in Pausable contracts. It can only be called by the MultiSig.pauseContracts
andunpauseContracts
, which pause/unpause a list of contracts.pauseContracts
can be called by any MultiSig signer to immediately pause the chosen contracts.unpauseContracts
can be called by Governance (via referendum or hotfix) to immediately unpause chosen contracts.TODO: add pausing to other protocol contracts.TODO: add pausing-related events.Tested
Unit tests.
Other changes
Set unlimited timeout for GroupHealth tests, as they started timing out in GitHub Actions.
Cleaned up some tests to use the named
owner
account and to explicitly specify the caller with.connect()
.Vote needed some extra cleanup, as it used the production
"core"
fixture, differently than other contract unit tests. Updated to use a new test deployment.Related issues