From 2a53c8e8a5aa12142414c63e11d9840a92ed106b Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Tue, 9 Nov 2021 16:03:06 +0200 Subject: [PATCH 01/10] new contracts config --- contracts/contracts/AdditionalZkSync.sol | 20 ++++---------------- contracts/contracts/Config.sol | 4 ++-- contracts/contracts/ZkSync.sol | 4 +++- contracts/hardhat.config.ts | 16 ++++------------ etc/env/base/misc.toml | 4 +--- 5 files changed, 14 insertions(+), 34 deletions(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index f5784eb66f..dabd70abc9 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -112,9 +112,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { totalOpenPriorityRequests -= toProcess; } - uint256 internal constant SECURITY_COUNCIL_2_WEEKS_THRESHOLD = $$(SECURITY_COUNCIL_2_WEEKS_THRESHOLD); - uint256 internal constant SECURITY_COUNCIL_1_WEEK_THRESHOLD = $$(SECURITY_COUNCIL_1_WEEK_THRESHOLD); - uint256 internal constant SECURITY_COUNCIL_3_DAYS_THRESHOLD = $$(SECURITY_COUNCIL_3_DAYS_THRESHOLD); + uint256 internal constant SECURITY_COUNCIL_THRESHOLD = $$(SECURITY_COUNCIL_THRESHOLD); function cutUpgradeNoticePeriod() external { requireActive(); @@ -129,19 +127,9 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { securityCouncilApproves[id] = true; numberOfApprovalsFromSecurityCouncil++; - if (numberOfApprovalsFromSecurityCouncil == SECURITY_COUNCIL_2_WEEKS_THRESHOLD) { - if (approvedUpgradeNoticePeriod > 2 weeks) { - approvedUpgradeNoticePeriod = 2 weeks; - emit NoticePeriodChange(approvedUpgradeNoticePeriod); - } - } else if (numberOfApprovalsFromSecurityCouncil == SECURITY_COUNCIL_1_WEEK_THRESHOLD) { - if (approvedUpgradeNoticePeriod > 1 weeks) { - approvedUpgradeNoticePeriod = 1 weeks; - emit NoticePeriodChange(approvedUpgradeNoticePeriod); - } - } else if (numberOfApprovalsFromSecurityCouncil == SECURITY_COUNCIL_3_DAYS_THRESHOLD) { - if (approvedUpgradeNoticePeriod > 3 days) { - approvedUpgradeNoticePeriod = 3 days; + if (numberOfApprovalsFromSecurityCouncil == SECURITY_COUNCIL_THRESHOLD) { + if (approvedUpgradeNoticePeriod > 0) { + approvedUpgradeNoticePeriod = 0; emit NoticePeriodChange(approvedUpgradeNoticePeriod); } } diff --git a/contracts/contracts/Config.sol b/contracts/contracts/Config.sol index cb8a7148f9..db4e4bd59a 100644 --- a/contracts/contracts/Config.sol +++ b/contracts/contracts/Config.sol @@ -60,7 +60,7 @@ contract Config { /// @dev Expiration delta for priority request to be satisfied (in seconds) /// @dev NOTE: Priority expiration should be > (EXPECT_VERIFICATION_IN * BLOCK_PERIOD) /// @dev otherwise incorrect block with priority op could not be reverted. - uint256 internal constant PRIORITY_EXPIRATION_PERIOD = 7 days; + uint256 internal constant PRIORITY_EXPIRATION_PERIOD = 14 days; /// @dev Expiration delta for priority request to be satisfied (in ETH blocks) uint256 internal constant PRIORITY_EXPIRATION = @@ -72,7 +72,7 @@ contract Config { uint64 internal constant MAX_PRIORITY_REQUESTS_TO_DELETE_IN_VERIFY = 6; /// @dev Reserved time for users to send full exit priority operation in case of an upgrade (in seconds) - uint256 internal constant MASS_FULL_EXIT_PERIOD = 9 days; + uint256 internal constant MASS_FULL_EXIT_PERIOD = 5 days; /// @dev Reserved time for users to withdraw funds from full exit priority operation in case of an upgrade (in seconds) uint256 internal constant TIME_TO_WITHDRAW_FUNDS_FROM_FULL_EXIT = 2 days; diff --git a/contracts/contracts/ZkSync.sol b/contracts/contracts/ZkSync.sol index d4a4c1bca6..e06bacade6 100644 --- a/contracts/contracts/ZkSync.sol +++ b/contracts/contracts/ZkSync.sol @@ -157,7 +157,9 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard { /// @notice zkSync contract upgrade. Can be external because Proxy contract intercepts illegal calls of this function. /// @param upgradeParameters Encoded representation of upgrade parameters // solhint-disable-next-line no-empty-blocks - function upgrade(bytes calldata upgradeParameters) external nonReentrant {} + function upgrade(bytes calldata upgradeParameters) external nonReentrant { + approvedUpgradeNoticePeriod = UPGRADE_NOTICE_PERIOD; + } function cutUpgradeNoticePeriod() external { /// All functions delegated to additional contract should NOT be nonReentrant diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 164f9f28a8..0bd23f9c7f 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -14,9 +14,7 @@ const prodConfig = { SECURITY_COUNCIL_MEMBERS_NUMBER: process.env.MISC_SECURITY_COUNCIL_MEMBERS_NUMBER, SECURITY_COUNCIL_MEMBERS: process.env.MISC_SECURITY_COUNCIL_MEMBERS, - SECURITY_COUNCIL_2_WEEKS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_2_WEEKS_THRESHOLD, - SECURITY_COUNCIL_1_WEEK_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_1_WEEK_THRESHOLD, - SECURITY_COUNCIL_3_DAYS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_3_DAYS_THRESHOLD + SECURITY_COUNCIL_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_THRESHOLD }; const testnetConfig = { UPGRADE_NOTICE_PERIOD: 0, @@ -28,9 +26,7 @@ const testnetConfig = { SECURITY_COUNCIL_MEMBERS_NUMBER: process.env.MISC_SECURITY_COUNCIL_MEMBERS_NUMBER, SECURITY_COUNCIL_MEMBERS: process.env.MISC_SECURITY_COUNCIL_MEMBERS, - SECURITY_COUNCIL_2_WEEKS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_2_WEEKS_THRESHOLD, - SECURITY_COUNCIL_1_WEEK_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_1_WEEK_THRESHOLD, - SECURITY_COUNCIL_3_DAYS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_3_DAYS_THRESHOLD + SECURITY_COUNCIL_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_THRESHOLD }; const testConfig = { @@ -43,9 +39,7 @@ const testConfig = { SECURITY_COUNCIL_MEMBERS_NUMBER: process.env.MISC_SECURITY_COUNCIL_MEMBERS_NUMBER, SECURITY_COUNCIL_MEMBERS: process.env.MISC_SECURITY_COUNCIL_MEMBERS, - SECURITY_COUNCIL_2_WEEKS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_2_WEEKS_THRESHOLD, - SECURITY_COUNCIL_1_WEEK_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_1_WEEK_THRESHOLD, - SECURITY_COUNCIL_3_DAYS_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_3_DAYS_THRESHOLD + SECURITY_COUNCIL_THRESHOLD: process.env.MISC_SECURITY_COUNCIL_THRESHOLD }; const localConfig = Object.assign({}, prodConfig); @@ -59,9 +53,7 @@ localConfig.NEW_ADDITIONAL_ZKSYNC_ADDRESS = process.env.MISC_NEW_ADDITIONAL_ZKSY localConfig.SECURITY_COUNCIL_MEMBERS_NUMBER = process.env.MISC_SECURITY_COUNCIL_MEMBERS_NUMBER; localConfig.SECURITY_COUNCIL_MEMBERS = process.env.MISC_SECURITY_COUNCIL_MEMBERS; -localConfig.SECURITY_COUNCIL_2_WEEKS_THRESHOLD = process.env.MISC_SECURITY_COUNCIL_2_WEEKS_THRESHOLD; -localConfig.SECURITY_COUNCIL_1_WEEK_THRESHOLD = process.env.MISC_SECURITY_COUNCIL_1_WEEK_THRESHOLD; -localConfig.SECURITY_COUNCIL_3_DAYS_THRESHOLD = process.env.MISC_SECURITY_COUNCIL_3_DAYS_THRESHOLD; +localConfig.SECURITY_COUNCIL_THRESHOLD = process.env.MISC_SECURITY_COUNCIL_THRESHOLD; // @ts-ignore localConfig.EASY_EXODUS = process.env.CONTRACTS_TEST_EASY_EXODUS === 'true'; diff --git a/etc/env/base/misc.toml b/etc/env/base/misc.toml index 8998422e68..ea017ae256 100644 --- a/etc/env/base/misc.toml +++ b/etc/env/base/misc.toml @@ -51,6 +51,4 @@ listing_treasury="0xaFe6A91979021206ad79F58562Eef4204720E2A3" security_council_members_number=3 security_council_members=["0x22C3F9177F485bF9a058cE4C7253Da81a59495Db","0x56dF84566a67e87808A73dA0Be61a40bda3e2AFA","0xCE004d039cD86b08274FC453bd5536E6e9F6Fac7"] -security_council_2_weeks_threshold=1 -security_council_1_week_threshold=2 -security_council_3_days_threshold=3 +security_council_threshold=2 From f3f9e787fede12754546f63438e2a818441f9f01 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Wed, 10 Nov 2021 16:58:39 +0200 Subject: [PATCH 02/10] WIP cutUpgradeNoticePeriodBySignature --- contracts/contracts/AdditionalZkSync.sol | 25 +++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index dabd70abc9..ecc63ba5a8 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -114,9 +114,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { uint256 internal constant SECURITY_COUNCIL_THRESHOLD = $$(SECURITY_COUNCIL_THRESHOLD); - function cutUpgradeNoticePeriod() external { - requireActive(); - + function approvedCutUpgradeNoticePeriod(address addr) internal { address payable[SECURITY_COUNCIL_MEMBERS_NUMBER] memory SECURITY_COUNCIL_MEMBERS = [ $(SECURITY_COUNCIL_MEMBERS) ]; @@ -139,6 +137,27 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { } } + function cutUpgradeNoticePeriod() external { + requireActive(); + + approvedCutUpgradeNoticePeriod(msg.sender); + } + + function cutUpgradeNoticePeriodBySignature(bytes[] calldata signatures) external { + requireActive(); + + address gatekeeper = 0x38A43F4330f24fe920F943409709fc9A6084C939; + (, bytes memory newTargets) = gatekeeper.call(abi.encodeWithSignature("nextTargets()")); + + bytes32 targetsHash = abi.encodePacked(newTargets); + bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", targetsHash)); + + for (uint256 i = 0; i < signatures.length; ++i) { + address recoveredAddress = Utils.recoverAddressFromEthSignature(signatures[i], messageHash); + approvedCutUpgradeNoticePeriod(recoveredAddress); + } + } + /// @notice Set data for changing pubkey hash using onchain authorization. /// Transaction author (msg.sender) should be L2 account address /// @notice New pubkey hash can be reset, to do that user should send two transactions: From f438f0125412829cb6a5bd12a1e618523ecf8e93 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Wed, 10 Nov 2021 17:02:04 +0200 Subject: [PATCH 03/10] cutUpgradeNoticePeriodBySignature --- contracts/contracts/AdditionalZkSync.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index ecc63ba5a8..05cddfbb4e 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -149,7 +149,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { address gatekeeper = 0x38A43F4330f24fe920F943409709fc9A6084C939; (, bytes memory newTargets) = gatekeeper.call(abi.encodeWithSignature("nextTargets()")); - bytes32 targetsHash = abi.encodePacked(newTargets); + bytes32 targetsHash = keccak256(abi.encodePacked(newTargets)); bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", targetsHash)); for (uint256 i = 0; i < signatures.length; ++i) { From 84972289a5df02ea494ff476f5c83bbde1836af2 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Wed, 10 Nov 2021 17:11:14 +0200 Subject: [PATCH 04/10] cutUpgradeNoticePeriodBySignature --- contracts/contracts/AdditionalZkSync.sol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index 05cddfbb4e..0196050883 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -147,9 +147,11 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { requireActive(); address gatekeeper = 0x38A43F4330f24fe920F943409709fc9A6084C939; - (, bytes memory newTargets) = gatekeeper.call(abi.encodeWithSignature("nextTargets()")); + (, bytes memory newTarget0) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 0)); + (, bytes memory newTarget1) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 1)); + (, bytes memory newTarget2) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 2)); - bytes32 targetsHash = keccak256(abi.encodePacked(newTargets)); + bytes32 targetsHash = keccak256(abi.encodePacked(newTarget0, newTarget1, newTarget2)); bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", targetsHash)); for (uint256 i = 0; i < signatures.length; ++i) { From 78a301da3bebf9161100ffecbb9544cc0ba49c2d Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Wed, 10 Nov 2021 17:13:27 +0200 Subject: [PATCH 05/10] approvedCutUpgradeNoticePeriod --- contracts/contracts/AdditionalZkSync.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index 0196050883..d74d69e2f1 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -119,7 +119,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { $(SECURITY_COUNCIL_MEMBERS) ]; for (uint256 id = 0; id < SECURITY_COUNCIL_MEMBERS_NUMBER; ++id) { - if (SECURITY_COUNCIL_MEMBERS[id] == msg.sender) { + if (SECURITY_COUNCIL_MEMBERS[id] == addr) { require(upgradeStartTimestamp != 0); require(securityCouncilApproves[id] == false); securityCouncilApproves[id] = true; From 3f23396a6bbe8b8066a50e942aaf5d184baa6f44 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Wed, 10 Nov 2021 17:14:16 +0200 Subject: [PATCH 06/10] cutUpgradeNoticePeriod --- contracts/contracts/AdditionalZkSync.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index d74d69e2f1..f0a46aec36 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -120,7 +120,6 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { ]; for (uint256 id = 0; id < SECURITY_COUNCIL_MEMBERS_NUMBER; ++id) { if (SECURITY_COUNCIL_MEMBERS[id] == addr) { - require(upgradeStartTimestamp != 0); require(securityCouncilApproves[id] == false); securityCouncilApproves[id] = true; numberOfApprovalsFromSecurityCouncil++; @@ -139,12 +138,14 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { function cutUpgradeNoticePeriod() external { requireActive(); + require(upgradeStartTimestamp != 0); approvedCutUpgradeNoticePeriod(msg.sender); } function cutUpgradeNoticePeriodBySignature(bytes[] calldata signatures) external { requireActive(); + require(upgradeStartTimestamp != 0); address gatekeeper = 0x38A43F4330f24fe920F943409709fc9A6084C939; (, bytes memory newTarget0) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 0)); From 28f95b8ddc3be38b7ecaf7a71d554dc8a2d5f133 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Thu, 11 Nov 2021 00:13:53 +0200 Subject: [PATCH 07/10] fix of nextTargets call --- contracts/contracts/AdditionalZkSync.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index f0a46aec36..35dddd90cc 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -148,9 +148,9 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { require(upgradeStartTimestamp != 0); address gatekeeper = 0x38A43F4330f24fe920F943409709fc9A6084C939; - (, bytes memory newTarget0) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 0)); - (, bytes memory newTarget1) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 1)); - (, bytes memory newTarget2) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint)", 2)); + (, bytes memory newTarget0) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint256)", 0)); + (, bytes memory newTarget1) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint256)", 1)); + (, bytes memory newTarget2) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint256)", 2)); bytes32 targetsHash = keccak256(abi.encodePacked(newTarget0, newTarget1, newTarget2)); bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", targetsHash)); From 8ac70b9405f69917f86105aff60704a73b98cff2 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Thu, 11 Nov 2021 10:36:44 +0200 Subject: [PATCH 08/10] readable message fot security council --- contracts/contracts/AdditionalZkSync.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index 35dddd90cc..b58c8c78e6 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -153,7 +153,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { (, bytes memory newTarget2) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint256)", 2)); bytes32 targetsHash = keccak256(abi.encodePacked(newTarget0, newTarget1, newTarget2)); - bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", targetsHash)); + bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n110", "Approved new ZkSync's target contracts hash\n0x", Bytes.bytesToHexASCIIBytes(abi.encodePacked(targetsHash)))); for (uint256 i = 0; i < signatures.length; ++i) { address recoveredAddress = Utils.recoverAddressFromEthSignature(signatures[i], messageHash); From 1bd79f11b9c109ca3c98b68fcf06a154bcbce6d4 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Thu, 11 Nov 2021 10:38:27 +0200 Subject: [PATCH 09/10] fmt --- contracts/contracts/AdditionalZkSync.sol | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index b58c8c78e6..4e86abe826 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -153,7 +153,13 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { (, bytes memory newTarget2) = gatekeeper.call(abi.encodeWithSignature("nextTargets(uint256)", 2)); bytes32 targetsHash = keccak256(abi.encodePacked(newTarget0, newTarget1, newTarget2)); - bytes32 messageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n110", "Approved new ZkSync's target contracts hash\n0x", Bytes.bytesToHexASCIIBytes(abi.encodePacked(targetsHash)))); + bytes32 messageHash = keccak256( + abi.encodePacked( + "\x19Ethereum Signed Message:\n110", + "Approved new ZkSync's target contracts hash\n0x", + Bytes.bytesToHexASCIIBytes(abi.encodePacked(targetsHash)) + ) + ); for (uint256 i = 0; i < signatures.length; ++i) { address recoveredAddress = Utils.recoverAddressFromEthSignature(signatures[i], messageHash); From 731a3fd0f8f9ad0c85e736345973d5de1f6a3378 Mon Sep 17 00:00:00 2001 From: Ihor Barenblat Date: Thu, 11 Nov 2021 10:55:44 +0200 Subject: [PATCH 10/10] no reverts on cutting upgrade notice period --- contracts/contracts/AdditionalZkSync.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index 4e86abe826..c89bf94461 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -119,8 +119,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { $(SECURITY_COUNCIL_MEMBERS) ]; for (uint256 id = 0; id < SECURITY_COUNCIL_MEMBERS_NUMBER; ++id) { - if (SECURITY_COUNCIL_MEMBERS[id] == addr) { - require(securityCouncilApproves[id] == false); + if (SECURITY_COUNCIL_MEMBERS[id] == addr && !securityCouncilApproves[id]) { securityCouncilApproves[id] = true; numberOfApprovalsFromSecurityCouncil++;