Learn Blockchain and Smart Contract in 10 Minutes

So what is
blockchain exactly?  In general, a
blockchain implements a brand new credit system.  Another synonymous saying goes like this: the
blockchain system is a "trustless" system that implements its own
credit.  The credit system is not subject
to any laws or regulations but
implemented through machine languages. The credit is insulated from influences
from users during system runtime and cannot be damaged. With the aid of the
internet, the blockchain system can cover every corner of the world and is easy
to use.  In short, a blockchain refers to
a chain composed of blocks organized in some way.

In this text, the
blockchain technology we mentioned is actually a distributed database
technology.  In the blockchain,
information or records are stored in blocks, and chained to the next block
using cipher signatures. These blockchains have full copies on each node in the
system, and all the information is timestamped and traceable.  When the blockchain concept was initiated, it
mainly talked about the underlying implementation methods of bitcoin. So many
will interchange the concepts of bitcoin and blockchain.

After quarreling
about bitcoin development, Satoshi Nakamoto vanished from the community. No
matter who Satoshi Nakamoto was, we can stop being curious about him, because a
common saying prevails among Geeks that: 
“The code matters, no matter who wrote it. Some steal or cheat in
bitcoin transactions, and some give up on bitcoin, but the code is always
there.”  Actually, bitcoin didn't pop up
overnight. A long time ago, liberal economists Friedrich August von Hayek and
Milton Friedman once proposed to abolish central banks, adopt
de-nationalization of and promote non-sovereign currency.  In 1998 when Southeast Asia was plagued by
the financial crisis, Dai Wei expounded for the first time a new form of
currency, proposing to adopt cryptography principles to control currency
issuance and transactions, rather than relying on the central authority.  Bitcoin makes this conception true

The DACT feature of
blockchain makes blockchain-based systems much different from other systems. We
hold that systems with blockchain technology as the core have three major
features as below:  decentralization, no
management organizations needed and no third-party arbitration needed. Decentralization
of blockchain refers to the fact that the nodes on the entire system are
equivalent and every node can join or leave freely without any impact on the
entire system operation; A synonym for "no management organizations
needed" is "autonomous", that is to say, all nodes follow a rule
and reach a consensus; "No third-party arbitration needed" means all
the transactions and processes in the system observe a certain rule or contract,
and all the transactions are traceable and irreversible.  The blockchain system is global. Other than
the network connection speed it makes no difference whether nodes of the system
run on laptops on an island in the Pacific Ocean or on a server in a town in
western United States.  The underlying
blockchain system is open-source software and is open to all. Anyone can view
the code, but if they want to edit the code, they need to get the approval from
other programmers in the open-source community. 
Although the blockchain nodes are available around the world, this won't
affect its execution efficiency. Because the distributed design of the system
means applications don't need to connect to all the nodes, but to the nearest
node to get the information they need. 
To sum up, we can describe the features of blockchain with four
words:  Distributed, Autonomous, Contractual,
Trackable. In this text, we will use DACT, the initial letters of the four
words, namely Distributed, Autonomous, Contractual and Trackable, to represent
the features of blockchain technology. 
Some once mentioned that the four features of the internet are
"fairness, sharing, openness and transparency". DACT exactly
corresponds to the four features of the internet: Distributed—Sharing, Autonomous—Transparency,
Contractual—Fairness, Trackable—Openness.

The blockchain
technology is fully compliant with the internet features, and systems
implemented by the blockchain technology happen to fit with the four features
of internet. 

In the later part of this
article, we will see that after the data is stored in the blockchain system,
all transactions are traceable, full copies of timestamped transactions are
available on each node in the system and the addition of transaction
information requires consensus of the system, so the system data cannot be
tampered with.

When our applications are
based on the blockchain, we do not have to worry about data tampering, loss or
wrong transaction results, because all the operations are automatically
completed by the system. As a matter of fact, when using blockchain-based
systems, people's trust in central organizations is replaced by their trust in

Data openness does not mean
that data on blockchain-based systems is accessible to all. On the contrary,
blockchain-based systems can have the strictest permission settings. After a
protocol agreed on is written into code, the contractual feature of the system
makes encrypted data only accessible to users with appropriate permissions, and
even nodes participating in system operation cannot access the data. Therefore,
blockchain-based systems are safe.

There have been a
lot of communities and discussions about blockchain. Fundamentally, I think there are two schools
in the blockchain sector: 

(1) Blockchain
is a technology serving bitcoin or other virtual currencies.  

(2) Blockchain technology can be applied to
the financial or other fields.

There is a saying
in bitcoin circles that the rise of blockchain technology gradually
differentiates the money circle - one side is the bitcoin conservatives who
hold blockchain in detestation, and the other side is the new blockchain school
who won't take bitcoin into account.

I must choose between the two, I will join the latter. But we don't class
ourselves in the bitcoin circle, so our ideas may be more radical, thus not
necessarily accepted by mainstream blockchain communities. We are more
interested in the blockchain technology and the design philosophy behind it, as
well as its application in various fields.

We are the third school who are neutral on bitcoin but highly interested
in blockchain technology. We are the trend school and hold that the blockchain
technology will lead the wave of information technology in the decade to come.
If we can transform an industry system with the blockchain design philosophy,
we think that is the contribution of the blockchain to the industry.

Many articles about
blockchain technology mention the concept of smart contract, as if it is the
twin brother of blockchain. However, I have read the articles by Satoshi
Nakamoto a dozen of times, finding no trace of "smart contract",
"smart" or "contract", even words with similar definitions
to "smart contract".

It is
actually blockchain researchers and practitioners who associate the concepts of
blockchain technology and smart contract, because they think that blockchain
technology is the best technology to implement smart contract.

According to Wikipedia, the first person
documented to propose the word "smart contract" is a computer
scientist Nick Szabo. He intended to realize e-commerce relationships on the
internet between strangers like legal contracts.  On his own page, Nick Szabo defined smart
contract as follows:

A smart contract is
a computerized transaction protocol that executes the terms of a contract.

The objective of designing the smart contract
is: satisfy contract terms, exclude the possibility of unexpected situations,
whether malicious or unintentional, no intermediate third-party required.  Nick Szabo thinks that, through cryptology
protocol and digital safety technology, smart contract can be effectively
implemented on the internet to reduce fraud, lower arbitration costs and
transaction costs.

In his article titled
Distributing Authorities and Verifying Their Claims, he cited a sentence by the
former US president Ronald Reagan: 
“Trust but verify.”

So what is smart
contract exactly?  We can explain this
concept with share transaction as an example. 
Peter has 100 Facebook shares in his account, with each share valuing
around 100 US dollars, and Jeff has 4,000 US dollars of savings in his account.
The status of their accounts is as follows:

They signed a smart
contract: Jeff bought 40 Facebook shares from Peter at 100 US dollars per
share. So when the 4,000 US dollars is transferred from Jeff's account to
Peter's account, smart contract will find the condition met, and transfer 40
shares from Peter's account to Jeff's account. After the smart contract is
executed, their account status is like this:

The smart contract
will complete the transaction as agreed. If the smart contract does not exist,
an intermediate third party will be required for this transaction.  If we want to utilize the cryptography
principle and electronic contract to protect data from third-party tampering in
the blockchain system, it will be smart contract. Smart contract boasts a wide
use. All transactions that require authenticity identification, multiple-party
involvement, source tracing and compliance can adopt smart contract to maintain
reliability of data in the system and ensure the data is not tampered
with.  The Economic Times predicted in
2015 that ten positions may be replaced by robots in the near future, including
bank staff and intermediaries of financial transaction systems, and also
mentioned that the blockchain technology is one of the crucial technologies
that boost such replacement.

Smart contract can
be applied to a wide range of fields, including: finance, health and medicine, medicinal herbs, food,
energy, electricity, transport, real estate, agriculture, government, military.
Now you may have your own ideas about smart contract. In fact, any action that
can be achieved by code can be called a smart contract. The first implemented
smart contract on the blockchain is the action to move the bitcoin from one
account to another. 

时间: 2016-12-05

Learn Blockchain and Smart Contract in 10 Minutes的相关文章

如何编写智能合约(Smart Contract)?(II)建立加密代币

接着上一篇如何编写智能合约(Smart Contract)?,本篇文章,我们将写一个简单的加密代币的智能合约来给大家诠释加密代币的原理,当然这篇文章只是告诉你加密代币的原理,存在很多漏洞,不能直接使用. 启动testrpc 打开终端,启动testrpc,相关环境在如何编写智能合约(Smart Contract)?这篇文章里面已经有具体说明. liyuechun:~ yuechunli$ testrpc EthereumJS TestRPC v4.1.3 (ganache-core: 1.1.3)

How to Defend Against a Database Hit Attack in 10 Minutes or Less

The Alibaba Cloud Security team has detected more and more database hit attacks recently. As Big Data sees more and broader application, it would be foolish to discount the significance of these attacks. What is a database hit attack? What negative e

如何编写智能合约(Smart Contract)?(III)建立标准代币部落币「BLC」

在上一篇中,我们我们如何编写智能合约?(II) 建立简易的加密代币,但是它存在很多安全问题,在本章中,我们将一步步带领大家创建一个能够放到以太币钱包的加密代币. 创建项目 有别于之前使用truffle init指令来初始化项目,在Truffle推出Boxes功能之后,我们可以直接套用称作react-box的样板,此样板已经整合create-react-app,可以直接用它来开发react web,省下项目设置的时间. liyuechun:BloggerCoin yuechunli$ pwd /U

Beyond Bitcoins - How Blockchain Technology Can Transform Businesses

Blockchain - the technology behind the virtual currency bitcoin - might sound new to you today, but it has all the potential to transform your world once it is widely adopted.  In this blog, we will get familiar with the widely used bitcoins and bloc

Blockchain and its Impact on Various Sectors

Introduction to Blockchain Many industry experts have labeled Blockchain as the next techno-financial revolution. Don & Alex Tapscott, authors of Blockchain Revolution (2016), describe Blockchain as "an incorruptible digital ledger of economic tr

The Evolution of Blockchain Development

Introduction Blockchain is a distributed peer-to-peer network without any central control points. It uses distributed unified operation to achieve a set of tamper-resistant and trusted database technical solutions. It also features decentralized stor

First 5 Minutes Troubleshooting A Server

Back when our team was dealing with operations, optimization and scalability atour previous company, we had our fair share of troubleshooting poorly performing applications and infrastructures of various sizes, often large (think CNN or the World Ban


更多深度文章,请关注:https://yq.aliyun.com/cloud PyTorch由于使用了强大的GPU加速的Tensor计算(类似numpy)和基于tape的autograd系统的深度神经网络.这使得今年一月份被开源的PyTorch成为了深度学习领域新流行框架,许多新的论文在发表过程中都加入了大多数人不理解的PyTorch代码.这篇文章我们就来讲述一下我对PyTorch代码的理解,希望能帮助你阅读PyTorch代码.整个过程是基于贾斯汀·约翰逊的伟大教程.如果你想了解更多或者有超过1

从理想到现实, 你不知道的区块链

区块链究竟是什么? 说得笼统一点,区块链实现的是一种全新的信用系统. 另外一个同义的说法是,区块链系统是一个"Trustless"(无须信用)的系统,无须信用的系统本身就实现了自己的信用. 这个信用系统不基于任何法律法规,是用机器语言来实现的.在系统运作时,这种信用不受使用者的影响,也无法被破坏.借助互联网的传播,这个区块链系统能覆盖全球任何一个角落,并且是简单易用的. 简而言之,区块链(blockchain)说的是由区块(block)用某种方式组织起来的链条(chain). 在本文中