-
Notifications
You must be signed in to change notification settings - Fork 453
feat: multichain #1494
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
Merged
Merged
feat: multichain #1494
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Motivation:** Add all multi chain interfaces for easier development. **Modifications:** Adds the following: - `IBN254CertificateVerifier` (implements `IBaseCertificateVerifier`) - `IECDSACertificateVerifier` (implements `IBaseCertificateVerifier`) - `IBN254TableCalculator` - `IECDSATableCalculator` - `IOperatorTableUpdater` - `ICrossChainRegistry` **Result:** Multichain interfaces. Pending adding of `OperatorTableCalculator`
**Motivation:** Small typos in multi chain interfaces. Also, we use absolute imports, which can cause integration difficulties. **Modifications:** Fix typos. Use relative imports. **Result:** Cleaner interfaces.
**Motivation:** We want bindings to get started on offchain. Also need to add `IOperatorTableCalculator` and update `ICrossChainRegistry` interface. **Modifications:** - Bindings - Add `IOperatorTableCalculator` - Add `ICrossChainRegistry` **Result:** POC ready
**Motivation:** A BN254 certificate verifier is needed for multichain functionality **Modifications:** New core contract: `BN254CertificateVerifier`. It stores operatorTables and verifies certificates against them. **Result:** Core part of multichain release
**Motivation:** We need an operator table updater contract that will update all operator tables. **Modifications:** Create an `OperatoTableUpdater` contract. This contract serves two purposes: 1. Updates the `globalTableRoot` with a valid certificate from the `globalRootConfirmerSet` 2. Updates operator tables for ECDSA and BN254 Update all interfaces to be `>=0.5.0`. Security Assumptions: 1. The `globalTableRoot` cannot overwrite _past_ timestamps. In addition, it cannot be set for future timestamps 2. `updateOperatorTable` can only be called for referenceTimestamps after the opSet's stored `latestReferenceTimestamp` **Result:** Almost complete multi chain setup --------- Co-authored-by: Michael <[email protected]>
**Motivation:** Operator key management should be brought into core and out of middleware. **Modifications:** New core contract, `KeyRegistrar`, that manages operator keys and supports ECDSA and BN254 signatures. **Result:** Simpler for both AVSs and operators. --------- Co-authored-by: Yash Patil <[email protected]>
**Motivation:** Implementing the `BN254TableCalculator contracts`. Currently the calculator weights slashable stake in an operator set by simply adding all the slashable stake together with no multipliers/linear combination calculation involved **Modifications:** Updates and added to interfaces **Result:** Bn254 Table Calc --------- Co-authored-by: Yash Patil <[email protected]>
**Motivation:** Minor updates for `BN254CertificateVerifier` **Modifications:** - Update interface - Use types for `OperatorTableUpdater` - Remove ownable **Result:** Minor Updates
**Motivation:** CrossChainRegistry contract as defined in the following TDDs: 1. https://www.notion.so/eigen-labs/TDD-Stake-Table-Generation-19d13c11c3e0804f9c44cb5a5477fe8c#1f813c11c3e080f7bd1ede3b7cc21661 2. https://www.notion.so/eigen-labs/TDD-Operator-Table-Transport-1f213c11c3e080c29ea5cef3ba953809 **Modifications:** * `ICrossChainRegistry.sol` * `CrossChainRegistry.sol` * `CrossChainRegistryStorage.sol` **Result:** CrossChainRegistry
**Motivation:** We want scripts to deploy multichain. **Modifications:** Added 3 scripts: 1. Deploy Core 2. Deploy Multichain (verifier, table updater) 3. Deploy globalConfirmerOperatorSet **Result:** Complete deploy scripts
**Motivation:** The offchain generation service should be able to retrieve the `OperatorTableUpdater` on-chain. **Modifications:** - Update `_whitelistedChainIDs` to be an enumerable map from `chainID` to `operatorTableUpdater` - Update `addChainIDsToWhitelist` to take in a list of `operatorTableUpdaters` - Update `getSupportedChains` to return chainIDs and `operatorTableUpdaters` **Result:** Clearer introspection.
**Motivation:** Update bindings for multichain. **Modifications:** Run `make bindings` **Result:** Up to date bindings
**Motivation:** We want to add `latestReferenceTimestamp` to the interface. **Modifications:** - Add `getLatestReferenceTimestamp` to OTC interface - On initialization, update the `latestReferenceTimestamp` so that the first global table root update can use the already set reference timestamp - Make bindings **Result:** Easier offchain integration
**Motivation:** The encoding in the `OperatorTableUpdater` was incorrect, as it expected the `OperatorTableInfo` was in decoded format, but it is first in bytes then needs to be decoded to `BN254OperatorSetInfo` or `ECDSAOperatorSetInfo[]` **Modifications:** Update the `OperatorTableUpdater` to decode the table to bytes first, then decode to `BN254OperatorSetInfo` or `ECDSAOperatorSetInfo[]` based on the `KeyType`. **Result:** Correct decoding/encoding
**Motivation:** *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* **Modifications:** *Describe the modifications you've done.* **Result:** *After your change, what will change.*
**Motivation:**
The `messageHash` in the certificate for
`operatorTableUpdater.updateGlobalTableRoot` should be a properly
formatted type hash that takes into account the `referenceTimestamp` and
`globalTableRoot`, so neither can be spoofed.
**Modifications:**
Checks that
```solidity
require(
globalTableRootCert.messageHash == getGlobalTableUpdateMessageHash(globalTableRoot, referenceTimestamp),
InvalidMessageHash()
);
```
**Result:**
Correct Code
**Motivation:** Clean up readability of CrossChainRegistry **Modifications:** - Add `hasActiveGenerationReservation` modifier - Remove the `isDelete` parameter from setter functions - Simplify `removeGenerationReservation` **Result:** Cleaner + More Auditable Code
**Motivation:** `getBN254KeyRegistrationMessageHash` and `getEDSAKeyRegistrationMessageHash` are not in the `IKeyRegistrar` interface. **Modifications:** - Add functions to interface - Use functions internally **Result:** Cleaner code
**Motivation:** Offchain services need a way to encode `keyData` **Modifications:** Create a view function `encodeBN254KeyData` **Result:** Easier integration
…#1471) **Motivation:** The `globalRootConfirmerSet` has its table only updated upon initialization. We should have a view function in `operatorTableUpdater` **Modifications:** Add `getGlobalConfirmerSetReferenceTimestamp`. **Result:** Cleaner introspection
**Motivation:** Singleton Certificate Verifier is needed for ECDSA signatures. **Modifications:** New core multichain contract, `ECDSACertificateVerifier`. **Result:** Certificate Verifiers for initial release complete.
**Motivation:** We want to enable AVSs to publish release metadata on-chain, giving operators a reliable and verifiable source of truth. **Modifications:** * Added a new core contract: `ReleaseManager`. * AVSs can call `publishRelease(operatorSet, release)` to push release data. **Result:** AVSs can now post release info on-chain, allowing operators to query a canonical, auditable source for updates.
**Motivation:** For the aggregator, we need to provide a block.number that is associated with a reference timestamp to easily index stake weights. **Modifications:** Add a `referenceBlockNumber` to `confirmGlobalTableRoot` along with the following functions: - `getLatestReferenceBlockNumber` - `getReferenceBlockNumber(timestamp)` **Result:** Easier offchain usage
<!--
🚨 ATTENTION! 🚨
This PR template is REQUIRED. PRs not following this format will be
closed without review.
Requirements:
- PR title must follow commit conventions:
https://www.conventionalcommits.org/en/v1.0.0/
- Label your PR with the correct type (e.g., 🐛 Bug, ✨ Enhancement, 🧪
Test, etc.)
- Provide clear and specific details in each section
-->
**Motivation:**
*Explain here the context, and why you're making that change. What is
the problem you're trying to solve.*
**Modifications:**
*Describe the modifications you've done.*
**Result:**
*After your change, what will change.*
---------
Co-authored-by: Michael Sun <[email protected]>
**Motivation:** Multichain needs a table calculator base implementation for ECDSA signtures. **Modifications:** New contracts, `ECDSATableCalculator` and `ECDSATableCalculatorBase`. **Result:** Multichain contracts complete
**Motivation:** Match `Bn254CertificateVerifier` tests with styling. **Modifications:** - Add `isNonsignerCached` view function - Make `trySignatureVerification` _public_ - Add a contract per function under test - Use Multichain deployer and mocks properly **Result:** Cleaner tests
**Motivation:** Operators should be able to deregister their keys in the `KeyRegistrar` if they aren't slashable **Modifications:** Changed permissions on `deregisterKey` **Result:** Operators can deregister their keys in the `KeyRegistrar` if they aren't slashable
**Motivation:** We want to be able to disable a root in case of malicious activity. Here is the state diagram (we're still evaluating pausers):  **Modifications:** - Add disable functionality in `OperatorTableCalculator`. Only previously posted, valid roots, can be disabled - Certificate verifiers check `isRootDisabledByTimestamp` to see if root is valid - Update typeHash to include `referenceBlockNumber` **Result:** Secure code.
**Motivation:** Update `KeyRegistrar` unit tests **Modifications:** - Update bindings - Add .tree file - Add `_` to internal storage vars **Result:** Updated tests. Full coverage (aside from unreachable else statements)
**Motivation:** The `BN254` and `ECDSA` table calculators should be in middleware repo **Modifications:** - Remove all contracts/tests related to table calculators - Middleware PR: Layr-Labs/eigenlayer-middleware#488 **Result:** Cleaner separation of code
**Motivation:** Docs for Multichain Release **Modifications:** Add Docs For: - `CrossChainRegistry` - `OperatorTableCalculator` - `OperatorTableUpdater` - `CertificateVerifier` - `KeyRegistrar` - Update Interfaces to be more explicit for verification return types **Result:** Docs
**Motivation:** Prevent 0 length signatures in `ECDSACertificateVerifier` **Modifications:** - Require length of signature is nonzero - Use require(revert) instead of if() revert **Result:** Consistent behavior
**Motivation:** Remove stale interfaces from multchain **Modifications:** - Remove `IBN254TableCalculator` - Remove `IECDSATableCalculator` - Remove old bindings **Result:** Clearer code
**Motivation:** `OperatorTableUpdater` currently has a bug where the first global root update can't be completed due to `BN254CertificateVerifier` requiring a valid global root. **Modifications:** Initialization now adds a dummy global table root. **Result:** Bug fixed --------- Co-authored-by: Yash Patil <[email protected]>
**Motivation:** Currently, `disableRoot` is called by the `owner` of the `OperatorTableCalculator`. We want to update such that it can be called by the `pauser`. This is to enable cleaner operations. **Modifications:** - Add `Pausable` to `operatorTableCalculator` - Guard `disableGlobalTableRoot` with `onlyPauser` - Guard `updateGlobalTableRoot` and `updateOperatorTable` with `whenNotPaused(index)` **Result:** Cleaner disable mechanics.
**Motivation:** We need deploy scripts for multichain **Modifications:** Adds a `crossChainDeployLib` from: #1474. This library uses `createX` for deterministic deployments. In order to keep the same address on all `destinationChains`, we deploy contracts from the same multisig on each chain. Add `testnet-base-sepolia` to CI for deploy scripts. Adds a `deploy_globalRootConfirmerSet` script. This script initiates a global root confirmer set (ie. generator) and updates the `network.toml` file used in the deploy scripts. It is only intended to be used on `preprod` and `testnet`. To distinguish between a source and destination chain we add a `SOURCE_CHAIN: bool` and `DESTINATION_CHAIN: bool` to the Zeus Config. We skip parts of the deploy if a chain is not a source or destination. Deploys the contracts in 5 steps 1. `deploySourceChain.s.sol`: Deploys `KeyRegistrar`, `ReleaseManager`, `CrossChainRegistry`. 2. `deployDestinationChainProxies.s.sol`: Deploys _empty_ proxy contracts for `OperatorTableUpdater`, `BN254CertificateVerifier`, `ECDSACertificateVerifier`. _Note: in order to have deterministic proxies, we need to ensure the `initCode` is the same. Thus, the implementation is the same `emptyContract` and the proxyAdmin is initially the `multichainDeployerMultisig`_. 3. `deployDestinationChainImpls`: Deploys implementations using EOA 4. `instantiateDestinationChainProxies`: Upgrades the proxies to the actual implementations. Transfer proxy admin to the actual `proxyAdmin` 5. `configureCrossChainRegistry`: Updates the `crossChainRegistry` on the `SOURCE_CHAIN` to whitelist proper chainIds **Result:** Deploy scripts --------- Co-authored-by: clandestine.eth <[email protected]>
**Motivation:** Changelog for multichain **Modifications:** Generate changeling per guidelines **Result:** Release-ready
a10cd52 to
592f311
Compare
eigenmikem
approved these changes
Jul 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
The below release notes cover Core Contracts. For more information on the end to end protocol, see our docs and ELIP-008.
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 setsCrossChainRegistry: Enables AVSs to register to have their operator stakes transported to supported destination chainsReleaseManager: 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 deadlinesDestination 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 BN254OperatorTableUpdater: Updates operator tables in theCertificateVerifierto have tasks validated against up-to-date operator stake weights🔧 Improvements – Enhancements to existing features.
KeyRegistrar: Manages BLS and ECDSA signing keys. AVSs no longer have to deploy aBLSAPKRegistryCertificateVerifier: Handles signature verification for BLS and ECDSA keys. AVSs no longer have to deploy aBLSSignatureCheckerChangelog
publishMetadataURIPR #1492globalRootConfirmerSet->generatorPR #1500KeyRegistryunit testing PR #1482ECDSATableCalculatortesting PR #1479ECDSACertificateVerifiertesting PR #1478Bn254CertificateVerifierUnitTestsPR #1476BN254OperatorTableCalculatorPR #1463referenceBlockNumberPR #1472getGlobalConfirmerSetReferenceTimestampPR #1471CrossChainRegistryPR #1457OperatorTableUpdaterencoding PR #1456referenceTimestampto OTC interface PR #1454