The Consensus contract manages a permissioned set of signers and enforces multi-signature validation logic using either EIP-712 or EIP-1271 signatures. It is a lightweight module designed for verifying offchain consensus before executing critical actions such as deposit and redemptions via SignatureQueues.
It supports:
To validate an action, a set of authorized signers must collectively submit signatures. The number of valid signatures must be greater than or equal to the configured threshold.
Each signer is associated with a SignatureType:
EIP712 – Used for externally owned accounts (standard ECDSA.recover)EIP1271 – Used for contract accounts (via isValidSignature())struct ConsensusStorage {
uint256 threshold;
EnumerableMap.AddressToUintMap signers;
}
threshold: Minimum number of valid signatures required for verification to succeed.signers: Mapping of signer addresses → their configured signature type.function initialize(bytes calldata data)