Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.78 KB

README.md

File metadata and controls

18 lines (12 loc) · 1.78 KB

Governance Contracts

Overview

This contract provides an alternative to traditional multi-signature contracts where instead of requiring signatures from K of N pre-specified signers, an aggregate signature is required from a quorum of the current validators for a given blockchain.

The contract leverages off-chain Avalanche ICM Messages, which are manually approved for signing by a chain's validators. It requires these messages to have the source address set to the zero address to enforce this, since on-chain ICM messages cannot have zero source address.

Note:

  1. The blockchain validating the message may or may not be the same chain where the target contract and the ValidatorSetSig contract are deployed.
  2. Off-Chain ICM messages are ICM messages that validators can include in their config to indicate that they are willing to sign them even though they are not a result of on-chain activity.

Creating a valid Off-chain ICM Message for interaction with the ValidatorSetSig Contract

  1. ABI-encode a ValidatorSetSigMessage as defined in ValidatorSetSig.sol
  2. OPTIONAL: call validateMessage view method of the intended contract to confirm that the message has correct fields, including the nonce.
  3. Pack that as the payload of an AddressedCall ICM Message format. Note that the SourceAddress field has to be set to the zero address.
  4. Pack the AddressedCall as the payload of the UnsignedWarpMessage.