gateway-contracts/docs/getting-started/pausing/pausing.md
This section describes the pausing mechanism for the fhevm Gateway protocol.
It is meant to be used in case of emergency, to pause the protocol in order to prevent any new requests (input proof, decryptions) to be processed. The Gateway can only be paused and unpaused manually.
It is handled through the following contracts:
PauserSet: manages the pauser addresses (see PauserSet)Pausable (abstract): provides the pausing and unpausing functionalitiesA pauser is an account that can pause the following Gateway contracts:
DecryptionInputVerificationA paused contract means that any transaction sent to trigger its request functions will be reverted. This means responses for already-sent requests will still be accepted and on-going consensus can be reached. Additionally, other view functions will still be callable.
When paused, the following functions will be reverted:
publicDecryptionRequestuserDecryptionRequestdelegatedUserDecryptionRequestWhen paused, the following functions will be reverted:
verifyProofRequestIt is possible to pause and unpause the contracts through hardhat tasks defined in pauseContracts.ts.
Pausing tasks are:
pauseAllGatewayContracts: pause all the Gateway contractspauseInputVerification: pause the InputVerification contract onlypauseDecryption: pause the Decryption contract onlyThese tasks require the PAUSER_PRIVATE_KEY environment variable to be set locally. See Environment variables for more details.
Unpausing tasks are:
unpauseAllGatewayContracts: unpause all the Gateway contractsunpauseInputVerification: unpause the InputVerification contract onlyunpauseDecryption: unpause the Decryption contract onlyImportant: These tasks are only possible if the ownership of the GatewayConfig contract is handled by the deployer, which requires the DEPLOYER_PRIVATE_KEY environment variable to be set locally (see Environment variables). Once the GatewayConfig contract is owned by a multi-sig owner, these tasks will not be able to unpause the contracts. Instead, GatewayConfig contract will need to be unpaused by calling its unpause function through this multi-sig contract.