Lease Consensus Logic
This crate implements the consensus algorithms required to agree on Lease Validity.
Features
std- Enable standard library (includes tokio)net- Enable networking (UDP transport)grpc- Enable gRPC transport with tonictls- Enable TLS/mTLS supportobservability- Enable Prometheus metricsfull- Enable all features
Architecture
┌─────────────────────────────────────────────────────────────┐
│ ConsensusEngine │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ RaftEngine │ │ RaftNetwork │ │ ReplicatedStateMachine│ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ RaftStorage │ │GrpcTransport│ │ StateMachine │ │
│ │ (Sled/Mem) │ │ (or InMem) │ │ (User-defined) │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘