NEO DevCon 2019 I| NEO 3.0，The Golden Era for Pragmatic Idealism
“Pure pragmatism can’t imagine a bold future
Pure idealism can’t get anything done
It is the delicate bond of both that drives innovation”
NEO presents the long-awaited annual event, NEO DevCon, at Seattle on February 16th. After half a year of preparation, the two-day grand event gathered over 40 esteemed speakers to share with close to 500 participants.
Those who were unable to attend the conference or catch the live broadcast for NEO DevCon, are able to follow up on NEO Smart Economy Youtube channel. Various articles are also written to share important pointers from the conference.
At DevCon, NEO co-founders Erik Zhang and Da Hongfei shared the vision of NEO’s future developments and improvements. NEO founder Da Hongfei reaffirms that NEO will be the №1 blockchain platform by 2020. This will be achieved through the provision of best performance, diversified ecosystem and, compliance solution.
When asked what makes NEO different and what will allow NEO to achieve success, Da Hongfei, founder of NEO said: “The design philosophy is what differentiates NEO. The shared value of pragmatic idealism drives NEO to make magic happen as,
Pure pragmatism can’t imagine a bold future
Pure idealism can’t get anything done
It is the delicate blend of both that drives innovation
At NEO DevCon 2019, Erik Zhang gradually uncovers the veil of NEO 3.0 by detailing the plans and goals of NEO 3.0. Though Erik Zhang was unable to attend the conference, he delivered the contents via a pre-recorded video presentation.
Erik Zhang started off his presentation by clearly stating the reasons and goals for NEO 3.0.
Most crucial goal in developing NEO 3.0: Enable NEO to support large-scale commercial applications
Although it has been several years since the birth of the blockchain technology, there is no blockchain capable of supporting large-scale commercial applications in the market. In order to support large-scale commercial applications, three basic requirements must be met:
- There are two important features that measure reliability. The first feature is the irreversibility of transactions. This means that transactions confirmed by the blockchain cannot be reversed or cancelled. In financial applications, it is not acceptable to cancel a confirmed transaction. The second feature is the availability of the network, which allows consistent processing of transactions or generation of blocks even under extreme network load.
- For performance, there is a prerequisite to raising the blockchain transaction per second (TPS) to a very high value. This would be necessary to support large-scale commercial applications.
- In terms of storage, large-scale commercial applications require the storage of big data. Therefore, distributed storage must be adopted on the blockchain.
In order to support large-scale applications well, NEO 3.0 would require further improvements in NEO architecture, new features of NEO 3.0 and other improvements.
NEO 3.0 requires streamlining of NEO architecture — optimize Layer 2, remove global assets and unify transaction type.
Optimize Layer 2
Erik Zhang believes that most applications in the future will run on layer 2 and the main chain will only be arbitrated when a dispute happens. Although extensions of Layer 2 can effectively increase TPS, the improvement is limited.
Assuming the probability of disputes on Layer 2 is a certain value, and by dividing the probability by the TPS of the main chain, you can get the approximate TPS of layer 2. Therefore, there is a proportional relationship between the TPS of Layer 2 and that of the main chain. The TPS of Layer 2 increases in multiples corresponding to the TPS of the main chain. As most applications will run on Layer 2, the architecture of the main chain will be streamlined and the TPS of the main chain will also be increased in NEO 3.0.
Currently, NEO’s smart contracts are used in two places — verification of transactions and execution of applications. In NEO 2.x, three steps are required to verify a transaction: format verification, rule verification, and business verification. Format verification ensures required formats for transactions are met. Rule verification is to verify the content of the transaction meets all rules specified. Such as whether the size of the transaction exceeds the limit. Business verification is a set of business-related verifications performed through smart contracts. Since business verification executes a smart contract and the execution of the smart contracts depends on the past state, the verification of the transaction will be very slow.
In NEO 3.0, business verification will be moved to the application layer. In the process of the transaction verification, only state independent verifications will be allowed. This will greatly improve the verification efficiency. As for consensus nodes, blocks need not be synced for transaction verification therefore, TPS will be greatly increased. In the application layer, a large number of APIs related to Layer 2 will be added to optimize Layer 2.
Remove Global Assets
The second change to the architecture would be to remove all global assets. Currently, there are two ways to create assets in NEO. The first is a global asset created by RegisterTransaction and second is a contract asset created by Smart Contract. In practice, global assets are rarely used and most applications create contract assets. This is because contract assets are more flexible and have more functions. For example, you can create NEP-5 assets, NFT assets, or create STO assets, and more. While global assets are not integrated with smart contracts, managing global assets in a smart contract are very difficult. For the above reasons, there is no need to continue global assets in NEO 3.0 and if global assets are removed, NEO’s architecture will be further simplified and system performance will be improved.
In NEO 3.0, all assets must be created in smart contracts, even NEO and Gas.
Unifying Transaction Type
The third change to the architecture is to unify all transaction types. Currently, there are 9 different transaction type in NEO 2.x which includes, Miner Transaction, Issue Transaction, Claim Transaction and more. These transaction types are either related to a particular business or have specific functions. For example, RegisterTransaction and IssueTransaction are related to the creation and distribution of global asset. Since the global asset will no longer exist, these related transactions will not need to exist. Other transactions dealing with complex business will also be removed and replaced with interop services in smart contacts. Therefore, in NEO 3.0, there will only be one type of transaction which is a transaction. The role of this unique transaction is to run smart contracts.
5 New Features of NEO 3.0
In NEO 2.x, there already exists the smart contract. They are written in a variety of commonly used programming languages and compiled into NEO’s instruction set, which runs in NeoVM thereafter. Anyone can deploy their own smart contracts on NEO. In NEO 3.0, there will be a new type of smart contract called Native Contract. Though similar to ordinary contracts, native contracts do not run in NeoVM, instead, directly on the native code. They cannot be deployed but are embedded in the core code of NEO. When native contracts are upgraded, their hashes will not change. In NEO 3.0, NEO and Gas will exist as native contract and a voting system can also possibly exist as a native contract. Through the voting system, you can select a consensus node and even vote on the mechanism of NEO.
Manifest and Permission System
Another new feature is the manifest and permission system. As smart contracts in NEO can be called from each other, this provides great convenience but also presents some potential loss/risk. Generally, when a user invokes a smart contract, there is no clear way to determine whether the contract behavior is as expected. The proposed feature will require each smart contract to expose a manifest and describe its behaviors in the manifest. Four factors should be included in the manifest — group, features, ABI, permissions. Firstly, you can declare that the contract belongs to a group so that the contract in the same group will trust each other and call each other securely. Secondly, features describe what features are available for the contract such as storage, accepting transfers and more. Thirdly, ABI describes the interface information about how the contract is called by other contracts or clients. Currently, we can generate ABI files through the compiler. However, in NEO 3.0, you will need to put ABI files in the manifest. Lastly, permission which lists the hashes and method names of all other contracts that the contract might call. If the contract calls other contracts through methods that are not explicitly listed, the call will fail at runtime. In addition, the contract can trust other contracts in the manifest or expose their safe methods, such as balanceOf and totalSupply so that contracts can call these safe methods without permission.
Internet Resource Access
Another important feature would be the internet resource access this is equivalent to a built-in oracle in NEO. The basic principle is that we allow users to access internet resources in a smart contract. Therefore, we will add new interfaces to the interop service. Smart contract access internet resources through URLs. When such smart contractor transactions are processed, the consensus nodes need to ensure the data consistency and also limit the length of the resource. If the consensus nodes can reach a consensus on the data they read, then the URL/ data pair is written into the block header. After that, all other nodes can read consistent internet resources from the block header while executing the smart contract for the transaction.
Improved dBFT Consensus Mechanism
In NEO 2.x, the dBFT consensus mechanism exists but its implementation is not perfect. It may be observed that there are occasional forked blocks in the network but we have optimized the algorithm of dBFT in the past few months to solve the problems. In the dBFT algorithm, there are three sets of protocols namely: consensus protocol, view changing protocol, and state synchronization protocol. The most critical is the consensus protocol which is completed in three steps: prepare request, prepare response, commit. In the original consensus protocol, only the first two steps was implemented which is the reason why occasional forked blocks occur. At that time, the probability of its occurrence was underestimated. The second is the view of changing protocol. When the consensus nodes cannot reach a consensus within a certain period of time, they will change its view and vote again. There is nothing to improve in this regard. The last is the state synchronization protocol. If a consensus node is offline, when it comes back online, it needs to synchronize state with other nodes. This process is implemented by block synchronization but in the new dBFT algorithm, two new state recovery mechanisms are added — recovery log, recovery message. With this improvement, offline consensus nodes can recover from abnormal conditions more quickly. After these improvements, dBFT can truly make transactions irreversible and will be the only consensus mechanism that can support a large-scale commercial application. It will be the best consensus mechanism for blockchains.
The last and most important new feature is NeoFS which is a distributed storage network built on NEO 3.0. NeoFS is developed as the storage of smart contracts is highly redundant and also costly. Therefore, there is a need to build a low cost distributed storage network. At the same time, this storage network will have its own economic model. First of all, it is inexpensive and can store a large amount of data. The user can use its space to store data by paying gas and everyone can earn gas by sharing their unused hard disk space.
In addition, NeoFS offers some additional features. Users can encrypt the data to protect privacy and NeoFS will be integrated with smart contracts and contracts can directly lead data from or write data to NeoFS.
Other new improvements
NEO 3.0 also contains many other improvements:
- Add compression options for P2P messages
- Add Merkle Patricia Tree (MPT) for storage values verification
- Significantly reduce the cost of smart contract execution
Though Erik Zhang was unable to attend the conference personally, the sharing continued to inspire and create conversations amongst developers. The release of NEO 3.0 and upgrading of blockchain in the application of large-scale commercial will bring NEO into a new competitive dimension. NEO 3.0 is not only exquisite in nature but also a result of pragmatic idealism. In the upcoming days, NEO DevCon 2019 reports will continue to bring in exciting content on NEO DevCon.
Catch up with NEO’s update:
Weibo: @NEO智能经济 https://weibo.com/neosmarteconomy