How ssvlabs/ssv works
Core System Components
• Network Layer
• P2P Communication (network/p2p)
• Discovery Service (network/discovery)
• Stream Controller (network/streams)
• Protocol Layer (protocol/v2)
• QBFT Consensus
• Message Processing
• Runner Components
• Operator Layer
• Duty Management
• Validator Management
• Key Management
• Blockchain Integration
• Beacon Chain Client
• ETH1 Client
• Contract Interactions
External Interfaces
• API Gateway (api/)
• Monitoring/Metrics (monitoring/)
• Boot Nodes
• Beacon Chain
• Ethereum Network
Use a Multi-Layer Architecture
┌─────────────────────────────────────────────────────────┐
• External Layer │
• [Beacon Chain] [ETH Network] [Monitoring] [Boot Nodes] │
• ┤
• Interface Layer │
• [API Gateway] [Health Checks] [Metrics] │
• ┤
• Core Layer │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │
• Network Stack│ │QBFT Consensus│ │Operator Services │ │
• ┘ └──────────────┘ └──────────────────┘ │
• ┤
• Storage Layer │
• [Key Store] [Validator Store] [Message Store] │
• ┘
• Blue: External services and interfaces
• Green: Core processing components
• Yellow: Storage and persistence
• Red: Critical consensus and validation components
Key Relationships to Show:
• Incoming beacon chain duties → Operator services
• Network messages → QBFT consensus
• Consensus decisions → Validator actions
• Metrics collection paths
Component Interactions
• P2P message routing between nodes
• Consensus protocol communication
• Validator duty execution flow
• Storage access patterns
Additional Elements:
System Boundaries
• Node instance boundary
• Network boundary
• Trust boundaries
• Consensus group boundaries
Implementation Notes:
Use Professional Diagramming Tools
• Lucidchart
Maintain Hierarchy
• Related components
• Clear separation of concerns
• Scaling points
Technical Details
• Protocol versions
• Key interfaces
• Critical configurations
• Performance monitoring points