-
Notifications
You must be signed in to change notification settings - Fork 43
security council improvement AIP action contracts #239
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/gov-action-contracts/AIPs/SCImprovementAIP/AIPIncreaseCoreTimelockDelayAction.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.16; | ||
|
|
||
| import "../../governance/UpdateCoreTimelockDelayAction.sol"; | ||
| import "../../address-registries/L2AddressRegistry.sol"; | ||
|
|
||
| ///@notice Increase core timelock day to eight days. | ||
| /// For discussion / rationale, see https://forum.arbitrum.foundation/t/rfc-constitutional-aip-security-council-improvement-proposal/20541 | ||
| contract AIPIncreaseCoreTimelockDelayAction is UpdateCoreTimelockDelayAction { | ||
| constructor() | ||
| UpdateCoreTimelockDelayAction( | ||
| ICoreGovTimelockGetter(0x56C4E9Eb6c63aCDD19AeC2b1a00e4f0d7aBda9d3), | ||
| 8 days | ||
| ) | ||
| {} | ||
| } |
12 changes: 12 additions & 0 deletions
12
src/gov-action-contracts/AIPs/SCImprovementAIP/AIPIncreaseNonEmergencySCThresholdAction.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.16; | ||
|
|
||
| import "../../governance/SetSCThresholdAction.sol"; | ||
|
|
||
| ///@notice increase the non-emergency Security Council Threshold from 7 to 9. | ||
| /// For discussion / rationale, see https://forum.arbitrum.foundation/t/rfc-constitutional-aip-security-council-improvement-proposal/20541 | ||
| contract AIPIncreaseNonEmergencySCThresholdAction is SetSCThresholdAction { | ||
| constructor() | ||
| SetSCThresholdAction(IGnosisSafe(0xADd68bCb0f66878aB9D37a447C7b9067C5dfa941), 7, 9) | ||
| {} | ||
| } |
29 changes: 29 additions & 0 deletions
29
src/gov-action-contracts/AIPs/SCImprovementAIP/AIPRemoveNonEmergencySCAction.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.16; | ||
|
|
||
| import "../../../security-council-mgmt/interfaces/ISecurityCouncilManager.sol"; | ||
| import "../../../interfaces/ICoreTimelock.sol"; | ||
|
|
||
| ///@notice Effectively "remove" the non emergency security council; prevent it from proposing in the timelock and don't update it in security council elections | ||
| /// For discussion / rationale, see https://forum.arbitrum.foundation/t/rfc-constitutional-aip-security-council-improvement-proposal/20541 | ||
| contract AIPRemoveNonEmergencySCAction { | ||
| ISecurityCouncilManager public constant securityCouncilManager = | ||
| ISecurityCouncilManager(0xD509E5f5aEe2A205F554f36E8a7d56094494eDFC); | ||
| ICoreTimelock public constant timelock = | ||
| ICoreTimelock(0x34d45e99f7D8c45ed05B5cA72D54bbD1fb3F98f0); | ||
| address nonEmergecySC = 0xADd68bCb0f66878aB9D37a447C7b9067C5dfa941; | ||
|
|
||
| function perform() external { | ||
| // revoke SC's role on timelock | ||
| timelock.revokeRole(timelock.PROPOSER_ROLE(), nonEmergecySC); | ||
|
|
||
| // remove SC from elections | ||
| securityCouncilManager.removeSecurityCouncil( | ||
| SecurityCouncilData({ | ||
| securityCouncil: nonEmergecySC, | ||
| updateAction: 0x9BF7b8884Fa381a45f8CB2525905fb36C996297a, | ||
| chainId: 42_161 | ||
| }) | ||
| ); | ||
| } | ||
| } | ||
39 changes: 39 additions & 0 deletions
39
src/gov-action-contracts/governance/SetSCThresholdAction.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.16; | ||
|
|
||
| import "../../security-council-mgmt/interfaces/IGnosisSafe.sol"; | ||
|
|
||
| interface _IGnosisSafe { | ||
| function changeThreshold(uint256 _threshold) external; | ||
| } | ||
|
|
||
| ///@notice Set the minimum signing threshold for a security council gnosis safe. Assumes that the safe has the UpgradeExecutor added as a module. | ||
| contract SetSCThresholdAction { | ||
| IGnosisSafe public immutable gnosisSafe; | ||
| uint256 public immutable oldThreshold; | ||
| uint256 public immutable newThreshold; | ||
|
|
||
| constructor(IGnosisSafe _gnosisSafe, uint256 _oldThreshold, uint256 _newThreshold) { | ||
| gnosisSafe = _gnosisSafe; | ||
| oldThreshold = _oldThreshold; | ||
| newThreshold = _newThreshold; | ||
| } | ||
|
|
||
| function perform() external { | ||
| // sanity check old threshold | ||
| require( | ||
| gnosisSafe.getThreshold() == oldThreshold, "SecSCThresholdAction: WRONG_OLD_THRESHOLD" | ||
| ); | ||
|
|
||
| gnosisSafe.execTransactionFromModule({ | ||
| to: address(gnosisSafe), | ||
| value: 0, | ||
| data: abi.encodeWithSelector(_IGnosisSafe.changeThreshold.selector, newThreshold), | ||
| operation: OpEnum.Operation.Call | ||
| }); | ||
| // sanity check new threshold was set | ||
| require( | ||
| gnosisSafe.getThreshold() == newThreshold, "SecSCThresholdAction: NEW_THRESHOLD_NOT_SET" | ||
| ); | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
src/gov-action-contracts/governance/UpdateCoreTimelockDelayAction.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| pragma solidity 0.8.16; | ||
|
|
||
| import "../address-registries/L2AddressRegistry.sol"; | ||
|
|
||
| ///@notice Update core timelock delay — the minimum amount of time after a passed-proposal is queued before it can be executed. | ||
| contract UpdateCoreTimelockDelayAction { | ||
| IArbitrumTimelock public immutable timelock; | ||
| uint256 public immutable newDelay; | ||
|
|
||
| constructor(ICoreGovTimelockGetter _l2AddressRegistry, uint256 _newDelay) { | ||
| timelock = _l2AddressRegistry.coreGovTimelock(); | ||
| newDelay = _newDelay; | ||
| } | ||
|
|
||
| function perform() external { | ||
| timelock.updateDelay(newDelay); | ||
| // sanity check: | ||
| require(timelock.getMinDelay() == newDelay, "UpdateTimelockDelayAction: DELAY_NOT_SET"); | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to sanity check the results of this action?