What is the block chain principle? How to develop block chain program

Source: Internet
Author: User
Tags class definition function definition
The block chain can be understood as a distributed database, read data, and store data. Features are: durability, robustness, transparency, not destructive. At this time there are alumni asked: "Teacher, other people said that the block chain is a distributed ledger, there is an incentive mechanism, can be dug to get rewards, how different." ", the question is very good schoolmate, said also to, but has the limitation, is consistent for the bitcoin, but the bit currency that is the block chain 1.0 times, takes the digital currency as the main application, may understand for the distributed ledger, each 10 minutes out one block then rewards some bitcoin. But this is only one of the block chain application, and in the Block Chain 3.0 Super Ledger There is no incentive mechanism, and not just bookkeeping, there are pictures, videos, text and so on, so the block chain understanding as a distributed database more accurate. Another classmate asked: "Block chain 1.0 is bitcoin, 3.0 is the super ledger, that 2.0 is what." ", good problem, very serious, is to do so, through the problem to drive learning, block chain 2.0 is intelligent contract, is now more mainstream, like a period of time to raise a pet what is intelligent contract, now basically said block chain procedures, refers to the intelligent contract." These will be covered in a later column. Here we look at the characteristics of the block chain.

Durability: Bitcoin has been running for 9 years, and no big problems have occurred. And it is automatic operation, the source code we can see, as long as there are nodes in, it can always run, even if an earthquake, volcanic eruption will not affect the cost of the cloud server, do not need operations, can be sustained over the long term.
Robustness: It will be easier to understand with the familiar word "going central", but what is the nature of it. You can think about it, in Zimbabwe, for example, inflation causes a devaluation of the currency because the Zimbabwean government has an excess of currency, because the government can control the issue of currency as a monetary centre, so that the stability of the currency is in the hands of the government, and the centrality is to remove the center of the currency, No single individual can affect the entire market.
Transparency: Suggest you can go to bitcoin official website: https://bitcoin.org/zh_CN/choose-your-wallet, download a wallet and then see all the data, from the birth of Bitcoin to the present, the following figure is the Ben Cong in the first Genesis block written in the information, EThe T IMEs 03/jan/2009 Chancellor on B rink of second b ailout for banks. Yes, it's transparent enough for anyone to see.

Not to be destructive: this can be understood as not tamper, because each block contains two hash value, one is the hash value of the last block, the other is the hash value of the current block, as long as the hash value of any content changes, the hash value will change, such as now has 100 blocks, Someone changed the 53rd, then 54 to 100 of the block will also follow the change, that is, 54 to 100 of the block owners to make changes, and must be more than 50% of the block owner's consent, you will change the information in sync.

How to develop block chain program: Now said block chain program is basically refers to intelligent contract, development language is solidity, intelligent contract can be understood as in the block chain deployment with solidity written application, as for solidity this development language learning is also easy, need to master it: Variable type, definition, use function definition, pass parameter, return parameters Process Control loop initialization, constructor lifecycle class definition, inheritance solidity is need to compile, understand these basic can start to write the first intelligent contract, other characteristics and so on the practice process naturally learned.

Summary: The characteristics of the block chain are introduced: durability, robustness, transparency, not destructive smart Contract development language: Solidity block chain of three times: Bitcoin 1.0, Ethernet Square 2.0, Super Ledger 3.0 Internet era everyone may be 996, morning 9 work until 9 o'clock in the evening, a week to work 6 days. Block chain era is 8247, the morning 8 work until 24 o'clock in the evening, a week to work 7 days.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.