Skip to content

Commit 0df2b24

Browse files
committed
merge main, update yarn.lock
2 parents 903e25f + ea030a8 commit 0df2b24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1485
-278
lines changed

.gas-snapshot

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ArbitrumVestingWalletTest:testDelegateFailsForNonBeneficiary() (gas: 16008435)
2525
ArbitrumVestingWalletTest:testDoesDeploy() (gas: 15971342)
2626
ArbitrumVestingWalletTest:testReleaseAffordance() (gas: 16008649)
2727
ArbitrumVestingWalletTest:testVestedAmountStart() (gas: 16074917)
28-
E2E:testE2E() (gas: 83632522)
28+
E2E:testE2E() (gas: 84675625)
2929
FixedDelegateErc20WalletTest:testInit() (gas: 5822575)
3030
FixedDelegateErc20WalletTest:testInitZeroToken() (gas: 5816805)
3131
FixedDelegateErc20WalletTest:testTransfer() (gas: 5932218)
@@ -93,11 +93,12 @@ L2GovernanceFactoryTest:testSanityCheckValues() (gas: 28415658)
9393
L2GovernanceFactoryTest:testSetMinDelay() (gas: 28364371)
9494
L2GovernanceFactoryTest:testSetMinDelayRevertsForCoreAddress() (gas: 28417242)
9595
L2GovernanceFactoryTest:testUpgraderCanCancel() (gas: 28657360)
96-
L2SecurityCouncilMgmtFactoryTest:testMemberElectionGovDeployment() (gas: 30363122)
97-
L2SecurityCouncilMgmtFactoryTest:testNomineeElectionGovDeployment() (gas: 30367353)
98-
L2SecurityCouncilMgmtFactoryTest:testOnlyOwnerCanDeploy() (gas: 25498765)
99-
L2SecurityCouncilMgmtFactoryTest:testRemovalGovDeployment() (gas: 30365353)
100-
L2SecurityCouncilMgmtFactoryTest:testSecurityCouncilManagerDeployment() (gas: 30384446)
96+
L2SecurityCouncilMgmtFactoryTest:testMemberElectionGovDeployment() (gas: 30524001)
97+
L2SecurityCouncilMgmtFactoryTest:testNomineeElectionGovDeployment() (gas: 30528232)
98+
L2SecurityCouncilMgmtFactoryTest:testOnlyOwnerCanDeploy() (gas: 25659644)
99+
L2SecurityCouncilMgmtFactoryTest:testRemovalGovDeployment() (gas: 30526232)
100+
L2SecurityCouncilMgmtFactoryTest:testSecurityCouncilManagerDeployment() (gas: 30545325)
101+
NomineeGovernorV2UpgradeActionTest:testAction() (gas: 8153)
101102
OutboxActionsTest:testAddOutbxesAction() (gas: 651420)
102103
OutboxActionsTest:testCantAddEOA() (gas: 968990)
103104
OutboxActionsTest:testCantReAddOutbox() (gas: 974388)
@@ -176,25 +177,26 @@ SecurityCouncilMemberSyncActionTest:testRemoveOne() (gas: 7930546)
176177
SecurityCouncilMemberSyncActionTest:testUpdateCohort() (gas: 8171934)
177178
SecurityCouncilMemberSyncActionTest:testUpdateCohort() (gas: 8172795)
178179
SecurityCouncilMgmtUtilsTests:testIsInArray() (gas: 2102)
179-
SecurityCouncilNomineeElectionGovernorTest:testAddContender() (gas: 215127)
180-
SecurityCouncilNomineeElectionGovernorTest:testCastBySig() (gas: 318348)
181-
SecurityCouncilNomineeElectionGovernorTest:testCastBySigTwice() (gas: 281704)
182-
SecurityCouncilNomineeElectionGovernorTest:testCastVoteReverts() (gas: 35255)
183-
SecurityCouncilNomineeElectionGovernorTest:testCountVote() (gas: 542695)
184-
SecurityCouncilNomineeElectionGovernorTest:testCreateElection() (gas: 253049)
185-
SecurityCouncilNomineeElectionGovernorTest:testExcludeNominee() (gas: 431856)
186-
SecurityCouncilNomineeElectionGovernorTest:testExecute() (gas: 671552)
187-
SecurityCouncilNomineeElectionGovernorTest:testForceSupport() (gas: 176798)
188-
SecurityCouncilNomineeElectionGovernorTest:testIncludeNominee() (gas: 644396)
189-
SecurityCouncilNomineeElectionGovernorTest:testInvalidInit() (gas: 7095881)
190-
SecurityCouncilNomineeElectionGovernorTest:testProperInitialization() (gas: 78091)
191-
SecurityCouncilNomineeElectionGovernorTest:testProposeFails() (gas: 19744)
192-
SecurityCouncilNomineeElectionGovernorTest:testRelay() (gas: 42365)
193-
SecurityCouncilNomineeElectionGovernorTest:testSetNomineeVetter() (gas: 40019)
180+
SecurityCouncilNomineeElectionGovernorTest:testAddContender() (gas: 270750)
181+
SecurityCouncilNomineeElectionGovernorTest:testCastBySig() (gas: 333730)
182+
SecurityCouncilNomineeElectionGovernorTest:testCastBySigTwice() (gas: 296589)
183+
SecurityCouncilNomineeElectionGovernorTest:testCastVoteReverts() (gas: 35278)
184+
SecurityCouncilNomineeElectionGovernorTest:testCountVote() (gas: 582574)
185+
SecurityCouncilNomineeElectionGovernorTest:testCreateElection() (gas: 253153)
186+
SecurityCouncilNomineeElectionGovernorTest:testExcludeNominee() (gas: 456505)
187+
SecurityCouncilNomineeElectionGovernorTest:testExecute() (gas: 677159)
188+
SecurityCouncilNomineeElectionGovernorTest:testForceSupport() (gas: 194733)
189+
SecurityCouncilNomineeElectionGovernorTest:testIncludeNominee() (gas: 674020)
190+
SecurityCouncilNomineeElectionGovernorTest:testInvalidInit() (gas: 7256741)
191+
SecurityCouncilNomineeElectionGovernorTest:testProperInitialization() (gas: 78113)
192+
SecurityCouncilNomineeElectionGovernorTest:testProposeFails() (gas: 19740)
193+
SecurityCouncilNomineeElectionGovernorTest:testRelay() (gas: 42427)
194+
SecurityCouncilNomineeElectionGovernorTest:testSetNomineeVetter() (gas: 39905)
194195
SequencerActionsTest:testAddAndRemoveSequencer() (gas: 483444)
195196
SequencerActionsTest:testCantAddZeroAddress() (gas: 235614)
196197
SetInitialGovParamsActionTest:testL1() (gas: 259904)
197198
SetInitialGovParamsActionTest:testL2() (gas: 688888)
199+
SetSequencerInboxMaxTimeVariationAction:testSetMaxTimeVariation() (gas: 374240)
198200
TokenDistributorTest:testClaim() (gas: 5742744)
199201
TokenDistributorTest:testClaimAndDelegate() (gas: 5850827)
200202
TokenDistributorTest:testClaimAndDelegateFailsForExpired() (gas: 5748244)
@@ -231,7 +233,7 @@ TokenDistributorTest:testZeroDelegateTo() (gas: 4132733)
231233
TokenDistributorTest:testZeroOwner() (gas: 4132646)
232234
TokenDistributorTest:testZeroReceiver() (gas: 4132675)
233235
TokenDistributorTest:testZeroToken() (gas: 71889)
234-
TopNomineesGasTest:testTopNomineesGas() (gas: 4502786)
236+
TopNomineesGasTest:testTopNomineesGas() (gas: 4502996)
235237
UpgradeExecRouteBuilderTest:testAIP1Point2() (gas: 1322645)
236238
UpgradeExecRouteBuilderTest:testRouteBuilderErrors() (gas: 1127374)
237239
UpgradeExecutorTest:testAdminCanChangeExecutor() (gas: 2583801)

docs/creating-a-proposal.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Creating a core proposal
2+
3+
The following is a guide to creating an on-chain Arbitrum DAO core governor proposal.
4+
5+
Prior to creating a proposal, it should be publically discussed on the Arbitrum Forum and a an off-chian temperature-check snapshot poll should be conducted; see [Arbitrum DAO docs](https://docs.arbitrum.foundation/how-tos/create-submit-dao-proposal#step-2-submit-your-on-chain-proposal-using-tally) for details.
6+
7+
Once a temperature check has passed, the following things can be done:
8+
9+
1. **Create Action Contract(s)**: Create the Governance Action Contract(s) for the proposal. See [here](../src/gov-action-contracts/README.md) for a guide to Governance Action Contracts.
10+
11+
1. **(Optional) Unit Tests**: Write unit tests for the Action Contracts if appropriate, i.e., if they introduce non-trivial new logic.
12+
13+
1. **Deploy And Verify Action Contracts**: Using `forge create`, deploy Action Contracts on their appropriate chain(s) (Ethereum, Arbitrum One, or Nova) and verify their bytecode on etherscan/arbiscan. (Note that no additional scripting should be used/required for Action Contract deployment.)
14+
15+
1. **Generate Propoposal Calldata**:
16+
a. Create a new directory under ./scripts/proposals/ for your proposal data, e.g.
17+
18+
```
19+
mkdir ./scipts/proposals/AIPMyProp
20+
```
21+
b. Generate proposal data using `yarn gen:proposalData` using the addresses of the deloyed action contracts, and providing a path to store the new JSON file.
22+
23+
For example:
24+
```
25+
yarn gen:proposalData \
26+
--govChainProviderRPC https://arb1.arbitrum.io/rpc \
27+
--actionChainIds 1 42161 \
28+
--actionAddresses 0xAddressA 0xAddressB \
29+
--writeToJsonPath ./scipts/proposals/AIPMyProp/my-prop-data.json
30+
```
31+
Note that the indices for the chain ids correspond with those of the action contracts. E.g., in the example, 0xAddressA should be deployed on chain 1 (Ethereum) and 0xAddressB should be deployed on chain 42161 (Arbitrum One.)
32+
33+
Run `yarn gen:proposalData --help` to see all optional parameters.
34+
35+
Once the data JSON is properly created, it can be included in a public pull request to this repo.
36+
37+
Note that while some prior proposals include description text and/or deployment scripts, that is no longer necessary.
38+
39+
1. **Run Simulation**
40+
41+
Using the calldata generated in the previous step, test the proposal using [the Arbitrum DAO governance seatbelt](https://github.com/ArbitrumFoundation/governance-seatbelt). Include the configuration in a PR to the seatbelt repo ([example](https://github.com/ArbitrumFoundation/governance-seatbelt/pull/26)).
42+
43+
The seatbelt will generate a human readable report of all of the state changes in the proposal; only proceed if the report's result are what is expected.
44+
45+
1. **Submit Proposal In Tally UI** See [here](./submit_a_proposal.md).
46+
47+
48+

docs/gotchas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The core, treasury, and security-council-member-removal governors all have a min
1212
- **Timelock vs Governor Execution**
1313
An operation queued in the core-governor-timelock or the treasury-governor-timelock can be executed permissionlessly on either its associated governor (typical) or on the timelock itself (atypical). The execution will be the same in either case, but in the later case, the governor’s `ProposalExecuted` event will not be emitted.
1414

15-
- **Two L1 Proxy Admins**
16-
There are two L1 proxy admins - one for the governance contracts, once for the governed core Nitro contracts. Note that both proxy admins have the same owner (the DAO), and thus this has no material effect on the DAO's affordances.
15+
- **Multiple L1 Proxy Admins**
16+
There are 3 L1 proxy admins - one for the governance contracts, one for the governed core Nitro contracts of Arb1, and one for the governed core Nitro contracts of Nova. Note that all proxy admins have the same owner (the DAO), and thus this has no material effect on the DAO's affordances.
1717

1818
- **Non-excluded L2 Timelock**
1919
ARB in both the treasury timelock and the DAO treasury can be transferred via treasury gov DAO vote; however, only ARB in the DAO treasury is excluded from the quorum numerator calculation. Thus, the DAO’s ARB should ideally all be stored in the DAO Treasury.

docs/security-council-colors.png

68.7 KB
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Security Council Election Flow
2+
3+
```mermaid
4+
graph TD
5+
Z["Contender registration (7 days)"] --> A
6+
A["Nominee selection (7 days)"] --> B["Compliance check by foundation (14 days)"]
7+
B --> C["Member election (21 days)"]
8+
C --> D["Security council manager (0 days)"]
9+
D --> E["L2 Timelock (3 days)\nWithdrawal period (~1 week)\nL1 Timelock (3 days)"]
10+
E --> F["Individual council updates (0 days)"]
11+
```
-8.41 KB
Binary file not shown.

docs/security-council-mgmt.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ The election process and update stages are performed via on-chain smart contract
2121

2222
Process for selecting and voting for the new cohort of Security council members.
2323

24-
1. **Nominee Selection (7 days).** Candidates must gain 0.2% of total votable tokens in order to make it to the next step.
25-
2. **Compliance check by Foundation (14 days).** As dictated in the Constitution, the selected nominees must undergo a compliance check to ensure they comply with the legal requirements, service agreements, and additional rules dictated by the Constitution.
26-
3. **Member election (21 days).** Votes are cast and the top 6 nominees are selected.
24+
1. **Candidate registration (7 days)** Candidates must put themselves up for nomination in order to receive votes.
25+
2. **Nominee selection (7 days).** Candidates must gain 0.2% of total votable tokens in order to make it to the next step.
26+
3. **Compliance check by Foundation (14 days).** As dictated in the Constitution, the selected nominees must undergo a compliance check to ensure they comply with the legal requirements, service agreements, and additional rules dictated by the Constitution.
27+
4. **Member election (21 days).** Votes are cast and the top 6 nominees are selected.
2728

2829
## Update Stages
2930

@@ -37,12 +38,21 @@ Process to install the newly elected cohort of Security Council members into the
3738

3839
# Election Stages in detail
3940

40-
## 1. Nominee selection (7 days)
41-
42-
This stage consists of handling election timing, candidate registration, candidate endorsement:
41+
## 1. Election creation and candidate registration (7 days)
4342

4443
- **Election creation.** Elections can be created by anyone, but only every 6 months. The election alternates between targeting the positions on the two cohorts. Once created, this first stage of the election process lasts for 7 days.
4544
- **Candidate registration.** During these 7 days, any candidate can register, unless they are already a member of the other cohort. Members of the current cohort (the cohort up for election) are allowed to register for re-election.
45+
46+
### Implementation details
47+
48+
A new proposal is created each election cycle by calling `SecurityCouncilNomineeElectionGovernor.createElection`. Once a proposal is created it will be "Pending" for 7 days.
49+
50+
Voting is not allowed while the proposal is pending.
51+
52+
During the 7 day pending window, contenders register themselves by signing an EIP712 message of type `AddContenderMessage(uint256 proposalId)` and calling `SecurityCouncilNomineeElectionGovernor.addContender`.
53+
54+
## 2. Nominee selection (7 days)
55+
4656
- **Endorsing candidates.** Delegates can endorse a candidate during this 7 day window. A single delegate can split their vote across multiple candidates. No candidate can accrue more than 0.2% of all votable tokens.
4757
- **Fallback in case of too few candidates.** In the event that fewer than 6 candidates receive a 0.2% endorsement, the Arbitrum Foundation will randomly select members from the outgoing cohort to make up to 6 candidates.
4858

@@ -55,13 +65,9 @@ It inherits most of its functionality from the OpenZeppelin Governor contracts,
5565
- Custom counting module to allow delegates to endorse multiple candidates.
5666
- Overridden proposal and execution to make the governor single purpose.
5767

58-
This governor contract has the following general interface relevant to the first stage:
59-
60-
- A new proposal is created each election cycle by calling `createElection`
61-
- Contenders can make themselves eligible to receive votes by calling `addContender`.
62-
- Delegates can call `castVoteWithReasonAndParams` or `castVoteWithReasonAndParamsBySig` supplying custom arguments in the params to indicate which candidate they wish to endorse with what weight.
68+
Delegates can call `castVoteWithReasonAndParams` supplying custom arguments in the params to indicate which candidate they wish to endorse with what weight.
6369

64-
## 2. Compliance check by the Foundation (14 days)
70+
## 3. Compliance check by the Foundation (14 days)
6571

6672
The Foundation will be given 14 days to vet the prospective nominees. If they find that a candidate does not meet the compliance check, they can exclude the candidate from progressing to the next stage. The compliance rules are not detailed here, and will instead be published by the Foundation, but note that grounds for exclusion will include greater than 3 members of a given organisation being represented in the nominee set (as described in section 4 of the Constitution).
6773

@@ -77,7 +83,7 @@ The Governor smart contract enforces that at least a 2 week time period be provi
7783

7884
Once the compliance check has completed, anyone can call the `execute` function on the `SecurityCouncilNomineeElectionGovernor` to proceed to the member election stage.
7985

80-
## 3. Member election (21 days)
86+
## 4. Member election (21 days)
8187

8288
The voting process can begin once a set of compliant candidates have been successfully nominated.
8389

0 commit comments

Comments
 (0)