Skip to content

ctb: Add new OwnerRemovalFailed(string) error type to LM#10538

Merged
maurelian merged 2 commits intodevelopfrom
maur/module-retdata
May 15, 2024
Merged

ctb: Add new OwnerRemovalFailed(string) error type to LM#10538
maurelian merged 2 commits intodevelopfrom
maur/module-retdata

Conversation

@maurelian
Copy link
Contributor

@maurelian maurelian commented May 14, 2024

Description

This PR adds error messaging functionality for failed owner removal in the LivenessModule.

Consistent with DeputyGuardianModule, we are now using the execTransactionFromModuleReturnData() method on the Safe contract.

Copy link
Contributor Author

maurelian commented May 14, 2024

@maurelian maurelian requested a review from mds1 May 14, 2024 17:03
@maurelian maurelian marked this pull request as ready for review May 14, 2024 17:03
@maurelian maurelian requested a review from a team as a code owner May 14, 2024 17:03
@maurelian maurelian force-pushed the maur/module-retdata branch from 3be0556 to 5f3d869 Compare May 14, 2024 17:03
@maurelian maurelian force-pushed the maur/threshold-check branch from 32ccd7f to f5cbadd Compare May 14, 2024 17:27
@maurelian maurelian force-pushed the maur/module-retdata branch from 5f3d869 to 2ac75c0 Compare May 14, 2024 17:27
@maurelian maurelian force-pushed the maur/threshold-check branch from f5cbadd to cae0cd8 Compare May 14, 2024 19:30
@maurelian maurelian force-pushed the maur/module-retdata branch from 2ac75c0 to f1d1856 Compare May 14, 2024 21:08
@maurelian maurelian force-pushed the maur/threshold-check branch from cae0cd8 to 7248b95 Compare May 14, 2024 21:34
@codecov
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.22%. Comparing base (b123e13) to head (20dcb42).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #10538       +/-   ##
============================================
- Coverage    42.36%   29.22%   -13.15%     
============================================
  Files           73       31       -42     
  Lines         4836     2898     -1938     
  Branches       766      614      -152     
============================================
- Hits          2049      847     -1202     
+ Misses        2680     1976      -704     
+ Partials       107       75       -32     
Flag Coverage Δ
cannon-go-tests ?
chain-mon-tests 27.14% <ø> (ø)
common-ts-tests ?
contracts-ts-tests 12.25% <ø> (ø)
core-utils-tests ?
sdk-tests 40.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 42 files with indirect coverage changes

Base automatically changed from maur/threshold-check to develop May 14, 2024 22:19
@maurelian maurelian force-pushed the maur/module-retdata branch from f1d1856 to 3951864 Compare May 15, 2024 13:04
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 15, 2024

Walkthrough

Walkthrough

The changes focus on enhancing the deployment and configuration process of the Liveness Module within the contract system. Key updates include deploying and enabling the Liveness Module, ensuring the safe's threshold aligns with the module's requirements, and refining error handling. Additionally, several addresses in the deployment summary files were updated, and test setups were adjusted to reflect these changes.

Changes

File(s) Change Summary
.../scripts/DeployOwnership.s.sol Restructured deployment for Liveness Module, added deployment and enabling steps, and ensured threshold alignment.
.../src/Safe/LivenessModule.sol Added error handling for owner removal failures and modified functions to handle success and revert with error messages.
.../test/Safe/DeployOwnership.t.sol Added assertion to ensure the safe's threshold matches the Liveness Module's requirements.
.../test/Safe/LivenessGuard.t.sol Added initialization values, modified setup function, updated signers array, and overridden saltNonce.
.../test/Safe/LivenessModule.t.sol Added error handling, removed a test function, and modified error messages and expectations in test functions.
.../test/kontrol/proofs/utils/DeploymentSummary.sol Updated multiple constant addresses for various proxies and contracts.
.../test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol Updated multiple constant addresses for various proxies and contracts.
.../test/safe-tools/SafeTestTools.sol Added saltNonce, updated _setupSafe function, added new overloaded function, and modified logic and comments.

Recent Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 3951864 and 20dcb42.
Files ignored due to path filters (2)
  • packages/contracts-bedrock/semver-lock.json is excluded by !**/*.json
  • packages/contracts-bedrock/snapshots/abi/LivenessModule.json is excluded by !**/*.json
Files selected for processing (4)
  • packages/contracts-bedrock/src/Safe/LivenessModule.sol (3 hunks)
  • packages/contracts-bedrock/test/Safe/LivenessModule.t.sol (3 hunks)
  • packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummary.sol (14 hunks)
  • packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol (19 hunks)
Files skipped from review as they are similar to previous changes (3)
  • packages/contracts-bedrock/src/Safe/LivenessModule.sol
  • packages/contracts-bedrock/test/Safe/LivenessModule.t.sol
  • packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummary.sol
Additional Context Used
Learnings (1)
packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol (1)
User: JuanCoRo
PR: ethereum-optimism/optimism#9156
File: packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryCode.sol:31-31
Timestamp: 2024-01-23T23:59:43.702Z
Learning: The `L1CrossDomainMessengerProxyCode` constant is used in the file `DeploymentSummary.sol` at line 159.
Additional comments not posted (46)
packages/contracts-bedrock/test/kontrol/proofs/utils/DeploymentSummaryFaultProofs.sol (46)

15-15: Ensure the new address for addressManagerAddress is correct and consistent with the rest of the codebase.


16-16: Ensure the new address for anchorStateRegistryAddress is correct and consistent with the rest of the codebase.


17-17: Ensure the new address for anchorStateRegistryProxyAddress is correct and consistent with the rest of the codebase.


19-19: Ensure the new address for delayedWETHProxyAddress is correct and consistent with the rest of the codebase.


21-21: Ensure the new address for disputeGameFactoryProxyAddress is correct and consistent with the rest of the codebase.


23-23: Ensure the new address for l1CrossDomainMessengerProxyAddress is correct and consistent with the rest of the codebase.


25-25: Ensure the new address for l1ERC721BridgeProxyAddress is correct and consistent with the rest of the codebase.


27-27: Ensure the new address for l1StandardBridgeProxyAddress is correct and consistent with the rest of the codebase.


30-30: Ensure the new address for optimismPortalProxyAddress is correct and consistent with the rest of the codebase.


33-33: Ensure the new address for protocolVersionsProxyAddress is correct and consistent with the rest of the codebase.


34-34: Ensure the new address for proxyAdminAddress is correct and consistent with the rest of the codebase.


35-35: Ensure the new address for safeProxyFactoryAddress is correct and consistent with the rest of the codebase.


36-36: Ensure the new address for safeSingletonAddress is correct and consistent with the rest of the codebase.


38-38: Ensure the new address for superchainConfigProxyAddress is correct and consistent with the rest of the codebase.


39-39: Ensure the new address for systemConfigAddress is correct and consistent with the rest of the codebase.


40-40: Ensure the new address for systemConfigProxyAddress is correct and consistent with the rest of the codebase.


41-41: Ensure the new address for systemOwnerSafeAddress is correct and consistent with the rest of the codebase.


42-42: Ensure the new address for acc27Address is correct and consistent with the rest of the codebase.


43-43: Ensure the new address for acc28Address is correct and consistent with the rest of the codebase.


55-55: Ensure the new address for safeSingletonAddress is correctly used in the recreateDeployment function.


81-81: Ensure the new address for addressManagerAddress is correctly used in the recreateDeployment function.


84-84: Ensure the new address for systemOwnerSafeAddress is correctly used in the recreateDeployment function.


88-88: Ensure the new address for superchainConfigProxyAddress is correctly used in the recreateDeployment function.


120-120: Ensure the new address for protocolVersionsProxyAddress is correctly used in the recreateDeployment function.


161-161: Ensure the new address for optimismPortalProxyAddress is correctly used in the recreateDeployment function.


165-165: Ensure the new address for disputeGameFactoryProxyAddress is correctly used in the recreateDeployment function.


169-169: Ensure the new address for anchorStateRegistryProxyAddress is correctly used in the recreateDeployment function.


173-173: Ensure the new address for delayedWETHProxyAddress is correctly used in the recreateDeployment function.


177-177: Ensure the new address for systemConfigProxyAddress is correctly used in the recreateDeployment function.


181-181: Ensure the new address for l1StandardBridgeProxyAddress is correctly used in the recreateDeployment function.


184-185: Ensure the new address for l1CrossDomainMessengerProxyAddress is correctly used in the recreateDeployment function.


192-192: Ensure the new address for l1ERC721BridgeProxyAddress is correctly used in the recreateDeployment function.


376-376: Ensure the new address for systemConfigProxyAddress is correctly used in the recreateDeployment function.


409-409: Ensure the new address for l1CrossDomainMessengerProxyAddress is correctly used in the recreateDeployment function.


412-412: Ensure the new address for l1ERC721BridgeProxyAddress is correctly used in the recreateDeployment function.


415-415: Ensure the new address for l1StandardBridgeProxyAddress is correctly used in the recreateDeployment function.


418-418: Ensure the new address for disputeGameFactoryProxyAddress is correctly used in the recreateDeployment function.


421-421: Ensure the new address for optimismPortalProxyAddress is correctly used in the recreateDeployment function.


544-544: Ensure the new address for disputeGameFactoryProxyAddress is correctly used in the recreateDeployment function.


565-565: Ensure the new address for delayedWETHProxyAddress is correctly used in the recreateDeployment function.


580-580: Ensure the new address for anchorStateRegistryProxyAddress is correctly used in the recreateDeployment function.


616-616: Ensure the new address for disputeGameFactoryProxyAddress is correctly used in the recreateDeployment function.


619-619: Ensure the new address for systemConfigProxyAddress is correctly used in the recreateDeployment function.


622-622: Ensure the new address for optimismPortalProxyAddress is correctly used in the recreateDeployment function.


638-638: Ensure the new address for acc27Address is correctly used in the recreateDeployment function.


642-642: Ensure the new address for acc28Address is correctly used in the recreateDeployment function.


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?

Share
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 @coderabbitai in 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 @coderabbitai in 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 pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to 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.yaml file 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.

@maurelian maurelian force-pushed the maur/module-retdata branch from 3951864 to 20dcb42 Compare May 15, 2024 13:05
Copy link
Contributor Author

maurelian commented May 15, 2024

Merge activity

  • May 15, 9:05 AM EDT: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.
  • May 15, 9:26 AM EDT: Graphite failed to merge this pull request due to This repository has GitHub's merge queue enabled, which is currently incompatible with Graphite. Try your merge again, or report a bug if you see this consistently.

@maurelian maurelian added this pull request to the merge queue May 15, 2024
Merged via the queue into develop with commit 70c7e4d May 15, 2024
@maurelian maurelian deleted the maur/module-retdata branch May 15, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants