You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gateway-contracts/docs/getting-started/contracts/gateway_config.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Several settings are stored in the contract, which can be separated in several c
6
6
7
7
-[Protocol metadata](#protocol-metadata)
8
8
-[Operators](#operators)
9
-
-[Governance accounts](#governance-accounts)
9
+
-[Governance](#governance)
10
10
-[Host chains](#host-chains)
11
11
12
12
Except for host chains, they are all set when deploying the `GatewayConfig` contract. Once set, some (but not all) of them can be updated.
@@ -108,34 +108,31 @@ Additionally, the transaction sender address is used for identifying an operator
108
108
-`getKmsNode(address kmsTxSenderAddress)`: get a KMS node's metadata.
109
109
-`getCoprocessor(address coprocessorTxSenderAddress)`: get a coprocessor's metadata.
110
110
111
-
## Governance accounts
111
+
## Governance
112
112
113
-
The fhevm Gateway protocol is governed by two accounts:
113
+
The fhevm Gateway protocol is governed by the following roles:
114
114
115
115
-`owner`: account that can perform restricted actions
116
-
-`pauser`: account that can pause contract functions
116
+
-`pausers`: accounts that can pause contract functions
117
117
118
118
### Owner
119
119
120
120
The owner is first set as the account that deploys the contracts (the deployer). It is allowed to perform several restricted actions :
121
121
122
122
- upgrade the contracts
123
-
- update the [pauser](#pauser)
123
+
- update the pausers (see [Pausers](./pauser_set.md))
124
124
- add [host chains](#host-chains)
125
125
- trigger a KMS public material generation (see [KmsManagement](./kms_management.md#public-material-generation))
126
126
- update KMS-related parameters (see [KmsManagement](./kms_management.md#store-parameters))
127
127
128
128
The owner is handled by OpenZeppelin's `Ownable2StepUpgradeable` contract. In particular, this means that the deployer can transfer its ownership to another account in a two-step process.
129
129
130
-
### Pauser
130
+
### Pausers
131
131
132
-
**Important**: currently, the pauser is not used as the pausing mechanism is not implemented yet.
132
+
Details about pausers are available in the following documentation:
133
133
134
-
The pauser is an account that can pause contract functions. A paused function means that any transaction sent to trigger it will be reverted.
135
-
136
-
Nothing prevents the pauser from being the owner itself. However, in practice, it can be useful to use different accounts. For example, if they are both governed by multi-sig contracts, the pauser can be set to a lower threshold than the owner in order to pause the protocol quicker in case of emergency.
137
-
138
-
Currently, it is set at deployment and can be updated by the owner later on.
This section describes the `PauserSet` contract. It is used to manage the pausers, addresses that are allowed to pause some of the Gateway contracts.
4
+
5
+
## Pausers
6
+
7
+
Pausers are account addresses registered in the `PauserSet` contract. They are expected to be hot wallets controlled by the [operators](./gateway_config.md#operators) of the fhevm Gateway protocol.
8
+
9
+
They are allowed to pause some of the Gateway contracts. See [Pausing](../pausing/pausing.md) for more details.
10
+
11
+
## PauserSet
12
+
13
+
The `PauserSet` contract allows to:
14
+
15
+
- add a pauser: `addPauser`
16
+
- remove a pauser: `removePauser`
17
+
- swap a pauser with another address: `swapPauser`
18
+
- check if an address is a pauser: `isPauser`
19
+
20
+
It is deployed as an immutable contract and its address is stored in the `GatewayConfig` contract.
|`PROTOCOL_NAME`| Name of the protocol to display | string | - | - |
26
26
|`PROTOCOL_WEBSITE`| Website of the protocol to display | string | - | - |
27
-
|`PAUSER_ADDRESS`| Address of the pauser | address | - | - |
28
27
|`MPC_THRESHOLD`| MPC threshold (cryptographic parameter) | uint256 | - | Must be strictly less than the number of KMS nodes registered |
29
28
|`PUBLIC_DECRYPTION_THRESHOLD`| Public decryption threshold | uint256 | - | Must be non-null and less than or equal to the number of KMS nodes registered |
30
29
|`USER_DECRYPTION_THRESHOLD`| User decryption threshold | uint256 | - | Must be non-null and less than or equal to the number of KMS nodes registered |
@@ -42,6 +41,8 @@ Here's the complete list of environment variables used for deploying the FHEVM g
42
41
|`HOST_CHAIN_ACL_ADDRESS_{k}`| ACL address of the host chain `k`| address | - | If `k` >= `NUM_HOST_CHAINS`, the variable is ignored |
43
42
|`HOST_CHAIN_NAME_{k}`| Name of the host chain `k`| string | - | If `k` >= `NUM_HOST_CHAINS`, the variable is ignored |
44
43
|`HOST_CHAIN_WEBSITE_{k}`| Website of the host chain `k`| string | - | If `k` >= `NUM_HOST_CHAINS`, the variable is ignored |
44
+
|`NUM_PAUSERS`| Number of pausers to register | - | - | Must be at least the number of pausers registered below |
45
+
|`PAUSER_ADDRESS_{l}`| Address of the pauser `l`| address | - | If `l` >= `NUM_PAUSERS`, the variable is ignored |
45
46
|`FHE_PARAMS_NAME`| Name of the parameters to use for FHE keys | string | - | Not used yet |
46
47
|`FHE_PARAMS_DIGEST`| Digest of the parameters to use for FHE keys | bytes32 | - | Not used yet |
0 commit comments