optimism
optimism copied to clipboard
Feat/vetoer set
Description
This PR implements a VetoerSet feature to the Optimism smart contracts. It allows any member of this set to perform a veto across the entire Superchain.
Only new contracts have been added in the packages/contracts-bedrock/src/Safe/VetoerSet directory.
Tests
Smart contract fuzzing and invariant tests have been added to packages/contracts-bedrock/test/Safe/VetoerSet.
Additional context
Issue https://github.com/ethereum-optimism/optimism/issues/9993 has also been opened to request some guidance.
Summary by CodeRabbit
- New Features
- Introduced a new Solidity contract allowing the Optimism Foundation to add owners to a Safe Account with specified thresholds.
- Tests
- Added tests for the new
AddOwnerModulecontract to ensure it behaves as expected under various scenarios. - Implemented contracts to test invariants related to the
Safecontract and its modules, ensuring integrity between owner counts and thresholds.
- Added tests for the new
[!WARNING]
Rate Limit Exceeded
@xenoliss has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 41 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the
@coderabbitai reviewcommand as a PR comment. Alternatively, push new commits to this PR.We recommend that you space out your commits to avoid hitting the rate limit.
How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information.
Commits
Files that changed from the base of the PR and between a208a036e70692ce679deee2b6ac484f49a704ff and 41dc77bbf822707228674691384150d9bf0d1a38.
Walkthrough
The changes involve introducing new Solidity contracts and test cases to enhance governance features within the Optimism smart contracts. Specifically, the AddOwnerModule.sol contract enables the addition of owners to a Safe Account by the Optimism Foundation. Test contracts validate the functionality of the AddOwnerModule and ensure the integrity of invariants related to the Safe contract and its modules.
Changes
| File Path | Change Summary |
|---|---|
.../contracts-bedrock/src/Safe/VetoerSet/AddOwnerModule.sol |
Introduces a contract enabling the Optimism Foundation to add owners to a Safe Account. |
.../contracts-bedrock/src/Safe/VetoerSet/OwnerGuard.sol |
Introduces a contract enforcing owner count and threshold requirements for a Safe Account. |
.../contracts-bedrock/test/Safe/VetoerSet/AddOwnerModule.t.sol |
Contains test cases for validating the functionality of the AddOwnerModule contract. |
.../contracts-bedrock/test/Safe/VetoerSet/OwnerGuard.t.sol |
Introduces test cases for verifying owner count and threshold settings in the OwnerGuard contract. |
.../contracts-bedrock/test/Safe/VetoerSet/invariants/Safe.inv.sol |
Introduces a contract testing invariants related to the Safe contract and its modules. |
Possibly related issues
- ethereum-optimism/optimism#9993: The issue discusses adding a VetoerSet feature to the Optimism smart contracts, aligning with the governance enhancements introduced by the
AddOwnerModuleand related contracts. The PR could contribute to implementing broader governance mechanisms, potentially addressing the objectives outlined in this issue.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai generate interesting stats about this repository and render them as a table.@coderabbitai show all the console.log statements in this repository.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Codecov Report
Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.
Project coverage is 28.64%. Comparing base (
9eb49b3) to head (41dc77b). Report is 693 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #9999 +/- ##
===========================================
- Coverage 28.73% 28.64% -0.10%
===========================================
Files 162 165 +3
Lines 7144 7167 +23
Branches 1309 1315 +6
===========================================
Hits 2053 2053
- Misses 4985 5008 +23
Partials 106 106
| Flag | Coverage Δ | |
|---|---|---|
| cannon-go-tests | 82.20% <ø> (ø) |
|
| chain-mon-tests | 27.14% <ø> (ø) |
|
| common-ts-tests | 26.72% <ø> (ø) |
|
| contracts-bedrock-tests | 0.61% <0.00%> (-0.01%) |
:arrow_down: |
| contracts-ts-tests | 12.25% <ø> (ø) |
|
| core-utils-tests | 44.03% <ø> (ø) |
|
| sdk-next-tests | 41.94% <ø> (ø) |
|
| sdk-tests | 41.94% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| ...ontracts-bedrock/src/Safe/VetoerSet/VetoModule.sol | 0.00% <0.00%> (ø) |
|
| ...acts-bedrock/src/Safe/VetoerSet/AddOwnerModule.sol | 0.00% <0.00%> (ø) |
|
| ...ontracts-bedrock/src/Safe/VetoerSet/OwnerGuard.sol | 0.00% <0.00%> (ø) |
Could you include a markdown document that describes the changes similar to this? It will make review much easier. The general idea is that the markdown doc is the spec for the feature and then the code reviewer will be able to have all of the context to review. The spec is the source of truth for how the code is meant to be behave and be used in the overall system
@tynes I implemented your recommendations and sent a PR to the specs repo trying to better describe the changes, requirements and implementation details.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@maurelian what is the deal with this PR?
@maurelian what is the deal with this PR?
@tynes I don't know anything about this PR. As you can see, I have not been assigned to it, and have no record of having been asked elsewhere to reviewed it.
@maurelian what is the deal with this PR?
@tynes I don't know anything about this PR. As you can see, I have not been assigned to it, and have no record of having been asked elsewhere to reviewed it.
apologies, i thought that you were the point person for getting this merged. if you are not then who is? (don't worry about answering this). just going thru the backlog of open PRs because many have gone stale
My understanding is that the need for this PR may have been deprioritised in favor of a smaller first step toward migrating to the Security Council. I will loop back internally to see if this one is still needed and let you know.
Hey @tynes and @maurelian, thanks for the yesterday's update. In the end this PR is still wanted so I'm happy to hear your feedback and do what's needed to have it merged.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.