Core Actor Types
The Clementine protocol consists of three primary actor types:Verifier
Validates deposits and provides partial signatures for N-of-N multisig transactions
Operator
Manages collateral, processes withdrawals, and generates cryptographic commitments
Aggregator
Coordinates communication between verifiers and operators to finalize deposits
Actor Base Structure
All actors share a common foundation defined incore/src/actor.rs:
Key Capabilities
Every actor can:- Sign transactions using Schnorr signatures with taproot support
- Manage tweaked keys for script and key path spends
- Generate Winternitz signatures for BitVM assertions
- Derive cryptographic keys using HKDF for various protocol operations
State Management
Each actor type maintains its own state:Database State
- Operators: Track collateral UTXOs, kickoff transactions, and round indices
- Verifiers: Store operator public keys, deposit data, and partial signatures
- Aggregators: Cache verifier and operator keys for coordination
Nonce Management
Verifiers maintain nonce sessions for MuSig2 signing:- Maximum session size: Configurable via
MAX_ALL_SESSIONS_BYTES - Maximum sessions:
MAX_NUM_SESSIONS(prevents memory exhaustion) - Session IDs are randomly generated to prevent prediction attacks
Signing Architecture
Taproot Signing
Actors support both key path and script path spends: Key Path Spend: Uses tweaked keys with merkle rootWinternitz Key Derivation
Actors derive Winternitz keys for different purposes:- Kickoff transactions: Commit to blockhashes
- BitVM assertions: Prove computation correctness
- Challenge acknowledgments: Watchtower responses
Tweak Cache Optimization
Actors use a cache to avoid recomputing tweaked keys:- Signing multiple inputs in a single transaction
- Verifying signatures from multiple parties
- Processing deposits with many operators
Communication Patterns
Verifier ↔ Aggregator
- Verifier generates nonces via
nonce_gen(num_nonces) - Aggregator collects and aggregates nonces
- Verifier provides partial signatures via
deposit_sign() - Aggregator validates and combines signatures
Operator ↔ Aggregator
- Operator provides public keys via
get_params() - Aggregator distributes keys to verifiers
- Operator signs deposit transactions via
deposit_sign() - Aggregator finalizes deposit after collecting all signatures
Operator ↔ User
- User requests withdrawal with signature
- Operator validates profitability
- Operator funds and broadcasts payout transaction
- Operator triggers kickoff for reimbursement
Security Considerations
Key Isolation
Each actor:- Uses a unique secret key derived from configuration
- Maintains separate EVM addresses for Citrea operations
- Never shares private keys with other actors
Signature Verification
Before using any signature, actors verify:- Correct public key
- Valid sighash for the transaction
- Appropriate tweak data (key path vs script path)
Nonce Security
Verifiers implement nonce session limits to prevent:- Memory exhaustion attacks
- Nonce reuse vulnerabilities
- Session hijacking
Next Steps
Verifier Details
Learn about deposit validation and signature generation
Operator Details
Understand collateral management and withdrawals
Aggregator Details
Explore coordination and key distribution