From a57bb1634cb9076a084e7b3a83579ad63f677c0c Mon Sep 17 00:00:00 2001 From: Gonza Montiel Date: Wed, 18 Mar 2026 18:31:50 +0100 Subject: [PATCH] fix(contracts): revoke validators on allowlist removal Make `removeValidatorFromAllowlist` force-deregister validators that are still registered in the validators operator set, so allowlist removal immediately removes active validator membership instead of only blocking future registration. --- contracts/src/DataHavenServiceManager.sol | 14 ++++++++++++++ .../src/interfaces/IDataHavenServiceManager.sol | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/contracts/src/DataHavenServiceManager.sol b/contracts/src/DataHavenServiceManager.sol index 72389747..e6d7b489 100644 --- a/contracts/src/DataHavenServiceManager.sol +++ b/contracts/src/DataHavenServiceManager.sol @@ -434,6 +434,13 @@ contract DataHavenServiceManager is OwnableUpgradeable, IAVSRegistrar, IDataHave address validator ) external onlyOwner { validatorsAllowlist[validator] = false; + + if (validatorEthAddressToSolochainAddress[validator] != address(0)) { + uint32[] memory operatorSetIds = new uint32[](1); + operatorSetIds[0] = VALIDATORS_SET_ID; + _deregisterOperatorFromOperatorSets(validator, operatorSetIds); + } + emit ValidatorRemovedFromAllowlist(validator); } @@ -590,6 +597,13 @@ contract DataHavenServiceManager is OwnableUpgradeable, IAVSRegistrar, IDataHave address operator, uint32[] calldata operatorSetIds ) external onlyOwner { + _deregisterOperatorFromOperatorSets(operator, operatorSetIds); + } + + function _deregisterOperatorFromOperatorSets( + address operator, + uint32[] memory operatorSetIds + ) internal { IAllocationManagerTypes.DeregisterParams memory params = IAllocationManagerTypes.DeregisterParams({ operator: operator, avs: address(this), operatorSetIds: operatorSetIds diff --git a/contracts/src/interfaces/IDataHavenServiceManager.sol b/contracts/src/interfaces/IDataHavenServiceManager.sol index b6c6348c..e800f600 100644 --- a/contracts/src/interfaces/IDataHavenServiceManager.sol +++ b/contracts/src/interfaces/IDataHavenServiceManager.sol @@ -261,8 +261,10 @@ interface IDataHavenServiceManager is ) external; /** - * @notice Removes a validator from the allowlist + * @notice Removes a validator from the allowlist and revokes its active validator membership * @param validator Address of the validator to remove + * @dev If the validator is currently registered in the validators operator set, + * this also force-deregisters it from EigenLayer for `VALIDATORS_SET_ID`. */ function removeValidatorFromAllowlist( address validator