Advantages of NULS 2.0 Over NULS 1.0 (the 15th NULS Community in-Air Class)

NULS AI
7 min readApr 17, 2019

--

Vivi Zhou,NULS Architect

NULS has always been dedicated to breaking through the blockchain technology bottleneck and providing a stable, efficient and high-performance network operation environment. In addition, it aims at providing enterprises with a flexible and easy-to-use underlying framework of blockchain, so as to accelerate the implementation of blockchain business applications by reducing the development and use cost for enterprises.

In order to continuously promote the development speed of NULS, and expand the NULS ecosystem, the team determined to develop NULS 2.0.

Next, I will detail how NULS 2.0 is optimized compared to 1.0.

1. The modular development in NULS 2.0 is more thorough:

Firstly, let me explain that modular development decomposes a large and complex business system into independent and smaller systems according to different internal functions. Each system only needs to focus on its own module functions, and finally, these small modules are integrated together to complete the functional requirements of the whole system.

Take blockchain as an example: firstly we need to download a wallet, which can be regarded as a node. Through wallets we can create accounts and encrypt them. Once running, it will discover more nodes on the network and they will connect to each other. Then they can send transactions to each other and complete the verification. Finally, some nodes package the valid transactions into blocks and distribute them to each node. After the verification, they reach a consensus.

By breaking up the whole blockchain business operation, we can find that there is an account module to create accounts, a network module to discover nodes and broadcast data, a transaction module to verify and process transactions, a consensus module to package blocks, and a block management module to synchronize and store blocks.

The benefits of modular development:

1. The function of each module is more independent and the business operation is clearer, which makes it easier for developers to understand. For example, to develop with the account module only involves security and implementation of encryption and decryption of the private key, without concern over how the network module discovers nodes, and how the block management module handles the fork.

2. After the definitions of the interactive interfaces between each modules have been assigned, development of modules can be carried out in parallel to further improve the efficiency.

3. Each module can be upgraded and replaced independently without affecting any other modules in the whole system.

4. It is possible to develop each module in different languages, leading to a lower threshold for developers.

Why is NULS 2.0 modularized more thoroughly?

1. Modularity is finer-grained and the division is more clear:

We did divide the modules to make each module carry clear functions when we developed NULS 1.0. However, there were still some unclear divisions in the actual development where functions that should have been implemented in module A were implemented in module B. So with the design of NULS 2.0, we innovated to make each module have a more clear definition and clarify business functions.

2. Modules are more independent and extensible:

More independent:

Although NULS1.0 has modularity, the whole system is driven by one single program and developed in one single language. NULS 2.0 adopts the micro-service architecture and modules are truly independent and communicate with each other by RPC. Each individual module can be developed in a different programming language thus facilitating faster development.

For example, our core module NULStar is developed by C++, and the consensus module, transaction module and block management module are developed by JAVA. The account module has both JAVA and JS versions.

More extensible:

1) The way to implement the module can be more diversified after the modular independence. For example, NULS adopts POC consensus mechanism to consensus module, and developers equipped with needs and abilities can also develop POW consensus mechanism to replace it,

2) We can directly add new modules to achieve new functions without the need to modify the original modules.

3. More standardized and easy-to-use:

After the exploration of NUL S1.0, we have established many development specifications since the design and development of NULS 2.0, including documentation, interface definition and code style. Better specifications make better collaborative development and lower learning costs for new developers.

2. The ledger module changes from the UTXO model in NULS 1.0 to the traditional account balance model in 2.0

Let me take a moment to explain what the UTXO model is and what the account balance model is:

Traditional account balance model:It is easy to understand because the commonly used Alipay and WeChat payment are both account balance model. My account will have a balance of 100 yuan after I received 100 yuan in WeChat. And then I received another 200 yuan, the balance in my account will become 300 yuan.

UTXO model:The UTXO model is commonly known as the wallet change model. For example, you had 100 yuan in your pocket, and then you find 200 yuan on the ground when go shopping, now although you have 300 yuan in total, but from the appearance, what you have is three 100 yuan notes rather than a 300 yuan note. You are very happy to get the money and treat your friends to dinner which costs you 260 yuan. At this time, the way you pay is to give out three pieces of 100 yuan, and then the restaurant gives you the change 40 yuan.

Here, those who are familiar with the NULS 1.0 wallet may recall that when we used the wallet to transfer 100 NULS and checked the transaction detail after its success, we could find that a large number of scattered amounts were transferred out and the change would be left to last. This is the UTXO model, where the account does not have a total ledger, and each time when calculating the balance, it adds up all the change as if we were counting our money at home.

So, why does NULS 2.0 adopt the account balance model?

Obviously, there will be less need to calculate and less data to be stored with the account balance model, leading to higher efficiency and space savings.

More importantly, it reduces the fees which users pay for the transfer. As we all know, data on the blockchain has a cost, so the more data per transaction the higher fees charged by the packaging node.

3. NULS 2.0 supports cross-chain

Cross-chain is currently a hot topic of blockchain, and is also one of the three obstacles that need to be overcome in the implementation of blockchain applications.

Why do we need cross-chain?

Though there are many public blockchains now, each chain is a relatively independent network, where data and information cannot be communicated resulting in an isolation problem, a sort of information island. The high difficulty of collaboration between different blockchains greatly holds back the development of blockchain applications. Therefore, the realization of cross-chain technology and multi-chain parallel has become one of the hot topics in the blockchain space. If the consensus mechanism is the core of blockchain, then cross chain technology — especially consortium chains, and private chains, holds the key to realizing the value network.

How does NULS 2.0 perform cross-chain?

Since cross-chain involves a fundamental terminology, I will try to describe it in a simple and understandable way in order to facilitate understanding. The cross-chain of NULS consists of two parts; “in the system” and “outside the system” elements.

In the system

NULS is the main chain (also known as satellite chain), and the other parallel chain applications built on the NULS blockchain as family chains, send cross-chain transactions to each other to achieve interconnection.

Implementation:

1. Formulated NULS blockchain standardization protocol as the only protocol standard for cross-chain interaction.

2. Extended the functions of network module. The network module of NULS 1.0 only supports interconnection between NULS main-network nodes. NULS 2.0 by contrast supports interconnection between NULS main-network nodes and multiple family-chain nodes.

3. Developed a cross-chain module to support cross-chain transactions between the family chains and the main network according to standard protocols. The module also verifies and processes each other’s cross-chain transactions.

4. Family chains only communicate with NULS main network, which is responsible for the verification of cross-chain transactions. Each family chain trusts the verification results.

Specific process — Let’s suppose there is an A-chain, which intends to send a cross-chain transaction to the B-chain to transfer assets.

Firstly, A-chain sends cross-chain transactions to the main network, the main network firstly verifies the transaction format and then the transaction information, and finally forwards the transaction to B-chain after Byzantine verification. B-chain only needs to carry out the Byzantine verification without the verification of the transaction information after it receives the transaction.

Outside the system:

NULS will build an adaption network layer to convert mainstream tokens such as Bitcoin and Ethereum to the NULS standard protocol so as to realize interconnection with the main chain.

4. NULS 2.0 is more international and community oriented

1. Underlying development has already involved community partners.

The core NULSTAR is the manager of other modules, which was designed by Berzeck from the technical community and is developed together with Ray, another member of the technical community. Of course, NULSTAR is still under development, and it alone is equivalent to the volume of a separate project of other blockchains. In addition, the other two technical community members Naveen and Edward are also involved in the development of the account and event bus modules, which are currently handed over to them for maintenance.

NULS is probably the only project other than Ethereum that works in this way, where the team and the technical community jointly carry out the development.

Such deep integration will foster a group of global developers who are extremely familiar with and highly adept with the underlying network of NULS. The developers are actually the backbone of the future blockchain.

Join our social media and explore NULS!

Official Website Follow now
LinkedIn Follow now
Twitter Follow now
Reddit Subscribe now
TelegramJoin now
YouTube Subscribe now
SteemitSubscribe now
Instagram Follow now
DiscordJoin now

--

--

NULS AI
NULS AI

Written by NULS AI

NULS Al is a modular blockchain infrastructure that is highly adaptable to Al applications. NULS AI - The Global AI Consumer Layer https://nuls.io

No responses yet