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.
This commit is contained in:
Gonza Montiel 2026-03-18 18:31:50 +01:00
parent e60363ecc3
commit a57bb1634c
2 changed files with 17 additions and 1 deletions

View file

@ -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

View file

@ -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