-
Notifications
You must be signed in to change notification settings - Fork 367
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
feat: mutable storage ISMs #4577
Conversation
🦋 Changeset detectedLatest commit: b7a84cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -0,0 +1,63 @@ | |||
// SPDX-License-Identifier: MIT OR Apache-2.0 | |||
pragma solidity >=0.8.0; |
Check notice
Code scanning / Olympix Integrated Security
Using an unbounded pragma for Solidity version may be unsafe if future versions introduce breaking changes. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unbounded-pragma Low
|
||
abstract contract AbstractStorageMultisigIsm is AbstractMultisigIsm, Ownable { | ||
address[] public validators; | ||
uint8 public threshold; |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
|
||
constructor( | ||
address[] memory _validators, | ||
uint8 _threshold |
Check notice
Code scanning / Olympix Integrated Security
Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low
AbstractMessageIdMultisigIsm, | ||
AbstractStorageMultisigIsm | ||
{ | ||
uint8 public constant moduleType = |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
uint8(IInterchainSecurityModule.Types.MESSAGE_ID_MULTISIG); | ||
|
||
constructor( | ||
address[] memory _validators, |
Check notice
Code scanning / Olympix Integrated Security
Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4577 +/- ##
==========================================
+ Coverage 74.27% 74.58% +0.31%
==========================================
Files 101 103 +2
Lines 1481 1515 +34
Branches 192 195 +3
==========================================
+ Hits 1100 1130 +30
- Misses 360 364 +4
Partials 21 21
|
@@ -0,0 +1,9 @@ | |||
// SPDX-License-Identifier: MIT OR Apache-2.0 | |||
pragma solidity >=0.8.0; |
Check notice
Code scanning / Olympix Integrated Security
Using an unbounded pragma for Solidity version may be unsafe if future versions introduce breaking changes. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unbounded-pragma Low
|
||
constructor( | ||
address[] memory _validators, | ||
uint8 _threshold |
Check notice
Code scanning / Olympix Integrated Security
Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low
} | ||
|
||
contract StorageMerkleRootMultisigIsmFactory is StorageMultisigIsmFactory { | ||
address internal immutable _implementation; |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
} | ||
|
||
contract StorageMessageIdMultisigIsmFactory is StorageMultisigIsmFactory { | ||
address internal immutable _implementation; |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
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.
I mostly did a cursory review, so would like @aroralanuk to take a deeper look for the approval
ce0e9a7
to
b51f1d3
Compare
@@ -0,0 +1,83 @@ | |||
// SPDX-License-Identifier: MIT OR Apache-2.0 | |||
pragma solidity >=0.8.0; |
Check notice
Code scanning / Olympix Integrated Security
Using an unbounded pragma for Solidity version may be unsafe if future versions introduce breaking changes. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unbounded-pragma Low
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; | ||
|
||
contract StorageAggregationIsm is AbstractAggregationIsm, OwnableUpgradeable { | ||
address[] public modules; |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
IThresholdAddressFactory, | ||
PackageVersioned | ||
{ | ||
address public immutable implementation; |
Check warning
Code scanning / Olympix Integrated Security
Some state variables are not being fuzzed in test functions, potentially leaving vulnerabilities unexplored. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/unfuzzed-variables Medium
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.
Contracts look good
Copying audit feedback over
|
address[] public modules; | ||
uint8 public threshold; | ||
|
||
event ModulesAndThresholdSet(address[] modules, uint8 threshold); |
Check warning
Code scanning / Olympix Integrated Security
Test functions fail to assert the emission of expected events, potentially missing critical contract behaviors. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-events-assertion Medium
|
||
event ModulesAndThresholdSet(address[] modules, uint8 threshold); | ||
|
||
constructor( |
Check notice
Code scanning / Olympix Integrated Security
Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests Low
event ModulesAndThresholdSet(address[] modules, uint8 threshold); | ||
|
||
constructor( | ||
address[] memory _modules, |
Check notice
Code scanning / Olympix Integrated Security
Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low
|
||
constructor( | ||
address[] memory _modules, | ||
uint8 _threshold |
Check notice
Code scanning / Olympix Integrated Security
Parameters passed to a constructor that are not validated for correct values may lead to contract creation in an undesired state. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/no-parameter-validation-in-constructor Low
address[] memory _modules, | ||
uint8 _threshold | ||
) public onlyOwner { | ||
require( |
Check warning
Code scanning / Olympix Integrated Security
Test functions fail to verify specific revert reasons, potentially missing important contract behavior validation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-revert-reason-tests Medium
uint8 public constant moduleType = | ||
uint8(IInterchainSecurityModule.Types.MESSAGE_ID_MULTISIG); | ||
|
||
constructor( |
Check notice
Code scanning / Olympix Integrated Security
Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests Low
* @notice Emitted when a multisig module is deployed | ||
* @param module The deployed ISM | ||
*/ | ||
event ModuleDeployed(address module); |
Check warning
Code scanning / Olympix Integrated Security
Test functions fail to assert the emission of expected events, potentially missing critical contract behaviors. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-events-assertion Medium
contract StorageMerkleRootMultisigIsmFactory is StorageMultisigIsmFactory { | ||
address internal immutable _implementation; | ||
|
||
constructor() { |
Check notice
Code scanning / Olympix Integrated Security
Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests Low
contract StorageMessageIdMultisigIsmFactory is StorageMultisigIsmFactory { | ||
address internal immutable _implementation; | ||
|
||
constructor() { |
Check notice
Code scanning / Olympix Integrated Security
Test functions fail to thoroughly test all aspects of contract constructors, potentially missing critical initialization issues. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/incomplete-constructor-tests Low
@@ -32,6 +36,10 @@ | |||
address[] calldata _values, | |||
uint8 _threshold | |||
) public returns (address) { | |||
require( |
Check warning
Code scanning / Olympix Integrated Security
Test functions fail to verify specific revert reasons, potentially missing important contract behavior validation. For more information, visit: http://detectors.olympixdevsectools.com/article/web3-vulnerability/missing-revert-reason-tests Medium
eca30e7
to
13f0c35
Compare
### Description - Implements storage-based aggregation ISM ### Drive-by changes - Moves `PackageVersioned` imports from static to abstract aggregation ism ### Backward compatibility Yes ### Testing Unit Tests
13f0c35
to
b7a84cd
Compare
Description
Some chains like zkSync do not support eip1167 (minimal/meta) proxies. This PR adds an alternative storage based multisig and aggregation ISM for use on these chains.
Drive-by changes
Simplify CLI multisig interactive config builder. Remove stale multisig config.
Related issues
None
Backward compatibility
Yes, relayer already supports this module type
Testing
Contract unit tests
Manual CLI tests