You’ve heard about blockchain
Have you heard of blockchain? Ever read about blockchain? Have you ever developed blockchain? Of course, none of this matters. The important thing is, from now on, you are about to learn about “blockchain”. Blockchain includes “mathematics, cryptography, P2P communication, smart contracts, distributed storage and consensus algorithms” and other knowledge. It is a combination of many technologies.
What is blockchain? What problem does blockchain solve?
New Year’s money?
When I was a child, I loved Chinese New Year most. We all had lucky money to visit relatives and friends, and we were always so polite.
But happy time is always short, at home, my mother always said: “I will give you the red envelope, you need to use the time to give you ah.” Of course, for many years, I have not seen their New Year’s money.
When I was young, “my parents were people we trusted.” Everything is decided by parents. The specific amount, use date and use method of New Year’s money seem to have nothing to do with us. It is all carried out in the rules specified by parents. In a nutshell, this is “centralized” operations. “The center can change our data at will, change the rules, we are all the screws running under the center.”
Just like now our money is in the bank, because behind the bank is the country, we trust the country, so we put our money in the bank. “A bank is a centralized institution that carries out relevant policies and conducts macro-control of the economy.”
Next, let’s look at “What is blockchain and what problem does it solve?”
Or receive lucky money.
“But after a few years I’m smart. Don’t believe mom takes care of the money to me, every time to get the money, I can take a small notebook, who gave me lucky money, specific amount with all of the time; and tell father, brother, sister, grandma and grandpa, extended/priest, they all like me, a record of who give me money, specific amount with time and so on.” One day, I had a crush on a little girl named LL. I asked my mother for 100 yuan to buy a present for the girl. Mother a listen? Good boy, young age, the idea is so transparent, decisive refuse, say my lucky money only 10 dollars !!!! My mother also took out her little book. There was only ten dollars in it.
9 dragon is extremely calm, beyond the composure of his peers, incarnated as Sherlock Holmes – Dragon. Slowly took out my little book, above the clear record of my every stroke of lucky money (record which relatives gave me, the specific amount is how much). The mother smiled happily, displaying her son’s genius of grandiosity. Soon, her reason overcomes, say I record false account !!!! It reminded me of the question I often asked as a child: “Mom, where did I come from?”
I smiled, and then in the “love each other family” group to everyone said, “please bring my New Year’s money small notebook, to my living room.” Everyone loves me. They’ll be here soon. “The elders of the little book are recording every sum of my lucky money, and with my little book record exactly the same”, that scene, extremely embarrassing ah. “My mother immediately gave me 100 yuan from the bag, at this time, I and every elder are in their own little book to write down: mother… year… month… day gave 9 dragons 100 yuan.” 9 The dragon takes the money and hops to the shop.
That’s amazing. That’s amazing. Let’s look at the key to this. “Everyone in my family helps me record the origin of every lucky money: who gave it to me, when, and the exact amount.” This is the “decentralization”, “everyone is helping me record, record my every entry and out of the account, who modified their own small book, we can find everyone to check everyone’s small book, you can know who is wrong on the account book, and most people’s account book is the same.”
“In fact, this is the core of blockchain, decentralized, data can not be tampered with, so trust the ledger” (after a few people tamper, the data of most honest people are consistent, we believe the majority).
“The essence of blockchain is a decentralized distributed database, which only supports updating the ledger in the form of data increase, and each update is carried out in the form of transactions, so you can trace the reason for the change of balance, the source and destination of each bill.” Because you can’t change a single transaction or delete the data, each of us trusts our little books and our books. When you have doubts about your account books, you can call everyone to check with each other to see whether there is a problem with the account books.
“So what problem does blockchain fundamentally solve?“
“I think the fundamental solution is the issue of trust, how to make two parties who don’t know each other feel comfortable transferring value.” Blockchain-based features: decentralized, data cannot be tampered with.
If you are smart, you should also see that there are many conditions to implement blockchain. Let’s take a look.
Issues to overcome in blockchain implementation
We can see some problems from the above example. Here are some big picture questions, after all, this article is not about technology. This will be explained in more detail in future articles, so please be patient and stay tuned.
- As you can see, the more bookkeepers, the safer it is. May be bookkeeping people scattered around the world, do not know each other, how to let everyone know when each other how much New Year’s money, who gave it?
- How to guarantee the authenticity of the information source of this bill that everyone knows? (Whether the transmission process is tampered with)
- How to ensure that if someone modifies a bill, or forwards a fake bill that has been modified to someone else, how will the bill be handled?
- How do you make sure that everyone is keeping accounts according to the agreed rules? Make sure all bills are added to their own database.
- What if someone colluded to change the books and broadcast the changed books?
- Let’s talk about the first problem: how to let people around the world know the origin of their lucky money, the amount and so on. This is called “peer to peer”, a peer-to-peer transmission in which both parties send messages directly to each other. P2p is the cornerstone of blockchain, and all operations need to be done by P2P. (There are many network problems with p2p, such as network partitioning)
- Second problem: you can use “asymmetric encryption algorithm”, using the private key for key data signature; Public key and original data, signature check. This allows you to verify that the data corresponds to the source and that the data has been tampered with.
- Third question: In fact, in the explanation of question 2, you can verify whether the bill has been modified. If the verification fails, you can discard the bill and wait for the correct bill to arrive, or you can ask for the bill from others who have been connected.
- Fourth question: Everyone verifies the validity of the bill according to some rules. The simplest way might be to vote on whether the bill is valid and record it. This step is known as “consensus”, where everyone votes on the validity of the bill and whether to accept it or not. Consensus is based on P2P communication, so there may be network failure, network partition; What’s more, there will be evil people tampering with bills, broadcasting fake bills, or agreeing and disagreeing and other disruptive behaviors in the process, affecting the progress of consensus. This is the problem of distributed transactions, how to reach a consensus on a value in a distributed scenario, so that everyone agrees on the value — all agree or all disagree, or a set of rules that allow a few people to disagree with everyone. For distributed consistency algorithms: 2PC, 3PC, PAXOS, PBFT, RAFT, etc. There are also POW, POS, DPOS which are unique to blockchain.
- Fifth question: This question actually belongs to the category of consensus, but we can know that we believe that the majority of people’s books, if the majority of people accept a changed account book, conversely, the “wrong account book” is actually correct, and accepted by everyone after consensus.
Blockchain classification
Blockchains are divided into three categories based on demand
- Public chain: refers to all people can participate in, can be up and down at any time;
- Alliance chain: People or institutions who want to join need CA certification, that is, they need to be approved by nodes in the existing alliance chain and meet the defined endorsement strategy. The same goes for exiting.
- Private chain: no one else is allowed to join or leave, or only those with permission are allowed to join, but no one else has the right to decide, and the private chain decides how transactions are handled, etc. I understand that private chain can no longer be called blockchain chain, it is a centralized distributed ledger.
The currency? The etheric lane? EOS?
You’ve probably heard these names, but you’ve also heard of blockchain-based cryptocurrencies.
But I emphasize !!!!! “Bitcoin, Ethereum, EOS and other digital currencies are not equivalent to blockchain, they are just an application of blockchain.”
Bitcoin is the first application of blockchain, and after time verification, it is feasible, and it is still in normal operation, without any centralized organization, all rely on the nodes in the Bitcoin blockchain network to jointly maintain.
Distributed ledger – Hyperledger Fabric
Hyperledger is an open source community dedicated to developing a stable set of frameworks, tools, and libraries for enterprise blockchain deployment. It has many open source products, most notably non-fabric, which is a commercially available alliance chain framework. In China, the development of alliance chain is also the main push. Alliance chain is the block chain that can truly undertake business, and the public chain has not yet found a good commercial scene. If you are interested in blockchain, we suggest developing towards alliance chain.
Domestic alliance chain framework
This list is in no particular order.
- XuperChain: Baidu’s completely independent research and development of the alliance chain framework. Making address: https://github.com/xuperchain/xuperchain
- FISCO BCOS: An alliance chain framework based on Ethereum, led by WeBank and developed by numerous enterprises. Github address: https://github.com/FISCO-BCOS/FISCO-BCOS
- CITA: Open source by Miape Technology, CITA is an open source block chain operating system kernel, with high stability, high performance, high scalability as the design goal. Gi thub address: https://github.com/citahub/cita
- Wutong Chain: Developed by Suzhou Tongji Blockchain Research Institute and based on open standards, the alliance chain platform focuses on the industry, combines the alliance and serves the community. Making address: https://github.com/tjfoc/wutongchain
When it comes to alliance chains, how can you not talk about smart contracts
A “Smart contract” (English: Smart contract) is a computer protocol designed to disseminate, validate or enforce contracts in an informationized manner. Smart contracts allow trusted transactions that are traceable and irreversible without a third party. The concept of smart contracts was first proposed by Nick Szabo in 1995.
“Can be understood as a system, when a certain condition is met automatically triggered execution of the program.” Smart contracts have been proposed for years, but why weren’t they used until Ethereum came along? Because smart contracts are automated programs, if the system running them is not trusted, the system may change its state during the process of running a smart contract, which runs counter to the concept of a contract. It wasn’t until the advent of blockchain that Ethereum introduced smart contracts into the blockchain, using the immutable nature of the blockchain to provide a trusted operating environment, that smart contracts could be used.
Soul torture?
- What is blockchain? Can you explain it to others in your own words?
- Why is blockchain created? What problem does blockchain solve?
- What is the main knowledge covered by blockchain? What are the categories?
- After you understand what blockchain is, do you have any good ideas or application scenarios?
This article is an introduction to blockchain, and subsequent articles will focus on the underlying technology.
This article is formatted using MDNICE