Relationship between Tendermint and MOLD

GAME
GAME
Published in
10 min readAug 9, 2018

As we reported last time, MOLD aims to realize the next-generation distributed game platform by constructing original blockchains specialized in games. In this time, we will consider Tendermint which is a blockchain with immediate finality, just a little closer to a consortium chain using PBFT like Hyperledger, and consider whether it is appropriate for our platform.

Table of contents

  • Overview
  • MOLD’s Vision
  • About Tendermint project
  • How Tendermint works
  • Handling assets
  • Tendermint’s TPS verification
  • Consideration
  • Summary

MOLD’s Vision

The view of the world we are aiming for,

  • Management of individual digital assets in non-centralized mechanism
  • Free and quick transactions of digital assets at P2P
  • An environment where game developers are more likely to enjoy more profits
    was.

I will consider whether these conditions can be realized with Tendermint.

About Tendermint project

I will explain the project of Tendermint. Tendermit is software packaging the consensus algorithm and P2P network in the blockchain. By using this, it is possible to construct a new, unique blockchain network easily and safely. In the following, we will explain its main features.

First, Tendermint has the following features.

  • With PoS consensus, the processing speed of the transaction is fast (processing speed of several thousand TPS) since the number of people who generate the block is reduced in advance,
  • Since fork does not occur, it is possible to obtain the finality immediately after generating the block.
  • 1/3 of the validation nodes are not problematic if they stop or byzantine behaviors
  • Can be implemented in public chain or private chain
  • It can be developed in any programming language
  • Componentized design and ABCI make it easy to implement blockchain with its own application layer

How Tendermit works

I will talk about how Tendermint works, how it realizes the above characteristics, although it is roughly explained.

In Tendermint, people participating in block generation are called validators.
From this validator, we select a person (Proposer) that generates a new block alternately. The proposer chosen at this time is determined in advance by Stake deterministically.
In the case of Hyperledger, it is a leader fixed system, whereas Tendermint adopts a mechanism of proposing blocks in turn, called a round robin system, as mentioned above.
If the proposer chooses a block, a person not elected as Proposer votes, and if more than 2/3 consent is obtained, it will be approved and move on to the next step.
In Tendermint, two stages of voting are performed so that blocks are not generated at the same time for the same block. We call the first vote as pre-vote and the second vote as pre-commit. Also, if 2/3 or more votes are not gathered, we will wait until the time limit is reached. Therefore, tendermit is a partial asynchronous consensus.

Also, in the process of this two-stage voting process, if enough number of votes is not obtained for the validity of that block, we will move on to the next round. In the next round, the validators doing the voting process are different, and the voting process for the failed block height is done again. (Transactions included in blocks are not necessarily the same.)

Here, the round means a series of flows from propose to pre-commit.
The flow chart can be confirmed in the following figure.

Tendrmint Official:https://tendermint.readthedocs.io/projects/tools/en/master/introduction.html

Simple comparison between MOLD and Tendermint

I believe that if it is possible to build your own Blockchain using Tendermit, we can achieve MOLD’s thought.

About Tendermint finality

In the case of MOLD, which is a game platform, high-level immediate settlement is required for practical application. In other words, it is necessary to form a consensus building algorithm that can achieve a promising prompt finality.

We also confirmed when comparing with Hyperledger, but the current Bitcoin, Ethereum etc are much lower throughput than the throughput required for social games.
Also, due to the problem of finality, the main chain may cover up until a certain period of time (until more than one block is approved) since the transaction is stored in the block.

On the other hand, tendermint can solve these two problems. As mentioned above, it provides high TPS and definitive finality.

tendermit Consensus and Dispersibility

MOLD aims to build a distributed game platform. In doing so, it is essential to create a mechanism that anyone can join MOLD ‘s network freely.
On the other hand, Tendermint can make a consortium or a public blockchain. For this reason, initially, members of the MOLD team formulate a stake token for the growth and expansion of the platform, create a consortium chain, and publish those stake tokens to the public when enough users gather I think that it is possible to create a mechanism that anyone can participate in maintaining the network.

About the definition of asset

The project called Ethermit is a tendermint-based blockchain that makes Ethereum’s EVM available using Tendermint. By using this EVM, it is possible to generate Fundible assets in quantitative terms. Also, Non-Fundible asset can be expressed.

Issuing substitutable tokens and non-substitutable tokens is a necessary concept on the MOLD platform to aim for tokenizing in-game items.

Reference: About item token of MOLD excerpt from whitepaper

There are two kinds of item tokens. It is a Fundible token and a Non-Fundible token. The former corresponds to the ERC-20 token on Ethereum, which is used for items like potions that exist in the game many times. Game items that became Fundible tokens may be replaced one by one, for example one token that Molca has and one token that Molna has are exactly equivalent. However, many games have unique in-game items with individual values, making the game space more exciting. In-game items with unique Level, attack power, skill, etc. keep their status as metadata and become Non-Fundible tokens. This corresponds to the ERC-721 token on Ethereum, and it is the only non-substitutable token in the world. At this time, one token held by Molca and one token held by Molna are not always equivalent exchangeable. For any item token, users can own them as digital assets on MOLD and transactions can be easily made by using MOLDEX etc. (see the next section). In addition, MOLD prepares SDK (see section 4.4.6) as a mechanism that game developers can easily issue both tokens.

Tendermint’s TPS verification

I will actually examine the processing speed at Tendermint here. TPS means transactions per second, and MOLD requires a certain level of speed in utilizing moldcoin as the in-game currency.

This time I used Tendermit’s benchmark tool, tm-bench.

Operating environment
In Virtual Box on Mac,

  • Main memory 512 MB
  • Number of processors 1 CPU
  • Linux / Ubuntu (64 bit)
    Tendermit Version 0.22.4-c64a 3c 74

I will quote the result below.

Measuring method

We measured the number of transactions that can be processed when thousands of transactions are generated for 10 seconds. Since this is a test this time, we use a simple key-value-store transaction.

important point

The value of TPS varies greatly depending on the PC you are using and the operating environment, so this benchmark is only one guide.

With Ubuntu machine 1

root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 594 352 876 5936
Blocks / sec 0.900 0.300 1 9
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 2000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 577 355 874 6342
Blocks / sec 0.818 0.386 1 9
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 3000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 607 343 859 6682
Blocks / sec 0.909 0.287 1 10
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 5000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 586 349 893 6443
Blocks / sec 0.909 0.287 1 10

With Ubuntu machine 2

Stats Avg StdDev Max Total
Txs / sec 150 405 1360 1504
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1500 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 43 130 433 433
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1500 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 0 0 0 0
Blocks / sec 0.000 0.000 0 0
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1500 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 51 154 513 513
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1200 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 40 119 396 396
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 45 136 452 452
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 100 302 1005 1005
Blocks / sec 0.200 0.400 1 2

With Ubuntu machine 3 units

<img title = 'chart.jpeg' src = '/ attachments / 19e5ae3f-d5c2-4e48-990b-042269f7b8e8' width = "1200" data-meta = '{"width": 1200, "height": 800}'>
Stats Avg StdDev Max Total
T xs / sec 34 104 345 345
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 89 267 889 889
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 2000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 28 83 276 276
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 36 107 358 358
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1000 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 38 115 383 383
Blocks / sec 0.200 0.400 1 2
root @ vagrant - ubuntu - trusty - 64: ~ # tm - bench - T 10 - r 1500 localhost: 26657
Stats Avg StdDev Max Total
Txs / sec 54 161 537 537
Blocks / sec 0.200 0.400 1 2

Stats Avg StdDev Max Total
Txs / sec 33 99 331 331
Blocks / sec 0.200 0.400 1 2

With Ubuntu machine 4 units

Stats          Avg       StdDev     Max     Total     
Txs/sec 34 104 345 345
Blocks/sec 0.200 0.400 1 2
root@vagrant-ubuntu-trusty-64:~# tm-bench -T 10 -r 1000 localhost:26657
Stats Avg StdDev Max Total
Txs/sec 89 267 889 889
Blocks/sec 0.200 0.400 1 2
root@vagrant-ubuntu-trusty-64:~# tm-bench -T 10 -r 1000 localhost:26657
Stats Avg StdDev Max Total
Txs/sec 36 107 358 358
Blocks/sec 0.200 0.400 1 2
root@vagrant-ubuntu-trusty-64:~# tm-bench -T 10 -r 1000 localhost:26657
Stats Avg StdDev Max Total
Txs/sec 38 115 383 383
Blocks/sec 0.200 0.400 1 2
root@vagrant-ubuntu-trusty-64:~# tm-bench -T 10 -r 1000 localhost:26657
Stats Avg StdDev Max Total
Txs/sec 64 181 607 641
Blocks/sec 0.200 0.400 1 2
root@vagrant-ubuntu-trusty-64:~# tm-bench -T 10 -r 1000 localhost:26657
Stats Avg StdDev Max Total
Txs/sec 70 170 564 700
Blocks/sec 0.200 0.400 1 2

If you illustrate these easily, it will be as follows.
However, here we created a graph easily using the highest value of TPS.

As you can see from this graph, TPS decreases exponentially as the number of nodes increases. However, although we performed experiments in a low spec environment, we found that TPS climbed to hundreds and was a better result than existing Blockchain.

Consideration

Compared to the famous blockchain’s TPS like Bitcoin and Ethereum, you can see that the transaction processing speed of Tendermint is faster.

TPS is sharply decreasing when increasing the number of nodes from one to two. This is because the time due to block propagation and consensus is significantly increased than when only one node is connected.

Also, the reason why TPS did not change much when changing the number of nodes from 3 to 4 is that Tendermint ‘s algorithm works normally if it is a byzantine obstacle less than one — third. In the case of three nodes, it is less than one third Therefore, one node will not be able to break by Byzantine, so it is necessary to take a consensus on three. on the other hand, in the case of 4 units, less than 1/3. Therefore, allow Byzantine failures of less than 1.44 units, and if you consensus on 3 nodes the block will be approved. Therefore, it can be inferred that there was not much difference in TPS between 3 and 4 machines.

Summary

As we have stated so far, tendermit is very easy to use when creating a new proprietary chain. Therefore, we felt that Tendemint is suitable as a candidate for a blockchain that can solve the problem of finality that MOLD’s thought and Ethereum do not match, the problem of TPS and express the necessary Asset in the game.
Also, I thought that Tendermint, which can use the platform expansion strategy from private to public blockchain, has merits.
Meanwhile, as Ethereum also represents Plasma, policies and projects that markedly raise TPS are born and are moving toward implementation. For that reason, our MOLD team will look at these technologies in an overview and plan to implement both, while planning to decide which chain to actually move on while looking at new arrivals in the future.

— — — — — — — — — — — — — — — -
Cosmos Gaming Hub Project(Former MOLD project)
CEO & Co-Founder

Takumi Asano

For all game enthusiasts

--

--

GAME
GAME
Editor for

Cosmos Gaming Hub is a fair and secure distributed gaming platform which supports the development of new games and simplifies the trading of digital assets.