diff --git a/docs/storage-report/BLSApkRegistry.md b/docs/storage-report/BLSApkRegistry.md index cc7dfd66..e69de29b 100644 --- a/docs/storage-report/BLSApkRegistry.md +++ b/docs/storage-report/BLSApkRegistry.md @@ -1,21 +0,0 @@ - -╭----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+==================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| operatorToPubkeyHash | mapping(address => bytes32) | 1 | 0 | 32 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| pubkeyHashToOperator | mapping(bytes32 => address) | 2 | 0 | 32 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| operatorToPubkey | mapping(address => struct BN254.G1Point) | 3 | 0 | 32 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| apkHistory | mapping(uint8 => struct IBLSApkRegistryTypes.ApkUpdate[]) | 4 | 0 | 32 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| currentApk | mapping(uint8 => struct BN254.G1Point) | 5 | 0 | 32 | src/BLSApkRegistry.sol:BLSApkRegistry | -|----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------| -| __GAP | uint256[45] | 6 | 0 | 1440 | src/BLSApkRegistry.sol:BLSApkRegistry | -╰----------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------╯ - diff --git a/docs/storage-report/BLSApkRegistryStorage.md b/docs/storage-report/BLSApkRegistryStorage.md index 57e7bf28..e69de29b 100644 --- a/docs/storage-report/BLSApkRegistryStorage.md +++ b/docs/storage-report/BLSApkRegistryStorage.md @@ -1,21 +0,0 @@ - -╭----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| operatorToPubkeyHash | mapping(address => bytes32) | 1 | 0 | 32 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| pubkeyHashToOperator | mapping(bytes32 => address) | 2 | 0 | 32 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| operatorToPubkey | mapping(address => struct BN254.G1Point) | 3 | 0 | 32 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| apkHistory | mapping(uint8 => struct IBLSApkRegistryTypes.ApkUpdate[]) | 4 | 0 | 32 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| currentApk | mapping(uint8 => struct BN254.G1Point) | 5 | 0 | 32 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -|----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------| -| __GAP | uint256[45] | 6 | 0 | 1440 | src/BLSApkRegistryStorage.sol:BLSApkRegistryStorage | -╰----------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------╯ - diff --git a/docs/storage-report/BLSSignatureCheckerStorage.md b/docs/storage-report/BLSSignatureCheckerStorage.md index cf8a54f2..e69de29b 100644 --- a/docs/storage-report/BLSSignatureCheckerStorage.md +++ b/docs/storage-report/BLSSignatureCheckerStorage.md @@ -1,9 +0,0 @@ - -╭----------------------+-------------+------+--------+-------+---------------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+============================================================================================================================+ -| staleStakesForbidden | bool | 0 | 0 | 1 | src/BLSSignatureCheckerStorage.sol:BLSSignatureCheckerStorage | -|----------------------+-------------+------+--------+-------+---------------------------------------------------------------| -| __GAP | uint256[49] | 1 | 0 | 1568 | src/BLSSignatureCheckerStorage.sol:BLSSignatureCheckerStorage | -╰----------------------+-------------+------+--------+-------+---------------------------------------------------------------╯ - diff --git a/docs/storage-report/ECDSAServiceManagerBase.md b/docs/storage-report/ECDSAServiceManagerBase.md index 2251f673..e69de29b 100644 --- a/docs/storage-report/ECDSAServiceManagerBase.md +++ b/docs/storage-report/ECDSAServiceManagerBase.md @@ -1,19 +0,0 @@ - -╭------------------+-------------+------+--------+-------+-------------------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+============================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| _owner | address | 51 | 0 | 20 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| rewardsInitiator | address | 101 | 0 | 20 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -|------------------+-------------+------+--------+-------+-------------------------------------------------------------------| -| __GAP | uint256[49] | 102 | 0 | 1568 | src/unaudited/ECDSAServiceManagerBase.sol:ECDSAServiceManagerBase | -╰------------------+-------------+------+--------+-------+-------------------------------------------------------------------╯ - diff --git a/docs/storage-report/ECDSAStakeRegistry.md b/docs/storage-report/ECDSAStakeRegistry.md index 8f9200d4..e69de29b 100644 --- a/docs/storage-report/ECDSAStakeRegistry.md +++ b/docs/storage-report/ECDSAStakeRegistry.md @@ -1,37 +0,0 @@ - -╭----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+==========================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _owner | address | 51 | 0 | 20 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _totalOperators | uint256 | 101 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _quorum | struct IECDSAStakeRegistryTypes.Quorum | 102 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _minimumWeight | uint256 | 103 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _serviceManager | address | 104 | 0 | 20 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _stakeExpiry | uint256 | 105 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 106 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _totalWeightHistory | struct CheckpointsUpgradeable.History | 107 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 108 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 109 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| _operatorRegistered | mapping(address => bool) | 110 | 0 | 32 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -|----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------| -| __gap | uint256[40] | 111 | 0 | 1280 | src/unaudited/ECDSAStakeRegistry.sol:ECDSAStakeRegistry | -╰----------------------------+-----------------------------------------------------------+------+--------+-------+---------------------------------------------------------╯ - diff --git a/docs/storage-report/ECDSAStakeRegistryEqualWeight.md b/docs/storage-report/ECDSAStakeRegistryEqualWeight.md index fbd09d32..e69de29b 100644 --- a/docs/storage-report/ECDSAStakeRegistryEqualWeight.md +++ b/docs/storage-report/ECDSAStakeRegistryEqualWeight.md @@ -1,39 +0,0 @@ - -╭----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+=========================================================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _owner | address | 51 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _totalOperators | uint256 | 101 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _quorum | struct IECDSAStakeRegistryTypes.Quorum | 102 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _minimumWeight | uint256 | 103 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _serviceManager | address | 104 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _stakeExpiry | uint256 | 105 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 106 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _totalWeightHistory | struct CheckpointsUpgradeable.History | 107 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 108 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 109 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| _operatorRegistered | mapping(address => bool) | 110 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| __gap | uint256[40] | 111 | 0 | 1280 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -|----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------| -| allowlistedOperators | mapping(address => bool) | 151 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryEqualWeight.sol:ECDSAStakeRegistryEqualWeight | -╰----------------------------+-----------------------------------------------------------+------+--------+-------+----------------------------------------------------------------------------------------╯ - diff --git a/docs/storage-report/ECDSAStakeRegistryPermissioned.md b/docs/storage-report/ECDSAStakeRegistryPermissioned.md index bc9ae389..e69de29b 100644 --- a/docs/storage-report/ECDSAStakeRegistryPermissioned.md +++ b/docs/storage-report/ECDSAStakeRegistryPermissioned.md @@ -1,39 +0,0 @@ - -╭----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===========================================================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _owner | address | 51 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _totalOperators | uint256 | 101 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _quorum | struct IECDSAStakeRegistryTypes.Quorum | 102 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _minimumWeight | uint256 | 103 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _serviceManager | address | 104 | 0 | 20 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _stakeExpiry | uint256 | 105 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 106 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _totalWeightHistory | struct CheckpointsUpgradeable.History | 107 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 108 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 109 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| _operatorRegistered | mapping(address => bool) | 110 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| __gap | uint256[40] | 111 | 0 | 1280 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -|----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------| -| allowlistedOperators | mapping(address => bool) | 151 | 0 | 32 | src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol:ECDSAStakeRegistryPermissioned | -╰----------------------------+-----------------------------------------------------------+------+--------+-------+------------------------------------------------------------------------------------------╯ - diff --git a/docs/storage-report/ECDSAStakeRegistryStorage.md b/docs/storage-report/ECDSAStakeRegistryStorage.md index 82ca4546..e69de29b 100644 --- a/docs/storage-report/ECDSAStakeRegistryStorage.md +++ b/docs/storage-report/ECDSAStakeRegistryStorage.md @@ -1,27 +0,0 @@ - -╭----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+========================================================================================================================================================================================+ -| _totalOperators | uint256 | 0 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _quorum | struct IECDSAStakeRegistryTypes.Quorum | 1 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _minimumWeight | uint256 | 2 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _serviceManager | address | 3 | 0 | 20 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _stakeExpiry | uint256 | 4 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _operatorSigningKeyHistory | mapping(address => struct CheckpointsUpgradeable.History) | 5 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _totalWeightHistory | struct CheckpointsUpgradeable.History | 6 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _thresholdWeightHistory | struct CheckpointsUpgradeable.History | 7 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _operatorWeightHistory | mapping(address => struct CheckpointsUpgradeable.History) | 8 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| _operatorRegistered | mapping(address => bool) | 9 | 0 | 32 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -|----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------| -| __gap | uint256[40] | 10 | 0 | 1280 | src/unaudited/ECDSAStakeRegistryStorage.sol:ECDSAStakeRegistryStorage | -╰----------------------------+-----------------------------------------------------------+------+--------+-------+-----------------------------------------------------------------------╯ - diff --git a/docs/storage-report/EjectionManager.md b/docs/storage-report/EjectionManager.md index 2e157da4..e69de29b 100644 --- a/docs/storage-report/EjectionManager.md +++ b/docs/storage-report/EjectionManager.md @@ -1,21 +0,0 @@ - -╭-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===============================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| __gap | uint256[50] | 1 | 0 | 1600 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| _owner | address | 51 | 0 | 20 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| __gap | uint256[49] | 52 | 0 | 1568 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| isEjector | mapping(address => bool) | 101 | 0 | 32 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| stakeEjectedForQuorum | mapping(uint8 => struct IEjectionManagerTypes.StakeEjection[]) | 102 | 0 | 32 | src/EjectionManager.sol:EjectionManager | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------| -| quorumEjectionParams | mapping(uint8 => struct IEjectionManagerTypes.QuorumEjectionParams) | 103 | 0 | 32 | src/EjectionManager.sol:EjectionManager | -╰-----------------------+---------------------------------------------------------------------+------+--------+-------+-----------------------------------------╯ - diff --git a/docs/storage-report/EjectionManagerStorage.md b/docs/storage-report/EjectionManagerStorage.md index 0285800d..e69de29b 100644 --- a/docs/storage-report/EjectionManagerStorage.md +++ b/docs/storage-report/EjectionManagerStorage.md @@ -1,11 +0,0 @@ - -╭-----------------------+---------------------------------------------------------------------+------+--------+-------+-------------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+=============================================================================================================================================================================+ -| isEjector | mapping(address => bool) | 0 | 0 | 32 | src/EjectionManagerStorage.sol:EjectionManagerStorage | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-------------------------------------------------------| -| stakeEjectedForQuorum | mapping(uint8 => struct IEjectionManagerTypes.StakeEjection[]) | 1 | 0 | 32 | src/EjectionManagerStorage.sol:EjectionManagerStorage | -|-----------------------+---------------------------------------------------------------------+------+--------+-------+-------------------------------------------------------| -| quorumEjectionParams | mapping(uint8 => struct IEjectionManagerTypes.QuorumEjectionParams) | 2 | 0 | 32 | src/EjectionManagerStorage.sol:EjectionManagerStorage | -╰-----------------------+---------------------------------------------------------------------+------+--------+-------+-------------------------------------------------------╯ - diff --git a/docs/storage-report/IndexRegistry.md b/docs/storage-report/IndexRegistry.md index 526d85d1..e69de29b 100644 --- a/docs/storage-report/IndexRegistry.md +++ b/docs/storage-report/IndexRegistry.md @@ -1,17 +0,0 @@ - -╭-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+========================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/IndexRegistry.sol:IndexRegistry | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/IndexRegistry.sol:IndexRegistry | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| currentOperatorIndex | mapping(uint8 => mapping(bytes32 => uint32)) | 1 | 0 | 32 | src/IndexRegistry.sol:IndexRegistry | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| _operatorIndexHistory | mapping(uint8 => mapping(uint32 => struct IIndexRegistryTypes.OperatorUpdate[])) | 2 | 0 | 32 | src/IndexRegistry.sol:IndexRegistry | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| _operatorCountHistory | mapping(uint8 => struct IIndexRegistryTypes.QuorumUpdate[]) | 3 | 0 | 32 | src/IndexRegistry.sol:IndexRegistry | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| __GAP | uint256[47] | 4 | 0 | 1504 | src/IndexRegistry.sol:IndexRegistry | -╰-----------------------+----------------------------------------------------------------------------------+------+--------+-------+-------------------------------------╯ - diff --git a/docs/storage-report/IndexRegistryStorage.md b/docs/storage-report/IndexRegistryStorage.md index a30c1362..e69de29b 100644 --- a/docs/storage-report/IndexRegistryStorage.md +++ b/docs/storage-report/IndexRegistryStorage.md @@ -1,17 +0,0 @@ - -╭-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+======================================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| currentOperatorIndex | mapping(uint8 => mapping(bytes32 => uint32)) | 1 | 0 | 32 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| _operatorIndexHistory | mapping(uint8 => mapping(uint32 => struct IIndexRegistryTypes.OperatorUpdate[])) | 2 | 0 | 32 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| _operatorCountHistory | mapping(uint8 => struct IIndexRegistryTypes.QuorumUpdate[]) | 3 | 0 | 32 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -|-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| __GAP | uint256[47] | 4 | 0 | 1504 | src/IndexRegistryStorage.sol:IndexRegistryStorage | -╰-----------------------+----------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------╯ - diff --git a/docs/storage-report/RegistryCoordinator.md b/docs/storage-report/RegistryCoordinator.md index edae4c10..e69de29b 100644 --- a/docs/storage-report/RegistryCoordinator.md +++ b/docs/storage-report/RegistryCoordinator.md @@ -1,49 +0,0 @@ - -╭-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===================================================================================================================================================================================+ -| _initialized | uint8 | 0 | 0 | 1 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _initializing | bool | 0 | 1 | 1 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| __deprecated_pauserRegistry | contract IPauserRegistry | 0 | 2 | 20 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _paused | uint256 | 1 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| __gap | uint256[48] | 2 | 0 | 1536 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| __gap | uint256[50] | 50 | 0 | 1600 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _owner | address | 100 | 0 | 20 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| __gap | uint256[49] | 101 | 0 | 1568 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| quorumCount | uint8 | 150 | 0 | 1 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _quorumParams | mapping(uint8 => struct IRegistryCoordinatorTypes.OperatorSetParam) | 151 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _operatorBitmapHistory | mapping(bytes32 => struct IRegistryCoordinatorTypes.QuorumBitmapUpdate[]) | 152 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| _operatorInfo | mapping(address => struct IRegistryCoordinatorTypes.OperatorInfo) | 153 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| isChurnApproverSaltUsed | mapping(bytes32 => bool) | 154 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| quorumUpdateBlockNumber | mapping(uint8 => uint256) | 155 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| registries | address[] | 156 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| churnApprover | address | 157 | 0 | 20 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| ejector | address | 158 | 0 | 20 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| lastEjectionTimestamp | mapping(address => uint256) | 159 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| ejectionCooldown | uint256 | 160 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| isOperatorSetAVS | bool | 161 | 0 | 1 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| isM2Quorum | mapping(uint8 => bool) | 162 | 0 | 32 | src/RegistryCoordinator.sol:RegistryCoordinator | -|-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------| -| __GAP | uint256[37] | 163 | 0 | 1184 | src/RegistryCoordinator.sol:RegistryCoordinator | -╰-----------------------------+---------------------------------------------------------------------------+------+--------+-------+-------------------------------------------------╯ - diff --git a/docs/storage-report/RegistryCoordinatorStorage.md b/docs/storage-report/RegistryCoordinatorStorage.md index 655447c6..e28515ac 100644 --- a/docs/storage-report/RegistryCoordinatorStorage.md +++ b/docs/storage-report/RegistryCoordinatorStorage.md @@ -4,11 +4,11 @@ +=============================================================================================================================================================================================+ | quorumCount | uint8 | 0 | 0 | 1 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | |-------------------------+---------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------------------| -| _quorumParams | mapping(uint8 => struct IRegistryCoordinatorTypes.OperatorSetParam) | 1 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | +| _quorumParams | mapping(uint8 => struct ISlashingRegistryCoordinatorTypes.OperatorSetParam) | 1 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | |-------------------------+---------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------------------| -| _operatorBitmapHistory | mapping(bytes32 => struct IRegistryCoordinatorTypes.QuorumBitmapUpdate[]) | 2 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | +| _operatorBitmapHistory | mapping(bytes32 => struct ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate[]) | 2 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | |-------------------------+---------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------------------| -| _operatorInfo | mapping(address => struct IRegistryCoordinatorTypes.OperatorInfo) | 3 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | +| _operatorInfo | mapping(address => struct ISlashingRegistryCoordinatorTypes.OperatorInfo) | 3 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | |-------------------------+---------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------------------| | isChurnApproverSaltUsed | mapping(bytes32 => bool) | 4 | 0 | 32 | src/RegistryCoordinatorStorage.sol:RegistryCoordinatorStorage | |-------------------------+---------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------------------| diff --git a/docs/storage-report/ServiceManagerRouter.md b/docs/storage-report/ServiceManagerRouter.md index 1ec5dc07..e69de29b 100644 --- a/docs/storage-report/ServiceManagerRouter.md +++ b/docs/storage-report/ServiceManagerRouter.md @@ -1,6 +0,0 @@ - -╭------+------+------+--------+-------+----------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+================================================+ -╰------+------+------+--------+-------+----------╯ - diff --git a/docs/storage-report/StakeRegistry.md b/docs/storage-report/StakeRegistry.md index 628df515..e69de29b 100644 --- a/docs/storage-report/StakeRegistry.md +++ b/docs/storage-report/StakeRegistry.md @@ -1,21 +0,0 @@ - -╭----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+=================================================================================================================================================================================+ -| minimumStakeForQuorum | mapping(uint8 => uint96) | 0 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| _totalStakeHistory | mapping(uint8 => struct IStakeRegistryTypes.StakeUpdate[]) | 1 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| operatorStakeHistory | mapping(bytes32 => mapping(uint8 => struct IStakeRegistryTypes.StakeUpdate[])) | 2 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| strategyParams | mapping(uint8 => struct IStakeRegistryTypes.StrategyParams[]) | 3 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| strategiesPerQuorum | mapping(uint8 => contract IStrategy[]) | 4 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| stakeTypePerQuorum | mapping(uint8 => enum IStakeRegistryTypes.StakeType) | 5 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| slashableStakeLookAheadPerQuorum | mapping(uint8 => uint32) | 6 | 0 | 32 | src/StakeRegistry.sol:StakeRegistry | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------| -| __GAP | uint256[43] | 7 | 0 | 1376 | src/StakeRegistry.sol:StakeRegistry | -╰----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+-------------------------------------╯ - diff --git a/docs/storage-report/StakeRegistryStorage.md b/docs/storage-report/StakeRegistryStorage.md index 92154a7f..e69de29b 100644 --- a/docs/storage-report/StakeRegistryStorage.md +++ b/docs/storage-report/StakeRegistryStorage.md @@ -1,21 +0,0 @@ - -╭----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------╮ -| Name | Type | Slot | Offset | Bytes | Contract | -+===============================================================================================================================================================================================+ -| minimumStakeForQuorum | mapping(uint8 => uint96) | 0 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| _totalStakeHistory | mapping(uint8 => struct IStakeRegistryTypes.StakeUpdate[]) | 1 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| operatorStakeHistory | mapping(bytes32 => mapping(uint8 => struct IStakeRegistryTypes.StakeUpdate[])) | 2 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| strategyParams | mapping(uint8 => struct IStakeRegistryTypes.StrategyParams[]) | 3 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| strategiesPerQuorum | mapping(uint8 => contract IStrategy[]) | 4 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| stakeTypePerQuorum | mapping(uint8 => enum IStakeRegistryTypes.StakeType) | 5 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| slashableStakeLookAheadPerQuorum | mapping(uint8 => uint32) | 6 | 0 | 32 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -|----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------| -| __GAP | uint256[43] | 7 | 0 | 1376 | src/StakeRegistryStorage.sol:StakeRegistryStorage | -╰----------------------------------+--------------------------------------------------------------------------------+------+--------+-------+---------------------------------------------------╯ - diff --git a/foundry.toml b/foundry.toml index 7b02b1c8..ce96ecd1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -74,7 +74,7 @@ # Quotation mark style quote_style = "double" # Options: "double", "single", "preserve" # Style of underscores in number literals - number_underscore = "thousands" # Options: "preserve", "thousands", "remove" + number_underscore = "remove" # Options: "preserve", "thousands", "remove" # Whether or not to wrap comments at line_length wrap_comments = false # List of files to ignore during formatting (can use glob patterns) diff --git a/src/BLSSignatureCheckerStorage.sol b/src/BLSSignatureCheckerStorage.sol index 48f69469..59bd073a 100644 --- a/src/BLSSignatureCheckerStorage.sol +++ b/src/BLSSignatureCheckerStorage.sol @@ -8,7 +8,7 @@ import {IStakeRegistry, IDelegationManager} from "./interfaces/IStakeRegistry.so abstract contract BLSSignatureCheckerStorage is IBLSSignatureChecker { /// @dev Returns the assumed gas cost of multiplying 2 pairings. - uint256 internal constant PAIRING_EQUALITY_CHECK_GAS = 120_000; + uint256 internal constant PAIRING_EQUALITY_CHECK_GAS = 120000; /// @inheritdoc IBLSSignatureChecker ISlashingRegistryCoordinator public immutable registryCoordinator; diff --git a/src/EjectionManagerStorage.sol b/src/EjectionManagerStorage.sol index cc02f383..e8996cd6 100644 --- a/src/EjectionManagerStorage.sol +++ b/src/EjectionManagerStorage.sol @@ -7,7 +7,7 @@ import {IEjectionManager} from "./interfaces/IEjectionManager.sol"; abstract contract EjectionManagerStorage is IEjectionManager { /// @notice The basis point denominator for the ejectable stake percent - uint16 internal constant BIPS_DENOMINATOR = 10_000; + uint16 internal constant BIPS_DENOMINATOR = 10000; /// @notice The max number of quorums uint8 internal constant MAX_QUORUM_COUNT = 192; diff --git a/src/RegistryCoordinator.sol b/src/RegistryCoordinator.sol index b13e8ee9..590b8386 100644 --- a/src/RegistryCoordinator.sol +++ b/src/RegistryCoordinator.sol @@ -12,6 +12,8 @@ import {IRegistryCoordinator} from "./interfaces/IRegistryCoordinator.sol"; import {BitmapUtils} from "./libraries/BitmapUtils.sol"; import {SlashingRegistryCoordinator} from "./SlashingRegistryCoordinator.sol"; +import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol"; +import {OwnableUpgradeable} from "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol"; /** * @title A `RegistryCoordinator` that has three registries: @@ -21,7 +23,7 @@ import {SlashingRegistryCoordinator} from "./SlashingRegistryCoordinator.sol"; * * @author Layr Labs, Inc. */ -contract RegistryCoordinator is SlashingRegistryCoordinator { +contract RegistryCoordinator is IRegistryCoordinator, SlashingRegistryCoordinator { using BitmapUtils for *; /// @notice the ServiceManager for this AVS, which forwards calls onto EigenLayer's core contracts @@ -52,7 +54,7 @@ contract RegistryCoordinator is SlashingRegistryCoordinator { * */ - // /// @inheritdoc IRegistryCoordinator + /// @inheritdoc IRegistryCoordinator function registerOperator( bytes memory quorumNumbers, string memory socket, @@ -100,7 +102,7 @@ contract RegistryCoordinator is SlashingRegistryCoordinator { } } - // /// @inheritdoc IRegistryCoordinator + /// @inheritdoc IRegistryCoordinator function registerOperatorWithChurn( bytes calldata quorumNumbers, string memory socket, @@ -140,21 +142,20 @@ contract RegistryCoordinator is SlashingRegistryCoordinator { } } - // /// @inheritdoc IRegistryCoordinator + /// @inheritdoc IRegistryCoordinator function deregisterOperator( bytes memory quorumNumbers - ) external onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR) { + ) external override onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR) { // Check that the quorum numbers are M2 quorums for (uint256 i = 0; i < quorumNumbers.length; i++) { require( - !operatorSetsEnabled || _isM2Quorum(uint8(quorumNumbers[i])), - OperatorSetsAlreadyEnabled() + !operatorSetsEnabled || _isM2Quorum(uint8(quorumNumbers[i])), OperatorSetQuorum() ); } _deregisterOperator({operator: msg.sender, quorumNumbers: quorumNumbers}); } - // /// @inheritdoc IRegistryCoordinator + /// @inheritdoc IRegistryCoordinator function enableOperatorSets() external onlyOwner { require(!operatorSetsEnabled, OperatorSetsAlreadyEnabled()); @@ -167,7 +168,7 @@ contract RegistryCoordinator is SlashingRegistryCoordinator { emit OperatorSetsEnabled(); } - // /// @inheritdoc IRegistryCoordinator + /// @inheritdoc IRegistryCoordinator function disableM2QuorumRegistration() external onlyOwner { require(operatorSetsEnabled, OperatorSetsNotEnabled()); @@ -203,4 +204,14 @@ contract RegistryCoordinator is SlashingRegistryCoordinator { // This is a safe operation since we limit MAX_QUORUM_COUNT to 192 return (1 << quorumCount) - 1; } + + /// @dev need to override function here since its defined in both these contracts + function owner() + public + view + override(SlashingRegistryCoordinator, ISlashingRegistryCoordinator) + returns (address) + { + return OwnableUpgradeable.owner(); + } } diff --git a/src/SlashingRegistryCoordinator.sol b/src/SlashingRegistryCoordinator.sol index 9102c0f1..111a6d48 100644 --- a/src/SlashingRegistryCoordinator.sol +++ b/src/SlashingRegistryCoordinator.sol @@ -26,7 +26,6 @@ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/draft-EIP712.so import {Pausable} from "eigenlayer-contracts/src/contracts/permissions/Pausable.sol"; import {SlashingRegistryCoordinatorStorage} from "./SlashingRegistryCoordinatorStorage.sol"; -import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; /** * @title A `RegistryCoordinator` that has three registries: @@ -42,7 +41,6 @@ contract SlashingRegistryCoordinator is Pausable, OwnableUpgradeable, SlashingRegistryCoordinatorStorage, - IAVSRegistrar, ISignatureUtils { using BitmapUtils for *; @@ -160,7 +158,7 @@ contract SlashingRegistryCoordinator is address operator, uint32[] memory operatorSetIds, bytes calldata data - ) external onlyAllocationManager onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) { + ) external override onlyAllocationManager onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) { require(operatorSetsEnabled, OperatorSetsNotEnabled()); bytes memory quorumNumbers = _getQuorumNumbers(operatorSetIds); @@ -240,7 +238,7 @@ contract SlashingRegistryCoordinator is function deregisterOperator( address operator, uint32[] memory operatorSetIds - ) external onlyAllocationManager onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR) { + ) external override onlyAllocationManager onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR) { require(operatorSetsEnabled, OperatorSetsNotEnabled()); bytes memory quorumNumbers = _getQuorumNumbers(operatorSetIds); _deregisterOperator(operator, quorumNumbers); @@ -1121,6 +1119,7 @@ contract SlashingRegistryCoordinator is function owner() public view + virtual override(OwnableUpgradeable, ISlashingRegistryCoordinator) returns (address) { diff --git a/src/SlashingRegistryCoordinatorStorage.sol b/src/SlashingRegistryCoordinatorStorage.sol index e8c9eb9b..421d1fbc 100644 --- a/src/SlashingRegistryCoordinatorStorage.sol +++ b/src/SlashingRegistryCoordinatorStorage.sol @@ -30,7 +30,7 @@ abstract contract SlashingRegistryCoordinatorStorage is ISlashingRegistryCoordin /// @notice The maximum value of a quorum bitmap uint256 internal constant MAX_QUORUM_BITMAP = type(uint192).max; /// @notice The basis point denominator - uint16 internal constant BIPS_DENOMINATOR = 10_000; + uint16 internal constant BIPS_DENOMINATOR = 10000; /// @notice Index for flag that pauses operator registration uint8 internal constant PAUSED_REGISTER_OPERATOR = 0; /// @notice Index for flag that pauses operator deregistration diff --git a/src/StakeRegistryStorage.sol b/src/StakeRegistryStorage.sol index 0a928c16..2c00aec2 100644 --- a/src/StakeRegistryStorage.sol +++ b/src/StakeRegistryStorage.sol @@ -25,7 +25,7 @@ abstract contract StakeRegistryStorage is IStakeRegistry { /// @notice Maximum length of dynamic arrays in the `strategyParams` mapping. uint8 public constant MAX_WEIGHING_FUNCTION_LENGTH = 32; /// @notice Constant used as a divisor in dealing with BIPS amounts. - uint256 internal constant MAX_BIPS = 10_000; + uint256 internal constant MAX_BIPS = 10000; /// @notice The address of the Delegation contract for EigenLayer. IDelegationManager public immutable delegation; diff --git a/src/interfaces/IRegistryCoordinator.sol b/src/interfaces/IRegistryCoordinator.sol index a2fe373b..c085a27a 100644 --- a/src/interfaces/IRegistryCoordinator.sol +++ b/src/interfaces/IRegistryCoordinator.sol @@ -1,138 +1,31 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; -import {IAllocationManager} from - "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; +import { + ISlashingRegistryCoordinator, + ISlashingRegistryCoordinatorErrors, + ISlashingRegistryCoordinatorEvents, + ISlashingRegistryCoordinatorTypes +} from "./ISlashingRegistryCoordinator.sol"; import {ISignatureUtils} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtils.sol"; +import {IBLSApkRegistryTypes} from "./IBLSApkRegistry.sol"; import {IServiceManager} from "./IServiceManager.sol"; -import {IBLSApkRegistry, IBLSApkRegistryTypes} from "./IBLSApkRegistry.sol"; -import {IStakeRegistry, IStakeRegistryTypes} from "./IStakeRegistry.sol"; -import {IIndexRegistry} from "./IIndexRegistry.sol"; -import {BN254} from "../libraries/BN254.sol"; -interface IRegistryCoordinatorErrors { +interface IRegistryCoordinatorErrors is ISlashingRegistryCoordinatorErrors { /// @notice Thrown when operator sets mode is already enabled. error OperatorSetsAlreadyEnabled(); - /// @notice Thrown when operator set operations are attempted while not enabled. - error OperatorSetsNotEnabled(); - /// @notice Thrown when maximum quorum count is reached. - error MaxQuorumsReached(); + /// @notice Thrown when a quorum is an operator set quorum. + error OperatorSetQuorum(); /// @notice Thrown when M2 quorums are already disabled. error M2QuorumsAlreadyDisabled(); } -interface IRegistryCoordinatorTypes { - /// @notice Represents the registration state of an operator. - /// @dev Used to track an operator's lifecycle in the system. - /// @custom:enum NEVER_REGISTERED The operator has never registered with the system. - /// @custom:enum REGISTERED The operator is currently registered and active. - /// @custom:enum DEREGISTERED The operator was previously registered but has since deregistered. - enum OperatorStatus { - NEVER_REGISTERED, - REGISTERED, - DEREGISTERED - } - - /// @notice Core data structure for tracking operator information. - /// @dev Links an operator's unique identifier with their current registration status. - /// @param operatorId Unique identifier for the operator, typically derived from their BLS public key. - /// @param status Current registration state of the operator in the system. - struct OperatorInfo { - bytes32 operatorId; - OperatorStatus status; - } - - /// @notice Records historical changes to an operator's quorum registrations. - /// @dev Used for querying an operator's quorum memberships at specific block numbers. - /// @param updateBlockNumber Block number when this update occurred (inclusive). - /// @param nextUpdateBlockNumber Block number when the next update occurred (exclusive), or 0 if this is the latest update. - /// @param quorumBitmap Bitmap where each bit represents registration in a specific quorum (1 = registered, 0 = not registered). - struct QuorumBitmapUpdate { - uint32 updateBlockNumber; - uint32 nextUpdateBlockNumber; - uint192 quorumBitmap; - } - - /// @notice Configuration parameters for operator management within a quorum. - /// @dev All BIPs (Basis Points) values are in relation to BIPS_DENOMINATOR (10000). - /// @param maxOperatorCount Maximum number of operators allowed in the quorum. - /// @param kickBIPsOfOperatorStake Required stake ratio (in BIPs) between new and existing operator for churn. - /// Example: 10500 means new operator needs 105% of existing operator's stake. - /// @param kickBIPsOfTotalStake Minimum stake ratio (in BIPs) of total quorum stake an operator must maintain. - /// Example: 100 means operator needs 1% of total quorum stake to avoid being churned. - struct OperatorSetParam { - uint32 maxOperatorCount; - uint16 kickBIPsOfOperatorStake; - uint16 kickBIPsOfTotalStake; - } - - /// @notice Parameters for removing an operator during churn. - /// @dev Used in registerOperatorWithChurn to specify which operator to replace. - /// @param quorumNumber The quorum from which to remove the operator. - /// @param operator Address of the operator to be removed. - struct OperatorKickParam { - uint8 quorumNumber; - address operator; - } -} - -interface IRegistryCoordinatorEvents is IRegistryCoordinatorTypes { - /** - * @notice Emitted when an operator registers for service in one or more quorums. - * @dev Emitted in _registerOperator() and _registerOperatorToOperatorSet(). - * @param operator The address of the registered operator. - * @param operatorId The unique identifier of the operator (BLS public key hash). - */ - event OperatorRegistered(address indexed operator, bytes32 indexed operatorId); - - /** - * @notice Emitted when an operator deregisters from service in one or more quorums. - * @dev Emitted in _deregisterOperator(). - * @param operator The address of the deregistered operator. - * @param operatorId The unique identifier of the operator (BLS public key hash). - */ - event OperatorDeregistered(address indexed operator, bytes32 indexed operatorId); - - /** - * @notice Emitted when a quorum's operator set parameters are updated. - * @dev Emitted in _setOperatorSetParams(). - * @param quorumNumber The identifier of the quorum being updated. - * @param operatorSetParams The new operator set parameters for the quorum. - */ - event OperatorSetParamsUpdated(uint8 indexed quorumNumber, OperatorSetParam operatorSetParams); - - /** - * @notice Emitted when the churn approver address is updated. - * @dev Emitted in _setChurnApprover(). - * @param prevChurnApprover The previous churn approver address. - * @param newChurnApprover The new churn approver address. - */ - event ChurnApproverUpdated(address prevChurnApprover, address newChurnApprover); - - /** - * @notice Emitted when the ejector address is updated. - * @dev Emitted in _setEjector(). - * @param prevEjector The previous ejector address. - * @param newEjector The new ejector address. - */ - event EjectorUpdated(address prevEjector, address newEjector); - - /** - * @notice Emitted when all operators in a quorum are updated simultaneously. - * @dev Emitted in updateOperatorsForQuorum(). - * @param quorumNumber The identifier of the quorum being updated. - * @param blocknumber The block number at which the quorum update occurred. - */ - event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber); - - /** - * @notice Emitted when an operator's socket is updated. - * @dev Emitted in updateSocket(). - * @param operatorId The unique identifier of the operator (BLS public key hash). - * @param socket The new socket address for the operator (typically an IP address). - */ - event OperatorSocketUpdate(bytes32 indexed operatorId, string socket); +interface IRegistryCoordinatorTypes is ISlashingRegistryCoordinatorTypes {} +interface IRegistryCoordinatorEvents is + ISlashingRegistryCoordinatorEvents, + IRegistryCoordinatorTypes +{ /** * @notice Emitted when operator sets mode is enabled. * @dev Emitted in enableOperatorSets(). @@ -146,128 +39,18 @@ interface IRegistryCoordinatorEvents is IRegistryCoordinatorTypes { event M2QuorumsDisabled(); } -interface IRegistryCoordinator is IRegistryCoordinatorErrors, IRegistryCoordinatorEvents { - /// IMMUTABLES & CONSTANTS - - /** - * @notice EIP-712 typehash for operator churn approval signatures. - * @return The typehash constant. - */ - function OPERATOR_CHURN_APPROVAL_TYPEHASH() external view returns (bytes32); - - /** - * @notice EIP-712 typehash for pubkey registration signatures. - * @return The typehash constant. - */ - function PUBKEY_REGISTRATION_TYPEHASH() external view returns (bytes32); - +interface IRegistryCoordinator is + IRegistryCoordinatorErrors, + IRegistryCoordinatorEvents, + ISlashingRegistryCoordinator +{ /** * @notice Reference to the ServiceManager contract. * @return The ServiceManager contract interface. + * @dev This is only relevant for Pre-Slashing AVSs */ function serviceManager() external view returns (IServiceManager); - /** - * @notice Reference to the BLSApkRegistry contract. - * @return The BLSApkRegistry contract interface. - */ - function blsApkRegistry() external view returns (IBLSApkRegistry); - - /** - * @notice Reference to the StakeRegistry contract. - * @return The StakeRegistry contract interface. - */ - function stakeRegistry() external view returns (IStakeRegistry); - - /** - * @notice Reference to the IndexRegistry contract. - * @return The IndexRegistry contract interface. - */ - function indexRegistry() external view returns (IIndexRegistry); - - /** - * @notice Reference to the AllocationManager contract. - * @return The AllocationManager contract interface. - */ - function allocationManager() external view returns (IAllocationManager); - - /// STORAGE - - /** - * @notice The total number of quorums that have been created. - * @return The count of quorums. - */ - function quorumCount() external view returns (uint8); - - /** - * @notice Checks if a churn approver salt has been used. - * @param salt The salt to check. - * @return True if the salt has been used, false otherwise. - */ - function isChurnApproverSaltUsed( - bytes32 salt - ) external view returns (bool); - - /** - * @notice Gets the last block number when all operators in a quorum were updated. - * @param quorumNumber The quorum identifier. - * @return The block number of the last update. - */ - function quorumUpdateBlockNumber( - uint8 quorumNumber - ) external view returns (uint256); - - /** - * @notice Gets the registry contract address at a specific index. - * @param index The index in the registries array. - * @return The registry contract address. - */ - function registries( - uint256 index - ) external view returns (address); - - /** - * @notice The address authorized to approve operator churn operations. - * @return The churn approver address. - */ - function churnApprover() external view returns (address); - - /** - * @notice The address authorized to forcibly eject operators. - * @return The ejector address. - */ - function ejector() external view returns (address); - - /** - * @notice Gets the timestamp of an operator's last ejection. - * @param operator The operator address. - * @return The timestamp of the last ejection. - */ - function lastEjectionTimestamp( - address operator - ) external view returns (uint256); - - /** - * @notice The cooldown period after ejection before an operator can re-register. - * @return The cooldown duration in seconds. - */ - function ejectionCooldown() external view returns (uint256); - - /** - * @notice Indicates if the AVS is using operator sets. - * @return True if operator sets are enabled, false otherwise. - */ - function isOperatorSetAVS() external view returns (bool); - - /** - * @notice Checks if a quorum is an M2 quorum. - * @param quorumNumber The quorum identifier. - * @return True if the quorum is M2, false otherwise. - */ - function isM2Quorum( - uint8 quorumNumber - ) external view returns (bool); - /// ACTIONS /** @@ -279,6 +62,7 @@ interface IRegistryCoordinator is IRegistryCoordinatorErrors, IRegistryCoordinat * @param operatorSignature is the signature of the operator used by the AVS to register the operator in the delegation manager. * @dev `params` is ignored if the caller has previously registered a public key. * @dev `operatorSignature` is ignored if the operator's status is already REGISTERED. + * @dev This function registers operators to the AVSDirectory using the M2-registration pathway. */ function registerOperator( bytes memory quorumNumbers, @@ -299,6 +83,7 @@ interface IRegistryCoordinator is IRegistryCoordinatorErrors, IRegistryCoordinat * @param operatorSignature is the signature of the operator used by the AVS to register the operator in the delegation manager. * @dev `params` is ignored if the caller has previously registered a public key. * @dev `operatorSignature` is ignored if the operator's status is already REGISTERED. + * @dev This function registers operators to the AVSDirectory using the M2-registration pathway. */ function registerOperatorWithChurn( bytes calldata quorumNumbers, @@ -315,17 +100,12 @@ interface IRegistryCoordinator is IRegistryCoordinatorErrors, IRegistryCoordinat * will be updated to DEREGISTERED. * @param quorumNumbers is an ordered byte array containing the quorum numbers being deregistered from. * @dev Will revert if operator is not currently registered for any of the specified quorums. + * @dev This function deregisters operators from the AVSDirectory using the M2-registration pathway. */ function deregisterOperator( bytes memory quorumNumbers ) external; - /** - * @notice Checks if the AVS is using operator sets mode for operator management. - * @return True if operator sets are enabled, false if using the legacy registration system. - */ - function isUsingOperatorSets() external view returns (bool); - /** * @notice Enables operator sets mode for the AVS. Once enabled, this cannot be disabled. * @dev When enabled, all existing quorums are marked as M2 quorums and future quorums must be explicitly @@ -334,284 +114,8 @@ interface IRegistryCoordinator is IRegistryCoordinatorErrors, IRegistryCoordinat function enableOperatorSets() external; /** - * @notice Registers an operator through the allocation manager for operator set quorums. - * @param operator The operator address to register. - * @param operatorSetIds The operator set IDs to register for (corresponds to quorum numbers). - * @param data Additional registration data containing the operator's socket and BLS public key parameters. - * @dev Can only be called by the allocation manager. - * @dev Will revert if operator sets are not enabled or if registering for M2 quorums. - */ - function registerOperator( - address operator, - uint32[] memory operatorSetIds, - bytes memory data - ) external; - - /** - * @notice Deregisters an operator through the allocation manager from operator set quorums. - * @param operator The operator address to deregister. - * @param operatorSetIds The operator set IDs to deregister from (corresponds to quorum numbers). - * @dev Can only be called by the allocation manager. - * @dev Will revert if operator sets are not enabled or if deregistering from M2 quorums. - */ - function deregisterOperator(address operator, uint32[] memory operatorSetIds) external; - - /** - * @notice Updates stake weights for specified operators. If any operator is found to be below - * the minimum stake for their registered quorums, they are deregistered from those quorums. - * @param operators The operators whose stakes should be updated. - * @dev Stakes are queried from the Eigenlayer core DelegationManager contract. - */ - function updateOperators( - address[] memory operators - ) external; - - /** - * @notice For each quorum in `quorumNumbers`, updates the StakeRegistry's view of ALL its registered operators' stakes. - * Each quorum's `quorumUpdateBlockNumber` is also updated, which tracks the most recent block number when ALL registered - * operators were updated. - * @param operatorsPerQuorum for each quorum in `quorumNumbers`, this has a corresponding list of operators to update. - * @param quorumNumbers is an ordered byte array containing the quorum numbers being updated. - * @dev Each list of operator addresses MUST be sorted in ascending order. - * @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum. - * @dev Stakes are queried from the Eigenlayer core DelegationManager contract. - * @dev Will revert if an operator registers/deregisters for any quorum in `quorumNumbers` after transaction broadcast but before execution. - */ - function updateOperatorsForQuorum( - address[][] memory operatorsPerQuorum, - bytes calldata quorumNumbers - ) external; - - /** - * @notice Updates the socket of the msg.sender given they are a registered operator. - * @param socket The new socket address for the operator (typically an IP address). - * @dev Will revert if msg.sender is not a registered operator. - */ - function updateSocket( - string memory socket - ) external; - - /** - * @notice Forcibly removes an operator from specified quorums and sets their ejection timestamp. - * @param operator The operator address to eject. - * @param quorumNumbers The quorum numbers to eject the operator from. - * @dev Can only be called by the ejector address. - * @dev The operator cannot re-register until ejectionCooldown period has passed. - */ - function ejectOperator(address operator, bytes memory quorumNumbers) external; - - /** - * @notice Creates a new quorum that tracks total delegated stake for operators. - * @param operatorSetParams Configures the quorum's max operator count and churn parameters. - * @param minimumStake Sets the minimum stake required for an operator to register or remain registered. - * @param strategyParams A list of strategies and multipliers used by the StakeRegistry to calculate - * an operator's stake weight for the quorum. - * @dev For m2 AVS this function has the same behavior as createQuorum before. - * @dev For migrated AVS that enable operator sets this will create a quorum that measures total delegated stake for operator set. - */ - function createTotalDelegatedStakeQuorum( - OperatorSetParam memory operatorSetParams, - uint96 minimumStake, - IStakeRegistryTypes.StrategyParams[] memory strategyParams - ) external; - - /** - * @notice Creates a new quorum that tracks slashable stake for operators. - * @param operatorSetParams Configures the quorum's max operator count and churn parameters. - * @param minimumStake Sets the minimum stake required for an operator to register or remain registered. - * @param strategyParams A list of strategies and multipliers used by the StakeRegistry to calculate - * an operator's stake weight for the quorum. - * @param lookAheadPeriod The number of blocks to look ahead when calculating slashable stake. - * @dev Can only be called when operator sets are enabled. - */ - function createSlashableStakeQuorum( - OperatorSetParam memory operatorSetParams, - uint96 minimumStake, - IStakeRegistryTypes.StrategyParams[] memory strategyParams, - uint32 lookAheadPeriod - ) external; - - /** - * @notice Updates the configuration parameters for an existing operator set quorum. - * @param quorumNumber The identifier of the quorum to update. - * @param operatorSetParams The new operator set parameters to apply. - * @dev Can only be called by the contract owner. - */ - function setOperatorSetParams( - uint8 quorumNumber, - OperatorSetParam memory operatorSetParams - ) external; - - /** - * @notice Updates the address authorized to approve operator churn operations. - * @param _churnApprover The new churn approver address. - * @dev Can only be called by the contract owner. - * @dev The churn approver is responsible for signing off on operator replacements in full quorums. - */ - function setChurnApprover( - address _churnApprover - ) external; - - /** - * @notice Updates the address authorized to forcibly eject operators. - * @param _ejector The new ejector address. - * @dev Can only be called by the contract owner. - * @dev The ejector can force-remove operators from quorums regardless of their stake. - */ - function setEjector( - address _ejector - ) external; - - /** - * @notice Updates the duration operators must wait after ejection before re-registering. - * @param _ejectionCooldown The new cooldown duration in seconds. - * @dev Can only be called by the contract owner. - */ - function setEjectionCooldown( - uint256 _ejectionCooldown - ) external; - - /// VIEW - - /** - * @notice Returns the operator set parameters for a given quorum. - * @param quorumNumber The identifier of the quorum to query. - * @return The OperatorSetParam struct containing max operator count and churn thresholds. - */ - function getOperatorSetParams( - uint8 quorumNumber - ) external view returns (OperatorSetParam memory); - - /** - * @notice Returns the complete operator information for a given address. - * @param operator The operator address to query. - * @return An OperatorInfo struct containing the operator's ID and registration status. - */ - function getOperator( - address operator - ) external view returns (OperatorInfo memory); - - /** - * @notice Returns the unique identifier for a given operator address. - * @param operator The operator address to query. - * @return The operator's ID (derived from their BLS public key hash). - */ - function getOperatorId( - address operator - ) external view returns (bytes32); - - /** - * @notice Returns the operator address associated with a given operator ID. - * @param operatorId The unique identifier to look up. - * @return The operator's address. - * @dev Returns address(0) if the ID is not registered. - */ - function getOperatorFromId( - bytes32 operatorId - ) external view returns (address); - - /** - * @notice Returns the current registration status for a given operator. - * @param operator The operator address to query. - * @return The operator's status (NEVER_REGISTERED, REGISTERED, or DEREGISTERED). - */ - function getOperatorStatus( - address operator - ) external view returns (OperatorStatus); - - /** - * @notice Returns the indices needed to look up quorum bitmaps for operators at a specific block. - * @param blockNumber The historical block number to query. - * @param operatorIds Array of operator IDs to get indices for. - * @return Array of indices corresponding to each operator ID. - * @dev Reverts if any operator had not yet registered at the specified block. - * @dev This function is designed to find proper inputs for getQuorumBitmapAtBlockNumberByIndex. - */ - function getQuorumBitmapIndicesAtBlockNumber( - uint32 blockNumber, - bytes32[] memory operatorIds - ) external view returns (uint32[] memory); - - /** - * @notice Returns the quorum bitmap for an operator at a specific historical block. - * @param operatorId The operator's unique identifier. - * @param blockNumber The historical block number to query. - * @param index The index in the operator's bitmap history (from getQuorumBitmapIndicesAtBlockNumber). - * @return The quorum bitmap showing which quorums the operator was registered for. - * @dev Reverts if the index is incorrect for the specified block number. - */ - function getQuorumBitmapAtBlockNumberByIndex( - bytes32 operatorId, - uint32 blockNumber, - uint256 index - ) external view returns (uint192); - - /** - * @notice Returns a specific update from an operator's quorum bitmap history. - * @param operatorId The operator's unique identifier. - * @param index The index in the bitmap history to query. - * @return The QuorumBitmapUpdate struct at that index. - */ - function getQuorumBitmapUpdateByIndex( - bytes32 operatorId, - uint256 index - ) external view returns (QuorumBitmapUpdate memory); - - /** - * @notice Returns the current quorum bitmap for an operator. - * @param operatorId The operator's unique identifier. - * @return A bitmap where each bit represents registration in a specific quorum. - * @dev Returns 0 if the operator is not registered for any quorums. - */ - function getCurrentQuorumBitmap( - bytes32 operatorId - ) external view returns (uint192); - - /** - * @notice Returns the number of updates in an operator's bitmap history. - * @param operatorId The operator's unique identifier. - * @return The length of the bitmap history array. - */ - function getQuorumBitmapHistoryLength( - bytes32 operatorId - ) external view returns (uint256); - - /** - * @notice Returns the number of registry contracts managed by this coordinator. - * @return The count of registry contracts (typically 3: stake, BLS, and index). - */ - function numRegistries() external view returns (uint256); - - /** - * @notice Calculates the digest hash that must be signed by the churn approver. - * @param registeringOperator The address of the operator attempting to register. - * @param registeringOperatorId The unique ID of the registering operator. - * @param operatorKickParams Parameters specifying which operators to replace in full quorums. - * @param salt Random value to ensure signature uniqueness. - * @param expiry Timestamp after which the signature becomes invalid. - * @return The EIP-712 typed data hash to be signed. - */ - function calculateOperatorChurnApprovalDigestHash( - address registeringOperator, - bytes32 registeringOperatorId, - OperatorKickParam[] memory operatorKickParams, - bytes32 salt, - uint256 expiry - ) external view returns (bytes32); - - /** - * @notice Returns the message hash that an operator must sign to register their BLS public key. - * @param operator The address of the operator registering their key. - * @return A point on the G1 curve representing the message hash. - */ - function pubkeyRegistrationMessageHash( - address operator - ) external view returns (BN254.G1Point memory); - - /** - * @notice Returns the address of the contract owner. - * @return The owner's address. - * @dev The owner can update contract configuration and create new quorums. + * @notice Disables M2 quorum registration for the AVS. Once disabled, this cannot be enabled. + * @dev When disabled, all registrations to M2 quorums will revert. Deregistrations are still possible. */ - function owner() external view returns (address); + function disableM2QuorumRegistration() external; } diff --git a/src/interfaces/ISlashingRegistryCoordinator.sol b/src/interfaces/ISlashingRegistryCoordinator.sol index 5e45ea85..70b74af8 100644 --- a/src/interfaces/ISlashingRegistryCoordinator.sol +++ b/src/interfaces/ISlashingRegistryCoordinator.sol @@ -1,19 +1,19 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.27; -import { - IRegistryCoordinator, - IRegistryCoordinatorErrors, - IRegistryCoordinatorEvents, - IRegistryCoordinatorTypes -} from "./IRegistryCoordinator.sol"; -import {IServiceManager} from "./IServiceManager.sol"; import {IBLSApkRegistry} from "./IBLSApkRegistry.sol"; import {IStakeRegistry} from "./IStakeRegistry.sol"; import {IIndexRegistry} from "./IIndexRegistry.sol"; import {BN254} from "../libraries/BN254.sol"; +import {IAllocationManager} from + "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol"; +import {IBLSApkRegistry} from "./IBLSApkRegistry.sol"; +import {IStakeRegistry, IStakeRegistryTypes} from "./IStakeRegistry.sol"; +import {IIndexRegistry} from "./IIndexRegistry.sol"; +import {BN254} from "../libraries/BN254.sol"; +import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol"; -interface ISlashingRegistryCoordinatorErrors is IRegistryCoordinatorErrors { +interface ISlashingRegistryCoordinatorErrors { /// @notice Thrown when array lengths in input parameters don't match. error InputLengthMismatch(); /// @notice Thrown when an invalid registration type is provided. @@ -48,9 +48,66 @@ interface ISlashingRegistryCoordinatorErrors is IRegistryCoordinatorErrors { error ChurnApproverSaltUsed(); /// @notice Thrown when operators or quorums list is not sorted ascending. error NotSorted(); + /// @notice Thrown when maximum quorum count is reached. + error MaxQuorumsReached(); + /// @notice Thrown when operator set operations are attempted while not enabled. + error OperatorSetsNotEnabled(); } -interface ISlashingRegistryCoordinatorTypes is IRegistryCoordinatorTypes { +interface ISlashingRegistryCoordinatorTypes { + /// @notice Core data structure for tracking operator information. + /// @dev Links an operator's unique identifier with their current registration status. + /// @param operatorId Unique identifier for the operator, typically derived from their BLS public key. + /// @param status Current registration state of the operator in the system. + struct OperatorInfo { + bytes32 operatorId; + OperatorStatus status; + } + + /// @notice Records historical changes to an operator's quorum registrations. + /// @dev Used for querying an operator's quorum memberships at specific block numbers. + /// @param updateBlockNumber Block number when this update occurred (inclusive). + /// @param nextUpdateBlockNumber Block number when the next update occurred (exclusive), or 0 if this is the latest update. + /// @param quorumBitmap Bitmap where each bit represents registration in a specific quorum (1 = registered, 0 = not registered). + struct QuorumBitmapUpdate { + uint32 updateBlockNumber; + uint32 nextUpdateBlockNumber; + uint192 quorumBitmap; + } + + /// @notice Configuration parameters for operator management within a quorum. + /// @dev All BIPs (Basis Points) values are in relation to BIPS_DENOMINATOR (10000). + /// @param maxOperatorCount Maximum number of operators allowed in the quorum. + /// @param kickBIPsOfOperatorStake Required stake ratio (in BIPs) between new and existing operator for churn. + /// Example: 10500 means new operator needs 105% of existing operator's stake. + /// @param kickBIPsOfTotalStake Minimum stake ratio (in BIPs) of total quorum stake an operator must maintain. + /// Example: 100 means operator needs 1% of total quorum stake to avoid being churned. + struct OperatorSetParam { + uint32 maxOperatorCount; + uint16 kickBIPsOfOperatorStake; + uint16 kickBIPsOfTotalStake; + } + + /// @notice Parameters for removing an operator during churn. + /// @dev Used in registerOperatorWithChurn to specify which operator to replace. + /// @param quorumNumber The quorum from which to remove the operator. + /// @param operator Address of the operator to be removed. + struct OperatorKickParam { + uint8 quorumNumber; + address operator; + } + + /// @notice Represents the registration state of an operator. + /// @dev Used to track an operator's lifecycle in the system. + /// @custom:enum NEVER_REGISTERED The operator has never registered with the system. + /// @custom:enum REGISTERED The operator is currently registered and active. + /// @custom:enum DEREGISTERED The operator was previously registered but has since deregistered. + enum OperatorStatus { + NEVER_REGISTERED, + REGISTERED, + DEREGISTERED + } + /** * @notice Enum representing the type of operator registration. * @custom:enum NORMAL Represents a normal operator registration. @@ -75,84 +132,382 @@ interface ISlashingRegistryCoordinatorTypes is IRegistryCoordinatorTypes { } } -interface ISlashingRegistryCoordinatorEvents is - IRegistryCoordinatorEvents, - ISlashingRegistryCoordinatorTypes -{} +interface ISlashingRegistryCoordinatorEvents is ISlashingRegistryCoordinatorTypes { + /** + * @notice Emitted when an operator registers for service in one or more quorums. + * @dev Emitted in _registerOperator() and _registerOperatorToOperatorSet(). + * @param operator The address of the registered operator. + * @param operatorId The unique identifier of the operator (BLS public key hash). + */ + event OperatorRegistered(address indexed operator, bytes32 indexed operatorId); + + /** + * @notice Emitted when an operator deregisters from service in one or more quorums. + * @dev Emitted in _deregisterOperator(). + * @param operator The address of the deregistered operator. + * @param operatorId The unique identifier of the operator (BLS public key hash). + */ + event OperatorDeregistered(address indexed operator, bytes32 indexed operatorId); + + /** + * @notice Emitted when a quorum's operator set parameters are updated. + * @dev Emitted in _setOperatorSetParams(). + * @param quorumNumber The identifier of the quorum being updated. + * @param operatorSetParams The new operator set parameters for the quorum. + */ + event OperatorSetParamsUpdated(uint8 indexed quorumNumber, OperatorSetParam operatorSetParams); + + /** + * @notice Emitted when the churn approver address is updated. + * @dev Emitted in _setChurnApprover(). + * @param prevChurnApprover The previous churn approver address. + * @param newChurnApprover The new churn approver address. + */ + event ChurnApproverUpdated(address prevChurnApprover, address newChurnApprover); + + /** + * @notice Emitted when the ejector address is updated. + * @dev Emitted in _setEjector(). + * @param prevEjector The previous ejector address. + * @param newEjector The new ejector address. + */ + event EjectorUpdated(address prevEjector, address newEjector); + + /** + * @notice Emitted when all operators in a quorum are updated simultaneously. + * @dev Emitted in updateOperatorsForQuorum(). + * @param quorumNumber The identifier of the quorum being updated. + * @param blocknumber The block number at which the quorum update occurred. + */ + event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber); + + /** + * @notice Emitted when an operator's socket is updated. + * @dev Emitted in updateSocket(). + * @param operatorId The unique identifier of the operator (BLS public key hash). + * @param socket The new socket address for the operator (typically an IP address). + */ + event OperatorSocketUpdate(bytes32 indexed operatorId, string socket); +} interface ISlashingRegistryCoordinator is + IAVSRegistrar, ISlashingRegistryCoordinatorErrors, ISlashingRegistryCoordinatorEvents { + /// IMMUTABLES & CONSTANTS + /** - * @notice Returns the operator set params for the given quorum number - * @param quorumNumber The quorum number to get params for - * @return The operator set parameters for the specified quorum + * @notice EIP-712 typehash for operator churn approval signatures. + * @return The typehash constant. */ - function getOperatorSetParams( - uint8 quorumNumber - ) external view returns (OperatorSetParam memory); + function OPERATOR_CHURN_APPROVAL_TYPEHASH() external view returns (bytes32); - /// @notice Returns the Stake registry contract that keeps track of operators' stakes - function stakeRegistry() external view returns (IStakeRegistry); + /** + * @notice EIP-712 typehash for pubkey registration signatures. + * @return The typehash constant. + */ + function PUBKEY_REGISTRATION_TYPEHASH() external view returns (bytes32); - /// @notice Returns the BLS Aggregate Pubkey Registry contract that keeps track of operators' BLS aggregate pubkeys per quorum + /** + * @notice Reference to the BLSApkRegistry contract. + * @return The BLSApkRegistry contract interface. + */ function blsApkRegistry() external view returns (IBLSApkRegistry); - /// @notice Returns the index Registry contract that keeps track of operators' indexes + /** + * @notice Reference to the StakeRegistry contract. + * @return The StakeRegistry contract interface. + */ + function stakeRegistry() external view returns (IStakeRegistry); + + /** + * @notice Reference to the IndexRegistry contract. + * @return The IndexRegistry contract interface. + */ function indexRegistry() external view returns (IIndexRegistry); /** - * @notice Ejects the provided operator from the provided quorums from the AVS - * @param operator The operator to eject - * @param quorumNumbers The quorum numbers to eject the operator from + * @notice Reference to the AllocationManager contract. + * @return The AllocationManager contract interface. + * @dev This is only relevant for Slashing AVSs */ - function ejectOperator(address operator, bytes calldata quorumNumbers) external; + function allocationManager() external view returns (IAllocationManager); - /// @notice Returns the number of quorums the registry coordinator has created + /// STORAGE + + /** + * @notice The total number of quorums that have been created. + * @return The count of quorums. + */ function quorumCount() external view returns (uint8); /** - * @notice Returns the operator struct for the given operator - * @param operator The operator address to get info for - * @return The operator information struct + * @notice Checks if a churn approver salt has been used. + * @param salt The salt to check. + * @return True if the salt has been used, false otherwise. + */ + function isChurnApproverSaltUsed( + bytes32 salt + ) external view returns (bool); + + /** + * @notice Gets the last block number when all operators in a quorum were updated. + * @param quorumNumber The quorum identifier. + * @return The block number of the last update. + */ + function quorumUpdateBlockNumber( + uint8 quorumNumber + ) external view returns (uint256); + + /** + * @notice Gets the registry contract address at a specific index. + * @param index The index in the registries array. + * @return The registry contract address. + */ + function registries( + uint256 index + ) external view returns (address); + + /** + * @notice The address authorized to approve operator churn operations. + * @return The churn approver address. + */ + function churnApprover() external view returns (address); + + /** + * @notice The address authorized to forcibly eject operators. + * @return The ejector address. + */ + function ejector() external view returns (address); + + /** + * @notice Gets the timestamp of an operator's last ejection. + * @param operator The operator address. + * @return The timestamp of the last ejection. + */ + function lastEjectionTimestamp( + address operator + ) external view returns (uint256); + + /** + * @notice The cooldown period after ejection before an operator can re-register. + * @return The cooldown duration in seconds. + */ + function ejectionCooldown() external view returns (uint256); + + /** + * @notice Checks if a quorum is an M2 quorum. + * @param quorumNumber The quorum identifier. + * @return True if the quorum is M2, false otherwise. + */ + function isM2Quorum( + uint8 quorumNumber + ) external view returns (bool); + + /** + * @notice Whether operator sets mode is enabled. + * @return True if operator sets mode is enabled, false otherwise. + */ + function operatorSetsEnabled() external view returns (bool); + + /// ACTIONS + + /** + * @notice Registers an operator through the allocation manager for operator set quorums. + * @param operator The operator address to register. + * @param operatorSetIds The operator set IDs to register for (corresponds to quorum numbers). + * @param data Additional registration data containing the operator's socket and BLS public key parameters. + * @dev Can only be called by the allocation manager. + * @dev Will revert if operator sets are not enabled or if registering for M2 quorums. + * @dev This function implements the Slashing registration pathway specified by the IAVSRegistrar interface. + */ + function registerOperator( + address operator, + uint32[] memory operatorSetIds, + bytes memory data + ) external; + + /** + * @notice Deregisters an operator through the allocation manager from operator set quorums. + * @param operator The operator address to deregister. + * @param operatorSetIds The operator set IDs to deregister from (corresponds to quorum numbers). + * @dev Can only be called by the allocation manager. + * @dev Will revert if operator sets are not enabled or if deregistering from M2 quorums. + * @dev This function implements the Slashing deregistration pathway specified by the IAVSRegistrar interface. + */ + function deregisterOperator(address operator, uint32[] memory operatorSetIds) external; + + /** + * @notice Updates stake weights for specified operators. If any operator is found to be below + * the minimum stake for their registered quorums, they are deregistered from those quorums. + * @param operators The operators whose stakes should be updated. + * @dev Stakes are queried from the Eigenlayer core DelegationManager contract. + */ + function updateOperators( + address[] memory operators + ) external; + + /** + * @notice For each quorum in `quorumNumbers`, updates the StakeRegistry's view of ALL its registered operators' stakes. + * Each quorum's `quorumUpdateBlockNumber` is also updated, which tracks the most recent block number when ALL registered + * operators were updated. + * @param operatorsPerQuorum for each quorum in `quorumNumbers`, this has a corresponding list of operators to update. + * @param quorumNumbers is an ordered byte array containing the quorum numbers being updated. + * @dev Each list of operator addresses MUST be sorted in ascending order. + * @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum. + * @dev Stakes are queried from the Eigenlayer core DelegationManager contract. + * @dev Will revert if an operator registers/deregisters for any quorum in `quorumNumbers` after transaction broadcast but before execution. + */ + function updateOperatorsForQuorum( + address[][] memory operatorsPerQuorum, + bytes calldata quorumNumbers + ) external; + + /** + * @notice Updates the socket of the msg.sender given they are a registered operator. + * @param socket The new socket address for the operator (typically an IP address). + * @dev Will revert if msg.sender is not a registered operator. + */ + function updateSocket( + string memory socket + ) external; + + /** + * @notice Forcibly removes an operator from specified quorums and sets their ejection timestamp. + * @param operator The operator address to eject. + * @param quorumNumbers The quorum numbers to eject the operator from. + * @dev Can only be called by the ejector address. + * @dev The operator cannot re-register until ejectionCooldown period has passed. + */ + function ejectOperator(address operator, bytes memory quorumNumbers) external; + + /** + * @notice Creates a new quorum that tracks total delegated stake for operators. + * @param operatorSetParams Configures the quorum's max operator count and churn parameters. + * @param minimumStake Sets the minimum stake required for an operator to register or remain registered. + * @param strategyParams A list of strategies and multipliers used by the StakeRegistry to calculate + * an operator's stake weight for the quorum. + * @dev For m2 AVS this function has the same behavior as createQuorum before. + * @dev For migrated AVS that enable operator sets this will create a quorum that measures total delegated stake for operator set. + */ + function createTotalDelegatedStakeQuorum( + OperatorSetParam memory operatorSetParams, + uint96 minimumStake, + IStakeRegistryTypes.StrategyParams[] memory strategyParams + ) external; + + /** + * @notice Creates a new quorum that tracks slashable stake for operators. + * @param operatorSetParams Configures the quorum's max operator count and churn parameters. + * @param minimumStake Sets the minimum stake required for an operator to register or remain registered. + * @param strategyParams A list of strategies and multipliers used by the StakeRegistry to calculate + * an operator's stake weight for the quorum. + * @param lookAheadPeriod The number of blocks to look ahead when calculating slashable stake. + * @dev Can only be called when operator sets are enabled. + */ + function createSlashableStakeQuorum( + OperatorSetParam memory operatorSetParams, + uint96 minimumStake, + IStakeRegistryTypes.StrategyParams[] memory strategyParams, + uint32 lookAheadPeriod + ) external; + + /** + * @notice Updates the configuration parameters for an existing operator set quorum. + * @param quorumNumber The identifier of the quorum to update. + * @param operatorSetParams The new operator set parameters to apply. + * @dev Can only be called by the contract owner. + */ + function setOperatorSetParams( + uint8 quorumNumber, + OperatorSetParam memory operatorSetParams + ) external; + + /** + * @notice Updates the address authorized to approve operator churn operations. + * @param _churnApprover The new churn approver address. + * @dev Can only be called by the contract owner. + * @dev The churn approver is responsible for signing off on operator replacements in full quorums. + */ + function setChurnApprover( + address _churnApprover + ) external; + + /** + * @notice Updates the address authorized to forcibly eject operators. + * @param _ejector The new ejector address. + * @dev Can only be called by the contract owner. + * @dev The ejector can force-remove operators from quorums regardless of their stake. + */ + function setEjector( + address _ejector + ) external; + + /** + * @notice Updates the duration operators must wait after ejection before re-registering. + * @param _ejectionCooldown The new cooldown duration in seconds. + * @dev Can only be called by the contract owner. + */ + function setEjectionCooldown( + uint256 _ejectionCooldown + ) external; + + /// VIEW + + /** + * @notice Returns the operator set parameters for a given quorum. + * @param quorumNumber The identifier of the quorum to query. + * @return The OperatorSetParam struct containing max operator count and churn thresholds. + */ + function getOperatorSetParams( + uint8 quorumNumber + ) external view returns (OperatorSetParam memory); + + /** + * @notice Returns the complete operator information for a given address. + * @param operator The operator address to query. + * @return An OperatorInfo struct containing the operator's ID and registration status. */ function getOperator( address operator ) external view returns (OperatorInfo memory); /** - * @notice Returns the operatorId for the given operator - * @param operator The operator address to get ID for - * @return The operator's unique ID + * @notice Returns the unique identifier for a given operator address. + * @param operator The operator address to query. + * @return The operator's ID (derived from their BLS public key hash). */ function getOperatorId( address operator ) external view returns (bytes32); /** - * @notice Returns the operator address for the given operatorId - * @param operatorId The operator ID to lookup - * @return operator The operator's address + * @notice Returns the operator address associated with a given operator ID. + * @param operatorId The unique identifier to look up. + * @return The operator's address. + * @dev Returns address(0) if the ID is not registered. */ function getOperatorFromId( bytes32 operatorId - ) external view returns (address operator); + ) external view returns (address); /** - * @notice Returns the status for the given operator - * @param operator The operator address to get status for - * @return The operator's current status + * @notice Returns the current registration status for a given operator. + * @param operator The operator address to query. + * @return The operator's status (NEVER_REGISTERED, REGISTERED, or DEREGISTERED). */ function getOperatorStatus( address operator ) external view returns (OperatorStatus); /** - * @notice Returns the indices of the quorumBitmaps for the provided operatorIds at the given blockNumber - * @param blockNumber The block number to get indices at - * @param operatorIds Array of operator IDs to get indices for - * @return Array of quorum bitmap indices + * @notice Returns the indices needed to look up quorum bitmaps for operators at a specific block. + * @param blockNumber The historical block number to query. + * @param operatorIds Array of operator IDs to get indices for. + * @return Array of indices corresponding to each operator ID. + * @dev Reverts if any operator had not yet registered at the specified block. + * @dev This function is designed to find proper inputs for getQuorumBitmapAtBlockNumberByIndex. */ function getQuorumBitmapIndicesAtBlockNumber( uint32 blockNumber, @@ -160,12 +515,12 @@ interface ISlashingRegistryCoordinator is ) external view returns (uint32[] memory); /** - * @notice Returns the quorum bitmap for the given operatorId at the given blockNumber via the index - * @param operatorId The operator ID to get bitmap for - * @param blockNumber The block number to get bitmap at - * @param index The index in the bitmap history - * @return The quorum bitmap at the specified block and index - * @dev Reverts if index is incorrect + * @notice Returns the quorum bitmap for an operator at a specific historical block. + * @param operatorId The operator's unique identifier. + * @param blockNumber The historical block number to query. + * @param index The index in the operator's bitmap history (from getQuorumBitmapIndicesAtBlockNumber). + * @return The quorum bitmap showing which quorums the operator was registered for. + * @dev Reverts if the index is incorrect for the specified block number. */ function getQuorumBitmapAtBlockNumberByIndex( bytes32 operatorId, @@ -174,10 +529,10 @@ interface ISlashingRegistryCoordinator is ) external view returns (uint192); /** - * @notice Returns the index-th entry in the operator's bitmap history - * @param operatorId The operator ID to get bitmap update for - * @param index The index in the bitmap history - * @return The quorum bitmap update at the specified index + * @notice Returns a specific update from an operator's quorum bitmap history. + * @param operatorId The operator's unique identifier. + * @param index The index in the bitmap history to query. + * @return The QuorumBitmapUpdate struct at that index. */ function getQuorumBitmapUpdateByIndex( bytes32 operatorId, @@ -185,69 +540,61 @@ interface ISlashingRegistryCoordinator is ) external view returns (QuorumBitmapUpdate memory); /** - * @notice Returns the current quorum bitmap for the given operatorId - * @param operatorId The operator ID to get current bitmap for - * @return The operator's current quorum bitmap + * @notice Returns the current quorum bitmap for an operator. + * @param operatorId The operator's unique identifier. + * @return A bitmap where each bit represents registration in a specific quorum. + * @dev Returns 0 if the operator is not registered for any quorums. */ function getCurrentQuorumBitmap( bytes32 operatorId ) external view returns (uint192); /** - * @notice Returns the length of the quorum bitmap history for the given operatorId - * @param operatorId The operator ID to get history length for - * @return The length of the operator's bitmap history + * @notice Returns the number of updates in an operator's bitmap history. + * @param operatorId The operator's unique identifier. + * @return The length of the bitmap history array. */ function getQuorumBitmapHistoryLength( bytes32 operatorId ) external view returns (uint256); /** - * @notice Returns the registry at the desired index - * @param index The index of the registry to return - * @return The registry address at the specified index + * @notice Returns the number of registry contracts managed by this coordinator. + * @return The count of registry contracts (typically 3: stake, BLS, and index). */ - function registries( - uint256 index - ) external view returns (address); - - /// @notice Returns the number of registries function numRegistries() external view returns (uint256); /** - * @notice Returns whether a quorum is an M2 quorum - * @param quorumNumber The quorum number to check - * @return True if the quorum is an M2 quorum + * @notice Calculates the digest hash that must be signed by the churn approver. + * @param registeringOperator The address of the operator attempting to register. + * @param registeringOperatorId The unique ID of the registering operator. + * @param operatorKickParams Parameters specifying which operators to replace in full quorums. + * @param salt Random value to ensure signature uniqueness. + * @param expiry Timestamp after which the signature becomes invalid. + * @return The EIP-712 typed data hash to be signed. */ - function isM2Quorum( - uint8 quorumNumber - ) external view returns (bool); - - /** - * @notice Returns whether operator sets mode is enabled - * @return True if operator sets mode is enabled, false otherwise - */ - function operatorSetsEnabled() external view returns (bool); + function calculateOperatorChurnApprovalDigestHash( + address registeringOperator, + bytes32 registeringOperatorId, + OperatorKickParam[] memory operatorKickParams, + bytes32 salt, + uint256 expiry + ) external view returns (bytes32); /** - * @notice Returns the message hash that an operator must sign to register their BLS public key - * @param operator The address of the operator registering their BLS public key - * @return The message hash to be signed + * @notice Returns the message hash that an operator must sign to register their BLS public key. + * @param operator The address of the operator registering their key. + * @return A point on the G1 curve representing the message hash. */ function pubkeyRegistrationMessageHash( address operator ) external view returns (BN254.G1Point memory); /** - * @notice Returns the blocknumber the quorum was last updated all at once for all operators - * @param quorumNumber The quorum number to get update block for - * @return The block number of the last quorum update + * @notice Returns the address of the contract owner. + * @return The owner's address. + * @dev The owner can update contract configuration and create new quorums. */ - function quorumUpdateBlockNumber( - uint8 quorumNumber - ) external view returns (uint256); - - /// @notice Returns the owner of the registry coordinator function owner() external view returns (address); /** diff --git a/src/libraries/BN254.sol b/src/libraries/BN254.sol index 7a167efc..df4b8248 100644 --- a/src/libraries/BN254.sol +++ b/src/libraries/BN254.sol @@ -30,10 +30,10 @@ pragma solidity ^0.8.27; library BN254 { // modulus for the underlying field F_p of the elliptic curve uint256 internal constant FP_MODULUS = - 21_888_242_871_839_275_222_246_405_745_257_275_088_696_311_157_297_823_662_689_037_894_645_226_208_583; + 21888242871839275222246405745257275088696311157297823662689037894645226208583; // modulus for the underlying field F_r of the elliptic curve uint256 internal constant FR_MODULUS = - 21_888_242_871_839_275_222_246_405_745_257_275_088_548_364_400_416_034_343_698_204_186_575_808_495_617; + 21888242871839275222246405745257275088548364400416034343698204186575808495617; struct G1Point { uint256 X; @@ -64,13 +64,13 @@ library BN254 { // generator of group G2 /// @dev Generator point in F_q2 is of the form: (x0 + ix1, y0 + iy1). uint256 internal constant G2x1 = - 11_559_732_032_986_387_107_991_004_021_392_285_783_925_812_861_821_192_530_917_403_151_452_391_805_634; + 11559732032986387107991004021392285783925812861821192530917403151452391805634; uint256 internal constant G2x0 = - 10_857_046_999_023_057_135_944_570_762_232_829_481_370_756_359_578_518_086_990_519_993_285_655_852_781; + 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 internal constant G2y1 = - 4_082_367_875_863_433_681_332_203_403_145_435_568_316_851_327_593_401_208_105_741_076_214_120_093_531; + 4082367875863433681332203403145435568316851327593401208105741076214120093531; uint256 internal constant G2y0 = - 8_495_653_923_123_431_417_604_973_247_489_272_438_418_190_587_263_600_148_770_280_649_306_958_101_930; + 8495653923123431417604973247489272438418190587263600148770280649306958101930; /// @notice returns the G2 generator /// @dev mind the ordering of the 1s and 0s! @@ -84,13 +84,13 @@ library BN254 { // negation of the generator of group G2 /// @dev Generator point in F_q2 is of the form: (x0 + ix1, y0 + iy1). uint256 internal constant nG2x1 = - 11_559_732_032_986_387_107_991_004_021_392_285_783_925_812_861_821_192_530_917_403_151_452_391_805_634; + 11559732032986387107991004021392285783925812861821192530917403151452391805634; uint256 internal constant nG2x0 = - 10_857_046_999_023_057_135_944_570_762_232_829_481_370_756_359_578_518_086_990_519_993_285_655_852_781; + 10857046999023057135944570762232829481370756359578518086990519993285655852781; uint256 internal constant nG2y1 = - 17_805_874_995_975_841_540_914_202_342_111_839_520_379_459_829_704_422_454_583_296_818_431_106_115_052; + 17805874995975841540914202342111839520379459829704422454583296818431106115052; uint256 internal constant nG2y0 = - 13_392_588_948_715_843_804_641_432_497_768_002_650_278_120_570_034_223_513_918_757_245_338_268_106_653; + 13392588948715843804641432497768002650278120570034223513918757245338268106653; function negGeneratorG2() internal pure returns (G2Point memory) { return G2Point([nG2x1, nG2x0], [nG2y1, nG2y0]); diff --git a/src/libraries/QuorumBitmapHistoryLib.sol b/src/libraries/QuorumBitmapHistoryLib.sol index aa5d00d5..d709b035 100644 --- a/src/libraries/QuorumBitmapHistoryLib.sol +++ b/src/libraries/QuorumBitmapHistoryLib.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.27; import { ISlashingRegistryCoordinator, - IRegistryCoordinatorTypes + ISlashingRegistryCoordinatorTypes } from "../interfaces/ISlashingRegistryCoordinator.sol"; /// @title QuorumBitmapHistoryLib @@ -122,7 +122,7 @@ library QuorumBitmapHistoryLib { if (historyLength == 0) { // No prior bitmap history - push our first entry self[operatorId].push( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0, quorumBitmap: newBitmap @@ -142,7 +142,7 @@ library QuorumBitmapHistoryLib { } else { lastUpdate.nextUpdateBlockNumber = uint32(block.number); self[operatorId].push( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0, quorumBitmap: newBitmap diff --git a/src/unaudited/ECDSAStakeRegistryStorage.sol b/src/unaudited/ECDSAStakeRegistryStorage.sol index 0d94844a..8d9d69d8 100644 --- a/src/unaudited/ECDSAStakeRegistryStorage.sol +++ b/src/unaudited/ECDSAStakeRegistryStorage.sol @@ -14,7 +14,7 @@ abstract contract ECDSAStakeRegistryStorage is IECDSAStakeRegistry { IDelegationManager internal immutable DELEGATION_MANAGER; /// @dev The total amount of multipliers to weigh stakes - uint256 internal constant BPS = 10_000; + uint256 internal constant BPS = 10000; /// @notice The size of the current operator set uint256 internal _totalOperators; diff --git a/test/integration/CoreRegistration.t.sol b/test/integration/CoreRegistration.t.sol index d3bffe8d..bd1718c6 100644 --- a/test/integration/CoreRegistration.t.sol +++ b/test/integration/CoreRegistration.t.sol @@ -57,7 +57,7 @@ contract Test_CoreRegistration is MockAVSDeployer { address(this), pauserRegistry, 0, // 0 is initialPausedStatus - 50_400, // Initial withdrawal delay blocks + 50400, // Initial withdrawal delay blocks initializeStrategiesToSetDelayBlocks, initializeWithdrawalDelayBlocks ) diff --git a/test/integration/IntegrationBase.t.sol b/test/integration/IntegrationBase.t.sol index 13c8741d..180edd11 100644 --- a/test/integration/IntegrationBase.t.sol +++ b/test/integration/IntegrationBase.t.sol @@ -29,24 +29,26 @@ abstract contract IntegrationBase is IntegrationConfig { /// @dev Also checks that the user has NEVER_REGISTERED status function assert_HasNoOperatorInfo(User user, string memory err) internal { - IRegistryCoordinatorTypes.OperatorInfo memory info = _getOperatorInfo(user); + ISlashingRegistryCoordinatorTypes.OperatorInfo memory info = _getOperatorInfo(user); assertEq(info.operatorId, bytes32(0), err); - assertTrue(info.status == IRegistryCoordinatorTypes.OperatorStatus.NEVER_REGISTERED, err); + assertTrue( + info.status == ISlashingRegistryCoordinatorTypes.OperatorStatus.NEVER_REGISTERED, err + ); } function assert_HasRegisteredStatus(User user, string memory err) internal { - IRegistryCoordinatorTypes.OperatorStatus status = + ISlashingRegistryCoordinatorTypes.OperatorStatus status = registryCoordinator.getOperatorStatus(address(user)); - assertTrue(status == IRegistryCoordinatorTypes.OperatorStatus.REGISTERED, err); + assertTrue(status == ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED, err); } function assert_HasDeregisteredStatus(User user, string memory err) internal { - IRegistryCoordinatorTypes.OperatorStatus status = + ISlashingRegistryCoordinatorTypes.OperatorStatus status = registryCoordinator.getOperatorStatus(address(user)); - assertTrue(status == IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED, err); + assertTrue(status == ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED, err); } function assert_EmptyQuorumBitmap(User user, string memory err) internal { @@ -243,8 +245,8 @@ abstract contract IntegrationBase is IntegrationConfig { } function assert_Snap_Unchanged_OperatorInfo(User user, string memory err) internal { - IRegistryCoordinatorTypes.OperatorInfo memory curInfo = _getOperatorInfo(user); - IRegistryCoordinatorTypes.OperatorInfo memory prevInfo = _getPrevOperatorInfo(user); + ISlashingRegistryCoordinatorTypes.OperatorInfo memory curInfo = _getOperatorInfo(user); + ISlashingRegistryCoordinatorTypes.OperatorInfo memory prevInfo = _getPrevOperatorInfo(user); assertEq(prevInfo.operatorId, curInfo.operatorId, err); assertTrue(prevInfo.status == curInfo.status, err); @@ -866,13 +868,13 @@ abstract contract IntegrationBase is IntegrationConfig { function _getOperatorInfo( User user - ) internal view returns (IRegistryCoordinatorTypes.OperatorInfo memory) { + ) internal view returns (ISlashingRegistryCoordinatorTypes.OperatorInfo memory) { return registryCoordinator.getOperator(address(user)); } function _getPrevOperatorInfo( User user - ) internal timewarp returns (IRegistryCoordinatorTypes.OperatorInfo memory) { + ) internal timewarp returns (ISlashingRegistryCoordinatorTypes.OperatorInfo memory) { return _getOperatorInfo(user); } diff --git a/test/integration/IntegrationConfig.t.sol b/test/integration/IntegrationConfig.t.sol index 03021820..92c394bb 100644 --- a/test/integration/IntegrationConfig.t.sol +++ b/test/integration/IntegrationConfig.t.sol @@ -17,7 +17,7 @@ contract Constants { /// This is a low number because each operator receives its own BLS keypair, which /// is very slow to generate. uint32 constant MAX_OPERATOR_COUNT = 5; - uint16 constant KICK_BIPS_OPERATOR_STAKE = 15_000; + uint16 constant KICK_BIPS_OPERATOR_STAKE = 15000; uint16 constant KICK_BIPS_TOTAL_STAKE = 150; /// Other: @@ -28,7 +28,7 @@ contract Constants { uint256 constant MAX_QUORUM_COUNT = 192; // From RegistryCoordinator.MAX_QUORUM_COUNT - uint16 internal constant BIPS_DENOMINATOR = 10_000; + uint16 internal constant BIPS_DENOMINATOR = 10000; } contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { @@ -160,8 +160,8 @@ contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { emit log_named_uint("_configRand: number of quorums being initialized", quorumCount); // Default OperatorSetParams for all quorums - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSet = IRegistryCoordinatorTypes - .OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSet = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: MAX_OPERATOR_COUNT, kickBIPsOfOperatorStake: KICK_BIPS_OPERATOR_STAKE, kickBIPsOfTotalStake: KICK_BIPS_TOTAL_STAKE @@ -321,7 +321,7 @@ contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { for (uint256 i = 0; i < churnQuorums.length; i++) { uint8 quorum = uint8(churnQuorums[i]); - IRegistryCoordinatorTypes.OperatorSetParam memory params = + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory params = registryCoordinator.getOperatorSetParams(quorum); // Sanity check - make sure we're at the operator cap @@ -368,7 +368,7 @@ contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { /// From RegistryCoordinator._individualKickThreshold function _individualKickThreshold( uint96 operatorStake, - IRegistryCoordinatorTypes.OperatorSetParam memory setParams + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory setParams ) internal pure returns (uint96) { return operatorStake * setParams.kickBIPsOfOperatorStake / BIPS_DENOMINATOR; } @@ -376,7 +376,7 @@ contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { /// From RegistryCoordinator._totalKickThreshold function _totalKickThreshold( uint96 totalStake, - IRegistryCoordinatorTypes.OperatorSetParam memory setParams + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory setParams ) internal pure returns (uint96) { return totalStake * setParams.kickBIPsOfTotalStake / BIPS_DENOMINATOR; } @@ -569,7 +569,7 @@ contract IntegrationConfig is IntegrationDeployer, G2Operations, Constants { * @return The number of operators to register */ function _randInitialOperators( - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSet + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSet ) private returns (uint256) { uint256 fillTypeFlag = _randValue(fillTypeFlags); diff --git a/test/integration/IntegrationDeployer.t.sol b/test/integration/IntegrationDeployer.t.sol index 33d088fc..508fb869 100644 --- a/test/integration/IntegrationDeployer.t.sol +++ b/test/integration/IntegrationDeployer.t.sol @@ -107,9 +107,9 @@ abstract contract IntegrationDeployer is Test, IUserDeployer { /// @notice Upper bound start range is ~1 month into the future, multiple of CALCULATION_INTERVAL_SECONDS uint32 MAX_FUTURE_LENGTH = 28 days; /// @notice absolute min timestamp that a rewards can start at - uint32 GENESIS_REWARDS_TIMESTAMP = 1_712_188_800; + uint32 GENESIS_REWARDS_TIMESTAMP = 1712188800; /// @notice Equivalent to 100%, but in basis points. - uint16 internal constant ONE_HUNDRED_IN_BIPS = 10_000; + uint16 internal constant ONE_HUNDRED_IN_BIPS = 10000; uint32 defaultOperatorSplitBips = 1000; /// @notice Delay in timestamp before a posted root can be claimed against diff --git a/test/integration/User.t.sol b/test/integration/User.t.sol index 807b1c2d..8a1a9b61 100644 --- a/test/integration/User.t.sol +++ b/test/integration/User.t.sol @@ -170,7 +170,7 @@ contract User is Test { uint256 stdIdx; while (churnIdx + stdIdx < allQuorums.length) { if (churnIdx == churnQuorums.length) { - kickParams[churnIdx + stdIdx] = IRegistryCoordinatorTypes.OperatorKickParam({ + kickParams[churnIdx + stdIdx] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ quorumNumber: 0, operator: address(0) }); @@ -178,13 +178,13 @@ contract User is Test { } else if ( stdIdx == standardQuorums.length || churnQuorums[churnIdx] < standardQuorums[stdIdx] ) { - kickParams[churnIdx + stdIdx] = IRegistryCoordinatorTypes.OperatorKickParam({ + kickParams[churnIdx + stdIdx] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ quorumNumber: uint8(churnQuorums[churnIdx]), operator: address(churnTargets[churnIdx]) }); churnIdx++; } else if (standardQuorums[stdIdx] < churnQuorums[churnIdx]) { - kickParams[churnIdx + stdIdx] = IRegistryCoordinatorTypes.OperatorKickParam({ + kickParams[churnIdx + stdIdx] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ quorumNumber: 0, operator: address(0) }); diff --git a/test/mocks/DelegationMock.sol b/test/mocks/DelegationMock.sol index ff04b970..11bce967 100644 --- a/test/mocks/DelegationMock.sol +++ b/test/mocks/DelegationMock.sol @@ -283,6 +283,6 @@ contract DelegationMock is DelegationIntermediate { } function minWithdrawalDelayBlocks() external view override returns (uint32) { - return 10_000; + return 10000; } } diff --git a/test/mocks/RegistryCoordinatorMock.sol b/test/mocks/RegistryCoordinatorMock.sol index 1c8d4aee..78c98660 100644 --- a/test/mocks/RegistryCoordinatorMock.sol +++ b/test/mocks/RegistryCoordinatorMock.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.27; import "../../src/interfaces/IRegistryCoordinator.sol"; +import "../../src/interfaces/ISlashingRegistryCoordinator.sol"; import "../../src/libraries/BN254.sol"; abstract contract RegistryCoordinatorMock is IRegistryCoordinator { @@ -49,7 +50,6 @@ abstract contract RegistryCoordinatorMock is IRegistryCoordinator { function isChurnApproverSaltUsed( bytes32 salt ) external view virtual returns (bool); - function isUsingOperatorSets() external view virtual returns (bool); function lastEjectionTimestamp( address operator ) external view virtual returns (uint256); @@ -161,8 +161,4 @@ abstract contract RegistryCoordinatorMock is IRegistryCoordinator { ) external view virtual returns (bool) { return false; } - - function isOperatorSetAVS() external view virtual returns (bool) { - return false; - } } diff --git a/test/unit/BLSApkRegistryUnit.t.sol b/test/unit/BLSApkRegistryUnit.t.sol index 295d5cec..785811fd 100644 --- a/test/unit/BLSApkRegistryUnit.t.sol +++ b/test/unit/BLSApkRegistryUnit.t.sol @@ -66,13 +66,13 @@ contract BLSApkRegistryUnitTests is BLSMockAVSDeployer, IBLSApkRegistryEvents { //privKey*G2 pubkeyRegistrationParams.pubkeyG2.X[1] = - 19_101_821_850_089_705_274_637_533_855_249_918_363_070_101_489_527_618_151_493_230_256_975_900_223_847; + 19101821850089705274637533855249918363070101489527618151493230256975900223847; pubkeyRegistrationParams.pubkeyG2.X[0] = - 5_334_410_886_741_819_556_325_359_147_377_682_006_012_228_123_419_628_681_352_847_439_302_316_235_957; + 5334410886741819556325359147377682006012228123419628681352847439302316235957; pubkeyRegistrationParams.pubkeyG2.Y[1] = - 354_176_189_041_917_478_648_604_979_334_478_067_325_821_134_838_555_150_300_539_079_146_482_658_331; + 354176189041917478648604979334478067325821134838555150300539079146482658331; pubkeyRegistrationParams.pubkeyG2.Y[0] = - 4_185_483_097_059_047_421_902_184_823_581_361_466_320_657_066_600_218_863_748_375_739_772_335_928_910; + 4185483097059047421902184823581361466320657066600218863748375739772335928910; // Initialize 3 quorums _initializeQuorum(); diff --git a/test/unit/BLSSignatureCheckerUnit.t.sol b/test/unit/BLSSignatureCheckerUnit.t.sol index 37a1115f..ef13c575 100644 --- a/test/unit/BLSSignatureCheckerUnit.t.sol +++ b/test/unit/BLSSignatureCheckerUnit.t.sol @@ -131,12 +131,12 @@ contract BLSSignatureCheckerUnitTests is BLSMockAVSDeployer { assertEq( quorumStakeTotals.signedStakeForQuorum[0], - 3_000_000_000_000_000_000, + 3000000000000000000, "signedStakeForQuorum incorrect" ); assertEq( quorumStakeTotals.totalStakeForQuorum[0], - 4_000_000_000_000_000_000, + 4000000000000000000, "totalStakeForQuorum incorrect" ); } diff --git a/test/unit/BitmapUtils.t.sol b/test/unit/BitmapUtils.t.sol index 1563d687..6e62f466 100644 --- a/test/unit/BitmapUtils.t.sol +++ b/test/unit/BitmapUtils.t.sol @@ -298,7 +298,7 @@ contract BitmapUtilsUnitTests_bytesArrayToBitmap is BitmapUtilsUnitTests { function test_bitmapToBytesArrayToBitmap_distributedTenEntriesBitmap() public { // 2^0+2^10+2^20+2^30+2^40+2^50+2^60+2^70+2^80+2^90 - uint256 originalBitmap = 1_239_150_146_850_664_126_585_242_625; + uint256 originalBitmap = 1239150146850664126585242625; testFuzz_bitmapToBytesArrayToBitmap(originalBitmap); } } diff --git a/test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol b/test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol index 59f4497f..befc76c4 100644 --- a/test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol +++ b/test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol @@ -24,7 +24,7 @@ contract EqualWeightECDSARegistry is ECDSAStakeRegistrySetup { IStrategy mockStrategy = IStrategy(address(0x1234)); IECDSAStakeRegistryTypes.Quorum memory quorum = IECDSAStakeRegistryTypes.Quorum({strategies: new StrategyParams[](1)}); - quorum.strategies[0] = StrategyParams({strategy: mockStrategy, multiplier: 10_000}); + quorum.strategies[0] = StrategyParams({strategy: mockStrategy, multiplier: 10000}); fixedWeightRegistry.initialize(address(mockServiceManager), 100, quorum); fixedWeightRegistry.permitOperator(operator1); diff --git a/test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol b/test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol index 033e5242..7269e1ce 100644 --- a/test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol +++ b/test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol @@ -25,7 +25,7 @@ contract PermissionedECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { IStrategy mockStrategy = IStrategy(address(0x1234)); IECDSAStakeRegistryTypes.Quorum memory quorum = IECDSAStakeRegistryTypes.Quorum({strategies: new StrategyParams[](1)}); - quorum.strategies[0] = StrategyParams({strategy: mockStrategy, multiplier: 10_000}); + quorum.strategies[0] = StrategyParams({strategy: mockStrategy, multiplier: 10000}); permissionedRegistry.initialize(address(mockServiceManager), 100, quorum); permissionedRegistry.permitOperator(operator1); diff --git a/test/unit/ECDSAStakeRegistryUnit.t.sol b/test/unit/ECDSAStakeRegistryUnit.t.sol index 0416b4cd..540f8dcc 100644 --- a/test/unit/ECDSAStakeRegistryUnit.t.sol +++ b/test/unit/ECDSAStakeRegistryUnit.t.sol @@ -69,7 +69,7 @@ contract ECDSAStakeRegistrySetup is Test, IECDSAStakeRegistryEvents { strategies: new IECDSAStakeRegistryTypes.StrategyParams[](1) }); quorum.strategies[0] = - IECDSAStakeRegistryTypes.StrategyParams({strategy: mockStrategy, multiplier: 10_000}); + IECDSAStakeRegistryTypes.StrategyParams({strategy: mockStrategy, multiplier: 10000}); registry = new ECDSAStakeRegistry(IDelegationManager(address(mockDelegationManager))); registry.initialize(address(mockServiceManager), 100, quorum); ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature; @@ -90,7 +90,7 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { strategies: new IECDSAStakeRegistryTypes.StrategyParams[](1) }); newQuorum.strategies[0] = - IECDSAStakeRegistryTypes.StrategyParams({strategy: mockStrategy, multiplier: 10_000}); + IECDSAStakeRegistryTypes.StrategyParams({strategy: mockStrategy, multiplier: 10000}); address[] memory operators = new address[](2); operators[0] = operator1; operators[1] = operator2; @@ -124,7 +124,7 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { }); validQuorum.strategies[0] = IECDSAStakeRegistryTypes.StrategyParams({ strategy: IStrategy(address(420)), - multiplier: 10_000 + multiplier: 10000 }); address[] memory operators = new address[](2); @@ -182,7 +182,7 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { IECDSAStakeRegistryTypes.Quorum memory invalidQuorum = IECDSAStakeRegistryTypes.Quorum({strategies: new StrategyParams[](1)}); invalidQuorum.strategies[0] = - StrategyParams({strategy: IStrategy(address(420)), multiplier: 10_001}); + StrategyParams({strategy: IStrategy(address(420)), multiplier: 10001}); address[] memory operators = new address[](2); operators[0] = operator1; operators[1] = operator2; @@ -404,13 +404,13 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { } function testUpdateThresholdStake_UpdateThresholdStake() public { - uint256 thresholdWeight = 10_000_000_000; + uint256 thresholdWeight = 10000000000; vm.prank(registry.owner()); registry.updateStakeThreshold(thresholdWeight); } function test_RevertsWhen_NotOwner_UpdateThresholdStake() public { - uint256 thresholdWeight = 10_000_000_000; + uint256 thresholdWeight = 10000000000; address notOwner = address(0x123); vm.prank(notOwner); vm.expectRevert("Ownable: caller is not the owner"); @@ -506,7 +506,7 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { (v, r, s) = vm.sign(operator2Pk, msgHash); signatures[1] = abi.encodePacked(r, s, v); - uint256 thresholdWeight = 10_000_000_000; + uint256 thresholdWeight = 10000000000; vm.prank(registry.owner()); registry.updateStakeThreshold(thresholdWeight); vm.roll(block.number + 1); @@ -574,7 +574,7 @@ contract ECDSAStakeRegistryTest is ECDSAStakeRegistrySetup { (v, r, s) = vm.sign(operator2Pk, msgHash); signatures[1] = abi.encodePacked(r, s, v); - uint256 thresholdWeight = 10_000_000_000; + uint256 thresholdWeight = 10000000000; vm.prank(registry.owner()); registry.updateStakeThreshold(thresholdWeight); vm.roll(referenceBlock + 1); diff --git a/test/unit/EjectionManagerUnit.t.sol b/test/unit/EjectionManagerUnit.t.sol index f3ab165e..6ff658a9 100644 --- a/test/unit/EjectionManagerUnit.t.sol +++ b/test/unit/EjectionManagerUnit.t.sol @@ -8,7 +8,7 @@ import { IEjectionManagerErrors, IEjectionManagerTypes } from "../../src/interfaces/IEjectionManager.sol"; -import {IRegistryCoordinatorTypes} from "../../src/interfaces/IRegistryCoordinator.sol"; +import {ISlashingRegistryCoordinatorTypes} from "../../src/interfaces/IRegistryCoordinator.sol"; import "../utils/MockAVSDeployer.sol"; contract EjectionManagerUnitTests is MockAVSDeployer { @@ -87,7 +87,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { assertEq( uint8(registryCoordinator.getOperatorStatus(defaultOperator)), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); for (uint8 i = 0; i < numQuorums; i++) { @@ -102,7 +102,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { assertEq( uint8(registryCoordinator.getOperatorStatus(defaultOperator)), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } @@ -124,7 +124,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -141,7 +141,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } } @@ -165,7 +165,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -182,14 +182,14 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsCanEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } for (uint8 i = operatorsCanEject; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } } @@ -212,7 +212,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -229,7 +229,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } @@ -252,7 +252,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { _incrementAddress(defaultOperator, operatorsToEject + i) ) ), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -273,7 +273,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { _incrementAddress(defaultOperator, operatorsToEject + i) ) ), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } } @@ -303,7 +303,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -320,7 +320,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } } @@ -343,7 +343,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -360,7 +360,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } } @@ -386,7 +386,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 1; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.REGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED) ); } @@ -403,7 +403,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { for (uint8 i = 0; i < operatorsToEject; i++) { assertEq( uint8(registryCoordinator.getOperatorStatus(_incrementAddress(defaultOperator, i))), - uint8(IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED) ); } } @@ -463,7 +463,7 @@ contract EjectionManagerUnitTests is MockAVSDeployer { }) ); - stakeRegistry.recordTotalStakeUpdate(1, 2_000_000_000 * 1 ether); + stakeRegistry.recordTotalStakeUpdate(1, 2000000000 * 1 ether); ejectionManager.amountEjectableForQuorum(1); } diff --git a/test/unit/OperatorStateRetrieverUnit.t.sol b/test/unit/OperatorStateRetrieverUnit.t.sol index f95cb727..79a93988 100644 --- a/test/unit/OperatorStateRetrieverUnit.t.sol +++ b/test/unit/OperatorStateRetrieverUnit.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.27; import "../utils/MockAVSDeployer.sol"; import {IStakeRegistryErrors} from "../../src/interfaces/IStakeRegistry.sol"; -import {IRegistryCoordinatorTypes} from "../../src/interfaces/IRegistryCoordinator.sol"; +import {ISlashingRegistryCoordinatorTypes} from "../../src/interfaces/IRegistryCoordinator.sol"; contract OperatorStateRetrieverUnitTests is MockAVSDeployer { using BN254 for BN254.G1Point; @@ -82,8 +82,8 @@ contract OperatorStateRetrieverUnitTests is MockAVSDeployer { function test_getOperatorState_revert_quorumNotCreatedAtReferenceBlockNumber() public { cheats.roll(registrationBlockNumber); - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: defaultMaxOperatorCount, kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake @@ -226,8 +226,8 @@ contract OperatorStateRetrieverUnitTests is MockAVSDeployer { bytes32[] memory nonSignerOperatorIds = new bytes32[](1); nonSignerOperatorIds[0] = defaultOperatorId; - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: defaultMaxOperatorCount, kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake diff --git a/test/unit/RegistryCoordinatorUnit.t.sol b/test/unit/RegistryCoordinatorUnit.t.sol index c062b5d6..64321a68 100644 --- a/test/unit/RegistryCoordinatorUnit.t.sol +++ b/test/unit/RegistryCoordinatorUnit.t.sol @@ -5,9 +5,9 @@ import "../utils/MockAVSDeployer.sol"; import { ISlashingRegistryCoordinator, ISlashingRegistryCoordinatorTypes, - IRegistryCoordinatorTypes, - IRegistryCoordinatorErrors + ISlashingRegistryCoordinatorErrors } from "../../src/interfaces/ISlashingRegistryCoordinator.sol"; + import {IBLSApkRegistryTypes} from "../../src/interfaces/IBLSApkRegistry.sol"; import {QuorumBitmapHistoryLib} from "../../src/libraries/QuorumBitmapHistoryLib.sol"; import {BitmapUtils} from "../../src/libraries/BitmapUtils.sol"; @@ -42,7 +42,8 @@ contract RegistryCoordinatorUnitTests is MockAVSDeployer { event QuorumIndexUpdate(bytes32 indexed operatorId, uint8 quorumNumber, uint32 newIndex); event OperatorSetParamsUpdated( - uint8 indexed quorumNumber, IRegistryCoordinatorTypes.OperatorSetParam operatorSetParams + uint8 indexed quorumNumber, + ISlashingRegistryCoordinatorTypes.OperatorSetParam operatorSetParams ); event ChurnApproverUpdated(address prevChurnApprover, address newChurnApprover); @@ -64,7 +65,7 @@ contract RegistryCoordinatorUnitTests is MockAVSDeployer { returns ( address operatorToRegister, BN254.G1Point memory operatorToRegisterPubKey, - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams ) { uint32 kickRegistrationBlockNumber = 100; @@ -89,7 +90,7 @@ contract RegistryCoordinatorUnitTests is MockAVSDeployer { address operatorToKick; // register last operator before kick - operatorKickParams = new IRegistryCoordinatorTypes.OperatorKickParam[](1); + operatorKickParams = new ISlashingRegistryCoordinatorTypes.OperatorKickParam[](1); { BN254.G1Point memory pubKey = BN254.hashToG1( keccak256(abi.encodePacked(pseudoRandomNumber, defaultMaxOperatorCount - 1)) @@ -106,7 +107,7 @@ contract RegistryCoordinatorUnitTests is MockAVSDeployer { // operatorIdsToSwap[0] = operatorToRegisterId operatorIdsToSwap[0] = operatorToRegisterId; - operatorKickParams[0] = IRegistryCoordinatorTypes.OperatorKickParam({ + operatorKickParams[0] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ quorumNumber: uint8(quorumNumbers[0]), operator: operatorToKick }); @@ -211,7 +212,7 @@ contract RegistryCoordinatorUnitTests_Initialization_Setters is RegistryCoordina } function test_createQuorum_revert_notOwner() public { - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams; + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams; uint96 minimumStake; IStakeRegistryTypes.StrategyParams[] memory strategyParams; @@ -227,8 +228,8 @@ contract RegistryCoordinatorUnitTests_Initialization_Setters is RegistryCoordina // this is necessary since the default setup already configures the max number of quorums, preventing adding more _deployMockEigenLayerAndAVS(0); - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: defaultMaxOperatorCount, kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake @@ -347,9 +348,9 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -361,7 +362,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -415,9 +416,9 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -429,7 +430,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -482,9 +483,9 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -496,7 +497,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(BitmapUtils.orderedBytesArrayToBitmap(quorumNumbers)), updateBlockNumber: uint32(registrationBlockNumber), nextUpdateBlockNumber: uint32(nextRegistrationBlockNumber) @@ -510,7 +511,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: uint32(nextRegistrationBlockNumber), nextUpdateBlockNumber: 0 @@ -649,7 +650,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperator is RegistryCoordinatorUni ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -688,7 +689,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is bytes memory quorumNumbers = new bytes(1); quorumNumbers[0] = bytes1(defaultQuorumNumber); - cheats.expectRevert(bytes4(keccak256("NotRegistered()"))); + cheats.expectRevert(bytes4(keccak256("OperatorSetQuorum()"))); cheats.prank(defaultOperator); registryCoordinator.deregisterOperator(quorumNumbers); } @@ -698,6 +699,8 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is cheats.prank(registryCoordinator.owner()); registryCoordinator.enableOperatorSets(); + console.log("quorumCount", registryCoordinator.quorumCount()); + assertTrue( registryCoordinator.isM2Quorum(uint8(defaultQuorumNumber)), "defaultQuorumNumber should be a M2 quorum" @@ -752,9 +755,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -766,7 +769,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: registrationBlockNumber, nextUpdateBlockNumber: deregistrationBlockNumber @@ -821,9 +824,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -835,7 +838,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: registrationBlockNumber, nextUpdateBlockNumber: deregistrationBlockNumber @@ -902,9 +905,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -914,9 +917,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -935,7 +938,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(registrationQuorumBitmap), updateBlockNumber: registrationBlockNumber, nextUpdateBlockNumber: deregistrationBlockNumber @@ -953,7 +956,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(expectedQuorumBitmap), updateBlockNumber: deregistrationBlockNumber, nextUpdateBlockNumber: 0 @@ -1038,9 +1041,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(operatorToDeregister))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: operatorToDeregisterId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -1054,7 +1057,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(operatorToDeregisterQuorumBitmap), updateBlockNumber: registrationBlockNumber, nextUpdateBlockNumber: deregistrationBlockNumber @@ -1079,7 +1082,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is cheats.roll(reregistrationBlockNumber); // store data before registering, to check against later - IRegistryCoordinatorTypes.QuorumBitmapUpdate memory previousQuorumBitmapUpdate = + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate memory previousQuorumBitmapUpdate = registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0); // re-register the operator @@ -1093,9 +1096,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ), @@ -1122,7 +1125,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: uint32(reregistrationBlockNumber), nextUpdateBlockNumber: 0 @@ -1305,9 +1308,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -1317,9 +1320,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -1338,7 +1341,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(registrationQuorumBitmap), updateBlockNumber: registrationBlockNumber, nextUpdateBlockNumber: deregistrationBlockNumber @@ -1356,7 +1359,7 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(expectedQuorumBitmap), updateBlockNumber: deregistrationBlockNumber, nextUpdateBlockNumber: 0 @@ -1395,9 +1398,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -1440,9 +1443,9 @@ contract RegistryCoordinatorUnitTests_DeregisterOperator_EjectOperator is keccak256(abi.encode(registryCoordinator.getOperator(defaultOperator))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: defaultOperatorId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -1676,8 +1679,8 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord address operatorToKick; // register last operator before kick - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams = - new IRegistryCoordinatorTypes.OperatorKickParam[](1); + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams = + new ISlashingRegistryCoordinatorTypes.OperatorKickParam[](1); { BN254.G1Point memory pubKey = BN254.hashToG1(keccak256(abi.encodePacked(pseudoRandomNumber, numOperators - 1))); @@ -1690,7 +1693,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord // operatorIdsToSwap[0] = operatorToRegisterId operatorIdsToSwap[0] = operatorToRegisterId; - operatorKickParams[0] = IRegistryCoordinatorTypes.OperatorKickParam({ + operatorKickParams[0] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ quorumNumber: defaultQuorumNumber, operator: operatorToKick }); @@ -1754,9 +1757,9 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord keccak256(abi.encode(registryCoordinator.getOperator(operatorToRegister))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: operatorToRegisterId, - status: IRegistryCoordinatorTypes.OperatorStatus.REGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.REGISTERED }) ) ) @@ -1765,9 +1768,9 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord keccak256(abi.encode(registryCoordinator.getOperator(operatorToKick))), keccak256( abi.encode( - IRegistryCoordinatorTypes.OperatorInfo({ + ISlashingRegistryCoordinatorTypes.OperatorInfo({ operatorId: operatorToKickId, - status: IRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED + status: ISlashingRegistryCoordinatorTypes.OperatorStatus.DEREGISTERED }) ) ) @@ -1778,7 +1781,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(quorumBitmap), updateBlockNumber: kickRegistrationBlockNumber, nextUpdateBlockNumber: registrationBlockNumber @@ -1798,7 +1801,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord ( address operatorToRegister, BN254.G1Point memory operatorToRegisterPubKey, - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams ) = _test_registerOperatorWithChurn_SetUp(pseudoRandomNumber, quorumNumbers, defaultStake); bytes32 operatorToRegisterId = BN254.hashG1Point(operatorToRegisterPubKey); @@ -1836,7 +1839,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord ( address operatorToRegister, BN254.G1Point memory operatorToRegisterPubKey, - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams ) = _test_registerOperatorWithChurn_SetUp( pseudoRandomNumber, quorumNumbers, operatorToKickStake ); @@ -1846,7 +1849,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord _setOperatorWeight( operatorToRegister, defaultQuorumNumber, - operatorToKickStake * defaultKickBIPsOfOperatorStake / 10_000 + 1 + operatorToKickStake * defaultKickBIPsOfOperatorStake / 10000 + 1 ); cheats.roll(registrationBlockNumber); @@ -1880,7 +1883,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord ( address operatorToRegister, , - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams ) = _test_registerOperatorWithChurn_SetUp(pseudoRandomNumber, quorumNumbers, defaultStake); uint96 registeringStake = defaultKickBIPsOfOperatorStake * defaultStake; @@ -1914,7 +1917,7 @@ contract RegistryCoordinatorUnitTests_RegisterOperatorWithChurn is RegistryCoord ( address operatorToRegister, BN254.G1Point memory operatorToRegisterPubKey, - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams ) = _test_registerOperatorWithChurn_SetUp(pseudoRandomNumber, quorumNumbers, defaultStake); bytes32 operatorToRegisterId = BN254.hashG1Point(operatorToRegisterPubKey); @@ -2244,7 +2247,7 @@ contract RegistryCoordinatorUnitTests_UpdateOperators is RegistryCoordinatorUnit ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(newBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -2268,7 +2271,7 @@ contract RegistryCoordinatorUnitTests_UpdateOperators is RegistryCoordinatorUnit ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(newBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -2296,7 +2299,7 @@ contract RegistryCoordinatorUnitTests_UpdateOperators is RegistryCoordinatorUnit ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(pastBitmap), updateBlockNumber: uint32(previousBlockNumber), nextUpdateBlockNumber: uint32(block.number) @@ -2310,7 +2313,7 @@ contract RegistryCoordinatorUnitTests_UpdateOperators is RegistryCoordinatorUnit ), keccak256( abi.encode( - IRegistryCoordinatorTypes.QuorumBitmapUpdate({ + ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ quorumBitmap: uint192(newBitmap), updateBlockNumber: uint32(block.number), nextUpdateBlockNumber: 0 @@ -2341,8 +2344,8 @@ contract RegistryCoordinatorUnitTests_BeforeMigration is RegistryCoordinatorUnit function test_CreateTotalDelegatedStakeQuorum() public { _deployMockEigenLayerAndAVS(0); // Set up test params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 0, kickBIPsOfTotalStake: 0 @@ -2368,7 +2371,7 @@ contract RegistryCoordinatorUnitTests_BeforeMigration is RegistryCoordinatorUnit assertEq(registryCoordinator.quorumCount(), initialQuorumCount + 1); // Verify quorum params were set correctly - IRegistryCoordinatorTypes.OperatorSetParam memory storedParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory storedParams = registryCoordinator.getOperatorSetParams(initialQuorumCount); assertEq(storedParams.maxOperatorCount, operatorSetParams.maxOperatorCount); assertEq(storedParams.kickBIPsOfOperatorStake, operatorSetParams.kickBIPsOfOperatorStake); @@ -2377,8 +2380,8 @@ contract RegistryCoordinatorUnitTests_BeforeMigration is RegistryCoordinatorUnit function test_CreateSlashableStakeQuorum_Reverts() public { _deployMockEigenLayerAndAVS(0); - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 0, kickBIPsOfTotalStake: 0 @@ -2456,11 +2459,11 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT assertEq(bitmap, 0, "Operator bitmap should be empty after deregistration"); // Verify operator status is NEVER_REGISTERED - IRegistryCoordinatorTypes.OperatorStatus status = + ISlashingRegistryCoordinatorTypes.OperatorStatus status = registryCoordinator.getOperatorStatus(operatorToRegister); assertEq( uint8(status), - uint8(IRegistryCoordinatorTypes.OperatorStatus.NEVER_REGISTERED), + uint8(ISlashingRegistryCoordinatorTypes.OperatorStatus.NEVER_REGISTERED), "Operator status should be NEVER_REGISTERED" ); } @@ -2489,8 +2492,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2518,8 +2521,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2527,10 +2530,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); @@ -2549,8 +2550,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2559,10 +2560,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); @@ -2596,8 +2595,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2606,10 +2605,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); @@ -2627,10 +2624,12 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT // pubkeySignature: defaultPubKeySignature // }); - IRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams = - new IRegistryCoordinatorTypes.OperatorKickParam[](1); - operatorKickParams[0] = - IRegistryCoordinatorTypes.OperatorKickParam({operator: address(0x1), quorumNumber: 0}); + ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams = + new ISlashingRegistryCoordinatorTypes.OperatorKickParam[](1); + operatorKickParams[0] = ISlashingRegistryCoordinatorTypes.OperatorKickParam({ + operator: address(0x1), + quorumNumber: 0 + }); ISignatureUtils.SignatureWithSaltAndExpiry memory churnApproverSignature; @@ -2652,8 +2651,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT vm.skip(true); _deployMockEigenLayerAndAVS(0); - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: defaultMaxOperatorCount, kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake @@ -2662,10 +2661,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); cheats.prank(registryCoordinatorOwner); registryCoordinator.createTotalDelegatedStakeQuorum( @@ -2684,8 +2681,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2694,10 +2691,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); @@ -2736,8 +2731,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT registryCoordinator.enableOperatorSets(); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2746,10 +2741,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); @@ -2785,8 +2778,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT assertTrue(registryCoordinator.operatorSetsEnabled(), "operatorSetsEnabled should be true"); // Create quorum params - IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: 10, kickBIPsOfOperatorStake: 1000, kickBIPsOfTotalStake: 100 @@ -2795,10 +2788,8 @@ contract RegistryCoordinatorUnitTests_AfterMigration is RegistryCoordinatorUnitT uint96 minimumStake = 100; IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](1); - strategyParams[0] = IStakeRegistryTypes.StrategyParams({ - strategy: IStrategy(address(1)), - multiplier: 10_000 - }); + strategyParams[0] = + IStakeRegistryTypes.StrategyParams({strategy: IStrategy(address(1)), multiplier: 10000}); // Create total delegated stake quorum cheats.prank(registryCoordinatorOwner); diff --git a/test/unit/ServiceManagerBase.t.sol b/test/unit/ServiceManagerBase.t.sol index d293f088..d9647ce8 100644 --- a/test/unit/ServiceManagerBase.t.sol +++ b/test/unit/ServiceManagerBase.t.sol @@ -24,7 +24,7 @@ contract ServiceManagerBase_UnitTests is MockAVSDeployer, IServiceManagerBaseEve uint32 MAX_REWARDS_DURATION = 70 days; uint32 MAX_RETROACTIVE_LENGTH = 84 days; uint32 MAX_FUTURE_LENGTH = 28 days; - uint32 GENESIS_REWARDS_TIMESTAMP = 1_712_188_800; + uint32 GENESIS_REWARDS_TIMESTAMP = 1712188800; uint256 MAX_REWARDS_AMOUNT = 1e38 - 1; uint32 OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP = 0; /// TODO: what values should these have diff --git a/test/unit/SlashingRegistryCoordinatorUnit.t.sol b/test/unit/SlashingRegistryCoordinatorUnit.t.sol index 4028902e..844aa6e9 100644 --- a/test/unit/SlashingRegistryCoordinatorUnit.t.sol +++ b/test/unit/SlashingRegistryCoordinatorUnit.t.sol @@ -46,7 +46,7 @@ // // emitted when an operator's index in the orderd operator list for the quorum with number `quorumNumber` is updated // event QuorumIndexUpdate(bytes32 indexed operatorId, uint8 quorumNumber, uint32 newIndex); -// event OperatorSetParamsUpdated(uint8 indexed quorumNumber, IRegistryCoordinatorTypes.OperatorSetParam operatorSetParams); +// event OperatorSetParamsUpdated(uint8 indexed quorumNumber, ISlashingRegistryCoordinatorTypes.OperatorSetParam operatorSetParams); // event ChurnApproverUpdated(address prevChurnApprover, address newChurnApprover); @@ -203,7 +203,7 @@ // } // function test_createQuorum_revert_notOwner() public { -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams; +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams; // uint96 minimumStake; // IStakeRegistryTypes.StrategyParams[] memory strategyParams; @@ -217,8 +217,8 @@ // // this is necessary since the default setup already configures the max number of quorums, preventing adding more // _deployMockEigenLayerAndAVS(0); -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = -// IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = +// ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: defaultMaxOperatorCount, // kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, // kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake @@ -332,7 +332,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), quorumBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -389,7 +389,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), quorumBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -440,7 +440,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), quorumBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(BitmapUtils.orderedBytesArrayToBitmap(quorumNumbers)), // updateBlockNumber: uint32(registrationBlockNumber), // nextUpdateBlockNumber: uint32(nextRegistrationBlockNumber) @@ -448,7 +448,7 @@ // ); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 1))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: uint32(nextRegistrationBlockNumber), // nextUpdateBlockNumber: 0 @@ -569,7 +569,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), quorumBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -662,7 +662,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), 0); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: registrationBlockNumber, // nextUpdateBlockNumber: deregistrationBlockNumber @@ -717,7 +717,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), 0); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: registrationBlockNumber, // nextUpdateBlockNumber: deregistrationBlockNumber @@ -793,7 +793,7 @@ // // check that the quorum bitmap history is as expected // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(registrationQuorumBitmap), // updateBlockNumber: registrationBlockNumber, // nextUpdateBlockNumber: deregistrationBlockNumber @@ -803,7 +803,7 @@ // if (deregistrationQuorumBitmap != registrationQuorumBitmap) { // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 1))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(expectedQuorumBitmap), // updateBlockNumber: deregistrationBlockNumber, // nextUpdateBlockNumber: 0 @@ -879,7 +879,7 @@ // assertEq(registryCoordinator.getCurrentQuorumBitmap(defaultOperatorId), 0); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(operatorToDeregisterId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(operatorToDeregisterQuorumBitmap), // updateBlockNumber: registrationBlockNumber, // nextUpdateBlockNumber: deregistrationBlockNumber @@ -929,7 +929,7 @@ // uint historyLength = registryCoordinator.getQuorumBitmapHistoryLength(defaultOperatorId); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, historyLength - 1))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: uint32(reregistrationBlockNumber), // nextUpdateBlockNumber: 0 @@ -1108,7 +1108,7 @@ // // check that the quorum bitmap history is as expected // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(registrationQuorumBitmap), // updateBlockNumber: registrationBlockNumber, // nextUpdateBlockNumber: deregistrationBlockNumber @@ -1118,7 +1118,7 @@ // if (deregistrationQuorumBitmap != registrationQuorumBitmap) { // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 1))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(expectedQuorumBitmap), // updateBlockNumber: deregistrationBlockNumber, // nextUpdateBlockNumber: 0 @@ -1435,7 +1435,7 @@ // ); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(operatorToKickId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(quorumBitmap), // updateBlockNumber: kickRegistrationBlockNumber, // nextUpdateBlockNumber: registrationBlockNumber @@ -1831,7 +1831,7 @@ // registryCoordinator._updateOperatorBitmapExternal(defaultOperatorId, newBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(newBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -1847,7 +1847,7 @@ // registryCoordinator._updateOperatorBitmapExternal(defaultOperatorId, newBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(newBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -1867,7 +1867,7 @@ // registryCoordinator._updateOperatorBitmapExternal(defaultOperatorId, newBitmap); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 0))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(pastBitmap), // updateBlockNumber: uint32(previousBlockNumber), // nextUpdateBlockNumber: uint32(block.number) @@ -1875,7 +1875,7 @@ // ); // assertEq( // keccak256(abi.encode(registryCoordinator.getQuorumBitmapUpdateByIndex(defaultOperatorId, 1))), -// keccak256(abi.encode(IRegistryCoordinatorTypes.QuorumBitmapUpdate({ +// keccak256(abi.encode(ISlashingRegistryCoordinatorTypes.QuorumBitmapUpdate({ // quorumBitmap: uint192(newBitmap), // updateBlockNumber: uint32(block.number), // nextUpdateBlockNumber: 0 @@ -1902,7 +1902,7 @@ // function test_CreateTotalDelegatedStakeQuorum() public { // _deployMockEigenLayerAndAVS(0); // // Set up test params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 0, // kickBIPsOfTotalStake: 0 @@ -1929,7 +1929,7 @@ // assertEq(registryCoordinator.quorumCount(), initialQuorumCount + 1); // // Verify quorum params were set correctly -// IRegistryCoordinatorTypes.OperatorSetParam memory storedParams = registryCoordinator.getOperatorSetParams(initialQuorumCount); +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory storedParams = registryCoordinator.getOperatorSetParams(initialQuorumCount); // assertEq(storedParams.maxOperatorCount, operatorSetParams.maxOperatorCount); // assertEq(storedParams.kickBIPsOfOperatorStake, operatorSetParams.kickBIPsOfOperatorStake); // assertEq(storedParams.kickBIPsOfTotalStake, operatorSetParams.kickBIPsOfTotalStake); @@ -1937,7 +1937,7 @@ // function test_CreateSlashableStakeQuorum_Reverts() public { // _deployMockEigenLayerAndAVS(0); -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 0, // kickBIPsOfTotalStake: 0 @@ -2059,7 +2059,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2091,7 +2091,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2121,7 +2121,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2167,7 +2167,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2226,7 +2226,7 @@ // vm.skip(true); // _deployMockEigenLayerAndAVS(0); -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: defaultMaxOperatorCount, // kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, // kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake @@ -2259,7 +2259,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2311,7 +2311,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 @@ -2358,7 +2358,7 @@ // registryCoordinator.enableOperatorSets(); // // Create quorum params -// IRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = IRegistryCoordinatorTypes.OperatorSetParam({ +// ISlashingRegistryCoordinatorTypes.OperatorSetParam memory operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam({ // maxOperatorCount: 10, // kickBIPsOfOperatorStake: 1000, // kickBIPsOfTotalStake: 100 diff --git a/test/unit/StakeRegistryUnit.t.sol b/test/unit/StakeRegistryUnit.t.sol index 8a9d0ada..bd3ea670 100644 --- a/test/unit/StakeRegistryUnit.t.sol +++ b/test/unit/StakeRegistryUnit.t.sol @@ -2235,9 +2235,9 @@ contract StakeRegistryUnitTests_weightOfOperatorForQuorum is StakeRegistryUnitTe ) public { // 3 LST Strat multipliers, rETH, stETH, ETH uint96[] memory multipliers = new uint96[](3); - multipliers[0] = uint96(1_070_136_092_289_993_178); - multipliers[1] = uint96(1_071_364_636_818_145_808); - multipliers[2] = uint96(1_000_000_000_000_000_000); + multipliers[0] = uint96(1070136092289993178); + multipliers[1] = uint96(1071364636818145808); + multipliers[2] = uint96(1000000000000000000); IStakeRegistryTypes.StrategyParams[] memory strategyParams = new IStakeRegistryTypes.StrategyParams[](3); diff --git a/test/utils/BLSMockAVSDeployer.sol b/test/utils/BLSMockAVSDeployer.sol index 84890944..701fd320 100644 --- a/test/utils/BLSMockAVSDeployer.sol +++ b/test/utils/BLSMockAVSDeployer.sol @@ -31,23 +31,23 @@ contract BLSMockAVSDeployer is MockAVSDeployer { function _setAggregatePublicKeysAndSignature() internal { // aggSignerPrivKey*g2 aggSignerApkG2.X[1] = - 19_101_821_850_089_705_274_637_533_855_249_918_363_070_101_489_527_618_151_493_230_256_975_900_223_847; + 19101821850089705274637533855249918363070101489527618151493230256975900223847; aggSignerApkG2.X[0] = - 5_334_410_886_741_819_556_325_359_147_377_682_006_012_228_123_419_628_681_352_847_439_302_316_235_957; + 5334410886741819556325359147377682006012228123419628681352847439302316235957; aggSignerApkG2.Y[1] = - 354_176_189_041_917_478_648_604_979_334_478_067_325_821_134_838_555_150_300_539_079_146_482_658_331; + 354176189041917478648604979334478067325821134838555150300539079146482658331; aggSignerApkG2.Y[0] = - 4_185_483_097_059_047_421_902_184_823_581_361_466_320_657_066_600_218_863_748_375_739_772_335_928_910; + 4185483097059047421902184823581361466320657066600218863748375739772335928910; // 100*aggSignerPrivKey*g2 oneHundredQuorumApkG2.X[1] = - 6_187_649_255_575_786_743_153_792_867_265_230_878_737_103_598_736_372_524_337_965_086_852_090_105_771; + 6187649255575786743153792867265230878737103598736372524337965086852090105771; oneHundredQuorumApkG2.X[0] = - 5_334_877_400_925_935_887_383_922_877_430_837_542_135_722_474_116_902_175_395_820_705_628_447_222_839; + 5334877400925935887383922877430837542135722474116902175395820705628447222839; oneHundredQuorumApkG2.Y[1] = - 4_668_116_328_019_846_503_695_710_811_760_363_536_142_902_258_271_850_958_815_598_072_072_236_299_223; + 4668116328019846503695710811760363536142902258271850958815598072072236299223; oneHundredQuorumApkG2.Y[0] = - 21_446_056_442_597_180_561_077_194_011_672_151_329_458_819_211_586_246_807_143_487_001_691_968_661_015; + 21446056442597180561077194011672151329458819211586246807143487001691968661015; sigma = BN254.hashToG1(msgHash).scalar_mul(aggSignerPrivKey); } diff --git a/test/utils/MockAVSDeployer.sol b/test/utils/MockAVSDeployer.sol index aa25f456..eb5ac6a7 100644 --- a/test/utils/MockAVSDeployer.sol +++ b/test/utils/MockAVSDeployer.sol @@ -23,7 +23,7 @@ import {IStakeRegistry} from "../../src/interfaces/IStakeRegistry.sol"; import {IIndexRegistry} from "../../src/interfaces/IIndexRegistry.sol"; import {IRegistryCoordinator} from "../../src/interfaces/IRegistryCoordinator.sol"; import { - IRegistryCoordinatorTypes, + ISlashingRegistryCoordinatorTypes, ISlashingRegistryCoordinatorTypes } from "../../src/interfaces/ISlashingRegistryCoordinator.sol"; @@ -110,19 +110,19 @@ contract MockAVSDeployer is Test { address defaultOperator = address(uint160(uint256(keccak256("defaultOperator")))); bytes32 defaultOperatorId; BN254.G1Point internal defaultPubKey = BN254.G1Point( - 18_260_007_818_883_133_054_078_754_218_619_977_578_772_505_796_600_400_998_181_738_095_793_040_006_897, - 3_432_351_341_799_135_763_167_709_827_653_955_074_218_841_517_684_851_694_584_291_831_827_675_065_899 + 18260007818883133054078754218619977578772505796600400998181738095793040006897, + 3432351341799135763167709827653955074218841517684851694584291831827675065899 ); string defaultSocket = "69.69.69.69:420"; uint96 defaultStake = 1 ether; uint8 defaultQuorumNumber = 0; uint32 defaultMaxOperatorCount = 10; - uint16 defaultKickBIPsOfOperatorStake = 15_000; + uint16 defaultKickBIPsOfOperatorStake = 15000; uint16 defaultKickBIPsOfTotalStake = 150; uint8 numQuorums = 192; - IRegistryCoordinatorTypes.OperatorSetParam[] operatorSetParams; + ISlashingRegistryCoordinatorTypes.OperatorSetParam[] operatorSetParams; uint8 maxQuorumsToRegisterFor = 4; uint256 maxOperatorsToRegister = 4; @@ -316,7 +316,7 @@ contract MockAVSDeployer is Test { for (uint256 i = 0; i < numQuorumsToAdd; i++) { // hard code these for now operatorSetParams.push( - IRegistryCoordinatorTypes.OperatorSetParam({ + ISlashingRegistryCoordinatorTypes.OperatorSetParam({ maxOperatorCount: defaultMaxOperatorCount, kickBIPsOfOperatorStake: defaultKickBIPsOfOperatorStake, kickBIPsOfTotalStake: defaultKickBIPsOfTotalStake