Solana is a high-performance blockchain network designed to enable decentralized applications and markets to scale globally. Launched in 2020, Solana aims to solve the blockchain trilemma by achieving security, scalability and decentralization through several technical innovations.
History
Solana was founded in 2017 by former Qualcomm and Dropbox engineer Anatoly Yakovenko. Yakovenko created Solana to build a high-performance blockchain network that could match the transaction speeds and scalability seen in traditional web architectures. This was in contrast to existing public blockchains like Bitcoin and Ethereum, which faced challenges in scaling to support high transaction volumes.
The Solana protocol and white papers were published in 2018. In March 2020, Solana launched its mainnet beta after completing a incentivized testnet process. The network has seen rapid growth in decentralized applications, markets and developers building on the platform.
Architecture
State Model: Cloudbreak
Cloudbreak is Solana's horizontally scaled state model that manages account data across nodes. It utilizes a combination of RAM, SSDs, and parallelized threads to achieve fast account data access.
Cloudbreak shards account data into memory-mapped files distributed randomly across available SSDs. This provides concurrent transaction processing as account updates can be appended and read in parallel.
By scaling account data access horizontally across SSDs instead of relying on a single disk, Cloudbreak enables validators to efficiently track blockchain state even at petabyte-scale data sizes.
Consensus: Proof of History
Proof of History (PoH) uses a Verifiable Delay Function (VDF) to embed an ordinal position within every transaction. This allows the network to process transactions in parallel while maintaining order and time.
A VDF requires a predefined number of sequential steps to evaluate, yet produces a unique output that can be efficiently verified. PoH implements a VDF as a sequential hash function that runs continuously, with the previous output used as the next input. The iterations of the hash function and the outputs are periodically recorded to create a historical record that proves time has passed.
Messages can be inserted into the PoH sequence, which guarantees they were created after a specific moment in time. Transactions that reference the PoH sequence can then be processed in parallel, as their timing and order is established cryptographically by the VDF. This innovation optimizes consensus mechanisms and allows Solana's throughput to scale with modern computing hardware.
Software Stack
TBC
Execution: Sealevel → Runtime v2
Sealevel
Sealevel is the parallelized runtime engine for smart contracts on Solana. It enables concurrent transaction processing by allowing multiple transactions to execute simultaneously on available cores.
Sealevel schedules transactions across cores by analyzing their account access patterns. Non-overlapping transactions run in parallel, improving throughput. Further optimization comes from running identical programs concurrently over different accounts using SIMD instructions.
By parallelizing execution across multiple cores, Sealevel unlocks the full processing capacity of modern hardware for Solana. This innovation combined with others such as PoH allow the network to scale transaction throughput to match advancing hardware capabilities.
Runtime v2
Solana Runtime v2 is a major upgrade to the execution environment and programming model of the Solana blockchain. It was first announced in November 2022 as part of Solana's ongoing efforts to improve performance, flexibility, and security.
Runtime v2 introduces several key changes:
- Support for the Move programming language, enabling developers familiar with Move to build on Solana. Move programs will be compiled and verified at deployment.
- Programs become libraries that can export types, constants, and functions. All functions can be entry points with typed parameters and return values. This removes the need for instruction dispatchers.
- A unified address space and sandboxing model enforced at the allocation level instead of separate VMs. This allows sharing memory across instructions and avoids costly VM context switching.
- Calls between programs will work more like function calls with parameters instead of the limited CPI model. Cross-program invocation (CPI) costs will be reduced.
- The account model and Rust support remains largely unchanged. The rent exempt field is deprecated. A new type field is added.
Runtime v2 represents a major breaking change. A long migration period of 1+ years is planned where both old and new runtimes will be supported. This will allow programs to be ported and funds migrated.
The timing is still uncertain, with the earliest possible testnet deployment by mid-2024. Mainnet deployment likely another year after initial testnet release.
Sybil Protection: Proof of Stake
TBC
Mempool: Gulf Stream
Gulf Stream is Solana's mempool management protocol that enables transaction caching and forwarding to validators before leader sequencing. This reduces confirmation times, switch leaders faster, and decreases memory pressure on validators.
In Gulf Stream, clients forward transactions to the expected next leader ahead of time based on the predefined leader schedule. Validators can then execute transactions early and organize their pending pools more efficiently.
Gulf Stream provides benefits such as allowing validators to prioritize transactions based on staking weight and enabling graceful degradation during denial-of-service attacks. By optimizing mempool management, Gulf Stream helps Solana achieve industry-leading transaction processing speeds.
Validation: Pipelining
Solana validators utilize a transactions processing pipeline to concurrently validate transactions and replicate new blocks. The pipeline progresses through four stages - data fetching, signature verification, banking, and writing.
Each stage of the pipeline operates on a concurrent batch of transactions, similar to an assembly line. This concurrent pipelining increases overall throughput by keeping all CPU and GPU cores busy processing different transactions simultaneously.
Pipelining combined with parallelized runtime and optimized data structures enable Solana to fully leverage modern hardware's processing capacity for fast blockchain consensus and state replication.
Node Software: Firedancer
Firedancer is an independent implementation of the Solana validator software created by Jump Trading. It optimizes every component for maximum throughput, number of nodes, and security.
Written in C for high performance, Firedancer focuses on optimizing networking, runtime, and consensus logic. The goal is to remove any bottlenecks between Solana's logical architecture and hardware capabilities.
An independent validator implementation increases network diversity, reliability, and security. Together with Solana's core innovations, Firedancer will help unlock the network's full performance potential as hardware advances.
Account Model
The Solana blockchain uses an account model to store and manage data. Accounts are a fundamental part of the Solana architecture and are used to hold everything from smart contract data to tokens and NFTs.
On Solana, an account is represented by a public key, which serves as the account's address. To create an account on Solana, a client generates a key pair and uses the SystemProgram::CreateAccount
call to register the public key and set the required data storage size. The ‘System Program’ is a native program responsible for account operations, including creating accounts and managing ownership.
Accounts have the following properties:
- 'Owner': The program that owns and controls the account. For normal wallet accounts, this is the System Program.
- 'Executable': Whether the account contains smart contract code that can be executed.
- 'Data': An array of bytes that holds account data. This can represent tokens, NFTs, program state, etc.
- 'Lamports': The number of lamports (fractions of $SOL) held by the account. Used to pay for transaction fees and rent.
- 'Rent': Accounts must pay rent regularly to validators for storage. Rent is calculated based on data size.
- 'Rent Exemption': Accounts with 2 years worth of rent can become rent exempt. This allows them to stay alive indefinitely without further rent payments.
To hold tokens or NFTs, separate token accounts are used. Each token account is associated with a particular token mint and owns a balance of that token.
Closing empty token accounts returns the rent lamports back to the owner. This allows NFT collectors and users to recover $SOL paid for account creation.
Token Standards
Solana Program Library (SPL) Tokens
SPL tokens are fungible tokens that are native to the Solana blockchain. SPL stands for Solana Program Library, which contains the code for managing SPL tokens on Solana.
SPL tokens are created and managed through the Solana Token Program, which is part of the Solana Program Library. The Token Program allows developers to mint, transfer, and burn SPL tokens.
To create a new SPL token, a token mint account is made by sending an instruction to the Token Program. This mint account stores information about the total token supply and the mint authority that is allowed to mint new tokens.
Each user's token balance is stored in associated token accounts. These accounts are linked to the user's wallet and a particular SPL token mint. The Associated Token Account Program (ATAP) manages transfers between user token accounts.
When a user receives SPL tokens, an associated token account is created for them if they don't already have one for that token. This requires a rent-exempt balance of Solana. Users can then receive, hold, and transfer SPL tokens using their associated token accounts.
SPL tokens have become an integral part of the Solana ecosystem, enabling use cases like stablecoins, governance, staking, gaming, and lending. The flexibility and programmability of SPL tokens make them a key building block for decentralized applications on Solana.
Token 2022
Token 2022 is a new token program created by Solana Labs engineers in 2022 as an extension of the original SPL Token program. It was designed to add more functionality and features to tokens on the Solana blockchain while maintaining compatibility with existing SPL tokens.
Key features of Token 2022 include:
- Confidential transfers - Allows sending tokens without revealing amounts.
- CPI guard - Requires transfers to sketchy dApps to be approved by a delegate.
- Transfer memos - Can require memos on token transfers.
- Interest bearing tokens - Allows tokens to gain interest over time.
- Non-transferable tokens - Tokens can be made non-transferable.
- Default frozen state - New accounts can default to a frozen state.
- Closable mints - Mints can be closed when supply hits zero.
Token 2022 maintains the same account structure as SPL Token so existing programs will work with it. New functionality is added through optional extensions that are encoded after the 165 byte account size of normal SPL Token accounts.
Programs can migrate to using Token 2022 by wrapping their existing SPL Tokens through a wrapping protocol. This allows zero downtime migration.
Wallets and clients can get Token 2022 accounts by making an additional RPC call using the new Token 2022 program ID. Most functionality remains the same as SPL Token otherwise.
Token 2022 provides a way to extend token functionality on Solana without disrupting the existing SPL Token ecosystem. It has been audited for security and deployed to Solana mainnet.
Fault Tolerance: Tower BFT
Tower BFT is Solana's implementation of Practical Byzantine Fault Tolerance (PBFT) that utilizes Proof of History for coordination. By relying on the PoH timestamps, Tower BFT reduces messaging overhead and latency during consensus.
The PoH sequence encodes the PBFT timeout periods directly. Each validator can then independently progress through consensus rounds without constant coordination messages. The timeouts increase exponentially, cementing blocks after they have passed certain PoH timestamps. Transactions are considered final after 2^32 timestamps (~12.8 seconds).
This asynchronous model allows Solana to finalize consensus much faster than traditional PBFT implementations. Tower BFT enables Solana to progress at blockchain speeds as fast as the hardware can increment the PoH clock.
Transaction Propagation: Turbine
Turbine is a block propagation protocol created by Solana that is inspired by BitTorrent. It allows Solana nodes to quickly propagate large amounts of data, including transaction data and blocks, to all validators on the network.
Turbine structures the validator nodes into a hierarchy with exponentially increasing size at each level. Leaders slice data into packets and transmit each packet to a different validator node. The validators then relay data down the hierarchy until all nodes receive all the data.
Turbine also utilizes erasure coding and stake-based prioritization to account for potential malicious actors. Together with innovations like PoH, Turbine enables Solana to maintain consensus securely even with a growing validator count and high transaction volumes.
Data Storage: Archivers
Archivers are nodes that provide distributed storage of Solana's ledger using Proof of Replication. With petabyte-scale data generated annually, Archivers allow cost-effective storage across a network of nodes.
Archivers form a replication network that uses erasure coding to distribute ledger shards. Periodically, Archivers are challenged to reproduce a proof of replication by validators. Validators can also audit proofs in parallel using GPUs.
This architecture separates storage from validation, enabling Solana to scale ledger storage efficiently across nodes without centralization risks. Archivers are incentivized by a share of inflation rewards proportional to their storage contribution.
Controversies
Solana Outages
- September 14, 2021: A DDoS attack on a decentralised exchange (DEX) caused an outage for 17 hours.
- January 6 – 10, 2022: A presumed DDoS attack caused a multi-day outage.
- January 22, 2022: Duplicate transactions caused 29 hours of congestion and downtime.
- March 28, 2022: RPC services upgrade caused nodes running v1.8 to fork.
- April 30, 2022: Consensus failure during a large NFT mint caused a seven hour outage.
- May 27, 2022: Slower slot times caused the network clock to drift out of sync.
- June 1, 2022: A runtime bug caused an outage that lasted ~5 hours.
- October 1, 2022: A misconfigured node caused data loss and crashed the chain.
- February 28, 2023: A forking event that lasted for ~20 hours.
- February 6, 2024: A bug in the legacy loader program caused a ~5hr outage.
Inflation
Solana does not have a supply cap and the number of unlocked tokens increased from 46m to 261m between December 2020 and January 2021.
Circulating Supply
In April 2020, Solana founder Anatoly Yakovenko pledged to burn 11,365,067 tokens that had been leant to a market making firm but had not been disclosed to the public.
Transaction Per Second (TPS) Inflation
On March 9th, 2023, Justin Bons alleged that Solana had been including consensus coordination messages in their Transactions Per Second (TPS) statistics, inflating the true chain usage.
Fake Total Value Locked (TVL)
On August 4th, 2022, a Coindesk article exposed that the majority of Solana TVL had been fabricated by two developers. The fraudulent metrics accounted for more than 70% of Solana's $10B TVL at its peak.