“This is the 23rd day of my participation in the November Gwen Challenge. See details of the event: The Last Gwen Challenge 2021”.

In recent years, “blockchain” has once again become a hot topic of discussion. “Take blockchain as an important breakthrough in independent innovation of core technology” and “accelerate the innovation and development of blockchain technology and industry”, all of a sudden, blockchain has become a hot peak. Nowadays, “blockchain” is coming into the public horizon, becoming the focus of financial, economic and social concerns. As an Internet practitioner, what do I need to pay attention to and learn from this innovation draught?

Here’s what you’ll learn in this article:

What is blockchain the principle of blockchain features of blockchain application scenarios of blockchain development language and framework suitable for people: readers interested in blockchain

1. What is blockchain

Blockchain is an emerging trading service platformCopy the code

On Wikipedia, blockchain is likened to a distributed database technology that maintains an ever-growing, immutable record of data by maintaining a chain structure of blocks. According to Baidu Baike, blockchain is a new application mode of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain is an important concept of Bitcoin. In essence, it is a decentralized database. At the same time, as the underlying technology of Bitcoin, it is a string of data blocks associated with the use of cryptography. Used to verify the validity of its information (anti-counterfeiting) and generate the next block [1].

To put it simply, the concept of blockchain can be understood at both narrow and broad levels. In a narrow sense, blockchain is a chain-type data structure with block as the basic unit, in which digital summaries are used to verify previous transaction history, which is suitable for tamper-proof and scalability requirements in distributed accounting scenarios. In a broad sense, blockchain also refers to distributed accounting technology based on blockchain structure, including distributed consensus, privacy and security protection, point-to-point communication technology, network protocol, smart contract, etc.

Whether Blockchain can change the way we solve problems remains to be seen.Copy the code

2. The development of blockchain

"Over the past 20 years, the Internet has enabled individuals and organizations to conduct business and social activities more effectively. Yet the basic pattern of how individuals and organizations transact with each other has not changed. Blockchain can bring more openness and efficiency to those processes, as we have come to expect in the Internet age." -- Arvind Krishna, Senior VP, IBM ResearchCopy the code

Understanding the past is to better control the future, so how is the development course of blockchain in the past and present life?

  • On Oct. 31, 2008, Nakamoto sent an email to all members of A cryptography mailing list titled “Bitcoin:A peer-to-peer Electronic Cash System.”

  • On November 16, 2008, Satoshi Nakamoto published the source code of the Bitcoin system.

  • On Jan. 3, 2009, from his server in Helsinki, Finland, Mr. Nakamoto created the first Bitcoin block on the Internet, the so-called Genesis Block. After that, Satoshi and several developers discussed ideas online and continued to iterate. As the bitcoin network matured, his activities began to decline, and the system gradually moved into a state of autonomous operation.

  • In July 2010, when the first Bitcoin platform was launched, new users exploded and prices skyrocketed.

  • After November 2011, Satoshi Nakamoto no longer appeared. He became an anonymous legend, no one knew who he was, he only left his own creation.

  • Bitcoin hit $1 for the first time in February 2011 and has since opened exchanges with the British pound, the Brazilian real and the Polish Zloti exchange.

  • In 2012, Ripple was launched as a digital currency that uses blockchain to transfer foreign exchange between countries.

  • In 2013, bitcoin skyrocketed. The US Treasury Department has issued personal regulations on virtual currency, clarifying the definition of virtual currency for the first time.

  • In 2014, “blockchain 2.0” became a term for a decentralized blockchain database. For this second-generation programmable blockchain, economists see it as a programming language that allows users to write more sophisticated and intelligent protocols.

  • Nasdaq made its first use of blockchain technology among individual stock traders in December 2015, when its partner Chain.com first used Nasdaq’s blockchain-based trading platform Linq, which it developed in partnership with Chain.com, in an offering to a private investor.

  • On January 20, 2016, the People’s Bank of China digital Currency Seminar announced that the research on digital currency has achieved phased results. The meeting affirmed the value of digital currencies in reducing the issuance of traditional currencies, and said the central bank is exploring the issuance of digital currencies.

  • On December 20, 2016, digital Currency Alliance — China FinTech Digital Currency Alliance and FinTech Research Institute were officially established.

Now block chain technology may bring about the second revolution of the Internet, bringing the Internet from the “information Internet” to the “value Internet”. By contrast, the Internet, initially aptly called the “information superhighway”, deals with “information”, while blockchain can deal with “value”.

Change is coming. The future is here. Once again, we are at the beginning of a revolution — the transformation of the Value Internet, and to understand the future of the value Internet, we need to understand what blockchain technology is.

Blockchain is perhaps the most promising and divisive technological and economic trend of the moment. It brings to the digital world two new basic functions of "value representation" and "value transfer". Its potential is emerging, but at the moment it is in a phase of hazy and savage growth.Copy the code

3. Principle and characteristics

Blockchain technology has great potential to transform multi-party business networks, thereby significantly reducing costs and risks, and innovating business models.Copy the code

3.1 Basic Concepts

To get a general idea of blockchain, we can start with the following concepts:

  • Transaction: an operation on an account resulting in a change in its status, such as the addition of a transfer record;

  • Block: records all transactions and status results within a period of time, which is a consensus on the current account state.

  • Chain: A series of blocks in the order in which they occur, which is a log of changes in the state of the entire ledger. If the blockchain system is treated as a state machine, each transaction means a state change; The generated block is the consensus of the participants on the result of the state change caused by the transaction in it.

  • Mining refers to the process of forming new blocks through calculation. It is a process in which supporters of transactions use their own computer hardware to do mathematical calculations for the network to confirm transactions and improve security. Take Bitcoin, for example: Proponents of the transaction (miners) run bitcoin software on their computers to continuously calculate the complex cryptographic questions provided by the software to ensure the transaction takes place. As a reward for their services, miners receive fees included in the transactions they confirm, as well as newly created Bitcoins.

  • Peer-to-peer Network refers to a system that allows a single node to interact directly with other nodes so that the entire system acts as an organized collective. Take Bitcoin: the network is built in such a way that each user is broadcasting the transactions of other users. And, importantly, there is no need for banks or other financial institutions to act as third parties.

  • Hash is a classic technique in cryptography, in which an input string of arbitrary length is converted to a fixed-length output consisting of letters and numbers by the Hash algorithm.

  • Digital Signature is a mathematical mechanism that allows a person to prove ownership.

  • A Private Key is a block of secret data that certifies your right to spend electronic money from a particular wallet, and is digitally signed.

  • Double spending refers to users’ attempts to illegally pay electronic money to two different payees at the same time, which is one of the biggest risks of electronic money.

3.2 Basic Principles

The goal of blockchain is to implement a distributed ledger of data records that allows only addition, not deletion. The basic structure of the underlying ledger is a linear linked list. A linked list consists of a series of “blocks” in which the Hash value of the preceding block is recorded. Whether a block (and the transactions within it) is legitimate can be quickly checked by calculating a hash value. Nodes in the network can propose to add a new block, but the block must be confirmed by consensus mechanism. The following figure shows the problems of the consumption system based on third-party institutions, which is also the background of the establishment of Bitcoin.How does blockchain technology work? The following describes the principle of blockchain with the transaction and circulation process of Bitcoin.As the basic technology of Bitcoin, blockchain technology is highly transparent, decentralized, trustless, immutable and anonymous. These characteristics reflect the concept of distributed autonomy, and gradually attracted the attention of financial institutions with innovative consciousness.A Distributed Autonomous Corporation (DAC) is an organization that operates autonomously without intervention and management through a series of open and fair rules.These rules tend to come in the form of open source software, where everyone can pay in varying forms, share in the benefits, and participate in the growth of the system. For example, Bitcoin, Nasdaq’s new platform, and other applications are typical Dacs.

3.3 Basic Features

1. Decentralization

Decentralization is the most basic feature of blockchain, which no longer depends on the centralized organization and realizes the distributed recording, storage and updating of data. All nodes in the blockchain network have the right of accounting, which can avoid the disadvantages of centralized operation.

In daily life, such as taobao shopping, your money is actually managed and stored by institutions like Alipay. Subtract from our account balance when we transfer money or spend it, and add when we receive it. Your personal information is also in the data of Alipay, which is centralized and centered around the third party.

However, if the server of Alipay is damaged or attacked and the data is lost, our records will be destroyed, and the transaction cannot be queried, or the transaction will be blocked or frozen at any time in a special period, or the funds saved in Alipay cannot be recovered due to the data destruction caused by natural disasters. Or another common problem: the disclosure of personal information. That’s the downside of centralization.

But the transaction model supported by blockchain technology is different, allowing buyers and sellers to trade directly without using any third-party payment platforms and without worrying about other information about themselves. The decentralized processing method is more simple and convenient. When there is too much centralized transaction data, the decentralized processing method will save a lot of resources, simplify the whole transaction autonomy, and eliminate the risk of centralized control.

2. Global circulation

Blockchain assets are first and foremost based on the Internet. As long as there is an Internet, blockchain assets can be transferred and circulated. Compared to the centralized method, the transaction fee of blockchain assets circulating around the world is very low, such as the transaction fee of 0.0001BTC in the early stage of Bitcoin transfer, and the blockchain assets are also very fast compared to the traditional transfer. It usually takes a few minutes to an hour to arrive.

Anonymity is one of the most fundamental features of Bitcoin. Blockchain anonymity is based on algorithms that allow transactions to be addressed by address rather than by personally identifiable information. The anonymity of blockchain means that others cannot know how much of your blockchain assets are, with whom you transfer money, etc. In this way, on the blockchain network, you can only find the money transfer records, but you don’t know who is behind the address, but once you know who is behind the address, you can also find all the relevant money transfer records and assets.

4. Transparency

The blockchain system is open and transparent. In addition to the encryption of the private information of the parties to the transaction, the data is transparent to the nodes of the whole network, that is, anyone or participating nodes can query the blockchain data records or develop relevant applications through the open interface, which is also the basis of the trust of the blockchain system. Blockchain data records and operating rules can be reviewed and traced by the entire network of nodes, with high transparency.

5. Do not tamper with

Once the information in a blockchain system has been validated and added to the blockchain, it is permanently stored and cannot be changed (except for systems such as private blockchains with special change requirements). Changes to the database on a single node are invalid unless more than 51% of the nodes in the system can be controlled simultaneously, thus the data stability and reliability of blockchain are extremely high. The unidirectivity of hash algorithm is one of the basic technologies to ensure the imtamability of blockchain network.

6. Traceability

Its mechanism is to set the following block has the hash value of the previous block, just like the hook, only identify the hash value of the previous can be hung, so as to form a complete traceable chain. Another nice feature of traceability is that it is easy to query the data because the block is uniquely identified. For example, if you want to query a record in the database, there are many algorithms to search for blocks, but in the blockchain, it is more convenient to define the time node to find the block of the time period to address.

7. Autonomy

Blockchain uses consensual norms and protocols (such as a set of open and transparent algorithms) to enable all nodes in the system to freely and securely exchange data in a trustless environment, so that trust in “people” is replaced by trust in machines, and any human intervention does not work.

Blockchain shared ledger technology realizes disintermediation in bilateral transactions involving multiple parties in a distributed environment. The net record of shared account book is traceable and tamper-proof. In order to ensure safety, improve efficiency, reduce costs.

4. Application scenarios

Blockchain is divided into public and federated chains. For enterprise-level business applications, federated chain is a more appropriate choice.Copy the code

Blockchain is a distributed ledger (database) technology that orderly connects data blocks and cryptographically ensures that they cannot be tampered with or forged. In popular terms, blockchain technology can make all data information in the system transparent, untamper with, unforged and traceable without the endorsement of a third party. As a kind of underlying protocol or technical solution, blockchain can effectively solve the problem of trust and realize the free transfer of value. It has broad prospects in the fields of digital currency, transaction settlement of financial assets, digital government affairs, storage and anti-counterfeit data services.

1. Digital currency

After experiencing physical objects, precious metals, banknotes and other forms, digital currency has become the development direction of the digital economy era. Compared with physical money, digital money has the characteristics of easy portability and storage, low circulation cost, convenient use, easy anti-counterfeiting and management, breaking geographical restrictions, better integration of resources and so on.

Bitcoin is technically an electronic cash system that allows both parties to transfer money directly to each other without the need for third-party transfers or arbitration. In June 2019, Internet giant Facebook released a white paper on its cryptocurrency, Libra. The underlying technology behind both Bitcoin and Libra is blockchain.

China started the development of central bank digital currency as early as 2014. China’s digital currency DC/EP adopts a two-tier operation system: the central bank does not directly issue digital currency to the public, but transfers the digital currency to commercial banks or other legal operating institutions, which then exchanges the digital currency to the public for use. In early August 2019, the People’s Bank of China held a working video conference for the second half of the year, which called for accelerating the development of national legal digital currency. 2. Settlement of financial asset transactions

Blockchain technology has financial attributes naturally, and it is bringing about disruptive changes to the financial industry. In terms of payment and settlement, under the blockchain distributed ledger system, multiple market participants jointly maintain and synchronize a “general ledger” in real time. In just a few minutes, the payment, clearing and settlement tasks that can only be completed in two or three days now can be completed, reducing the complexity and cost of cross-border transactions. At the same time, the underlying encryption technology of blockchain ensures that participants cannot tamper with the ledger, ensuring that transaction records are transparent and safe, and regulators can easily track the on-chain transactions and quickly locate the flow of high-risk funds.

In trading securities issue, the traditional stock issuance process, high cost and long link complex, block chain technology can weaken the underwriting institutions function, help the parties to build fast interactive information sharing channel, the issuer through intelligent contracts issued independently handle, unified regulatory review check, investors can also bypass intermediaries for direct operation. In terms of digital bills and supply chain finance, blockchain technology can effectively solve the financing difficulties of smes. The current supply chain finance is difficult to benefit smes upstream of the industrial chain, because they often do not have direct trade with core enterprises, and it is difficult for financial institutions to assess their credit qualifications. Based on blockchain technology, an alliance chain network can be established, covering core enterprises, upstream and downstream suppliers, financial institutions, etc. Core enterprises issue receivables certificates to their suppliers, and the bills can be transferred between suppliers after digital chain, and each level of suppliers can realize the corresponding amount of financing by digital certificate.

3. Digital government

Blockchain can make data run and streamline things a lot. With the distributed technology of blockchain, government departments can be centralized on one chain, and all the procedures can be delivered to the smart contract. As long as the clerks pass the identity authentication and electronic signature in one department, the smart contract can be automatically processed and transferred, and all subsequent approvals and signatures can be completed sequentially.

Blockchain invoice is the earliest application of blockchain technology in China. Tax authorities launched block chain electronic invoice “tax” chain platform, the tax authorities, make out an invoice square, get tickets through a unique digital identity to join the “tax” chain network, realize “trading is make out an invoice” “make out an invoice reimbursement” levels – seconds, minutes of make out an invoice for reimbursement billing sharply reduces the tax collection and administration cost, effectively solve the data tampering, one vote overstating, tax evasion and other issues.

Poverty alleviation is another application of blockchain technology. With the openness, transparency, traceability and non-tampering features of blockchain technology, poverty alleviation funds can be used transparently, delivered accurately and managed efficiently.

4. Storage and anti-counterfeiting

Block chain can prove the existence of a document or digital content at a specific time by hashing time stamps. In addition, its characteristics of openness, untampering and traceability provide a perfect solution for judicial authentication, identity proof, property rights protection and anti-counterfeiting traceability.

In the field of intellectual property rights, text, pictures, audio and video rights can be confirmed through digital signature and on-chain storage of blockchain technology, and transactions can be created and executed through smart contracts, enabling creators to regain pricing power, real-time data preservation to form evidence chains, and at the same time covering three scenarios of confirmation of rights, transactions and rights protection. In the field of anti-counterfeiting and traceability, supply chain tracking block chain technology can be widely used in food and medicine, agricultural products, wine, luxury goods and other fields.

Data services

Blockchain technology will greatly optimize existing big data applications and play a huge role in data circulation and sharing. In the future, the Internet, artificial intelligence and the Internet of Things will generate massive data, and the existing centralized data storage (computing mode) will face great challenges. Edge storage (computing) based on blockchain technology is expected to become the future solution.

Moreover, the immutable and traceable mechanism of blockchain ensures the authenticity and high quality of data, which has become the foundation of all data applications such as big data, deep learning and artificial intelligence. Finally, blockchain can realize multi-party collaborative data calculation on the premise of protecting data privacy, which is expected to solve the problem of “data monopoly” and “data island” and realize the value of data circulation.

In view of the current stage of blockchain development, many traditional cloud service providers have started to deploy their own BaaS (” blockchain as a service “) solutions in order to meet the needs of general business users for blockchain development and application. The combination of blockchain and cloud computing will effectively reduce the cost of enterprise blockchain deployment and promote the implementation of blockchain application scenarios. In the future, blockchain technology will play an important role in philanthropy, insurance, energy, logistics, Internet of things and many other fields.

The difficulty and breakthrough of blockchain technology lies in how to creatively apply it to all walks of life and serve the economic and social development.Copy the code

5. Blockchain development language

5.1 Common Development languages

Privacy and secrecy are both important: no one’s ID and behavior pattern on the Blockchain network should be figured out by unauthorized people studying account books. Any business logic and transaction parameters on the network should also be inaccessible to anyone other than the custodian.

1.JAVA Development Language (Mirae Coin)

Definition :Java is an object-oriented programming language, not only absorbs the advantages of c++ language, but also abandonsthe difficulties of understanding multiple inheritance in c++, Pointers, etc., so the Java language has two features that are powerful and easy to use. As a representative of static object-oriented programming languages, the Java language perfectly implements object-oriented theory, allowing programmers to do complex programming with elegant thinking.

Java is characterized by simplicity, object-oriented, distributed, robust, secure, platform independence and portability, multithreading, and dynamic. Java can be used to write desktop applications, Web applications, distributed systems, and embedded system applications.

2.C++ development language (bitcoin, justice, ripple)

Definition: C ++ is the inheritance of C language, it can be C programming process, can also be abstract data type, as a feature of object-oriented programming, can also bear the inheritance and polymorphism of object-oriented programming. C++ is good at object-oriented programming, and it can also do process-based programming, so c++ is the size of the problem.

3.GO development language (Ethereum, IBM)

Definition :Go is a new, parallel, garbage-collected, fast-compiled language. It has the following characteristics:

It can compile a large Go program on a computer in seconds. Go provides a software build model that makes dependency analysis easier and avoids most C-style starts, including files and libraries. Go is a statically typed language with no hierarchy in its type system. As a result, users don’t have to spend time defining relationships between types, making them more lightweight than typical object-oriented languages. Go is a complete garbage collection language that provides basic support for concurrent execution and communication. According to its design, it provides a method to build system software on multi-core machine.

Go is a compiled language that combines the flexibility of an interpreted language with the development efficiency of a dynamically typed language and the security of static typing. It is also intended to be a modern language that supports networking and multicore computing. To achieve these goals, some language issues need to be addressed: an expressive but lightweight type system, concurrency and garbage collection mechanisms, strict dependency rules, and so on. These cannot be solved by libraries or tools, so create.

4.Solidity Development Language (Ethereum)

Definition :Solidity is a high-level language for smart contracts running on the Ethereum Virtual Machine (EVM). Its syntax is close to Javascript and it is an object-oriented language. But when it comes to the web as a real thing, it’s very different.

5.2 Development Framework

What framework is used to develop blockchain? To adapt to the needs of different scenarios as the goal, block chain applied in the actual use process will need to be modified for many times, always to meet the needs of a particular business, then to customize special block chain system architecture, using these frameworks can easily customize a suitable for their own business requirements of block chain system.

1. Bitcoin architecture

As the originator of blockchain, Bitcoin has weightless influence in the blockchain family. It has the following characteristics:

The ability to sell money without a central authority; The ability to pay without intermediaries; Maintain user anonymity; The transaction cannot be reversed.

2. Ethereum architecture

Ethereum aims to provide a blockchain with a Turing-complete language that can create contracts to write arbitrary state transitions. By simply implementing the logic with a few lines of code, users can create a blockchain-based application and apply it to scenarios other than currency. Ethereum has several design goals beyond the functions of Bitcoin:

Turing’s complete contract language; Built-in persistent state storage.

3. The Fabric structure

Fabric is a blockchain framework led by IBM and DAH and is a member of the Superledger project. It has similar functions to Ethereum and is also a distributed smart contract platform. But unlike Ethereum and Bitcoin, it was a framework from the start, not a public chain, and had no built-in tokens.

As a blockchain framework, Fabric adopts a loosely-coupled design, modularizing components such as consensus mechanisms and authentication, making it easy to select modules based on application scenarios. Fabric also uses container technology to run Chaincode in Docker, allowing smart contracts to be written in almost any high-level language.

Here are some of the design goals of Fabric: modular design, component replaceable; Smart contracts running on Docker;

4. Onchain DNA structure

Onchain Distributed Network Architecture (Onchain DNA) supports different application types and scenarios, such as public chain, alliance chain, and private chain, and quickly integrates with service systems.

The Onchain DNA is designed with the following key goals: underlying support for multiple digital assets; Turing-complete smart contracts and persistent states; Cross-chain interoperability; Finality of transaction.

5. Corda architecture

Developed by Java and Kotlin, Corda relies heavily on Java for its various functions, such as smart contracts, data access interfaces, and more. The key to Corda’s design goals: no global ledger; The problem of multiple payments for transactions is solved by Notaries; Only the participants and notary can see the transaction. Therefore, all Corda transactions are not broadcast to the whole network, and all nodes communicate directly without P2P network. As a result, the scale of its network is limited to a small scale, and large-scale alliance chains cannot be formed. The applicable business scenarios are relatively narrow.

The business value of blockchain technology lies in improving process transparency, data reliability, cost reduction and efficiency.

6. Reference

Blockchain Baidu Encyclopedia baike.baidu.com/item/%E5%8C… What is blockchain? Super detailed, read without learning! C.biancheng.net/view/1884.h… The five application scenario of block chain technology www.qstheory.cn/llwx/2019-1… Block chain seven scenarios blog.csdn.net/u010199413/… The five characteristics of block chain www.jianshu.com/p/67cf0855f… Block chain of six characteristics of www.jianshu.com/p/2533090b1… Quickly understand principle of COINS/block chain blog.csdn.net/dog250/arti… The principle and application of block chain: origin, blog.csdn.net/jasonwang19… Block chain technology specific need what development language, www.toutiao.com/a6527824301… What framework is used to develop blockchain? www.sohu.com/a/283233206… Block chain technology (Blockchain) profile static.runoob.com/download/ib…