docs: add docstrings for multisig signature ordering (#4042)

### Description

Update `MultisigISM.verify` docs with clarity around signature ordering
pull/4046/head
Yorke Rhodes 5 months ago committed by GitHub
parent a109937f96
commit 7c7e0dd5ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      solidity/contracts/interfaces/isms/IMultisigIsm.sol
  2. 5
      solidity/contracts/isms/multisig/AbstractMultisigIsm.sol

@ -8,6 +8,7 @@ interface IMultisigIsm is IInterchainSecurityModule {
* @notice Returns the set of validators responsible for verifying _message
* and the number of signatures required
* @dev Can change based on the content of _message
* @dev Signatures provided to `verify` must be consistent with validator ordering
* @param _message Hyperlane formatted interchain message
* @return validators The array of validator addresses
* @return threshold The number of validator signatures needed

@ -26,6 +26,7 @@ abstract contract AbstractMultisigIsm is IMultisigIsm {
* @notice Returns the set of validators responsible for verifying _message
* and the number of signatures required
* @dev Can change based on the content of _message
* @dev Signatures provided to `verify` must be consistent with validator ordering
* @param _message Hyperlane formatted interchain message
* @return validators The array of validator addresses
* @return threshold The number of validator signatures needed
@ -60,7 +61,9 @@ abstract contract AbstractMultisigIsm is IMultisigIsm {
/**
* @notice Requires that m-of-n validators verify a merkle root,
* and verifies a merkle proof of `_message` against that root.
* and verifies a merkle proof of `_message` against that root.
* @dev Optimization relies on the caller sorting signatures in the same order as validators.
* @dev Employs https://www.geeksforgeeks.org/two-pointers-technique/ to minimize gas usage.
* @param _metadata ABI encoded module metadata
* @param _message Formatted Hyperlane message (see Message.sol).
*/

Loading…
Cancel
Save