Skip to content

v1.0.3-testnet-slashing

Pre-release
Pre-release
Compare
Choose a tag to compare
@stevennevins stevennevins released this 28 Jan 00:33
11b0061

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 call
        1. AllocationManager.createOperatorSets
        2. AllocationManager.deregisterFromOperatorSets (for force deregistration)
      • StakeRegistry being able to call
        1. AllocationManager.addStrategiesToOperatorSet
        2. AllocationManager.removeStrategiesFromOperatorSet
      • SlasherBase being able to call
        1. AllocationManager.slashOperator
  • RegistryCoordinator & SlashingRegistryCoordinator #361
    • The RegistryCoordinator now inherits from the SlashingRegistryCoordinator 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 the RegistryCoordinator implements the IAVSRegistrar 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 first enableOperatorSets() to enable OperatorSet mode and create OperatorSet quorums. They can then call disableM2QuorumRegistration() to begin to deprecate legacy quorum registration. Operators are always allowed to deregister from legacy quorums.
  • 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 the AllocationManager to get slashable stake for newly created StakeType.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

  1. Update imports for new interfaces to import structs from IStakeRegistryTypes:

    • Replace StakeUpdate with IStakeRegistryTypes.StakeUpdate
    • Replace StrategyParams with IStakeRegistryTypes.StrategyParams
    • Replace StakeType with IStakeRegistryTypes.StakeType
  2. 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
  3. Handle new quorum initialization:

    • initializeDelegatedStakeQuorum for total delegated stake tracking
    • initializeSlashableStakeQuorum for slashable stake with lookahead period
    • Strategy params and minimum stake requirements per quorum
  4. 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

  1. Remove all usage of ISocketUpdater interface
  2. Update socket update functionality to use IRegistryCoordinator
  3. Update event listeners to use OperatorSocketUpdate from IRegistryCoordinatorEvents

For ECDSAStakeRegistry Users

  1. Update imports for now interfaces:
    • ECDSAStakeRegistryStorage
    • IECDSAStakeRegistry
    • IECDSAStakeRegistryTypes
  2. Rename any calls to getLastestOperatorSigningKey to getLatestOperatorSigningKey
  3. Update type references:
    • Replace Quorum with IECDSAStakeRegistryTypes.Quorum
    • Replace StrategyParams with IECDSAStakeRegistryTypes.StrategyParams
  4. 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

  1. Update imports for new interfaces to import structs from the IRegistryCoordinatorTypes:

    • Replace OperatorStatus with IRegistryCoordinatorTypes.OperatorStatus
    • Replace OperatorInfo with IRegistryCoordinatorTypes.OperatorInfo
    • Replace QuorumBitmapUpdate with IRegistryCoordinatorTypes.QuorumBitmapUpdate
    • Replace OperatorSetParam with IRegistryCoordinatorTypes.OperatorSetParam
    • Replace OperatorKickParam with IRegistryCoordinatorTypes.OperatorKickParam
  2. Update operator registration flow:

    • M2 quorum registration checks
    • New operator sets functionality
  3. Handle new registration restrictions:

    • Checks for m2QuorumsDisabled flag
    • Validate operator set mode
  4. Update deregistration logic:

    • M2 quorum-specific checks
  5. Implement new operator set features:

    • Support for enabling/disabling operator sets
    • Handle M2 quorum registration states

For BLSSignatureChecker Users

  1. Update imports for new interfaces to import structs from the IBLSSignatureCheckerTypes:

    • Replace NonSignerInfo with IBLSSignatureCheckerTypes.NonSignerInfo
    • Replace NonSignerStakesAndSignature with IBLSSignatureCheckerTypes.NonSignerStakesAndSignature
    • Replace QuorumStakeTotals with IBLSSignatureCheckerTypes.QuorumStakeTotals
  2. Update event handling:

    • Import events from IBLSSignatureCheckerEvents
    • Update event emissions to match interface definitions

For BLSApkRegistry Users

  1. Update imports for new interfaces to import structs from the IBLSApkRegistryTypes:

    • Replace ApkUpdate with IBLSApkRegistryTypes.ApkUpdate
    • Replace PubkeyRegistrationParams with IBLSApkRegistryTypes.PubkeyRegistrationParams
  2. Update event handling:

    • Import events from IBLSApkRegistryEvents

For IndexRegistry Users

  1. Update imports for new interfaces:
    • IndexRegistry
    • IIndexRegistryEvents
    • IIndexRegistryTypes
  2. Update type references:
    • Replace QuorumUpdate with IIndexRegistryTypes.QuorumUpdate
    • Replace OperatorUpdate with IIndexRegistryTypes.OperatorUpdate

Full Changelog: v0.5.4-mainnet-rewards-v2...v1.0.3-testnet-slashing