Skip to content

Commit 5f84759

Browse files
authored
feat: multichain (#1494)
# v1.7.0 Multi Chain The multichain release enables AVSs to launch their services and make verified Operator outputs available on any EVM chain, meeting their customers where they are. AVSs can specify custom operator weights to be transported to any destination chain. The release has 3 components: 1. Core Contracts 2. AVS Contracts 3. Offchain Infrastructure The below release notes cover Core Contracts. For more information on the end to end protocol, see our [docs](../docs/multichain/README.md) and [ELIP-008](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-008.md). ## Release Manager @ypatil12 @eigenmikem ## Highlights This multichain release only introduces new standards and contracts. As a result, there are no breaking changes or deprecations. 🚀 New Features Source Chain Contracts - `KeyRegistrar`: Manages cryptographic keys for operators across different operator sets. It supports both ECDSA and BN254 key types and ensures global uniqueness of keys across all operator sets - `CrossChainRegistry`: Enables AVSs to register to have their operator stakes transported to supported destination chains - `ReleaseManager`: Provides a standardized way for AVSs to publish software artifacts (binaries, docker images, etc.) that operators in their operator sets should upgrade to by specified deadlines Destination Chain Contracts - `CertificateVerifier`: Proves the offchain execution of a task, via a Certificate, by the operators of an operatorSet. Two types of key material are supported: ECDSA and BN254 - `OperatorTableUpdater`: Updates operator tables in the `CertificateVerifier` to have tasks validated against up-to-date operator stake weights 🔧 Improvements – Enhancements to existing features. - The multichain protocol has protocol-ized several AVS-deployed contracts, enabling an simpler AVS developer experience. These include: - `KeyRegistrar`: Manages BLS and ECDSA signing keys. AVSs no longer have to deploy a `BLSAPKRegistry` - `CertificateVerifier`: Handles signature verification for BLS and ECDSA keys. AVSs no longer have to deploy a `BLSSignatureChecker` - Offchain Multichain Transport: AVSs no longer have to maintain [avs-sync](https://github.com/Layr-Labs/avs-sync) to keep operator stakes fresh ## Changelog - feat: multichain deploy scripts [PR #1487](#1487) - feat: operator table updater pauser [PR #1501](#1501) - feat: add `publishMetadataURI` [PR #1492](#1492) - refactor: `globalRootConfirmerSet` -> `generator` [PR #1500](#1500) - fix: circular dependency for initial global root update [PR #1499](#1499) - chore: remove stale bindings [PR #1498](#1498) - fix: zero length [PR #1490](#1490) - docs: multichain docs [PR #1488](#1488) - refactor: remove table calculators [PR #1493](#1493) - refactor: `KeyRegistry` unit testing [PR #1482](#1482) - feat: disable root [PR #1481](#1481) - refactor: `ECDSATableCalculator` testing [PR #1479](#1479) - refactor: operators can deregister keys if not slashable [PR #1480](#1480) - refactor: `ECDSACertificateVerifier` testing [PR #1478](#1478) - refactor: `Bn254CertificateVerifierUnitTests` [PR #1476](#1476) - feat: ecdsa table calculator [PR #1473](#1473) - feat: ecdsacv views [PR #1475](#1475) - refactor: `BN254OperatorTableCalculator` [PR #1463](#1463) - feat: add `referenceBlockNumber` [PR #1472](#1472) - feat: release manager [PR #1469](#1469) - feat: ecdsa cert verifier [PR #1470](#1470) - feat: add view function for `getGlobalConfirmerSetReferenceTimestamp` [PR #1471](#1471) - chore: add helper view function [PR #1465](#1465) - chore: add sig digest functions to interface [PR #1464](#1464) - refactor: `CrossChainRegistry` [PR #1457](#1457) - fix: global table update message hash [PR #1460](#1460) - refactor: sig verification into library [PR #1455](#1455) - fix: `OperatorTableUpdater` encoding [PR #1456](#1456) - chore: add latest `referenceTimestamp` to OTC interface [PR #1454](#1454) - chore: bindings [PR #1452](#1452) - feat: add operator table updater to CCR [PR #1451](#1451) - chore: multichain deploy scripts [PR #1449](#1449) - feat: cross chain registry [PR #1439](#1439) - chore: update BN254CertificateVerifier [PR #1447](#1447) - feat: bn254 operator table contracts [PR #1429](#1429) - feat: KeyRegistrar [PR #1421](#1421) - feat: operator table updater [PR #1436](#1436) - feat: bn254 certificate verifier [PR #1431](#1431) - chore: bindings + interface update [PR #1438](#1438) - chore: update multichain interfaces [PR #1433](#1433) - feat: multi chain interfaces [PR #1423](#1423) - docs: update version matrix [PR #1491](#1491) - chore: add multisend parser to scripts directory [PR #1486](#1486) - chore: update eigenpod and eigen impls addresses in holesky and hoodi [PR #1448](#1448)
2 parents 4a4082c + 592f311 commit 5f84759

File tree

119 files changed

+41337
-390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+41337
-390
lines changed

.github/workflows/foundry.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ jobs:
7272
esac
7373
env:
7474
FOUNDRY_PROFILE: ${{ matrix.suite == 'Fork' && 'forktest' || 'medium' }}
75-
RPC_MAINNET: https://billowing-capable-sound.quiknode.pro/
75+
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
76+
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
7677

7778
# -----------------------------------------------------------------------
7879
# Forge Storage Diff

.github/workflows/validate-deployment-scripts.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: true
2020
matrix:
21-
env: [preprod, testnet, mainnet, testnet-sepolia, testnet-hoodi]
21+
env: [preprod, testnet, mainnet, testnet-sepolia, testnet-hoodi, testnet-base-sepolia]
2222

2323
steps:
2424
# Check out repository with all submodules for complete codebase access.
@@ -67,7 +67,7 @@ jobs:
6767
- name: Validate Solidity Scripts
6868
run: |
6969
# Find all .sol files under /script/releases
70-
RELEASE_FILES=$(find script/releases -type f -name "*.sol" ! -name "Env.sol" 2>/dev/null || echo "")
70+
RELEASE_FILES=$(find script/releases -type f -name "*.sol" ! -name "Env.sol" ! -name "CrosschainDeployLib.sol" 2>/dev/null || echo "")
7171
7272
# Combine file lists
7373
FILES="$RELEASE_FILES"
@@ -88,6 +88,8 @@ jobs:
8888
RPC_URL="${{ secrets.RPC_SEPOLIA }}"
8989
elif [ "${{ matrix.env }}" = "testnet-hoodi" ]; then
9090
RPC_URL="${{ secrets.RPC_HOODI }}"
91+
elif [ "${{ matrix.env }}" = "testnet-base-sepolia" ]; then
92+
RPC_URL="${{ secrets.RPC_BASE_SEPOLIA }}"
9193
elif [ "${{ matrix.env }}" = "mainnet" ]; then
9294
RPC_URL="${{ secrets.RPC_MAINNET }}"
9395
fi

CHANGELOG/CHANGELOG-1.7.0.md

Lines changed: 64 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,82 @@
11
# v1.7.0 Multi Chain
22

3-
**Use this template to draft changelog and submit PR to review by the team**
3+
The multichain release enables AVSs to launch their services and make verified Operator outputs available on any EVM chain, meeting their customers where they are. AVSs can specify custom operator weights to be transported to any destination chain. The release has 3 components:
44

5+
1. Core Contracts
6+
2. AVS Contracts
7+
3. Offchain Infrastructure
58

6-
## Release Manager
9+
The below release notes cover Core Contracts. For more information on the end to end protocol, see our [docs](../docs/multichain/README.md) and [ELIP-008](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-008.md).
710

8-
@ypatil12
11+
## Release Manager
912

13+
@ypatil12 @eigenmikem
1014

1115
## Highlights
1216

13-
🚀 New Features – Highlight major new functionality
14-
- ...
15-
- ...
17+
This multichain release only introduces new standards and contracts. As a result, there are no breaking changes or deprecations.
1618

17-
⛔ Breaking Changes – Call out backward-incompatible changes.
18-
- ...
19-
- ...
19+
🚀 New Features – Highlight major new functionality
2020

21-
📌 Deprecations – Mention features that are being phased out.
22-
- ...
23-
- ...
21+
Source-Chain Contracts
22+
- `KeyRegistrar`: Manages cryptographic keys for operators across different operator sets. It supports both ECDSA and BN254 key types and ensures global uniqueness of keys across all operator sets
23+
- `CrossChainRegistry`: Enables AVSs to register to have their operator stakes transported to supported destination chains
24+
- `ReleaseManager`: Provides a standardized way for AVSs to publish software artifacts (binaries, docker images, etc.) that operators in their operator sets should upgrade to by specified deadlines
2425

25-
🛠️ Security Fixes – Specify patched vulnerabilities.
26-
- ...
27-
- ...
26+
Destination Chain Contracts
27+
- `CertificateVerifier`: Proves the offchain execution of a task, via a Certificate, by the operators of an operatorSet. Two types of key material are supported: ECDSA and BN254
28+
- `OperatorTableUpdater`: Updates operator tables in the `CertificateVerifier` to have tasks validated against up-to-date operator stake weights
2829

2930
🔧 Improvements – Enhancements to existing features.
30-
- ...
31-
- ...
32-
33-
🐛 Bug Fixes – List resolved issues.
34-
- ...
35-
- ...
3631

32+
- The multichain protocol has protocol-ized several AVS-deployed contracts, enabling an simpler AVS developer experience. These include:
33+
- `KeyRegistrar`: Manages BLS and ECDSA signing keys. AVSs no longer have to deploy a `BLSAPKRegistry`
34+
- `CertificateVerifier`: Handles signature verification for BLS and ECDSA keys. AVSs no longer have to deploy a `BLSSignatureChecker`
35+
- Offchain Multichain Transport: AVSs no longer have to maintain [avs-sync](https://github.com/Layr-Labs/avs-sync) to keep operator stakes fresh
3736

3837
## Changelog
3938

40-
Copy the one that's auto generated from github by default to here, and submit PR for review
41-
42-
43-
- merged PRs in diff from last release
44-
- contributors
45-
- etc
39+
- feat: multichain deploy scripts [PR #1487](https://github.com/layr-labs/eigenlayer-contracts/pull/1487)
40+
- feat: operator table updater pauser [PR #1501](https://github.com/layr-labs/eigenlayer-contracts/pull/1501)
41+
- feat: add `publishMetadataURI` [PR #1492](https://github.com/layr-labs/eigenlayer-contracts/pull/1492)
42+
- refactor: `globalRootConfirmerSet` -> `generator` [PR #1500](https://github.com/layr-labs/eigenlayer-contracts/pull/1500)
43+
- fix: circular dependency for initial global root update [PR #1499](https://github.com/layr-labs/eigenlayer-contracts/pull/1499)
44+
- chore: remove stale bindings [PR #1498](https://github.com/layr-labs/eigenlayer-contracts/pull/1498)
45+
- fix: zero length [PR #1490](https://github.com/layr-labs/eigenlayer-contracts/pull/1490)
46+
- docs: multichain docs [PR #1488](https://github.com/layr-labs/eigenlayer-contracts/pull/1488)
47+
- refactor: remove table calculators [PR #1493](https://github.com/layr-labs/eigenlayer-contracts/pull/1493)
48+
- refactor: `KeyRegistry` unit testing [PR #1482](https://github.com/layr-labs/eigenlayer-contracts/pull/1482)
49+
- feat: disable root [PR #1481](https://github.com/layr-labs/eigenlayer-contracts/pull/1481)
50+
- refactor: `ECDSATableCalculator` testing [PR #1479](https://github.com/layr-labs/eigenlayer-contracts/pull/1479)
51+
- refactor: operators can deregister keys if not slashable [PR #1480](https://github.com/layr-labs/eigenlayer-contracts/pull/1480)
52+
- refactor: `ECDSACertificateVerifier` testing [PR #1478](https://github.com/layr-labs/eigenlayer-contracts/pull/1478)
53+
- refactor: `Bn254CertificateVerifierUnitTests` [PR #1476](https://github.com/layr-labs/eigenlayer-contracts/pull/1476)
54+
- feat: ecdsa table calculator [PR #1473](https://github.com/layr-labs/eigenlayer-contracts/pull/1473)
55+
- feat: ecdsacv views [PR #1475](https://github.com/layr-labs/eigenlayer-contracts/pull/1475)
56+
- refactor: `BN254OperatorTableCalculator` [PR #1463](https://github.com/layr-labs/eigenlayer-contracts/pull/1463)
57+
- feat: add `referenceBlockNumber` [PR #1472](https://github.com/layr-labs/eigenlayer-contracts/pull/1472)
58+
- feat: release manager [PR #1469](https://github.com/layr-labs/eigenlayer-contracts/pull/1469)
59+
- feat: ecdsa cert verifier [PR #1470](https://github.com/layr-labs/eigenlayer-contracts/pull/1470)
60+
- feat: add view function for `getGlobalConfirmerSetReferenceTimestamp` [PR #1471](https://github.com/layr-labs/eigenlayer-contracts/pull/1471)
61+
- chore: add helper view function [PR #1465](https://github.com/layr-labs/eigenlayer-contracts/pull/1465)
62+
- chore: add sig digest functions to interface [PR #1464](https://github.com/layr-labs/eigenlayer-contracts/pull/1464)
63+
- refactor: `CrossChainRegistry` [PR #1457](https://github.com/layr-labs/eigenlayer-contracts/pull/1457)
64+
- fix: global table update message hash [PR #1460](https://github.com/layr-labs/eigenlayer-contracts/pull/1460)
65+
- refactor: sig verification into library [PR #1455](https://github.com/layr-labs/eigenlayer-contracts/pull/1455)
66+
- fix: `OperatorTableUpdater` encoding [PR #1456](https://github.com/layr-labs/eigenlayer-contracts/pull/1456)
67+
- chore: add latest `referenceTimestamp` to OTC interface [PR #1454](https://github.com/layr-labs/eigenlayer-contracts/pull/1454)
68+
- chore: bindings [PR #1452](https://github.com/layr-labs/eigenlayer-contracts/pull/1452)
69+
- feat: add operator table updater to CCR [PR #1451](https://github.com/layr-labs/eigenlayer-contracts/pull/1451)
70+
- chore: multichain deploy scripts [PR #1449](https://github.com/layr-labs/eigenlayer-contracts/pull/1449)
71+
- feat: cross chain registry [PR #1439](https://github.com/layr-labs/eigenlayer-contracts/pull/1439)
72+
- chore: update BN254CertificateVerifier [PR #1447](https://github.com/layr-labs/eigenlayer-contracts/pull/1447)
73+
- feat: bn254 operator table contracts [PR #1429](https://github.com/layr-labs/eigenlayer-contracts/pull/1429)
74+
- feat: KeyRegistrar [PR #1421](https://github.com/layr-labs/eigenlayer-contracts/pull/1421)
75+
- feat: operator table updater [PR #1436](https://github.com/layr-labs/eigenlayer-contracts/pull/1436)
76+
- feat: bn254 certificate verifier [PR #1431](https://github.com/layr-labs/eigenlayer-contracts/pull/1431)
77+
- chore: bindings + interface update [PR #1438](https://github.com/layr-labs/eigenlayer-contracts/pull/1438)
78+
- chore: update multichain interfaces [PR #1433](https://github.com/layr-labs/eigenlayer-contracts/pull/1433)
79+
- feat: multi chain interfaces [PR #1423](https://github.com/layr-labs/eigenlayer-contracts/pull/1423)
80+
- docs: update version matrix [PR #1491](https://github.com/layr-labs/eigenlayer-contracts/pull/1491)
81+
- chore: add multisend parser to scripts directory [PR #1486](https://github.com/layr-labs/eigenlayer-contracts/pull/1486)
82+
- chore: update eigenpod and eigen impls addresses in holesky and hoodi [PR #1448](https://github.com/layr-labs/eigenlayer-contracts/pull/1448)

docs/core/ReleaseManager.md

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
# ReleaseManager
2+
3+
| File | Notes |
4+
| -------- | -------- |
5+
| [`ReleaseManager.sol`](../../src/contracts/core/ReleaseManager.sol) | |
6+
| [`ReleaseManagerStorage.sol`](../../src/contracts/core/ReleaseManagerStorage.sol) | state variables |
7+
| [`IReleaseManager.sol`](../../src/contracts/interfaces/IReleaseManager.sol) | interface |
8+
9+
Libraries and Mixins:
10+
11+
| File | Notes |
12+
| -------- | -------- |
13+
| [`PermissionControllerMixin.sol`](../../src/contracts/mixins/PermissionControllerMixin.sol) | account delegation |
14+
| [`SemVerMixin.sol`](../../src/contracts/mixins/SemVerMixin.sol) | semantic versioning |
15+
| [`OperatorSetLib.sol`](../../src/contracts/libraries/OperatorSetLib.sol) | encode/decode operator sets |
16+
17+
## Overview
18+
19+
The `ReleaseManager` manages software releases for AVS operator sets. It provides a standardized way for AVSs to publish software artifacts (binaries, docker images, etc.) that operators in their operator sets should upgrade to by specified deadlines. This ensures operators run compatible and up-to-date software versions required by the AVS.
20+
21+
The `ReleaseManager's` responsibilities include:
22+
23+
* **Release Publishing**: AVSs can publish new releases containing one or more software artifacts for their operator sets.
24+
* **Upgrade Deadlines**: Each release specifies a deadline by which operators must upgrade.
25+
* **Release Tracking**: Maintains a history of all releases for each operator set.
26+
* **Release Queries**: Provides view functions to query release information.
27+
28+
An AVS in the context of `ReleaseManager` is defined as the `address` of the contract that implements the AVS logic. For `PermissionController` purposes, this AVS address is also the AVS [account](https://github.com/Layr-Labs/eigenlayer-contracts/blob/dev/docs/permissions/PermissionController.md#accounts).
29+
30+
### Important Notes on Release Management
31+
32+
* **Latest Release Validity**: Only the latest release for an operator set is considered valid. Previous releases become obsolete as soon as a new release is published.
33+
* **Upgrade Deadlines**: The `upgradeByTime` timestamp (in Unix time) is a suggested deadline and is not enforced on-chain or off-chain. It serves as a communication mechanism for AVSs to indicate when operators should complete their upgrades.
34+
* **Multiple Releases in Same Block**: If multiple releases are published in the same block with the same `upgradeByTime`, the last transaction processed in that block will determine the latest valid release.
35+
36+
---
37+
38+
## Releases
39+
40+
A release represents a collection of software artifacts that operators in an operator set must run. Each release is associated with a specific operator set and contains:
41+
42+
* **Artifacts**: An array of software artifacts, each with a digest (hash) and registry URL
43+
* **Upgrade By Time**: A Unix timestamp by which operators should complete the upgrade
44+
45+
The release structure is defined as:
46+
47+
```solidity
48+
/**
49+
* @notice Represents a software artifact with its digest and registry URL.
50+
* @param digest The hash digest of the artifact.
51+
* @param registryUrl The URL where the artifact can be found.
52+
*/
53+
struct Artifact {
54+
bytes32 digest;
55+
string registryUrl;
56+
}
57+
58+
/**
59+
* @notice Represents a release containing multiple artifacts and an upgrade deadline.
60+
* @param artifacts Array of artifacts included in this release.
61+
* @param upgradeByTime Timestamp by which operators must upgrade to this release.
62+
*/
63+
struct Release {
64+
Artifact[] artifacts;
65+
uint32 upgradeByTime;
66+
}
67+
```
68+
69+
**State Management:**
70+
71+
```solidity
72+
/// @dev Mapping from operator set key to array of releases for that operator set
73+
mapping(bytes32 operatorSetKey => Release[]) internal _operatorSetReleases;
74+
```
75+
76+
**Methods:**
77+
* [`publishRelease`](#publishrelease)
78+
* [`getTotalReleases`](#gettotalreleases)
79+
* [`getRelease`](#getrelease)
80+
* [`getLatestRelease`](#getlatestrelease)
81+
* [`getLatestUpgradeByTime`](#getlatestupgradebytime)
82+
* [`isValidRelease`](#isValidRelease)
83+
84+
---
85+
86+
### Write Functions
87+
88+
#### `publishRelease`
89+
90+
```solidity
91+
/**
92+
* @notice Publishes a new release for an operator set.
93+
* @param operatorSet The operator set this release is for.
94+
* @param release The release that was published.
95+
* @return releaseId The index of the newly published release.
96+
*/
97+
function publishRelease(
98+
OperatorSet calldata operatorSet,
99+
Release calldata release
100+
)
101+
external
102+
checkCanCall(operatorSet.avs)
103+
returns (uint256 releaseId)
104+
```
105+
106+
_Note: this method can be called directly by an AVS, or by a caller authorized by the AVS. See [`PermissionController.md`](../permissions/PermissionController.md) for details._
107+
108+
AVSs use this method to publish new software releases for their operator sets. Each release contains one or more artifacts that represent the software components operators must run (e.g., validator clients, network monitors, etc.). The AVS specifies a deadline (`upgradeByTime`) by which all operators in the operator set must upgrade to the new release.
109+
110+
The `releaseId` returned is the zero-based index of the release in the operator set's release array. This ID can be used to query the release later using [`getRelease`](#getrelease).
111+
112+
*Effects*:
113+
* Appends the release to `_operatorSetReleases[operatorSet.key()]`
114+
* The new release is assigned a `releaseId` equal to the previous array length
115+
* All artifact information (digest and registryUrl) is copied to storage
116+
* Emits a `ReleasePublished` event with the operator set, release ID, and release details
117+
118+
*Requirements*:
119+
* Caller MUST be authorized, either as the AVS itself or an admin/appointee (see [`PermissionController.md`](../permissions/PermissionController.md))
120+
* `release.upgradeByTime` MUST be greater than or equal to the current block timestamp
121+
---
122+
123+
### View Functions
124+
125+
#### `getTotalReleases`
126+
127+
```solidity
128+
/**
129+
* @notice Returns the total number of releases for an operator set.
130+
* @param operatorSet The operator set to query.
131+
* @return The number of releases.
132+
*/
133+
function getTotalReleases(
134+
OperatorSet memory operatorSet
135+
)
136+
public
137+
view
138+
returns (uint256)
139+
```
140+
141+
Returns the total number of releases that have been published for the specified operator set. This can be used to iterate through all releases or to determine if any releases exist.
142+
143+
*Returns*:
144+
* The length of the releases array for the given operator set
145+
* Returns 0 if no releases have been published
146+
147+
#### `getRelease`
148+
149+
```solidity
150+
/**
151+
* @notice Returns a specific release by index.
152+
* @param operatorSet The operator set to query.
153+
* @param releaseId The id of the release to get.
154+
* @return The release at the specified index.
155+
*/
156+
function getRelease(
157+
OperatorSet memory operatorSet,
158+
uint256 releaseId
159+
)
160+
external
161+
view
162+
returns (Release memory)
163+
```
164+
165+
Retrieves a specific release by its ID for a given operator set. The `releaseId` is the zero-based index of the release in the operator set's release history.
166+
167+
*Returns*:
168+
* The complete `Release` struct including all artifacts and the upgrade deadline
169+
* Reverts if `releaseId` is out of bounds
170+
171+
#### `getLatestRelease`
172+
173+
```solidity
174+
/**
175+
* @notice Returns the latest release for an operator set.
176+
* @param operatorSet The operator set to query.
177+
* @return The id of the latest release.
178+
* @return The latest release.
179+
*/
180+
function getLatestRelease(
181+
OperatorSet memory operatorSet
182+
)
183+
public
184+
view
185+
returns (uint256, Release memory)
186+
```
187+
188+
Retrieves the most recently published release for an operator set. This is typically the release that operators should be running or upgrading to.
189+
190+
*Returns*:
191+
* The latest `Release` struct from the operator set's release array
192+
* Reverts if no releases have been published for the operator set
193+
194+
#### `getLatestUpgradeByTime`
195+
196+
```solidity
197+
/**
198+
* @notice Returns the upgrade by time for the latest release.
199+
* @param operatorSet The operator set to query.
200+
* @return The upgrade by time for the latest release.
201+
*/
202+
function getLatestUpgradeByTime(
203+
OperatorSet memory operatorSet
204+
)
205+
external
206+
view
207+
returns (uint256)
208+
```
209+
210+
A convenience function that returns just the upgrade deadline from the latest release. This can be useful for quickly checking when operators must complete their upgrades.
211+
212+
*Returns*:
213+
* The `upgradeByTime` timestamp from the latest release
214+
* Reverts if no releases have been published for the operator set
215+
216+
#### `isValidRelease`
217+
218+
```solidity
219+
/**
220+
* @notice Returns true if the release is the latest release, false otherwise.
221+
* @param operatorSet The operator set to query.
222+
* @param releaseId The id of the release to check.
223+
* @return True if the release is the latest release, false otherwise.
224+
*/
225+
function isValidRelease(
226+
OperatorSet memory operatorSet,
227+
uint256 releaseId
228+
)
229+
external
230+
view
231+
returns (bool)
232+
```
233+
234+
Checks whether a given release ID corresponds to the latest release for an operator set. This can be useful for operators to verify they are running the most current software version.
235+
236+
**Note**: Only the latest release is considered valid. All previous releases are considered obsolete and should not be used by operators.
237+
238+
*Returns*:
239+
* `true` if the `releaseId` matches the latest release index
240+
* `false` if the `releaseId` refers to an older release
241+
* Reverts if the operator set has no releases
242+
243+
---
47.6 KB
Loading

0 commit comments

Comments
 (0)