diff --git a/contracts/contracts/core/ProviderRegistry.sol b/contracts/contracts/core/ProviderRegistry.sol index 3d5c63770..dbea39cd5 100644 --- a/contracts/contracts/core/ProviderRegistry.sol +++ b/contracts/contracts/core/ProviderRegistry.sol @@ -310,6 +310,7 @@ contract ProviderRegistry is for (uint256 i = 0; i < numKeys; ++i) { bytes memory key = blsPublicKeys[i]; require(key.length == 48, InvalidBLSPublicKeyLength(key.length, 48)); + require(!blockBuilderBLSKeyToAddress[key], BLSKeyAlreadyRegistered(key)); blockBuilderBLSKeyToAddress[key] = provider; } eoaToBlsPubkeys[provider] = blsPublicKeys; diff --git a/contracts/contracts/interfaces/IProviderRegistry.sol b/contracts/contracts/interfaces/IProviderRegistry.sol index 089060927..694f38342 100644 --- a/contracts/contracts/interfaces/IProviderRegistry.sol +++ b/contracts/contracts/interfaces/IProviderRegistry.sol @@ -60,6 +60,7 @@ interface IProviderRegistry { error ProviderCommitmentsPending(address sender, uint256 numPending); error StakeTransferFailed(address sender, uint256 amount); error ProviderAlreadyRegistered(address sender); + error BLSKeyAlreadyRegistered(bytes blsKey); error InsufficientStake(uint256 stake, uint256 minStake); error InvalidBLSPublicKeyLength(uint256 length, uint256 expectedLength); error ProviderNotRegistered(address sender);