-
Notifications
You must be signed in to change notification settings - Fork 1
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
Aggregation ISM #7
Open
asaj
wants to merge
6
commits into
main
Choose a base branch
from
asaj/combo-ism
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 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
This file contains 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,57 @@ | ||
| hip | title | status | author | created | | ||
| --- | --------------- | ------ | ------ | ---------- | | ||
| 5 | Aggregation ISM | Draft | asaj | 2022-12-21 | | ||
|
||
### **Brief Summary / Abstract** | ||
|
||
Defines the specification for an interchain security module (ISM) that aggregates other ISMs. | ||
|
||
### **Motivation** | ||
|
||
The goal of this HIP is to standardize the `AggregationISM` interface, so that users can aggregate multiple ISMs. | ||
|
||
For example, some users have expressed the desire to have a security model where n-of-m validators need to sign from some large, semi trusted set, but also one more more signatures from some smaller, more trusted set, are needed. This model can be expressed as the aggregation of two `MultisigIsms`. Similarly, some users have expressed the desire to aggregate security across multiple generalized message bridges (GMBs). If any of those GMBs can be expressed as an ISM, an `AggregationISM` would allow users to aggregate their security models. | ||
|
||
### **Tech Spec** | ||
|
||
A `AggregationIsm` must return `2` in `moduleType()`. | ||
|
||
A `AggregationIsm` must implement the following interface. Relayers should use the `ismsAndThreshold()` view function to understand what metadata the `ISM` needs in order to verify a message. | ||
|
||
``` | ||
interface IAggregationIsm is IInterchainSecurityModule { | ||
/** | ||
* @notice Returns the set of ISMs responsible for verifying _message | ||
* and the number of ISMs that must verify | ||
* @dev Can change based on the content of _message | ||
* @param _message Hyperlane formatted interchain message | ||
* @return isms The array of ISM addresses | ||
* @return threshold The number of ISMs needed to verify | ||
*/ | ||
function ismsAndThreshold(bytes calldata _message) | ||
external | ||
view | ||
returns (address[] memory isms, uint8 threshold); | ||
} | ||
``` | ||
|
||
A `AggregationIsm` must expect the metadata passed to `verify()` to be formatted in the following way: | ||
|
||
``` | ||
* [ 0: 1] The size of the set of ISMs capable of verifying `_message`. | ||
* [ 1:????] Addresses of the set of ISMs capable of verifying `_message`, left padded to bytes32 | ||
* [????:????] Metadata offsets (i.e. for each ISM, where does the metadata for this ISM start? Zero if not provided) | ||
* [????:????] ISM metadata, packed encoding | ||
``` | ||
|
||
Relayers must order the ISM addresses and metadata in order to match the order returned by `ismsAndThreshold(_message)`. | ||
|
||
Relayers must provide metadata for exactly `_threshold` ISMs. | ||
|
||
`AggregationIsms` should avoid conditioning on frequently-changing state, as this may result in a relayer formatting metadata incorrectly. | ||
|
||
### **Rationale** | ||
|
||
### **Backwards Compatibility** | ||
|
||
### **Security Considerations** |
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.
I assume section to be filled out?
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.
Tbh I'm not really sure what to put. Again, the design decisions seem very straightforward.