Skip to content

Commit 3f6fd49

Browse files
committed
refactor: globalRootConfirmerSet -> generator (#1500)
**Motivation:** For documentation, using `globalRootConfirmerSet` and `generator` is unclear. **Modifications:** Using `generator` everywhere, including code **Result:** Clearer code
1 parent cb7bb1a commit 3f6fd49

File tree

11 files changed

+494
-497
lines changed

11 files changed

+494
-497
lines changed

docs/multichain/destination/OperatorTableUpdater.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,29 @@ Libraries and Mixins:
1414

1515
## Overview
1616

17-
The `OperatorTableUpdater` is responsible for updating the `GlobalTableRoot` and updating operator tables from merkle proofs against the `GlobalTableRoot`. The contract is deployed on every destination chain. The contract maintains a set of valid global table roots that are confirmed by a designated global root confirmer set, and allows updating individual operator tables by providing merkle proofs against these roots.
17+
The `OperatorTableUpdater` is responsible for updating the `GlobalTableRoot` and updating operator tables from merkle proofs against the `GlobalTableRoot`. The contract is deployed on every destination chain. The contract maintains a set of valid global table roots that are confirmed by a designated generator, and allows updating individual operator tables by providing merkle proofs against these roots.
1818

1919
The contract supports both BN254 and ECDSA operator tables and routes updates to the appropriate certificate verifier based on the curve type.
2020

2121
## Parameterization
22-
Upon initialization, the `globalRootConfirmerSet` (ie. `Generator`) is updated. This operatorSet is a *"shadow-operatorSet"*. It does not exist in the core protocol, does not have stake backing it, and is not transported to other chains via the multichain protocol. It can only be updated upon initialization or by a [privileged role](#updateglobalrootconfirmerset). This entity is the same across all destination chains.
22+
Upon initialization, the `generator` is updated. The `generator` is represented in storage as an operatorSet. The `generator` should be considered a ghost-operatorSet` since it does not exist in the core protocol, does not have stake backing it, and is not transported to other chains via the multichain protocol. It can only be updated upon initialization or by a [privileged role](#updategenerator). This entity is the same across all destination chains.
2323

24-
* `GlobalRootConfirmerSet`, also known as the `Generator`, is an EigenLabs-run entity that signs off on `GlobalTableRoots`. The operatorSet is of size 1.
25-
* `maxStalenessPeriod`: 0. Set to zero to confirm roots without updating the `globalConfirmerOperatorSet`. See [`CertificateVerifier`](./CertificateVerifier.md#overview) for specifics
26-
* `globalRootConfirmationThreshold`: 10000. The threshold in basis points required for global root confirmation. Since the operatorSet is of size 1 a single signature is needed
27-
* `referenceTimestamp`: A past timestamp at which the `globalRootConfirmerSet` is generated. This value is set to the initial `latestReferenceTimestamp` in the `OperatorTableUpdater. It is the same across all destination chains, even for destination chains that are supported after the initial deployment
24+
The following values are set upon initialization:
25+
26+
* `generator` is an EigenLabs-run entity that signs off on `globalTableRoots`. The operatorSet is of size 1.
27+
* `globalRootConfirmationThreshold`: 10000. The threshold in basis points required for global root confirmation. Since the operatorSet is of size 1 a single signature is needed.
28+
* `referenceTimestamp`: A past timestamp at which the `generator` is set. We hardcode this value to 1 upon initialization. This value is also the `latestReferenceTimestamp`. Once roots are updated, the `latestReferenceTimestamp` will increase. *Note: the reference timestamp for the `generator`, given by `operatorTableUpdater.getGeneratorReferenceTimestamp` will remain 1 unless [`updateGenerator`](#updategenerator) is called*.
29+
* `generatorInfo`: The key material needed to verify certificates of the `generator`
30+
* `operatorSetConfig`: A configuration for the `generator`
31+
* `maxStalenessPeriod`: 0. Set to zero to confirm `globalTableRoots` without updating the `generator` operatorSet. See [`CertificateVerifier`](./CertificateVerifier.md#overview) for specifics`OperatorTableUpdater`. It is the same across all destination chains, even for destination chains that are supported after the initial deployment.
32+
* `owner`: Unused parameter for `Generator`
2833

2934

3035
---
3136

3237
## Global Root Confirmation
3338

34-
Global table roots must be confirmed by the `globalRootConfirmerSet` (ie. `Generator`) before operator tables can be updated against them.
39+
Global table roots must be confirmed by the `generator` before operator tables can be updated against them.
3540

3641
### `confirmGlobalTableRoot`
3742

@@ -42,7 +47,7 @@ Global table roots must be confirmed by the `globalRootConfirmerSet` (ie. `Gener
4247
* @param globalTableRoot merkle root of all operatorSet tables
4348
* @param referenceTimestamp timestamp of the root
4449
* @param referenceBlockNumber block number of the root
45-
* @dev Any entity can submit with a valid certificate signed off by the `globalRootConfirmerSet`
50+
* @dev Any entity can submit with a valid certificate signed off by the `generator`
4651
* @dev The `msgHash` in the `globalOperatorTableRootCert` is the hash of the `globalOperatorTableRoot`
4752
*/
4853
function confirmGlobalTableRoot(
@@ -53,7 +58,7 @@ function confirmGlobalTableRoot(
5358
) external;
5459
```
5560

56-
Confirms a new global table root by verifying a BN254 certificate signed by the `globalRootConfirmerSet`. See [`BN254CertificateVerifier`](./CertificateVerifier.md#bn254certificateverifier) for certificate verification. Roots are append only and cannot be overridden, only [disabled](#disableroot).
61+
Confirms a new global table root by verifying a BN254 certificate signed by the `generator`. See [`BN254CertificateVerifier`](./CertificateVerifier.md#bn254certificateverifier) for certificate verification. Roots are append only and cannot be overridden, only [disabled](#disableroot).
5762

5863
*Effects*:
5964
* Updates `_latestReferenceTimestamp` to the new `referenceTimestamp`
@@ -115,9 +120,9 @@ Updates an operator table by verifying its inclusion in a confirmed global table
115120

116121
## System Configuration
117122

118-
The `owner` can configure the `globalRootConfirmerSet` and confirmation parameters.
123+
The `owner` can configure the `generator` and confirmation parameters.
119124

120-
### `setGlobalRootConfirmerSet`
125+
### `setGenerator`
121126

122127
```solidity
123128
/**
@@ -126,16 +131,16 @@ The `owner` can configure the `globalRootConfirmerSet` and confirmation paramete
126131
* @dev The `operatorSet` is used to verify the certificate of the global table root
127132
* @dev Only callable by the owner of the contract
128133
*/
129-
function setGlobalRootConfirmerSet(
134+
function setGenerator(
130135
OperatorSet calldata operatorSet
131136
) external;
132137
```
133138

134139
Updates the operator set responsible for confirming global table roots.
135140

136141
*Effects*:
137-
* Updates `_globalRootConfirmerSet` to the new `operatorSet`
138-
* Emits a `GlobalRootConfirmerSetUpdated` event
142+
* Updates `_generator` to the new `operatorSet`
143+
* Emits a `GeneratorUpdated` event
139144

140145
*Requirements*:
141146
* Caller MUST be the `owner`
@@ -186,29 +191,29 @@ Disables a global table root, preventing further operator table updates against
186191
* Caller MUST be the `owner`
187192
* The `globalTableRoot` MUST exist and be currently valid
188193

189-
### `updateGlobalRootConfirmerSet`
194+
### `updateGenerator`
190195

191196
```solidity
192197
/**
193-
* @notice Updates the operator table for the global root confirmer set
198+
* @notice Updates the operator table for the generator
194199
* @param referenceTimestamp The reference timestamp of the operator table update
195-
* @param globalRootConfirmerSetInfo The operatorSetInfo for the global root confirmer set
196-
* @param globalRootConfirmerSetConfig The operatorSetConfig for the global root confirmer set
200+
* @param generatorInfo The operatorSetInfo for the generator
201+
* @param generatorConfig The operatorSetConfig for the generator
197202
* @dev We have a separate function for updating this operatorSet since it's not transported and updated
198203
* in the same way as the other operatorSets
199204
* @dev Only callable by the owner of the contract
200205
*/
201-
function updateGlobalRootConfirmerSet(
206+
function updateGenerator(
202207
uint32 referenceTimestamp,
203-
BN254OperatorSetInfo calldata globalRootConfirmerSetInfo,
204-
OperatorSetConfig calldata globalRootConfirmerSetConfig
208+
BN254OperatorSetInfo calldata generatorInfo,
209+
OperatorSetConfig calldata generatorConfig
205210
) external;
206211
```
207212

208-
Updates the operator table for the `globalRootConfirmerSet` itself. This operatorSet is a ["shadow-operatorSet"](#parameterization), so it must be updated manually
213+
Updates the operator table for the `generator` itself. This operatorSet is a ["shadow-operatorSet"](#parameterization), so it must be updated manually
209214

210215
*Effects*:
211-
* Calls `bn254CertificateVerifier.updateOperatorTable` for the `globalRootConfirmerSet`
216+
* Calls `bn254CertificateVerifier.updateOperatorTable` for the `generator`
212217

213218
*Requirements*:
214219
* Caller MUST be the `owner`

pkg/bindings/BN254CertificateVerifier/binding.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/ECDSACertificateVerifier/binding.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/bindings/IOperatorTableUpdater/binding.go

Lines changed: 118 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)