This article is published by netease Cloud.


(Not IT: Read the general section; IT: Read the reference block)

Author: Ren Changchang, engineer, netease Hangzhou Research Institute

preface

The rapid development of information, the Internet tuyere like entertainment, mobile Internet, weibo, live, sharing economy, short video, small procedures, VR, AR, artificial intelligence and so on all kinds of legends and bubble, bosses, have expressed their opinions and reform at the end of 2017, the stage and the emergence of a shining star, that is block chain, Compared with other Internet technologies, the threshold of blockchain is not very high. The former has excellent practitioners represented by Bitcoin, and now there is the underlying guarantee of public chains such as Ethereum. It is extremely hot, now mixed with the Internet can not say what exactly is the blockchain feel a little outdated, to speak of blockchain, first understand what is bitcoin.

The current overall architecture of blockchain is divided into these parts: data layer, network layer, consensus layer, incentive layer, contract layer and application layer. The first three layers are the underlying technology of blockchain.





Data layer: A chain structure that encapsulates the underlying data blocks, as well as asymmetric data encryption and timestamps.





Network layer: including P2P networking technology, data transmission mechanism and data verification mechanism, similar to the principle of fast broadcast.





Consensus layer: encapsulates various consensus mechanism algorithms of network nodes, which is also the core technology of blockchain. It is just like the strategy mode we adopt in development, including proof-of-work mechanism (Pow), proof-of-interest mechanism (Pos) and share authorization mechanism (DPos).





Incentive layer: incentivize the nodes in blockchain technology that comply with the rules and punish the nodes that do not.





Contract layer: encapsulates various scripts, algorithms and smart contracts. It is the basis of the programmable features of blockchain, such as an operating system, which can be programmed for various applications, such as Alipay and wechat.





Application layer: the Application layer is the terminal product that users can operate.

Basic concepts of Bitcoin

To speak of COINS, my heart is also, at the beginning I know very little about the understanding of the currency, just know is a kind of virtual currency, feel dispensable things, then I see some financial knowledge, only to find that the currency is actually with the yuan is a concept, we use the renminbi, the dollar, the euro (monetary) why can have value, but for work, That’s because it allows for the equivalent exchange of goods, which is exactly what Satoshi Nakamoto wanted when he designed the system, but his currency is decentralized, not issued by an institution.

Currency is not block chain, rather than using a block books including the currency used to record transactions information consensus (Pow) layer is work prove mechanism, when the currency trading information, Mr Into an order, the buyer with his private key to sign for this order, the nodes near the will of the order to verify whether legitimate, Notify each node through p2p network layer.





The private key takes out a string of random bytes in a cryptographically secure random source, uses THE SHA256 hash algorithm to operate on it, and generates a 256-bit number, which can be used as a private key. Said a randomly generated in hexadecimal format private key, namely: 1 e99423a4ed27608a15a2616a2b0e9e52ced330ac530edcc32c8ffc6a526aedd





The public key can be obtained from the private key by elliptic curve algorithm, which is an irreversible process. The bitcoin address generated by the public key through a one-way cryptographic hash algorithm starts with the number “1” and is the address of the payee during the transaction.

Centralization and decentralization

, the dollar, euro, the currency can also be called the legal tender, is produced by a device, such as the yuan can only by the Chinese government printing, other national and personal issue is illegal, but the currency is not the same, is everyone can production and record, this model is decentralized, is called the mining process.

At present a lot of bosses are stand up and say, decentralization, in fact, it is difficult to completely, future hardware is very difficult to support, the core of the chain block or distributed network, decentralized and distributed the biggest difference is that distributed you can know who is a decision-making node, and decentralized, you don’t know who is the node of the next make decisions.

dig

Bitcoin mining is similar to traditional mining in the broad sense of being paid for labor, and bitcoin mining is similar in that miners (everyone, as long as they have equipment) get paid in Bitcoins by downloading special software and performing calculations to generate new blocks.

  1. In the early days of mining, it was possible to use cpus. Uncle Satoshi was the first miner, and he used the CPU to mine 50 bitcoins.
  2. Early man less everybody has the right to dig, but now the currency is so hot, and the total number of COINS is fixed, the less each block is dug, could not everyone can get the mining right, this time will compete force, who in the shorter time calculation, the more you can get the mining right, is like a taxi now rob, grab a red envelope, Quick hands get the right to mine.
  3. How to improve arithmetic power? To buy professional equipment, such as mining machines, you can buy multiple sets to form a certain scale, which is called a mine. Later, the computing power of a single mine can not keep up with the needs, so the mine and mine pool are formed jointly.

Ps: At present, bitcoin mining is mainly in China. At present, one bitcoin is about $7,000, because bitcoin is becoming less and less, and more and more difficult, which wastes a lot of power and equipment loss.

Want to experience mining can go to Baidu to dig (this is not bitcoin mining, but similar), it is possible that after a day, the money earned is not enough electricity money.

What is a block

What exactly is the block that mining is generating to get bitcoin? Actually this block is the currency of the trading information, because the currency is decentralized, not someone to proceed with production, to reward the records of these transactions, so as to generate a new currency, (record) trading information between each block can form a chain structure, this structure is called block chain.

You can see from the above information block chain is characterized by safety, block of the chain structure and the encryption algorithm is the foundation of security, each block has a block on the Hash index and time stamp, when a hacker attack a single change is invalid, must change will only take effect at the same time, more than 51% of the node block chain structure USES is Angela merkel tree structure, When an order is tampered with, the hash value of its block will change, which will affect the hash value of the next block. And so on, the ID of the tampered block will change, and the block will be disconnected from the block chain, so that the block is not recognized, so as to achieve information security.

What do you think about blockchain

At present, blockchain is still in the stage of development, and the underlying technology is not perfect enough and the decentralized feature is easy to cause misoperation of data. For example, if you transfer money to someone, if the blockchain technology of Bitcoin is completely adopted, the transaction cannot be recovered if it is a wrong account. Secondly, when a large number of transactions are concurrent, such decentralized node authentication needs a large amount of bandwidth and is easy to cause network congestion, which is also the drawback of Ethereum at present.

Secondly, currently blockchain technology is mostly anonymous, which can involve money laundering, dubo, illegal fund-raising, pyramid selling and other industries, causing social supervision pressure, which is also the purpose of China’s mandatory boycott of ICOs in 2017 (not blockchain technology itself).

conclusion

Whether blockchain technology will become the next boom mainly depends on whether institutions represented by the underlying EOS public chain (Ethereum) can make some achievements in 2018, and whether many applications will build their own products on these underlying technologies by the end of 2018 and 2019. If it can be developed on a large scale, Then blockchain will gradually be recognized by the international and social people. According to incomplete statistics, the number of domestic participants in the financial circle is about 3 million, and the A-share is about 130 million. If the data is converted, it will be A global financial boom, and your partner may be from Mars, !!!!!


Understand netease Cloud:

The official website of netease Cloud is www.163yun.com/

New user package: www.163yun.com/gift

Netease Cloud community: sq.163yun.com/