Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: restrict resetting of BLS keys #529

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/contracts/core/ProviderRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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] == address(0), BLSKeyAlreadyRegistered(key));
blockBuilderBLSKeyToAddress[key] = provider;
}
eoaToBlsPubkeys[provider] = blsPublicKeys;
Expand Down
1 change: 1 addition & 0 deletions contracts/contracts/interfaces/IProviderRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading