Skip to content

Commit

Permalink
Do not check against empty when updating new bls or ecdsa signer keys…
Browse files Browse the repository at this point in the history
…, allow it to be previously empty
  • Loading branch information
chcharcharlie authored and Dododododoit committed Jun 11, 2024
1 parent 8c5277a commit 339ebd9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/BLSApkRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ contract BLSApkRegistry is BLSApkRegistryStorage {
operatorToPubkeyHash[operator] != pubkeyHash,
"BLSApkRegistry.updateBLSPublicKey: cannot update to same pubkey"
);
require(
operatorToPubkeyHash[operator] != bytes32(0),
"BLSApkRegistry.updateBLSPublicKey: operator is unRegistered pubkey"
);
require(
pubkeyHashToOperator[pubkeyHash] != address(0),
"BLSApkRegistry.updateBLSPublicKey: public key is unRegistered"
);

// gamma = h(sigma, P, P', H(m))
uint256 gamma = uint256(keccak256(abi.encodePacked(
Expand Down
1 change: 0 additions & 1 deletion src/StakeRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,6 @@ contract StakeRegistry is StakeRegistryStorage {
address operatorSignAddr
) external override {
require(operatorSignAddr != address(0), "StakeRegistry.updateOperatorSignAddr: not zero address");
require(operatorSignAddrs[msg.sender] != address(0), "StakeRegistry.updateOperatorSignAddr: not registered operator");
require(operatorSignAddrs[msg.sender] != operatorSignAddr, "StakeRegistry.updateOperatorSignAddr: same signAddr");
operatorSignAddrs[msg.sender] = operatorSignAddr;
emit OperatorSignAddressAdded(msg.sender, operatorSignAddr);
Expand Down

0 comments on commit 339ebd9

Please sign in to comment.