Telegram Open Network (TON), Polkadot, Cosmos Network — Future of blockchains?
Just at May 25 new information about TON appeared. Let’s try to briefly understand what is that and compare it to Polkadot and Cosmos. This article is a brief explanation of the new generation blockchains from the author point of view.
TON — Telegram Open Network
How TON Team is planning to scale over 300 mln users? — Sharding.
TON is planning to use sharding to scale transactions between users. There is a great article about sharding of blockchains here.
TON will have a masterchain and shardchains. Every shard is a blockchain that allows communicating with another shard. Shardchains can communicate with each other using Hypercube routing. TON have a virtual machine that can manipulate data between shards. All TON data is represented as cells linked to each other.
Recall that the TON Blockchain, as well as the TON Virtual Machine (TVM; cf. ), represents all permanently stored data as a collection or bag of so-called cells. Each cell consists of up to 1023 data bits and up to four references to other cells.
TON Blockchain — (1.1.1. TVM cells)
TON also have Validators, Collators, Nominators and Fisherman roles. Also, there are TON smart contracts that can be written on Fift language.
TON is also inspired by PolkaDot and going to combine principles of Ethereum 2.0 with sharding and Polkadot.
Polkadot is one of the best thought-out and most detailed proposed multichain Proof-of-Stake projects; its development is led by one of the Ethereum co-founders. This project is one of the closest projects to the TON Blockchain on our map. (In fact, we are indebted for our terminology for “fishermen” and “nominators” to the PolkaDot project.)
TON — (2.9 Comparison to Other Blockchain Projects)
We launched TON lite client and deploy an example smart contract to testnet.
Right now developing experience is a bit challenging and unfriendly. Lite client is written on C++ and looks like it’s perfectly written. TON team is really good at writing code.
If you want to deploy a testnet contract or create an account — you need to to build lite client and run it with a specific config.
After that, you can ask for some Test Grams by requesting smart contract on the hard-coded address.
Just do that command on any machine with docker:
docker run -ti -v "$(pwd):/data" --name ton buttonwallet/ton
After that, you can continue to follow TON demo instruction:
Continue to work with TON here: https://test.ton.org/HOWTO.txt
Right now it is possible to say that TON has a specific way to interact with it. We are waiting for more developers tools from TON Team to make this process more convenient.
There is a great and complicated whitepaper that explains most ideas that Polkadot implements.
Polkadot use one chain called Relay chain to connect all other chains. Relay chain is Proof-of-Stake blockchain with BFT-based consensus pretty the same as Tendermint. Relay chain has DOT coins and uses it for everything starting from governance ending to staking.
Shortly Polkadot has different blockchain for every chain (parachain — parallel chain). So, it runs blockchains with parallel execution.
Also, Polkadot has it’s own framework to develop parachains called Substrate. They are using WebAssembly virtual machine for parachains.
There are 4 participants in Polkadot Network — Validators, Collators, Nominators, and Fisherman. Validators verify all blocks and are running a full node. Collators help validators on specific parachain by sorting transactions and proposing blocks to validators.
One of the most important features of Polkadot — Shared consensus for all parachains (also means shared security). There is only one point of attack — relay chain.
Parachains don’t have a consensus and own validators — this can be an advantage because you don’t need to think about your own validators and consensus infrastructure.
The main problem of Polkadot is scaling and messaging between parachains. They are using hypercube routing mechanism trying to solve an issue with a growing amount of connections during adding new parachains.
Essentially, rather than growing the node connectivity with the number of parachains and sub-group nodes, we grow only with the logarithm of parachains.
Poladot Whitepaper (6.6.4. Hyper-cube Routing)
In common, we can say that Polkadot will have a relay chain and parachains connected to it. All transactions will be going through relay chain verification. There will be constraints to amount of parachains and validators due to performance restrictions.
Cosmos — is another big project that wants to connect a lot of blockchains. The main difference is that Cosmos does not have shared security for consensus. It is only controls how much Cosmos coins are transferred between blockchains. There is a specific protocol to communicate between Cosmos sidechains. The main idea is that the Cosmos maintain can check does sidechain reach the consensus or not. However, Cosmos sidechain does not ensure how consensus is reached. It is an only connected blockchain issue.
Cosmos use Inter-blockchain Communication (IBC) protocol to allow different zones to communicate with each other.
Now we look at how the Hub and zones communicate with each other. For example, if there are three blockchains, “Zone1”, “Zone2”, and “Hub”, and we wish for “Zone1” to produce a packet destined for “Zone2” going through “Hub”. To move a packet from one blockchain to another, a proof is posted on the receiving chain. The proof states that the sending chain published a packet for the alleged destination. For the receiving chain to check this proof, it must be able keep up with the sender’s block headers. This mechanism is similar to that used by sidechains, which requires two interacting chains to be aware of one another via a bidirectional stream of proof-of-existence datagrams (transactions).
The IBC protocol can naturally be defined using two types of transactions: an
IBCBlockCommitTxtransaction, which allows a blockchain to prove to any observer of its most recent block-hash, and an
IBCPacketTxtransaction, which allows a blockchain to prove to any observer that the given packet was indeed published by the sender’s application, via a Merkle-proof to the recent block-hash.
By splitting the IBC mechanics into two separate transactions, we allow the native fee market-mechanism of the receiving chain to determine which packets get committed (i.e. acknowledged), while allowing for complete freedom on the sending chain as to how many outbound packets are allowed.
Cosmos Whitepaper — Inter-blockchain Communication (IBC)
Cosmos allows connecting any Tendermint compatible blockchain to network, however, that does not mean that you don’t need to care about consensus and security of this blockchain. The main feature of Cosmos is a Tendermint.
Tendermint consensus allows Cosmos to be so scalable and have different validators for every chain. More about Tendermint you can see here.
So, Cosmos has another approach on how to connect blockchains with advantages — more customization and decentralization and disadvantages
Right now there are 3–4 leading new generation blockchains that are trying to solve pretty the same issue of scaling blockchain and allow to use it for millions of users at the same time.
TON is one of the most ambitious projects that is developed by a team of genius developers who also worked over Telegram messenger and vk.com. However, TON is developed without community support. Right now it is not even fully open source. There are some issues with their sharding and some other ideas that Ethereum community raise that are not answered yet.
Polkadot and Cosmos are much more open and public. Cosmos is released already. Polkadot and Cosmos already have tools that allow developing on these networks. Polkadot has Substrate framework and Cosmos has its SDK. TON is still under active development and doesn’t have anything except assembly like language and small readme to run the lite client. It is an open issue of how TON creators are planning to attract developers to Fift and their platform without any publicity and having competitors like Polkadot and Cosmos and Ethereum.
My own opinion is that TON will have some additional tools that will allow developing smart contracts much more easily that it is now on testnet with fift. TON will have the best start because of using current Telegram users it will instantly get more than 300 mln users. TON, PolkaDot and Cosmos are not competitors from a developer point of view. We just add all of them to our apps and it will be possible to use all their features together.
As BUTTON Wallet which is also based in Telegram we will support TON and will add additional features to Telegram as soon as it will be officially released. Current blockchains have pretty the same interfaces to develop your dapps. That means that developers who use Polkadot will use Cosmos and TON. Most of Dapps are currently designed to run over any or several blockchains. So, right now we need more publicity and developer tools from TON team — that helps the community to start creating dapps over it and attract users.
Our team is developing a Telegram based non-custodial crypto wallet since 2017. We believe that users will use messengers for payments much more than other apps such as simple mobile wallets. We were inspired by WeChat payments and currently are working to support not only Telegram, but Facebook messenger, Whats app and Discord.
More about us here: https://buttonwallet.com/ or try BUTTON here t.me/buttonwalletbot
Written by Nick Kozlov
CTO of BUTTON Wallet — messenger based crypto wallet in Telegram