Releases: Layr-Labs/eigenlayer-middleware
v1.4.0-rc.3: Multichain/MiddlewareV2
This release points to the core contract release, v1.7.0-rc.3
.
What's Changed
- chore: update
AVSRegistrar
for newKeyRegistrar
interface by @ypatil12 in #502 - chore: update submodule by @ypatil12 in #503
- feat(redistribution): update slashers by @0xClandestine in #492
- docs: format table in
OperatorTableCalculator
by @ypatil12 in #505
Full Changelog: v1.4.0-rc.0...v1.4.0-rc.3
v1.4.0-rc.0: Multichain/MiddlewareV2
v1.4.0 MultiChain/MiddlewareV2
The multichain/middlewareV2 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:
- Core Contracts
- AVS Contracts
- Offchain Infrastructure
The below release notes cover AVS Contracts. For more information on the end to end protocol, see our docs, core contract docs, and ELIP-008.
Release Manager
Highlights
This multichain release only introduces new standards and contracts. As a result, there are no breaking changes or deprecations. All new contracts are in the middlewareV2 folder.
🚀 New Features – Highlight major new functionality
AVSRegistrar
: The primary interface for managing operator registration and deregistration within an AVS. It integrates with core EigenLayer contracts to ensure operators have valid keys and are properly registered in operator setsOperatorTableCalculator
: Responsible for calculating stake weights of operator. These stake weights are aggregated and transported using the Eigenlayer Multichain Protocol. In order to utilize the multichain protocol, an AVS MUST deploy anOperatorTableCalculator
and register it in theCrossChainRegistry
in EigenLayer core. See our core documentation for this process.
🔧 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 aBLSAPKRegistry
CertificateVerifier
: Handles signature verification for BLS and ECDSA keys. AVSs no longer have to deploy aBLSSignatureChecker
- Offchain Multichain Transport: AVSs no longer have to maintain avs-sync to keep operator stakes fresh
Changelog
- test: ecdsa stake reg/bls sig checker utils PR #500
- test: table calc PR #499
- fix: avs registrar as identifier PR #494
- fix: table calc interface PR #493
- docs: middlewareV2/multichain PR #489
- chore: add avs registrar interfaces PR #491
- chore: remove unused imports PR #490
- feat: add table calculators PR #488
- chore: remove interfaces PR #485
- chore: bump up ecdsa dependency PR #487
- chore: bump up
eigenlayer-contracts
dependency PR #486 - feat: avs registrar PR #484
- refactor: singleton cv combining ECDSA and BN254 PR #479
- feat: multichain interfaces PR #477
v1.3.1
Overview
This release represents the middleware contracts release with audit changes.
Breaking Changes:
- Removed
staleStakes
from theBLSSignatureChecker
Additional Notes (same as from the v1.3.0
release candidate):
In this release we bumped the openzeppelin dependency to align with the core contracts.
https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.7 to https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.9
Between these two releases the EIP712 implementation progressed out of draft status. And had changes to it's storage layout. This contract was used in the RegistryCoordinator (legacy) and was the first contract in the inheritance order. This meant that upgrading to the openzeppelin 4.9 would have resulted in a storage layout shift for upgrading contracts. To remedy this we moved EIP712 to be the last contract in the inheritance order so that it's storage is at the end of the storage layout. This preserves the functionality and keeps the storage layout the same pre and post upgrade.
An AVS that extended the RegistryCoordinator and added storage to the end of the storage layout will also need to make sure that EIP712Upgradeable is the last contract in the inheritance order and verify that it's the last contract in the storage layout. Extra precauction is needed in verifying these storage layout changes
Audit fixes from the release candidate
- fix: ejection manager inclusive ejection by @ypatil12 in #462
- fix: lookahead period constraint by @ypatil12 in #463
- fix: enforce quorum registration on churn by @ypatil12 in #467
- fix: dealloc delay inquality on quorum creation by @ypatil12 in #468
- chore: remove redundant check by @ypatil12 in #465
- chore: remove unused import by @ypatil12 in #466
- Feat: generate parameters for checkSignatures by referencing OperatorStateRetriever on-chain by @ypatil12 in #461
- feat: slashing audit fixes by @ypatil12 in #475
Full Changelog: v1.3.0...v1.3.1
v1.3.0
Overview
This release represents the middleware contracts release on top of the frozen core contracts slashing release
Breaking Changes:
- Removed the registries array that tracked all onchain registries in the RegistryCoordinator
- The lookahead period for slashable stakes can no longer be set longer than the DEALLOCATION_DELAY in the AllocationManager.sol in the core contracts
** Additional Notes **
In this release we bumped the openzeppelin dependency to align with the core contracts.
https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.7 to https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.9
Between these two releases the EIP712 implementation progressed out of draft status. And had changes to it's storage layout. This contract was used in the RegistryCoordinator (legacy) and was the first contract in the inheritance order. This meant that upgrading to the openzeppelin 4.9 would have resulted in a storage layout shift for upgrading contracts. To remedy this we moved EIP712 to be the last contract in the inheritance order so that it's storage is at the end of the storage layout. This preserves the functionality and keeps the storage layout the same pre and post upgrade.
An AVS that extended the RegistryCoordinator and added storage to the end of the storage layout will also need to make sure that EIP712Upgradeable is the last contract in the inheritance order and verify that it's the last contract in the storage layout. Extra precauction is needed in verifying these storage layout changes
What's Changed since the release candidate
- chore: bump the core dependency to v1.4.0 by @stevennevins in #441
- test: ecdsa stake registry unit tests by @stevennevins in #436
- fix: storage layout regression by @stevennevins in #446
- feat: add virtual keywords to make possible overriding of some functions by @tafonina in #432
- perf: code size improvement for registry coordinator by @stevennevins in #445
- ci: add back storage report to run on ci by @stevennevins in #451
- feat: add view function for total operator count in quorum by @stevennevins in #449
- fix: ci workflow needs secret by @stevennevins in #448
- chore: bump core dependency to v1.3.0 by @stevennevins in #453
- test: upgrade on eigenda holesky by @stevennevins in #447
New Contributors
Full Changelog: v1.3.0-rc.0...v1.3.0
v1.4.0-testnet-holesky
Core version bump to maintain compatability with the core testnet holesky release
What's Changed
- chore: bump the core dependency to v1.4.0 by @stevennevins in #441
Full Changelog: v1.3.0-rc.0...v1.4.0-testnet-holesky
v1.3.0-rc.0
Breaking Changes:
- Removed the registries array that tracked all onchain registries in the RegistryCoordinator
- The lookahead period for slashable stakes can no longer be set longer than the DEALLOCATION_DELAY in the AllocationManager.sol in the core contracts
** Additional Notes **
In this release we bumped the openzeppelin dependency to align with the core contracts.
https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.7 to https://github.com/OpenZeppelin/openzeppelin-contracts/tree/release-v4.9
Between these two releases the EIP712 implementation progressed out of draft status. And had changes to it's storage layout. This contract was used in the RegistryCoordinator (legacy) and was the first contract in the inheritance order. This meant that upgrading to the openzeppelin 4.9 would have resulted in a storage layout shift for upgrading contracts. To remedy this we moved EIP712 to be the last contract in the inheritance order so that it's storage is at the end of the storage layout. This preserves the functionality and keeps the storage layout the same pre and post upgrade.
An AVS that extended the RegistryCoordinator and added storage to the end of the storage layout will also need to make sure that EIP712Upgradeable is the last contract in the inheritance order and verify that it's the last contract in the storage layout. Extra precauction is needed in verifying these storage layout changes
What's Changed
- Store G2 onchain by @RonTuretzky in #410
- test: add setClaimerFor unit tests for
ServiceManagerBase
by @tsnewnami in #413 - test: add coverage for
getQuorumUpdateAtIndex
onIndexRegistry
by @tsnewnami in #412 - test: increase
StakeRegistry
test coverage by @tsnewnami in #414 - docs: revamp
avs-guide
by @tsnewnami in #416 - docs: update
RegistryCoordinator
and addSlashingRegistryCoordinator
by @tsnewnami in #420 - docs: add
EjectionManager.md
by @tsnewnami in #422 - docs: add docs for slasher contracts by @tsnewnami in #423
- docs: update docs for registry contracts by @tsnewnami in #417
- docs: update
ServiceManagerBase
by @tsnewnami in #424 - docs: add
OperatorStateRetriever
by @tsnewnami in #421 - docs: update main docs readme by @tsnewnami in #425
- chore: bump openzeppelin 4.9.0 by @stevennevins in #427
- chore: update to use relative imports by @stevennevins in #430
- test: slashing registry coordinator unit tests by @stevennevins in #419
- test: bound input for intense runs by @stevennevins in #429
- test: e2e migration test by @tsnewnami in #435
- chore: remove code size diff from ci by @stevennevins in #437
- chore: bump v1.3.0 slashing core by @stevennevins in #431
- fix: resolve inheritance order and storage layout for upgraded rc by @stevennevins in #433
- test: partial and full test cases with stake updates by @stevennevins in #438
- fix: keep storage layout the same by @stevennevins in #439
New Contributors
- @tsnewnami made their first contribution in #413
Full Changelog: v1.1.1-testnet-slashing...v1.3.0-rc.0
v1.1.1-testnet-slashing
What's Changed
BREAKING:
New mandatory setup sequence for AVS registration. AVSs MUST set metadata in the allocation manager before:
- Creating operator sets (createOperatorSets)
- Registering operators (registerOperator)
Failing to set metadata will cause these operations to revert
BREAKING:
AVS-Registrar Integration
- A new required callback implementation via
supportsAVS(address)
- A new parameter added to the operator set-based register/deregister interfaces
AVSs must implement the new callback mechanism to establish the AVS-AVSRegistrar relationship and must update their operator set registration/deregistration functions to handle this added parameter
IMPROVEMENTS:
Ejection State Handling
- Improved the deregistration interactions with the core protocol to be simpler and better handle ejection cases
- Improved Socket Registry functionality and reliability
PRs
- refactor: ci by @0xClandestine in #382
- Update submodule lib/eigenlayer-contracts to rewardsv2.1 by @Sidu28 in #386
- fix: SocketRegistry-related fixes by @nadir-akhtar in #389
- chore: refactor test library for middleware deployment by @stevennevins in #390
- refactor: move forge test intense workflow into separate file by @nadir-akhtar in #391
- test: integration with slashingRegistryCoordinator by @8sunyuan in #388
- chore: pull request template by @stevennevins in #401
- feat: avs identifier callback and handle ejected operators by @stevennevins in #399
New Contributors
Full Changelog: v1.0.3-testnet-slashing...v1.1.1-testnet-slashing
v1.0.3-testnet-slashing
Slashing Release Features and Changes
The code is being released for testnet in an unaudited and untested state and will be entering an audit as we prepare for the mainnet slashing release
Overview
- ELIPs on Slashing/OperatorSets/UAM
- EigenLayer UAM integration and removal of dependency on the ServiceManager for proxying calls. #357
- For existing AVSs that have deployed a ServiceManager, it is highly recommended to set your account identifier in the UAM as the old ServiceManager address even if the contract no longer becomes the entrypoint for calls between the AVS middleware contracts and the core EigenLayer contracts.
- The current implementation of middleware expects the following setup of UAM.
SlashingRegistryCoordinator
being able to callAllocationManager.createOperatorSets
AllocationManager.deregisterFromOperatorSets
(for force deregistration)
StakeRegistry
being able to callAllocationManager.addStrategiesToOperatorSet
AllocationManager.removeStrategiesFromOperatorSet
SlasherBase
being able to callAllocationManager.slashOperator
RegistryCoordinator
&SlashingRegistryCoordinator
#361- The
RegistryCoordinator
now inherits from theSlashingRegistryCoordinator
while maintaining backwards compatability of interfaces. Reasoning for this change is detailed below. - The
RegistryCoordinator
has been updated to enable OperatorSet mode. What this means is that newly created quorums will result in calling the AllocationManager to create the respective OperatorSet. This implies a different operator registration/deregistration flow where theRegistryCoordinator
implements theIAVSRegistrar
interface to support calls from the AllocationManager in the EigenLayer protocol. - Newly developing AVSs should ignore the RegistryCoordinator and simply use the
SlashingRegistryCoordinator
as this by default initializes to OperatorSet mode without the legacy Operator registration/deregistration interfaces. - Already deployed AVSs with existing quorums should use the
RegistryCoordinator
for backwards compatibility of legacy quorums. For existing AVSs who wish to migrate to OperatorSets, they need to firstenableOperatorSets()
to enable OperatorSet mode and create OperatorSet quorums. They can then calldisableM2QuorumRegistration()
to begin to deprecate legacy quorum registration. Operators are always allowed to deregister from legacy quorums.
- The
SlashingBase
and templates are added in/slashers
directory. These contracts are meant to be inherited with AVS slashing logic specific to your needs.StakeRegistry
reads from theAllocationManager
to get slashable stake for newly createdStakeType.TOTAL_SLASHABLE
quorums.- Solidity version bump
0.8.12
->0.8.27
as well as custom errors with require checks. - Added storage gaps to the
EjectionManager
contract. This is a breaking change for any deployed contract that has inherited and added additional storage previously.
Migration Guide
For StakeRegistry Users
-
Update imports for new interfaces to import structs from
IStakeRegistryTypes
:- Replace
StakeUpdate
withIStakeRegistryTypes.StakeUpdate
- Replace
StrategyParams
withIStakeRegistryTypes.StrategyParams
- Replace
StakeType
withIStakeRegistryTypes.StakeType
- Replace
-
Update stake tracking functionality:
- Support for both delegated and slashable stake types per quorum
- New stake history tracking with block number indexing
- Stake weight calculation with strategy multipliers
-
Handle new quorum initialization:
initializeDelegatedStakeQuorum
for total delegated stake trackinginitializeSlashableStakeQuorum
for slashable stake with lookahead period- Strategy params and minimum stake requirements per quorum
-
Implement new stake query features:
- Get stake at specific block numbers and indices
- Query stake history length and updates
- Get current and historical total stake per quorum
- Support for strategy params management
For ISocketUpdater Users
- Remove all usage of ISocketUpdater interface
- Update socket update functionality to use IRegistryCoordinator
- Update event listeners to use OperatorSocketUpdate from IRegistryCoordinatorEvents
For ECDSAStakeRegistry Users
- Update imports for now interfaces:
ECDSAStakeRegistryStorage
IECDSAStakeRegistry
IECDSAStakeRegistryTypes
- Rename any calls to
getLastestOperatorSigningKey
togetLatestOperatorSigningKey
- Update type references:
- Replace
Quorum
withIECDSAStakeRegistryTypes.Quorum
- Replace
StrategyParams
withIECDSAStakeRegistryTypes.StrategyParams
- Replace
- Review parameter names in function calls if using explicit naming ie, function({name: param, name2} to ensure they match the new convention
For RegistryCoordinator Users
-
Update imports for new interfaces to import structs from the
IRegistryCoordinatorTypes
:- Replace
OperatorStatus
withIRegistryCoordinatorTypes.OperatorStatus
- Replace
OperatorInfo
withIRegistryCoordinatorTypes.OperatorInfo
- Replace
QuorumBitmapUpdate
withIRegistryCoordinatorTypes.QuorumBitmapUpdate
- Replace
OperatorSetParam
withIRegistryCoordinatorTypes.OperatorSetParam
- Replace
OperatorKickParam
withIRegistryCoordinatorTypes.OperatorKickParam
- Replace
-
Update operator registration flow:
- M2 quorum registration checks
- New operator sets functionality
-
Handle new registration restrictions:
- Checks for
m2QuorumsDisabled
flag - Validate operator set mode
- Checks for
-
Update deregistration logic:
- M2 quorum-specific checks
-
Implement new operator set features:
- Support for enabling/disabling operator sets
- Handle M2 quorum registration states
For BLSSignatureChecker Users
-
Update imports for new interfaces to import structs from the
IBLSSignatureCheckerTypes
:- Replace
NonSignerInfo
withIBLSSignatureCheckerTypes.NonSignerInfo
- Replace
NonSignerStakesAndSignature
withIBLSSignatureCheckerTypes.NonSignerStakesAndSignature
- Replace
QuorumStakeTotals
withIBLSSignatureCheckerTypes.QuorumStakeTotals
- Replace
-
Update event handling:
- Import events from
IBLSSignatureCheckerEvents
- Update event emissions to match interface definitions
- Import events from
For BLSApkRegistry Users
-
Update imports for new interfaces to import structs from the
IBLSApkRegistryTypes
:- Replace
ApkUpdate
withIBLSApkRegistryTypes.ApkUpdate
- Replace
PubkeyRegistrationParams
withIBLSApkRegistryTypes.PubkeyRegistrationParams
- Replace
-
Update event handling:
- Import events from
IBLSApkRegistryEvents
- Import events from
For IndexRegistry Users
- Update imports for new interfaces:
IndexRegistry
IIndexRegistryEvents
IIndexRegistryTypes
- Update type references:
- Replace
QuorumUpdate
withIIndexRegistryTypes.QuorumUpdate
- Replace
OperatorUpdate
withIIndexRegistryTypes.OperatorUpdate
- Replace
Full Changelog: v0.5.4-mainnet-rewards-v2...v1.0.3-testnet-slashing
v0.5.4-mainnet-rewards-v2
What's Changed
- feat: automated ejector by @0x0aa0 in #146
- chore: bump forge-std and remove ds-test dependency by @stevennevins in #227
- feat: ejector allowlist mapping by @0x0aa0 in #226
- feat: return operators ejected by @0x0aa0 in #228
- Use uint32 for number of ejected operators by @jianoaix in #232
- feat: service manager payments by @8sunyuan in #242
- fix: service manager spacing by @8sunyuan in #244
- chore: rename audit report for clarity and consistency with core by @wadealexc in #245
- feat: batch operator id conversions by @0x0aa0 in #248
- fix: vm assume too many rejections by @stevennevins in #247
- feat: reregistration delay by @0x0aa0 in #246
- feat: ecdsa service manager by @stevennevins in #234
- fix: add init function for staleStakesForbidden in BLSSignatureChecker by @stevennevins in #251
- feat: update payments release to core-contracts release by @8sunyuan in #254
- fix: multiple rangepayments with same token by @8sunyuan in #257
- test: fix flaky fuzz tests hitting the default operator by @stevennevins in #256
- chore: update license by @ChaoticWalrus in #259
- feat: ecdsa key rotation by @stevennevins in #252
- fix: storage gap by @stevennevins in #261
- feat:
paymentInitiator
role inServiceManagerBase
by @diyahir in #260 - chore: refactor with RewardsCoordinator by @8sunyuan in #262
- chore: rewards release submodule by @8sunyuan in #264
- fix: deprecated struct field for earning receiver by @stevennevins in #265
- perf: refactor to modifiers to use internal functions by @stevennevins in #272
- perf: refactor index registry to use internal functions for modifier by @stevennevins in #269
- perf: refactor apk modifiers to use internal functions by @stevennevins in #268
- perf: refactor modifiers to use internal functions for stake registry by @stevennevins in #266
- fix: service manager storage layout by @0x0aa0 in #275
- feat: reward initiator for ECDSAServiceManagerBase by @Gajesh2007 in #274
- Fix: minor typos in iservicemanager by @samlaf in #278
- fix: correct index get operator restakable strategies by @stevennevins in #280
- chore: update dev to eigenlayer contracts dev by @shrimalmadhur in #282
- EjectionManager overflow fix by @0x0aa0 in #290
- feat: update core contracts submodule for mainnet rewards by @8sunyuan in #297
- build: update core submodule to new release by @8sunyuan in #298
- add overrides by @gpsanant in #302
- onchain socket by @0x0aa0 in #307
- chore: bump dependency with core to v0.4.3-mainnet-rewards-programmatic-incentives by @stevennevins in #314
- feat: ejection policy change by @0x0aa0 in #313
- feat: Rewards v2 by @0xrajath in #315
- ejector fix by @0x0aa0 in #322
- ejector owner by @0x0aa0 in #326
- test: socket registry by @0x0aa0 in #327
- docs: fix typos and add note that large array may cause revert by @nadir-akhtar in #323
- fix: Rewards v2 audit fixes by @0xrajath in #346
- docs: rewards v2 audit report by @0xrajath in #356
- remove socket migration by @0x0aa0 in #359
Full Changelog: v0.4.3-mainnet-rewards...v0.5.4-mainnet-rewards-v2
v0.4.3-mainnet-rewards
What's Changed
- Add mainnet table to docs by @0x0aa0 in #224
- Update LICENSE by @gpsanant in #285
- chore: bump mainnet to mainnet rewards v0.4.3 by @stevennevins in #330
Full Changelog: v0.1.3-mainnet-m2+pragma-change...v0.4.3-mainnet-rewards