From 45eb220a2f9e96d34e2503cd103a86175fbe699c Mon Sep 17 00:00:00 2001 From: steven Date: Thu, 9 Jan 2025 17:00:38 -0500 Subject: [PATCH] chore: address review comments --- src/RegistryCoordinator.sol | 3 +-- src/RegistryCoordinatorStorage.sol | 9 ++++++--- test/harnesses/RegistryCoordinatorHarness.t.sol | 3 +-- test/integration/CoreRegistration.t.sol | 1 - test/integration/IntegrationDeployer.t.sol | 2 +- test/unit/StakeRegistryUnit.t.sol | 1 - test/utils/MockAVSDeployer.sol | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/RegistryCoordinator.sol b/src/RegistryCoordinator.sol index e6e1d659..bde1eafa 100644 --- a/src/RegistryCoordinator.sol +++ b/src/RegistryCoordinator.sol @@ -65,10 +65,9 @@ contract RegistryCoordinator is IStakeRegistry _stakeRegistry, IBLSApkRegistry _blsApkRegistry, IIndexRegistry _indexRegistry, - IAVSDirectory _avsDirectory, IPauserRegistry _pauserRegistry ) - RegistryCoordinatorStorage(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry, _avsDirectory) + RegistryCoordinatorStorage(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry) EIP712("AVSRegistryCoordinator", "v0.0.1") Pausable(_pauserRegistry) { diff --git a/src/RegistryCoordinatorStorage.sol b/src/RegistryCoordinatorStorage.sol index 8e343fbd..4911da4b 100644 --- a/src/RegistryCoordinatorStorage.sol +++ b/src/RegistryCoordinatorStorage.sol @@ -72,21 +72,24 @@ abstract contract RegistryCoordinatorStorage is IRegistryCoordinator { /// @notice the delay in seconds before an operator can reregister after being ejected uint256 public ejectionCooldown; + /// @notice Whether this AVS uses operator sets for registration + /// @dev If true, operators must register to operator sets via the AllocationManager bool public isOperatorSetAVS; + + /// @notice Mapping from quorum number to whether the quorum is an M2 quorum + /// @dev M2 quorums are pre-operator sets and track total delegated stake only mapping(uint8 => bool) public isM2Quorum; constructor( IServiceManager _serviceManager, IStakeRegistry _stakeRegistry, IBLSApkRegistry _blsApkRegistry, - IIndexRegistry _indexRegistry, - IAVSDirectory _avsDirectory + IIndexRegistry _indexRegistry ) { serviceManager = _serviceManager; stakeRegistry = _stakeRegistry; blsApkRegistry = _blsApkRegistry; indexRegistry = _indexRegistry; - avsDirectory = _avsDirectory; } // storage gap for upgradeability diff --git a/test/harnesses/RegistryCoordinatorHarness.t.sol b/test/harnesses/RegistryCoordinatorHarness.t.sol index 8110fb13..860e70dc 100644 --- a/test/harnesses/RegistryCoordinatorHarness.t.sol +++ b/test/harnesses/RegistryCoordinatorHarness.t.sol @@ -12,9 +12,8 @@ contract RegistryCoordinatorHarness is RegistryCoordinator, Test { IStakeRegistry _stakeRegistry, IBLSApkRegistry _blsApkRegistry, IIndexRegistry _indexRegistry, - IAVSDirectory _avsDirectory, IPauserRegistry _pauserRegistry - ) RegistryCoordinator(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry, _avsDirectory, _pauserRegistry) { + ) RegistryCoordinator(_serviceManager, _stakeRegistry, _blsApkRegistry, _indexRegistry, _pauserRegistry) { _transferOwnership(msg.sender); } diff --git a/test/integration/CoreRegistration.t.sol b/test/integration/CoreRegistration.t.sol index 5d875e3e..4fbfc3ad 100644 --- a/test/integration/CoreRegistration.t.sol +++ b/test/integration/CoreRegistration.t.sol @@ -91,7 +91,6 @@ contract Test_CoreRegistration is MockAVSDeployer { stakeRegistry, blsApkRegistry, indexRegistry, - avsDirectory, pauserRegistry ); diff --git a/test/integration/IntegrationDeployer.t.sol b/test/integration/IntegrationDeployer.t.sol index 414b8fe2..dda8ce58 100644 --- a/test/integration/IntegrationDeployer.t.sol +++ b/test/integration/IntegrationDeployer.t.sol @@ -376,7 +376,7 @@ abstract contract IntegrationDeployer is Test, IUserDeployer { uint32[] memory slashableStakeQuorumLookAheadPeriods = new uint32[](0); RegistryCoordinator registryCoordinatorImplementation = - new RegistryCoordinator(serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, avsDirectory, pauserRegistry); + new RegistryCoordinator(serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, pauserRegistry); proxyAdmin.upgradeAndCall( TransparentUpgradeableProxy(payable(address(registryCoordinator))), address(registryCoordinatorImplementation), diff --git a/test/unit/StakeRegistryUnit.t.sol b/test/unit/StakeRegistryUnit.t.sol index a4f58b85..7e8f483e 100644 --- a/test/unit/StakeRegistryUnit.t.sol +++ b/test/unit/StakeRegistryUnit.t.sol @@ -49,7 +49,6 @@ contract StakeRegistryUnitTests is MockAVSDeployer, IStakeRegistryEvents { stakeRegistry, IBLSApkRegistry(blsApkRegistry), IIndexRegistry(indexRegistry), - IAVSDirectory(avsDirectory), pauserRegistry ); diff --git a/test/utils/MockAVSDeployer.sol b/test/utils/MockAVSDeployer.sol index 800628da..3a14c824 100644 --- a/test/utils/MockAVSDeployer.sol +++ b/test/utils/MockAVSDeployer.sol @@ -274,7 +274,7 @@ contract MockAVSDeployer is Test { } registryCoordinatorImplementation = new RegistryCoordinatorHarness( - serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, avsDirectory, pauserRegistry + serviceManager, stakeRegistry, blsApkRegistry, indexRegistry, pauserRegistry ); { delete operatorSetParams;