Solana Architecture Overview
Solana is a high-performance blockchain designed for speed and scale. This chapter provides a comprehensive overview of Solana's architecture before we dive into specific components.
Why Solana?
Solana was designed to solve the blockchain trilemma—achieving decentralization, security, AND scalability without major compromises.
Performance Targets
| Metric | Ethereum | Solana |
|---|---|---|
| Block Time | ~12 seconds | ~400ms |
| Throughput | ~30 TPS | 65,000+ TPS (theoretical) |
| Finality | ~13 minutes | ~400ms (confirmed) |
| Transaction Cost | $1-50+ | ~$0.00025 |
Key Innovations
Solana achieves this through eight core innovations:
Architecture Diagram
Core Components
1. Transaction Processing Unit (TPU)
The TPU is the leader's transaction processing pipeline:
2. Transaction Validation Unit (TVU)
Non-leader validators run the TVU:
3. The Bank
The Bank manages account state:
Transaction Lifecycle
Understanding how a transaction flows through Solana:
Account Model Deep Dive
Solana uses a unique account model:
Account Types
Account Relationships
Rent and Storage
Solana charges rent for account storage:
Rent-Exempt Accounts
If an account holds >= 2 years of rent, it's rent-exempt:
Most accounts should be rent-exempt. Non-exempt accounts are gradually collected.
Programs (Smart Contracts)
Solana programs are compiled to BPF bytecode:
Program Execution
Cross-Program Invocation (CPI)
Programs can call other programs:
CPI Code Example
Network Clusters
Solana has multiple networks:
| Cluster | Purpose | URL |
|---|---|---|
| Mainnet Beta | Production | https://api.mainnet-beta.solana.com |
| Devnet | Development | https://api.devnet.solana.com |
| Testnet | Validator testing | https://api.testnet.solana.com |
| Localnet | Local development | http://localhost:8899 |
Connecting to Clusters
Key Takeaways
- Solana optimizes for throughput through parallel execution and PoH
- Everything is an account: programs, data, tokens, NFTs
- Programs are stateless: all state lives in accounts
- Upfront account declaration enables parallelism
- Fast finality (~400ms confirmed) enables responsive apps
What's Next
The following chapters dive deep into each component:
- Validators vs RPC Nodes: Understanding network participants
- Proof of History: Solana's cryptographic clock
- Slots & Epochs: Time organization in Solana
- Leader Rotation: How block producers are chosen
Next: Validators vs RPC Nodes