Alternative Solana: Do not take the road of sharding

in solana •  4 years ago 

Content

Not long ago, FTX will release its DEX exchange based on Solana, which is called Serum. FTX CEO SBF also publicly "brings salt" for Solana: "Solana is great!" What is the situation? Why not build its DEX based on Ethereum? All of this stems from Solana's characteristics: achieving high performance and low cost under the premise of ensuring a certain degree of safety. As of the time of writing the Blue Fox Notes, Solana's total transaction number is nearly 2 billion. The current tps is between 200-300, which is about 10-20 times that of ETH. It can handle transactions in most current scenarios, especially It's a deal in the DeFi field.

image.png

(SOURCE: http://Solanabeach.io)

Solana's token is SOL. As of the writing of Blue Fox Notes, its circulating market value is more than 38 million U.S. dollars, with more than 170 million active pledges, and a total of 135 pledgers. Among them, there are 128 pledgers who pledge more than $1 million (calculated at the current SOL price). The current verifiers are relatively scattered and all pledge a certain amount of funds. Solana already has a certain community foundation. At present, its pledgers mainly come from Europe and the United States, and the participation of Asian pledgers is relatively low.

image.png

(SOURCE: http://Solanabeach.io)

Solana, which does not take the path of sharding, currently uses sharding+layer2 as the mainstream solution for blockchain expansion. Solana is an alternative. It did not choose the path of sharding. These are also two projects in the encrypted world that impress Blue Fox Note, one is Solana and the other is Holochain. Solana tries to achieve high performance, low cost, and a certain degree of decentralization and security. It also has a very important advantage that there is no need to worry about composability. If the public chain is fragmented, composability is a problem that must be faced. Solana without sharding does not have such concerns. The founder of Solana is Anatoly Yakovenko. From the public information, he has been thinking about a question before: How can a decentralized network composed of multiple nodes achieve the performance of a single node? The underlying thinking on this issue leads to one of Solana's most important concepts: PoH (Proof of History).

Solana's clock Solana's PoH is not a consensus mechanism, nor a mechanism to resist witch attacks. It is essentially a solution to the blockchain clock problem. The clock of the current blockchain runs according to block ticks. For example, in Bitcoin, the time tick is about once every ten minutes, and each tick updates the block. The update of the block represents the update of the global state. That is to say, in Bitcoin's PoW mechanism, time and state are coupled and keep moving in sync. Satoshi Nakamoto achieved a global consensus in a permissionless environment by combining PoW, difficulty adjustment, and the longest chain rule. However, this global consensus also has throughput limitations, because throughput depends on block size and block time. The larger the block, the shorter the block time and the greater the throughput. However, larger blocks are not conducive to the decentralization of nodes, and reducing block time will increase the probability of chain forks. In order to improve throughput, Solana proposed a solution to decouple time and state. How to achieve this? A globally available clock is required. With a global clock, status updates can be performed in an asynchronous manner; with a globally consistent clock and transaction timestamp, the continuous flow of transactions across the network can be realized. Solana's PoH mechanism is to generate a globally available time chain for all nodes in the network. With an independent time chain, the verified leader will broadcast to the committee as soon as possible after receiving the timestamp. The timestamp has a standardized order, not an order determined arbitrarily by the block producer. In this way, the validator in Solana can send status updates to other nodes in real time. The node continues to receive new transactions, which have the PoH hash signed by the sender, and forward them to neighboring nodes.

Solana's verifier solves the clock problem through the VDF (Verifiable Delay Function) of SHA-256 sequential hashing. Each Solana verifier uses VDF to maintain its own clock and can schedule a leader for the epoch in advance. Through PoH, Solana's verification leader can achieve continuous rotation, and its rotation decision is made asynchronously. The Solana network can also rotate validators, and the rotation can be realized between validators without talking to each other. The usual blockchain requires a conversation between validators to make a rotation decision.

This design gives Solana more room for scalability. In addition to PoH, Solana has also optimized its consensus mechanism, block broadcasting, and ledger storage. Solana's TBFT consensus Solana's consensus mechanism is TBFT consensus (Tower BFT), similar to PBFT consensus. However, Solana's TBFT prioritizes its activity over consistency. Solana nodes can calculate the current number of validators, the status of each validator, and the timeout of each validator submitted to any block in the network. Through these data structures, nodes can vote to reach consensus. Solana's Turbine block broadcasting Turbine is Solana's block broadcasting technology, which borrows the idea of ​​BitTorrent. When a block is transmitted, it will be divided into many small data packets, and then broadcast to a large number of random nodes. According to Solana's own statement, using its fan-out mechanism, if each connection is 100 milliseconds, for a 40,000-node network, replication can be completed in 400 milliseconds, and finality can be completed in 500 milliseconds. In addition, because Solana's consensus layer does not rely on peer-to-peer messages, it can optimize block network transmission independently of consensus. In the structure of Solana's Gulf Stream, each verifier knows the order of future leaders, and the verifier will forward the transaction to the expected leader in advance. This allows the verifier to execute the transaction in advance, reducing the confirmation time and reducing the memory pressure on the verifier. And clients like wallets sign transactions that reference the hash of a particular block. The client chooses the block hash that is fully confirmed by the network. In the worst case, 32 blocks are required. Assuming that the block time is about 800 milliseconds, it only takes 25.6 seconds to fully confirm at most. Once the transaction is forwarded to any validator, the validator will forward it to the future leader. The client can subscribe to the transaction confirmation from the verifier. The client knows that the block hash expires in a limited time or the transaction is confirmed by the network. It allows clients to sign transactions, which can be guaranteed to execute or fail. Solana's sealevel sealevel is a technical solution used by Solana to build horizontal expansion and an engine for parallel transaction processing. Most blockchains are single-threaded computers. Solana attempts to support parallel transaction execution in a single shard. It draws on the "scatter-gathter" operating system driver technology. Transactions specify the state in which they will be read or written when they are executed. At runtime, all non-overlapping state transition functions in a block can be found and processed in parallel. Sealevel itself is a virtual machine used to arrange transactions, but it does not execute transactions in a virtual machine. It uses the bytecode of Berkeley Packet Filter (BFT, designed for high-performance packet filters) to execute transactions locally on the hardware. Using LLVM (the same compiler for WASM) can provide developers with a set of tools to write high-performance smart contracts in c/c++ and Rust. Solana does not use WASM, but developers can recompile C and Rust code with a few changes on the Solana compiler. Developers can migrate applications from other WASM chains (ETH2.0, Polkadot, EOS, etc.).

This will be attractive to developers. To ensure security, Solana's architecture supports strict state separation between different modules, and at the same time introduces resources and scripts as high-level concepts. Solana's Pipelining The transaction verification process on the Solana network utilizes the mechanism of Pipelining (a common optimization in CPU design). The Pipelining mechanism (transaction processing unit) on the Solana network performs data acquisition at the kernel level, signature verification at the GPU level, storage at the CPU level, and writing in the kernel space. According to Solana, through this mechanism, its transaction processing unit can process 50,000 transactions at the same time. Solana's CloudbreakCloudbreak is Solana's horizontally scalable memory solution. In addition to expanding calculations, it is also necessary to expand memory, because the memory used to track accounts will soon become a bottleneck in terms of size and access speed. The general approach is to maintain the global state in RAM. However, ordinary computers do not have enough RAM to store the global state. Solana designed Cloudbreak's state architecture for optimization. Each additional disk increases the storage capacity available for the programs on the chain and increases the number of concurrent read and write programs that can be executed during execution. This structure supports the early execution of transactions. As long as the verifier observes the transaction, sealevel can start to prefetch all accounts from disk and prepare the runtime for execution. The validator and the block producer can start the transaction before the transaction code enters the block, which is beneficial to further optimize the block time. In order to reduce the burden on verifiers, Solana's Archiver transfers data storage from verifiers to a node network called Archiver. The historical record of the transaction status is split into many fragments, and erasure coding technology is used. Archiver is used to store state fragments, but does not participate in consensus. Solana uses PoRep (Proof of Replication) technology. Those who know Filecoin must be familiar with it. This is derived from the concept of Filecoin. Solana uses PoH (Proof of History) to optimize the way RoRep is created. Archiver nodes use PoH to generate lightweight proofs, and verifiers can perform large-scale verification through GPUs. Archiver nodes can even be lightweight nodes (such as laptops). Through erasure coding and redundancy, the Archiver network can provide data availability guarantees. Through PoH innovation and several other optimizations, Solana is trying to blaze a path of expansion that does not rely on sharding. If Serum can succeed, what does it mean for Solana? Solana had the support of Kin before, and kin migrated its network to Solana. And now FTX Serum also plans to build on Solana. Once it has a certain user scale and developer support, it will attract more and more communities and developers' attention. FTX chose Solana to build its DEX Serum. There are several core reasons: one is high throughput and low latency. At present, its theoretical tps can reach up to 50,000 times (60 nodes). Now Solana's tps is also between 200-300 (more than 150 nodes), and it can complete transactions in less than 1 second. This is in sharp contrast to the low throughput and high latency of today's blockchains. If the price of mortgage assets plummets, the throughput is too low, and the speed is too slow, which may cause a lot of losses to users. These realities continue to prompt developers and users to look for new options. The second is low cost. It is said that the transaction fee for a million transfers is only about $10. This is a huge contrast to the cost of users participating in DeFi mining today. Nowadays, it is common for users to participate in DeFi liquidity mining and spend tens of dollars in gas fees. Unless such a high cost is supported by extremely high income, it is difficult to sustain. The third is compatibility and no need to worry about composability. Solana supports Rust, C, C++, Move (Libra) languages, and also supports developers to migrate applications from the WASM chain (ETH2.0, Polkadot, EOS, etc.). These compatibility can reduce the developer's development cost. In addition, since Solana is not on the path of sharding, there is no need to worry about issues such as cross-shard transactions for smart contracts. The success of Serum will not be less significant to Solana than to FTX. If Serum runs successfully, then other DeFi projects that suffer from high costs, low throughput, and low speed will also begin to seriously consider its more options and possibilities. Of course, due to the richness of the Ethereum ecosystem, this does not mean that you will leave Ethereum, but will consider more options. Solana, which does not take the road of sharding, is not going to take a small road. The Solana network uses a PoH-based clock mechanism. It also optimizes the consensus mechanism, data broadcasting, parallel transaction processing, and separate node network for state data storage. Under the condition of ensuring a certain degree of decentralization and security, high throughput, low latency and low cost can be achieved, so as to meet the needs of users in most scenarios. Solana wants to extract the holy grail of encryption: scalability. Therefore, the road Solana has to walk is not a small road, but a big road full of dreams. But it is another kind of alternative, it is not on the scalable road of fragmentation, it is a new species in the field of encryption. Bitcoin and Ethereum occupy an absolute dominant position in the encryption field, and it is almost impossible to surpass them under the existing structure. Only new structures have opportunities, and only new species can develop and grow. Of course, the new architecture means high risk, because it may not be made, or it may be made without the support of the community; it also means high profit, if it can be made and get the support of developers and the community, it will Have the opportunity to grow and develop.

This is why Blue Fox Notes has been focusing on different blockchain paradigms. Among them, Solana and Holochain have always been in the focus of Blue Fox Notes, but only time will tell us whether they will succeed in the future, and everyone is welcome to leave a message and talk about the new blockchain species in their minds. ---Extended reading---"Why is Solana the "world computer" that blockchain developers need? 》

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!