Author:0xFinley、0xDragon888
Preface.
What’s new about the new public chain narrative?
Will Aptos be another Solana driven by capital?
Summary
In late July, the new public chain Aptos announced another $150 million round of funding led by FTX Ventures and Jump Crypto, which just completed a $200 million round of funding led by A16Z with participation from Multicoin Capital, FTX Ventures, and Coinbase Ventures in March of this year.
Scalability of public chains is an eternal topic in the crypto world. Since DeFi Summer 2020, the exponential growth of Defi, Gamfi, NFT and other on-chain activities has brought tremendous pressure on each public chain, and the demand of developers and users for public chain performance has become stronger and stronger. In order to cope with the birth of large-scale commercial applications in the future, Web3 applications need a high-performance substrate with low transaction costs as a development ground.
Solana has become a representative of high-performance monolithic chains through its tower-type node architecture, asynchronous architecture, and parallel message processing design. Various types of Rollup on Ether, Celestia focusing on DA layer, and ETH 2.0’s fractions utilize a modular approach to build the underlying network.
The new public chain Aptos, on the other hand, adopts a modular concept in the direction of a high-performance monolithic chain to take another alternative path for scaling. In this article, we focus on comparing some key designs of Aptos and Solana, exploring.
Aptos’ network design divides transactions into different phases, each of which is independent and can be individually parallelized. This enables multiple instruction streams and multiple data streams, which can significantly improve network performance while allowing verification nodes to perform additional scaling in terms of storage, computing, etc. It also makes the development of the entire network more flexible, and iterative updates can be targeted at only one of the modules.
It can be observed that with 10k accounts competing, a TPS of 160K can be achieved with 32 threads. The advantage of parallel execution is reflected in the large number of accounts competing for trading space.
The monolithic chain has historically suffered from two core problems.
1. Resource pricing: All transactions compete for the same block space and consume the same resources. In times of transaction congestion, everyone’s spending goes up passively, resulting in a large demand for a certain type of transaction that affects users across the board, which makes it impossible to provide independent transaction execution and settlement for different applications.
2. The limitation of chain transaction on performance: In the monolithic chain, all transactions need to queue up for packing, calculation, verification and finally achieve consensus. After the verification is completed, transactions start to be packed and delivered to other nodes. The serial step undoubtedly forms a huge limitation on transaction performance.
The parallelization mechanism can be a great solution to the problem of chained transactions, but the problem of resource pricing still exists.
State synchronization is simply the coordination of all nodes to keep them in the same state.
Why state synchronization has a significant impact on performance.
1、Usually we measure the transaction performance of a public chain by TPS, but another indicator TTF (Time To Finality) is more important. TPS refers to how many transactions the chain processes per second. For users, the time spent on the transaction perceived by users should equal to the time the transaction is processed on the chain plus the time it is synchronized to peer nodes and clients. It is found that state synchronization has an enormous impact on TTF. If a public chain has a high TPS, but it takes a long time to achieve synchronization, what users perceive is still the low performance of the whole chain.
2. State synchronization is responsible for verifying the correctness of information when synchronizing information between nodes. A good or bad state synchronization will determine whether the whole node or client will have a higher possibility of receiving malicious and deceptive data.
Aptos builds a state synchronization scheme with the core of Block-STM approach, featuring optimistic concurrency control, multi-version data structure, collaborative scheduling, dynamic dependency estimation, etc. Since Aptos’ parallel scheme of dividing transactions into different phases has high requirements for state synchronization between nodes, it remains to be verified whether the current solution can achieve theoretical sub-second confirmation.
Solana achieves concurrency control and reliable synchronization through the POH mechanism.
POH is a high-frequency VDF (verifiable delay function, a function that still takes a prescribed amount of time to solve even on a multi-threaded, or heavily parallel computable machine). With POH, Solana creates a global time chain where the verifying nodes hash the hash values continuously within the block, generating proofs at intervals, each proving that there is some transaction data existed before the creation of the proof, while some time has passed since the last proof. Under the POH mechanism, the leader node gives the blockchain a time stamped proof through the VDF function, and then sends the block to the validation node, which, by continuously generating and verifying the VDF as a function, can get the required time interval to verify whether the time stamped proof received from the leader node is correct.
In this process, the leader node sends blocks to other validation nodes in any order, and the blocks are broken into smaller batches. Before the block consensus is confirmed, these new batches are transmitted to the validation nodes in real time. The validation nodes can vote immediately after accepting the new batches, using Optimistic Concurrency Control, a technique that is similar to Aptos’ STM.
Compared with most public chains that broadcast transactions to the whole network before completing the confirmation (nodes also need to communicate their precommit and prevote, and then nodes collectively vote on the full ledger representing a certain block height and transaction confirmation), on Solana, transaction confirmation can be completed by verifying the POH hash of the previous batch. Under the POH mechanism, the transaction batch carrying the timestamp is confirmed to be sorted, and the validation nodes can verify the timestamp locally so that the message can be transmitted continuously and reliably, achieving decoupling of consensus and message delivery.
Solana uses a leader node-centric pyramidal structure, where the leader nodes are competitively selected from the validation nodes to collect transactions, create blocks containing PoH, and update the network state. Aptos, on the other hand, adopts a star-like structure with a set of validation nodes in the network using DiemBFTv4 to achieve consensus.
For Solana, only the selected leader node can produce the next block, which greatly reduces the degree of redundancy in the network and can significantly improve the performance of the network. However, the design reduces the decentralization of the entire network. When the leader node crashes, it is easy to cause paralysis of the entire network.
For Aptos, there is no so-called leader node. Both the validation node and the full node need to ensure certain data backup to prevent extreme situations from occurring. It increases the redundancy of the entire network, but performs better in terms of decentralization and network resilience since it will not disrupt the entire network due to the collapse of a single validation node.
Node Hardware Requirements
The paralleled architecture of Aptos adopts CPU for transaction processing, while the paralleled architecture of Solana at the execution level uses CPU+GPU as the computing unit. The hardware requirements of Solana nodes are significantly higher than those of Aptos.
Summary
Feature one: First Class Resources — the first sequence of resources
It corresponds to the concept of “money/assets” in our real life, which can be used in the crypto world to express digital assets. The so-called first sequence is the first object we should consider or focus on in the whole network.
In the Move language, types of variables are divided into Resources and unrestricted. Each read of a variable needs to specify its usage, i.e., whether it is to be moved or copied. When a variable is defined as Resources, it can only be moved, while unrestricted has no such restriction and can be both copied and moved. The type Resources is well suited for defining digital assets, while unrestricted can be used to define addresses.
To summarize, Resources has the following properties:
Feature two: Module and Scripts
Module and Scripts are similar to Ethereum smart contracts and Bitcoin scripts. The design of Move strictly divides libraries (Module) and execution logic (Scripts). Module can be checked for security through formal verification, which can avoid a large number of smart contract vulnerability problems.
Module is a library that defines structural types and functions that operate on these types, i.e. Module encodes rules for creating, destroying and updating its declared Resources. Module stores in global storage; key operations on Resources can only be performed in Module and it is opaque to the outside. Module can also call other module-declared programs and use their declared types.
Scripts, on the other hand, are an executable entry point, similar to the Main() function in traditional programming languages, which allows updates to the global store, usually by calling the Module that has published the function.
For example,
Module is the central bank, Resources, i.e. the asset “money”, must be defined in the Module, and Resources can only be created and destroyed by the module in which it is located (the method declared in the Module)
Scripts, on the other hand, uses all the bodies of Resources (money).
The following is a sample code from the white paper on transferring funds, which can help further understanding.
public main(payee: address, amount: u64)
{
let coin:0x0.Currency.Coin=0x0.Currency.withdraw_from_sender(copy(amount));
0x0.Currency.[deposit](copy(payee), move(coin));
}
The above Scripts code shows that Currency is a Module that exists at address 0x0 and Coin (“coin”) is a Resource in the Module.
It should be noted that it is mandatory for Scripts to specify the use of the asset (coin variable in the code) after it has been acquired. That is to say, if the line of code for deposit in the above Scripts is deleted, it is illegal and the Move VM will refuse to execute it.
Feature 3: Static type
Move is a pure statical system, which is consistent with Rust, and can achieve type safety. Verifying the correctness of the program code becomes a strict mathematical proof process, and the compiler can follow the designed logic to verify. Static types have strong abstraction and engineering capabilities, and are more suitable for building large scale systems as they guarantee security without losing flexibility, i.e. the higher the reliability of the software needed, the better the statically typed language is, which is necessary for a public chain like Aptos to carry the operation of global large-scale commercial applications.
The use of the Move language will allow:
1. digital assets will have better security
Static type assures that process and results can be type-validated at the compilation stage to avoid problems at runtime after deployment to the chain. After type-validation, low-level problems in smart contracts can be avoided. Meanwhile, type-validation can use formal validation tools to greatly reduce programmer’s effort in checking bugs.
The combination of the Resources type and the opacity of the Module ensures that digital assets are not copied, discarded or repeatedly transferred, and that other Modules and scripts can only call on digital assets through the rules exposed by the Module to which the digital asset belongs.
2. The flexibility of digital assets
Digital assets are editable in Module, programmers can write the right business logic to encapsulate the assets and implement strategies for access control, which will be friendly for implementing complex financial logic.
3. It can truly imitate real-world assets
Perform creation when real assets enter the digital world; perform modification when ownership of digital assets is transferred; perform destruction when physical assets bound to digital assets are sold.
Move versus Rust.
First class resources actually borrows the semantics of Move, Copy and Clone from Rust language. contracts.
Move compared to Solidity.
First class resources is the biggest difference between Move language and Solidity. The Resource type in Ether is only applicable to ETH itself, other Tokens issued based on Ether is just a number and do not have this “asset characteristic”. During the transaction, the number of one address increases while the number of another decreases, and the balance of each address is a simple Unit. For transferring assets and more complex asset operation behaviors, developers need to check according to their own experience. It is easy to have security vulnerabilities such as re-entry attack, integer overflow and infinite increment.
Summary.
The Move language is based on Rust and does not go outside of the Rust framework, but the innovative design of Move makes it more suitable for building a blockchain network that hosts a large number of digital assets. The migration threshold to new star public chains like Aptos is lower for Solana and Polkadot developers. The Move language has significant advantages over Solidity in terms of security, flexibility, and definition of digital assets.
Let’s look at the internal process of account creation in Aptos.
What did Aptos do?
1. Aptos provides rotatable sk that can be proactively changed to help reduce the risk of private key leakage, remote attacks, and future cracking of existing cryptographic algorithms. Users can delegate the ability to rotate account private keys to one or more trusted parties and other trusted entities, and then define a policy via the Move module that enables these trusted entities to rotate keys in specific situations. For example, the entity may be a kout-of-n multi-signature key held by many trusted parties so that key recovery services can be provided to prevent the loss of user keys. The on-chain key management scheme of Aptos is more open and transparent than some other secret key recovery schemes such as cloud-based backup and social recovery.
2. The account serial number is used to provide protection against transaction feasibility. A serial number can only be submitted once for each sender’s account. If the sender finds that the serial number of his account ≥ the serial number of transaction t, then t has been submitted, or t will never be submitted (because the serial number used by t is already occupied by another transaction).
3. Pre-signature to achieve transaction transparency, Aptos provides transaction pre-execution services, which can be visualized to the user before the user signs the transaction results. The transaction pre-execution service can be combined with known attacks and malicious smart contracts, greatly reducing the risk of fraud to the user. In addition, Aptos allows the wallet to impose restrictions on transactions during execution, and transactions that violate the restrictions will be terminated, further preventing users from being attacked by malicious programs.
Summary.
As you can see, Aptos not only enhances the user’s transaction experience through the technological innovation mentioned in the first section, but also does a lot of design to ensure the security of user accounts. Based on these underlying mechanisms, the application can also achieve more flexible services.
The developers I’ve talked to are excited about using Move versus Rust or Solidity — Paul Veradittakit, Partner, Pantera
From a blockchain developer’s perspective, a smart contract is a set of digital promises, including agreements of what is agreed upon when the contract executor fulfills those promises. Blockchain technology gives us a decentralized, tamper-evident and highly reliable system in which smart contracts play a crucial role.
Previously we analyzed the differences between Solidity and Move languages. Despite the shortcomings of Solidity in terms of intuitiveness and security, its flexibility of use across Ether has led to rapid and widespread community adoption. For common scenarios such as FT and NFT, Move defines data as resources. Move is able to secure data from the virtual machine level security and is more developer-friendly, allowing contract developers to focus on business logic. At present, four public chains have used Move language, namely Aptos, Sui, Starcoin, 0L Network. Lower GAS, higher TPS, more secure programming code environment, MOVE language is re-establishing the developer camp.
From the builder’s perspective, building a new public chain requires a lot of resources as well as time costs. Since the birth of Bitcoin, hundreds of public chains have been developed over the past decade. The power of the Ethernet ecosystem is that sufficient assets have been deposited and various different types of DeFi products can be built together like building blocks through contract-to-contract interactions, thus stimulating Ethernet ecology’s innovation.
On the other side, the entire number of on-chain wallet users have doubled from early 2020 to mid-2022, with more than 100 million users joining the ecosystem. It has created a golden heyday of blockchain development in the past 2 years. Behind the golden heyday, Ether congestion (high Gas) has also created core conflicts. All kinds of developers are constantly exploring solutions to increase the TPS of Ether.
Solana has generated up to 400x revenue, Polkadot 100x, Avalanche 100x. Landscapes of Avalanche, Fantom, Near, Cosmos, Starkware have been developing rapidly. Then ZK Rollup and Optimistic Rollup became the most popular L2. The public chain expansion narrative will continue to unfold.
With the rise of blockchain as a new Internet infrastructure, the new public chain will migrate builders of the original public chain. Solana eco-developers migrated to Aptos (Saber developer Sabre Labs), Solana’s former marketing director hopped to Aptos, and the capital that supported Solana in previous years still appears in the list of supporters of the new public chain. Major Solana infrastructure project parties such as Solend, Jupiter, Hubble, Crema, and even Solana FM are also known to have made the switch to Aptos. Migrating Solana veterans will contribute to the construction of new talent building blocks, inspiring innovation in the Aptos ecosystem.
On January 3, 2009, Satoshi Nakamoto created Bitcoin. 13 years later, Bitcoin has inspired a whole new industry and a new asset class worth nearly $1 trillion. The public chain narrative has unfolded.
The public chain sector has always been the most challenging and at the same time the best place to carry value in the crypto space. The rise of public chains such as Solana, Terra, and Avalanche gives investment institutions lucrative financial returns. The narrative and competition of public chains have never stopped in every cycle.
The bear market from 2014 to 2015, when the market value of the entire cryptocurrency market was plummeted by 75%, gave birth to the future king of public chains — Ether. Since its launch in 2015, Ether has always been the public chain with the highest barrier, a high degree of network decentralization and security, a large number of users and a large number of developers. With perfect infrastructure and rich variety of applications, it has formed a network effect and has a ground for innovation, leading the trend of blockchain applications. Everyone likes to complain about Ether, but no one wants to leave it.
The bear market from 2019 to 2020 gave birth to new public chains such as Solana, Avalanche Protocol, etc. Those new public chains took up the demand of ethereum spillovers with their performance and cost advantages. Since 2020, ecologies of new public chains have exploded one after another, from BNB Chain to Polygon to Solana. Avalanche, Fantom, Terra ecology have also grown significantly.
In 2022, as new public chains such as Aptos, Sui, Linera and Aleo rise, the crypto industry will continue to build and innovate to break through imaginary boundaries . The bear market is a decline in daily activity for some public chains, but a prologue for new public chains. The crypto cycle changes and the public chain narrative never sleeps.
Whether from the perspective of technical features or development language, Aptos does not seem to be as innovative as Solana is to Ether. Aptos is more like a Solana with better performance and more network resilience, and the difference between Aptos and Solana is not like the difference between an internal combustion engine and a carriage. For the resource pricing and chain transaction problems that have traditionally existed in monolithic chains, Aptos does not completely solve the former, but rather, like Solana, it flattens the competition of transactions for block space by significantly improving scalability. Aptos relatively provides a perfect solution to the chain transaction problem.
Aptos has made a lot of subtle designs in the definition, protection and user experience of digital assets. It is unprecedented that Aptos is trying to realize a high-performance and high-security public chain that can carry large-scale commercial applications for billions of Internet users based on the thinking of Web2 products.
At present, the Aptos ecology is expanding rapidly. The main network is not yet online, but the number of its ecological projects have already been up to 130+. The emergence of new technologies makes developers hope to be the first wave of ecological participants . On the one hand, the new public chain narrative supported by top teams and top capital in the bear market does have a strong attraction, but on the other hand, developers should be wary of the boom. It is doubtful whether a new public chain overlapping with Solana in terms of technology, capital and ecology can replicate or even surpass Solana’s burst of popularity again. Developers should weigh the pros and cons of adopting a new public chain based on the actual needs of their own products.
For investors, Aptos has a greater first-mover advantage in the new generation of public chains and is expected to launch its main net at the end of September. Its private financing valuation has exceeded $2 billion and its market value has reached about 1/5 of the current market value of Solana. We will pay more attention to the development of its ecological projects in the hope of having better returns as an early participant.
https://developers.libra-china.org/docs/reference/glossary/index.html#move-virtual-machine-mvm
https://github.com/aptos-labs/aptos-core/blob/main/developer-docs-site/static/papers/whitepaper.pdf
https://web3caff.com/zh/archives/25976
https://pontem.network/posts/which-blockchain-is-the-fastest
https://blog.priewienv.me/post/verifiable-delay-function-1/
https://docs.solana.com/cluster/synchronization
https://medium.com/aptoslabs/the-aptos-vision-1028ac56676e
https://yaozhiguo2016.github.io/2018/11/22/cpu-and-gpu/
https://aptos.dev/nodes/ait/node-requirements
https://mirror.xyz/0xcherry778.eth/HOsL3XptIsmCMmLoBiWBCA945kg2TIjf6E9wQo6jGqc
https://research.thetie.io/aptos-network-deep-dive/
https://move-language.github.io/move/structs-and-resources.html
https://www.youtube.com/watch?v=rywOYfGu4EA&ab_channel=Solana
https://medium.com/solana-labs/proof-of-history-a-clock-for-blockchain-cf47a61a9274
【免责声明】市场有风险,投资需谨慎。本文不构成投资建议,用户应考虑本文中的任何意见、观点或结论是否符合其特定状况。据此投资,责任自负。