Blockchain application code
Ten instry application scenarios of blockchain are listed on Oracle's website, including finance, proction, ecation, media, entertainment, government, retail business, health, medical care, supply chain, insurance and public utilities. Is it very tall? But what I want to say is that these application scenarios, in front of real high-energy blockchain applications, can only hide in the corner and shiver
now the real high-energy application scenario of blockchain is Ponzi application, commonly known as "Ponzi scheme". It is a smart contract type Qianbao, a blockchain game for rolling in and out of money, an ICO for trading, and a global pension platform P>
Ponzi scheme is one of the oldest application scenarios of our human beings. After Internet plus, the Ponzi scheme has upgraded the Internet + "Internet plus Ponzi scheme". The Internet enabled the Ponzi scheme, so there was an event similar to the 10 billion level of Qianbao. Before the Internet era, there were few Ponzi schemes on such a large scale. They were enabled through the Internet, and paid through mobile app. Finally, they rolled for several years and reached the 10 billion level
the Internet has broken the geographical restrictions, physical restrictions, capital flow restrictions and communication restrictions. As long as you have a mobile phone, you can play Qianbao app. Everyone participates in it, everyone gets into the money, and everyone gives out the money. According to the data of the people involved, it has reached the level of one million. Relatively speaking, the online pyramid scheme (Ponzi scheme 1.0), which still stays on the top of the list, has meetings every day, can't stop brainwashing, and uses violence and illegal means. It's simple and weak. With the rise of blockchain technology, the Ponzi scheme enabled by "blockchain +" can no longer be described as adding wings like a tiger. It is like a chicken changing into a tiger. Like the Internet, the "block chaining +" technology is a solid application to enhance the application scenario. Ponzi's fraud is further upgraded in the two generation of the Internet plus, because of the major improvement and improvement of the scene, turning into Ponzi scheme 3, whose characteristics are mainly in the following aspects:
1, centralization and no summit. The smart contract of blockchain runs automatically, and it does not need human intervention, nor can it be interrupted by human. Code rules are dead and cannot be tampered with. In terms of scene improvement, it solves the biggest pain point of Ponzi scheme for thousands of years, that is, the problem of head running away. Because the head is a program and code, the program of blockchain can exist forever, and no one can delete it. I think this is the biggest breakthrough. This virtual leader is always there. He can't run away, he can't run, he can't change. The rules will never change. He will stick to the Ponzi line for 100 years, 1000 years and 10000 years. It may be said that smart contracts can be iterated, and they can also be manipulated to leave a back door. Yes, but it can be done without iteration. Even if iteration is transparent and visible, it can be seen at a glance with a back door. This is the characteristic of the blockchain smart contract. If you cheat on it, you will get out a under the teacher's eyes. No one will participate in such a smart contract when it is online. Therefore, after technical review and verification, there is no backdoor, fair rules and irreversible smart contract, which can be realized by using blockchain technology. Such reliability, once verified, will never change. This is the certainty of the smart contract. A program or a character's code will not change. It will run one million times and one trillion times, and the result will be consistent and certain
2. The process was transparent. The number, address, account number, amount and time of deposit; Number, address, account number, amount and time of payment; All visible. Blockchain has a public ledger function, which can be viewed by everyone in the world, and the ledger data viewed by everyone is completely consistent. Why does Qianbao burst? Because we can't see his background account, how much money he goes in and how much money he comes out every day, and the details of each transaction. In this way, you can see the assessment of cashing ability before you pay in, and the assessment result is absolutely certain, that is, it will not change after you pay in
3. Complete anonymization. If you've ever heard of zero proof of knowledge. This part can be skipped. In short, some of the things we used to have in the mathematical knowledge base did not have application scenarios after many inventions. Later, it was found that it was easy to use these knowledge for anonymization. The cryptography technology in the blockchain can achieve identity hiding. As we all know, Zhihu can't achieve anonymity in a real sense in terms of technical structure, and blockchain can
The rules are open and fair to all. One yuan in gold, ten yuan in rebate. Everyone is the same rule. It will never change. If you pay one yuan, go to the front and pay for it, then the back will pay for it, and then pay for it. Fair, right? I have reflected on this many times, and I think it is fair5. Sustainable iteration. In the low-level Ponzi scheme, the leader, proct designer, benefit distributor and benefit receiver are often four in one, while the blockchain Ponzi scheme can completely logically separate the four roles. Achieve sustainable iteration. Through collaboration based on socialization, these projects can be iterated on forever. There are now 400 senior engineers who are developing around bitcoin and constantly updating the code. These people can not know anyone. As long as the application is valuable, they can continue to iterate. Which centralized project can be achieved? Even bat level companies can't employ so many professionals scattered around the world. This kind of social iteration is not affected by the changes of a specific person or organization
"blockchain" enabled Ponzi scheme uses different range of blockchain technology, because the technology in this field is still constantly updated, and the application of smart contract has only increased in the past two years. The earliest application of blockchain is bitcoin. Some people think that bitcoin itself has the characteristics of Ponzi scheme. In 2013, I wrote a reply and implicitly pointed out that this new type of Ponzi scheme will have great lethality, because it has the characteristics of no head, open account book, no running away, open and fair rules. Later, I also found that many people around me like Ponzi scheme much more than blockchain technology. As soon as I hear that bitcoin is not a Ponzi scheme, before I start talking about blockchain technology, I usually walk away in silence. On the contrary, you tell him it's a Ponzi scheme, and then they will ask, where can I buy it? Of course, there is a lot of controversy about whether bitcoin is a Ponzi scheme, because the practical application scenarios of bitcoin have been expanding
in the ICO boom, there are a lot of air coins, such as the bogus Ponzi scheme, which has no application scenarios. The buyers probably know that these air coins are Ponzi schemes, but they buy them because the packaging is good. It is estimated that there are hundreds or thousands of such air coins. The scope of the case is all over the world, and the amount involved is more than 10 billion. These ICOS use smart contracts for subscription and distribution, and then circulate in the secondary market by themselves. In this case, there is no guarantee that the money will be paid out, and some people will lose all their money. Many people, blockchain professionals, have always wanted to draw a clear line with these applications, because although these air coins use part of the blockchain technology, they are still a centralized organization or indivial behind them. There are few network nodes, and users directly converge to a certain organization or indivial when they are paid (so they will be swept away), but there is no doubt that, Air money still uses blockchain to make money and raise funds, which solves part of the problem of running away and improves the scope and communication ability of Ponzi scheme. This is an objective situation
and from this year, with the development of technology, the Ponzi scheme, which uses smart contracts to achieve more decentralization, began to surface. Smart contract locking is used for fund in and fund out to complete a complete closed loop of fund in, fund subscription and fund out. It can already be a very pure blockchain application. Some blockchain games can freely admit that they are a Ponzi game after their release. He said: you see, the rules are transparent, the code is visible, the gold entry contract is locked, they can't run away, no one intervenes, and the gold is automatically paid. Early play, early gain. This is a key breakthrough. It's a way to publicly admit that you are a Ponzi scheme, which can't be done by Ponzi scheme 1.0 and Ponzi scheme 2.0 before. Great. It's simple and rough
this solves the major obstacles in the promotion process of Ponzi scheme, which used to rely on brainwashing, but now it depends on code. You see, "this program doesn't run on its own. There's no back door in it, right? Is the leader gone? The capture of Nakamoto does not affect the continued implementation of the program, does it Therefore, the first batch of blockchain Ponzi scams are hooked by code farmers who can understand the code, and then these code farmers stand up again and say that after technical verification, it is really such an effect, driving other people who do not read the code to join
in addition to realizing the Ponzi scheme application scenarios of entertainment, gambling and fraud, blockchain also has the opportunity to make a big show in the Ponzi scheme application scenarios involving the national economy and the people's livelihood and public utilities, which can even greatly enhance people's sense of gain and happiness, and actually improve people's life. For example, the application of national or global public pension platform based on blockchain can solve several major drawbacks of pension: fund misappropriation. The account book is open, the funds are not centralized and locked, and no one can unlock it, except the recipients who meet the rules can pay out the money. There is no possibility of misappropriation
2. Inflation. The current pension system adjusts the coefficient every year according to a series of complex algorithms such as inflation. After adjustment, the recipients are often dissatisfied because the total amount has increased, but the purchasing power has decreased. Using the feature that virtual currency can't be issued, we can control the inflation rate and ensure that we get real money3. Unpredictable problems. It is very difficult for us to predict the pension payment after 30 years, and we can predict it in advance through smart contract. Stimulate the enthusiasm of paying
4. Policy loopholes and fairness. There will be unfairness in the diversification of groups that any pension policy faces. Everyone wants to pay less and get more, pay later and raise earlier. The transparency of blockchain is refined to each account, rather than a set of general policies to plug the loopholes in the implementation process. Everyone is the same, pay more, pay earlier, pay earlier. It can even be inherited and never lostthis has greatly reced the burden and cost of the state's pension management. What the existing pension system can do, after using the blockchain technology, can still be done, such as the state subsidies, just pay money into the contract, lock it in, there will be no fake, such as compulsory payment, and every record is real and traceable. In a word, all the existing systems and rules can be linked to the chain. On the basis of not affecting the existing effect, the efficiency and output level are improved, and fairness is guaranteed. Moreover, because the cost of the huge management system is reced, the absolute number that everyone can get may be increased by a large part. This has played a real effect on improving people's lives, and also has a positive effect
you should be talking about the technology of virtual currency. This source code is usually developed by C + +.
blockchain is an important concept of bitcoin, which is essentially a decentralized database and serves as the underlying technology of bitcoin. Blockchain is a series of data blocks generated by cryptography. Each data block contains the information of a bitcoin network transaction, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block
in a narrow sense, blockchain is a kind of chained data structure that combines data blocks in chronological order in a sequential way, and it can not be tampered with and forged by cryptography
broadly speaking, blockchain technology uses blockchain data structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses cryptography to ensure the security of data transmission and access A new distributed infrastructure and computing method for programming and operating data by using intelligent contract composed of automated script code
go language + blockchain training course:
1 What are the advantages of go
advantages of go
1: performance
2: language performance is very important
3: developer efficiency & don't be too innovative
4: concurrency & Channel
5: fast compile time
6: team building ability
7: powerful ecosystem
8: gofmt, Mandatory code format
9: grpc and protocol buffers
can be directly compiled into machine code, independent of other libraries. Glibc version has certain requirements, and deployment is completed by throwing a file
static type language has the feeling of dynamic language. Static type language can check out most hidden problems when compiling, while dynamic language has the feeling that there are many packages that can be used and the efficiency of writing is very high.
from the characteristics of the language itself, go is a very efficient language, which highly supports concurrency. Go language itself pays more attention to distributed systems, and concurrency processing is relatively good, such as advertising and search, which are high concurrency servers
go language advantages:
excellent performance, can be directly compiled into machine code, does not rely on other libraries, go is extremely fast. Its performance is similar to Java or C + +
concurrency is supported at the language level, which is the biggest feature of go. It is born to support concurrency, and go is the concurrency supported in gene, which can make full use of multi-core and make it easy to use concurrency
the built-in runtime supports garbage collection, which is one of the features of dynamic language. Although GC is not perfect at present, it is enough to cope with most of the situations we can encounter, especially GC after go1.1
it's easy to learn. The authors of go language all have the gene of C, so go naturally has the gene of C. There are 25 go keywords, but the expressive ability is very strong. It almost supports most of the features you've seen in other languages: inheritance, overloading, object, etc
rich standard libraries, go has built a large number of libraries, especially the network library, which is also my favorite part< As like as two peas, br / > built-in powerful tools, Go language is built with many tools chain, the best should be gofmt tools, automatic formatting code, make team review become so simple, code format is exactly the same, it is very difficult to think differently.
cross platform compilation and fast compilation. Compared with the sluggish compilation speed of Java and C + +, the fast compilation time of go is a major efficiency advantage
disadvantages of go language:
package management: package management of go language is absolutely not perfect. By default, it has no way to make a specific version of the dependency library, nor can it create replicable builds. In contrast, python, node and Ruby all have better package management systems. However, with the right tools, the package management of go language can also perform well
lack of development framework: go language does not have a major framework, such as Ruby's rails framework, Python's Django framework or PHP's laravel. This is a heated discussion in the go language community, because many people think that we should not start with using frameworks. This is true in many cases, but if you just want to build a simple crud API, it's much easier to use Django / djrf, rails laravel, or Phoenix
exception handling: go language can help developers deal with compilation errors by simply returning errors (or call stack) through functions and expected calling codes. Although this method is effective, it is easy to lose the scope of the error, so it is difficult to provide meaningful error information to users. Error package can solve this problem by allowing us to add context and stack trace to return error
another problem is that we may forget to handle errors. Static analysis tools such as errcheck and megacheck can avoid these errors. Although these solutions are very effective, they may not be the right way.
the second category of blockchain projects is platform. The main function of platform projects is to establish a technical platform to meet the technical requirements of various blockchain application development
in short, platform applications allow developers to directly issue digital assets and write smart contracts on the blockchain. Smart contract is a computer program running on the blockchain database, which can be executed by itself under the condition of meeting the source code setting
for example, you develop a smart contract based on the house rent protocol on the blockchain. When the owner receives the rent, it will trigger automatic execution and give the security key of the apartment to the tenant
the main function of platform blockchain projects is to establish the underlying technology platform, so that developers can do application development on the underlying technology platform. A considerable number of platforms are still in the development state. As of January 2018, Ethereum has the largest market value.