The main line of Cosmos, but “why need cross chain remains to be explored

Editor’s note: This article from the orange book (ID:chengpishu), author: orangefans, authorized reprint by Odaily daily planet.

Write in front:

Cosmos on the line.

Look back on the last, and founder of the Jae exchange or last October. I remember in the orange book at the end of the interview, ask, what difficulties ahead of Cosmos? Jae want to count the need to do what the whole assembly, found that these seem basically finished, so he looked up and smiled and said: it is been a long way.

Yeah. From 2014 to now, in the past 4 years, Cosmos finally went home.

I love the Jae chat when sincere. Finish the interview in October, I was most impressed by the Jae from the bottom of my heart will always believe there are two forces in the world, one is toward the center of the cluster, the direction (such as a unified public chain), the other is some people want to be replaced, or second (for example, you can easily choose to send a chain). The two force will not stop each other push, Jae chose the side is not so clear.

The world needs people to test various different ideas. Jae want to make every application, every organization, even everyone can have a chain. We can not even Cosmos network, using only their own tools, do a hub, and then find some friends around to do zone, such a small group can have a small block chain network, the network does not even need any association with the outside world chain hook, it is completely in the internal operation I think this concept is very interesting, like a small group of people to build a just and relevant to their own LAN, one of their own island. At the same time, the island if necessary, also to the outside world and the interconnection.

But the problem is, I’m not sure whether this idea can get real people demand support. Maybe the miners and verify these resources can be shared by the nodes, to a certain extent to solve the problem of resource waste, but the cost and difficulty of their operating a chain is still not low. Maybe we don’t have too much after the probability of layer 1, the chain or the emergence of a unified framework, its performance and safe enough, people continue to build new applications in solid things, but now such a public chain has not yet appeared, perhaps for a long time, and we are currently in fact only two really the value of the solid pool: bitcoin and etheric fang.

Regardless of the value of these two pools, the other is not a stable network connection, really make sense? People need to do this? Even bitcoin and etheric Fang, I can’t imagine what they are connected to each other scene, why need to connect. If the exchange is only related to the token value, this is a part of the exchange was solved? If it is for the exchange of tokens to the center of the exchange, is not there should be more concise, targeted solution, or change to other layers to solve?

I love Cosmos try, but the technical difficulty of the cross chain itself, often replaced the discussion on some other issues, discuss that we see, seem to have the “necessity” of the default layer1 cross chain as the premise. But on the cross chain scene, I always do not want to understand. I hope to hear some other opinions, solve these puzzles. If you have a better understanding, welcome comments together.

For those who do not know Cosmos friends, understand Cosmos as a description of the principle, this article orange book written in October of last year is still worth reading. We always hope that the production of those with longer life cycle, so the article below, decided to send again.

Conversation Cosmos: the future is all in a chain or public, everyone has their own chain?

Cosmos is a very interesting project. If you want to summarize it’s ideas, this project was founded in 2014, the original intention is to let everyone can easily have a chain.

Most people in the busy time to build public chain, dominate the political arena, the founder of Jae cosmos and some of their own unique ideas. He believes that in addition to the unified public chain, people still need to have alternative, there are always some people want to have one of their own chain. Even on the other hand, many applications to the center itself should also be a separate chain — for example, encryption cats should be a chain, fomo3d should also be a chain, rather than the public application chain.

To this end, the cosmos team created a number of tools that developers can easily develop as the development of DAPP as its own chain. Finally, when many “small is beautiful” and “customized”, “professional”, “the strong” chain, like countless rivers flow sea emerged, Cosmos through the cross chain protocol system and greater network ecosystem, for these different chain provides the ability to connect to each other. The goal of cosmos is to let the ocean sea rivers flow converging blockchain.

This article hopes to introduce plain language cosmos what is it interesting, where, out of these basic information, in the end there is a part of the orange book and the founder of cosmos Jae and its core technology team from the conversation, perhaps you can more deeply understand the concept of cosmos.

The origin of Cosmos: tendermint

In the early development of technology, people on how to develop a decentralized public account does not have too much understanding and thinking. Bitcoin and etheric Fang is like a whole welding die computer, all of the above components are integrated together, the logic of perplexing, there is no hierarchical stack technology. It’s hard for you to make changes to it, which parts can’t pull out to do the upgrade. When people have various different ideas about public chain, many people began to develop its own chain. This time you will find that even if bitcoin and Ethernet square open source, it is difficult to reuse your code. In addition to the bitcoin code to copy, modify parameters, change the name, make a copycat money, do not too many things.

In this context, some people think, I can not do a tool, so that we can use this tool to better develop their own chain? Just like computer assembly, mouse, keyboard, display, memory, these things are readily available, can be disassembled independently, do not know a computer principle people can like spell building blocks made of different kinds of computer.

Cosmos: exactly, is the cosmos in the tendermint was born.

Tendermint is one of the most important parts of the cosmos, it is also the basis of the entire cosmos ecosystem. To understand cosmos, need to understand tendermint.

Simply speaking, tendermint is a generic block chain development framework. You can use this framework to quickly develop their own custom chain.

Just imagine, if you design a set of development tools, how would you design? Obviously, the first step is to put the abstract to be used in all chain function. Just like you want to help others make a computer, you need to figure out the computer has CPU, memory, and display these things.

A necessary part of the chain including what?

The cosmos team believes it can be divided into:

  • The network layer: to ensure that, in a peer-to-peer network, each node can receive and transmit a transaction.

  • To ensure that each node consensus layer: select the same transaction, the transaction will be allowed to modify the state of the node. In bitcoin, the balance of the so-called “state” is a series of accounts (although the utxo model, but in order to simplify the understanding, we can think so), the miners agreed on a deal if effective balance transaction would have to modify all accounts.

  • Application layer: to ensure transaction processing. The so-called “transaction” refers to a transaction and enter a state, this application will return a new state. In the etheric Fang, the application layer is actually called the EVM virtual machine. All transactions into the virtual machine, virtual opportunity to modify the state of the deal contract according to intelligent call instructions.

The cosmos team believes that all this three layer structure basic could be summed up in a chain. At the same time, most people want to develop their own chain, in fact, are not too concerned about the network layer and the consensus layer, they want to define the application layer of things, because it is responsible for business logic layer.

So, tendermint becomes the target of:

To create a common network layer and consensus layer, so that we can easily build their own application layer at the top, save a lot of unnecessary development time.

Tendermint consists of two parts:

  • The first part is called the tendermint core. This part of the consensus and network layer package together, become a general engine, this engine is used to ensure that transactions in accordance with the consistency and security of the principle of being copied to each node on the machine, that is to say, the same transaction in the same order is recorded in the chain;

  • Part two is the ABCI protocol, Application Blockchain Interface. This part is the application layer of the core engine and the tendermint above developers to customize the interface. Through this interface, the application layer can be the consensus and bottom layer and network layer communication dialogue. The characteristics of the ABCI protocol, is to make a deal can be used with different programming languages and any programming environment.

Next, we take a detailed look at the two part:

Tendermint core

Tendermint core includes the network layer and the consensus layers: the network layer using gossip protocol, this is not important, we look at the key layer of consensus.

Consensus, tendermint uses the Byzantine consensus algorithm +pos.

The algorithm is a kind of solving consensus algorithm, it requires verification of network nodes in a round of broadcast and voting, reach a consistency of the whole network, in order to offset the node offline, network communication delay, malicious nodes and other issues. Node Byzantine algorithm requires at least 2/3 of honest nodes, in tendermint, the number of nodes of this 2/3 is not to have, but that the node’s rights, also is “money” – the number is pos for this mechanism, and we introduced before is the same as algorand.

In addition, we all know that the Byzantine consensus algorithm such as PBFT, is required to validate the node must be a fixed set of nodes beforehand, but in tendermint, verify the node can dynamic change, but the dynamic don’t like bitcoin POW so flexible, you want to join can join, want to quit can exit. Each tendermint increase or exit a set of validation nodes, nodes need to pass at least 2/3 vote to decide.

Finally, if the verification node is too much, the consensus time is slower. So, tendermint the number of nodes is set to 100 in the beginning of time. In addition to the 100 authentication node, other users can use light nodes to access the network. According to their plan, the 100 node number will increase by 13% annually, after 10 years of stability for 300 nodes. Then, the 100 node to the center to have what effect? This problem belongs to the Different people, different views.. Cosmos think it is no problem, there is such a set of data on their white paper:

64 nodes, spanning 5 continents, 7 data centers, using commercial cloud computing examples, can provide high performance processing, processing thousands of transactions per second, delay in 1-2 seconds. But this performance is in the harsh enemy hypothesis can also set up, even if there are malicious nodes deliberately voting system cheating, can guarantee a certain degree of fault tolerance.

You can see the benefits of tendermint reflected in these aspects of performance, safety. In addition, another advantage of tendermint is that it is not because of the POS bifurcation, the Byzantine consensus algorithm is a deterministic immediately after a final.

ABCI protocol

With tendermint core the big kill, you can build a variety in the above chain, whether public or private, chain chain chain alliance.

It can do that is because tendermint core is not aware of the application layer above what specific implementation, it does not care about the application layer. Tendermint put a lot of irrelevant details are ignored, only abstracts the key things, a universal interface. This interface is used to connect the abci protocol, communication between the application layer and tendermint core.

Abci protocol is a socket protocol, whether you use what kind of programming language, running in what kind of environment, as long as you meet the standard protocol, application layer and tendermint core can communication. Cosmos officials have implemented a abci protocol version, called Tendermint Socket Protocol (TSP or Teaspoon), of course, you can implement your own version.

The abci protocol consists of several different types of messages. Tendermint core will create a 3 ABCI connected to the application layer: one for the verification of broadcast transaction in the memory pool; one for the engine to run for the new consensus, block proposed; the last is used to query the application layer state.

Ethernet square and Java, Solidity, C++, Python, Go of these languages can be used to write processing logic block chain transaction uncertainty. Note that the block processing must be determined immediately, is not like bitcoin POW kind of certainty or probability, tendermint core can not reach consensus. POS and POA (proof of authority) algorithm is to determine the immediate consensus.

Flow chart

The working procedure of tendermint (technically) can be simplified into a diagram below

Click here to view HD version:

We look at the relationship between the abci protocol and the application layer with a more concrete example, may be a little more intuitive.

For example, we want to tendermint based on the realization of a “fake bitcoin: bitcoin is a virtual currency trading record record block chain, maintain a after all the audit of the UTXO database in each node of the network.

We need to use abci to do a similar system meet the definition of. Then the Tendermint Core is mainly responsible for these things:

  • Sharing information between nodes in the block, in exchange for a Bibi deal;

  • The establishment of an authority, can not be tampered records (i.e. a chain)

We need to write the application layer are responsible for something:

  • Maintain the UTXO database.

  • Cryptographic signature verification transaction

  • To prevent the emergence of the existing transaction costs”

  • Allow clients to query the UTXO database

Cosmos SDK

Well, we probably understand what is tendermint.

As you can see, write a abci or very troublesome. In order to further facilitate block chain development, Cosmos also provides a tool called Cosmos SDK, this tool to some common module standard block in the chain, the general module covers most of the application layer required functions, such as: staking (mortgage system), slashing (penalties) and IBC (trans the chain, accounts), account management, reward & fee etc..

With Cosmos SDK, users only need to implement other plug-in modules based on SDK, to deal with some special business chain.

The cosmos team also use this SDK to achieve an example named Cosmos Hub, this example will involve behind us.

Cross chain

We already know the cosmos of the core technology of tendermint, also know what is cosmos sdk. Next we look at the cross chain cosmos technology. The future of the imagination of the most important is cosmos.

When we don’t have a lot of chain, chain across this problem does not exist. But now with the public more and more cross chain chain, has become the problems to be solved. The two chains need each other for dialogue, bitcoin transactions to each other and etheric Fang and transfer value, exchange their tokens, this thing is how to solve it?

There is a train of thought:

If A want to send 10 B chain chain x token, first of all, the 10 x token will be locked in the A chain, can not move. Then, the 10 x token cryptography evidence locked from the A chain transfer to the B chain and B chain chain node A tracking verification, if the verification node signature of this evidence is at least 2/3 cryptography, then the cross chain transaction is effective, B chain can produce a corresponding token x 10.

Note that the 10 x token B in the chain is not actually x token, because x token only exists in the A chain and B chain of X token is A chain of X token agent only, the token agent need to cooperate with a proof of evidence of these coins in cryptography A chain has indeed the locked. When the token returned from the B chain to the A chain, also use a similar mechanism.

Abstract this system is the use of cosmos in the cross link communication protocol IBC protocol, Inter-Blockchain Communication. IBC is a bridge, so that different chains can be connected with each other. About IBC more detailed definition can be viewed here:

But unfortunately, the current IBC protocol can only support simple value transfer, cross chain transmission to send token, does not support the logic, code or other data.

Block chain network

Have IBC this cross chain block chain network communication protocol, we how to construct a interconnection?

One of the most direct approach is to let every male chain in the network to establish the IBC communication protocol and other different public chain. This approach is simple and effective, but it has a big problem: can not be expanded. There are 100 different chain hypothesis in the network, they will need to establish a pairwise inter 4590 link. Once the chain increased the number, number of links will increase rapidly.

That can not be interconnected with each other, directly connected with all chain?

So if there are 100 chains, they only need to build a total of 99 links. But in this way will face another problem: the trust cost increased, a cross chain transactions will greatly increase the risk of Flos lonicerae. Why? If the A chain to the B chain of token is produced in the A chain, then the B chain only need to verify the A node trust chain, but if the token is generated in the C chain, from C to A to B, then the B chain will need to verify the nodes at the same time trust A and C, the final cross chain transaction verification will be very troublesome.

In order to avoid the above two types of problems, Cosmos used another way to cross chain. They are connected to build the whole block chain network of a modular architecture, this architecture includes two parts: one is hub, one is zone.

Zone and hub are tendermint based on block chain: hub is a cross chain connected with the center, all the cross chain transactions are unified by hub; zone is a different sub chain. Zone connected together through IBC protocol and hub, different to each other across the chain chain transactions, only through the hub proxy can be completed.

The cosmos team to achieve the first official version of hub, called cosmos hub, which is the product of Cosmos by SDK we mentioned above to build out. Cosmos hub has a primary token called atom, the zone verifier to the hub part of the atom pledge tokens to regulate their own behavior. Once the zone verification node evil, hub will confiscate zone tokens, this is called the slashing mechanism. You can put the hub into the central management agencies understand simple tokens in the whole network, and the zone is equivalent to the network node.

This cross chain architecture, it is easy to think of another question immediately: communication across all chain through the center of hub agent, it will not violate the chain block to the center of the mind?

It is worth mentioning that, although the cross chain is indeed a lot depends on the cosmos hub, but everyone can run their own hub, does not necessarily need by the official cosmos hub. Therefore, to a certain extent can also ensure the cross chain to the center. Somewhat similar to yourself: you can run a hub, and a few good friends and they form a local area network, and between LAN and LAN can be connected through different hub. Even if the network connection hub paralyzed, communication within the LAN is not affected.

Non tendermint chain can be connected to each other?

So far, we have tendermint, with cosmos SDK, the business logic can be concerned only with the application layer, not to the bottom of the pipe network and consensus layer, quickly develop their own chain. In addition, we have cosmos hub and zone, can make these many different tendermint build based on chain connected with each other, have interoperability.

So, not based on the tendermint chain, can also be connected?

Here are divided into two kinds: if it is with a real-time deterministic chain (such as using POS and POA, as long as the consensus) adaptation of IBC can access the cosmos network ecosystem; if it is deterministic probability using POW consensus in the chain, then the situation is a bit more complicated.

According to the demand of the latter cosmos cross chain, on the basis of the zone launched a new Peg-Zone component. Peg-Zone is actually a proxy chain, used to track the state of the original chain.

Peg-Zone itself is a tendermint chain based on, so it has immediate certainty, also suitable for ibc. Peg-Zone is responsible for tracking the original chain in the agent chain certainty of block. So Peg-Zone need to set a rule, use this rule to confirm the certainty of the block, for example, this rule can be: 100 new blocks added in the current block, the current block is stable, can be regarded as uncertainty will not be guaranteed, bifurcation.

We can see a current Ethernet (Fang still using POW consensus) example:

Suppose you want to make a Peg-Zone Ethernet square, you need to first in the etheric workshop deploys a smart contract. The user wants to turn the etheric Fang 100 token to cosmos, the token is turned into the intelligence in the contract. Then the intelligent contract will lock up the 100 token, after the current block adds 100 new blocks, the chains of Peg-Zone began to release 100 agent token.

The chain of Peg-Zone can send the original to the etheric Fang chain token, using the similar mechanism. At this time Peg-Zone token, will appear in the etheric Fang with a ERC20 token form.

However, the Peg-Zone agent chain model also has its own problems: need to do special customized for each access chain. The chain to build a Peg-Zone for Ethernet square is relatively easy, because Ethernet Fang is based on the account type, at the same time it has intelligent contract. The chain if you want an Peg-Zone for bitcoin, it is very complicated, although it is feasible, but need to do a lot of extra work.


Here we basically clear cosmos the whole project is what to do.

In summary, Cosmos hopes cosmos SDK and tendermint tools allow developers in a modular, standardized, pluggable way (which is actually the modern software development accumulated a lot of mature experience, rapid development technology) a chain reduce development costs. After that everyone can easily have their own chain, Cosmos through the cross chain ecosystem IBC protocol and cosmos hub and zone which, for these different chain provides the ability to connect to each other, and ultimately form a large network.

Cosmos believes that this set of ideas in addition to reducing the blockchain development costs, so that different chain have interoperability, there is a very important advantage: scalability.


Cosmos on scalability improvement is divided into two aspects:

  • Vertical extension: the vertical direction of the performance, the one hand reflected in the abandon POW consensus algorithm, using pos+ Byzantine consensus algorithm, on the other hand reflected in the application of the blockchain “– on development of DAPP virtual machine a block chain, the efficiency of the operation of the DAPP to run directly on a the built-in application required for this type of transaction, data structure, state transition function block chain, the efficiency is slow.

  • The level of expansion: in addition to the vertical extension consensus algorithm and block chain itself, scalability can also be attached to several chain system in cosmos want in the future. This is the vision for the future: a public verification node in the network, is responsible for ensuring transaction security, and a plurality of parallel chain a small part of the transaction execution respectively, so as to achieve faster transaction processing.

Cosmos believes that now most developers tend to develop smart contracts in the etheric Fang, and do not want to develop their own chain, mainly because of the difficulty of developing a chain is too high. But with the popularity of tendermint, the development of a chain cost will change as the development of a smart contract as simple.

Interview dialogue

The cosmos block chain and ecological understanding is very interesting. There may be a lot of people and the orange book, the cosmos believes that “everyone should have a chain of” the concept of curiosity. The former Shanghai universal block chain summit, the orange book they had the opportunity and the founder of cosmos Jae Kwon and the core technology development team interviews, we focus on this concept is discussed, the following is a conversation:

The Orange Book: if you use simple words to introduce what is cosmos cosmos, do you think the main difference in where?

Tendermint developer Christopher Goes core with block chain development, we see a lot of public chain. The block chain if you want to talk to each other, exchange, token value, assets and even code words, they need to have the relevant communication protocol. Cosmos IBC is proposed to solve the cross link protocol, dialogue between the different chain problems. On the other hand, the application of the public square chain like Ethernet that developers can develop their own, such as virtual cat, to the center of the exchange and so on, it is very cool, but these applications must run in a universal virtual machine, this is actually the application of expansion caused by restrictions. Cosmos solves this problem by the way is: let a lot of applications to become their own chain. The application running on a specially tailored for their own chain, thereby increasing the expansion ability, at the same time with the IBC protocol, the application of the chain can have interoperability across the chain.

The Orange Book: in the future we will have a lot of chain? I feel the analogy of the Internet, we may have different web applications, but in these web applications, we may have a TCP / IP protocol?

Jae founder : if from the point of view of analogy, the IBC protocol may become TCP / IP protocol. In the long run I agree with you, we do not have a lot of chain may. The Internet first appeared there are many different web applications, behind the emergence of a unified search, final Google, blog service only social network WordPress, we all use facebook. There may be a similar cycle. But in the short term, such as the recent 10 years, because the consensus algorithm, programming language, the community, each project will be different. What is the best consensus algorithm, the best development language and the realization method of the best block chain, these are very difficult to be determined. So we may initially still need a lot of different chain, behind the very mature period will appear a large public chain, above undertake different applications. Nevertheless, I still believe that even with these large public chains exist, everyone will still want to have their own chain.

Orange Book: I wonder why you believe people will have their own chain? Because you want to maintain their own a chain of words, it is very difficult?

JAE That is very difficult. But I think there are a similar to the human instinct of things, the so-called “bootstrap” ability, tend to through their own efforts to achieve success. When people feel any mainstream chain cannot meet their needs, behind this there will be some potential value, once you have a community, there is a self excitation (self-incentive) of the chain, the value will grow up. I think all along there will be two forces, the two force kept each other push: one is toward the center, the direction of the cluster, another is some people want to be replaced, or second.

Cosmos CSO Jim : if you put Facebook apart, there has been a need a lot of chain. A block chain version of Facebook, it may need a chain, a chain of advertising, a XX chain etc.. These chains are only responsible for each to do one thing, there is a specific application, while Facebook is the need for these unified chain optimization and adaptation, control are running fast, how to upgrade their control. This is cosmos a very concrete application case.

Jae : another example to answer why people need a lot of chain, can go to look at the financial sector. If you go to see some of the financial system, there are a lot of cases, the bank for regulatory requirements, they need to master a lot of sensitive data, the corresponding tools also need to be in control. Therefore, in addition to the general public chain, these areas need to have a lot to take control of the chain.

Cosmos researcher sunny Aggarwal : before we met a team, they are a belief called Local Currency concept. The idea that every community should have a set of their own local currency, with this set of currency can perfectly meet the needs of local residents, the construction of local financial system, the coordination of the whole community organization, to the local community autonomy “”. In this scenario, each local community will need a chain.

The Orange Book: the future cosmos will meet the challenges?

Jae: we are on the safety of the entire ecosystem must look very deep. In the modular design in how to ensure the security of a system is a challenge. So we have designed a set of independent storage, and a logic control module called keeper, because it is responsible for the logic hidden in the data behind. The safety of isolation of the system is good, because when you go to an application framework, you can clear the application is composed of what, how to connect between them, can also easily locate if a problem. The future we may need to do more language on many different modules of the adapter, the challenge may be how these modules will be more optimized, such as support for different modules directly in the real-time network hot plug and so on.

Reference source:

  • Https:// Understanding the value proposition of Cosmos | – Cosmos Blog

  • Https:// Cosmos | Internet communication technology [Specification] on the chain

  • Https:// Cosmos and SDK | project

  • Https:// | What is Tendermint Tendermint Core |?

  • Https:// What is Cosmos Blockchain |? Most Comprehensive Guide

  • Https:// | depth analysis of the cross chain block chain Cosmos (Part 1) – IT program ape

  • Https:// | depth analysis of block chain cross chain technology Cosmos (2) – IT program ape

  • Https://

Leave a Reply

Your email address will not be published. Required fields are marked *