Confirmation Canister

The confirmation canister handles the creation of threshold signatures and maintains blob confirmations.

Architecture

• The Confirmation Canister generates threshold signatures and manages confirmations.

• Every batch contains 12 (adjustable) blob digests, forming an immutable Merkle Tree.

• Once the batch is complete (12 digests by default), the Merkle Root is signed, and the batch is saved as a BatchConfirmation.

• Each BatchConfirmation remains active for one week (adjustable).

Canister Types

enum ConfirmationStatus {
    Pending,                         // Awaiting signature in the confirmation canister
    Confirmed(Confirmation),         // Signed, returns the confirmation for the requested digest
    Invalid,                         // Digest not found or retired/invalid
}

struct Confirmation {
    root: [u8; 32],                  // Merkle root hash
    proof: Proof,                    // Merkle proof
    signature: String,               // Hex-encoded signature
}

struct Proof {
    proof_bytes: Vec<u8>,            // Merkle proof for the requested digest
    leaf_index: usize,               // Index of the requested digest in the Merkle tree
    leaf_digest: [u8; 32],           // Requested digest
}

struct BatchConfirmation {
    signature: Option<String>,       // Signature of the Merkle Root (if signed)
    root: [u8; 32],                  // Merkle root hash
    nodes: Vec<[u8; 32]>,            // Nodes of the batch's Merkle tree (normally 12 digests)
}

// Signature Canister Configuration
struct Config {
    confirmation_batch_size: usize,  // Number of digests per batch
    confirmation_live_time: u32,     // Duration (in seconds) for which confirmations are stored (1 week recommended)
    da_canisters: HashSet<Principal>,// Set of data availability (storage) canisters
    owner: Principal,                // Principal authorized to update the configuration
}

Canister Services

Candid Interfaces

Last updated