From layered design to cross-chain chaining, what is the difference between Cosmos and NULS?

With the value of blockchain technology becoming more prominent, it has been actively embraced and supported by more and more countries and regions, and many well-known enterprises have begun to lay out blockchains. Compared with traditional software development, blockchain technology is difficult and the cost of enterprise chain building is high. And the current blockchains, such as Bitcoin and Ethereum, are islands of data and value, and cannot achieve inter-chain communication. In the long run, this is a problem that must be solved.

So how to reduce the difficulty of blockchain development and help companies achieve easy chain building? How to implement cross-chain between blockchains? NULS, which recently won the strategic investment of Block Group's $200 million M&A fund, and Cosmos, which has just completed the launch of the main network, are prominent representatives in the chain and cross-chain fields.

This article will analyze and compare the two star projects of NULS and Cosmos from different perspectives to help you understand their technical realization in chain building and cross-chaining, and what value they have.

Hierarchical design

From the overall architecture point of view, both NULS and Cosmos have adopted a layered design to separate the business layer from the bottom layer.

Cosmos is divided into two layers. The bottom layer is called Tendermint Core. It includes the consensus layer and the network layer. The business layer is called Cosmos SDK, which encapsulates common business functions. The Cosmos business layer completes the interaction with the underlying layer by calling the Tendermint Core interface ABCI (Application Blockchain Interface).

11

NULS is divided into three layers, the bottom layer is called NULSTAR, which is a blockchain microservice underlying framework. The business layer is divided into two layers, which are the blockchain basic service layer NULS module warehouse and DAPP application layer.

12

The NULS module repository is similar to the Cosmos SDK and has built-in generic function modules. Based on the service of the blockchain, NULS splits the functions required for all blockchains into common modules.

Companies that use NULS and Cosmos to build chains need only focus on specific business functions, and then use the common features provided by NULS and Cosmos to create a blockchain that meets their needs.

The benefit of layered design is that the underlying code is encapsulated and the business layer provides common business functionality. In this way, NULS and Cosmos simplify the chain-building for specific business development, greatly reducing development difficulty and effectively saving development time and development costs.

Unlike Cosmos, NULS specifically designed the DAPP application layer and added support for smart contracts.

This can help to better expand the ecology using the blockchain built by NULS. In the DAPP application layer of NULS, you can also see the addition of the application base library, which can help DAPP developers to deal with basic work such as network messages, thereby reducing the workload. The interaction between DAPP and NULS platform is completed through the interface provided by the connector in NULSTAR, which can effectively reduce the complexity of message communication.

2. Modular

Based on the layered design, both NULS and Cosmos are developed in a modular way.

At the business level, NULS and Cosmos split the common business functions into different modules, and each module implements the corresponding functions. In this way, when developers develop applications, they only need to develop special business functions, and the general functions can directly use the functions provided by NULS or Cosmos.

13

Modularization of the Cosmos SDK

14

NULS microservice modularity

Combined with layered design and modularization, both NULS and Cosmos have done it. The development blockchain only needs to complete the business development of specific functions, and does not need to care about the bottom layer of the blockchain, which greatly reduces the difficulty and cost of chain building.

But NULS and Cosmos are very different in overall architecture. Cosmos uses a single architecture. When developers develop and test, they need to download all the code, and the development test is relatively complicated. For feature extensions, Cosmos is implemented with plugins, which is limited by the development language.

NULS uses a microservice architecture. There is no code dependency between modules. Each module can be developed and deployed independently, which is relatively friendly to developers. When a function is extended, it is a development or upgrade of a single module, and is not limited by the development language.

Due to the overall architecture, there are many differences in the use of NULS and Cosmos for chain building. For example, in the case of modular splitting, Cosmos puts the consensus mechanism into the underlying Tendermint Core, while NULS puts the consensus mechanism into the blockchain basic service layer and independently develops it into a consensus module. This means that using the blockchain developed by Cosmos, the consensus mechanism can only be Tendermint. Using the blockchain developed by NULS, different consensus mechanisms can be used. NULS's independent consensus module can meet the business needs of more scenarios, allowing enterprises to flexibly adjust according to the business.

The microservice architecture adopted by NULS is more modular than Cosmos's single architecture, which facilitates the expansion of the system's functions and allows for more flexible response to different business scenarios. When a module needs to be upgraded or replaced. When it does not affect other modules, it can guarantee the stability of the entire system. For a blockchain with complex services, microservices can better split services, ensure clear business data, reduce the difficulty of operating systems, and save costs.

3. Consensus mechanism

Cosmos's consensus mechanism is called Tendermint, developed by Cosmos's core development team, Tendermint. The NULS consensus mechanism is called POC (Proof of Credit) and was developed by the NULS core team. Both POC and Tendermint are POS-type consensus algorithms and all combine Byzantine fault tolerance.

In POC and Tendermint, there are two roles: certifier and principal. The certifier establishes the node by pledge Token, participates in the consensus, obtains the reward, and the trustee delegates the token to the node, and the same reward can be obtained. Tokens that participate in the consensus will temporarily limit circulation. When they want to distribute Token, they can also quit quickly.

At present, the main network of Cosmos Hub has just been completed, and the Token circulation cannot be performed. In the first stage, Cosmos can support 100 certifier nodes. The main network of NULS was completed in July 2018. At present, the main network is running stably, and there is no specific limit on the number of nodes.

15

Cosmos main network data

16

NULS main network data

In DPOS, the node only has a super node, and the principal will not receive a consensus reward. The Token participating in the consensus does not restrict circulation. Compared with DPOS, POC and Tendermint can allow more nodes to participate in the block, encourage more people to participate in the maintenance of the network, and ensure the decentralization of the system. And the consensus Token can't be circulated, which can improve the security of the network. Compared to Bitcoin's POW, POC and Tendermint's threshold for mining is low enough to save a lot of energy.

For blockchains, partition tolerance is a must, and POC and Tendermint differ when dealing with partitions. When the network is partitioned, the Tendermint network is more focused. If the partition causes less than 2/3 of the nodes participating in the voting, the Tendermint network waits indefinitely, which means that Tendermint's network may get stuck. When a partition occurs in a POC network, different partitions can be normally released. When the network is restored, the merge is performed and the final consistency is followed.

Especially for the public chain, ensuring availability is very important. When the network is partitioned, if the network is not available, it will cause a large number of applications and transactions to be unusable, which will affect the normal business operation of the enterprise. For the public chain with many users, this will result in the transaction and a large number of DAPPs being unavailable. Will have an unpredictable impact.

4. Chain building

In terms of chain building, NULS and Cosmos are almost identical in concept. By encapsulating the underlying layer and modularizing the business layer, the chain-makers only need to pay attention to the development of specific business functions, which can realize chain-building, thereby reducing the difficulty of chain-building and saving development time and cost.

However, Cosmos adopts a single architecture. When using Cosmos to build a chain, it is necessary to implement other specific business modules by developing plug-ins based on the Cosmos SDK. NULS adopts a micro-service architecture. When NULS is used to build a chain, it can independently develop specific business modules, and then interface with the general modules of the NULS module repository, and each module can have multiple replaceable plug-ins. Extend business functions.

Compared to Cosmos's plug-in chain, NULS's modular chain is not limited by the development language, the development and testing process is simpler, more flexible, and can meet the customization needs of more enterprises.

For systems with simple services, you can even interface directly with NULS without any additional development work. For large blockchain systems, microservices are more scalable, ensuring system stability and saving a lot of operating costs.

From the overall roadmap of Cosmos and NULS, we can see that Cosmos and NULS are different in their development. Cosmos as a whole focuses more on the development and research of the cross-chain field, while NULS divides development into chain and cross-chain, two important stages of development. In the chain-building phase, in addition to the modular chain, NULS also plans to launch a core product chain factory, hoping to achieve "one-click chain building"

The NULS chain factory is based on the NULS module warehouse. In addition to the general functional modules, NULS's module warehouse also contains business modules developed by different developers. It means that when companies use chain factories to build chains, they can also choose some business modules that suit them, further reducing development costs.

17

Using the NULS chain factory chain, you need 4 steps:

  1. In the module warehouse of the chain factory, select the required modules;
  2. Perform system parameter configuration and fill in the contents of the creation block;
  3. Fill in the chain introduction and chaining method;
  4. Pay the deposit, broadcast chain trading.

18

The chain factory itself is also a blockchain. The nodes of the chain factory can run multiple chains at the same time. Thus, by using the blockchain built by the chain factory, you can directly select the nodes of the chain factory, run your own blockchain, and save the construction. The blockchain node runs in a troublesome environment, and the cost is greatly reduced. Of course, companies can also choose to create their own nodes and then run the blockchain.

Cosmos is more focused on the development of the cross-chain field. In the field of chain building, Cosmos has realized plug-in chaining through the Cosmos SDK. NULS divides the development stage into two stages: chain-building and cross-chain. In the chain-building stage, NULS implements a modular chain, and plans to implement a “one-click chain” through the core product chain factory in the future.

5. Cross-chain

The overall approach of NULS and Cosmos's cross-chain solutions is similar. In order to achieve value interoperability between the chain and the chain, both NULS and Cosmos adopt a relay method.

In terms of implementation, Cosmos uses Cosmos Hub as a bridge to allow other parallel chains to interoperate. NULS uses the NULS main network as a bridge to allow other parallel chains to interoperate, and NULS will bypass the cross-chain transactions, and 80% of the nodes will confirm the transaction. Will be packaged, and cross-chain transactions will not be lost, after the consolidation of the partition network, the confirmation of the transaction will still resume. For the interworking requirements of data and other business scenarios, both NULS and Cosmos can be implemented by adding other relay chains.

19

Cosmos cross-chain solution

20

NULS cross-chain solution

For blockchains built directly through the NULS module repository and the Cosmos SDK, both NULS and Cosmos have their own cross-chain protocols that can directly implement cross-chain functionality. For extra-ecological blockchains (referred to as outer chains), such as Bitcoin and Ethereum, NULS and Cosmos use indirect interoperability. NULS provides a protocol translation layer. The outer chain can be connected to the protocol conversion layer. The protocol conversion layer can be connected to the main network to indirectly realize the interworking between the chains. Cosmos needs to use the Cosmos SDK to develop a proxy chain, which is interoperable with the external chain and Cosmos Hub by the proxy chain to indirectly communicate with other parallel chains.

6. Summary

1. Both NULS and Cosmos adopt a layered design to reduce the difficulty of enterprise chain building through modular development. The difference is that the two have great differences in technology selection. Cosmos uses a single architecture, and NULS uses a microservice architecture.

2. Single architecture and microservice architecture have different application scenarios. For small blockchain systems, Cosmos's single architecture may be more suitable, but for large blockchain systems, NULS's microservices architecture can better split the business and improve system scalability. , reducing the operating costs of the enterprise;

3, NULS and Cosmos support the chain is different, Cosmos is based on the plug-in chain of Cosmos SDK, NULS hopes to achieve "one-click chain building" through the core product chain factory;

4. Both NULS and Cosmos adopt the POS type consensus mechanism. For each participant who participates in the consensus, there is a consensus reward, which can encourage more people to participate in the maintenance of the network, improve the security of the system, and participate at the same time. The threshold of mining is very low, which can effectively ensure the decentralization of the blockchain;

5, NULS and Cosmos have laid out the chain and cross-chain. The overall idea of ​​the two has many similarities. The success of NULS and Cosmos in the future will have an important impact on the development of the entire blockchain industry.

About the Author:

Huang Lianjin

Famous blockchain expert, chief scientist of nuclear cluster, CEO of DistributedApps of the United States, expert member of Block Branch of China Electronics Society, and consultant of NULS.

Xiang Wenbo

Java software engineer, Cryptotech-Writer, member of the NULS Core Team. Focus on blockchain technology research and blockchain solutions.

Xiaobo

NULS co-founders & community leaders have long been involved in blockchain technology and project prospects; early involvement and evangelists in the blockchain have extensive community building operations experience and are responsible for NULS community governance research and operations.

references:

"NULS's one-click chain and cross-chain ecology" Xiang Wenbo NULS Chinese community;

"Soft and hard core: thoroughly understand how Cosmos one-click chain and million chain interconnection" Li painting chain heard ChainNews;

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Opinion

Caroline Ellison testified in court Acting on the instructions of SBF, embezzlement of approximately $14 billion in FTX client funds.

The Manhattan courtroom was crowded on Tuesday as Caroline Ellison, the former girlfriend of SBF and former CEO of Al...

News

Investment tips for the next bull market: In-depth analysis of the development status and trends of 15 cryptocurrency tracks

Following the regular industry cycle pattern, the bear market has passed halfway. The Ethereum upgrade has brought ab...

News

Who can take the lead in breaking the exchange contract?

Mark Lamb, CEO of CoinFLEX, predicts that by the end of 2020, the derivatives market will reach 20 times the size of ...

Blockchain

Beginner's Guide | Why choose a highly liquid exchange?

Source: Medium Translation: First Class (First.VIP) Liquidity is the most important concept that everyone needs to un...

Opinion

Former close friend to testify against SBF, list of other witnesses revealed.

SBF's trial started on October 2nd, and his once closest friends will testify in court, becoming his biggest threat. ...

Blockchain

IEO re-burns the ring of rich dreams, how long can the dozens of income myths go?

There is no doubt that IEO is the hottest word in the currency. Since January 3 this year, the company announced the ...