Skip to main content

Multisig ISM

MultisigISM是最常用的ISM类型之一。这些ISMs验证 m 中的n个 [Validators](. /agents/ Validators .mdx)已经证明了特定链间消息的有效性。

Multisig Module Types

基于以下模块类型,中继器将对适当格式的元数据进行编码:

enum Types {
UNUSED,
ROUTING,
AGGREGATION,
LEGACY_MULTISIG,
MERKLE_ROOT_MULTISIG,
MESSAGE_ID_MULTISIG,
NULL, // used with relayer carrying no metadata
CCIP_READ
}

对于上述模块类型,中继器满足以下元数据格式,供ISMs使用:

MessageIdMultisigIsmMetadata

Type: Types.MESSAGE_ID_MULTISIG

Format of metadata:

  • 1st component (len == 32 bytes): Origin merkle tree address
  • 2nd component (len == 32 bytes): Signed checkpoint root
  • 3rd component (len == 4 bytes): Signed checkpoint index
  • 4th component (len == threshold * 65 bytes): Validator signatures

MerkleRootMultisigIsmMetadata

Type: Types.MERKLE_ROOT_MULTISIG

Format of metadata:

  • 1st component (len == 32 bytes) Origin merkle tree address
  • 2nd component (len == 4 bytes) Index of message ID in merkle tree
  • 3rd component (len == 32 bytes) Signed checkpoint message ID
  • 4th component (len == 1024 bytes) Merkle proof
  • 5th component (len == 4 bytes) Signed checkpoint index (computed from proof and index)
  • 6th component (len == threshold * 65 bytes): Validator signatures