Tải bản đầy đủ (.pdf) (63 trang)

Hướng dẫn nạp tiền vào 123doc bằng thẻ cào: https:m.facebook.comDDMsupport

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.04 MB, 63 trang )

Practical High Performance Blockchain Game Platform

Pure Distribution, Safe & Reliable
Efficient & Easy Deployment

Version 0.1.0
February, 2019


Abstract

The blockchain technology represented by Bitcoin and Ethereum is
building a brand-new, more equitable, transparent and credible Internet
world with a dramatic trend of reforming. However, there is not yet a
blockchain

consensus

mechanism

that

perfectly balances

the“decentralization, security, and scalability” (Blockchain Trilemma) at
present. In practice, it encounters different levels of technical bottlenecks.
Kaleido is born for achieving this breakthrough and bringing blockchain
technology to large-scale commercial applications.

Kaleido is positioned in the high-performance blockchain game
application platform with a core consensus mechanism based on


verifiable random algorithm - Algorand, which aims to achieve higher
degree of security, higher performance extensions of distributed
applications and higher decentralization of blockchain underlying chain,
thus providing a new technology solution for breaking through the
"impossible triangle". We designed a purely distributed blockchain game
architecture based on VRF, making a full use of blockchain open account
book, cryptography verification mechanism, P2P trusted network and
other technologies to achieve a truly decentralized application
development,

endowing

game

fairness,

transparence,


and trustworthiness. At the same time, based on the Algorand Consensus
mechanism that any node can freely enter and exit and permission
contract mechanism designed for the game contract, the game
complexity and experience can completely reach those of current
centralized server.

Through practice testing, we built a permission contract mechanism
based on system contract to effectively resist DDoS attacks. Also, users do
not have to pay the gas fee, meaning that those who do not hold the token
on chain can easily apply dApps. This innovative technology can vastly
expand the incremental users of dApps and make blockchain applications

for billion-level users truly possible.


CONTENTS

1 Background .....................................................................................................- 2 1.1 Pain Spots of Game Market ....................................................................- 2 1.2 Kaleido Solutions ...................................................................................- 6 1.3 Kaleido Design Principles...................................................................... - 11 2 Kaleido Technical Solutions ............................................................................ - 17 2.1 Kaleido Overall Collaboration Architecture ............................................. - 17 2.2 Kaleido Basic Tech Units ......................................................................... - 18 3 Consensus Mechanism Based on Algorand..................................................... - 20 3.1 Strengths of Algorand ............................................................................ - 21 3.2 Execution of Algorand ............................................................................ - 24 4 Kaleido Chain Function Expansion Scheme ..................................................... - 30 4.1 Distributed application communication scheme based on trusted P2P
network ...................................................................................................... - 30 4.1.1 Trusted P2P network communication mechanism ............................... - 32 4.1.2 Game Script Driving Framework Based on Trustworthy P2P Network - 33 4.2 Open Encrypted Account Based on Zero Knowledge Proof ...................... - 35 4.2.1 Open Encrypted Account Based on Homomorphic Encryption ........... - 35 4.2.2 Range Proof of Zero Knowledge Proof ............................................... - 36 4.3 Privilege Control Contract Mechanism Based on Smart Contract ............. - 37 5 Kaleido Token Economy Model ...................................................................... - 41 5.1 KAL Output and Distribution Mechanism ................................................ - 41 5.1.1 Initial Circulation of Genesis Block ....................................................... - 41 5.1.2. Node Mining Output............................................................................ - 45 5.2 KAL's Value in Ecology ............................................................................ - 48 6 Kaleido Application Scenario ......................................................................... - 53 7 Kaleido Annual Development Plan ................................................................. - 55 8 Conclusion..................................................................................................... - 56 -

-1-


1 Background
1.1 Pain Spots of Game Market
The Infrastructure: Main Bottleneck for Large-scale Blockchain Landing

Since the birth of Bitcoin in 2008, the blockchain, as a distributed public
accounting technology based on P2P transmission, has realized
decentralized peer-to-peer transactions in distributed systems where
nodes do not need to trust each other, thus solving the high cost, low
efficiency, insecure and untrustworthy data storage and other issues of
centralized organizations. Also, blockchain introduces value transfer
and distribution mechanisms, which kicks off the value transmission
network.

In the underlying foundation of blockchain, the public chain, Bitcoin
controls the absolute superiority of the PoW (Proof of Work) consensus
mechanism. In the past 10 years, the world's increasingly powerful
computing power has escorted the security and stability of this system,
but the trend of centralized monopoly, low performance and high
energy consumption are also not suitable for large-scale commercial use.

Based on this, the PoS (Proof of Stake) consensus mechanism is proposed
to replace

the

computational
-2-

workload

proof

with

the


economic interests of the participants, thus balancing the shortcomings
of performance, in which DPoS(Delegated Proof of Stake), represented
by EOS, tries to further improve system performance at the expense of
decentralization. However, the recent hacking incidents have exposed
the shortcomings of security.

It can be clearly seen that there is an “Blockchain Trilemma” in the
consensus mechanism of blockchain technology. At present, there is no
consensus mechanism that has already landed to balance the
relationship between performance, security and decentralization. If
blockchain technology aims to achieve large-scale commercial
application, it must meet these three requirements.


In the application progress, the dApps currently developed based on the
smart contracts of Ethereum, EOS and other public chains are mostly
games. Because the smart contract is a public ledger on the chain, the
operation of the game needs to be done on the chain. Limited by the
operational performance and cost of smart contracts, the current
blockchain game is not complex and the user experience is not good
enough. On the other hand, the operation of large games requires high
concurrency, zero delay, fluent and sensitive interaction, but the
existing performance of public chain is far from meeting this
-3-


requirement.

In addition, the existing public chain is too hard for developers to get
started. Though the cost of ETH's deployment of dApp only lies in
contract development, but ETH TPS is far from the requirement of
large-scale commercial use. EOS developers need to purchase the
underlying technical resources and bear the running costs. It is even
more difficult to develop dApps due to supporting tools, programming
languages, etc. Thus, the game types of ETH are relatively more
diversified than EOS’s, whose basically are only gambling games.
However, in view of the fact that many dApps require high TPS, most
application developers can only choose EOS, which is the least of two
evils, not the best of two options.

Existing Blockchain Game: Bad Experience for playing

On the one hand, the operation of dApp requires cumbersome steps
such as downloading a special wallet and pre-charging the

cryptocurrency, also it involves the preservation and security of the
private key. For most audiences who are not familiar with the
blockchain, the cost of marketing education is vast. On the other hand,
in games that rely on certain public chains such as
-4-


Ethereum, most of the chain interactions need to consume transaction
fees which is a high cost for players and greatly affects the experience.
To a certain extent, these have led to the current low activity of the
blockchain game dApps, the small amount of user coverage, the
difficulty of forming a scale effect, hence hinder the commercial landing
process of blockchain technology.

At present, the advantages of blockchain games are not intuitive, and
the experience is not comparable to traditional games. Only pyramid
sales mode can be spread in order to attract users which leads to a very
short game life cycle and an extremely limitation to speculative users of
the cryptocurrency, totally unable to be extended to traditional players
with a larger volume.

Traditional Games: Obvious Drawbacks for Developers and Players
Traditional games run on centralized servers which bears a high
technical safety risk. First, the games running on the centralized server
are at risk of being banned and stopped at any time. It is a high loss for
both game developers and players; Second, centralized server games
often face hackers, DDoS and other technical attacks; in addition, the
monopoly of traditional game makers is obvious, small and high-quality
game developers are difficult to guarantee their survival and benefits,
-5-



which means the risk of game development is extremely huge for them.
On the other hand, in the era of Internet games, gamers and developers
tend to stand on the opposite side. The game mechanics and numerical
algorithms in the centralized game are opaque. The ownership of virtual
assets such as equipment, skin,mounts, etc. does not belong to the user
but belongs to the game manufacturer. Real assets only flow to the
virtual assets in one direction, which leads to the closure and noncirculation of the intrinsic value of the traditional game. In addition, the
in-game economic system also has a tendency to hyperinflation due to
the continuous increase of virtual currency, therefore the interests of
players cannot be guaranteed.1

1.2 Kaleido Solutions
As far as the application scenario is concerned, the most suitable
application field for blockchain technology is native digitization, rather
than a huge connection with reality. The blockchain is more suitable
for: areas with low communication efficiency and high cost of trust;
areas that have great demand for authenticity and consensus (more
common in opaque, black box operations); areas with long tail flow,
resource dispersion, and imbalanced interests among ecological

1

References: "Huobi Blockchain Industry Special Report: Game".
-6-


participants. The digital game industry is undoubtedly an important
tipping point for the blockchain to move towards the public.

According to relevant statistics, the global game market reached
US$137.9 billion in 2018, with more than 2.3 billion gamers worldwide,
accounting for one-third of the world's total population. 2 China
accounted for more than 25% of the global game market, reaching
US$37.9 billion. The Asia Pacific gaming market is over 52%, reaching
$71.4 billion. The game audience tends to be young and acceptable for
new things, which is in line with the characteristics of the new
technology such as blockchain, and is expected to form a strong fusion
force in the future.

1.1 2018 Global Games Market

2

Source: Game Market Research Company Newzoo, "2018 Global Game Market Report".
-7-


More importantly, the transparency, fairness and credibility brought by
the blockchain game will greatly change the problem of numerical
opacity, black box operation and a series of centralized risks. Through
technology and token fuel, the interests of game manufacturers and the
players' community will be highly consistent, and players will regain a
purer game experience and the ownership of game assets, loyal players
will spontaneously maintain the balance of the game, introduce more
innovative play types and experiences, help manufacturers acquire users
and prolong the life cycle of the game. This fair and transparent
mechanism and community consensus based on co-construction and coprosperity will surely lead to the prosperity of the whole game industry.

In view of the existing problems of blockchain and the traditional game

industry, we construct a blockchain P2P technology network
architecture for the game field, which enables complex games to truly
land on the blockchain. This architecture makes full use of open and
non-tampering account technology, cryptographic authentication
mechanism, and P2P network to achieve the deployment of truly
decentralized game applications, and has excellent performance, so that
the complexity and experience of the game can reach the current level
of traditional centralized servers. At the same time, it greatly improves
the fairness, transparency and security of online games.
-8-


Kaleido solutions are as follows:
1. Kaleido introduces a brand-new consensus mechanism upgraded
from pure PoS(Proof of Stake): Algorand. This algorithm combines
the advantages of VRF and PBFT, and creates a random lottery election
method to achieve greater fairness and decentralization. It aims to build
a distributed account book with low energy consumption, high speed,
democratization, good scalability and low bifurcation rate, and solve the
"impossible triangle" problem in the existing blockchain consensus
algorithm.
Node participation does not require any permission, anyone who owns
equipment can participate in accounting as a node, and does not need
to consume too much computing resources. Under this algorithm, each
node is equal and can easily extend to millions of nodes. At present, the
existing consensus algorithm based on PBFT can only be applied to
alliance chains of dozens to hundreds of nodes. The TPS of the Kaleido
test network is currently stable at around 5000, with an average of 3
seconds to produce a block. Once the block is out, the transaction is
finally confirmed. It is expected that once the main line gets on line, the

target TPS will reach up to 10000.

2. Kaleido greatly extends the chain function and designs a new dApp
application development

mode.
-9-

Besides compatible with

the


development environment and inheriting the friendliness of Ethereum
to developers, we also extend more on-chain functions:besides
publishing accounts, we also provide the function of automatically
establishing P2P application network, which enables applications to
directly establish a trusted P2P network on the chain, and complete the
exchange and transmission of messages in this network, thus enabling
the application data between each node can be transmitted and invoked
fairly and openly, which will greatly expand the landing scenarios of
applications on chain.

3. Kaleido greatly protects the high privacy of game data by publishing
double-encrypted

accounts.

Although


blockchain

cryptography

achieves anonymity of transaction subjects, one of the major challenges
for the application of blockchain cryptography in game industry is the
privacy of transaction content (including transaction volume,
transaction time, etc.). Whether it's ETH or Bitcoin, the trading content
and account balance on the chain are open to everyone. For developers
and players in the game industry, they are more sensitive to the data
link of the game transaction and do not want the trading content to be
disclosed. Based on this, Kaleido specially designed a double-encrypted
book-keeping mechanism. By applying homomorphic encryption and
zero-knowledge proof technology to the current intelligent contract,
- 10 -


two kinds of public encrypted books were realized, one is the encrypted
token contract corresponding to ERC-20 token, the other is the
encrypted settlement book based on game application, which
guarantees the high security of system data and the protection of user
privacy.

4. Kaleido implements a system contract-based privilege contract
mechanism for game contracts. Through this privilege contract
mechanism, dApps can effectively control the access account of the
contract, thus increasing the possibility of resisting DDoS attacks. At the
same time, through this mechanism, contract accounts can be used to
pay gas fees instead of users, so that users without token on the chain
can participate in the experience of dApps, which can greatly expand

the coverage of dApp users,thus making it possible to apply the
blockchain to the general public.

1.3 Kaleido Design Principles
In order to achieve large-scale commercial applications, blockchains
must meet the high requirements of "de-centralization, security and
performance". Based on this original principle, Kaleido aims to build a
distributed trust network withhigh security, decentralization and
support for ultra-large-scale applications. The design principles are as
- 11 -


follows:

(1)Genuine Pure Distributed Network
Based on Algorand's VRF+PBFT algorithm logic, each new block is
voted by an independent committee, which is randomly drawn from all
user sets. In the election of the committee, VRF (Verifiable Random
Function) is introduced to make the election of consensus committee
and block proposer completely unpredictable, and to make each round
of consensus process executed by block proposers and committee
members different.

Each node has the right to participate in the encrypted lottery
andgenerate new blocks. The weights in the lottery are proportional to
the account balance, which is similar to PoS, but the degree ofAlgorand
decentralization is better than the current PoS mechanism in that: 1.
the token holdings only affect the probability of being selected as a
committee or block proposer,but do not determine the power of
generating new block; 2. the consensus process will draw several

proposers. The final confirmation block is selected based on Proof of
VRF, which guarantees the fairness and unpredictability of leader; 3.
Node participation does not require any permission, and anyone who
owns equipment can participate in accounting as a node.
- 12 -


After testing practice, Kaleido decentralization degree based on
Algorand is higher than any DPoS public chain and most PoS public
chains.

(2)Extremely High Security
If a system can verifiably resist Byzantine node attack, double spend
attack, witch attack, denial of service attack, then we can assure that the
security of the system is high enough.
In Kaleido network, the Pure PoS of consensus process does not
determine the probability of lottery by the value of the user's token, but
selects the winning user according to the balance of each account,
which can effectively avoid attackers forging multiple identities and
increase the probability of being selected, thus launching witch attacks;
secondly, VRF encryption lottery algorithm keeps all users’ identity
involved in the consensus in secret. Even though the identity is exposed
after voting broadcasting and the opponents can corrode them
immediately,the messages they send cannot be withdrawn, and the onetime temporary secret key used for signature will be discarded
immediately after message generation, which makes the opponent
unable to generate any legitimate messages again in this round, greatly
enhancing the randomness and unpredictability; furthermore, a block
- 13 -



notarization requires randomly selecting members of committees for
multiple rounds until consensus is reached, and replacing members of
committees for each round, which can randomly distribute rights to all
nodes in the whole network and greatly reduces the possibility of
attackers committing crimes and controlling the whole network.

In Kaleido's network, as long as the honest nodes in the whole network
have token weights greater than 2/3, the main chain can avoid the
possibility of bifurcation and double spending.

( 3 ) Low Energy Consumption, Low Bifurcation and High
Performance
The consensus mechanism used by Kaleido makes it possible that no
matter how many users there are in the system, only one out of every
1500 users will be selected by the system to perform computations for
several seconds, which does not occupy computing resources. Ordinary
personal computers can also participate in the production block.

Every time only one block with the highest priority is notarized,which
means that there will be almost no bifurcation. The generation of blocks
means the finality of transaction information. The Kaleido Consensus
protocol completes block validation every few seconds, causing very
- 14 -


low latency.
Kaleido's consensus process is based on an ultra-fast Byzantine
Agreement (BA*). The speed of encrypting random lots and the
notarization of small-scale committee members will bring high
throughput to Kaleido on the basis of ensuring network security.

At present, the Kaleido test network's output rate is 2 seconds per block,
TPS reaches about 3000, and is expected to reach about5000 after the
main line, which is enough to support the application needs of the game
market.

(4)High Privacy Protection
Despite the anonymity of the transaction subjects in Bitcoin and ETH,
the data of transaction amount, transaction time, transaction address
and so on are open in the network. Any attacker can trace and analyze
these records so as to have a great chance to crack the identity of the
transaction subjects. Game bears a high privacy requirement of the data
such as transaction amount. In terms of data storage security and privacy
protection, Kaleido implements two kinds of public encrypted accounts
by applying ZKPs and homomorphic encryption technology to smart
contracts. One is the encrypted token contract corresponding to ERC20 token, and the other is the encrypted settlement account based on
game application which hides the identity and amount of the
- 15 -


transaction, and ensures the high security and privacy protection of user
accounts.

(5)Low-threshold Development and Large-scale Landing
The ultimate goal of all the design of Kaleido public chain is landing of
large-scale commercial applications. Therefore, a series of technical
explorations and preliminary results have been achieved in three
principles: improving the performance and security of the chain,
reducing the difficulty of developing and deploying applications, and
lowering the threshold of participation of ordinary users. First, the
underlying consensus algorithm lays a solid foundation for achieving

high throughput and high security; secondly, for developers, we provide
a more complete development environment than the existing public
chain, all developers with basic programming knowledge can deploy
more personalized and diverse applications on the chain; for general
users without any blockchain foundation, participation in the use of
applications on Kaleido does not require downloading wallets, gas fees,
etc. Experience is not much different from the current App, learning
threshold is almost zero, which allows users to enjoy a fair and
transparent distributed application and to truly own game assets. The
above makes it possible to apply a blockchain technology to the ground
with tens of millions of users.
- 16 -


2 Kaleido Technical Solutions

2.1 Kaleido Overall Collaboration Architecture
Roles on chain:
⚫ Relayer, as an independent functional unit, acts as an authorization
and verification function when accessing third-party public chains
(such as BTC and USDT) and is responsible for assisting the main
chain in aligning third-party values with contracts in the main chain.
⚫ Contracts, including token contracts and game contracts, etc. Thirdparty chains can create token contracts and create game contracts
on this basis.
⚫ Miners, responsible for achieving consensus process based on
Algorand, block validation, packaging and other work on the main
chain.
⚫ Notary, as an independent functional unit, can submit signature
message data to notarize the message, drive the game contract
through notarization, and obtain notarization script from the chain

to process the user's notarization request.

⚫ Message Forwarders, which exists as an independent functional unit,
is responsible for the message transmission ofP2P game
network, random selection of game message relay by intelligent
- 17 -


routing, and verification according to users’ signature.

2.2 Kaleido Basic Tech Units

2.1 Kaleido Basic Tech Units

⚫ Side Chain: responsible for the establishment of P2P network under
the chain, the transmission of messages, providing the environment
for execution of game scripts, the API interface of P2P network and
Game SDK and corresponding functions for the transponders and
notaries.
⚫ Main Chain: Based on Algorand consensus algorithm, provides
block data storage, access interface of system contract on the chain,
access interface of contract layer, including access control of
contract on the chain, etc.
⚫ Contract Layer: Provides the execution environment of the contract

- 18 -


on the chain, reading and writing function of the game script, the
interaction between the contract and the P2P network under the

chain.

- 19 -


3 Consensus Mechanism Based on Algorand
Since the birth of Bitcoin, the scalability/ extensibility of block chains,
or the performance of block chains, has always been the bottleneck
restricting the wide-spread application of blockchain technology. All
parties in industry, University and research have done a lot of research
and exploration on consensus mechanisms, protocols and algorithms of
public chain, but there is still no good solution to solve the "Blockchain
Trilemma".

PoW mechanism requires high energy consumption and low
performance; PoS

mechanism

sacrifices a certain degree

of

decentralization; Hash diagram and DAG solves the consistency rather
than accuracy; PBFT is too centralized. These consensus mechanisms
strengthen two of the three factors from the triangle,remaining difficult
to get the optimal solution from the overall situation.

In Kaleido, we adopt a new consensus mechanism, Algorand. It was first
proposed by Silvio Macali, a Turing Award winner and computer

professor at MIT. It is a fast Byzantine agreement protocol with leader
election based on random lottery elections,improved based on Pure
Proof of Stake and practical Byzantine, which not only solves the

- 20 -


problem of Byzantine algorithm centralization, but also supports the
real Internet environment. It can reach a consensus safely and
efficiently

in

the

asynchronous

and

untrustworthy

network

environment, thus truly realizing a pure distributed consensus network.

In addition, we use Super-Fast and Partition Resilient Byzantine
Agreement `Algorand Agreement' to replace the original Proof of Work
(PoW) consensus algorithm `ethash'. In addition, we independently
construct a block consensus acceleration network, greatly improving
overall performance of the chain.


3.1 Strengths of Algorand
After practical testing, Algorand consensus mechanism has the
following strengths: Algorand is the best solution to the "Blockchain
Trilemma" in the existing consensus mechanism. While guaranteeing
decentralization and security, Algorand gives the whole network a
powerful scalability, which greatly expands the application scope of
blockchain. dApp developers can focus on the development and
deployment of application on the chain and better Improve the use
experience.

As for the degree of decentralization, Algorand randomizes the
- 21 -


elections of the proposer, the voter and verifier of the election
committee by VRF (Verifiable Random Function). It uses the linear
superposition of binomial distribution to ensure fairness. This design
enables any networked device, including small nodes and retail users,
to participate in consensus account keeping. Each round of blocks is
elected by a new independent committee, that is, each round of block
proposers, voters and verifiers are drawn with VRF encryption, which
increases randomness and unpredictability. Under the fault-tolerant
property of any partition, even if malicious nodes manipulate the
network, partition it and maintain it for any long time, the protocol can
still ensure security, that is, the consensus results of all honest nodes are
still consistent, and the consensus results will not be affected by
malicious nodes.

In terms of security, the design of committee alternation ensures the

security of the system to a certain extent; in addition, all users
participating in consensus voting know their identity secretly, even if
the broadcast reveals their identity after voting, the message cannot be
withdrawn and the temporary secret key is discarded immediately, so
the attacker cannot corrode anymore;Pure PoS mechanism does not
measure the weight of lotter by token value but by account balance,
which can effectively avoid witch attacks. As long as the total weight of
- 22 -


×