How tari-project/tari-dan works
High-Level Components
a) Application Layer
• Validator Node
• Wallet Daemon
• CLI Tools
• Web UIs
• Indexer
• Signaling Server
b) Core Protocol Layer
• Consensus (HotStuff implementation)
• Transaction Processing
• State Management
• Template Engine
• Cryptography
c) Networking Layer
• P2P Communication
• RPC Framework
• LibP2P Implementation
• Message Handling
d) Storage Layer
• SQLite Implementations
• State Store
• Transaction Store
• Message Logging
Key Architectural Elements
a) Validator Node Architecture:
[Web UI] <-> [JSON-RPC API] <-> [Validator Node Core]
• [Consensus] <-> [State Machine] <-> [Template Engine]
• [P2P Network] <-> [Storage]
b) Wallet Architecture:
[CLI/Web UI] <-> [Wallet Daemon] <-> [SDK]
• [Key Management] <-> [Transaction Builder]
• [Storage Layer]
Implementation Details
• HotStuff consensus implementation
• WASM template execution
• LibP2P networking
• SQLite storage backends
• RPC framework
Cross-Cutting Concerns
Shared services like:
• Logging
• Metrics
• Configuration
• Security
External Dependencies
Interaction points with:
• Base Tari network
• IPFS/HTTP (for template storage)
• Tor network
This architecture reflects a complex distributed system with multiple interaction points and careful consideration of security, scalability, and reliability concerns.