v1.0.3-testnet-slashing
Pre-release
Pre-release
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