Skip to content

Commit c950937

Browse files
committed
allow foundation validators to change their pubkey unlimited number of times
1 parent 6a4b836 commit c950937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/sfc/SFC.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ contract SFC is SFCBase, Version {
128128
require(getValidator[1].auth == 0x541E408443A592C38e01Bed0cB31f9De8c1322d0, "not mainnet");
129129
require(pubkey.length == 66 && pubkey[0] == 0xc0, "malformed pubkey");
130130
uint256 validatorID = getValidatorID[msg.sender];
131-
require(validatorID <= 59, "not legacy validator");
131+
require(validatorID <= 59 || validatorID == 64, "not legacy validator");
132132
require(_validatorExists(validatorID), "validator doesn't exist");
133133
require(keccak256(pubkey) != keccak256(getValidatorPubkey[validatorID]), "same pubkey");
134134
require(pubkeyHashToValidatorID[keccak256(pubkey)] == 0, "already used");
135-
require(validatorPubkeyChanges[validatorID] == 0, "allowed only once");
135+
require(validatorPubkeyChanges[validatorID] == 0 || validatorID == 64 || validatorID <= 12, "allowed only once");
136136

137137
validatorPubkeyChanges[validatorID]++;
138138
pubkeyHashToValidatorID[keccak256(pubkey)] = validatorID;

0 commit comments

Comments
 (0)